LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How read FFT data from CSV file and plot on labview then take IFFT

Solved!
Go to solution

Hello ever one.

 

need your help,

i have csv file which has two column, it is extracted from Matlab FFT data. having one column freq and other column amplitude.

i want to read that file in labview and plot that data then take its IFFT and plot the same.

any help please.

 

0 Kudos
Message 1 of 10
(1,241 Views)

Reading the comma delimited file is simple, but you only have frequency and amplitude information.

 

Your magnitude data is insufficient to reconstruct the original signal because we are missing the phase information. A Fourier transform is complex, so make sure to save the real and imaginary part. We need a file with three columns (e.g. Freq, RE, IM).

 

altenbach_0-1709309601687.png

 

0 Kudos
Message 2 of 10
(1,217 Views)

you are great. thank you.

now i want it to take IFFT. 

I am trying it.

0 Kudos
Message 3 of 10
(1,206 Views)

@Asif138 wrote:

you are great. thank you.

now i want it to take IFFT. 

I am trying it.


As I said, you need the complex data of the FFT. You currently only have the magnitude data.

Go back to Matlab and save the full FFT data first.

 

0 Kudos
Message 4 of 10
(1,198 Views)

Please check this file.

0 Kudos
Message 5 of 10
(1,191 Views)

I don't have excel on this computer, so please save the data as three column csv file: [frequency, RE, IM]

 

(the magnitude can be reconstructed from RE and IM, and is thus redundant but you can include it as fourth column if you like)

0 Kudos
Message 6 of 10
(1,186 Views)

ok. check this please

0 Kudos
Message 7 of 10
(1,182 Views)
Solution
Accepted by topic author Asif138

See if this can give you some ideas.

 

Make sure to verify the correct df->dt calculation.

 

altenbach_0-1709315783895.png

 

Message 8 of 10
(1,151 Views)

Hello Friend

I really thank for your support.

but result is not as same as i want. my professor gave me image of result from Matlab.

may you please check the result and modify the code.

Thanks.

Download All
0 Kudos
Message 9 of 10
(1,094 Views)

@Asif138 wrote:

 

but result is not as same as i want. my professor gave me image of result from Matlab.

 

result

.


This looks looks an ideal result from a simulation and not real data This image shows exactly one clean frequency at around 150Hz with an amplitude that decays exponentially. To get that kind of signal, you would only have one single Lorentzian peak in the FFT at the given frequency and the peak width determined by the decay shown. The broader the peak, the faster the decay in amplitude. All can be calculated exactly.

 

In contrast, your FFT has all kinds of peaks and many high frequency components. Not comparable!

 

Science is data driven and the result should be defined from what you get, not what you "want". Since you have your FFT data already in matlab, you can simply do the IFFT there and compare. No professor needed. Have you done that? Of course you could filter out everything above a couple of hundred Hz.

 

.

0 Kudos
Message 10 of 10
(1,046 Views)