Complementary Alpha Tuner

Complementary Alpha Tuner

animation
sensors
Try Begin with Alpha (gyro weight) at 0.98, Vibration amplitude (degrees) at 5 and Gyro drift rate (deg/s) at 0.5. Move alpha to compare the fused trace with the noisy and drifting traces.
Observe The opening Alpha (gyro weight) gives 98.0% gyro weight and 2.0% accelerometer weight. Watch the fused line approach the fixed true angle while the summary reports noise and final angle error.
Explain Alpha (gyro weight) blends the previous fused angle plus a gyro increment with the current accelerometer angle. Its remaining weight corrects the estimate toward the accelerometer reading.

Technical boundaries. The generated data assumes a stationary true angle of 15 degrees, a 0.02 s sample interval and deterministic synthetic noise. Each input change recomputes 500 samples; RMS noise uses the last 100 samples, and the drift display measures final absolute angle error.

Complementary Alpha Tuner

Adjust the alpha parameter to see how it balances gyroscope smoothness against accelerometer drift correction. The simulation shows a tilting platform with engine vibration.

Legend: Gray = accelerometer (noisy), red dashed = gyro only (drifts), teal = complementary filter, orange dashed = true angle (15 deg).

Back to the chapter