# Autotuning algorithm

Hi, just curious what approach the autotune sequence is taking to develop the gains presented in the gain calculator. I suppose there has to be an algorithm it is using to determine whether the gain combinations are stable. Is the aggressive/conservative slider based on a linear interpolation between overshoot oscillation limits?

The general technique is called pole placement

The system identification part calculates the gain, damping factor and natural frequency of the open loop system. Then we calculate what the closed loop controller gains need to be to place the poles on the negative real axis. We use the desired closed loop pole location that is determined by the slider bar and the system identification parameters. If the poles are close to the negative real axis the response will not over shoot.

There is no interpolation. Everything is calculated using formulas. The more negative or farther to the left the closed loop poles are placed the faster the response. When you raise the slider bar you are moving the closed loop poles farther to the left or more negative and the result is faster response. Eventually non-linear things like feedback resolution will limit how high the controller gains can be.

Peter,

Thanks for the reply. So basically, RMCTools assumes a form for the system model and then develops a transfer function which is used in combination with the controller transfer function to calculate the poles based on the chosen gain parameters. Based on the overall transfer function, you can locate the poles more or less to the left in the s-plane (i.e. more or less negative) by selecting different gain combinations which results in more or less aggressive response.

I assume that the transfer function for the controller is specified. Is there a basic assumed system transfer function?

Actually we try 5 different models for position control systems and use the one that fits the best. If the model is NOT  right the auto tuning will not work. This is much different from most auto tune systems that try one one model or make you select the model ahead of time. How is average Joe going to know what model to select? The auto tuning software must select it.

We develop a closed loop transfer function which is a combination of the PID and the system’s open loop transfer function.

Yes but we try to put the poles on the negative real axis so the response doesn’t overshoot. Imaginary poles will over shoot.

No, like I said we try many and see which one fits the best. Once the system transfer function is selected then the PI, PID or PID with second derivative is chosen.