Tuning Steering Rate

This page decribes how a Rover’s Steering Rate controller (aka turn rate controller) can be tuned. This is the lowest level controller but often the most important in order to achieve good steering control.


Steering Rate PID Tuning

The Steering Rate controller attempts to achieve the desired turn rate (set by the pilot or autopilot) using a PID controller. All modes except Hold and Manual use this controller.

The FF, P, I and D gains for this controller are held in the ATC_STR_RAT_FF, ATC_STR_RAT_P, ATC_STR_RAT_I and ATC_STR_RAT_D parameters respectively.

Recommended steps for tuning this controller are:

  • connect the ground station to the vehicle using a telemetry radio
  • drive the vehicle in a mode that generates significant turns. This could be Acro mode (first set the ACRO_TURN_RATE parameter), Steering or Auto. If using the higher level modes (Steering, Auto, etc) note that the higher level L1 controller may obscure whether the steering rate controller is well tuned.
  • tune the FF gain first. This gain converts the desired rotation rate directly into a steering servo or motor output. If the vehicle’s turn rate response is sluggish then this parameter should be increased. If the vehicle is constantly overshooting its desired turn rate then this parameter should be reduced.
  • the P gain corrects for short-term error. It can often be left at zero or another very low value if the FF value is set well. If set too high the rotation rate may oscillate. This P gain should always be lower than the FF gain.
  • the I gain corrects for long-term error. If the vehicle never achieves the desired turn rate, then this parameter should be increased. If the vehicle’s turn rate slowly oscillates then this parameter should be reduced.
  • the D gain is meant to stablize the output by fighting against short-term changes in turn rate. This gain can normally be left at zero.

Real-Time viewing of Steering PIDs

The desired vs actual (aka achieved) turn rate, along with the individual contributions to the steering output from the FF, P, I and D components can be seen in real-time by doing the following:

  • connect the Mission Planner to the vehicle’s autopilot using a telemetry radio
  • set the GCS_PID_MASK to 1 (Steering)
  • on the Flight Data screen, check the “Tuning” checkbox (bottom middle) and select “pidachieved”, “piddesired”
  • change the desired turn rate of the vehicle (perhaps using the transmitter’s steering stick) and see how well the “achieved” follows the “desired”