Measuring Displacements Using Accelerometers: Part 2- Comparing Methods and Integration

In the last post I discussed the methods I looked into for cancelling the gravity vectors measured by the ACC, if you haven’t seen that I would recommend reading that first. The way I compared the two methods was by seeing how well they follow the raw acceleration signal from an angular movement, this was done by mounting the sensor on the side of a servo motor and moving between different angles with varying starting positions(in reference to gravity) and magnitudes of angle change. Below is the graph from a 5-degree movement.


The blue graph is the raw acceleration signal on the Z axis,red is the cos method and the yellow is the tan method, looking at the full graph(left picture) they seem to be overlapped and looks like they both follow the raw signal fairly well but in the zoomed in picture(right), both are slightly off the middle of the raw acceleration so neither seems better than the other, the Y axis showed the same result that neither stood out. I did another test where the angle change was 35 degrees and the result of the of the two axes is below:

Continue reading

Advertisements

Measuring Displacement Using Accelerometers: Part 1-Calculating Gravity Vectors

So for my final year project I had to convert the signals from an accelerometer to displacements for a movement of a few millimetres and I decided to write about my experiences(mainly problems) doing this. I can’t say exactly what the device was as it was built for a research group but I’m going to go through the theory involved with getting displacements from an accelerometer. I’ll be making a few posts to cover the different topics. If You came here from the YouTube video and want to see the code you can jump to the third post. The movement I was measuring involved the sensor moving forward/backwards and upward/downward as well as the sensor tilting forward and backwards. The sensor used was an MPU-9150 which has 9 degrees of freedom(DOF), only the accelerometer and gyroscope were used in this application(3DOF each), a diagram of the axes can be seen below.mpu axes So because accelerometers measure acceleration due to gravity this would have to be canceled to isolate the acceleration caused by the movement, this wouldn’t be too difficult if all 3 axes from the accelerometer and gyro were being recorded, using some 3d vector and trig calculations this could be done easily enough but a problem I faced was having a fixed sample rate and other sensors which had to be recorded alongside the ACC and gyro, this meant that only the necessary axes from these two could be recorded. Continue reading