Lecture 11 (42-57)
Lecture 11 (42-57)
2.1 Introduction:
It is interesting to note that more than half of the industrial controllers in use today utilize PID
or modified PID control schemes.
Because most PID controllers are adjusted on-site, many different types of tuning rules have
been proposed in the literature. Using these tuning rules, delicate and fine tuning of PID
controllers can be made on-site. Also, automatic tuning methods have been developed and
some of the PID controllers may possess on-line automatic tuning capabilities. Modified
forms of PID control, such as I-PD control and two degrees of freedom PID control, are
currently in use in industry.
In this chapter we first present the design of a PID controlled system. We next discuss
modified PID controls such as PI-D control and I-PD control. Then we introduce two-
degrees-of-freedom control systems, which can satisfy conflicting requirements that single-
degree-of-freedom control systems cannot.
42
The process of selecting the controller parameters to meet given performance specifications is
known as controller tuning. Ziegler and Nichols suggested rules for tuning PID controllers
(meaning to set values 𝐾𝑝 , 𝑇𝑖 𝑎𝑛𝑑 𝑇𝑑 ) based on experimental step responses or based on the
value of K, that results in marginal stability when only proportional control action is used.
43
The S-shaped curve may be characterized by two constants, delay time L and time constant T.
The delay time and time constant are determined by drawing a tangent line at the inflection
point of the S-shaped curve and determining the intersections of the tangent line with the time
axis and line c ( t ) = K, as shown in Figure 2.3.
Ziegler and Nichols suggested setting the values of 𝐾𝑝 , 𝑇𝑖 𝑎𝑛𝑑 𝑇𝑑 according to the formula
shown in Table 2.1.
Table 2.1 Ziegler-Nichols Tuning Rule Based on Step Response of plant (First Method)
Notice that the PID controller tuned by the first method of Ziegler-Nichols rules gives:
1
𝐺𝑐 (𝑠) = 𝐾𝑝 (1 + + 𝑇𝑑 𝑠) (2.1)
𝑇𝑖 𝑠
Or
𝑇 1
𝐺𝑐 (𝑠) = 1.2 (1 + + 0.5𝐿𝑠) (2.2)
𝐿 2𝐿𝑠
Or
1 2
(𝑠 + 𝐿)
𝐺𝑐 (𝑠) = 0.6𝑇 (2.3)
𝑠
From eq. 2.3, it is clear that the PID controller has a pole at the origin and double zeros at s =
-1/L.
Second Method
In the second method, we first set 𝑇𝑖 = ∞ and 𝑇𝑑 = 0. Using the proportional control action
only (see Figure 2.4), increase 𝐾𝑝 from 0 to a critical value 𝐾𝑐𝑟 at which the output first
exhibits sustained oscillations. (If the output does not exhibit sustained oscillations for
whatever value 𝐾𝑝 may take, then this method does not apply.) Thus, the critical gain 𝐾𝑐𝑟 and
the corresponding period 𝑃𝑐𝑟 are experimentally determined (see Figure 2.5). Ziegler and
44
Nichols suggested that we set the values of the parameters 𝐾𝑝 , 𝑇𝑖 𝑎𝑛𝑑 𝑇𝑑 according to the
formula shown in Table 2.2.
Table 2.2 Ziegler-Nichols Tuning Rule Based on Critical gain and Critical Period (Second Method)
Notice that the PID controller tuned by the second method of Ziegler-Nichols rules gives:
1
𝐺𝑐 (𝑠) = 0.6𝐾𝑐𝑟 (1 + + 0.125𝑃𝑐𝑟 𝑠) (2.4)
0.5𝑃𝑐𝑟 𝑠
Or
4 2
(𝑠 + 𝑃 )
𝑐𝑟
𝐺𝑐 (𝑠) = 0.075𝐾𝑐𝑟 𝑃𝑐𝑟 (2.5)
𝑠
45
Thus, the PID controller has a pole at the origin and double zeros at 𝑠 = −4⁄𝑃𝑐𝑟 .
Note that if the system has a known mathematical model (such as the transfer function), then
we can use the root-locus method to find the critical gain 𝐾𝑐𝑟 and the frequency of the
sustained oscillations 𝜔𝑐𝑟 , where 𝜔𝑐𝑟 = 2𝜋⁄𝑃𝑐𝑟 . These values can be found from the crossing
points of the root-locus branches with the 𝑗𝜔axis. (Obviously, if the root-locus branches do
not cross the 𝑗𝜔 axis, this method does not apply).
Example 2.1: Consider the following system:
1
𝐺𝑝 (𝑠) =
𝑠(𝑠 + 1)(𝑠 + 5)
Design a PID controller for the present system using a Ziegler-Nichols tuning rule for the
determination of the values of parameters 𝐾𝑝 , 𝑇𝑖 𝑎𝑛𝑑 𝑇𝑑 . Then obtain a unit-step response
curve and check to see if the designed system exhibits approximately 25% maximum
overshoot. If the maximum overshoot is excessive (40% or more), make a fine tuning and
reduce the amount of the maximum overshoot to approximately 25% or less.
Solution:
Since the plant has an integrator, we use the second method of Ziegler-Nichols tuning rules.
By setting 𝑇𝑖 = ∞ and 𝑇𝑑 = 0, we obtain the closed-loop transfer function as follows:
𝐶(𝑠) 𝐾𝑝
=
𝑅(𝑠) 𝑠(𝑠 + 1)(𝑠 + 5) + 𝐾𝑝
The value of K, that makes the system marginally stable so that sustained oscillation occurs
can be obtained by use of Routh's stability criterion. Since the characteristic equation for the
closed-loop system is:
𝑠 3 + 6𝑠 2 + 5𝑠 + 𝐾𝑝 = 0
The Routh array becomes as follows:
𝑠3 1 5
𝑠2 6 𝐾𝑝
30 − 𝐾𝑝
𝑠1
6
𝑠0 𝐾𝑝
Examining the coefficients of the first column of the Routh table, we find that sustained
oscillation will occur if 𝐾𝑝 = 30. Thus, the critical gain 𝐾𝑐𝑟 = 30.
At 𝐾𝑝 = 30, the auxiliary equation is:
6𝑠 2 + 30 = 0 − −→ 𝑠1,2 = ∓𝑗√5
46
Therefore; from which we find the frequency of the sustained oscillation 𝜔𝑐𝑟 = √5. Hence,
the period of sustained oscillation is:
2𝜋 2𝜋
𝑃𝑐𝑟 = = = 2.8099
𝜔 √5
Referring to Table 2.2, we determine 𝐾𝑝 , 𝑇𝑖 𝑎𝑛𝑑 𝑇𝑑 as follows:
𝐾𝑝 = 0.6𝐾𝑐𝑟 = 18
𝑇𝑖 = 0.5 𝑃𝑐𝑟 = 1.405
𝑇𝑑 = 0.125𝑃𝑐𝑟 = 0.35124
The transfer function of the PID controller is thus:
1
𝐺𝑐 (𝑠) = 𝐾𝑝 (1 + + 𝑇𝑑 𝑠)
𝑇𝑖 𝑠
1
∴ 𝐺𝑐 (𝑠) = 18 (1 + + 0.35124𝑠)
1.405𝑠
(𝑠 + 1.4235)2
∴ 𝐺𝑐 (𝑠) = 6.3223
𝑠
A block diagram of the control system with the designed PID controller is shown in Figure
2.6.
47
the maximum overshoot in the unit-step response can be reduced to approximately 18% (see
Figure 2.8.
num=[0 0 6.3223 18 12.811];
den=[1 6 11.3223 18 12.811];
step(num,den)
48
If the proportional gain K, is increased to 39.42, without changing the location of the double
zero (s = -0.65), that is, using the PID controller:
1 (𝑠 + 0.65)2
∴ 𝐺𝑐 (𝑠) = 39.42 (1 + + 0.7692𝑠) = 30.322
3.077𝑠 𝑠
then the speed of response is increased, but the maximum overshoot is also increased to
approximately 28%, as shown in Figure 2.9. Since the maximum overshoot in this case is
fairly close to 25%.
Then the values of the PID control parameters are: 𝐾𝑝 = 39.42; 𝑇𝑖 = 3.077; 𝑇𝑑 = 0.7692
It is interesting to observe that these values respectively are approximately twice the values
suggested by the second method of the Ziegler-Nichols tuning rule. The important thing to
note here is that the Ziegler-Nichols tuning rule has provided a starting point for fine tuning.
Example 2.2: Consider the following system:
10
𝐺𝑝 (𝑠) =
(𝑠 + 1)(𝑠 + 5)
Design a PID controller for the present system using a Ziegler-Nichols tuning rule for the
determination of the values of parameters 𝐾𝑝 , 𝑇𝑖 𝑎𝑛𝑑 𝑇𝑑 . Then obtain a unit-step response
curve and check to see if the designed system exhibits approximately 25% maximum
overshoot. If the maximum overshoot is excessive (40% or more), make a fine tuning and
reduce the amount of the maximum overshoot to approximately 25% or less.
49
Solution:
The given system does not have integrator part or complex poles, so that the first method of
Ziegler-Nichols can be used.
By using the following code in MATLAB the S-shaped response curve can be obtained as
shown in Figure 2.9.
num=[10];
den=[1 6 5];
step(num,den)
From the figure 2.9, the values of the shape parameter are:
𝐿 = 0.1 𝑎𝑛𝑑 𝑇 = 1.5
From table 2.1 the parameters of PID controller can be computed as:
𝑇 1.5
𝐾𝑝 = 1.2 ∗ = 1.2 ∗ = 18
𝐿 0.1
𝑇𝑖 = 2 ∗ 𝐿 = 2 ∗ 0.1 = 0.2
𝑇𝑑 = 0.5 ∗ 𝐿 = 0.5 ∗ 0.1 = 0.05
The transfer function of the PID controller is given as:
1
𝐺𝑐 (𝑠) = 𝐾𝑝 (1 + + 𝑇𝑑 𝑠)
𝑇𝑖 𝑠
1 3.6
𝐺𝑐 (𝑠) = 18 (1 + + 0.05𝑠) = 18 + + 0.9𝑠
0.2𝑠 𝑠
We can find the unit step response of the closed loop system by using the Simulink in
MATLAP as shown in Figures 2.10 and 2.11.
50
Figure 2.10 Unit Step Response of the given System
From figure 2.10 we can see that the maximum overshoot is 10%. The PID parameters do not
need fine tuning.
Now we have to test if the second can be used or not.
Assume that 𝑇𝑖 = ∞ 𝑎𝑛𝑑 𝑇𝑑 = 0. The characteristic equation can be written as:
1 + 𝐾𝑝 𝐺(𝑠) = 0
𝐾𝑝 ∗ 10
1+ =0
𝑠2
+ 6𝑠 + 5
𝑠 2 + 6𝑠 + (5 + 10𝐾𝑝 ) = 0
51
Using Routh Method:
𝑠2 1 5 + 10𝐾𝑝
𝑠1 6 0
𝑠 0 5 + 10𝐾𝑝 0
∴ 𝐾𝑝 = −0.5
Since, 𝐾𝑝 = −0.5 (negative) the second method cannot be used.
The coefficients in the first column are positive for all values of positive 𝐾𝑝 . Thus, in the
present case the closed loop system will not exhibit sustained oscillations and therefore, the
critical gain value 𝐾𝑐𝑟 does not exist. Hence, the second method does not apply.
52
Example 2.3: Consider the electronic PID controller shown in Figure 2.12. Determine the
values of R1, R2, R3, R4, Cl and of the controller such that the transfer function 𝐺𝑐 (𝑠), where:
1 (𝑠 + 0.65)2
𝐺𝑐 (𝑠) = 39.42 (1 + + 0.7692𝑠) = 30.3215 ( )
3.077𝑠 𝑠
Solution:
𝐸(𝑠) 𝑍2
=−
𝐸𝑖 (𝑠) 𝑍1
1 1
𝑍2 = 𝑅2 + = (1 + 𝑅2 𝐶2 𝑠)
𝐶2 𝑠 𝐶2 𝑠
1
𝑅1 ∗ 𝐶 𝑠 𝑅1
1
𝑍1 = =
1 (𝑅1 𝐶1 𝑠 + 1)
𝑅1 + 𝐶 𝑠
1
1 1
𝐸(𝑠) (1 + 𝑅2 𝐶2 𝑠)(𝑅1 𝐶1 𝑠 + 1) (𝑠 + 𝐶 𝑅 )(𝑠 + 𝐶 𝑅 )
2 2 1 1
∴ = = −𝐶1 𝑅2 ∗
𝐸𝑖 (𝑠) 𝐶2 𝑅1 𝑠 𝑠
𝐸0 (𝑠) 𝑅4
=−
𝐸(𝑠) 𝑅3
Since:
𝐸0 (𝑠) 𝐸0 (𝑠) 𝐸(𝑠)
= ∗
𝐸𝑖 (𝑠) 𝐸(𝑠) 𝐸𝑖 (𝑠)
1 1
𝐸0 (𝑠) 𝐶1 𝑅4 𝑅2 (𝑠 + 𝐶2 𝑅2 )(𝑠 + 𝐶1 𝑅1 )
∴ = ∗
𝐸𝑖 (𝑠) 𝑅3 𝑠
The 𝐺𝑐 (𝑠) can be rewritten as:
(𝑠 + 0.65)2
𝐺𝑐 (𝑠) = 30.3215 ( ) (𝐼)
𝑠
1 1
If we assume that 𝐶 =𝐶 , then
1 𝑅1 2 𝑅2
53
1 2
𝐸0 (𝑠) 𝐶1 𝑅4 𝑅2 (𝑠 + )
𝐶1 𝑅1
𝐺𝑐 (𝑠) = = ∗ (𝐼𝐼)
𝐸𝑖 (𝑠) 𝑅3 𝑠
Compare eq. (I) and eq. (II), we obtain that:
1 1
= = 0.65
𝐶1 𝑅1 𝐶2 𝑅2
𝐶1 𝑅4 𝑅2
= 30.3215
𝑅3
If we assume that 𝑅1 = 100𝑘Ω, than 𝐶1 = 1.53 × 10−5 𝐹.
If we assume that 𝑅2 = 200𝑘Ω, than 𝐶2 = 7.69 × 10−6 𝐹.
And
𝑅4
= 9.91
𝑅3
If we assume that 𝑅3 = 100𝑘Ω, than 𝑅4 = 990𝑘Ω
54
Figure 13 a) PID controller system
b) Equivalent block diagram.
From Figure 2.14, it can be seen that the manipulated signal U(s) is given by:
1 1
𝑈(𝑠) = 𝐾𝑝 (1 + ) 𝑅(𝑠) − 𝐾𝑝 (1 + + 𝑇𝑑 𝑠) 𝐵(𝑠) (2.6)
𝑇𝑖 𝑠 𝑇𝑖 𝑠
Notice that in the absence of the disturbances and noises, the closed-loop transfer function of
the basic PID control system [shown in Figure 2.13(b)] and the PI-D control system (shown in
Figure 2.14) are given, respectively, by:
𝑌(𝑠) 1 𝐾𝑝 𝐺𝑝 (𝑠)
= (1 + + 𝑇𝑑 𝑠) (2.7)
𝑅(𝑠) 𝑇𝑖 𝑠 1
1 + (1 + 𝑇 𝑠 + 𝑇𝑑 𝑠) 𝐾𝑝 𝐺𝑝 (𝑠)
𝑖
55
𝑌(𝑠) 1 𝐾𝑝 𝐺𝑝 (𝑠)
= (1 + ) (2.8)
𝑅(𝑠) 𝑇𝑖 𝑠 1 + (1 + 1 + 𝑇 𝑠) 𝐾 𝐺 (𝑠)
𝑇𝑖 𝑠 𝑑 𝑝 𝑝
It is important to point out that in the absence of the reference input and noises, the closed-
loop transfer function between the disturbance D(s) and the output Y ( s ) in either case is the
same and is given by;
𝑌(𝑠) 𝐺𝑝 (𝑠)
= (2.9)
𝐷(𝑠) 1 + (1 + 1 + 𝑇 𝑠) 𝐾 𝐺 (𝑠)
𝑇𝑖 𝑠 𝑑 𝑝 𝑝
𝐾𝑝 1
𝑈(𝑠) = ( ) 𝑅(𝑠) − 𝐾𝑝 (1 + + 𝑇𝑑 𝑠) 𝐵(𝑠) (2.10)
𝑇𝑖 𝑠 𝑇𝑖 𝑠
Notice that the reference input R(s) appears only in the integral control part. Thus, in I-PD
control, it is imperative to have the integral control action for proper operation of the control
system.
𝑌(𝑠)
The closed-loop transfer function in the absence of the disturbance input and noise input
𝑅(𝑠)
is given by:
56
𝑌(𝑠) 1 𝐾𝑝 𝐺𝑝 (𝑠)
=( ) (2.11)
𝑅(𝑠) 𝑇𝑖 𝑠 1 + (1 + 1 + 𝑇 𝑠) 𝐾 𝐺 (𝑠)
𝑇𝑖 𝑠 𝑑 𝑝 𝑝
It is noted that in the absence of the reference input and noise signals, the closed-loop transfer
function between the disturbance input and the output is given by
𝑌(𝑠) 𝐺𝑝 (𝑠)
= (2.12)
𝐷(𝑠) 1 + (1 + 1 + 𝑇 𝑠) 𝐾 𝐺 (𝑠)
𝑇𝑖 𝑠 𝑑 𝑝 𝑝
57