1
votes

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 (absolute values of complex values): FFT abs values - FFT abs values zoomed in

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')

Thanks!

1
How is the magnitude negative? Are you sure you a plotting the FFT and not time domain plot?fstop_22
I've not taken the absolute values of the FFT. When I take the absolute values the FFT is a mess even more, as can be seen in: imgur.com/a/zkkxdp7Jost
When zooming in you can kind of see the same pattern (imgur.com/a/pYK3ENK), but it's quite hard te analyse. Can you tell me why the highest amplitudes are around 0Hz? I thought I learned the 0Hz frequency doesn't really exists and therefore can be neglected.Jost
Could you please show a plot of the data that is used to get this FFT? (You might need to zoom in a bit so we can set the relevant timescale.) Also, have you tried to take the inverse of the FFT, to check whether you get the original signal back?tom10
This is the data before and after the Wiener Filter: i.stack.imgur.com/cwb7Q.png I havent used the ifft function yet.Jost

1 Answers

2
votes

What you have looks correct: your signal is a pulse with some noise on it, and the FFT is basically a sinc function (or abs of 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 sinc wider, which works since the widths are inversely related. This way I don't have to zoom in.)

enter image description here

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.