I am trying to use the spectrum analyzer in Simulink to study a distorted signal. However, every time i change the discretization time of the powergui block, it gives me different (a huge difference) results. So how do I choose the sampling time?
15 次查看(过去 30 天)
显示 更早的评论
For instance, when my sampling time is 20us, the spectrum analyzer says that the fundamental frequency is at 65 Hz. When i set the sampling time to 2us, the fundamental goes up to 200KHz, keeping in mind that my sources operate at a frequency of 50 Hz.
0 个评论
采纳的回答
Prashant Arora
2017-7-18
Hi Danny,
The sampling time for spectrum analysis should ideally be same as the sampling time of the actual signal to be analyzed.
2 个评论
Prashant Arora
2017-7-19
Sampling time of a signal will affect the frequency analysis of the system, not just in terms of simulation time or accuracy, but due to effects like Aliasing, random noise etc. You can start with Nyquist limit and decrease the sampling time as required.
更多回答(1 个)
zuyuan
2024-11-14,10:37
Hi Danny,
I think your problem could have some relation with the RBW paramater in spectrum analyzer.
RBW is the resolution bandwidth, and all the frequencies shown on spectrum plot is Integer multiples of RBW. This is determined by the properties of the Fourier transform and is independent of the sampling time.
For example, when you take a segment of length T from a periodic signal and perform a FFT on it, the fundamental frequency of the spectrum you obtain is f0 = 1/T, and all other frequencies will be integer multiples of f0.
If your input signal is 50Hz and the RBW of the spectrum analyzer is 30Hz, you will see a peak at 60Hz in the spectrum instead of 50Hz.
In Simulink, the default setting of RBW is auto, which means that when you change the sampling time, the RBW will also change accordingly. Therefore, you will find that the frequencies in the spectrum change with the sampling time, even if your sampling frequency is much higher than the Nyquist frequency.
I suggest setting the 'RBW source' to 'Property', and set 'RBW(Hz)' to 1Hz and then re-simulating to see if the results improve.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!