How do I correctly graph FFT results in signal processing?

AI Thread Summary
The discussion focuses on graphing FFT results in signal processing using Excel. The user is new to the subject and is struggling to visualize the FFT data correctly, specifically needing to remove DC zero values. Key points include the need to calculate frequency bins using the sampling rate and the number of FFT points, which can be expressed as f=(0:Nfft-1)*Fs/Nfft. Suggestions include plotting amplitude versus frequency and using logarithmic axes for better visualization. Properly handling the data and understanding the relationship between time and frequency is essential for accurate graphing.
phenommsu1
Messages
1
Reaction score
0
Hello all. I am working on a problem for class that is taking some time data and changing it to frequency data. I am using excel and the fast Fourier transform(fft).

I am having a problem graphing the results. I am very new to signal processing.

I am only given the data which is 1024 points long.
I will only ask for help with one because if I figure this one out I can do the rest.

The period is .117. Making the sampline rate 1/.117.

I have the two columns of data here is an example.
The first column is (1*(1/.117)/1024) and the second is the fft values.

pres43 abs imag
0.006643282 162509.4667
0.013286565 388.025981
0.019929847 600.4277992
0.026573129 499.1078937
0.033216412 447.4588355
0.039859694 102.7576392
0.046502976 276.7567742
0.053146259 358.0531147
0.059789541 289.5977569
0.066432823 129.8177899
0.073076105 91.85556182
0.079719388 250.3116294
0.08636267 35.77585877
0.093005952 218.271273
0.099649235 216.1229107
0.106292517 215.5078932
0.112935799 110.6895935
0.119579082 153.2837982
0.126222364 194.9400366
0.132865646 96.83955867

My problems is that I don't know how to graph the values correctly. The graph as it stands is not right. Someone told me that I have to remove the DC zero values? I do not know how to do that and that is why I am asking for help.

Thank you
 
Engineering news on Phys.org
May be useful

This may be helpful, it may be completely wrong... you presumably understand it better than I do!

I've never been taught Fourier transforms, but I've read about them and used them occasionally - I can't quite make sense of you're data, but here's my basic understanding of FFT & graphing it.

Data in
y = x(t) {REAL amplitude as function of time}

Data out
p = A * g(Bf) {COMPLEX "phasors" as function of frequency; A & B are constants}

|p| = amplitude of wave with frequency f
arg p = phase offset of wave with frequency f

Presumably, you want to produce a graph of amplitude vs. frequency - so by working out the constants A & B, you can produce a table of amplitudes (and if needed, phase offsets) for corresponding frequencies. Once this is done, a simple scatter or line graph will give you what you want (possibly using logarithmic axes).

Also, if your sample rate is too low, or a strong wave with period larger than the data length exists, then you may get a large rise in amplitude towards the lower frequencies.
 
Last edited:
if you have N samples in time with Ts(Time sampling or samping rate) so you can write the time like
t=(0:N-1)*Ts;
in the frequency demain, you have Fs=1/Ts, and you have Nfft=1024, so the frequency can be written like
f=(0:Nfft-1)*Fs/Nfft.
Now you can plot your data in time & frequency:
plot(t,data);// in time
plot(f,fft(data,Nfft)); // in frequency.
good luck.
 
Bachir said:
if you have N samples in time with Ts(Time sampling or samping rate) so you can write the time like
t=(0:N-1)*Ts;
in the frequency demain, you have Fs=1/Ts, and you have Nfft=1024, so the frequency can be written like
f=(0:Nfft-1)*Fs/Nfft.
Now you can plot your data in time & frequency:
plot(t,data);// in time
plot(f,fft(data,Nfft)); // in frequency.
good luck.

this is in matlab?
 
TheAnalogKid83 said:
this is in matlab?
Yes if you want but if you are not familiar with MATLAB just use
f=(0:Nfft-1)*Fs/Nfft to get the spectum bins at right frequencies.
 
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...
Back
Top