Main Content

Customize Labeling View

InSignal Labeleryou can use the spectrum or spectrogram view to inspect signals. You can also use the time-frequency view to aid labeling.

Tip

To toggle the label viewer, click theDisplaytab and selectLabel Viewerin theViewssection.

Visualize Signal Spectra and Spectrograms

Spectrum View

To activate the frequency-domain view of a signal, click theDisplaytab and selectSpectrumin theViewssection. The app displays a set of axes with the signal power spectrum and aSpectrum选项卡选项来控制the view.

Signal Labelerscales the spectrum so that, if the frequency content of a signal falls exactly within a bin, its amplitude in that bin is the true average power of the signal. For example, the average power of a sinusoid is one-half the square of the sinusoid amplitude. For more details, seeMeasure Power of Deterministic Periodic Signals.

Signal Labelercomputes spectra using the same steps asSignal Analyzer. For more information, seeSpectrum Computation in Signal Analyzer.

Note

When displaying a spectrum,Signal Labelerconverts the power to dB using10 log10(Power).

Spectrogram View

To activate the time-frequency view of a signal, click theDisplaytab and selectSpectrogramin theViewssection. The app displays a set of axes with the signal spectrogram and aSpectrogram选项卡选项来控制the view. You can plot the spectrogram of only one signal per display.

To apply reassignment to a spectrogram, check重新分配in theSpectrogramtab. The reassignment technique sharpens the time and frequency localization of spectrograms by reassigning each power spectrum estimate to the location of its center of energy. If your signal contains well-localized temporal or spectral components, then this option generates a spectrogram that is easier to read and interpret.

Signal Labelercomputes spectrograms using the same steps asSignal Analyzer. For more information, seeSpectrogram Computation in Signal Analyzer.

Tip

Use the spectrogram view of one of the signals in a multichannel member to better label the member with a region of interest seen more clearly in the time-frequency domain.

Settings

  • If the panner is activated and is zoomed in on a particular region of interest (ROI), the display corresponds to the region of interest, not the entire signal.

  • If you zoom in on a region of the signal in the time plot using one of the zoom actions on theDisplaytab, the display corresponds to the region of interest, not the entire signal.

  • You cannot zoom out in frequency beyond the Nyquist range.

  • To change the frequency scale, selectLinearorLogin theFrequency Scalelist. The app does not support a logarithmic scale when a complex-valued signal is plotted.

  • By default, the app displays the spectrum or spectrogram in decibels. To toggle between decibels and linear scale, select or deselect theSpectrum in dBcheck box.

If a signal is nonuniformly sampled, thenSignal Labelerinterpolates the signal to a uniform grid to compute spectral estimates. The app uses linear interpolation and assumes a sample time equal to the median of the differences between adjacent time points. For a nonuniformly sampled signal to be supported, the median time interval and the mean time interval must obey

1 100 < Median time interval Mean time interval < 100.

Use Spectrogram to Aid Labeling

To label a member using the spectrogram view, select the check box next to the signal you want to plot in theLabeled Signal Set Browserand activate the spectrogram view. Select the label definition you want to apply on theLabel Definitionsbrowser.Draw Labelsis automatically activated when the label definition is an ROI or a point. Specify the label value in theSet Valuesection of theLabelertab, or assign the value after the label is drawn. Click on the spectrogram to add the label:

  • For ROI labels, click and drag the animated dashed line to create a shaded region. Move and resize the active region until it encloses the region of interest.

  • For point labels, move the animated dashed line until it crosses the signal at the point of your choice.

To accept a label, click theAcceptcheck mark in theOptionssection, pressEnter, or double-click the active region or line. A label is automatically accepted when a subsequent label is drawn.

Tip

The time-frequency view can be used to identify and label transient narrowband signals embedded in broadband signals. For more information, seeFind Interference Using Persistence Spectrum.

Example: Label a Signal in Spectrogram View

Generate a signal composed of a voltage-controlled oscillator and four Gaussian atoms. The signal is sampled at 1.4 kHz. UseSpectrograminSignal Labelerto label the Gaussian atoms in the signal.

fs = 1400; t = (0:1/fs:2)'; gaussFun = @(A,x,mu,f) exp(-(x-mu).^2/(2*0.01^2)).*sin(2*pi*f.*x)*A'; s = gaussFun([1 1 1 1],t,[0.2 0.5 1 1.75],[2 6 2 5]*100)/10; x = vco(chirp(t+.1,0,t(end),3).*exp(-2*(t-1).^2),[0.1 0.4]*fs,fs); s = s/10+x;

OpenSignal Labelerand import the signal:

  1. On theLabelertab, clickImport, selectFrom Workspacein theMemberslist, and select thesvariable in the dialog box that appears.

  2. Set the time information. SelectTimefrom theWorking indrop-down list, selectSample Rate, and specify the sample rate as1.4kHz.

  3. ClickImport and Close.

  4. Select the check box next to the signal name in theLabeled Signal Set Browserto display the signal in the time plot.

  5. Click theValuecolumn to change the color of the signal.

The oscillating chirp dominates the signal and obscures the atoms in the time plot.

signalLabeler_spectrogram1_22b.png

Create a signal label definition:

  1. ClickAdd Definitionand selectAdd label definition.

  2. In the dialog box, specifyLabel NameasAtoms,Label TypeasROI, andData Typeaslogical.

  3. ClickOK.

On theDisplaytab, clickSpectrogramin theViewssection to activate the spectrogram view of the signal. Adjust the spectrogram settings in theSpectrogramtab. In theTime Resolutionsection,SpecifyaResolutionof120msand anOverlapof99%.

The locations of the atoms are visible in the spectrogram.

signalLabeler_spectrogram2_22b.png

Label the atoms:

  1. On theLabelertab, select the label definition in theLabel Definitionsbrowser.

  2. Specify the label value astruein theSet Label Valuesection.

  3. Click the spectrogram plot to draw the label. Click and drag the animated dashed line to create a shaded region. Move and resize the active region until it encloses the first atom.

  4. Click the spectrogram plot again to draw the label for a different atom. The app automatically accepts the previous label.

  5. Repeat the procedure to label the other two atoms.

signalLabeler_spectrogram3_22b.png

See Also

Apps

Functions

Related Examples

More About

Baidu
map