LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Leap time calculation from DAQ

Solved!
Go to solution

Hello!

 

I want too measure peak to peak time to calculate leap time for further calculations in LabVIEW. Im using force platform to measure takeoff force and landing force. So basicly I need time interval between maximum takeoff force and maximum landing force. I will add a picture of my data and LabVIEW program which includes peak detection function. The most important data for me is the green graph in results (there I want to measure time interval, force platform can masure force in all three axis but for me is Z axis the most imporant).  

 

Thanks for you interest!

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

Does the "green graph" show a "takeoff" and a "landing" record?  Separated by about 10 seconds?  Who's doing the jumping???

 

I (and many other "old-timers" on the Forum) cannot open your VI, as I'm using LabVIEW 2019 and 2021.  Can you open the File menu and "Save for Previous Version", specifying (say) LabVIEW 2019, to allow more of us curious folks to see what you are doing?

 

Bob Schor

0 Kudos
Message 2 of 9
(1,023 Views)

Hello,

 

These are two diffrent jumps in green graph in period of 20 seconds. Im adding picture of results with just one graph and also VI file (version 2019). Hope you can open file now.

Download All
0 Kudos
Message 3 of 9
(1,018 Views)
Solution
Accepted by miha312

Boy, was I confused!  I'm looking at two Posts on the Forum and got them mixed up, and worried that I said something really silly because I was thinking about the other person's Post.  But though I'm still confused, I don't think I grossly insulted anyone!

 

So this is about the Green Line and how to analyze it.  Am I correct that we are looking at the X, Y, Z components registered by a Force Platform when someone who is standing on it jumps straight up in the air and lands back down on the platform making the very interesting multi-part "squiggle" (that's a Scientific Term that means "a lot of wiggly lines") shown in Green?

 

Before doing any sophisticated waveform analysis, I strongly recommend doing two things:

  1. Get a high-speed video at "ground level" of the platform, showing Takeoff and Landing clearly.  You'd want to be able to go frame-by-frame and estimate the following time points:
    • Beginning of crouch.
    • Beginning of leg-straightening.
    • Lift-off.
    • Contact.
    • End of knee bend.
    • Resumption of upright posture.
  2. Acquire your Force data a little faster.  Your DAQ Assistant seems to show you collect 100 points at 1 kHz (or 0.1 sec at a time), yet your plot seems to show 20 seconds of data, with the jump taking a second or three.  There also seem to be some discontinuities in the data, possibly because your DAQ Assistant (which I totally dislike, and want you to stop using) seems to say you are taking finite (instead of Continuous) samples, and only 100 at a time.

First thing you should do is to find (use Google) "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications".  Ignore Section 1, which discusses the Dreaded DAQ Assistant.  Read the sections on how to use MAX to "play with" your acquisition device (what are you using, anyway?), and how to create a Task to do what you need (acquire 3 Analog Channels, differentially (do you know why?  Your signal isn't too noisy, so single-ended might work)).  Once you have your Task defined, you only need a DAQmx Start, DAQmx Read, and DAQmx Stop (plus saving the data, of course).

 

I could tell you about Producer/Consumer designs, which let you save as fast as you acquire, but why not take 5000 points at 2 kHz and tell your subject to jump when you say "Jump" (and say "Jump" right after you push the "Acquire" button).  Now you should have a clearer picture of the components of Z force, and (especially if you have a linked video) can clearly see the phases of the Jump.  Myself, I'd say the large negative peak is "leg extension" and the point it starts to rise sharply is when the foot leaves the platform (which bounces a bit, making the positive peak, then settling down to zero until BOOM, the jumper lands (but absorbs some of the shock in his/her knees, slowly straightening up).

 

Hmm.  I just realized you cannot be using a Force Platform.  When the subject is standing still, the force is essentially the weight of the subject, and when the subject is airborne, the force is zero.  However, the "plateau" in your trace just before landing is at the same level as when the subject is standing ...

 

The point I'm trying to make is that you need to better understand your data before trying to interpret the little wiggles in it.  Get the best (and clearest) data you can, try to confirm its time course, identify the segments of interest (and know what they are), then worry about analyzing it.

 

Bob Schor   

Message 4 of 9
(998 Views)

Hello,

 

Yes the green graph shows force measured in Z component. In main VI file I split signals to red (X component), blue (Y component) and green (Z component). I havent attached main VI yet as i thought it wasnt necessarily. 

 

As you recommend the video and frame by frame analysis would come in the next phase of my project, right now we agreed (me and mentor) that we can get leap time just by taking maximum force value from takeoff and maximum force value from landing. I know in reality this isnt thoroughly  but for early phase of my project we could use that maximum to maximum as leap time (if you have any simple solution for this let me know).

 

I will read article that you suggestioned  and try to replace DAQ assistant.

 

My acquisition device is NI 9215A (Im adding picture bellow).

 

Yes my original idea was to creat program just like you said (tell your subject to jump when you say "Jump" (and say "Jump" right after you push the "Acquire" button)).

 

Like you said the Force platform isnt the best option but it was the only one (limited sources). The force platforme measure dynamic force (its based on piezoelectric deformation and gives voltage as output). Platform need some time to stabilise output value. Basicly if I put 1kg weight on the platform I would get "squiggle" and after some time period value would be again on 0N. Then when I would take it of I would get "squiggle" again and after some time the value goes back to 0. I thought dynamic data would be enough to measure leap time. 

 

So you think the best option for me would be to remove DAQ assistant and create Task for each analog chanels and then by using  a DAQmx Start, DAQmx Read, and DAQmx Stop and set 5000 points and 2kHz to get clear signal? And then to analyz it?

 

0 Kudos
Message 5 of 9
(967 Views)

So I have some Good News, some "I don't know" News, and some suggestions.

 

The Good News is that the NI-9215 is a very capable 4-channel A/D converter that can sample at 10 kHz/channel, featuring Differential inputs.

 

When you set up your DAQmx Task, set it up to acquire from 3 Channels.  The module supports simultaneous sampling, so all three input signals will be sampled at the same time.  If we assume (?) a "jump" takes about 1 second, then if you sample for 2 seconds at 5000 kHz, you should be able to acquire the "squat, push, fly, and land" phases and have far too much data see all at once, but LabVIEW should let you scroll back and forth, and decide by looking at the data whether you need to sample that fast (2 kHz might be just fine).

 

Of course, that reminds me of an "inconvenient Fact".  Do you know the difference between a LabVIEW Graph and a LabVIEW Chart?  [I should look up which you used in your code, but ...]  In brief, "Charts" are for showing "scrolling data as it arrives", and typically shows the latest 100-1000 points you collected (as it does an "out with the Old, In with the New" operation as data are acquired).  If we are talking about 2000 data points, you'll want to plot them (when the jump is done) on a Graph.  You can still "scroll", because you can say "Show me 200 points starting as Point 350", and what you do is to extract 200 points from your Big Array starting at point 350 and plot them on a 200-point Graph.

 

The other thing you can do is the following:  say you collected 2000 points representing 2 seconds.  "Decimate" your 2000 point array by "extracting" every 10th point, which gives you 200 points, easy to plot on a Graph or a Chart.  Figure out where the data "gets interesting", start plotting from there with a higher resolution (say every other point, and narrow the data down to look at "take off" and "landing".

 

Anyway, those are some ideas to (I hope) get you going on getting better data.

 

Oh, yes, the Part I don't Know.  The NI 9215 appears to be a cDAQ module.  I've never used a cDAQ, so I don't know if it looks like an "ordinary" DAQmx device (such as a USB A/D converter, similar to the A/D sections on a USB-600x) or a LabVIEW Real-Time device (such as you'd find on a CompactDAQ system.  The latter I think of as running LabVIEW Real-Time, where you don't really want to do I/O and graphing, but as I said, this is outside my own personal experience ...

 

Bob Schor

0 Kudos
Message 6 of 9
(949 Views)

Hello!

 

Thanks for your help. I will try to implement your suggestions to program in next few days and then message you about results.

 

Just one last qustion. I would like to know if I am using shif register and peak detection function correctly when I try to define time between peaks? Im adding picture of VI bellow.

 

 

 

0 Kudos
Message 7 of 9
(902 Views)

@miha312 wrote:

Just one last qustion. I would like to know if I am using shif register and peak detection function correctly when I try to define time between peaks? Im adding picture of VI bellow.


I don't know.  I am refusing to look at "pictures" of VIs.  It is too frustrating to have to repeatedly say that "pictures of LabVIEW Code" are has helpful as "pictures of 1000 lines of a C++ program".  . Please attach your LabVIEW VI (if using LabVIEW 2022 or 2023, please use the File Menu to "Save for Previous Version" and choose LabVIEW 2019 or 2021).  

Bob (frustrated) Schor

0 Kudos
Message 8 of 9
(883 Views)

First: Get your aquisition rigth. Use continious aquisition , samplerate 2 or better 10  kHz ,  if you only need to look at Z , you only need to sample Z , however even 20s of 3 channel data is not much nowadays.

 

Have a look at the examples , continious aquisition , 10 kHz , read block size of 5000 (or 2000) , stream the data into a chart with a historylength of SR*20s and run it.

 

If you have one or more nice jumps in your chart, stop the vi, rigth click on the chart  DATA OPERATIONS>MAKE CURRENT VALUES DEFAULT. Save the vi (use save for previous version.. hi Bob 😉 )  and post the vi (! not the picture) here.

 

If you have done that, we are able to work with a sample of your data and are able to help you with your task. 🙂

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 9 of 9
(873 Views)