Proportional, integral, derivative (PID) position servo-loop tuning can be daunting. However, one simple technique works well for most systems.
Chuck Lewin • Founder and CEO | Performance Motion Devices Inc.
The first installment of this two-part series detailed a simple technique called step-response tuning that helps identify good PID-gain settings in motor-positioning applications. This manual tuning method uses repeated instantaneous ‘step’ moves to determine whether the system is underdamped, critically damped, or overdamped. Repeated iterations can identify optimal PID loop settings.
The step-response tuning session should ideally yield PID gain settings that provide smooth, quiet, and accurate position control. Now, let’s consider some methods to further improve system performance.

Verifying PID settings with real trajectory profiles
Instantaneous step profiles simplify analyzing the servo loop behavior, but they almost never represent the profiles that the controller machine will use in the actual production application. On the contrary, as much as possible, the actual profiles should try to avoid instantaneous changes of position (or velocity, or even acceleration) to minimize resonant vibration being injected into the machine mechanics.
Whether trapezoidal, S-curve, or some other trajectory profile shape, confirm the stability of the final selection of PID loop settings with the actual trajectories the machine will see.

Acceleration setting — If the current command to the amplifier reaches 100% of the programmed current limit the motor actual position will rapidly fall behind the commanded position leading to an excessive position error value. Related to this, high accelerations may exceed the current output capacity of the power supply being used, potentially for a drop in the supply voltage. The remedy for both conditions is to lower the trajectory acceleration.
Deceleration setting — Similar phenomena can occur during deceleration. The amplifier command can saturate with a negative value and depending on the design of the power supply the supply voltage can increase to a dangerous level. The later occurs when the motor acts as a generator. Many controllers provide a feature called shunt regulation to address this. Shunt regulation uses a special circuit that ‘shunts’ current through a resistor to absorb the excessive supply voltage.

Maximum velocity setting — With motor-rpm increases come ever-higher induced voltage opposing the drive voltage. Called back electromotive force or EMF, this limits the top speed at which a given motor driven at a given voltage can rotate. Trajectories approaching or exceeding this top speed won’t keep up with the commanded position, so excessive position error will occur. The remedy is to lower the trajectory velocity or change the system with increased supply voltage or choosing motors with lower back EMF per rpm.
Acceleration and velocity feedforward
Feedforward techniques improve real-world servo-controller performance — especially if positioning accuracy during the move is important (as in machine tools, 3D printing, and tracking applications). Feedforward has no effect on system stability and so is a kind of free pass for boosting axis performance.

Frequency-based motion analysis tools and filters
The step-by-step tuning process represents a common and straightforward approach to tuning PID loops. But there are more quantitative approaches — particularly for verifying the behavior of a specific position loop controller and load. Many controls vendors provide frequency-based tools such as Bode plots to support these approaches.

Bode plots can help characterize mechanical systems and determine control-loop characteristics such as bandwidth and phase margin. One Bode-plot output may be the identification of natural resonances in the mechanical system. While a properly tuned PID can help reduce the impact of this, active filtering within the servo loop, often in the form of biquad filters are the compensating mechanism of choice. Many controllers provide general purpose biquad filters inside the position loop.

A treatise on characterizing system mechanics and compensating for resonances is beyond the scope of this article but good references abound — and include George Ellis’ Control System Design Guide.
Position-loop gain scheduling
Again, for many machines it’s unlikely one set of PID gain parameters will be optimal for all design functions. Some modes may need very stable and smooth operation; others may need endpoint accuracy; and yet others may need high-speed strokes for quick point-to-point transfer.
To handle different operating priorities even within the same mechanism a technique called gain scheduling may be used. While ‘gain scheduling’ has specific connotations in the field of nonlinear system control, here it means activating different sets of gain parameters while the machine is operating in different modes or carrying different loads.
Gain scheduling should be used in moderation but usually it’s useful to have more aggressive servo gains for moving and then less aggressive ‘at settle’ gains for holding the axis in place. Many controllers have a software-accessible ‘in motion’ flag to automatically triggered gain-value changes when the axis is moving ir arriving at specific positions, velocities, accelerations, or time.

Performance Motion Devices | www.pmdcorp.com

Leave a Reply
You must be logged in to post a comment.