Page 435 - Mechanical Engineers' Handbook (Volume 2)
P. 435
426 Basic Control Systems Design
(k 1)T e(t) dt Te(0) Te(t ) Te(t ) Te(t ) T
k
i
0 1 2 k i 0 e(t ) (45)
where t kT and the width of each rectangle is the sampling time T t i 1 t . The times
k
i
t are the times at which the computer updates its calculation of the control algorithm after
i
receiving an updated command signal and an updated measurement from the sensor through
the A/D interfaces. If the time T is small, then the value of the sum in (45) is close to the
value of the integral. After the control algorithm calculation is made, the calculated value
of the control signal ƒ(t ) is sent to the actuator via the output interface. This interface
k
includes a D/A converter and a hold circuit that ‘‘holds’’ or keeps the analog voltage cor-
responding to the control signal applied to the actuator until the next updated value is passed
along from the computer. The simplest digital form of PI control uses (45) for the integral
term. It is
ƒ(t ) Ke(t ) KT e(t ) (46)
k
k
I
P
k
i 0 i
This can be written in a more efficient form by noting that
) KT
k 1
ƒ(t k 1 ) Ke(t k 1 I e(t )
i
P
i 0
and subtracting this from (46) to obtain
ƒ(t ) ƒ(t k 1 ) K [e(t ) e(t k 1 )] KTe(t ) (47)
k
I
k
P
k
This form—called the incremental or velocity algorithm—is well suited for incremental
output devices such as stepper motors. Its use also avoids the problem of integrator buildup,
the condition in which the actuator saturates but the control algorithm continues to integrate
the error.
The simplest approximation to the derivative is the first-order difference approximation
de e(t ) e(t k 1 )
k
(48)
dt T
The corresponding PID approximation using the rectangular integral approximation is
ƒ(t ) Ke(t ) KT e(t ) K D [e(t ) e(t )] (49)
k
k
I
P
k
i 0 i T k k 1
The accuracy of the integral approximation can be improved by substituting a more
sophisticated algorithm, such as the following trapezoidal rule:
(k 1)T e(t) dt T 1
k
i
0 i 0 2 [e(t i 1 e(t )] (50)
The accuracy of the derivative approximation can be improved by using values of the
sampled error signal at more instants. Using the four-point central-difference method (Refs.
1 and 2), the derivative term is approximated by
de 1
[e(t ) 3e(t ) 3e(t ) e(t )]
dt 6T k k 1 k 2 k 3

