Hello, VideoRay

How to Tune

To access tuning, go to Mission View and press Shift +Alt+M. The tuning screen will display on the map grid. To hide the tuning utility, press Control+Alt+M again.

Select the controller you wish to tune from the Autopilot Tuning Console at the top of the page at the bottom of the screen and click READ. The utility will read the current parameters for that controller from the openCMD configuration file and display them in the editable fields on the page.

The tuning utility displays a strip chart with real-time status of the commanded state and the current state of the selected controller as well as the real-time status of the resulting actuator effort.

The Proportional (P) gain, Integral (I) gain, and Derivative (D) gains are on the bottom of the page. While volumes of academic material have been written about these parameters in classical controllers, some basic concepts usually help understand the functions of each parameter and how they affect the controller.

  • Proportional Gain: This is the weighting applied to the error between the commanded state and the current state of the controller. The controller multiplies the error by the proportional gain thus big errors get a big response, and little errors get a little response – linearly. It is easy to see that the proportional gain is what dictates the responsiveness of the controller and how the controller reacts to errors. The proportional gain should be the first parameter adjusted when tuning the system. We usually recommend using the proportional gain to get the system stable with a slight (10%-20%) overshoot. Be careful with the proportional gain though, a little can go a long way. Also be mindful of deadbands on actuators. With small errors, the proportional gain may be commanding a response that is not achievable by the actuators.
  • Integral Gain: This is the weighting applied to the integrated amount of time and magnitude of the error between the commanded state and the current state. This gain value multiplies the accumulated error. The integral gain is most often used to adjust steady-state errors and tracking errors. Operators should adjust the integral gain only after the proportional and derivative terms have yielded a stable system. Most often, the integral gain compensates for poor long-term performance around the setpoint. Be careful with the integral term. For reasons that are beyond the scope of this article, the integral term can destabilize the controller easily.
  • Derivative Gain: This is the weighting applied the rate of change of the error between the commanded state and the current state. The controller multiplies the rate of change in the current state from the commanded state by this gain. Faster changes will result in higher derivative terms. The derivative term is implemented to produce a braking component such that term resists change. This can be implemented to dampen the control system and to control offshoot. With high-inertia, low-actuation systems, such as work class ROVs, the derivative term is often a significant term on each controller.

You want the start with the controller output overshooting the commanded value and oscillating slightly through a long settling time about the setpoint. When you're happy with 'P', you should move on to the derivative gain to iron out the oscillations and control the overshoot. Finally, adjust the integral gain to compensate for steady-state tracking performance.

The proportional term added to the integral term and the derivative term compose the final control output, in % effort (-100% to 100%). The controller configuration also provides an output bias term that adds a constant value to the output and an output gain term that scales the output. The output gain is most often used to invert the controller.

We find the best control setup makes intuitive sense based on your knowledge of what it takes to fly the vehicle. You should always pay attention to the actuator efforts when setting up the controller as well. Be careful not to run the actuators in saturation or with heavy oscillations.

Article ID: 
155