MECH 3340 Chapter 7.1
MECH 3340 Chapter 7.1
MECH 3340 Chapter 7.1
Chapter 7.1
Tuning PID using Ziegler Nichols
1. Review what is PID controller
2. The effect of each individual gain of PID
3. Ziegler Nichols tuning method
• PID controller is widely used in many industrial applications such as
automotive, robotics, chemical and others.
• It can be considered as a classical feedback control method that
have a solid theoretical background and guide.
2m
2 error
0
X(s)=2m + E(s) Y(s)
KP Elevator
-
KP= large value
2m
2
0
• From the previous chapter:
1
No matter what the
value, there will be
2 steady state error
2
0
• To reduce the steady state error, we can add integral term
KI/s
• where:
• One zero at the LHP in the ratio of Ki/Kp and one pole at the origin
• Going back at our example:
X(s) + E(s) Y(s)
+
KP G(s)
- +
KI/s
2m 2
0
However, in reality it is quite difficult to a good combination value for KI and Kp to
get a smooth response
K P + K Ds
2m 2
K Ds
• If we rearrange the equation:
KI
Gc ( s ) = K p + + KDs
s
• By using PID gains, our compensator will have 2 zeros in the LHP
and 1 pole at the origin,
By adding the derivative gain, the overshoot can be reduced, but still a
proper value of Kp KI and KD are needed.
X(s) + E(s) Y(s)
+
KP G(s)
- +
+
KI/s
K Ds
2m 2
By using a proper value of
Kp. Ki and Kd
0
• How to select a proper value of the three gains ?
Tu = Oscillating period
Tune the PID gains using Ziegler–Nichols method for the open-loop system:
64 n
G(s) = =
s3 + 14s2 + 56s + 64 d
KuG(s) Kun
T(s) = T(s) =
1 + KuG(s) d + Kun
Kun/d
T(s) = 64Ku
d/d + Kun/d T(s) =
s3 + 14s2 + 56s + 64 + 64Ku
2. Find the maximum Ku using Routh-Hurwitz
64Ku
T(s) = s3 + 14s2 + 56s + 64(1+Ku)
s3 + 14s2 + 56s + 64 + 64Ku
s3 1 56 0
14(56) - 1(64)(1+Ku) s2 14 64(1+Ku) 0
14
s1 784 - 1(64)(1+Ku) 0
784 - 1(64)(1+Ku) 64(1+Ku) 14
14 s0 64(1+Ku)
784 - 1(64)(1+Ku)
For undamped, need to equate to zero
14
784 - 1(64)(1+Ku) 64(1+Ku) = 0
=0
14 Ku= -1
Ku= 11.25
-(1)ω2 + 56 = 0
ω2 = 56
ω = 7.483 rad/sec
Definition of ω= 2π/Tu
7.483 = 2π/Tu
Ku = 11.25 Tu = 0.84
KP = 0.6(11.25) = 6.75
KI = 1.2(11.25)/0.84 = 16.07
KD = 3(11.25)(0.84)/40 = 0.71
6. Check the step response
KP = 6.75
KI = 16.07
KD = 0.71
• The design needs to start from closed-loop, for some system it may
immediately go to unstable behavior.
• The closed-loop system also needs to exhibit a sustained oscillations,
where for some system it may not be obtained or too dangerous.