Spectrum Scope - Compute and display periodogram of each input signal

Library

Signal Processing Sinks

dspsnks4

Description

The Spectrum Scope block computes and displays the periodogram of the input. The input can be a sample-based or frame-based vector or a frame-based matrix.

Scope Properties Pane

The Buffer input check box must be selected for sample-based inputs. Buffering is optional for frame-based inputs. When the block input is buffered, you specify the number of input samples that the block buffers before computing and displaying the magnitude FFT in the Buffer size parameter. You also use the Buffer overlap parameter to specify the number of samples from the previous buffer to include in the current buffer. The number of new input samples the block acquires before computing and displaying the magnitude FFT is the difference between the buffer size and the buffer overlap.

The display update period is

where

For negative buffer overlap values, the block discards the appropriate number of input samples after the buffer fills, and updates the scope display at a slower rate than in the zero-overlap case.

The Window type and Window sampling parameters apply to the specification of the window function; see the Window Function block reference page for more details on these parameters.

The FFT length used by the block, Nfft, is determined in the following ways:

The block zero pads or wraps every channel's buffer to the FFT length before computing the FFT.

The number of spectra to average is set by the Number of spectral averages parameter. Setting this parameter to 1 effectively disables averaging; see the Periodogram block reference page for more information.

Display Properties Pane

For information about these parameters, see Display Properties Pane of the Vector Scope block reference page.

Axis Properties Pane

The Frequency units parameter specifies whether the frequency axis values should be in units of Hertz or rad/s. When the Frequency units parameter specifies Hertz, the spacing between frequency points is 1/(NfftTs). For Frequency units of rad/sec, the spacing between frequency points is 2π/(NfftTs).

The Frequency range parameter specifies the range of frequencies over which the magnitudes in the input should be plotted. The available options are [0..Fs/2], [-Fs/2..Fs/2], and [0..Fs], where Fs is the original time-domain signal's sample frequency.

Note that all of the Signal Processing Blockset™ FFT-based blocks, including those in the Power Spectrum Estimation library, compute the FFT at frequencies in the range [0,Fs). The Frequency range parameter controls only the displayed range of the signal.

The Display DC as parameter allows you to relabel the x-axis of the scope. Specify the new label for the DC frequency (0 Hz).

If you select the Inherit sample increment from input check box, the block computes the frequency data from the sample period of the input to the block. This is valid when the following conditions hold:

In cases where not all of these conditions hold, specify the appropriate value for the Sample time of original time series parameter.

When Frequency display limits is set to Auto, the block scales the horizontal axis of frequency-domain signals automatically. To do this, the Spectrum Scope block needs to know the actual sample period of the time-domain input. Specify this in the Sample time of original time series parameter, Ts.

When Frequency display limits is set to User-defined, the Minimum X-limit and Maximum X-limit parameters set the range of the horizontal axis. Setting these parameters is analogous to setting the xmin and xmax values of the MATLAB® axis function.

The Amplitude scaling parameter allows you to select Magnitude-squared or dB scaling along the y-axis.

Minimum Y-limit and Maximum Y-limit parameters set the range of the vertical axis. Setting these parameters is analogous to setting the ymin and ymax values of the MATLAB axis function.

The Y-axis title is the text displayed to the left of the y-axis.

Line Properties Pane

For information about these parameters, see Line Properties Pane in the Vector Scope block reference page.

Dialog Box

Scope Properties Pane

Buffer input

Select this check box to rebuffer the input data. This check box must be selected for sample-based inputs, but is optional for frame-based inputs.

This functionality is not supported for use with external mode. Instead, clear this check box and use a Buffer block prior to the Spectrum Scope in your model.

Buffer size

Specify the number of input samples that the block buffers before computing and displaying the magnitude FFT. When the Specify FFT length parameter is not selected, this value must be a power of two.

This parameter is only visible when the Buffer input check box is selected.

Buffer overlap

Specify the number of samples from the previous buffer to include in the current buffer. The number of new input samples the block acquires before computing and displaying the magnitude FFT is the difference between the buffer size and the buffer overlap.

This parameter is only visible when the Buffer input check box is selected.

Window type

Enter the type of window to apply. See the Window Function block reference page for more details. Tunable.

Stopband attenuation in dB

Enter the level, in dB, of stopband attenuation, Rs, for the Chebyshev window.. Tunable.

This parameter is only visible when Chebyshev is selected for the Window type parameter.

Beta

Enter the β parameter for the Kaiser window. Increasing Beta widens the mainlobe and decreases the amplitude of the window sidelobes in the window's frequency magnitude response. Tunable.

This parameter is only visible if Kaiser is selected for the Window type parameter.

Window sampling

Choose Symmetric or Periodic. Tunable.

This parameter is only visible if Blackman, Hamming, Hann, or Hanning is selected for the Window type parameter.

Specify FFT length

Select this check box to specify the FFT length yourself in the FFT length parameter.

FFT length

Enter the number of samples on which you want the block to perform the FFT. This value must be a power of two.

This parameter is only visible when then Specify FFT length check box is selected.

Number of spectral averages

The number of spectra to average. Setting this parameter to 1 effectively disables averaging. See the Periodogram block reference page for more information.

Display Properties Pane

Show grid

Toggle the scope grid on and off. Tunable.

Persistence

Select this check box to maintain successive displays. That is, the scope does not erase the display after each frame (or collection of frames), but overlays successive input frames in the scope display. Tunable.

Frame number

If you select this check box, the number of the current frame in the input sequence appears in the Vector Scope window. Tunable.

Channel legend

Toggles the legend on and off. Tunable.

Compact display

Resizes the scope to fill the window. Tunable.

Open scope at start of simulation

Select this check box to open the scope at the start of the simulation. When this parameter is cleared, the scope not open automatically during the simulation. Tunable.

Open scope immediately

If the scope is not open during simulation, select this check box to open it. This parameter is visible only while the simulation is running.

Scope position

A four-element vector of the form [left bottom width height] specifying the position of the scope window. (0,0) is the lower-left corner of the display. Tunable.

Axis Properties Pane

Frequency units

Choose the frequency units for the horizontal axis, Hertz or rad/sec. Tunable.

Frequency range

Specify the frequency range over which to plot the data. Tunable.

Display DC as

This parameter allows you to relabel the x-axis of the scope. Specify the new label for the DC frequency (0 Hz).

Inherit sample increment from input

If you select this check box, the block computes the time-domain sample period from the frame period and frame size of the frequency-domain input. Use this parameter only when the length of each frame of frequency-domain data is the same as the length of the frame of time-domain data from which it was generated. Tunable.

Sample time of original time series

Enter the sample period of the original time-domain signal. Tunable.

Frequency display limits

Select Auto to have the limits of the x-axis set for you automatically, or User-defined to set the limits yourself in the Minimum X-limit and Maximum X-limit parameters.

Minimum X-limit

Specify the minimum value of the x-axis. Setting this parameter is analogous to setting the xmin value of the MATLAB axis function. This parameter is only visible if the Frequency display limits parameter is set to User-defined. Tunable.

Maximum X-limit

Specify the maximum value of the x-axis. Setting this parameter is analogous to setting the xmax value of the MATLAB axis function. This parameter is only visible if the Frequency display limits parameter is set to User-defined. Tunable.

Amplitude scaling

Choose the scaling for the y-axis, dB or Magnitude-squared. Tunable.

Minimum Y-limit

Specify the minimum value of the y-axis. Setting this parameter is analogous to setting the ymin value of the MATLAB axis function. Tunable.

Maximum Y-limit

Specify the maximum value of the y-axis. Setting this parameter is analogous to setting the ymax value of the MATLAB axis function.Tunable.

Y-axis title

Specify text to be displayed to the left of the y-axis. Tunable.

Line Properties Pane

For more information about these parameters, see Line Properties Pane in the Vector Scope block reference page.

Line visibilities

Enter on or off to specify the visibility of the various channels' scope traces. Separate your choices for each channel with by a pipe (|) symbol. Tunable.

Line styles

Enter the line styles of the various channels' scope traces using the MATLAB line function LineStyle formats. Separate your choices for each channel with by a pipe (|) symbol. Tunable.

Line markers

Enter the line markers of the various channels' scope traces using the MATLAB line function Marker formats. Separate your choices for each channel with by a pipe (|) symbol. Tunable.

Line colors

Enter the colors of the various channels' scope traces using the MATLAB ColorSpec formats. Separate your choices for each channel with by a pipe (|) symbol. Tunable.

Supported Data Types

PortSupported Data Types

Input

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point (signed and unsigned)

  • Boolean

  • 8-, 16-, and 32-bit signed integers

  • 8-, 16-, and 32-bit unsigned integers

See Also

FFTSignal Processing Blockset
PeriodogramSignal Processing Blockset
Short-Time FFTSignal Processing Blockset
Vector ScopeSignal Processing Blockset
Window FunctionSignal Processing Blockset

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS