1
votes

I have a small input signal of 60Hz sine wave from signal generator, which is corrupted with 50Hz mains supply frequency. I want to measure the amplitude of the 60Hz signal using FFT because it is very small to see in the oscilloscope.
The Matlab FFT code:

y = data;    
Fs = 2048;
[r, L] = size(y);
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
plot(f,2*abs(Y(1:NFFT/2+1))) 

But the FFT plot doesn't give a sharp peak at 50 and 60Hz. The plot looks like this:

The consecutive points have high and low amplitude alternatively which gives a saw-tooth like plot. Why is it so? Is the amplitude of 60Hz affected by this?

2
It would be nice, if you add plot of time domain signal as well. What is the source of signal?User1551892

2 Answers

0
votes

Probably there are two effects

  1. If one measures a time window of a signal, this leads unavoidable to a phase gap between the start and endpoint of the signal modes. The FFT of a gap or a rectangular signal causes high frequency oscillations. These oscillations caused by border effects can be damped due to a window function, which smooths out the signal to the borders.

  2. There is a discrete frequency spectra in DFT. If one measures a signal which does not match to any of these discrete modes, a lot more frequencies are necessary to reconstruct the original signal.

0
votes

Your 50 Hz signal may not be a pure perfect sine wave. Any differences from a perfect sine-wave (such as clipping or distortion) is equivalent to a modulation that will produce sidebands in the spectrum.

Windowing a signal whose period is not an exact sub-multiple of the FFT length will also convolve windowing artifacts with that signal.