Limit Cycle Detection¶
ArduPilot provides a limit cycle detection feature to help reduce or eliminate oscillations in the control loops due to excessive tuning gains. The algorithm monitors the actuator slew rates, and if above limits set by the _SMAX parameters, will lower the control loop gains in an attempt to stop the oscillations. These parameters are:
ATC_RAT_RLL_SMAX for roll
ATC_RAT_PIT_SMAX for pitch
ATC_RAT_YAW_SMAX for yaw
PSC_ACCZ_SMAX for position control
The limit should be set to no more than 25% of the actuator’s maximum slew rate to allow for load effects.
Currently the defaults for these are “0”, disabling them. Setting them to a value can be done experimentally if oscillations are present. Setting them too low will result in sluggish responses.
When these values are exceeded, the appropriate PID Dmod log data ( PIDR.Dmod, PIQP.DMod, etc.)will show values spiking below 1 in the plots, indicating lowered gains. An ideal tune, will have this occur very occasionally during operation, but not frequently. By examining the logged PIDx.SRate messages one can see the actual slew rates being used and set these _ SMAX values appropriately to be at or slightly above the general peak slew rates.
an example for Plane pitch: