Library / Tracking and estimation / TRK-02
Tracking and estimation
Steady-state Kalman gain for a random-walk state
Long-run Kalman gain for a state that moves as a random walk, x[k] = x[k-1] + w, measured with noise.
- Ref
- TRK-02
- Rev
- v1
- Field
- Tracking and estimation
- Result
- K
For a state that follows a random walk, x[k] = x[k−1] + w with process variance Q, measured as z = x + v with variance R, the prediction variance settles at P⁻ = (Q + √(Q² + 4QR))/2 and the gain at K = P⁻/(P⁻ + R). The ratio Q/R is what matters. A large Q (the state changes quickly) gives a large gain and a fast, noisy filter; a small Q gives a slow, smooth one.
Long-run Kalman gain for a state that moves as a random walk, x[k] = x[k-1] + w, measured with noise. A larger process noise Q relative to the measurement noise R gives a larger gain and a quicker filter.
Calculator
- Steady prediction variance, P−0.3702
- Steady updated variance, P+ = (1 − K)P−0.2702
- Filter memory, −1/ln(1 − K)3.175 samples
- Ratio Q / R0.1
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- The gain settles at 0.2702, so each new measurement moves the estimate by 27 % of the innovation. The filter forgets old data with a time constant of 3.18 samples.
- Raising Q tenfold, for a state that changes faster, lifts the gain to 0.618; lowering it tenfold drops it to 0.0951. Tuning a simple filter is mostly choosing this ratio.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| Q Process noise variance per step | 0.01 to 5 | 0.09512 | 0.8541 | 0.759 | +10% | +4.08 % |
| R Measurement noise variance | 0.1 to 10 | 0.09512 | 0.618 | 0.5229 | +10% | −3.96 % |
Sweep of Process noise variance per step
| Process noise variance per step | Steady-state Kalman gain |
|---|---|
| 0.01 | 0.09512 |
| 0.6338 | 0.54 |
| 1.258 | 0.6569 |
| 1.881 | 0.7225 |
| 2.505 | 0.7659 |
| 3.129 | 0.797 |
| 3.752 | 0.8206 |
| 4.376 | 0.8391 |
| 5 | 0.8541 |
Sweep one variable
Variables and how each one contributes
Steady-state Kalman gain
What the equation gives you. Everything else feeds it.
Process noise variance per step
The process-noise variance per step: how much the state may change between samples, squared. A larger Q means the state is expected to move more, so the filter trusts new measurements more and the gain rises. Raising it by 10 % (to 0.11) moves the result by +4.08 %, from 0.2702 to 0.2812.
Measurement noise variance
The measurement-noise variance. A noisier sensor lowers the gain, so the filter leans on its prediction. Raising it by 10 % (to 1.1) moves the result by −3.96 %, from 0.2702 to 0.2595.
Worked example with the values above
- Inside the root: Q² + 4QR = 0.01 + 0.4 = 0.41, so √ = 0.6403.
- Prediction variance: P⁻ = (0.1 + 0.6403) / 2 = 0.3702.
- K = P⁻ / (P⁻ + R) = 0.3702 / 1.37 = 0.2702.
Assumptions and limits
- A scalar random-walk state with a direct, noisy measurement, constant Q and R, and a filter that has reached steady state.
- Zero-mean white noise, with the variances known.
Common mistakes
- Tuning Q and R separately. The gain depends on their ratio, so changing both in proportion changes nothing.
- Using a random-walk model for a target that moves at a steady velocity. A lag results, and a position–velocity model (such as the alpha–beta tracker) is better.
Statistics and uncertainty
The standard deviation of the estimate is √P⁺ = 0.52 against 1 for a single measurement, an improvement of 1.92 times. That is the benefit of averaging, and it is limited by the process noise: the larger Q is, the less can be gained.
Where it is used
- Tuning the Q and R of a simple smoother and predicting how quickly it follows changes.
- Choosing a fixed filter gain from a noise estimate, without running the full recursion.
Maths you need
- Random walk: a sum of independent random steps
- Steady state: the gain and covariance no longer change from step to step