07-30-2009 06:08 AM
I would like to carry out an FFT on a periodic sampled digital signal. At the moment, my signal is stored as an 8192 element array of 16bit integer values (0-65534).
I have tried connecting this array directly to the X input of the fft.vi, but the data that comes out of FFT{X} seems to make little sense (array of length 8192 with peaks both the start and end of it).
Any advice would be much appreciated.
Solved! Go to Solution.
07-30-2009 06:17 AM
DanB1983 wrote:I would like to carry out an FFT on a periodic sampled digital signal. [...]
I think you missed the very basics of FFT..... using FFT on digital signals is nonsense.
I asume that you are interested in one of the two following specs:
a) The timing of a single bit, also known as bitrate, which is infact your samplerate....
b) The signal is a "block" which repeats itself. So you want to know how fast the blocks are repeated.
As written, a) is simply the samplerate because if samplerate does not match the bitrate, there is no chance to detect that....
Regarding b), it's simply analysis of the digital signal in its content (H and L level changes).
hope this helps,
Norbert
07-30-2009 06:38 AM
Norbert,
Thanks for the prompt reply - I feel I need to clarify slightly.
I have produced the array to simulate a sampled signal that I want to analyse. That is to say that it is supposed to represent a stream of 8192 values coming from an ADC. In this very simple case, it is a single sine wave.
Therefore, I would expect the FFT to have a single peak at the associated frequency.
See the attached text file for the actual data used.
07-30-2009 07:09 AM - edited 07-30-2009 07:12 AM
Hi DanB1983 (and Norbert 😉 )
You do not have to go to Wiki for a FFT tutorial. NI have some excellent papers on the topic like this http://zone.ni.com/devzone/cda/tut/p/id/4278
After reading this I think you will understand more about the topic. Also browse through the Labview examples. In the toolbar go to help and Find Examples then search for FFT. I am sure you will find an example here that can make a base for your application. Just remember to use the "save as" option so you do not overwrite the example.
And the last thing. Then you start a Labview session, do not forget do enable context help (CTRL+h)
07-30-2009 07:33 AM
Ok, this is better 🙂
The reason why you are seeing not the expected FFT result is easy:
a) You have an offset of 8000 in your signal. This is the peak at 0.
b) Your signal does include about 2.6 periods. Since FFT virtually concatenates your signal from -inf to +inf in the time domain, your signal has "jumps" in it which create peaks in your frequency domain "somewhere". In order to prevent this you can either use windowing or cut your time domain signal to contain an integer number of periods (which would be aroung 6400 samples then).
hope this helps,
Norbert
07-30-2009 07:34 AM - edited 07-30-2009 07:36 AM
Hello,
You are probably wanting to take an FFT and display the results in the power spectrum. This will give you a peak at 200hz, for an input sine signal of 200hz.
So I suggest this VI:
Have a play with the attached VI...
(The windowed VI is useful if your input data has high frequency discontinuities at the beginning or end)
07-30-2009 07:55 AM