Industrial Technology - Linked-in Industrial Technology - Twitter Industrial Technology - News Feed
Latest Issue
Diary and Events

Advanced Engineering 2021

NEC Birmingham(B40 1NT)

03/11/2021 - 04/11/2021

Join us in our 12th and most important edition to date, as we invite engineers and management from all (more)

A practical approach to servo loop tuning

A practical approach to servo loop tuning

Although servo motors have an unquestionable performance capability, the final performance is mostly determined by the servo loop tuning. We ask the experts at Intellidrives for some advice.

Servo motors have the ability to create torque in a linearly predictable fashion and it makes them attractive for use in closed loop systems. Despite the wealth of theoretical material regarding closed loop systems and closed loop control, tuning a PID servo loop continues to be a bit of an art. .

The PID controller is one of the most used control algorithms in any closed loop system. The PID controller derives its name from the the components that comprise this algorithm. P, the proportional term, results in an output signal that is proportional to the process error (difference between desired parameter value – setpoint -  and actual). I, the integral term results in an output signal that is the integral (ie sum over time) of the process error. And D, the derivative term, results in an output signal that is the derivative of the process error.

In general, these three terms act independently from each other and their outputs are summed together to create a single PID output signal. Other configurations are possible as well. For example, the derivative term may act only on the feedback (output) signal, not the error signal, with the proportional term in parallel with the integral term. In motion control applications, process error is the difference between desired and actual motor positions, ie position error.

Effect of the PID terms 

Let’s take a look at a practical tuning exercise and take a closer look at the real effect of the various gains. Digital servo drive and motor with encoder feedback will be used to illustrate the effects of the various gains, as well as to provide some practical guidelines. 

One of the best ways to evaluate PID tuning, is to look at the step response of a system. In order to make sure that the system does not saturate and to avoid strong nonlinearities, small signal excitation and its response will be used. In addition to looking at the position response, torque will also be observed, as a measure of how hard we are driving. Below is a picture of the response with just a small proportional gain value. The integral and derivative gains are set to zero:

The red curve is the step reference. The yellow line is position feedback. The blue and green curves are reference and actual current respectively (which are proportional to torque). As seen, the response is very sluggish. After increasing the proportional gain a few times, we can get to the following result: 

This system has almost no friction and exhibits large overshoot, even with small gains. If friction is added to the system, damping characteristics will improve, but larger gains will be required. Addition of the friction will introduce small steady state error, not allowing the system to reach final target position.

This should always be the first step in servo loop tuning. Start with just proportional gain and look at the response. If the system has a tendency to overshoot quickly, even with small gain, likely the friction is low. If more gain is required to get any response, and the response is slow, the system has considerable friction. This determines the next step. 

Frictional and low friction systems

In a low friction system, the response has a tendency to become unstable quickly, even with low gains. To remedy this instability, derivative action is required. Because the D term differentiates the position error which changes fast in case of instability it helps suppress the large changes by creating an opposing torque. In the system above, with the same proportional gain and with some derivative gain following response is obtained.

Large overshoot now is is eliminated. However, the overall response is also slower (meaning the time required to reach the target). 

So by just using a proportional term, a stable response can be obtained, however the final target is not reached. With added integral term, the longer the error exists, the larger the integral will become, resulting in a correction torque. In the system above, with the same proportional gain, and with added integral gain, position error (steady state error) is reduced to zero, even in the presence of friction.

Integral limit (also called anti-windup) should be used with an integral term, to avoid the integral term from becoming too large and taking too long to converge down. 

PID terms combined 

One can notice that in case of the P and D terms in a low friction system that the steady state error is nonzero. Also in case of the P and I terms in a frictional system, some overshoot is introduced. In all these cases we can add integral and derivative terms respectively. For example, after adding some derivative gain to the frictional system one obtains the following response: 

So far we have looked at the effect of each term on the response curve, in order to show how they contribute. From the response curves one can clearly see that in addition to the shape of the response, the response time is dramatically affected. 

Response curves have a few attributes that help quantify the response, including overshoot, step response time, and settling time. As all the gains are gradually increased to obtain the desired response, some additional effects may occur, including saturation, resonance and jitter. Motor and drive sizing should not only be based on the torque and speed requirements, but also on the required system response. Mechanical transmission components should also be carefully selected to avoid system resonance. Lastly the feedback resolution should not just be based on positioning resolution requirements but also on desired system response. 

Servo loop tuning is not a trivial task. By utilising a systematic approach of increasing the proper gains gradually while monitoring the response, stable behavior can be more quickly obtained. In parallel, one should also observe current and torque to determine how much power is applied.

Download pdf

Latest news about Drives and motion control systems

Additional Information
Text styles