PID Control Equation in Z-Domain

  • Thread starter Thread starter bsodmike
  • Start date Start date
  • Tags Tags
    Control Pid
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 16K views
bsodmike
Messages
82
Reaction score
0
How does one go from the simple substitution to the end result?

[tex]\dfrac{U(z)}{E(z)}=K'_P+\dfrac{K'_ITz}{z-1}+\dfrac{K'_D(z-1)}{Tz}=\dfrac{K_Pz^2+K_Iz+K_D}{z(z-1)}[/tex]

Found the above simplification in http://www.nt.ntnu.no/users/skoge/prost/proceedings/acc04/Papers/0008_WeA02.5.pdf" in Eq 23-24.

Edit: Here's my attempt going back to first principles. In the s-domain, the laplace TF of a PID controller can be written as

[tex]G(s) = K_P+\dfrac{K_I}{s}+K_Ds[/tex]

If I were to attempt to simplify the above by considering a = Kp, b = Ki, c = Kd

[tex]a+\dfrac{b}{s}+cs = a + \dfrac{b+cs^2}{s}=\dfrac{as+b+cs^2}{s}[/tex]

Translate to the Z-domain by substituting

[tex]s = \dfrac{z-1}{Tz}[/tex]

[tex]\dfrac{a\left(\dfrac{z-1}{Tz}\right)+b+c\left(\dfrac{z-1}{Tz}\right)^2}{\dfrac{z- 1}{Tz}}=\dfrac{a\left(\dfrac{z-1}{Tz}\right)+b+c\left(\dfrac{z^2-2z+1}{T^2z^2}\right)}{\dfrac{z-1}{Tz}}[/tex]

[tex]\dfrac{a\left(\dfrac{z-1}{Tz}\right)+b+c\left(\dfrac{z^2-2z+1}{T^2z^2}\right)}{\dfrac{z-1}{Tz}} = \dfrac{a(z-1)+b(Tz)+c(\dfrac{z^2-2z+1}{Tz})}{z-1}[/tex]

Multiplying through top and bottom by 'z'

[tex]z \times \dfrac{a(z-1)+b(Tz)+c(\dfrac{z^2-2z+1}{Tz})}{z-1}=\dfrac{az(z-1)+b(Tz^2)+c(\dfrac{z^2-2z+1}{T})}{z(z-1)}[/tex]
 
Last edited by a moderator:
Physics news on Phys.org
I'm not sure what you are having problems with. Getting from (22) to (23) to (24) is just algebra.

Did you miss the fact that the constants in (23) and (24) are different? The continuous ones are K'p etc, the discrete ones are Kp etc.
 
Thanks Aleph.

Figured this much out; missed out on the primes...

Kp + (Ki T z)/(z - 1) + (Kd (z - 1))/(T z) = (Kd - 2*Kd*z - Kp*T*z + Kd*z^2 + Kp*T*z^2 + Ki*T^2*z^2)/(T*(-1 + z)*z)

Collecting z's gives: Kd/T + ((-2 Kd - Kp T) z)/T + ((Kd + Kp T + Ki T^2) z^2)/T Therefore, K_D = K_D'/T; K_I = -(K_P'T + 2 K_D')/T; K_P = (K_D' + K_P' T + K_I' T^2)/T
 
Last edited:
The continuous controller response function is a + b/s + cs

Then he substitutes s =(z-1)/(Tz)

and gets a + bTz/(z-1) + c(z-1)/(Tz)

Putting everything over z(z-1) gives

[ az(z-1) + bTz^2 + (c/T)(z-1)^2 ] / z(z-1)

The numerator is a quadratic expression in z, so this is of the form

[ Az^2 + Bz + C ] / z(z-1)

for some constants A B and C.

You were heading towards working out the exact formulas for A B and C in terms of a b c and T, but he doesn't bother to do that. He is only interested in the form of the expression, not the exact details.
 
AlephZero said:
You were heading towards working out the exact formulas for A B and C in terms of a b c and T, but he doesn't bother to do that. He is only interested in the form of the expression, not the exact details.

Indeed! Much appreciated.

Cheers, Mike.