MATLAB Measuring the 'purity' of a sine wave using FFT (Matlab)

AI Thread Summary
To assess the purity of sine waves obtained from an experiment, analyzing the Fast Fourier Transform (FFT) in MATLAB is recommended. The FFT function can be utilized to examine the frequency components of the sine waves, while the Power Spectral Density (PSD) can be estimated using methods like Welch's, which is preferred for its accuracy. However, it's important to note that deviations from purity typically do not appear as a broader fundamental peak in the spectrum. Instead, they manifest as additional frequency components, particularly harmonics. Therefore, Total Harmonic Distortion (THD) is a widely used metric for evaluating spectral purity in such analyses.
SK1.618
Messages
8
Reaction score
0
I have a range of sine waves I have obtained in an experiment.

I want to put a measure on the purity of these sine waves - how well the reproduce a theoretical sine wave.

Is there anyway I can analyse the FFT of the sine waves in Matlab and put a measure on the purity of the sine wave (e.g. by measuring the FWHM of the peak at the frequency of the sine wave)?

Thank you
 
Physics news on Phys.org
Yes, you could use the FFT function (see the examples in the documentation) or -if you have the right toolbox- estimate the PSD using e.g. Welch method (I recommend the latter if possible).

That said, if you have a range of sine-wave any lack of "purity" would not usually manifest itself as a wider fundamental peak in the spectrum; you are more likely to see other frequency components in the spectra; in particular harmonics which is why THD is such a popular measure of spectral purity.
 
Back
Top