UAT 305 Autopilot and Control Technology
Worksheet 3 Reading EKF health
Objective
Understand the effect of Q and R and read EKF test ratios from logs to judge readiness to fly
Equipment and materials
- Python and the module 3 example code
- ArduPilot SITL
- Log viewer
Safety
- Simulation only; no real flights
Steps
- In class: change Q and R in Example 1 and see which sensor the filter trusts more
- Self-study: plot at least three Q and R settings
- In class: open a SITL log and track SV, SP, SH and SM of XKF4
- Self-study: simulate a GPS glitch in SITL and see when SP exceeds 1 and what the EKF does
- Self-study: compute the largest accepted innovation with Example 2 from the log variances
- Self-study: write an EKF health guide for the field team
Record of results
| Set | Q (diag) | R (m²) | Kalman filter RMS (m) | Which sensor is trusted more |
|---|---|---|---|---|
| Time span (s) | SV | SP | SH | SM | What the EKF did |
|---|---|---|---|---|---|
Questions
From Table 1, how does the error change when the barometer's R is made much smaller, and why is setting R smaller than reality a bad idea?
In the GPS-glitch part of the log, when does SP exceed 1? Does the EKF use or reject the position data then, and what happens if it rejects it for long?
If the position innovation variance in the log is 2.25 m² and the gate is 500, what is the largest accepted innovation, and what does SP = 0.6 mean?
Why is widening EK3_POS_I_GATE to make warnings disappear not a fix?
Check before you hand in
What to hand in
- Q and R comparison plots
- XKF4 plots for normal and glitch periods
- One-page EKF health guide