
In systems where precise positioning accuracy is required, it is often necessary to position within one encoder count. The Proportional gain is not normally able to achieve this because a very small following error will only produce a small demand for the amplifier which may not be enough to overcome mechanical friction (this is particularly so for current controlled systems). This error can be overcome by applying some integral gain. The integral gain, KINT, works by accumulating following error over time to produce a demand/command sufficient to move the motor into the zero following error position. KINT can therefore also overcome errors caused by gravitational effects, such as vertically moving linear tables, where with current controlled drives a
A.1.2 Position loop
The position loop uses a Proportional, Integral, Derivative, Velocity Feedback, Velocity
The PIDVFA algorithm is as follows:
| (∆e) |
| V |
| |||
Command = KP.e + KD. |
| − KV | v | + KF | + KI.Σe + KA.A | ||
(∆τ) | 16 | 16 | |||||
where: | Proportional position loop gain |
|
|
| |||
KP |
|
|
| ||||
KD | Derivative position loop gain |
|
|
| |||
KV | Velocity feedback gain |
|
|
| |||
KF | Velocity feed forward gain |
|
|
| |||
KI | Integral gain |
|
|
| |||
KA | Acceleration feed forward gain |
|
|
|
eFollowing error (quad counts)
τServo update period (sample time)
vActual axis velocity (quad counts/sample time)
VDemand axis velocity (quad counts/sample time)
ADemand axis acceleration (quad counts/sample time2)
Tuning the position loop involves selecting values for some or all of the terms KP, KD, KI, KV, KF and KA to provide the best performance for a particular motor/encoder combination and load inertia. In view of the diversity of applications, these values all default to zero.