Does it make sense to apply high pass filter over gyroscope data coming from an IMU? I am using MEMSENSE nano IMU and I am getting rotation angle rates from it. Earlier as I tried to directly integrate the data to get the rotation angles I did not get anything making sense. I am doing a random motion experiment to find out if the device is working or not. I start moving the IMU from rest and after rotating it randomly I bring it back to rest. Without this high pass filtering, my output looked like this:

you can see there is a final error still there

After that I don't know why I applied that but it is giving me perfect results.

By High Pass Filter I mean:

  • During the sample collection from gyroscope of IMU, calculate the average value of the rotation rate
  • subtract this mean from all the samples

Following are my results:

A random motion performed and then IMU was returned to its initial position

  • 1
    \$\begingroup\$ I suppose that would depend on what you're doing with the information. There are probably more effective ways to remove a baseline offset, if that's what you're trying to do. \$\endgroup\$ Jun 4, 2014 at 19:44
  • \$\begingroup\$ At the moment I'm totally bamboozled by your explanation of what you are doing precisely, what the input data represents (and precisely is numerically) and what you believe the output data represents. Just saying. BTW is it anything to do with EE? IMU? \$\endgroup\$
    – Andy aka
    Jun 4, 2014 at 20:06
  • \$\begingroup\$ @Andy aka..Yes it is. I am using MEMSENSE nano IMU and I am getting rotation angle rates from it. \$\endgroup\$ Jun 4, 2014 at 20:35
  • \$\begingroup\$ @ScottSeidman, kindly check the question again i just updated it. I am not working on a specific application. I just want to check if i can get the correct angles from it. I have not mounted it over anything. its freestyle! \$\endgroup\$ Jun 4, 2014 at 20:41

1 Answer 1


Uner -

No. You are fooling yourself. If you high-pass as you are doing, any final angle will decay to zero. Try it yourself: step your gyro away from zero on any axis and stay there. Watch what happens to your high-passed output - it will drop back to zero.

If what you are doing is simply to demonstrate that you are reading the gyro correctly, confine your movements to one axis only. Try putting in on a level surface and rotating it horizontally, then tip it in the pitch axis.

If you are going to do anything more involved, you must learn to do angle transformations. I know you don't want to believe this, but until you do your complex movements will continue to make no sense to you.

  • \$\begingroup\$ No, the velocity, not the angle, would go to zero \$\endgroup\$ Jun 5, 2014 at 1:56
  • \$\begingroup\$ Nope. High pass, by definition, allows no DC. So any angle change which results in a DC output will gradually drop to zero. As happened with his data. Please pay attention to his figures. \$\endgroup\$ Jun 5, 2014 at 2:13
  • \$\begingroup\$ @WhatRoughBeast Let me check that for you. Right now, however i have my results for one axis and they are perfect. what i do is, i move around in one axis and come back and thats what the data shows: drive.google.com/file/d/0B2w3mmBOvQsIS3lpMTVGTi1ER28/… \$\endgroup\$ Jun 5, 2014 at 2:20
  • 1
    \$\begingroup\$ Gyroscope reports angular velocity, not position. High passing velocity will brign DC velocity to zero. The integral should not go to zero. He says he's filtering rate. His figures show otherwise. Could be he's actually plotting rate with poorly labelled axes. \$\endgroup\$ Jun 5, 2014 at 2:20
  • \$\begingroup\$ @UmerHuzaifa - Right. Congratulations. Your IMU is working perfectly. Each axis is performing as it should. Not only that, if moving one axis produces no output on the other two, you know that the cross-axis terms are zero. And you can't ask for more than that. But. If you want to show the results of complex rotations you will need to learn rotation transformations. No matter how much you don't want to. And why do you claim your 2nd figure is correct? Did you really shake your gyros around and then gradually bring them back to their original position? \$\endgroup\$ Jun 5, 2014 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.