Main Content

Label Radar Signals with Signal Labeler

此示例显示了如何标记脉冲雷达信号的主要时间和频率特征。此步骤促进了创建完整而准确的数据集以培训人工智能(AI)模型的过程。信号标签eases this task in two ways. In manual mode, synchronized time and time-frequency views help you identify frequency features such as the waveform type, which can be长方形,,,,线性, 或者Steppedfm。In automated mode, you can register functions that measure the pulse repetition frequency (PRF), pulse width, duty cycle, and pulse bandwidth and only correct mistakes instead of labeling all signals from scratch. A built-in dashboard helps track the labeling progress and assess the quality of the labels.

将数据导入信号标签

这radar signals in this example are stored in individual MAT files. Each file contains a data variableX和相应的采样率变量FS

打开信号标签。在Labeler选项卡,单击Import并选择From Foldersin theMemberslist. In the dialog box, select the directory with radar signal files. To specify the signal variables that you want to read, click指定and enterX。添加时间信息:选择在工作option and select时间从列表中。选择文件率变量在列表中输入FS。点击Import。这imported files appear in the标记的信号集浏览器。Plot the first three signals by selecting the check boxes next to their names.

定义标签

Create a label definition for the signal waveform type.

  1. 点击添加on theLabeler选项卡和选择添加Label Definition

  2. In the dialog box, specify标签名称作为waveformtype。SetLabel Type属性andData Type细绳

  3. 点击OK

Repeat these steps to create attribute label definitions for PRF, duty cycle, and bandwidth. Modify the label name for each and set the data type tonumeric

为脉冲宽度创建一个利益区域(ROI)标签,对应于显示用于计算每个脉冲宽度的初始和最终交叉点的区域。指定标签名称作为脉搏宽,,,,Label Type作为ROI, andData Type作为numeric。标签定义出现在Label Definitions浏览器。

创建自定义自动标签功能

Use four自定义标签功能到label the PRF, bandwidth, duty cycle, and pulse width. Code for these functions is given in the金宝app支持功能section of the example. To create each function, on theLabeler选项卡,单击Automate Value并选择添加Custom Function信号标签显示一个对话框,您可以在其中输入函数的名称,描述和标签类型。

  1. For the function that computes the PRF, entercomputePRFin the姓名字段和选择属性作为Label Type。You can leave theDescriptionfield empty or you can enter your own description.

  2. 对于计算带宽的函数,请输入computeBandWidthin the姓名字段和选择属性作为Label Type。You can leave theDescriptionfield empty or you can enter your own description.

  3. 对于计算占空比的功能,请输入计算机周期in the姓名字段和选择属性作为Label Type。You can leave theDescriptionfield empty or you can enter your own description.

  4. 对于计算脉冲宽度的函数,请输入ComputePulSeWidthin the姓名字段和选择ROI作为Label Type。You can leave theDescriptionfield empty or you can enter your own description.

如果您已经编写了功能,并且功能在当前文件夹中或MATLAB®路径中,则信号标签adds the functions to the gallery. If you have not written the functions,信号标签打开编辑器中的空白模板供您键入或粘贴代码。保存文件。保存文件后,功能将出现在图库中。

Label Waveform Type, PRF, Bandwidth, Duty Cycle, and Pulse Width

Set the waveform type of each signal:

  1. In the标记的信号集浏览器,,,,select the check box next toradardata1

  2. 点击the展示选项卡和选择Spectrogramin the视图部分。该应用显示一组具有信号谱图和A的轴Spectrogram选项选项,以控制视图。

  3. 点击theSpectrogram标签并将重叠百分比设置为99

  4. 频谱图显示信号波形是矩形。在标签查看器属性表中,双击下面的单元格waveformtype和类型长方形

  5. Repeat this manual labeling step for all the signals in the data set.

An example of a线性waveform follows.

An example of aSteppedfmwaveform follows.

计算输入信号的PRF并标记。

  1. 选择prfin theLabel Definitions浏览器。

  2. In theAutomate Valuegallery, selectcomputePRF

  3. 点击Auto-Label并选择Auto-Label All Signals。In the dialog box that appears, clickOK

Repeat the above steps for bandwidth, duty cycle, and pulse width by selecting the corresponding label definition and autolabeling function.

信号标签计算和标记所有信号,但仅显示选择复选框的信号标签。绘制前五个成员的信号。

Validate Labeled Signals

查看您的标签进度并验证计算的标签值是否正确。选择waveformtypein theLabel Definitionsbrowser and click仪表盘in theLabelertab.

这plot on the left shows the labeling progress, which is 100% as all signals are labeled with thewaveformtypelabel. The plot on the right shows the number of signals with labels for each label value. You can use the标签分布饼图评估标签的准确性并确认结果是预期的。

接下来,验证所有脉冲宽度标签值均在周围分布5E-5。To look at the time distribution of the pulse width label values, clickDefinition Selectionon the仪表盘选项卡和选择脉搏宽。单击时间分布图和仪表盘tab, set垃圾箱3,,,,X分钟4E-5andX Max6e-5。All signals have a pulse width distributed around5E-5

Close the dashboard.

导出标记为信号

将标记的信号导出到训练AI模型。在Labeler选项卡,单击Export并选择Labeled Signal Set To File。在出现的对话框中,给出名称radarDataLss.mat到the labeled signal set and add an optional short description. ClickExport

Go back to the MATLAB® Command Window. Load the labeled signal set and create signal and label datastores from the labeled signal set. Create a combined datastore with the signal and label datastores. Usereador读取要获得信号标签对,您可以用来训练AI型号。

加载radarDataLss.mat[signalDS,labelDs] = ls.createDatastores(“ waveformtype”);组合= combine(信号,labelds);

金宝app支持功能

computePRF功能:计算脉冲重复频率

computePRF功能计算并标记输入信号的PRF。它使用Pulseperiod功能。

function[labelval,libelloc] = computeprf(x,t,parentlabelval,parentlabelloc,varargin)%功能以计算雷达脉冲的脉冲重复频率if〜isreal(x)x = abs(x);结尾pri = pulseperiod(x,t); labelVal = 1/pri(1); labelLoc = [];结尾

computeBandWidthFunction: Calculate the pulse bandwidth

computeBandWidth功能计算并标记输入信号的带宽。它使用obw功能。

function[labelval,libelloc] = computebandwidth(x,t,parentlabelval,〜,varargin)%功能以计算雷达脉冲的带宽if〜isreal(x)x = abs(x);结尾fs = 1/mean(diff(t)); labelVal = obw(x,fs); labelLoc = [];结尾

计算机周期Function: Calculate the pulse duty cycle

计算机周期功能计算并标记输入信号的占空比。它使用占空比功能。

function[labelVal,labelLoc] = computeDutyCycle(x,t,parentLabelVal,parentLabelLoc,varargin)%功能以计算雷达脉冲的占空比if〜isreal(x)x = abs(x);结尾labelVal = dutycycle(x,t); labelLoc = [];结尾

ComputePulSeWidthFunction: Calculate the pulse width

ComputePulSeWidthfunction computes and labels the pulse width of the input signal. It uses thepulsewidth功能。

function[labelval,libelloc] = computepulsewidth(x,t,parentlabelval,parentlabelloc,varargin)% Function to calculate pulse width of a radar pulseif〜isreal(x)x = abs(x);结尾[pw,ic,fc] = pulsewidth(x,t); labelVal = pw(1); labelLoc = [ic(1) fc(1)];结尾

也可以看看

应用

职能

Related Topics