Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you derive velocity and position from acceleration data?

Solved!
Go to solution

Hi,

 

We're working on a project that requires acceleration, velocity, and distance data over time.  We're using the NI 9234 in a compactDAQ chassis connected to an accelerometer.  The accelerometer is attached to a cantilevered plastic subject (rectangular) that is "plucked" -- sort of like a ruler over the edge of a table sprung like a diving board.  We're acquiring at about 2k samples/sec.  There's no problem getting the acceleration data, it's converting it into velocity and distance that's the problem.  There is an NI link for a solution (http://decibel.ni.com/content/docs/DOC-4308, see block diagram below) but it doesn't work.  I remember from my calculus class that you integrate acceleration to get velocity, and you integrate velocity to get distance. 

 

bd1.PNG

 

This gives us the following graphs:

16941iD97FD677FBC448CC

Acceleration looks good, of course.  But velocity looks like it's a sine wave riding on a curve that dips down and then exponentially decays.  (This dip and decay looks like the response of an overdamped vibration.)  I would have expected velocity to look similar to acceleration, but out of phase 90 degrees (symmetric about the origin).

And we want position, and not distance.  Position would also be an exponentially decaying sine wave.

 

So, what math should be applied?

 

Thanks in Advance,

Shadowfeld

0 Kudos
Message 1 of 16
(20,060 Views)
Solution
Accepted by topic author Shadowfeld

Hello,

 

The conversion from acceleration to velocity/displacement or velocity to displacement requires numerical integration. In LabVIEW, you can take accelerometer measurements and represent that signal in acceleration, velocity, or displacement by running the example VI (Figure 1) included in the following Developer Zone Tutorial:

 

1. Signal Processing Extracts Acceleration, Velocity and Displacement:

 

Community Admin Note:  The article link has been removed due to invalid information.

 

Best regards

 

Ali M

Applications Engineer

National Instruments

Message 2 of 16
(19,996 Views)

What type of sensor are you using? Does it have a lower BW limit (highpass) ?

Your timescale is hard to read 😉 .... *cristal ball mode: 10Hz highpass?

 

 

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 ǝɥʇ'


Message 3 of 16
(19,980 Views)

Thank you Ali.

 

I used this method and it worked.  Unfortunately, I need to put down $2K to buy the LabVIEW Sound and Vibration Toolset.  The link was helpful except for the graphics.  They were unreadable.  I was able to figure out the name of the VI it referred to.  It was an example.  Once I installed the LabVIEW Sound and Vibration Toolset, the example "SVXMPL_Integration (Simulated).vi" was available.  I modified it to work with live data and then used it as a subVI in my app.  I haven't determined yet empiricallyif the data is reliable or scaled correctly, but at least the waveforms look good.

 

My question now is, why is there a difference between the integration method this VI uses (SoundVib_Integration.lvlib:SVL Integration.vi) and the standard Express Time Domain Math VI?

 

Kudos!

0 Kudos
Message 4 of 16
(19,972 Views)

Hi Henrik from Germany,

 

0 Kudos
Message 5 of 16
(19,969 Views)

Hi Henrik from Germany,

 

(Must have pressed Post by accident)  Greetings from America.  The sensor we're using is a Dytran Instruments model 3056B3.  It is an IEPE accelerometer and has a sensitivity of 492.9 mV/g.  There's no BW limit between 20 & 10kHz.  The frequency response is pretty solid between them.  You're right about the time scale and the 10Hz highpass.

 

Thanks!

0 Kudos
Message 6 of 16
(19,966 Views)

Just to make this post complete, I wanted to add the final graphs.  Yes, Henrik, the time scale isn't clear.  I'm using absoute time and would like to show the minor scale lines in increments of .01 seconds, but it won't let me go that far.  

 

17135iB3829E4830ACD00B

0 Kudos
Message 7 of 16
(19,960 Views)

Sorry to resurrect this thread, but I am just playing around and trying to basically do the same thing. I wanted to attach an accelerometer to an object and move it around to see if I could find the displacement in space real time. I tried to follow this link but it is dead:

Hello,

 

The conversion from acceleration to velocity/displacement or velocity to displacement requires numerical integration. In LabVIEW, you can take accelerometer measurements and represent that signal in acceleration, velocity, or displacement by running the example VI (Figure 1) included in the following Developer Zone Tutorial:

 

1. Signal Processing Extracts Acceleration, Velocity and Displacement: http://zone.ni.com/devzone/cda/tut/p/id/4989

I think running this example that was in this link would be helpful. But I can't seem to get to it. I am using a NI 9234 in a compactDAQ chassis which is how this thread popped up. Any suggestions on getting to that example VI? Thanks!

0 Kudos
Message 8 of 16
(17,485 Views)

I second that last message. 

 

I'm working on a similar project. Attempting to get a position measurement from an accelerometer (EVAL-ADXL327Z).

I can get an acceleration read out, but the errors are wrecking my head. I'm not well practiced in labview and I'm lost.

 

I will marry the person who sends me a working VI that achieved the outcome shown in those final graphs...

I've tried everything, looked at every other thread on the subject and this is the closest I've come to the end product. 

 

Please please, pretty please... Time is of the essence.

 

0 Kudos
Message 9 of 16
(16,652 Views)

Well, I am happily married, yet here is some help. 

 

The NI Sound and Vibration Toolkit, linked here, has integration functions for acceleration built in.  These include high pass filtering, and conversion from g to mm/sec or in/sec etc.  So they handle all the math, and do it according to ISO standards.  These functions have also been widely used over the past 13 years by our LabVIEW community. 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209061

 

Page six of the data sheet for the Sound and Vibration tools list the functions included in the toolkit and  is here:  http://www.ni.com/pdf/products/us/cat_svmsuite.pdf

 

Certainly, you can build these up from using LabVIEW built in signal processing functions, yet getting all the math correct can be a challenge, especially when dealing with real world signals that include noise, and DC offsets. 

 

Good luck with your project. 

 

Regards,

 

Preston

 

 

Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 10 of 16
(16,647 Views)