UAT 206 Fundamentals of Control and Autopilot Systems
Worksheet 3 Altitude PID in simulation
Objective
Explore the effect of P, I, D, climb-rate limits and derivative filtering, and link them to real autopilot parameters
Equipment and materials
- Python and the module 3 example code
- PX4 or ArduPilot documentation
Safety
- Simulation and desk work only; no real flights
Steps
- Run Example 1, changing KP, KI and KD one at a time; tabulate overshoot and settling time
- Use Example 3, switching rate_limit and stop_i, and compare a 2 m/s climb-rate limit with and without stopping I against no limit
- Use Example 4, changing KD and KI together, and see whether overshoot keeps falling
- Use Example 2 with N from 5 to 20 and watch the D-term peak
- Identify the rate loop's P, I, D and filter parameters in the PX4 or ArduPilot docs
- Write the tuning order you will use in SITL in module 5
Record of results
| Case | KP | KI | KD | Overshoot (m) | Time to stay within ±0.2 m (s) |
|---|---|---|---|---|---|
| Case | Setting | Result | Unit |
|---|---|---|---|
| Term | PX4 parameter | ArduPilot parameter | What it does |
|---|---|---|---|
Questions
From Table 1, which change cut overshoot the most? Why does removing I almost remove overshoot in this model, and should you remove I on a real drone? Also, why does KD 3.0 give more overshoot than KD 2.0 even though D damps oscillation?
With a 2 m/s climb-rate limit but I still accumulating while limited, the result is worse than no limit at all. Why?
Why does a larger N give a higher D-term peak, and why does computing D from the measurement fix the problem at its source?
A friend gives standard-form gains K = 2 and Ti = 4 s. What Ki do you enter in parallel form, and why must you know which form the autopilot uses before borrowing gains?
Write the tuning order you will use in SITL in module 5, with reasons.
Check before you hand in
What to hand in
- Results table against gains
- Plots of climb-rate limit and D-term peaks
- Rate-loop parameter table
- Tuning order