I would like to compensate for drift in my gyro using an acceleromoter. I collected some data from the accelerometer and gryo and I am looking for some help in designing a filter.
1. My first question is if the accelerometer data looks reasonable since this is the first time I have used an accelerometer. The accelerometer is lying flat on the robot.
- The first attachment (acc_data_1.bmp) shows readings while the robot was stationary (first half) and then moving. I don't understand why the z-axis is jumping around while the robot is stationary (or why it is moving at all even when the robot is driving around).
- The second and third attachements (acc_data_2.bmp and acc_data_3.bmp) show the acceleromoter data and gyro data during a sequence of motions.
Time 368.5-373: Robot turns 90 degrees
Time 373-375: Robot drives 5 feet
Time 375-378.5: Robot turns 90 degrees
Time 378.5 - 381.5 Robot drives 10 feet
Time 381.5-384.5: Robot turns 90 degrees
If I am correct the x-axis is forward/reverse motion of the robot and the y-axis is side to side motion of the robot. I think I can see reasonable correlation from the accelerometer data (for example acceleration followed by deceleration in the x-axis when making the 5' and 10' position moves).
I would like other opinions on the quality of this data and if I should proceed with trying to create a filter.
2. If the data is correct I would then appreciate any suggestions for a filter design. I attempted to implement the suggestion
here but I don't really understand it enough to get it working. One of the main sticking points is how to convert the G's from the accelerometer to degrees.
Some theory may be helpful, some practical pointers would be nice, some code or psuedo-code would be awesome! I will leave this sort of open ended and see where it goes.