PID Controller

Figure 9.12: Xcos diagram for PID controller
Image pid_dist

The PID Controller in continuous time is given by

$\displaystyle u(t) = K \left[e(t) + \frac 1{\tau_i}\int_0^t e(t)dt + \tau_d \frac{de(t)}{dt}\right]$ (9.15)

On taking Laplace Transform, we obtain

$\displaystyle u(s) = K \left[1 + \frac 1{\tau_i s} + \tau_d s\right]e(s)$ (9.16)

By mapping equation 9.16 to discrete time interval by using the Trapezoidal Approximation for integral mode and Backward Difference Approximation for derivative mode, we get

$\displaystyle u(n) = K \left[1 + \frac{T_s}{\tau_i} \frac{z}{z-1} + \frac{\tau_d}{T_s} \frac{z-1}{z}\right]e(n)$ (9.17)

On cross multiplication, we obtain

$\displaystyle (z^2-z)\times u(n) = K \left[(z^2-z) + \frac{T_s}{\tau_i} (z^2) + \frac{\tau_d}{T_s} (z-1)^2\right]e(n)$ (9.18)

We divide by z, and using the shifting theorem, we obtain

$\displaystyle u(n) - u(n-1) = K \left[e(n) - e(n-1) + \frac{T_s}{\tau_i} e(n) + \frac{\tau_d}{T_s}\left\{e(n) - 2e(n-1) + e(n-1)\right\}\right]$ (9.19)

The PID Controller is usually written as

$\displaystyle u(n) = u(n-1) + s_0 e(n) + s_1 e(n-1) + s_2 e(n-2)$ (9.20)

where,

$\displaystyle s_0$ $\displaystyle = K\left(1+ \frac{T_s}{\tau_i} + \frac{\tau_d}{T_s}\right)$ (9.21)
$\displaystyle s_1$ $\displaystyle =K\left[-1-2\frac{\tau_d}{T_s}\right]$ (9.22)
$\displaystyle s_2$ $\displaystyle =K\left[\frac{\tau_d}{T_s}\right]$ (9.23)

rokade 2017-04-23