Your Equation

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

Solve for
0.015
0.110
  • 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.

Steady-state Kalman gain () current value 0.2702
QProcess noise variance per stepKey driver
0.09510.854
RMeasurement noise variance
0.09510.618
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
Q Process noise variance per step0.01 to 5 0.095120.85410.759+10%+4.08 %
R Measurement noise variance0.1 to 10 0.095120.6180.5229+10%−3.96 %

Sweep of Process noise variance per step

Process noise variance per stepSteady-state Kalman gain
0.010.09512
0.63380.54
1.2580.6569
1.8810.7225
2.5050.7659
3.1290.797
3.7520.8206
4.3760.8391
50.8541

Sweep one variable

Steady-state Kalman gain ()Hover, touch, or use the arrow keys on the chart
0.20.40.60.8 12345 Process noise variance per step now 0.2702

Variables and how each one contributes

K

Steady-state Kalman gain

Result ·

What the equation gives you. Everything else feeds it.

Q

Process noise variance per step

· typical 0.01 to 5

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.

R

Measurement noise variance

· typical 0.1 to 10

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

  1. Inside the root: Q² + 4QR = 0.01 + 0.4 = 0.41, so √ = 0.6403.
  2. Prediction variance: P⁻ = (0.1 + 0.6403) / 2 = 0.3702.
  3. 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

Related formulas

Practise this formula