UAT 305 Autopilot and Control Technology

Worksheet 2 Nested loops in SITL

Lab 3 hAssesses CLO1, CLO3

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

  1. In class: log step tilt commands in Stabilize or AltHold
  2. Self-study: compare desired and actual values of both loops in RATE and ATT and plot them
  3. In class: try three ATC_ANG_RLL_P values in range and compare with Example 1
  4. In class: try the documented ATC_ACC_R_MAX presets and compare rotation times with Example 2
  5. Self-study: take the mass, arm length and maximum thrust from motor and propeller data and compute headroom and angular acceleration with Example 3
  6. Self-study: restore all defaults and record conclusions

Record of results

Table 1 Effect of ATC_ANG_RLL_P from SITL logs compared with the Example 1 model
ATC_ANG_RLL_P valueRise time (s)Overshoot (%)Settling time (s)Model result
Table 2 Time to tilt 20° by ATC_ACC_R_MAX
ATC_ACC_R_MAX (deg/s²)Computed time (s)Peak rate (deg/s)Time measured from log (s)
Table 3 Thrust headroom and accelerations of the training drone
QuantityValue used or obtainedUnitSource

Questions

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

  2. If a drone responds slowly, should you raise the gain or check ATC_ACC_R_MAX first? Use Table 2 to explain.

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

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

CLO1 Analyse autopilot cascade control structures. CLO3 Tune and verify control performance from logs. (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