feat(mc_att_control): feedforward filtered q_d derivative on rate sp (#27255)

Add a 2nd-order critically-damped attitude reference model whose angular-velocity output is fed forward onto the rate setpoint, removing the steady-state ramp-tracking lag of the pure-P attitude law. The model uses an exact closed-form discretisation, so it is unconditionally stable.

Parameters:
- MC_REF_W_N     reference-model bandwidth [rad/s]
- MC_REF_FF      feedforward gain [0..1]; 0 disables the anticipation
- MC_REF_FF_MAX  per-axis feedforward saturation [deg/s]

The commanded yaw rate is always fed forward at unity (it is a setpoint, not a model prediction), so MC_REF_FF scales only the error-driven anticipation and MC_REF_FF=0 is the exact legacy pure-P law. Shipped disabled by default to avoid changing behaviour on existing platforms; enable per-airframe. Includes docs and the updated controller diagram.
This commit is contained in:
Gennaro Guidone
2026-06-26 10:57:48 +02:00
committed by GitHub
parent 171f0f38cf
commit 2a0e048171
9 changed files with 479 additions and 36 deletions

View File

@@ -43,7 +43,9 @@ The diagrams use the standard [PX4 notation](../contribute/notation.md) (and eac
- The attitude controller makes use of [quaternions](https://en.wikipedia.org/wiki/Quaternion).
- The controller is implemented from this [article](https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/154099/eth-7387-01.pdf).
- When tuning this controller, the only parameter of concern is the P gain.
- The attitude setpoint is first smoothed by a 2nd-order critically-damped reference model ([MC_REF_W_N](../advanced_config/parameter_reference#MC_REF_W_N)); the P-law tracks its reference attitude, and the model's reference body rate is fed forward to the rate setpoint, removing the pure-P law's steady-state tracking lag.
- The feedforward is scaled by `MC_REF_FF` (`0` disables it), clipped per axis by `MC_REF_FF_MAX`, and suppressed during autotuning.
- Higher `MC_REF_W_N` or `MC_REF_FF` tracks more aggressively but demands more peak rate; the P gain remains the main tuning parameter.
- The rate command is saturated.
### Multicopter Acceleration to Thrust and Attitude Setpoint Conversion