Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

MECH 3340 Control System

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.

Proportional Integral Derivative

• To fully understand this type of control it is imperative that each


individual component be considered separately
• The word proportional mean “corresponding in size or amount to
something else”.
R(s) + E(s) Y(s)
KP G(s)
-

• The proportional component responds to error E(s) and provides a


suitable input correction to a system.
• It simply multiplies the present error E(s) of the system with a
constant value Kp (proportional gain).
R(s) + E(s) Y(s)
KP G(s)
-

• The compensator can be represented as:

• It means that our compensator does not have pole or zero.

• Depending on your system (usually for type 1 system and above), Kp


alone may be sufficient to achieve our target since the steady state
error will always be zero.
• However, in other cases, additional zero and poles are needed to
improve transient performance and steady state error.
X(s)=2m + E(s) Y(s)
Type 0 system without any KP Elevator
open-loop imaginary poles. -
Small KP

For this specific case, Small KP value will lead to a


slow response and large steady state error.

2m

2 error

0
X(s)=2m + E(s) Y(s)
KP Elevator
-
KP= large value

Higher gain gives faster response,


reduces the steady-state error, but
increases the %OS

2m
2

0
• From the previous chapter:

Type of system (integrator) Step input steady state error

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

X(s) + E(s) Y(s)


+
KP G(s)
- +

KI/s

• Our compensator can be represented as:


KI
Gc ( s ) = K p +
s
KI
Gc ( s ) = K p +
s
• If we arrange:

• 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

With proper value of Kp and Ki

2m 2

0
However, in reality it is quite difficult to a good combination value for KI and Kp to
get a smooth response

X(s)=2m + E(s) Y(s)


KP Elevator
-
K Ds

K P + K Ds

If Kp and KD value is not suitable

2m 2

The overshoot is still


present
0
• To improve the transient response, a derivative gain KD can be used
KI
• Our compensator can be represented as : Gc ( s ) = K p + + KDs
s

X(s) + E(s) Y(s)


+
KP G(s)
- +
+
KI/s

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 ?

• The Ziegler–Nichols tuning method is a heuristic method of tuning a


PID controller.

Ku = ultimate gain (the largest gain at which the output of the


control loop is marginally stable with consistent oscillations)

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

To use Ziegler–Nichols method, first assume KI and KD = 0, and find the


ultimate Ku so that the closed-loop system is marginally stable:

1. Find the closed-loop transfer function with Ku:

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

Maximum Ku= 11.25


4. Find the oscillating period Tu
(2) (1)
s3 + 14s2 + 56s + 64(1+Ku)
(ωj)2 + 56 = 0
Use only even equation: 14s2 + 64(1+Ku) = 0

14s2 + 64(1+11.25) = 0 Definition of j= (-1)


s2 + 56 = 0 (1) j2 = -1

-(1)ω2 + 56 = 0
ω2 = 56
ω = 7.483 rad/sec

Definition of ω= 2π/Tu

7.483 = 2π/Tu

To get marginal stable system Tu = 0.84


the pole need s = 0 ± ωj (2)
5. Find the value of KP, KI, KD using the table

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.

• There is also no guideline on selecting a suitable compensator gains


either we should use P, PI, PD, or PID for a given system
Given the open-loop transfer function, design a PID controller by using
Ziegler Nichols tuning method

You might also like