Display Frequency Spectrum of Time-Domain Signals - MATLAB PDF
Display Frequency Spectrum of Time-Domain Signals - MATLAB PDF
Spectrum Analyzer
Display frequency spectrum of time-domain signals
Library
Utilities
Description
Note
The Spectrum Analyzer block in the Simscape™ product contains a subset of functionality of the DSP System
Toolbox™ block with the same name. This page describes the block configuration and functionality available
with a Simscape license. If you also have a DSP System Toolbox license, then the Spectrum Analyzer block in
the Simscape > Utilities library is identical to the block in the DSP System Toolbox > Sinks library. For more
information, see Spectrum Analyzer in the DSP System Toolbox documentation.
The Spectrum Analyzer block accepts input signals with discrete sample times and displays frequency spectra of these
signals.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 1/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
Note
To prevent the scope from opening when you run your model, right-click the scope icon and select Comment
Out. If the scope is already open, and you comment it out in the model, the scope displays, “No data can be
shown because this scope is commented out.” Select Uncomment to turn the scope back on.
Note
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 2/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
When this check box is selected, Spectrum Analyzer may display a misleading spectrum in some situations.
For example, if the input signal is wide-band with non-stationary behavior, such as a chirp signal, Spectrum
Analyzer might display a stationary spectrum. The reason for this behavior is that Spectrum Analyzer buffers
the input signal data and only updates the display periodically at approximately 20 times per second.
Therefore, Spectrum Analyzer does not render changes to the spectrum that occur and elapse between
updates, which gives the impression of an incorrect spectrum. To ensure that spectral estimates are as
accurate as possible, clear the Reduce Plot Rate to Improve Performance check box. When you clear this
box, Spectrum Analyzer calculates spectra whenever there is enough data, rendering results correctly.
Spectrum Settings
The Spectrum Settings panel appears at the right side of the Spectrum Analyzer figure. This panel enables you to
modify settings to control the manner in which the spectrum is calculated. You can choose to hide or display the
Spectrum Settings panel. In the Spectrum Analyzer menu, select View > Spectrum Settings. Alternatively, in the
Spectrum Analyzer toolbar, select the Spectrum Settings button.
The Spectrum Settings panel is separated into three panes, labeled Main Options, Window Options, and Trace
Options. You can expand each pane to see the available options.
• Sample rate (Hz) — The sample rate, in hertz, of the input signals. Select Inherited to use the same sample rate
as the input signal. To specify a sample rate, enter its value.
• RBW (Hz) — The resolution bandwidth, in hertz. This property defines the smallest positive frequency that can be
resolved. By default, this property is set to Auto. In this case, the Spectrum Analyzer determines the appropriate
value to ensure that there are 1024 RBW intervals over the specified frequency span.
If you set this property to a numeric value, then you must specify a value that ensures there are at least two RBW
intervals over the specified frequency span. In other words, the ratio of the overall frequency span to RBW must be
span
at least two: > 2 .
RBW
• Samples/update — The number of input samples required to compute one spectral update. You cannot modify this
property; it is shown here for display purposes only. This property is directly related to RBW by the following
( )
Op
1 − × NENBW × Fs
100
equation: Nsamples = or to the window length by this equation:
RBW
sample rate. If the number of samples provided in the input are not sufficient to achieve the resolution bandwidth
that you specify, Spectrum Analyzer produces a message on the display as shown in the following figure.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 3/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
• Overlap (%) — The segment overlap percentage. This parameter defines the amount of overlap between the
previous and current buffered data segments. The overlap creates a window segment that is used to compute a
spectral estimate. The value must be greater than or equal to zero and less than 100.
• Window — The windowing method to apply to the spectrum. Available options are Rectangular and Hann.
Windowing is used to control the effect of sidelobes in spectral estimation. The window you specify affects the
window length required to achieve a resolution bandwidth and the required number of samples per update. For
more information about windowing, see Windows (Signal Processing Toolbox) in the Spectral Analysis section.
• NENBW — Normalized Effective Noise Bandwidth of the window. You cannot modify this parameter; it is a readout
shown here for display purposes only. This parameter is a measure of the noise performance of the window. It is the
width of a rectangular filter that accumulates the same noise power with the same peak power gain. NENBW can be
calculated from the windowing function using the following equation: . The
rectangular window has the smallest NENBW, with a value of 1. All other windows have a larger NENBW value. For
example, the Hann window has an NENBW value of approximately 1.5.
• Units — The units of the spectrum. Depends on the value of the spectrum type.
Power dBV
• Averages — Specify as a positive, scalar integer the number of spectral averages. Spectrum Analyzer computes
the current power spectrum estimate by computing a running average of the last N power spectrum estimates. This
property defines the number of spectral averages, N.
• Reference load — The reference load, in ohms, used to scale the spectrum. Specify as a real, positive scalar the
load, in ohms, that the Spectrum Analyzer uses as a reference to compute power values.
• Scale — Linear or logarithmic scale. When the frequency span contains negative frequency values, Spectrum
Analyzer disables the logarithmic option.
• Offset — The constant frequency offset to apply to the entire spectrum or a vector of frequencies to apply to each
spectrum for multiple inputs. The offset parameter is added to the values on the frequency-axis in the Spectrum
Analyzer window. It is not used in any spectral computations.
• Two-sided spectrum — Select this check box to enable two-sided spectrum view. In this view, both negative and
positive frequencies are shown. If you clear this check box, Spectrum Analyzer shows a one-sided spectrum with
only positive frequencies. Spectrum Analyzer requires that this parameter is selected when the input signal is
complex-valued.
Measurements Panels
Note
If a data point in your signal has more than one value, the cursor measurement at that point is undefined and
no cursor value is displayed.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 4/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
In the Scope menu, select Tools > Measurements > Cursor Measurements. Alternatively, in the Scope toolbar, click
the Cursor Measurements button.
You can use the mouse or the left and right arrow keys to move vertical or waveform cursors and the up and down
arrow keys for horizontal cursors.
In the Settings pane, you can modify the type of screen cursors used for calculating measurements. When more than
one signal is displayed, you can assign cursors to each trace individually.
• Screen Cursors — Shows screen cursors (for spectrum and dual view only).
• Horizontal — Shows horizontal screen cursors (for spectrum and dual view only).
• Vertical — Shows vertical screen cursors (for spectrum and dual view only).
• Waveform Cursors — Shows cursors that attach to the input signals (for spectrum and dual view only).
• Lock Cursor Spacing — Locks the frequency difference between the two cursors.
• Snap to Data — Positions the cursors on signal data points.
The Measurements pane displays the frequency (Hz) and power (dBm) value measurements. Channel Power shows
the total power between the cursors.
The letter after the value associated with a measurement indicates the abbreviation for the appropriate International
System of Units (SI) prefix.
• From the menu, select Tools > Measurements > Peak Finder.
• On the toolbar, click the Peak Finder button.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 5/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
The Settings pane enables you to modify the parameters used to calculate the peak values within the displayed
portion of the input signal. For more information on the algorithms this pane uses, see the findpeaks function
reference.
Properties to set:
• Peak Threshold — The level above which peaks are detected. This setting is equivalent to the MINPEAKHEIGHT
parameter, which you can set when you run the findpeaks function.
• Max Num of Peaks — The maximum number of peaks to show. The value you enter must be a scalar integer from
1 through 99. This setting is equivalent to the NPEAKS parameter, which you can set when you run the findpeaks
function.
• Min Peaks Distance — The minimum number of samples between adjacent peaks. This setting is equivalent to the
MINPEAKDISTANCE parameter, which you can set when you run the findpeaks function.
• Peak Excursion — The minimum height difference between a peak and its neighboring samples. Peak excursion is
illustrated alongside peak threshold in the following figure.
The peak threshold is a minimum value necessary for a sample value to be a peak. The peak excursion is the
minimum difference between a peak sample and the samples to its left and right in the time domain. In the figure,
the green vertical line illustrates the lesser of the two height differences between the labeled peak and its
neighboring samples. This height difference must be greater than the Peak Excursion value for the labeled peak to
be classified as a peak. Compare this setting to peak threshold, which is illustrated by the red horizontal line. The
amplitude must be above this horizontal line for the labeled peak to be classified as a peak.
The peak excursion setting is equivalent to the THRESHOLD parameter, which you can set when you run the
findpeaks function.
• Label Format — The coordinates to display next to the calculated peak values on the plot. To see peak values, you
must first expand the Peaks pane and select the check boxes associated with individual peaks of interest. By
default, both x-axis and y-axis values are displayed on the plot. Select which axes values you want to display next to
each peak symbol on the display.
˗ X+Y — Display both x-axis and y-axis values.
˗ X — Display only x-axis values.
˗ Y — Display only y-axis values.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 6/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
The Peaks pane displays the largest calculated peak values. It also shows the coordinates at which the peaks occur,
using the parameters you define in the Settings pane. You set the Max Num of Peaks parameter to specify the
number of peaks shown in the list.
The numerical values displayed in the Value column are equivalent to the pks output argument returned when you run
the findpeaks function. The numerical values displayed in the second column are similar to the locs output argument
returned when you run the findpeaks function.
The Peak Finder displays the peak values in the Peaks pane. By default, the Peak Finder panel displays the largest
calculated peak values in the Peaks pane in decreasing order of peak height.
Use the check boxes to control which peak values are shown on the display. By default, all check boxes are cleared
and the Peak Finder panel hides all the peak values. To show or hide all the peak values on the display, use the check
box in the top-left corner of the Peaks pane.
The Peaks are valid for any units of the input signal. The letter after the value associated with each measurement
indicates the abbreviation for the appropriate International System of Units (SI) prefix, such as m for milli-. For example,
if the input signal is measured in volts, an m next to a measurement value indicates that this value is in units of
millivolts.
• From the menu, select Tools > Measurements > Distortion Measurements.
• On the toolbar, click the Distortion Measurements button.
The Distortion Measurements panel has an expandable Harmonics pane, which shows measurement results for the
specified number of harmonics.
Note
For an accurate measurement, ensure that the fundamental signal (for harmonics) or primary tones (for
intermodulation) is larger than any spurious or harmonic content. To do so, you may need to adjust the
resolution bandwidth (RBW) of the spectrum analyzer. Make sure that the bandwidth is low enough to isolate the
signal and harmonics from spurious and noise content. In general, you should set the RBW so that there is at
least a 10dB separation between the peaks of the sinusoids and the noise floor. You may also need to select a
different spectral window to obtain a valid measurement.
• Distortion — The type of distortion measurements to display. Available options are Harmonic or
Intermodulation. Select Harmonic if your system input is a single sinusoid. Select Intermodulation if your
system input is two equal amplitude sinusoids. Intermodulation can help you determine distortion when only a small
portion of the available bandwidth will be used.
See Distortion Measurements (DSP System Toolbox) for information on how distortion measurements are
calculated.
When you select Harmonic as the Distortion, the following fields appear.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 7/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
The harmonic distortion measurement automatically locates the largest sinusoidal component (fundamental signal
frequency). It then computes the harmonic frequencies and power in each harmonic in your signal. Any DC component
is ignored. Any harmonics that are outside the spectrum analyzer’s frequency span are not included in the
measurements. Adjust your frequency span so that it includes all the desired harmonics.
Note
To view the best harmonics, make sure that your fundamental frequency is set high enough to resolve the
harmonics. However, this frequency should not be so high that aliasing occurs. For the best display of
harmonic distortion, your plot should not show skirts, which indicate frequency leakage. Also, the noise floor
should be visible.
For a better display, try a Kaiser window with a large sidelobe attenuation (e.g. between 100–300 db).
• Num. Harmonics — Number of harmonics to display, including the fundamental frequency. Valid values of Num.
Harmonics are from 2 to 99. The default value is 6.
• Label Harmonics — Select Label Harmonics to add numerical labels to each harmonic in the spectrum display.
• 1 — The fundamental frequency, in hertz, and its power, in decibels of the measured power referenced to 1 milliwatt
(dBm).
• 2, 3, ... — The harmonics frequencies, in hertz, and their power in decibels relative to the carrier (dBc). If the
harmonics are at the same level or exceed the fundamental frequency, reduce the input power.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 8/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
• THD — The total harmonic distortion. This value represents the ratio of the power in the harmonics, D, to the power
in the fundamental frequency, S. If the noise power is too high in relation to the harmonics, the THD value is not
accurate. In this case, lower the resolution bandwidth or select a different spectral window.
THD = 10 ⋅ log10 D S( / )
• SNR — Signal-to-noise ratio (SNR). This value represents the ratio of power in the fundamental frequency, S, to the
power of all nonharmonic content, N, including spurious signals, in decibels relative to the carrier (dBc).
SNR = 10 ⋅ log10 S ( /N )
If you see –– as the reported SNR, the total non-harmonic content of your signal is less than 30% of the total signal.
• SINAD — Signal-to-noise-and-distortion. This value represents the ratio of the power in the fundamental frequency,
S to all other content (including noise, N, and harmonic distortion, D), in decibels relative to the carrier (dBc).
( )
S
SINAD = 10 ⋅ log10
N + D
• SFDR — Spurious free dynamic range (SFDR). This value represents the ratio of the power in the fundamental
frequency, S, to power of the largest spurious signal, R, regardless of where it falls in the frequency spectrum. The
worst spurious signal may or may not be a harmonic of the original signal. SFDR represents the smallest value of a
signal that can be distinguished from a large interfering signal. SFDR includes harmonics.
SNR = 10 ⋅ log10 S ( / R)
When you select Intermodulation as the Distortion, the following fields appear.
The intermodulation distortion measurement automatically locates the fundamental, first-order frequencies (F1 and F2).
It then computes the frequencies of the third-order intermodulation products (2*F1-F2 and 2*F2-F1).
• Label frequencies — Select Label frequencies to add numerical labels to the first-order intermodulation product
and third-order frequencies in the spectrum analyzer display.
• F1 — Lower fundamental first-order frequency
• F2 — Upper fundamental first-order frequency
• 2F1 - F2 — Lower intermodulation product from third-order harmonics
• 2F2 - F1 — Upper intermodulation product from third-order harmonics
• TOI — Third-order intercept point. If the noise power is too high in relation to the harmonics, the TOI value will not
be accurate. In this case, you should lower the resolution bandwidth or select a different spectral window. If the TOI
has the same amplitude as the input two-tone signal, reduce the power of that input signal.
You can choose to hide or display the Trace Selection panel. In the Scope menu, select Tools > Measurements >
Trace Selection.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 9/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
Title
Specify the display title as a character vector. Enter %<SignalLabel> to use the signal labels in the Simulink Model
as the axes titles. This property is Tunable (Simulink).
Show legend
Select this check box to show the legend in the display. The channel legend displays a name for each channel of
each input signal. When the legend appears, you can place it anywhere inside of the scope window. To turn off the
legend, clear the Show legend check box. Tunable (Simulink)
You can edit the name of any channel in the legend by double-clicking the current name and entering a new channel
name. By default, if the signal has multiple channels, the scope uses an index number to identify each channel of
that signal. To change the appearance of any channel of any input signal in the scope window, from the scope menu,
select View > Style. The legend lets you modify what signals are shown. To show only one signal, click the signal
name. To toggle a signal on/off, right-click the signal name.
The legend lets you modify what signals are shown. To show only one signal, click the signal name. To toggle a
signal on/off, right-click the signal name.
Show grid
When you select this check box, a grid appears in the display of the scope figure. To hide the grid, clear this check
box. Tunable (Simulink)
Y-limits (Minimum)
Specify the minimum value of the y-axis. Tunable (Simulink)
Y-limits (Maximum)
Specify the maximum value of the y-axis. Tunable (Simulink)
Y-axis label
Specify the text for the scope to display to the left of the y-axis. Regardless of this property, Spectrum Analyzer
always displays power units after this text as one of 'dBm', 'dBW', 'Watts', 'dBm/Hz', 'dBW/Hz', or 'Watts/Hz'.
Tunable (Simulink).
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 10/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
Properties
The Style dialog box allows you to modify the following properties of the Spectrum Analyzer figure:
Figure color
Specify the color that you want to apply to the background of the scope figure. By default, the figure color is gray.
Plot type
Specify whether to display a Line or Stem plot.
Axes colors
Specify the color that you want to apply to the background of the axes.
Visible
Specify whether the selected channel should be visible. If you clear this check box, the line disappears.
Line
Specify the line style, line width, and line color for the selected channel.
Marker
Specify marks for the selected channel to show at its data points. This parameter is similar to the Marker property for
plot objects. You can choose any of the marker symbols from the dropdown.
Algorithms
Spectrum Analyzer uses the RBW or the Window Length setting in the Spectrum Settings panel to determine the data
window length. The value of the FrequencyResolutionMethod property determines whether RBW or window length is
used. Then, it partitions the input signal into a number of windowed data segments. Finally, Spectrum Analyzer uses the
modified periodogram method to compute spectral updates, averaging the windowed periodograms for each segment.
1. Spectrum Analyzer requires that a minimum number of samples have been provided before it computes a spectral
estimate. This number of input samples required to compute one spectral update is shown as Samples/update in
the Main options pane. This value is directly related to resolution bandwidth, RBW, by the following equation or to
the window length, by the equation shown in step 1b.
( )
Op
1 − × NENBW × Fs
100
Nsamples =
RBW
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 11/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
The normalized effective noise bandwidth, NENBW, is a factor that depends on the windowing method. Spectrum
Analyzer shows NENBW in the Window Options pane of the Spectrum Settings panel. Overlap percentage, O , p
is the value of the Overlap % parameter in the Window Options pane of the Spectrum Settings panel. F is the s
sample rate of the input signal. Spectrum Analyzer shows sample rate in the Main Options pane of the Spectrum
Settings panel.
a. When in RBW mode, the window length required to compute one spectral update, N , is directly related to
window
the resolution bandwidth and normalized effective noise bandwidth by the following equation.
When you increase the overlap percentage, fewer new input samples are needed to compute a new spectral
update. For example, if the window length is 100, then the number of input samples required to compute one
spectral update is given as shown in the following table.
Op Nsamples
0% 100
50% 50
80% 20
c. The normalized effective noise bandwidth, NENBW, is a window parameter determined by the window length,
Nwindow, and the type of window used. If w(n) denotes the vector of N window coefficients, then NENBW is
window
d. When in RBW mode, you can set the resolution bandwidth using the value of the RBW parameter on the Main
options pane of the Spectrum Settings panel. You must specify a value to ensure that there are at least two
RBW intervals over the specified frequency span. The ratio of the overall span to RBW must be greater than
two, as given in the following equation.
span
> 2
RBW
By default, the RBW parameter on the Main options pane is set to Auto. In this case, the Spectrum Analyzer
determines the appropriate value to ensure that there are 1024 RBW intervals over the specified frequency
span
span. Thus, when you set RBW to Auto, it is calculated by the following equation. RBW auto
=
1024
e. When in window length mode, you specify N window and the resulting RBW is
In some cases, the number of samples provided in the input are not sufficient to achieve the resolution bandwidth
that you specify. When this situation occurs, Spectrum Analyzer produces a message on the display, as shown in
the following figure.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 12/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
Spectrum Analyzer removes this message and displays a spectral estimate as soon as enough data has been
input. Notice that this behavior differs from the Spectrum Scope block in versions R2012b and earlier. If the Buffer
input check box was selected, the Spectrum Scope block computed a spectral update using the number of
samples given by the Buffer size parameter. Otherwise, the Spectrum Scope block computed a spectral update
using the number of samples in each frame.
2. Spectrum Analyzer calculates and plots the power spectrum, power spectrum density, and RMS computed by the
modified Periodogram estimator. For more information about the Periodogram method, see periodogram in the
Signal Processing Toolbox™ documentation.
Power Spectral Density — The power spectral density (PSD) is given by the following equation.
In this equation, x[n] is the discrete input signal. On every input signal frame, Spectrum Analyzer generates as
many overlapping windows as possible, each window denoted as x [n], and computes their periodograms.
(p)
Note
The number of FFT points (N ) is independent of the window length (N
fft window). You can set them to different
values provided that N is greater than or equal to N
fft .
window
distributed in each frequency is summed until this sum is of the total power.
• Determine the upper frequency value. Starting at the highest frequency in the range and moving downward, the
power distributed in each frequency is summed until it reaches of the total power.
• The bandwidth between the lower and upper power frequency values is the occupied bandwidth.
• The frequency halfway between the lower and upper frequency values is the center frequency.
1. Spectral content is estimated by finding peaks in the spectrum. When the algorithm detects a peak, it ignores all
adjacent content that decreases monotonically from the peak. After recording the width of the peak, it clears all
monotonically decreasing values (that is, it treats all of these values as if they belong to the peak). Using this
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 13/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
method, all spectral content centered at DC (0 Hz) is removed from the spectrum and the amount of bandwidth
cleared (W ) is recorded.
0
2. The fundamental power (P ) is determined from the remaining maximum value of the displayed spectrum. A local
1
estimate (Fe ) of the fundamental frequency is made by computing the central moment of the power in the vicinity
1
of the peak. The bandwidth of the fundamental power content (W ) is recorded. Then, the power associated from
1
by examining the frequencies closest to the appropriate multiple of the local estimate (Fe ). Any spectral content 1
that decreases in a monotonically about the harmonic frequency is removed from the spectrum first before
proceeding to the next harmonic.
4. Once the DC, fundamental, and harmonic content is removed from the spectrum, the power of the remaining
spectrum is examined for its sum (P ) peak value (P
remaining ), and its median value (P
maxspur ). estnoise
The sum of powers of the second and higher order harmonics are computed as P harmonic = P +P +P +...+P .
2 3 4 n
absolute difference between frequency bins, and RBW is the resolution bandwidth of the window.
7. The metrics for SNR, THD, SINAD, and SFDR are then computed from the estimates.
( )
Pharmonic
THD = 10 ⋅ log10
P1
( )
P1
SINAD = 10 ⋅ log10
Pharmonic + Pnoise
( )
P1
SNR = 10 ⋅ log10
Pnoise
( )
P1
SFDR = 10 ⋅ log10
( (
max Pmaxspur , max P2, P3, ..., Pn ))
• The harmonic distortion measurements use the spectrum trace shown in the display as the input to the
measurements. The default Hann window setting of the Spectrum Analyzer may exhibit leakage that can completely
mask the noise floor of the measured signal.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 14/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
The harmonic measurements attempt to correct for leakage by ignoring all frequency content that decreases
monotonically away from the maximum of harmonic peaks. If the window leakage covers more than 70% of the
frequency bandwidth in your spectrum, you may see a blank reading (–) reported for SNR and SINAD. Consider
using a Kaiser window with a high attenuation (up to 330dB) to minimize spectral leakage if your application can
tolerate the increased equivalent noise bandwidth (ENBW) of the Kaiser window.
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 15/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
Limitations
Spectrogram mode and the Window Length setting in the Spectrum Settings panel require a DSP System Toolbox
license. They are not available if you are using a Spectrum Analyzer block from the Simscape > Utilities library without
a DSP System Toolbox license.
See Also
Spectrum Analyzer | dsp.SpectrumAnalyzer
Topics
Water Hammer Effect
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 16/17
1/9/2019 Display frequency spectrum of time-domain signals - MATLAB
Introduced in R2016b
https://www.mathworks.com/help/physmod/simscape/ref/spectrumanalyzer.html 17/17