Damped sinusoidal form FFT of signal
I'm doing an assignment for the course Signal analysis where I have to analyse a signal. I've tried quite some things now but it's still bothering me that the FFT is looking weird, and not looks like the 'normal look' FFT's we learned in class.
FFT (no absolute values): FFT zoomed in
The FFT seen in the image above is zoomed in on the frequency range 0-30Hz. The rest of the frequency range does not show a lot of (high) peaks, which probably are caused by noise.
The signal is created during a method of welding, using an oscilloscope with a sampling frequency of 1000Hz. I've filtered the signal to remove noise, and after that the signal is converted to the frequency spectrum using the fft function of MATLAB.
Signal before and after filtering: Original signal and filtered signal
My general question is, can the shown FFT be valid or did I make a mistake? I estimated the ground frequency to be around 5.5Hz, can I say this when I take one period of the big sinusoidal wave? I also noticed there are about 64 little sinusoidal waves inside one (ground??) period, is this an high harmonic wave form?.
If my theory is right, what causes the fft to be a damped sinusoidal form?
The code I use is basically the following. I leave the part of the noise filtering out because I don't think it's necessary for this question. The dataset is an matrix of 40100 rows.
fs = 1000; cleanSignaal = data(:,4); fftSignal = fft(cleanSignaal)/lenght(cleanSignaal); f = fs/(2*length(fftSignal)):fs/length(fftSignal):fs; plot(f,abs(fftSignal)); xlim([0 fs(m)/2]); title('Fast Fourier Transform') xlabel('Frequentie (Hz)') ylabel('Magnitude')
What you have looks correct: your signal is a pulse with some noise on it, and the FFT is basically a
absof a sinc as you should plot it for an FFT) which is what you'd expect for a pulse.
Here's a simple demo of this. (Btw, I made the pulse a bit narrower than yours with the goal of making the
sincwider, which works since the widths are inversely related. This way I don't have to zoom in.)
import numpy as np import matplotlib.pyplot as plt # For ploting N = 1000 t = np.linspace(0, 1., N) y = ( (t>0.46) & (t<0.54)).astype(float) f = np.abs(np.fft.rfft(y)) faxis = np.fft.rfftfreq(y.size, 1./N) plt.figure() plt.subplot(211) plt.plot(t, y) plt.ylim(-.1, 1.1) plt.subplot(212) plt.plot(faxis, f) plt.ylim(0, 90) plt.show()
On top of the pulse you have a lot of spikey noise, which are added to the FFT. This will generally have spectral qualities mostly far away from the low frequencies of the sinc, but this can depend on the exact nature of the noise.