Skip to main content

Pulse transfer function of digital PID controller

Short answer

The digital PID pulse transfer function is G_D(z) = K_P + K_I/(1−z^{-1}) + K_D(1−z^{-1}), where K_P = K − KT/(2T_i), K_I = KT/T_i, K_D = KT_d/T. In single fraction, G_D(z) = [(K_P+K_I+K_D) − (K_P+2K_D)z^{-1} + K_D z^{-2}] / (1−z^{-1}).

Derive the pulse transfer function of digital PID controller.

A digital PID controller is the discrete-time version of the analog PID law. We obtain it by replacing the integral with a numerical sum (trapezoidal rule) and the derivative with a backward difference. Its pulse transfer function is GD(z)=U(z)/E(z)G_D(z) = U(z)/E(z).

Analog PID law

u(t)=K[e(t)+1Ti∫0te(t) dt+Tdde(t)dt]u(t) = K\left[e(t) + \frac{1}{T_i}\int_0^t e(t)\,dt + T_d\frac{de(t)}{dt}\right]

Here KK is the proportional gain, TiT_i the integral time and TdT_d the derivative time.

Discretization (sampling period TT)

  • Integral, trapezoidal rule: ∫0kTe dt≈T∑h=1ke((h−1)T)+e(hT)2\displaystyle\int_0^{kT} e\,dt \approx T\sum_{h=1}^{k}\frac{e((h-1)T)+e(hT)}{2}
  • Derivative, backward difference: dedt∣kT≈e(kT)−e((k−1)T)T\displaystyle\frac{de}{dt}\Big|_{kT} \approx \frac{e(kT)-e((k-1)T)}{T}
u(kT)=K{e(kT)+TTi∑h=1ke((h−1)T)+e(hT)2+TdT[e(kT)−e((k−1)T)]}u(kT) = K\left\{e(kT) + \frac{T}{T_i}\sum_{h=1}^{k}\frac{e((h-1)T)+e(hT)}{2} + \frac{T_d}{T}\big[e(kT)-e((k-1)T)\big]\right\}

Taking the z-transform

Let f(h)=12[e((h−1)T)+e(hT)]f(h) = \tfrac12[e((h-1)T)+e(hT)], so F(z)=12(1+z−1)E(z)F(z) = \tfrac12(1+z^{-1})E(z). A running sum transforms as Z[∑h=0kf(h)]=F(z)/(1−z−1)\mathcal{Z}\left[\sum_{h=0}^{k} f(h)\right] = F(z)/(1-z^{-1}). Following Ogata, we take f(0)=0f(0) = 0 (the trapezoidal sum starts at h=1h = 1), so the sum from h=1h = 1 and the sum from h=0h = 0 have the same transform. Therefore:

Z[∑h=1ke(h−1)+e(h)2]=1+z−12(1−z−1)E(z)Z[e(k)−e(k−1)]=(1−z−1)E(z)\begin{aligned} \mathcal{Z}\left[\sum_{h=1}^{k}\frac{e(h-1)+e(h)}{2}\right] &= \frac{1+z^{-1}}{2(1-z^{-1})}E(z) \\ \mathcal{Z}\big[e(k)-e(k-1)\big] &= (1-z^{-1})E(z) \end{aligned} U(z)=K[1+T2Ti⋅1+z−11−z−1+TdT(1−z−1)]E(z)U(z) = K\left[1 + \frac{T}{2T_i}\cdot\frac{1+z^{-1}}{1-z^{-1}} + \frac{T_d}{T}(1-z^{-1})\right]E(z)

Rearranging into the standard form

Use 1+z−12(1−z−1)=11−z−1−12\dfrac{1+z^{-1}}{2(1-z^{-1})} = \dfrac{1}{1-z^{-1}} - \dfrac{1}{2}:

U(z)=[K−KT2Ti+KTTi⋅11−z−1+KTdT(1−z−1)]E(z)GD(z)=U(z)E(z)=KP+KI1−z−1+KD(1−z−1)\begin{aligned} U(z) &= \left[K - \frac{KT}{2T_i} + \frac{KT}{T_i}\cdot\frac{1}{1-z^{-1}} + \frac{KT_d}{T}(1-z^{-1})\right]E(z) \\ G_D(z) &= \frac{U(z)}{E(z)} = K_P + \frac{K_I}{1-z^{-1}} + K_D(1-z^{-1}) \end{aligned}

where

GainExpressionName
KPK_PK−KT2Ti=K−KI2K - \dfrac{KT}{2T_i} = K - \dfrac{K_I}{2}proportional gain
KIK_IKTTi\dfrac{KT}{T_i}integral gain
KDK_DKTdT\dfrac{KT_d}{T}derivative gain

Single-fraction form

GD(z)=(KP+KI+KD)−(KP+2KD)z−1+KDz−21−z−1G_D(z) = \frac{(K_P+K_I+K_D) - (K_P+2K_D)z^{-1} + K_D z^{-2}}{1-z^{-1}}

Remarks

  • The pole at z=1z = 1 comes from the integral action. It makes the steady-state error to a step input zero.
  • KD(1−z−1)K_D(1-z^{-1}) adds a zero and gives phase lead (anticipation).
  • Setting KD=0K_D = 0 gives the PI controller KP+KI/(1−z−1)K_P + K_I/(1-z^{-1}). Setting KI=0K_I = 0 gives the PD controller KP+KD(1−z−1)K_P + K_D(1-z^{-1}).

Example: For KP=1K_P = 1, KI=0.2K_I = 0.2, KD=0.2K_D = 0.2: GD(z)=(1.4−1.4z−1+0.2z−2)/(1−z−1)G_D(z) = (1.4 - 1.4z^{-1} + 0.2z^{-2})/(1-z^{-1}).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Control System chapter 3 questions →