Skip to main content

Direct programming of a third-order controller

Short answer

Divide by 10z^3 to get G(z) = (0.6z^-1+0.7z^-2)/(1-0.6z^-1+0.7z^-2+0.5z^-3). Direct programming uses two input delays and three output delays with feedforward gains 0.6, 0.7 and feedback gains +0.6, -0.7, -0.5. Difference equation: y(k)=0.6y(k-1)-0.7y(k-2)-0.5y(k-3)+0.6x(k-1)+0.7x(k-2).

Realize the given digital controller by direct programming: Y(z)/X(z)=(6z²+7z)/(10z³-6z²+7z+5).

Direct programming realizes the difference equation exactly as written. It uses one chain of delays for past inputs and another for past outputs.

Step 1: Write in powers of z−1z^{-1}

Divide the numerator and denominator by 10z310z^3:

Y(z)X(z)=0.6z−1+0.7z−21−0.6z−1+0.7z−2+0.5z−3\frac{Y(z)}{X(z)} = \frac{0.6z^{-1} + 0.7z^{-2}}{1 - 0.6z^{-1} + 0.7z^{-2} + 0.5z^{-3}}

Step 2: Difference equation

y(k)=0.6y(k−1)−0.7y(k−2)−0.5y(k−3)+0.6x(k−1)+0.7x(k−2)y(k) = 0.6y(k-1) - 0.7y(k-2) - 0.5y(k-3) + 0.6x(k-1) + 0.7x(k-2)

Step 3: Block diagram (direct programming)

x(k)
  o              (S)--------------o--> y(k)
  |               ^               |
[z^-1]            |             [z^-1]
  | x(k-1)        |               | y(k-1)
  o--[0.6]------>(S)<[0.6]--------o
  |               ^               |
[z^-1]            |             [z^-1]
  | x(k-2)        |               | y(k-2)
  o--[0.7]------>(S)<[-0.7]-------o
                  ^               |
                  |             [z^-1]
                  |               | y(k-3)
                  +<[-0.5]--------o
  • The left delay chain stores x(k−1)x(k-1) and x(k−2)x(k-2). The right chain stores y(k−1)y(k-1), y(k−2)y(k-2) and y(k−3)y(k-3).
  • Feed-forward gains are 0.6 and 0.7. Feedback gains are +0.6+0.6, −0.7-0.7 and −0.5-0.5 (the negatives of the denominator coefficients).
  • There is no direct path from x(k)x(k) to y(k)y(k), because the z0z^0 term of the numerator is zero.
  • Direct programming needs m+n=2+3=5m + n = 2 + 3 = 5 delays. Standard programming would need only 3.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Control System chapter 4 questions →