I'm currently in a project in which my mission is to balance an inverted pendulum (IP). The drive system of the IP consists of 2 dc motors whose shafts are connected to 2 fans through 2 rubber belts. The fans are mounted on top of the IP. The IP is about 1.2 (m) in height.
In order to measure the tilt angle of the IP, I used a combination of a gyroscope (LISY300AL - ST Microelectronics) and an accelerometer (ADXL202E - Analog Devices). I used the Kalman Filter algorithm to fuse the data from these sensors, and the result is quite good: I can measure the tilt angle quite accurately.
However, to control the IP, I also need to get the angular velocity, which is output from the gyroscope. My problem is that this output is very noisy, due to the vibration caused by the drive system.
I have tried to soft-mount the sensors (using foam pads) to reduce the vibration, but the result is still not good enough.
I attached here the output from the gyroscope. As you can see from the graph, when I turn on the motors (and hence the fans), the gyro data is extremely noisy.
I have also tried to implement a digital filter. Although it can filter out some noises, but it also causes phase-shift which will add remarkable delays to the system. You can see the phase shift from my second attached file.
So, could you please tell me some effective ways to reduce the noises from the gyroscope's output (without too much phase-shift)?
Thank you for reading my question,