From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT Advice (Can I trust my results?)

So I am doing some spectral analysis on some train track data and I would like to analysize the sprectral profile within the data to be able to say when the frequency response of the data is above some frequency threshold 

 

Going off the FFT and Power Spectrum Units example I followed the example to create an Vrms amplitude FFT 

 

The track data is measured at intervals of 0.25m along the track, in order to use the data with the FFT I am inputting an average speed and finding my Fs using this, however in order to ensure that the input signal is "in bin" Fs/N must equal an integer.  With a highspeed train at 400Km/h this gives us a Fs of 444Hz but our data is much longer than 444 points so I am analyising a number of points that is equal to the frequency or some integer division of it (this reduces the range of the frquency axis) to ensure that the conditions for "in bin" are met.

 

I've studied and used FFT's in the past but I've always found its best to get your method and results verified as they can be tricky to configure 

 

So if some kind soul wouldnt mind checking my work and pointing out where I've made school boy errors or even a better method for analysis of a large array of data that would be much appreciated 

 

I've attached my VI and data file so that whoever wants to can run it on their machine 

 

Thanks 

Evan  

Download All
0 Kudos
Message 1 of 6
(2,108 Views)

When posting code, please make sure that all controls have reasonable default values. For example with the default speed=0, the VI runs out of memory. What are reasonable values for ALL controls for the current data? Once we have that, we can discucss the algorithm.

 

ALSO: I seriously doubt that you need to spin that while loop as fast as the computer allows.

You have LabVIEW 2018, so utilize conditional tunnels in your upper FOR loop (see picture)

 

codTun.png

Message 2 of 6
(2,084 Views)

What is the train track data?

 

Going way out on a hunch, I suppose that you are driving the rails with an AC and looking for a doppler shift indicating a shunt (train wheel axle) is moving along the track and attempting to gauge its velocity relative to a crossing. 

 

Yes, I have been a signalman for a Railroad. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(2,049 Views)

my apologies ive set some default values in this upload

 

  • for measurement choice i am mainly interested in vertical data 
  • split arr int parts can have any integer value between 1 and 4, instead of just dividing the size of the array by the frequency to be "in bin" you divide the frequency by the outcome of fs/input which effectivly decreases the size of the bin of the fft 
  • track parts sets the displayed bin of data
  • speed can be any value > 0, im most interested in results in the range of 200 - 400 km/h 
  • frequency threshold and amp threshold are non critical

 

ive set a 10ms delay in my while loop

 

 

0 Kudos
Message 4 of 6
(2,000 Views)

the train data in a nutshells gives all the bends, bumps, tilts and how the distance between rails changes as a train travels over the track every 0.25m 

 

im interested in the hydraulic oil requirement and system accuracy given the maximum frequency rating of solenoid and proportional valves used in a hydraulic 6 dof high speed railway simulator used for analyzing high speed train bogie designs 

0 Kudos
Message 5 of 6
(1,993 Views)

From what I can tell, you are basically looking for a time-frequency-analysis and the advanced signal processing toolkit has everything you need.

 

(To do your own with the standard tools requires a good understanding of FFTs, windowing, and such. It can be done, of course.)

0 Kudos
Message 6 of 6
(1,976 Views)