LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT Spectrum from 2D array

Solved!
Go to solution

Hello everyone,

I am trying to make the Spectrum analysis from a 2D array. In this case is Amplitude (Y) vs Depth (X). The problem is that the depth (X) doesnt have a constant dt so I cannot create a normal waveform as an input for the Power Spectrum analyzer or Spectral Measurements vi.

This is an example of some of the data that we have:

Depth (x)  Amplitude (y)

8390.7-15.767
8391.215.767
8391.76.8555
8392.2-6.8555
8392.725.754
8393.2-25.754
8393.72.8505
8394.2-2.8505
8394.7-8.574
8395.28.574
8395.7-16.145
8396.216.145
8396.7-0.063
8397.20.063
8397.73.3945
8398.2-3.3945
8398.77.712
8399.2-7.712
8399.7-6.267

Thanks for any help

 

  

0 Kudos
Message 1 of 23
(7,731 Views)

I gave you a portion of the signal that always have a constant dt. Sorry ... There is another part of the signal where there are different dt's :

 

8407.5-26.08
8408-15.189
8408.515.189
84096.5495
8409.5-6.5495
841054.577
8410.5-54.577
8411.2-24.185
8411.524.185
8412.3-41.445
8412.541.445
8413.425.7285
8413.5-25.7285
8414.112.4975
8414.5-12.4975
8415.2-16.5155
8416.116.5155
8416.6-24.4

0 Kudos
Message 2 of 23
(7,729 Views)

Usually I would recommend to interpolate the data to a fixed dt. But it seems your x axis is not time and usually you do an FFT of a signal vs time else you won't get a frequency spectrum.

On top of that your signal looks a bit strange, so oversampling will not give good results. You always have a positive amplitude value followed by the same negative value or vice versa. Since it's an amplitude are you going to use the absolute values?

 

 

 

0 Kudos
Message 3 of 23
(7,708 Views)

This is an study on geophysics .. insteed of having time we are going to work with depth and I really dont know how to call the spectrum analysis ... I know that normally if we have time we have to call it frequency .. but ..

Well .. just imaging that you have time vs amplitude ... and the time is the depth ... I am not the one making that research I am helping some friends on the Petroleum department.

Thanks ..  

0 Kudos
Message 4 of 23
(7,687 Views)

Yes, the data looks odd with these positive/negative adjacent pairs. Is this real or is there some mistake?

 

Anyway, you don't need evenly spaces samples to do a FFT. If you can make certain assumptions about your data, you might want to look into the algorithms used for compressed sensing. There is even a LabVIEW example. 😉

 

An FFT does not need to mean "time domain<->frequency domain". You can use it with any kind of units as long as you keep in mind what the results actually mean.

Message 5 of 23
(7,684 Views)

Hello again ..

 

The thing is simple .. Why Im not able to do a spectrum analysis on an XY graph ??

This is real data from a real investigation .. I have been thinking to use matlab instead of labview only for this .. in matlab I can do an FFT from an XY array.

I cannot resample the data or change it at all.

 

Thanks,

0 Kudos
Message 6 of 23
(7,624 Views)

Alvaro_Ortiz wrote: 

I cannot resample the data or change it at all.


 

 Why not?
 
0 Kudos
Message 7 of 23
(7,614 Views)

Alvaro_Ortiz wrote: 
I have been thinking to use matlab instead of labview only for this .. in matlab I can do an FFT from an XY array.

I don't know the matlab FFT function, but are you sure it doesn't internally resample the data before running the FFT?

 

And still I believe your data is somehow strange. Probably you should remove all negative values since you always have a corresponding positive value?

 

0 Kudos
Message 8 of 23
(7,597 Views)

altenbach already mentioned it : "You don't need equally spaced data to perform an FFT."

So what's the problem?

0 Kudos
Message 9 of 23
(7,588 Views)

Hello again,

 

These measurements are real measurements .. take it from a real well ... The samples are manually extracted from a real well and the depth correspond to real manually extraction. I am not doing DAQ with a system. Lets said for example that I have been manually measuring the porosity on the correspoding depth that I am showing to you. I cannot extrapolate the data in this case.

 

For this reason is that I cannot change the data. What I want to do is just to analyze the FFT spectrum of the data that I have .... With the negative positives values that is showing to me. I am not a Petroleum or a geophysics so I cannot explain you deeply the situation but as a EE I just need to analyze this situation as I have.

 

I am going to attach an example of the code that I have been working on and the data that I have.

The problem start when I need to use both columns depth(Column 0) and Amplitude (Column 1) and wire the cable to the Spectral Measurements or the Power Spectrum Vi. I want to able to do the same on the XY array (Column 0 and 1) that you can see with the Build Waveform Block where I am giving a constant dT .

  

Thank you for your help ...

Download All
0 Kudos
Message 10 of 23
(7,562 Views)