Math Bridge: How do two different motion sensors produce one angle?

← Back to Sensor Fusion Foundations
Math BridgeAnalytics & MLStruggle-friendly runway

How do two different motion sensors produce one angle?

Start with proof-mass physics, predict with gyro rate, then blend toward gravity.

Data Dora, the guideData Dora guides
The one targetReproduce the chapter's 10.352° complementary-filter update.
The chapter case10.0° prior; 20.0°/s gyro; 0.020 s; 8.0° accelerometer; α=0.98.
What it buys youA fusion weight tied to two different sensor roles.

A field team faces an unresolved physical question: How do two different motion sensors produce one angle? They must answer it before changing gyro weight on the real device. Predict the direction first.

See the relationship before changing it

The figure reads from left to right. The blue card is gyro weight. The middle card applies this page's relationship. The green card is accelerometer angle. 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 added model holds every other chapter fixture fixed, so the numeric fixture does not switch without explanation.

Gyro weight changes accelerometer angle An input card leads through the page relationship to the accelerometer angle result. SET INPUT ONE CONTROL APPLY RULE predict calculate check units READ RESULT
Walk the arrows. The weights sum to one. Alpha sets a time trade, not a universal confidence score; the correct value depends on motion and sensor noise.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline for gyro weight is 0.98.

  2. 2

    Name the relationship. ax=9.81 sin(8.0°)=1.37 m/s²; x=(3.0x10⁻⁸)(1.37)/8.0=5.12 nm θgyro=10.0+20.0(0.020)=10.4° θfused=0.98(10.4)+0.02(8.0)=10.352° fs=1/0.020=50.0 Hz; Nyquist=25.0 Hz

  3. 3

    Substitute the chapter fixture. Set gyro weight to 0.98. The page ledger gives accelerometer angle as 8.0 degrees.

  4. 4

    Read the result. Keep degrees beside the value. Use it only inside the technical boundary on this page.

Predict, then change gyro weight

Try Predict the direction of accelerometer angle. Move one control, calculate, then check your prediction.

0.98
Chapter baseline
Accelerometer angle

Observe The weights sum to one. Alpha sets a time trade, not a universal confidence score; the correct value depends on motion and sensor noise. Reset the control to 0.98 and compare accelerometer angle.

Explain Only gyro weight moves here. The other chapter fixtures remain fixed.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only gyro weight moves. Field effects named in the page's technical boundary stay fixed.

1. Give each sensor one job

The gyro measures rotation rate and updates quickly, but integration drifts. The accelerometer sees gravity direction over time, but motion and vibration disturb it.

Data Dora: Fusion works because the weaknesses differ, not because two numbers are automatically better than one.

2. Name every algebra move

1

Project gravityax=g sin θ.

2

Balance spring forcex=ma/k turns acceleration into proof-mass motion.

3

Integrate one gyro stepθgyro=θprevious+ωΔt.

4

Split the weightsGyro gets α; accelerometer gets 1−α.

5

Add weighted anglesθfused=αθgyro+(1−α)θaccel.

3. Reproduce the chapter case

ax=9.81 sin(8.0°)=1.37 m/s²; x=(3.0×10⁻⁸)(1.37)/8.0=5.12 nm
θgyro=10.0+20.0(0.020)=10.4°
θfused=0.98(10.4)+0.02(8.0)=10.352°
fs=1/0.020=50.0 Hz; Nyquist=25.0 Hz

The short update trusts the fast gyro heavily while the accelerometer nudges the estimate back toward gravity.

4. Try the blend weight

TryLower alpha and watch the fused angle move away from the 10.4° gyro prediction toward the 8.0° accelerometer estimate.

Gyro weight
Accelerometer angle
Axis acceleration
Proof-mass motion
Gyro step
Gyro prediction
Accelerometer weight
Fused angle
Sample rate
Nyquist ceiling
12 Hz motion margin

ObserveAt α=0.98 the fused angle is 10.352°. At α=0.90 it becomes 10.160°, closer to the accelerometer because its weight grows from 2% to 10%.

ExplainThe weights sum to one. Alpha sets a time trade, not a universal confidence score; the correct value depends on motion and sensor noise.

Technical boundaries.

This engine shows one axis and one complementary update.

Accelerometer
Linear acceleration, vibration, orientation, scale, and bias disturb the gravity estimate
Gyroscope
Bias, noise, temperature, saturation, and integration history create drift
Fusion
Three-dimensional attitude needs frames, calibration, vector normalization, and singularity-safe maths

Validate alpha, bandwidth, delay, axes, and failure modes on the real device.

5. Decide what alpha means

A high alpha trusts short-term gyro changes. The smaller remaining weight corrects slowly toward gravity. Choose the balance from measured noise and the motion band, not preference.

6. Keep the fusion record

Record axes and frames, units, sample time, alpha, sensor ranges, calibration, filtering, clock alignment, test motion, reference truth, error limit, owner, and retest trigger.

7. Check yourself

Where does the gyro's 0.4° update come from?
Answer: Rate times time: 20.0°/s×0.020 s=0.4°.
Why is the accelerometer weight 0.02?
Answer: Complementary weights sum to one, so 1−0.98=0.02.
Does 10.352° prove the angle is accurate?
Answer: No. It proves the arithmetic for chosen inputs and alpha; calibration and motion tests establish accuracy.
Honesty boundary.

The filter values come from the chapter; proof-mass and motion-band figures are labelled typical.

10.0°, 20.0°/s, 0.020 s, 8.0°, 0.98
The chapter's complementary-filter case
3.0×10⁻⁸ kg and 8.0 N/m
A catalog-typical teaching MEMS proof mass and spring
12 Hz
A catalog-typical wearable motion-band ceiling

Correct, not complete: one ideal update does not validate an IMU orientation system.