UAT 305 Autopilot and Control Technology
Worksheet 2 Nested loops in SITL
Objective
Observe the angle and rate loops in logs and the effect of gain and acceleration limits
Equipment and materials
- ArduPilot SITL and a GCS
- Log viewer
- Python and the module 2 example code
- The training drone's mass, arm length and maximum-thrust data from the manufacturer or supplied by the lecturer
Safety
- Simulation only; no real flights
- Never use trial values on a real drone without review
Steps
- In class: log step tilt commands in Stabilize or AltHold
- Self-study: compare desired and actual values of both loops in RATE and ATT and plot them
- In class: try three ATC_ANG_RLL_P values in range and compare with Example 1
- In class: try the documented ATC_ACC_R_MAX presets and compare rotation times with Example 2
- Self-study: take the mass, arm length and maximum thrust from motor and propeller data and compute headroom and angular acceleration with Example 3
- Self-study: restore all defaults and record conclusions
Record of results
| ATC_ANG_RLL_P value | Rise time (s) | Overshoot (%) | Settling time (s) | Model result |
|---|---|---|---|---|
| ATC_ACC_R_MAX (deg/s²) | Computed time (s) | Peak rate (deg/s) | Time measured from log (s) |
|---|---|---|---|
| Quantity | Value used or obtained | Unit | Source |
|---|---|---|---|
Questions
From Table 1, explain why raising ATC_ANG_RLL_P makes the rise faster but the overshoot larger, and how the SITL results match or differ from the model.
If a drone responds slowly, should you raise the gain or check ATC_ACC_R_MAX first? Use Table 2 to explain.
At what percentage of maximum thrust does your training drone hover? If payload made it hover at 80%, how would the maximum angular acceleration change?
From Table 3, what horizontal acceleration does a 30° tilt (the ATC_ANGLE_MAX default) give, and why does this matter to the position loop?
Check before you hand in
What to hand in
- Plots of both loops
- Table of gain and acceleration results
- Recommended values for the training drone
- Table of the training drone's thrust headroom and accelerations