LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Topography spectral analysis

Hello,

I have the attached 1D array. It represent the elevation (masl) along a ~120km terrestrial traverse (data are spaced by 3.5meters).

We can clearly see topographic undulations along the profile (of several meters height with 10th kilometers length), and I want to investigate the local heights of these small hills and valleys. Thus I need to remove longer scale trends to get my local residuals.   

And in order to get the best trend to remove, I first need to evaluate the topographic frequencies/wavelength (in kilometers) and, implying first a spectral analysis of the signal.

 

I use Labview for a long time, but usually to do automatization (control instrument in a laboratory and acquired data). Not this kind of work. But as Labview is my programing environment, I would like to proceed via it. 

 

I hope finding help to simply obtain the different wavelength within my elevation profile. 

 

Thank you for your help and I would be please to help you helping me!

Best wishes,

Remi.

 

 

 

 

0 Kudos
Message 1 of 8
(1,423 Views)

Hi Remi,

 

what about using a simple linear fit and subtract that from your data:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,375 Views)

Hi GerdW,

 

Thank you for your reply!

Well removing a simple linear trend was my first approach, and the residuals turned out not being great for my whole study. Then I started to play and smooth the signal on 10km, 20km, and 40km and substracted it. The outcome looked much better!

Now comes the publication of the study and thus the choice of which smoothing applied. Naturally with good arguments linked to these 10th-km scale undulations, and a spectral analysis of the profile..

I would really appreciate if one could explain me which VI, and how to use it to get the different frequencies/wavelength (in km) contained in the signal.

I have never done spectral analysis so far but for this is important for me to also learn to use Labview in that field.

 

Best wishes,

Remi.

  

0 Kudos
Message 3 of 8
(1,359 Views)

Hi Remi,

 


@Remi-9 wrote:

I would really appreciate if one could explain me which VI, and how to use it to get the different frequencies/wavelength (in km) contained in the signal.


To get the frequencies of a time-based (or in your case: evenly spaced) signal you apply a FFT…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,353 Views)

Hi GerdW,

So I made a very basic spectral analysis. As I am very novice with it, I started with a express VI and used power spectral density (plot attached).

Capture.JPG

- I can indeed see some harmonics, so that is a first step. But in my case of a spatial signal, how should I interpret the x-axis of this spectral analyze?. In other word, to what correspond one frequency increment?

 

- In the power spectrum cluster indicator, what mean value df? 

 

Thank you, 

Remi.

 

 

0 Kudos
Message 5 of 8
(1,322 Views)

Hi Remi,

 


@Remi-9 wrote:

As I am very novice with it, I started with a express VI


As a novice user you should stay away from ExpressVIs as they often hide too many details and so make it hard to understand what's going on…

 


@Remi-9 wrote:

I can indeed see some harmonics, so that is a first step. But in my case of a spatial signal, how should I interpret the x-axis of this spectral analyze?. In other word, to what correspond one frequency increment?


When you would use "plain" functions like the simple "FFT" then you could read their explanations in the LabVIEW help!

In the help for "FFT" you can find this: df= fs/N (with fs = sample frequency and N = number of samples). fs usually is the reciprocal of dt in waveforms acquired using timed DAQ.

 

In your case the samples are evenly spaced by 3.50m (which corresponds to the time interval between two samples in a regular timed DAQ), so fs is 1/3.5m in your case…

(When you are doing scientific research then you should know the math basics for your analysis!)

 


@Remi-9 wrote:

In the power spectrum cluster indicator, what mean value df? 


See the paragraph above about using the LabVIEW help for plain functions…

 


@Remi-9 wrote:

used power spectral density (plot attached).


Attaching real code is preferred over images: we cannot run/edit/debug images using LabVIEW…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(1,318 Views)

I would use a Savitzky Golay Filter, as it does preserve the peak and valley position in contrast to an average filter

 

alexderjuengere_0-1623231143341.png

 

alexderjuengere_1-1623231163022.png

 

 

golay-vs-avg.png

 

 

 

Message 7 of 8
(1,284 Views)

Hi Alex, and sorry for my late reply.

Wow, that is good input, and really looks like what I need to investigate kilometric wavelengths.

 

Thank you very much!

Remi.

 

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