The frequency-domain representation of a signal reveals important
signal characteristics that are difficult to analyze in the time domain.
Spectral analysis lets you characterize the frequency content of a
signal. Perform real-time spectral analysis of a dynamic signal using
the dsp.SpectrumAnalyzer
System object™ in MATLAB® and the Spectrum Analyzer block in
Simulink®. The spectrum analyzer uses the Welch's method of
averaging modified periodogram or the filter bank method to compute the
spectral data. Both these methods are FFT-based spectral estimation
methods that make no assumptions about the input data and can be used
with any kind of signal. For more information on the algorithm the
spectrum analyzer uses, see Spectral Analysis. In addition
to viewing the spectrum, you can also view the spectrogram of the signal
in the spectrum analyzer. For an example, see View the Spectrogram Using Spectrum Analyzer.
If you want to acquire this data for post processing in MATLAB, call isNewDataReady
and getSpectrumData
object functions on the spectrum
analyzer object. By calling these functions in the streaming loop, you
can acquire the entire spectral data. In Simulink, to acquire the spectral data, create a Spectrum Analyzer
Configuration
object and run the getSpectrumData
function on this object. Note that in
Simulink, you can acquire only the last frame of the spectral data
shown on the spectrum analyzer.
Alternately, you can use the dsp.SpectrumEstimator
System object and Spectrum Estimator block to
compute the power spectrum and acquire the spectral data for further
processing. To view the spectral data computed by the spectrum
estimator, use an array plot. For examples, see Estimate the Power Spectrum in MATLAB and Estimate the Power Spectrum in Simulink.
Spectral analysis is the process of estimating the power spectrum (PS) of a signal from its time-domain representation.
Estimate the Power Spectrum in MATLAB
Compute the power spectrum using the dsp.SpectrumAnalyzer
and
the dsp.SpectrumEstimator
System objects.
Estimate the Power Spectrum in Simulink
Compute the power spectrum using the Spectrum Analyzer and the Spectrum Estimator blocks.
Streaming Power Spectrum Estimation Using Welch's Method
Use Welch's method of averaged modified periodogram to estimate power spectrum.
View the Spectrogram Using Spectrum Analyzer
Compute the spectrogram and show the effect of RBW on the spectral data.
Estimate the Transfer Function of an Unknown System
You can estimate the transfer function of an unknown system based on the system's measured input and output data.
Variable-Size Signal Support DSP System Objects
List of System objects which support variable-sized signals in DSP System Toolbox™.