10-27-2014 05:18 AM
Hi folks,
I am new to labview, and presently working on signal processing and analysis. I have a time domain signal, so i want from a frequency averaged time domain signal, i.e i convert my signal to frequency domain and average it there and do inverse transorm of the averaged signal.
So using above, i tried to use FFT and Inverse FFT for time being to see whether i get the time domain signal back from the freqency domain signal or not. But what i got was not what i wanted.
Original Time domain ----------(FFT)----------Frequency domain----------(Inverse FFT)-----------Obtained time domain
I am attaching my VI here. Please help me figure out this, that why is my original time domain signal and obtained time domain signal are not same
10-27-2014 05:47 AM
Use the matching FFT function and it should work.
10-27-2014 05:47 AM
This is expected behavior. As you are NOT using the same functions for FFT and inverse FFT (read: the mathematical representation), the signal has to differ.
Instead of using the function, which already uses averaging and windowing, you should use the FFT.vi for transform:
This will result in a very close signal as inverse FFT as you fed into the FFT.
Norbert
10-27-2014 06:03 AM
Thank you Norbert,
Actually i wanted a Frequency averaged time domain signal sir. So i wanted o use to use this block. Here i didnt wire anything to averaging parameter of the FFT block so, at present by default it is not averaging.
And sir if i use the FFT block u mentioned above how will i have go for frequency averaging.
Regards
Rex
10-27-2014 09:58 AM
Even if you select No averaging, the output of the FFT Spectrum (Real-Im).vi is not the same as the output of the FFT.vi. It uses FFT.vi internally but also converts the output to a single sided spectrum. It also applies a Hanning window as default. As a result the inverse FFT you calculate will not match the input data. You can open the block diagram of FFT Spectrum (Real-Im).vi to see how NI does things.
Since you want to use the Inverse FFT to recover the time domain signal after averaging, you will need to maintain the spectral signal in a format compatible with the Inverse FFT.vi. I would probably use FFT.vi (which produces a two-sided complex spectrum), do the averages on the complex data, and then use the complex inverse FFT.
Do you have some typical data for which you know what the expected output should be that you can post?
Lynn
10-28-2014 12:12 AM
Yeah Johnsold thats right, i saw changing the windows and using a sine signal. I observed that it was single sided spectrum and also that was happening due to the window used. So i replaced it with FFT.vi and Inverse FFT.vi and now am being able to reconstruct the signal with almost a very less error.
I am still in a dilema how shall i do the averaging thing in this case. I would be glad if get a help over that.
I am attaching my VI here, that computes fft and then inverse fft. I wanted some help with any logic that could help me do averaging in frequency domain.
10-28-2014 03:12 AM
I am not sure what your goal is. Averaging will alter your data, so averaging your frequency domain and THEN using an inverse FFT will ALWAYS result in a very different signal in time domain compared to your original signal.
Next question is, what kind of averaging you want to perform. Is it sliding average? A "block" average?
Norbert
10-28-2014 05:12 AM - edited 10-28-2014 05:27 AM
Do the averaging in the time domain ! There is no difference , since every FFT averaging ingnoring the phase will make your inverse FFT useless .....
Sound a bit like: I want a Lockin amp like averaging without having to now the frequency..... 😉
So what type of signals do you have?
What is the problem?
10-28-2014 09:00 AM
I agree with Norbert and Henrik. You need to tell us what your goal is - what do you expect to accomplish by frequency domain averaging? There might be a better method.
Lynn
10-29-2014 06:09 AM
First of all, Thanx for responding. Actually i have some acceleration data aquired at 40 kS/s. So i need to take a set of data points over 1 second as a chunk, convert it to Frequency domain and need to average 10 sets of such (1 second) chunks in frequency domain. So its like block average, where i take a block of 1 second data and average 10 such blocks in frequency domain and convert back that averaged data to obtain a final block of 1 second data.
Hope its clear.