Why do results differ between pwelch and dsp.SpectrumEstimator?
2 views (last 30 days)
Show older comments
MathWorks Support Team
on 25 Apr 2017
Answered: MathWorks Support Team
on 5 May 2017
Why does the results differ when I obtain the welch spectrum using function pwelch and dsp.SpectrumEstimator object using a window?
Accepted Answer
MathWorks Support Team
on 25 Apr 2017
The 'window' property in 'pwelch' function specifies the length of segments which the signal gets divided into. Power spectrum is then calculated by taking the spectral averages of these segments.
The 'dsp.SpectrumEstimator' object has a property 'Spectral Averages' which determines the number of spectral averages to be taken for the segmented signal. However, the object itself does not divide the signal into segments. Although, the underlying implementation of this object is through Welch Spectrum Estimate algorithm which requires the signal to be segmented, we have to manually implement the segmentation part of the signal and step these segments through the object.
Please refer to the attached script which shows an example of correct usage of 'dsp.SpectrumEstimator' for computing the Welch Spectrum of a sinusoid signal. Please note, the parameters such as sampling frequency, length of fft, etc. are defined in the script.
0 Comments
More Answers (0)
See Also
Categories
Find more on Spectral Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!