How to use this calculator
Fuse a predicted scalar state with one noisy sensor observation while carrying uncertainty into the next update.
- Enter State multiplier, Prior estimate, Prior variance, Process variance per update, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Scalar Kalman prediction and correction explained
Use State multiplier with Prior estimate to reproduce the sample calculation, then review the stated limits before carrying the result into another scenario.
A numerical walkthrough
State multiplier = 1; Prior estimate = 5; Prior variance = 2; Process variance per update = 0.3; Measurement sensitivity = 1; New measurement = 6; Measurement variance = 0.8.
- Corrected estimate: 5.741935 state units
- Corrected variance: 0.593548 state units²
- Kalman gain: 0.741935 state/measurement
- Innovation: 1 measurement units
A prior estimate five with variance two is updated using measurement six, process variance 0.3 and measurement variance 0.8.
The model behind the numbers
P⁻=a²P+Q; S=h²P⁻+R; K=P⁻h/S; x⁺=ax+K(z−hax); P⁺=(1−Kh)²P⁻+K²R.
Prediction adds process uncertainty before correction. The Joseph covariance form is used to preserve nonnegative variance in finite precision.
What to enter
a— State multiplier- Discrete state transition coefficient.
x— Prior estimate- Previous corrected state estimate.
P— Prior variance- Previous corrected estimation variance.
Q— Process variance per update- Independent additive process-noise variance.
h— Measurement sensitivity- Measurement units per state unit.
z— New measurement- Observed sensor value for this update.
R— Measurement variance- Strictly positive sensor-noise variance.
Interpreting the result
Independent zero-mean noises, a linear scalar model and correctly specified variances are assumed.
Reading the outputs
The corrected variance is state uncertainty, not sensor noise; innovation is the measurement minus its prediction.
Frequently asked questions
Does zero gain mean the sensor is broken?
No; the prior can have zero uncertainty or the sensor can have zero sensitivity.
Should Q be a standard deviation?
No. Enter variance per update, in squared state units.
Can the measurement be negative?
Yes; the model allows signed state and measurement values.
How do I use the Scalar Kalman prediction and correction calculator?
Enter State multiplier, Prior estimate, Prior variance, Process variance per update, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Scalar Kalman prediction and correction?
State multiplier = 1; Prior estimate = 5; Prior variance = 2; Process variance per update = 0.3; Measurement sensitivity = 1; New measurement = 6; Measurement variance = 0.8. Corrected estimate: 5.741935 state units Corrected variance: 0.593548 state units² Kalman gain: 0.741935 state/measurement Innovation: 1 measurement units A prior estimate five with variance two is updated using measurement six, process variance 0.3 and measurement variance 0.8.
Background or definition reference: MathWorks Kalman estimation equations.
Read our calculation methodology.