Why result of FFT command is not good?

Hello every body. I used fft command for recognize bandwidth of a set of datas... First data pack has nearly 25000 time domain data with 25 seconds sampling time and next data pack has 12000 time domain data with 1 second sampling time, then result of fft and its absolute value are same, we know from nyquist sampling theory that by 25 seconds sampling time we cant have freqeuncy above o.o2 Hz and by 1 second sampling time we cant have freqeuncy above 0.5 Hz, but result are same similar attached picture... Red graph is 1 seconds sampling time and blue graph is 25 seconds sampling time, please care that horizontally must be multiply "0.01" and its dimension is rad/s and vertically is amplitude of signal... Please help me. Thanks alot.

 Akzeptierte Antwort

Matt J
Matt J am 31 Mär. 2015
Bearbeitet: Matt J am 31 Mär. 2015

0 Stimmen

Remember that the duration of the data pack will affect frequency domain sampling according to
deltaFrequency=1/time_duration
So, your first data pack is getting its spectrum sampled at increments of .04 Hz while your second pack is being sampled at 1 Hz increments. Also keep in mind that this is not a continuous Fourier transform. To scale the FFT consistently with the continuous Fourier transform, you must multiply by the time sampling interval, which is also different for each of your two data packs.

6 Kommentare

mostafa
mostafa am 1 Apr. 2015
Hello, Matt J and thank you so much for your attention, i do it and get good answer, but the matter is this, how can i choice good freqeuncy of sampling, i have 2 packs from unpriodic datas with diffrent sampling time, i plot frequency response of signals by FFT and DFT commands in matlab, but i dont know which bandwith is correct, also i used resample command for increase sampling frequency, i have so many bandwidth and cut-off frequency, which one is better? which one is good for choice best sampling time? Please help me, my goal is identification of a system with time domain data... Thanks alot for your attention.
Matt J
Matt J am 2 Apr. 2015
Bearbeitet: Matt J am 2 Apr. 2015
You have 3 parameters: the time sampling interval T, the frequency sampling interval F, and the number of FFT points N, which can be made as large as you want by zero-padding. They are related according to
N*T*F=1
So, you get to design any 2 out of the 3. The third is then determined by the equation above.
mostafa
mostafa am 3 Apr. 2015
Thank you so much Matt, actually i dont know what is frequency sampling interval, and i dont know how i must design T and F that you point to them. Please help more or introduce a good refrence PDF for learning it completely. Also thank you again for your good guidence. Best regards.
Matt J
Matt J am 4 Apr. 2015
Bearbeitet: Matt J am 4 Apr. 2015
Well, I don't know your application well enough to know how to proceed, but for example, it sounds like T is given to you in the data sets you describe in your original post
T=25/25000 %first data pack
T=1/12000 %second data pack
If you're trying to calculate the Fourier spectrum of these data packs, you must decide with what resolution F you want to see samples of the spectrum. If you want the spectral samples to be at most 0.5 Hz apart, then you know that N has to be greater than 1/T/.5. It also has to be an integer of course, so for example,
N=ceil(1/T/0.5)
mostafa
mostafa am 4 Apr. 2015
Thanks alot for your good answer Matt J. My goal is select best sampling time for my plant, i have an software that can sampling from plant eith various sampling time, i dont know which one is the best sampling time,and if both of them isnt good, which one what sampling time is better? first i try to make data pack with 25 second sampling time and another 1 second sampling time, i tried to plot fourier transform with FFT and DFT, with this two data pack, i dont know the frequency of inputs and also frequency of output and i dont know what is the transfer function of plant, just i have time domain data pack one with 25 second sampling time and another with 1 second, i am trying to understand best sampling time, i dont understand fully how number off FFT points can help me for this application? Please help me if it is possible.
mostafa
mostafa am 9 Apr. 2015
Mr Matt J, Can you help me again?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 31 Mär. 2015

Kommentiert:

am 9 Apr. 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by