diff --git a/autotune/README.md b/autotune/README.md index 6f767c6..640ca7c 100644 --- a/autotune/README.md +++ b/autotune/README.md @@ -29,3 +29,90 @@ python3 autotune.py  +# Tuning Worflow + +## Fixed-Wing Rate Tuning + +**Prerequisites**: + +- Requires valid airspeed measurement on vehicle +- Correctly set FW_AIRSPD_TRIM + +### Flight Maneuvers + +Using default PX4 gains. Perform these maneuvers separately for each axis: roll, pitch, and yaw. + +1. Requires valid airspeed measurement, and a correctly set FW_AIRSPD_TRIM. +2. Fly in stabilized mode and start from level flight. +3. Apply a manual sine chirp input (sine wave with increasing frequency) on the selected axis. Avoid any other control inputs simultaneously. +4. For pitch and yaw: The amplitude of the input should not be too high, but should be enough to overcome noise. +5. Repeat the maneuver a few times if necessary to capture good data. + +### Using the Tool + +#### Load the flight log and select the relevant tuning loop (roll, pitch, or yaw): + + + +#### Window selection: + +1. Select the portion of the log where the maneuver occurred. +2. Ensure the window starts from level flight and covers the full maneuver. +3. (Experimental) Use the coherence plot to check whether your input-output data have a strong enough linear relationship at the desired frequencies. For fixed-wings: \ + i. We are interested in frequencies between 0.5-10Hz. \ + ii. Values > 0.6 are sufficient. \ + iii. If the coherence function is oscillating dramatically, the identified model may be unreliable at those frequencies. +4. Once you have identified the window, load the selection into the tool. + +
|
+ Good window selection + + Starts from level flight and covers the full maneuver. Coherence is sufficient. + |
+
+ Bad window selection + + Does not isolate the maneuver. Coherence is insufficient. + |
+