LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resampling signals of different lengths to a relative length of 1000 samples

I have 10 different signals which are velocity-time curves collected from 10 different people jumping at 1000Hz.  I need to average these 10 curves but obviously, everyone does not complete a jump over the same time frame so these signals all have various lengths.  I want to resample each individual curve so as to make it relative (i.e. the last time data point equals 100%) and convert the time axis to a percentage.  Each of these curves must include a total of 1000 data points.  Having made each individual curve relative I then wish to average the 10 curves and end up with one velocity time curve in which time is expressed as a percentage and the sampling frequency is 1000Hz.
 
Please advise if you have any ideas as to how I can address this problem.  Thanks heaps!
0 Kudos
Message 1 of 4
(3,170 Views)
Hi pcorm,
 
How are you reading the data in LabVIEW?  Is it in dynamic data or a waveform?  Also, how many points do the signals have now?  I see that you need to them to have 1000 points in the end, but does this mean you will have to interpolate points or that you will have to cut down the data?
 
I'm not sure if you are asking for help on the algorithm or on the actual implementation in LabVIEW.  We can do just about anything you can come up with as far as the algorithm in LabVIEW.  I think we'd be able to help more with more specific questions.

Best Regards,
Megan B.
National Instruments
 
 
0 Kudos
Message 2 of 4
(3,155 Views)

Hey Megan,

Thanks for your interest and help with my questions.  The data I'm using is a waveform and each of the signals have a various number of points (i.e. one signal has 2000 points, another 1500, another 1800 etc.).  To clarify my initial question, this is exactly what I need:

  • I actually need the various signals (velocity-time curves) to contain a total of only 500 data points in the final signal (not 1000 as I had first thought)
  • If the original signal contains 2000 data points, I need the first data point (x - time) in the final signal (which contains 500 data points) to represent the velocity (y-value) of the first 4 points in the original signal (i.e. 2000/500 = 4).  The next x-point in the final signal would represent the y-data from point 5-8 in the original signal and so on.
  • Essentially I need an x-y scatterplot in which one x value corresponds to multiple y values. 
  • But I need to know how to create a program that will retrieve the multiple y-values from the original waveform signal and plot these values to one x-value.  My problem arises in the programming of labview VI's to perform this function.

Hopefully this explanation will help you understand what I am talking about.  If you require any further clarification please don't hesitate to contact me (804-456-0170).  Thanks heaps for your help, I really appreciate it!

Prue

 

 

0 Kudos
Message 3 of 4
(3,134 Views)

Hi Prue,

Thanks for the further explanation.  I think that all you need to do is use the Get Waveform Components VI to break down your waveform.  Waveforms are basically clusters containing an array of data (Y), an initial timestamp (t0), and a change in time (dt) and the Get Waveform Components will return these for you.  Once you have the array, you will simply need to iterate through it and average the appropriate values to cut down your signal (perhaps using Delete From Array and Insert into Array).  You can then build up the waveform again using the Build Waveform VI.

Hope this helps!
Megan B.
National Instruments

0 Kudos
Message 4 of 4
(3,121 Views)