One Roll Update and Its Time Constant

One Roll Update and Its Time Constant

Ada re-derives this chapter’s own numbers step by step, at full precision

foundations
math-foundations
calculation-audit
analytics-ml
Ada ADA · CALCULATION AUDIT

One Roll Update and Its Time Constant

The chapter’s complementary filter takes a previous roll of 8.00 deg, a gyro rate of 12.0 deg/s, and an accelerometer estimate of 6.00 deg, blending them with alpha 0.98 every 0.01 s. A single update barely moves the estimate, yet it still converges within seconds. This audit follows one roll update and its 0.5 s time constant to explain why.

Companion to the chapter Complementary Filters and IMU Fusion — every number here comes from that chapter.

Try

The chapter’s complementary filter takes a previous roll of 8.00 deg , a gyro rate of 12.0 deg/s , and an accelerometer estimate of 6.00 deg , blending them with alpha 0.98 every 0.01 s . Calculate this case.

Observe

This audit follows one roll update and its 0.5 s time constant to explain why. Check shows this.

Explain

The audit conclusion is narrow: alpha 0.98 at 100 Hz is a 0.5 s correction time constant, not an instant fix. That is the right behavior when the accelerometer is trustworthy — but if vibration corrupts the accelerometer, this same slow blend means a bad correction also takes about half a second to wash out, which is exactly why the chapter gates the correction instead ofblending it blindly. Check confirms it.

See the relationship before changing it

The figure reads from left to right. The blue input is alpha. The middle card names the page’s rule. The green output is correction time constant. The arrow matters: change the input, apply the rule once, then read the result with its unit.

Alpha changes correction time constant A three-part teaching diagram connects alpha, the rule tau = 0.01 s / (1 - alpha), and correction time constant. INPUT Alpha APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrow. A larger alpha trusts the gyro longer and slows gravity correction.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 0.98.

  2. 2

    Name the relationship. tau = 0.01 s / (1 - alpha)

  3. 3

    Substitute with units. 0.01 / (1 - 0.98) = 0.500 s

  4. 4

    Read the result. Keep the unit beside the value, then use the result only inside the technical boundary below.

Predict, then change alpha

Try Predict how correction time constant responds when alpha moves. Calculate alpha; compare correction time constant with that prediction.

0.98
Chapter baseline
Correction time constant

Observe Return to 0.98. Recheck correction time constant with alpha at its chapter value.

Explain A larger alpha trusts the gyro longer and slows gravity correction.

Check yourself

What should you do before trusting a moved-slider result?
Answer: Predict its direction, apply the displayed relationship, keep the units, and compare the reset value with the chapter’s worked baseline.
What does this small model leave out?
Answer: Only alpha moves here. The correction time constant calculation excludes field effects listed below.

Technical boundaries

Not represented by “One Roll Update and Its Time Constant” are gyro bias drift, accelerometer vibration, non-linear attitude geometry, variable sample intervals, or magnetic disturbance; “One Roll Update and Its Time Constant” therefore reports only its named fixtures.

Ada: The complementary filter is just two numbers per step — a fast prediction and a small correction — so let me carry them at full precision and show why one update barely moves while the estimate still converges within seconds. All values come from the worked example above.

The previous roll estimate is 8.00 deg, the gyro rate is 12.0 deg/s, the sample interval is 0.01 s, the accelerometer estimate is 6.00 deg, and alpha is 0.98:

  • Gyro prediction: roll_gyro = 8.00 + 12.0 x 0.01 = 8.00 + 0.12 = 8.120000 deg
  • Correction blend: roll_new = 0.98 x 8.120000 + 0.02 x 6.00 = 7.957600 + 0.120000 = 8.077600 deg
  • Net accelerometer nudge this step: 8.077600 - 8.120000 = -0.042400 deg

So a single 10 ms update pulls only 0.0424 deg toward gravity — the accelerometer’s 2 percent weight is deliberately small. Convergence comes from repetition, which the time-constant estimate makes explicit:

  • tau = dt / (1 - alpha) = 0.01 / (1 - 0.98) = 0.01 / 0.02 = 0.500000 s
  • Starting 5.0 deg from the gravity reference, remaining error is 5.0 x exp(-t / tau):
  • After 0.50 s (one tau): 5.0 x exp(-1) = 5.0 x 0.367879 = 1.839397, about 1.84 deg.
  • After 1.00 s (two tau): 5.0 x exp(-2) = 5.0 x 0.135335 = 0.676676, about 0.68 deg.
  • After 2.50 s (five tau): 5.0 x exp(-5) = 5.0 x 0.006738 = 0.033690, about 0.03 deg.

The audit conclusion is narrow: alpha 0.98 at 100 Hz is a 0.5 s correction time constant, not an instant fix. That is the right behavior when the accelerometer is trustworthy — but if vibration corrupts the accelerometer, this same slow blend means a bad correction also takes about half a second to wash out, which is exactly why the chapter gates the correction instead of simply raising alpha.

Every number above is taken from the chapter’s own material and re-derived step by step.