From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

acceleration to displacement for active suspension bench

Go to solution

my application is an active suspension project i need to measure the acceleration and doing two integration to get the position for an accelerometer sensor.

I found many codes ,it works just in simulation but it does not work when i connect it to the acceleration sensor.

i know that i should remove a Dc offset from the speed signal after the integration but it is not clear how we do it .

i know that there are many type of integration functions in Labview . which on of them I should use .

My accelerometer is    ADXL335

0 Kudos
Message 1 of 2
Accepted by topic author ETS_MONT

Every time you do an integration, your result has an arbitrary constant added to it that is essentially your starting value.  You have acceleration data.  If you integrate this, you get velocities, but you need to add the initial velocity to this to get actual velocities.  When you integrate the second time, you get positions, but you need to add the starting position to this to get actual positions.  So the constants you add will depend upon your actual starting conditions (remember that calculus was invented by Newton to describe physics 😉 ).


I usually use Simpon's rule for numerical integration, but if you are performance sensitive, you may want to use trapezoid or rectangle rule numeric integration.  Before doing anything, you should probably read up on them.  The Wikipedia article gives a good overview, but Chapter 4 in the online Numerical Recipes book will give you a much better appreciation for the subject.  Most of these integration methods are available natively in LabVIEW, so you don't have to write them yourself.

0 Kudos
Message 2 of 2