UAT 305 Autopilot and Control Technology

Worksheet 3 Reading EKF health

Lab 3 hAssesses CLO2

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

  1. In class: change Q and R in Example 1 and see which sensor the filter trusts more
  2. Self-study: plot at least three Q and R settings
  3. In class: open a SITL log and track SV, SP, SH and SM of XKF4
  4. Self-study: simulate a GPS glitch in SITL and see when SP exceeds 1 and what the EKF does
  5. Self-study: compute the largest accepted innovation with Example 2 from the log variances
  6. Self-study: write an EKF health guide for the field team

Record of results

Table 1 Effect of Q and R on height error (Example 1)
SetQ (diag)R (m²)Kalman filter RMS (m)Which sensor is trusted more
Table 2 XKF4 test ratios in normal and GPS-glitch periods in SITL
Time span (s)SVSPSHSMWhat the EKF did
Part 3 Largest accepted innovation calculation and EKF health guide for the field team

Questions

  1. 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?

  2. 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?

  3. 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?

  4. 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

CLO2 Estimate state and diagnose the EKF. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack