UAT 206 Fundamentals of Control and Autopilot Systems
Worksheet 5 Tuning and testing in SITL
Objective
Compare two tuning sets from real simulator logs and measure path-tracking error with wind
Equipment and materials
- PX4 (Gazebo) or ArduPilot SITL
- Flight Review or UAV Log Viewer
- Python and the module 5 example code
- Lab L02 instructions
Safety
- Simulation only; no real flights
Steps
- Start SITL and record firmware version, simulator version and parameter file
- Command a roll step in hover and export rate data from the log
- Apply the metrics function from Example 1 to both tuning sets
- Fly a straight-line mission with and without wind per L02 and compute errors with Example 2
- Write a short report comparing tunings with plots, parameter files and simulation limits
Record of results
| Tuning set | Parameter file | Rise time Tr (ms) | Overshoot Mp (%) | Settling time Ts (s) |
|---|---|---|---|---|
| Condition | Wind setting | RMS (m) | Maximum (m) | Mean (m) |
|---|---|---|---|---|
Questions
Which tuning set would you choose? Justify it with all three metrics, not just one.
How close are the measured overshoot and settling time to the second-order formulas, and why should you not judge by looking at the plot alone?
In the crosswind, the mean error is almost as large as the RMS. What does this tell you, and what would you change next?
Why can gains that work well in SITL not go straight onto the real drone?
Check before you hand in
What to hand in
- Metrics for both tuning sets
- Tracking error table
- Short report with parameter files