CHP 6
CHP 6
CHP 6
1
CHAPTER 6
DESIGN OF CONTROLLER
6.1. Introduction
➢ If the system cannot achieve the asked performance, we have to design a
controller or change the control law.
➢ To ensure stability.
➢ To optimize production.
2
6.2.Types of controllers
➢ There are many ways by which a control unit can react to an error
and supply an output for correcting elements. Therefore, Industrial controllers may
be classified according to their control actions as:
➢ It is simple and most common type of control. The control signal 𝑢(𝑡) has only two
states either on or off (high or low) and depending on whether the actuating error
signal is positive or negative, so that
𝑢1 𝑓𝑜𝑟 𝑒(𝑡) > 0
𝑢 𝑡 =ቊ
𝑢2 𝑓𝑜𝑟 𝑒(𝑡) < 0
Fig.6.1: (a) Block diagram of an on-off controller; (b) block diagram of an on-off controller with differential gap.
4
Cont. …
➢ Such controllers are relatively simple and inexpensive and, for this reason,
➢ The range through which the actuating error signal must move before the
increases the number of on-off switching per minute and reduces the useful
U(s)
u t = kpe t & Gc s = = kp
E(s)
where, k p − proportional gain, 𝑟(𝑡) − set point, e(𝑡) −error signal, 𝑢(𝑡) −control
signal and 𝑦(𝑡) −actual output. 6
Cont. …
➢ Proportional controller is essentially an amplifier with an adjustable gain. A
summing operational amplifier with an inverter can be used as a proportional
controller.
➢ Let consider the closed loop proportional controller for a first order system given
k
by Gp s = . Where τ − time constant and k −system gain.
τs+1
7
Cont. …
➢ The closed-loop transfer function is given by
➢ Proportional controller modifies the time constant of the system. The time constant
is inversely proportional to k p , as k p increases the time constant decreases so that
the system response become faster.
k p kΤ(1 + k p k) 1 kpk
yss = lim sY(s) = lim s τ =
s→0 s→0 s + 1 s 1 + kpk
1 + kpk
8
Cont. …
➢ The steady state error for unit step input is given by
1
ess = lim sE(s) = lim s R s − Y(s) = lim sR(s) − lim sY s = 1 − yss =
→0 s→0 →0 →0 1+kp k
➢ The sign of 𝑘𝑝 can be chosed to make the controller output increase (or
decrease) as the error signal increases.
0.5
b) If a disturbance of 𝐷 𝑠 = interfere just at the output (i.e. after a plant) of
𝑠
u t = k i න e t d𝑡
0
U(s) k i
Gc s = =
E(s) s
11
Cont. …
❖ Performance analysis of Integral controller:
➢ Let consider the closed-loop Integral controller for the process transfer function
k
given by Gp s = . Where τ − time constant and k −system gain.
τs+1
Y(s) kik
Gcl s = = 2
R(s) τs + s + k i k
12
Cont. …
➢ Integral controller increase the order of the system. The steady state output
for unit step input is given by
kik 1
yss = lim sY(s) = lim s 2 =1
s→0 s→0 τs + s + k i k s
Exercise 6.2:
a) Design a unity feedback integral controller for the process transfer function
10
𝐺𝑝 𝑠 = to have underdamped response for unit step input.
4𝑠+1
12
b) Given the plant transfer function 𝐺𝑝 𝑠 = , design a unity feedback integral
9𝑠+1
controller to achieve 0.35 overshoot.
14
Cont. …
❖ Derivative controller (D-controller):
➢ This produces a control action that is proportional to the rate at which the error is
changing.
➢ When there is a sudden change in the error signal the controller gives a large
correcting signal. When there is a gradual change only a small correcting signal is
produced.
de(t) U(s)
u t = kd ⇒ Gc s = = kds
dt E(s)
where, Td −is called the derivative time and k d −is derivative gain.
➢ A derivative control will have the effect of increasing the stability of the system,
reducing the overshoot, and improving the transient response.
15
Cont. …
➢ It gives rapid output, reduces the time that is required to return the process
variable to setpoint in slow process.
➢ In practical case derivative controller is not used alone because of the following
reason:
𝑑𝑒(𝑡)
a) If the error is constant 𝑢 𝑡 = 𝑘𝑑 =0
𝑑𝑡
➢ This implies the controller doesn’t take any action to compensate steady state
error. Consequently, it always used in conjunction with proportional or
proportional-integral control.
➢ To avoid this case derivative controller can be designed with low pass filter.
16
Cont. …
❖ Proportional-plus-Derivative controller (PD-controller):
➢ The control action of a proportional plus derivative controller is defined by
de(t) de(t) de(t)
u t = k p e t + k p Td = k p e t + Td = kpe t + kd
dt dt dt
U(s)
Gc s = = k p + k p Td s = k p + k d s
E(s)
where, Td − is derivative time.
17
Cont. …
Exercise 6.3:
0.4
𝐺𝑝 (𝑠) =
𝑠(0.2𝑠 + 0.8)
1
b) For the plant transfer function given by 𝐺 𝑠 = , design a unity feedback
𝑠2 +𝑠
U(s) 1 ki
Gc s = = kp 1 + = kp +
E(s) Ti s s
➢ The response becomes more oscillatory and needs longer to settle, the error
disappears.
19
Cont. …
Exercise 6.4:
20
Cont. …
2) Consider the plant transfer function given by
1
G s = 2
s +s
b) What is the steady state error of this system for a unit ramp reference?
21
Cont. …
❖ Proportional-plus-Integral-plus-Derivative (PID) controller:
➢ It is the combination of proportional control action, integral control action, and derivative
control action.
➢ This combined action has the advantages of each of the three individual control actions.
The equation of a controller is given by
t
kp de(t)
u t = k p e t + න e t dt + k p Td
Ti dt
0
➢ The transfer function of the controller is
U(s) 1 ki
Gc s = = kp 1 + + Td s = k p + + k d s
E(s) Ti s s
kp
Where, k i = and k d = k p Td
Ti
Note: please keep in mind that you don’t need to implement all the three
controllers into a single system if not necessary. Example if PI controller gives you
a good enough response, then you don’t need to implement derivative controller
to the system. 23
Cont. …
❖ Controller Comparison
➢ Proportional (P) controller:
i. Simplest controller to tune (k p −only one parameter).
ii. Offset with sustained disturbance or setpoint change.
➢ Proportional –plus-Integral (PI) controller:
i. More complicated to tune (k p & Ti −two parameters).
ii. Better performance than proportional only.
iii. No offset.
iv. Most popular feedback controller.
➢ Proportional-plus-Integral-plus-Derivative (PID) controller:
i. Most complicated to tune (k p , Ti & Td −three parameters).
ii. Better performance than proportional-plus-Integral.
iii. No offset.
iv. Derivative action may be affected by noise 24
Cont. …
Table 6.1: The Characteristics of P, I, and D controllers
25
Cont. …
❖ Controller parameter tuning:
1) How much the correction should be made is determined by the proportional mode
of the controller.
2) How long the correction should be applied is determined by the integral mode of
the controller.
3) How fast should the correction be applied is determined by the derivative mode of
the controller. 26
6.3. PID Tuning Rules (Ziegler Nichols Procedures)
➢ Consider the block diagram shown below in which PID controller used to
control a plant.
➢ These rules can, of course, be applied to the design of system with known
mathematical models.
➢ Such rules suggest a set of values of 𝑘𝑝 , 𝑇𝑖 and 𝑇𝑑 that will give a stable
operation of the system.
➢ In fact, the Ziegler-Nichols tuning rules give an educated guess for the
parameter values and provide a starting point for fine tuning, rather than
giving the final settings for 𝑘𝑝 , 𝑇𝑖 and 𝑇𝑑 in a single shot.
➢ Ziegler and Nichols proposed rules for determining values of the 𝑘𝑝 , 𝑇𝑖 and
𝑇𝑑 based on the transient response characteristics of a given plant.
Table 6.2
Types of 𝐤𝐩 𝐓𝐢 𝐓𝐝
controller
P T ∞ 0
L
PI T L 0
0.9
L 0.3
PID T 2L 0.5L
1.2
L
32
Cont. …
❖ Ziegler-Nichol’s second method
➢ In the second method, we first set Ti = ∞ and Td = 0.
➢ Using the proportional control action only, increase k p from 0 to critical value k cr at
which the output first exhibits sustained oscillations.
➢ If the output does not exhibit sustained oscillations for whatever value k p may take,
then this method does not apply.
33
Cont. …
➢ Thus, the critical gain and the corresponding period (pcr ) are experimentally
determined.
➢ Therefore, set the values of the parameters k p , Ti and Td according to the formula
shown in Table 6.3.
Table 6.3
Types of kp Ti Td
controller
P 0.5k cr ∞ 0
PI 0.45k cr 1 0
p
1.2 cr
PID 0.6k cr 0.5pcr 0.125pcr
34
Cont. …
❖ Note: 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 k cr
2π
and the frequency of the sustained oscillations ωcr , where pcr = .
ωcr
➢ These values can be found from the crossing points of the root-locus
branches with the jω −axis. (Obviously, if the root-locus branches do not
cross the jω −axis, this method does not apply).
Example: Consider the control system shown in Figure 6.2 in which a PID
controller is used to control the system. Apply a Ziegler-Nichols tuning rule
for the determination of the values of parameters k p , Ti and Td .
35
Cont. …
Solution:
➢ Since the plant has an integrator, we use the second method of Ziegler-Nichols
tuning rules. By setting Ti = ∞ and Td = 0, the closed-loop transfer function is
Y(s) kp
= 3
R(s) s + 6s 2 + 5s + k p 36
Cont. …
➢ The characteristic equation is
s 3 + 6s 2 + 5s + k p = 0
30−𝑘𝑝
For stability, > 0 and 𝑘𝑝 > 0
6
∴ 0 < k p < 30
2π 2𝜋
pcr = = = 2.8099
ωcr 5
➢ Therefore,
39