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

In summary, The speaker has obtained a range of sine waves in an experiment and is looking for a way to measure the purity of these waves compared to a theoretical sine wave. They are considering using the FFT function or estimating the PSD using Welch method in Matlab. However, they note that any lack of purity may not necessarily result in a wider fundamental peak, but rather the presence of other frequency components such as harmonics.
  • #1
SK1.618
10
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
  • #2
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.
 

1. What is a sine wave?

A sine wave is a mathematical curve that describes a smooth, repetitive oscillation. It is a fundamental waveform that is commonly used to represent periodic phenomena in physics, engineering, and signal processing.

2. Why is it important to measure the purity of a sine wave?

The purity of a sine wave refers to how closely it resembles a perfect mathematical sine wave. In real-world applications, sine waves can become distorted due to noise and other factors. Measuring the purity of a sine wave helps to ensure the accuracy and reliability of data and signals in various fields.

3. How can I measure the purity of a sine wave using FFT in Matlab?

FFT (Fast Fourier Transform) is a mathematical algorithm that can be used to analyze the frequency components of a signal, including a sine wave. In Matlab, you can use the FFT function to calculate the frequency spectrum of a signal and then compare it to the expected spectrum of a pure sine wave to determine its purity.

4. What are the units of measurement for purity in a sine wave?

There are several ways to quantify the purity of a sine wave, including the total harmonic distortion (THD) and signal-to-noise ratio (SNR). THD is typically measured in decibels (dB), while SNR is a ratio expressed in decibels or as a percentage.

5. Can I improve the purity of a sine wave using FFT in Matlab?

While FFT can help to analyze and measure the purity of a sine wave, it cannot directly improve its purity. However, it can be used to identify and remove any unwanted noise or distortion in the signal, which can ultimately improve its purity.

Similar threads

Replies
78
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • General Math
Replies
7
Views
2K
Replies
139
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Classical Physics
Replies
7
Views
1K
Replies
16
Views
1K
  • Electrical Engineering
Replies
10
Views
2K
Replies
38
Views
3K
  • Quantum Physics
Replies
3
Views
2K
Back
Top