| Signal Processing Blockset™ | ![]() |
Signal Processing Sinks
dspsnks4
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.
Note When the Buffer input and Specify FFT length parameters are both cleared, the block input length must be a power of two. |
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
Mo = buffer size
L = buffer overlap
Ts = input sample period
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:
If you clear the Specify FFT length check box and select Buffer input, the block uses the buffer size as the FFT size.
If you clear the both the Specify FFT length and Buffer input check boxes, the block uses the input size as the FFT size.
If you select the Specify FFT length check box, the FFT length parameter appears on the dialog box. Enter the number of samples on which you want the block to perform the FFT. This value must be a power of two.
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.
For information about these parameters, see Display Properties Pane of the Vector Scope block reference page.
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:
The input to the block is the original signal, with no samples added or deleted (by insertion of zeros, for example).
The sample period of the time-domain signal in the simulation is equal to the period with which the physical signal was originally sampled.
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.
For information about these parameters, see Line Properties Pane in the Vector Scope block reference page.
See Displaying Frequency-Domain Data in the Signal Processing Blockset User's Guide.

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.
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.
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.
Enter the type of window to apply. See the Window Function block reference page for more details. Tunable.
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.
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.
Choose Symmetric or Periodic. Tunable.
This parameter is only visible if Blackman, Hamming, Hann, or Hanning is selected for the Window type parameter.
Select this check box to specify the FFT length yourself in the FFT length parameter.
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.
The number of spectra to average. Setting this parameter to 1 effectively disables averaging. See the Periodogram block reference page for more information.

Toggle the scope grid on and off. Tunable.
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.
If you select this check box, the number of the current frame in the input sequence appears in the Vector Scope window. Tunable.
Toggles the legend on and off. Tunable.
Resizes the scope to fill the window. Tunable.
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.
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.
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.

Choose the frequency units for the horizontal axis, Hertz or rad/sec. Tunable.
Specify the frequency range over which to plot the data. Tunable.
This parameter allows you to relabel the x-axis of the scope. Specify the new label for the DC frequency (0 Hz).
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.
Enter the sample period of the original time-domain signal. Tunable.
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.
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.
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.
Choose the scaling for the y-axis, dB or Magnitude-squared. Tunable.
Specify the minimum value of the y-axis. Setting this parameter is analogous to setting the ymin value of the MATLAB axis function. Tunable.
Specify the maximum value of the y-axis. Setting this parameter is analogous to setting the ymax value of the MATLAB axis function.Tunable.
Specify text to be displayed to the left of the y-axis. Tunable.

For more information about these parameters, see Line Properties Pane in the Vector Scope block reference page.
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.
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.
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.
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.
| Port | Supported Data Types |
|---|---|
Input |
|
| FFT | Signal Processing Blockset |
| Periodogram | Signal Processing Blockset |
| Short-Time FFT | Signal Processing Blockset |
| Vector Scope | Signal Processing Blockset |
| Window Function | Signal Processing Blockset |
![]() | Sort | Stack | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |