频谱分析
信号的频域表示揭示了难以在时域中分析的重要信号特征。通过频谱分析,您可以表征信号的频率成分。使用 MATLAB® 中的 spectrumAnalyzer
对象和 Simulink® 中的 Spectrum Analyzer 模块对动态信号执行实时频谱分析。频谱分析仪使用滤波器组方法或韦尔奇平均修正周期图方法来计算频谱数据。这两种方法都是基于 FFT 的频谱估计方法,它们对输入数据不做任何假设,可用于任何类型的信号。有关频谱分析仪使用的算法的详细信息,请参阅Spectral Analysis。除了查看频谱,您还可以在频谱分析仪中查看信号的频谱图。有关示例,请参阅View the Spectrogram Using Spectrum Analyzer。
如果您要在 MATLAB 中采集此数据进行后处理,请对频谱分析仪对象调用 isNewDataReady
和 getSpectrumData
对象函数。通过以流式循环方式调用这些函数,您可以采集整个频谱数据。在 Simulink 中,要采集频谱数据,请创建一个 SpectrumAnalyzerBlockConfiguration
对象,并对此对象运行 getSpectrumData
函数。请注意,在 Simulink 中,您只能采集在频谱分析仪上显示的最后一帧频谱数据。
您也可以使用 dsp.SpectrumEstimator
System object™ 和 Spectrum Estimator 模块来计算功率谱,并采集频谱数据以供进一步处理。要查看频谱估计器计算的频谱数据,请使用数组图。有关示例,请参阅Estimate the Power Spectrum in MATLAB和Estimate the Power Spectrum in Simulink。
对象
模块
主题
- Spectral Analysis
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
spectrumAnalyzer
and thedsp.SpectrumEstimator
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.
- High Resolution Filter-Bank-Based Power Spectrum Estimation
This example shows how to perform high resolution spectral analysis by using an efficient polyphase filter bank sometimes referred to as a channelizer.
- View the Spectrogram Using Spectrum Analyzer
Spectrograms are a two-dimensional representation of the power spectrum of a signal as this signal sweeps through time.
- 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.
- Continuous-Time Transfer Function Estimation
This example shows how to use the Discrete Transfer Function Estimator block to estimate the magnitude and phase response of a continuous-time analog filter.
- Group Delay Estimation in Simulink
This example shows how to estimate the group delay of a filter in Simulink®.
- Variable-Size Signal Support DSP System Objects
List of System objects that support variable-sized signals in DSP System Toolbox™.