Discrete Time PID Controller for DPEK
This controller is based on the “ideal” PID, which in Laplace form is written
KI
G (s) = K P + + s KD
s
Discrete approximation by numerical integration is used for the integral and derivative terms. The
derivative term uses backwards Euler approximation which leads to the substitution
z −1
s←
Tz
The integral term uses trapezoidal approximation, with the substitution
2 z −1
s←
T z +1
The z-transform of the equivalent PID controller becomes
T z +1 z −1
G( z) = K P + KI + KD
2 z −1 Tz
Re-arranging to express each terem as a power of z:
2Tz ( z − 1) G ( z ) = K P 2Tz ( z − 1) + K I T 2 z ( z + 1) + K D 2( z − 1) 2
(2Tz 2 − 2Tz ) G ( z ) = z 2 (2TK P + T 2 K I + 2 K D )
+ z (−2TK P + T 2 K I − 4 K D ) + 2 K D
The controller gains are re-defined by:
′
KP = KP
′ T
KI = KI
2
′ 1
KD = KD
T
Inserting these into the controller equation gives
′ ′ ′
(2Tz 2 − 2Tz ) G ( z ) = z 2 (2TK P + 2TK I + 2TK D )
′ ′ ′ ′
+ z (−2TK P + 2TK I − 4TK D ) + 2TK D
A common factor of 2T can be removed and the equation re-arranged to find the transfer function
b0 z 2 + b1 z + b2
G( z) =
z2 − z
where…
′ ′ ′
b0 = K P + K I + K D
′ ′ ′
b1 = − K P + K I − 2 K D
′
b2 = K D