LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fft and ifft mismatch

Hello , I have designed a simple sequence to check the ifft and fft of an array . Initially i create a set of data that is fed into the ifft block , the output that i get out of the ifft block , i feed it into a fft block . it is only fair that i expect the output from the fft block to be the same as the input to the ifft block. But , that is not how it turns out . Can anybody give me a explanation why this is the case . and i am using this with a DSP board (speedy 33) . Mano .
0 Kudos
Message 1 of 5
(3,160 Views)
Your subVIs were not attached so I cannot run your VI.

I suspect that your signals violate the Nyquist criterion. The way you generate your signals produces very high frequencies: Signal frequency <= sampling frequency. Nyquist criterion: Signal frequency < sampling frequency/2.

Lynn
0 Kudos
Message 2 of 5
(3,141 Views)
Hi Lynn , I'll attach the VI again , but i suspect you'll find the subVIs missing if you open the VI without the speedy 33 target type. But i do understand your explanation of the nyquist theory . its interesting , becasue i have not generated a signal, but i am only using bits (binary bits ) to check the fft and ifft results . Anyway, your explanation gets me to this question . do the fft and ifft blocks only apply to a signal form ? . but i expect it should not make a difference even if i feed in a array of bits to the fft and ifft block .. please do let me know if i am mistaken Mano ..
0 Kudos
Message 3 of 5
(3,126 Views)
I do not have the Speedy33.

All digitized FFT functions and their inverses work on arrays of numbers. The dynamic signal or waveform datatypes are composite datatypes which contain arrays of data plus additional data related to the timing of the signal. Most of the analysis functions are polymorphic, meaning that they will accept arrays or waveforms and perhaps dynamic datatypes. The "Sampling Frequency" is the inverse of the time between samples. But, the FFT functions really do not know or care what the frequency or time is. In fact it is often calculated externally.

In your data you can have the "signal" (the array of data) switch from +1 to -1 from one sample to the next. So the highest frequency in this data is 1 cycle per 2 samples. The Nyquist criterion specifies that the sampling frequency must be GREATER than twice the highest frequency in the data to be able to correctly reproduce the signal. Your sampling frequency is equal to twice the highest frequency in the data and thus it violates the Nyquist criterion.

I modified your VI slightly. I put a diagram disable structure over the Speedy33 subVIs and put a standard FFT in the Enabled case. I also added the interleave function which has the effect here of repeating every element twice which essentially cuts the highest frequency in the data to 1/4 the sampling frequency. I also added graphs so that the signals could be visualized. Notice that the input and FFT plots are usually similar but not identical.

Lynn
0 Kudos
Message 4 of 5
(3,090 Views)
thanks Lynn ...
0 Kudos
Message 5 of 5
(3,048 Views)