What alpha = 0.98 Really Sets
What alpha = 0.98 Really Sets
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
What alpha = 0.98 Really Sets
The chapter tunes a complementary filter at alpha=0.98 (98% gyro weight, 2% accelerometer) running at dt=0.02 (50 Hz update rate), and reports that after 10 min the gyro alone drifts 5.1° while the fused estimate drifts only 0.3°. The 98/2 split reads like a minor accelerometer contribution. This audit asks the question that framing hides: what does alpha = 0.98 actually set in terms of a time constant, and is the “2% accelerometer” weight really as small an effect as it sounds?
Companion to the chapter Production Sensor Fusion and Validation — every number here comes from that chapter.
See the relationship before changing it
The figure reads from left to right. The blue card is gyro weight alpha. The middle card applies this page's rule. The green card is filter time constant. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only gyro weight alpha, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 0.98.
- 2
Name the relationship. tau = alpha x 0.02 s / (1 - alpha)
- 3
Substitute with units. 0.98 x 0.02 / (1 - 0.98) = 0.98 s
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change gyro weight alpha
Try Predict the direction of tau = alpha x 0.02 s / (1 - alpha). Test another gyro weight alpha, then compare filter time constant.
Observe A weight closer to one lengthens the low-frequency correction horizon. Reset gyro weight alpha to 0.98 and compare filter time constant.
Explain A weight closer to one lengthens the low-frequency correction horizon.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
Use alpha = 0.98 with dt = 0.02 s; calculate the accelerometer weight, complementary-filter time constant, and crossover frequency.
The nominal 98/2 split becomes tau = 0.98 s and fc ≈ 0.162 Hz, while an uncorrected 0.5 deg/min gyro would drift about 5° in 10 minutes.
Each 2% accelerometer correction is small per sample but persistent at low frequency, anchoring the integrated gyro over the roughly one-second blending horizon.
Ada: The recommended alpha = 0.98 is presented as a 98/2 weight split, which is true but hides the more useful number. With the filter’s own sample step dt = 0.02 s (50 Hz), alpha also fixes the crossover time constant – the horizon over which the accelerometer correction blends in. The standard complementary-filter result is tau = alpha x dt / (1 - alpha):
- Weights: gyro
0.98 -> 98%, accelerometer1 - 0.98 = 0.02 -> 2% - Time constant:
tau = 0.98 x 0.02 / (1 - 0.98) = 0.0196 / 0.02 = 0.98 s - Crossover frequency:
f_c = 1 / (2 x pi x tau) = 1 / (2 x pi x 0.98) = 0.162 Hz
So the gyro owns everything faster than about 0.16 Hz and the accelerometer quietly corrects everything slower. That is why the raw gyro drift spec of 0.5 deg/min is survivable: over the table’s 10-minute test the uncorrected drift would reach 0.5 deg/min x 10 min = 5.0 deg (matching the measured ~5.1 deg gyro-only figure), yet the accelerometer’s low-frequency authority holds the fused drift near a fraction of a degree.
The design-meaningful reading is that the “2% accelerometer” weight is not a small effect: spread across a roughly 1-second time constant it is exactly the low-frequency anchor that keeps the integrated gyro from walking away, so tuning alpha is really choosing where fast trust ends and slow correction begins.
Every number above is taken from the chapter’s own material and re-derived step by step.
Technical boundaries: This first-order complementary model assumes a fixed 50 Hz step and stationary noise; it excludes sensor delay, changing vibration, gyro bias instability, accelerometer linear acceleration, axis coupling, and numerical saturation.