09-20-2018 09:27 AM
Hi,
I have a data set of acceleration gathered from a triaxial accelerometer and was wondering if it is possible to convert it into displacement data. I have attached the acceleration data and some different codes to convert acceleration from a sensor into displacement. I need to combine the two ideas into one that can read the separate acceleration data and output displacement in each axis.
Thanks in advance,
Wes
Solved! Go to Solution.
09-20-2018 10:58 AM
Hi Wes,
Yes it is possible, acceleration is the second derivative of position. Integrate once and you get the velocity, the constant term will be the initial velocity which you must know beforehand. Integrate again and you will get position, the constant term will be the initial position, which you can set to zero since you are only interested in displacement; the current position minus the initial position.
09-20-2018 11:07 AM
In order to get real values, ie, ones that make sense let's make some assumptions.
Why. A constant/offset in your data will blow up in the integration, same applies for a low frequency drift.
mcduff
09-20-2018 11:54 AM
Hi mcduff,
For your assumptions:
1. The accelerometer is mounted to a piece of equipment and the excel file I attached to the first post is an example of a set retrieved from it. (the accelerometers are used to collect the acceleration of the vibrating machine).
2. The equipment is NOT moving at a constant velocity.
and 3. and 4. I will add those to the calculations.
My main question is how to transfer the excel column data into labview and then integrate each column data point and record the output data as a txt file with the same 3 column layout? If you have any ideas for this it would help greatly.
Thanks,
Wes
09-20-2018 12:10 PM
Two ways to get your data:
Try it yourself first and post back what problems you are having.
mcduff
09-21-2018 10:35 AM
I have been able to get the acceleration data from the txt file to be plotted but my integration parts are not correct. I have attached the code so far and an example dataset with time, x, y, z. If you know how to help with the integration of each that would help.
Thanks,
Wes
09-22-2018 11:54 AM
Try Subtracting the mean from your data.
Look at you acceleration data, it is offset from 0. What does that imply? If your reading is correct that means your device has a constant acceleration in one direction. Is this measurement in a vehicle that is constantly accelerating? If not, remove the offset from your data by subtracting the mean. You may also need to low pass filter your data. Since your data has a 0.5Hz Bandwidth, you may need to set you low-pass filter to .2Hz or something along those lines. I did not see those added calculations to you data, as you said you add in an earlier post.
mcduff
09-24-2018 10:28 AM
I have added subtracting the mean from the data and low pass filtering. The acc. and vel. graphs look like they are correct but the displacement graph does not. Do you have any idea how to correct this?
Thanks for the help,
Wes
09-24-2018 11:38 AM
Reread my reply in Message 3. You may have to rinse and repeat in-between an integration.
I used the original text file along with your new VI to generate the following:
Look at the FFTs above. After filtering, subtracting the mean, your DC is gone. Look at the FFT after the first integration, notice a peak at 0 Hz, try to remove it as you did previously.
mcduff
09-24-2018 12:49 PM
I've added the filter and mean subtraction to each pass and the results are similar to before.
Do you have any other recommendations to help fix this?
Thanks,
Wes