20  Kalman Filters for Sensor Fusion

In 60 Seconds

The Kalman filter is the optimal linear estimator for combining noisy sensor measurements with a predictive model of system behavior. It operates in a predict-update cycle: the prediction step projects the state forward (uncertainty grows), and the update step corrects using sensor measurements (uncertainty shrinks). The Kalman gain automatically balances trust between the model and measurements based on their respective uncertainties.

Learning Objectives

After completing this chapter, you will be able to:

  • Explain Kalman filter theory and state-space model components
  • Implement the predict-update cycle for 1D and multi-dimensional systems
  • Apply Kalman filters to sensor fusion problems such as GPS-IMU tracking
  • Configure filter parameters (Q, R) and evaluate their effect on tracking performance
  • Diagnose filter divergence caused by incorrect noise models or sensor failures

Imagine you are trying to track the temperature in a room, but your thermometer gives slightly different readings each time – sometimes too high, sometimes too low. A Kalman filter is a smart algorithm that combines what you expect the temperature to be (based on recent trends) with what your sensor actually reads, giving you a better estimate than either source alone. It is the most widely used technique for combining noisy sensor data in IoT, robotics, and navigation systems.

Understanding State Estimation

Core Concept: State estimation infers the true value of a system’s hidden state (position, velocity, temperature) from noisy, incomplete sensor measurements by combining a predictive model of how the state evolves with observations that constrain what the state can be.

Why It Matters: Real sensors never report the true state directly. A GPS chip reports a position estimate with 3-5 meter uncertainty; an accelerometer measures gravity plus linear acceleration plus noise. State estimation algorithms like Kalman filters maintain a running best-guess of the true state plus a measure of confidence (covariance), enabling downstream systems to make informed decisions even when individual measurements are unreliable.

Key Takeaway: Think of state estimation as maintaining a belief about reality rather than trusting any single measurement. The belief gets updated by two mechanisms: prediction (what physics says should happen) and correction (what sensors actually observed). Good estimators balance these based on how much you trust each.

Key Concepts

  • State vector: The set of variables the Kalman filter estimates at each time step — for an IoT position tracker, typically (x, y, velocity_x, velocity_y).
  • Predict step: The phase where the Kalman filter uses a motion model to project the previous state estimate forward in time, producing a predicted state and inflated uncertainty.
  • Update step: The phase where the Kalman filter incorporates a new sensor measurement, correcting the predicted state proportionally to how much it trusts the measurement versus the prediction.
  • Kalman gain (K): The weight computed at each update step controlling how much the measurement corrects the prediction; high K means trust the measurement, low K means trust the model.
  • Process noise covariance (Q): A matrix representing uncertainty in the motion model — higher Q means the filter adapts faster to unexpected motion but is noisier.
  • Measurement noise covariance (R): A matrix representing sensor measurement uncertainty; higher R means the filter trusts measurements less and relies more on the motion model.
  • Extended Kalman Filter (EKF): A non-linear extension of the Kalman filter that linearises the motion or measurement model at each step using Jacobians, required when relationships are not linear.

20.1 Introduction to Kalman Filtering

The Kalman filter is the optimal linear estimator for systems with Gaussian noise. It’s widely used for sensor fusion in navigation, robotics, and tracking.

20.1.1 State Space Model

State equation: \(x_k = F x_{k-1} + B u_k + w_k\) (process model)

Measurement equation: \(z_k = H x_k + v_k\) (sensor model)

Where:

  • \(x_k\): State vector at time \(k\)
  • \(F\): State transition matrix
  • \(B\): Control input matrix
  • \(u_k\): Control input
  • \(H\): Measurement matrix
  • \(w_k\): Process noise ~ \(N(0, Q)\)
  • \(v_k\): Measurement noise ~ \(N(0, R)\)

20.2 The Predict-Update Cycle

The Kalman filter operates in two alternating phases:

Kalman filter predict-update cycle showing the two alternating phases: prediction (state projection with growing uncertainty) and update (measurement correction with shrinking uncertainty)

20.2.1 Step 1: Initialize

Set initial estimate and uncertainty based on prior knowledge:

  • Initial state \(\hat{x}_0\)
  • Initial covariance \(P_0\)

20.2.2 Step 2: Predict

Project state forward using motion model. Uncertainty grows:

\[\hat{x}_{k|k-1} = F \hat{x}_{k-1|k-1} + B u_k\]

\[P_{k|k-1} = F P_{k-1|k-1} F^T + Q\]

20.2.3 Step 3: Compute Kalman Gain

Balance prediction vs measurement trust (for scalar case with \(H=1\), \(K \in [0,1]\)):

\[K_k = P_{k|k-1} H^T (H P_{k|k-1} H^T + R)^{-1}\]

20.2.4 Step 4: Update

Correct prediction using measurement. Uncertainty shrinks:

\[\hat{x}_{k|k} = \hat{x}_{k|k-1} + K_k (z_k - H \hat{x}_{k|k-1})\]

\[P_{k|k} = (I - K_k H) P_{k|k-1}\]

Key Insight: Why Uncertainty Shrinks

When you multiply two Gaussian distributions (prediction x measurement), the result is always narrower than either input. This is the mathematical magic of sensor fusion - combining imperfect information sources produces a better estimate than any single source alone.

The math: If prediction has variance P and measurement has variance R, the fused variance is: \[\sigma_{fused}^2 = \frac{1}{\frac{1}{P} + \frac{1}{R}} = \frac{PR}{P+R}\]

For example: P = 100 m^2 (10m uncertainty), R = 25 m^2 (5m uncertainty) \[\sigma_{fused}^2 = \frac{100 \times 25}{100 + 25} = \frac{2500}{125} = 20 \text{ m}^2 \approx (4.5\text{m})^2\]

The fused uncertainty (4.5m) is smaller than both inputs (10m and 5m)!

20.3 Worked Example: Temperature Sensor Tracking

Scenario: Track room temperature using a noisy sensor (+/-1.0°C accuracy)

System Parameters:

  • State: Temperature at time \(k\) (scalar, 1D case)
  • State transition: \(F = 1\) (temperature doesn’t change much between samples)
  • Measurement matrix: \(H = 1\) (we measure temperature directly)
  • Process noise: \(Q = 0.1\) (variance in temperature change per time step)
  • Measurement noise: \(R = 1.0\) (sensor variance)
  • Initial conditions: \(\hat{X}_0 = 20.0\)C, \(P_0 = 1.0\)

Simulated Measurements:

Time \(k\) True Temp Measurement \(Z_k\) Noise
1 21.0C 21.5C +0.5C
2 21.5C 20.8C -0.7C
3 22.0C 22.3C +0.3C
4 22.3C 21.9C -0.4C
5 22.5C 22.6C +0.1C

20.3.1 Step-by-Step Calculations

k=1: First measurement Z1 = 21.5C

Predict: \[\hat{X}_{1|0} = 1 \times 20.0 = 20.0°C\] \[P_{1|0} = 1 \times 1.0 \times 1 + 0.1 = 1.1\]

Update: \[y_1 = 21.5 - 20.0 = 1.5°C\] \[K_1 = \frac{1.1}{1.1 + 1.0} = 0.524\] \[\hat{X}_{1|1} = 20.0 + 0.524 \times 1.5 = 20.786°C\] \[P_{1|1} = (1 - 0.524) \times 1.1 = 0.524\]

k=2 through k=5: Continue the predict-update cycle…

Summary Table:

k Measurement Kalman Gain Updated Estimate Uncertainty Error
0 - - 20.000 1.000 0.000
1 21.5 0.524 20.786 0.524 -0.214
2 20.8 0.384 20.791 0.384 -0.709
3 22.3 0.326 21.283 0.326 -0.717
4 21.9 0.299 21.467 0.299 -0.833
5 22.6 0.285 21.790 0.285 -0.710

Key Observations:

  1. Uncertainty Decreases: \(P\) reduces from 1.000 to 0.285 (71.5% reduction)
  2. Kalman Gain Stabilizes: \(K\) converges from 0.524 to 0.285
  3. Filter smooths noise while tracking trend

20.4 Worked Example: GPS + Accelerometer Fusion

This example demonstrates how a Kalman filter combines two complementary sensors for drone position tracking.

Real-World Application: Delivery Drone Navigation

Delivery drones face a fundamental challenge: GPS provides absolute position (no drift) but updates slowly (1 Hz) with moderate noise (several meters). The accelerometer provides high-frequency motion updates (100 Hz) but suffers from integration drift. The Kalman filter optimally fuses these complementary sensors.

GPS and accelerometer sensor fusion architecture showing how slow GPS position updates and fast accelerometer velocity measurements feed into a Kalman filter for drone navigation

20.4.1 Problem Setup

Given Parameters:

Parameter Value Physical Meaning
Initial position 100 m Starting position
Initial uncertainty 25 m\(^2\) Moderately uncertain
Velocity 2 m/s Constant velocity
Time step 1 s Time between GPS updates
GPS measurement 105 m What GPS reports
GPS noise variance R 16 m\(^2\) Typical consumer GPS
Process noise Q 1 m\(^2\) Wind, vibration

20.4.2 Step-by-Step Solution

Step 1: Prediction

\[\hat{x}^- = 100 + 2 \times 1 = 102\,m\] \[P^- = 25 + 1 = 26\,m^2\]

Step 2: Kalman Gain

\[K = \frac{26}{26 + 16} = 0.619\]

The Kalman gain tells us:

  • Trust in GPS: K = 0.619 (62%)
  • Trust in prediction: 1-K = 0.381 (38%)

Step 3: Update

\[y = 105 - 102 = 3\,m\] \[\hat{x} = 102 + 0.619 \times 3 = 103.86\,m\] \[P = 0.381 \times 26 = 9.9\,m^2\]

20.4.3 Results Summary

Stage Position Uncertainty (P) Std Dev
Initial 100 m 25 m\(^2\) 5.0 m
After Prediction 102 m 26 m\(^2\) 5.1 m
After GPS Update 103.86 m 9.9 m\(^2\) 3.1 m
The Power of Sensor Fusion

Uncertainty DECREASED from 5.0m to 3.1m by fusing two noisy sensors!

Even more remarkably:

  • Prediction alone: 5.1m
  • GPS alone: 4.0m
  • Fused result: 3.1m (better than either sensor!)

Why does fused uncertainty shrink? When multiplying two Gaussian PDFs, the result is always narrower.

Given prediction with variance \(P = 26 \text{ m}^2\) and measurement with variance \(R = 16 \text{ m}^2\), the fused variance is:

\[P_{\text{fused}} = \frac{1}{\frac{1}{P} + \frac{1}{R}} = \frac{P \cdot R}{P + R} = \frac{26 \times 16}{26 + 16} = \frac{416}{42} = 9.9 \text{ m}^2\]

Standard deviations: - Prediction: \(\sqrt{26} = 5.1\) m - Measurement: \(\sqrt{16} = 4.0\) m - Fused: \(\sqrt{9.9} = 3.1\) m (better than either!)

Key insight: The Kalman gain \(K = \frac{26}{42} = 0.619\) represents the information ratio: 62% trust in measurement (smaller uncertainty), 38% trust in prediction. This is optimal weighting for minimum variance.

Adjust the prediction uncertainty (P) and measurement noise (R) to see how the Kalman gain and fused uncertainty change. Observe how the fused result is always better than either source alone.

20.5 Parameter Tuning: Q and R

Tuning Guidelines

Process Noise Q:

  • Higher Q = less trust in motion model (tracks measurements more)
  • Lower Q = more trust in model (smoother but slower to respond)
  • Set based on physical system dynamics

Measurement Noise R:

  • From sensor datasheets or empirical testing
  • Measure variance of stationary readings
  • Higher R = noisier sensor, less trusted

Balance:

  • If Q large and R small: K approaches 1 (trust measurements)
  • If Q small and R large: K approaches 0 (trust prediction)

Explore how process noise (Q) and measurement noise (R) affect the steady-state Kalman gain and convergence. The steady-state gain is the value K converges to after many iterations.

20.6 Uncertainty Propagation and Gaussian Intuition

Understanding Uncertainty Propagation

Core Concept: Uncertainty propagation tracks how measurement errors and model imperfections accumulate, spread, and combine as data flows through a fusion system, represented mathematically by the covariance matrix P that grows during prediction and shrinks during measurement updates.

Why It Matters: Knowing the estimate is not enough; you must know how confident you are. A position estimate of “10 meters east” is useless without knowing if the uncertainty is 0.1 meters (safe for drone landing) or 50 meters (dangerous for navigation). The covariance matrix P captures not just individual variable uncertainties but also correlations between them.

Key Takeaway: Always propagate uncertainty alongside state estimates. Use covariance to weight sensor contributions (Kalman gain), detect anomalies (innovation monitoring), and communicate confidence to downstream systems.

Gaussian uncertainty visualization showing how the predict step spreads the distribution (wider bell curve) while the update step sharpens it (narrower bell curve) by fusing prediction with measurement

Key Insights:

  1. Predict Step: Uncertainty GROWS (Gaussian spreads)
    • Apply motion model but add process noise Q
    • The further we predict, the less certain we are
  2. Update Step: Uncertainty DECREASES (Gaussians multiply)
    • Fuse prediction with measurement
    • New information reduces uncertainty

20.7 When Kalman Filters Fail

Situation Problem Alternative
Non-linear system Linearization errors Extended Kalman (EKF)
Multi-modal distribution Single Gaussian assumption Particle filter
Unknown noise parameters Wrong Q or R Adaptive Kalman

20.8 Extended Kalman Filter (EKF)

For nonlinear systems, the Extended Kalman Filter linearizes around the current estimate using Jacobians:

Nonlinear state model: \(x_k = f(x_{k-1}, u_k) + w_k\)

Linearization: Compute Jacobian \(F = \frac{\partial f}{\partial x}\) at each time step

The EKF is commonly used for GPS-IMU fusion where the measurement model (range to satellites) is nonlinear.

Worked Example: Kalman Filter for Indoor Position Tracking

Scenario: Track forklift position in warehouse using wheel odometry + UWB beacons.

Given:

  • State vector: [x, y, vx, vy] (4 states)
  • Wheel odometry: 50 Hz, 2% drift
  • UWB beacons: 10 Hz, +/-15 cm accuracy
  • Target: <30 cm position error

Result: EKF achieves 18 cm RMS error (within 30 cm target). Pure odometry after 5 minutes: 3.2 m error. Pure UWB: 22 cm. Fusion provides 6x improvement over odometry.

Key Insight: The Kalman gain automatically weights each source based on current uncertainty - trusting odometry between UWB updates, then snapping back when UWB measurements arrive.

Run this Python code to implement a Kalman filter that tracks temperature from a noisy sensor. Observe how the filter smooths measurements while tracking the true value.

import random

class KalmanFilter1D:
    """Simple 1D Kalman filter for scalar state estimation."""
    def __init__(self, x0, P0, Q, R, F=1.0, H=1.0):
        self.x = x0   # State estimate
        self.P = P0   # Estimate uncertainty (covariance)
        self.Q = Q    # Process noise variance
        self.R = R    # Measurement noise variance
        self.F = F    # State transition (1.0 = constant)
        self.H = H    # Measurement model (1.0 = direct)

    def predict(self):
        self.x = self.F * self.x
        self.P = self.F * self.P * self.F + self.Q
        return self.x, self.P

    def update(self, z):
        # Innovation (measurement residual)
        y = z - self.H * self.x
        # Innovation covariance
        S = self.H * self.P * self.H + self.R
        # Kalman gain
        K = self.P * self.H / S
        # Update state and covariance
        self.x = self.x + K * y
        self.P = (1 - K * self.H) * self.P
        return self.x, self.P, K

# Simulate a slowly rising temperature with noisy sensor
random.seed(42)
true_temps = [20.0 + 0.3 * t + 0.1 * (t % 5) for t in range(30)]
measurements = [t + random.gauss(0, 1.5) for t in true_temps]

# Initialize Kalman filter
kf = KalmanFilter1D(
    x0=20.0,  # Initial guess
    P0=5.0,   # High initial uncertainty
    Q=0.2,    # Process noise (temp changes slowly)
    R=2.25    # Measurement noise (sensor variance 1.5^2)
)

print(f"{'Step':>4} {'True':>7} {'Measured':>9} {'Estimate':>9} "
      f"{'Error':>7} {'K':>6} {'P':>6}")
print("-" * 55)

errors_raw = []
errors_filtered = []

for i, z in enumerate(measurements):
    kf.predict()
    x_est, P, K = kf.update(z)

    raw_err = abs(z - true_temps[i])
    filt_err = abs(x_est - true_temps[i])
    errors_raw.append(raw_err)
    errors_filtered.append(filt_err)

    if i % 3 == 0:  # Print every 3rd step
        print(f"{i:4d} {true_temps[i]:7.2f} {z:9.2f} {x_est:9.2f} "
              f"{filt_err:7.3f} {K:6.3f} {P:6.3f}")

avg_raw = sum(errors_raw) / len(errors_raw)
avg_filt = sum(errors_filtered) / len(errors_filtered)
print(f"\nAverage absolute error:")
print(f"  Raw measurements: {avg_raw:.3f} C")
print(f"  Kalman filtered:  {avg_filt:.3f} C")
print(f"  Improvement:      {(1 - avg_filt/avg_raw)*100:.1f}%")
print(f"\nFinal Kalman gain K = {K:.3f} (steady state)")
print(f"Final uncertainty P = {P:.3f} (converged from {5.0})")

What to Observe:

  • The Kalman gain K starts high (~0.7) and converges to a steady-state value (~0.25) as the filter becomes confident
  • The uncertainty P drops rapidly in the first few steps, then stabilizes
  • Filtered estimates are consistently closer to true values than raw measurements
  • The filter tracks the upward trend while rejecting sensor noise

This example fuses a slow but accurate GPS sensor (1 Hz) with a fast but drifty accelerometer (10 Hz) to track 1D position – the core idea behind navigation systems.

import random
import math

class SensorFusionKF:
    """Kalman filter for position+velocity fusion."""
    def __init__(self, x, v, P_x, P_v, Q_x, Q_v, R_gps, R_accel):
        self.x = x        # Position estimate
        self.v = v        # Velocity estimate
        self.P_x = P_x    # Position uncertainty
        self.P_v = P_v    # Velocity uncertainty
        self.Q_x = Q_x    # Position process noise
        self.Q_v = Q_v    # Velocity process noise
        self.R_gps = R_gps    # GPS measurement noise
        self.R_accel = R_accel  # Accelerometer noise

    def predict(self, dt, accel=0):
        # Kinematic prediction: x = x + v*dt + 0.5*a*dt^2
        self.x += self.v * dt + 0.5 * accel * dt * dt
        self.v += accel * dt
        # Uncertainty grows
        self.P_x += self.P_v * dt * dt + self.Q_x
        self.P_v += self.Q_v

    def update_gps(self, z_gps):
        K = self.P_x / (self.P_x + self.R_gps)
        self.x += K * (z_gps - self.x)
        self.P_x *= (1 - K)
        return K

    def update_velocity(self, z_vel):
        K = self.P_v / (self.P_v + self.R_accel)
        self.v += K * (z_vel - self.v)
        self.P_v *= (1 - K)
        return K

# Simulate a vehicle: constant velocity 10 m/s for 10 seconds
random.seed(123)
true_vel = 10.0  # m/s constant
dt_accel = 0.1   # Accelerometer at 10 Hz
dt_gps = 1.0     # GPS at 1 Hz
total_time = 10.0

kf = SensorFusionKF(
    x=0, v=9.0,     # Initial estimates (slightly wrong velocity)
    P_x=10.0, P_v=4.0,  # Initial uncertainties
    Q_x=0.01, Q_v=0.1,  # Process noise
    R_gps=9.0,       # GPS noise (3m std dev)
    R_accel=1.0       # Velocity from accel integration noise
)

# Track errors for comparison
gps_only_x = 0.0
accel_only_x = 0.0
accel_only_v = 9.0

print("Sensor Fusion: GPS (1 Hz) + Accelerometer (10 Hz)")
print(f"{'Time':>5} {'True X':>8} {'GPS Only':>9} {'Accel Only':>11} "
      f"{'Fused':>8} {'P_x':>6}")
print("-" * 58)

t = 0.0
step = 0
while t < total_time:
    true_x = true_vel * t

    # Accelerometer update (every 0.1s)
    accel_noise = random.gauss(0, 0.5)
    measured_vel = true_vel + accel_noise
    kf.predict(dt_accel, accel=0)
    kf.update_velocity(measured_vel)

    # Accumulate accel-only estimate (no GPS correction)
    accel_only_v += accel_noise * dt_accel
    accel_only_x += accel_only_v * dt_accel

    # GPS update (every 1.0s)
    if step % 10 == 0 and step > 0:
        gps_noise = random.gauss(0, 3.0)
        gps_measurement = true_x + gps_noise
        K_gps = kf.update_gps(gps_measurement)
        gps_only_x = gps_measurement  # GPS-only = last reading

        print(f"{t:5.1f} {true_x:8.1f} {gps_only_x:9.1f} "
              f"{accel_only_x:11.1f} {kf.x:8.1f} {kf.P_x:6.2f}  "
              f"<-- GPS update (K={K_gps:.2f})")

    t += dt_accel
    step += 1

# Final comparison
true_final = true_vel * total_time
print(f"\n--- Final Position Errors at t={total_time}s ---")
print(f"True position:     {true_final:.1f} m")
print(f"GPS-only error:    {abs(gps_only_x - true_final):.1f} m")
print(f"Accel-only error:  {abs(accel_only_x - true_final):.1f} m (drift!)")
print(f"Fused error:       {abs(kf.x - true_final):.1f} m")
print(f"Fused uncertainty: {math.sqrt(kf.P_x):.2f} m (1-sigma)")

What to Observe:

  • GPS-only has 3m noise per reading but no drift
  • Accelerometer-only drifts further and further from truth over time
  • The fused estimate is better than either sensor alone
  • Between GPS updates, uncertainty grows (predict-only); each GPS update shrinks it (see P_x jumps)
  • The Kalman gain for GPS starts high and decreases as the filter becomes confident

Common Pitfalls

Process noise varies with device motion state (stationary vs vibrating machine), and measurement noise varies with sensor conditions (temperature, battery level). Use adaptive covariance estimation or at least tune Q and R separately for key operating modes.

The standard Kalman filter assumes linear system and measurement models. For non-linear IoT applications (GPS/INS, robot localisation), the linearisation error of an EKF can cause filter divergence. Consider Unscented Kalman Filter (UKF) for better non-linear handling.

Starting the Kalman filter with a state estimate far from the true initial value causes a long convergence period with poor estimates. Use the first few sensor readings to initialise the state before trusting filter outputs.

Kalman filter innovation (difference between measurement and prediction) should be consistent with the innovation covariance. Large, persistent innovations indicate model mismatch or sensor malfunction. Log and monitor innovation statistics.

20.9 Summary

The Kalman filter is the foundation of sensor fusion:

  • Predict-Update Cycle: Project forward with model, correct with measurements
  • Optimal Weighting: Kalman gain balances prediction vs measurement based on uncertainties
  • Uncertainty Tracking: Covariance matrix captures confidence in estimates
  • Fusion Benefit: Combined estimate better than any single sensor

The Kalman filter is like a super-smart guesser who gets better and better at predicting the future!

20.9.1 The Sensor Squad Adventure: The Great Guessing Game

Max the Microcontroller invented a new game for the Sensor Squad called “Guess Where the Ball Is!”

A ball was rolling across the playground, and the squad had to track it. But there was a problem – they could only peek at the ball through a foggy window (that is their noisy sensor!).

Round 1 – The Prediction: Max said, “The ball was at the 10-meter mark and rolling at 2 meters per second. So in one second, it should be at… 12 meters!” But Max was not 100% sure because the wind might have pushed the ball. His CONFIDENCE went down a tiny bit.

Round 2 – The Peek: Sammy the Sensor peeked through the foggy window and said, “I think the ball is at 14 meters!” But Sammy’s view was fuzzy too.

Round 3 – The Magic Blend: Here is where the Kalman magic happens! Max thought: “My guess says 12, Sammy’s peek says 14. Sammy’s peek is a LITTLE more reliable than my guess right now, so let me blend them: about 13.2 meters!” Max’s CONFIDENCE went UP because he combined two clues!

Bella the Battery was amazed: “Your confidence went UP even though BOTH clues were fuzzy?”

“That is the magic!” said Max. “Two fuzzy clues combined are BETTER than either one alone. Every time I predict AND peek, I get more and more confident!”

Lila the LED added: “And the Kalman GAIN is like a dial that controls how much you trust your prediction versus your peek!”

After 10 rounds, Max was tracking the ball within half a meter – way better than either his predictions or Sammy’s peeks alone!

20.9.2 Key Words for Kids

Word What It Means
Predict Using what you know to guess what will happen next
Update Fixing your guess when you get new information
Kalman Gain The dial that controls how much you trust new info vs your guess
Covariance A number that tells you how confident or uncertain you are
Converge When your guesses get closer and closer to the real answer
Concept Relationships

Builds On:

Enables:

Extensions:

Applications:

Tools:

Key Takeaway

The Kalman filter is the foundation of most sensor fusion systems. Its power lies in the predict-update cycle that automatically balances trust between the motion model and sensor measurements. The key to success is accurate noise modeling: measure R empirically from stationary sensor data, and set Q based on expected system dynamics. When the system is non-linear, use the Extended Kalman Filter (EKF) with Jacobian linearization.

20.10 What’s Next

If you want to… Read this
Apply the Kalman filter to a complementary IMU fusion example Complementary Filter and IMU Fusion
Explore particle filters for highly non-linear problems Particle Filters
See Kalman-based fusion in real IoT applications Data Fusion Applications
Practice implementing the Kalman filter Data Fusion Exercises
Return to the module overview Data Fusion Introduction