EIGENROOMLAB WORKSHEET 13ANSWER KEY · FOR INSTRUCTORSCart-pole · State space
Estimate the hidden velocities
Goal
Measure how the assumed sensor variance changes a Kalman filter's estimate of the pole angle after a nudge.
Setup
Lab eigenroom.com/lab?lesson=kalman · short link eigenroom.com/kalman
Open it on a phone or a computer; there is nothing to log in to or install. The link loads run A's settings:
- Initial angle
- 6°
- Controller type
- LQR with Kalman filter display
- Position cost
- 10
- Angle cost
- 100
- Force cost
- 1
- Process variance Q
- 0.00001
- Sensor variance R
- 0.001
- Sensor noise
- 0.3
- Disturbance events
- Nudge cart 1.2 N·s at 1.4 s
- Recording
- 8 s
- APreset, exactly as the link opens it.
- BChange only: Sensor variance R → 0.01.
- CChange only: Sensor variance R → 0.0001. (ext.)
1. Predict
Can position and angle sensors reveal velocity when measurements are noisy?
A discrete Kalman filter predicts from the model and corrects with position and angle measurements. Q and R express assumed process and sensor uncertainty.
2. Observe
| Quantity | Where to read it | A | B | C ext. |
|---|---|---|---|---|
| True angle at t = 2 s (°) | State estimate plot | -13.78° | -13.78° | -13.78° |
| Measured angle at t = 2 s (°) | State estimate plot | -14.11° | -14.11° | -14.11° |
| Estimated angle at t = 2 s (°) | State estimate plot | -15.74° | -16.84° | -14.11° |
| |Estimated − true angle| at t = 2 s (°) | State estimate plot | 1.95° | 3.05° | 0.32° |
| Peak angle (°) | Measured response | 18.43° | 18.43° | 18.43° |
Values computed by DC motor and cart-pole engine 1.5.0 at the settings above. A replay readout can differ in the last digit if the slider is not exactly at the stated time; values read from a plot are approximate.
3. Explain
Run B assumes noisier sensors. After the nudge, does its estimate follow the true angle more or less closely?
Less closely. At t = 2 s the true angle is -13.78° and run B estimates -16.84°, an error of 3.05°; run A's error is 1.95°. A larger R tells the filter to trust its model prediction more and the measurement less, so the estimate reacts more slowly to the nudge.
Why are the peak angle and the cart motion identical in both runs?
In this experiment the controller uses the true state; the filter's estimate is only displayed. The peak angle is 18.43° in both runs. Feeding the estimate back to the controller is the next experiment, LQG.
Extension (optional)
Lower the assumed sensor variance to 0.0001. Does the estimate track the nudge more closely, and what does it follow instead of the model?
Yes: at 2 s its error is 0.32°, against 1.95° in run A. With a small R the filter follows the noisy measurement (-14.11° at 2 s) more closely, so the estimate also carries more of the sensor noise.