PID Controller Design
PID Controller Design
Tuning
1
Introduction
• PID Stands for
– P → Proportional
– I → Integral
– D → Derivative
2
Introduction
• The usefulness of PID controls lies in their general
applicability to most control systems.
4
Four Modes of Controllers
6
Proportional Control (P)
• In proportional mode, there is a continuous linear relation
between value of the controlled variable and position of the
final control element.
𝑟(𝑡) 𝑒(𝑡) 𝑐𝑝(𝑡) = 𝐾𝑝𝑒(𝑡) 𝑐(𝑡)
𝐾𝑝 𝑃𝑙𝑎𝑛𝑡
𝑏(𝑡)
-
𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛𝑎𝑙
𝐶𝑜𝑛𝑡𝑟𝑜𝑙
𝐹𝑒𝑒𝑑𝑏𝑎𝑐𝑘
𝐾𝑖 ƒ 𝑒(𝑡) 𝑑𝑡
𝐾𝑖 ∫
𝑒(𝑡)
+
𝑟(𝑡) 𝐾𝑝𝑒(𝑡)+ 𝑐𝑝𝑖 𝑡 𝑐(𝑡)
𝐾𝑝 𝑃𝑙𝑎𝑛𝑡
𝑏(𝑡)
-
𝐹𝑒𝑒𝑑𝑏𝑎𝑐𝑘
𝑐𝑝𝑖 𝑡 = 𝐾𝑝𝑒 𝑡 + 𝐾𝑖 𝑒 𝑡 𝑑𝑡
Proportional Plus Integral Control (PI)
𝑐𝑝𝑖 𝑡 = 𝐾𝑝𝑒 𝑡 + 𝐾𝑖 ƒ 𝑒 𝑡 𝑑𝑡
𝐶𝑝𝑖(𝑠) 1
= 𝐾 + 𝐾𝑖
𝐸(𝑠) 𝑠
Proportional Plus derivative Control (PD)
𝑑𝑒(𝑡)
𝑑 𝐾𝑑
𝑑𝑡
𝐾𝑑
𝑑𝑡
𝑒(𝑡)
+
𝑟(𝑡) 𝐾𝑝𝑒(𝑡)+ 𝑐𝑝𝑑 𝑡 𝑐(𝑡)
𝐾𝑝 𝑃𝑙𝑎𝑛𝑡
𝑏(𝑡)
-
𝐹𝑒𝑒𝑑𝑏𝑎𝑐𝑘
𝑑𝑒(𝑡)
𝑐𝑝𝑑 𝑡 = 𝐾𝑝𝑒 𝑡 + 𝐾𝑑 𝑑𝑡
Proportional Plus derivative Control (PD)
𝑑𝑒(𝑡)
𝑐𝑝𝑑 𝑡 = 𝐾𝑝𝑒 𝑡 + 𝐾𝑑 𝑑𝑡
𝐶𝑝𝑑(𝑠)
= 𝐾𝑝 + 𝐾𝑑𝑠
𝐸(𝑠)
Proportional Plus derivative Control (PD)
• The stability and overshoot problems that arise when a proportional
controller is used at high gain can be mitigated by adding a term
proportional to the time-derivative of the error signal. The value of
the damping can be adjusted to achieve a critically damped
response.
Proportional Plus derivative Control (PD)
• The higher the error signal rate of change, the sooner the final
control element is positioned to the desired value.
𝐹𝑒𝑒𝑑𝑏𝑎𝑐𝑘
𝑑𝑒(𝑡)
𝑐𝑝𝑖𝑑 𝑡 = 𝐾𝑝𝑒 𝑡 + 𝐾𝑖 ƒ 𝑒(𝑡) 𝑑𝑡 + 𝐾𝑑 𝑑𝑡
Proportional Plus Integral Plus Derivative Control (PID)
𝑑𝑒(𝑡)
𝑐𝑝𝑖𝑑 𝑡 = 𝐾𝑝𝑒 𝑡 + 𝐾𝑖 ƒ 𝑒(𝑡) 𝑑𝑡 + 𝐾𝑑 𝑑𝑡
𝐶𝑝𝑖𝑑(𝑠) 1
= 𝐾 + 𝐾𝑖 +𝐾𝑑 𝑠
𝐸(𝑠) 𝑠
Proportional Plus Integral Plus Derivative Control (PID)
• Although PD control deals neatly with the overshoot and ringing
problems associated with proportional control it does not cure the
problem with the steady-state error. Fortunately it is possible to
eliminate this while using relatively low gain by adding an integral
term to the control function which becomes
The Characteristics of P, I, and D controllers
Small Small
Kd Decrease Decrease
Change Change
21
Tips for Designing a PID Controller
• Lastly, please keep in mind that you do not need to implement all three
controllers (proportional, derivative, and integral) into a single system, if
not necessary. For example, if a PI controller gives a good enough response
(like the above example), then you don't need to implement derivative
controller to the system. Keep the controller as simple as possible.
22
PID TUNING RULES
23
PID Tuning
• The transfer function of PID controller is given as
𝐶𝑝𝑖𝑑(𝑠) 1
= 𝐾 + 𝐾𝑖 +𝐾𝑑 𝑠
𝐸(𝑠) 𝑠
derivative gain
• It can be simplified as integral gain
𝐶𝑝𝑖𝑑 𝑠 1
= 𝐾 (1 + +𝑇𝑑 𝑠)
𝐸 𝑠 𝑇𝑖𝑠
• Where
𝐾𝑝 𝐾𝑑
𝑇= 𝑇𝑑 =
integral time 𝐾 𝐾
constant derivative time constant
24
PID Tuning
• The process of selecting the controller parameters (𝐾𝑝,
𝑇𝑖 and 𝑇𝑑) to meet given performance specifications is
known as controller tuning.
29
Zeigler-Nichol’s Second Method
Table-2
31
Example
• Consider the control system shown in following figure.
35
Example
• Transfer function of the plant is
1
𝐺 𝑠 =
𝑠(𝑠 + 1)(𝑠 + 5)
• Since plant has an integrator therefore Ziegler-Nichol’s
first method is not applicable.
𝐾𝑝
𝐶(𝑠) 𝐾𝑝
=
𝑅(𝑠) 𝑠 𝑠 + 1 𝑠 + 5 + 𝐾𝑝 37
Example
• The value of 𝐾𝑝 that makes the system marginally unstable so
that sustained oscillation occurs can be obtained as
𝑠 3 + 6𝑠2 + 5𝑠 + 𝐾𝑝 = 0
• The Routh array is obtained as
𝐾𝑐𝑟 = 30 38
Example
• With gain 𝐾𝑝 set equal to 30, the characteristic equation
becomes
𝑠 3 + 6𝑠2 + 5𝑠 + 30 = 0
• To find the frequency of sustained oscillations, we substitute
𝑠 = 𝑗𝜔 into the characteristic equation.
(𝑗𝜔)3+6(𝑗𝜔)2+5𝑗𝜔 + 30 = 0
• Further simplification leads to
6(5 − 𝜔2) = 0
𝜔 = 5 𝑟𝑎𝑑/𝑠𝑒𝑐 39
Example
𝜔 = 5 𝑟𝑎𝑑/𝑠𝑒𝑐
• Hence the period of sustained oscillations 𝑃𝑐𝑟 is
2𝜋
𝑃𝑐𝑟 =
𝜔
2𝜋
𝑃𝑐𝑟 = = 2.8099 𝑠𝑒𝑐
5
• Referring to Table-2
𝐾𝑝 = 0.6𝐾𝑐𝑟 = 18
𝑇𝑖 = 0.5𝑃𝑐𝑟 = 1.405
𝑇𝑑 = 0.125𝑃𝑐𝑟 = 0.35124 40
Example
𝐾𝑝 = 18 𝑇𝑖 = 1.405 𝑇𝑑 = 0.35124
• Transfer function of PID controller is thus obtained as
1
𝐺𝑐(𝑠) = 𝐾𝑝(1 + +𝑇𝑑 𝑠)
𝑇𝑠
1
𝐺𝑐(𝑠) = 18(1 + + 0.35124𝑠)
1.405𝑠
41
End of Lec
46