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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

integration

Hello.
 
I need to integrate acceleration data to get velocity and position. 
 
Peak values of acceleration, velocity and position are needed. 
 
I've set up a test file but there's something wrong. 
Even without any acceleration input (just a fraction of a millivolt offset) the integrated function does not give a peak value but rather a sum value.  For example, the integrated acceleration chart keeps climing 10, 20 100 etc. - even with no acceleration input. 
 
How do I get the instantaneous - rather than the cumulative or sum - velocity and position data from the integrated accelerations?
 
Thanks,
 
Bob
 
0 Kudos
Message 1 of 9
(3,918 Views)

Greetings Bob,

Are you using LabVIEW to perform the integration of your signal?  If so, which version, and which VI's are you using to perform the integration?  Attaching a copy of your code might be helpful, as well.

I was able to find several VI's that can perform integration in LabVIEW.  One VI by the name of "Integral x(t) PtByPt.vi" can be used to determine the integral of a signal x(t)  Also take a look at "Numeric Integration.vi" if your data is in array format.  Keep in mind, however, that integration, by definition, performs a summation and this VI will give you the area under the curve x(t). 

Regards,

Nicholas B, Applications Engineer, National Instruments

0 Kudos
Message 2 of 9
(3,887 Views)

Sounds like a fairly common real-world problem.  Your accelerometer signal seems to have a small DC offset which integrates once into a false straight line velocity trend and then again into a parabolic position trend.  There's different ways to handle this.  The following couple ideas assume a pretty constant DC offset.  If it drifts, that'll add another layer of complication...

1. After integrating once to velocity, subtract off the best-fit straight line to remove the trend.  Integrate this result to position.  You may need to subtract off a best-fit straight line again.

2. Pass the accel values into a high-pass filter before integrating in an effort to suppress the DC offset.

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 9
(3,874 Views)
Thank you, Kevin.
 
A very good suggestion.  I'm not yet sure how I'll implement it (I'm a new DASYlab v7.00.05 user) but you've given me the right direction. 
 
Thanks for your help,
 
Bob
 
 
0 Kudos
Message 4 of 9
(3,862 Views)

Hello to everyoneSmiley Tongue

 

I have the same problem. I need to integrate acceleration data to get velocity and position. 

 

Peak values of acceleration, velocity and position are needed. 

 

I've set up a test file but there's something wrong. 

 

 We have the values of acceleration from an accelerometer. First of all we substracte the DC component from our acceleration data. Then, with a double integration with time domain math, we have the values of position ( A_red line ). But we have also a sensor of position , which gives us a curve of the displacement ( B_ green line ). We want to have the maximum displacement from the accelerometer and from the sensor of position. We  compared A with B  but we had some problems. Sometimes we have a very good matching ( I ), but sometimes  no  ( II ) .

 

  1. Can be a problem due to the DC component?

  2. Can be a problem do to the type of my accelerometer?

  3. Where is the problem?

 

Please, Help us. It’s very important. :womansad:

0 Kudos
Message 5 of 9
(3,725 Views)

It's been quite a while since I tried to do similar correlations in an app of my own.  Honestly, in my app, even case 2 would have been acceptable as the overall shape was more important for us than the exact values.  I never pursued it to the point of trying to match peak amplitudes.

I do recall that the type of accelerometer we used then was capacitive, and we needed to dial-in a capacitance setting on the signal conditioner.  I also recall that even slightly wiggling the accelerometer cable would affect results.  Also, the zero-point would drift about erratically at a relatively low frequency when we observed it in stationary conditions.  It wasn't a well-behaved offset so I knew there was no hope to exactly compensate for this erratic drift, and didn't spend much time trying.

So, just a thought, but you might want to consider changing sensors.  I know that there are accelerometers available that operate on different principles (such as current source for excitation, voltage output representing accel) and that are not so sensitive to cable wiggling.  I don't really know enough to offer a specific recommendation though.

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 6 of 9
(3,696 Views)
Thank you very much Kevin.
If it's possible, I have another question. My accelerometr has voltage output that representing acceleration ( kinematics ). But we had problems :womansad:
Do you think that with a different accelerometer we can have better resul? X example with Mems?
And, if I have a signal like the red one in my file ( output from an accelerometer in voltage ) how can I clean it? by software or hardware? What can I do to get better it? are there some function in Labview that can hel help me? Smiley Sad
0 Kudos
Message 7 of 9
(3,683 Views)
I don't have the expertise to give you any absolute rock-solid answers.  Based on my limited past experience, I wouldn't have had high hopes of doing much better than you're doing already.  There may well be accelerometers and/or signal conditioners that would work better for you, but you'd need to talk with people that really know those sensors.
 
To "clean" your signal, the right approach depends on exactly what you wish to clean and what to leave alone.  Your double integration already acts like a software lowpass filter.  DC offset issues can be improved with a highpass filter, though you'll need to be careful not to attenuate your overall pulse shape.  You'll get much more flexibility with software filters, though there are also times that hardware filters are indispensable such as anti-aliasing before sampling. 
 
In summary, there's not a magic shortcut approach that'll be ideal for every situation.  You'll need to learn enough about these things that you can make well-informed decisions about the inevitable trade-offs.  Good luck!
 
-Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 8 of 9
(3,650 Views)
Thank you very much! Smiley Wink
0 Kudos
Message 9 of 9
(3,635 Views)