University of Technology
University of Technology
Lecture 5
Dr.Wisam Essmat
[email protected]
PID Controller Dr.Wisam Asmat
Proportional-Integral-Derivative controller
(PID controller)
A proportional-integral-derivative controller (PID controller) is a control loop feedback
mechanism (controller) widely used in industrial control systems.
This type of controller is widely used in industry, does not require accurate model of the
plant or process being controlled and can be understood by most engineers without being
a control expert. The PID controller algorithm involves three separate
constant parameters, and is accordingly sometimes called three-term control:
The output of a PID controller is a summation (Σ) of the proportional (P), integral (I), and
derivative (D). A PID controller calculates an error value as the difference
between a measured process variable and a desired set point. The controller attempts to
minimize
2
PID Controller Dr.Wisam Asmat
Where
Kp : Proportional Gain ; and use to decrease
the rise time
Ki : Integral Gain ; and use to eliminate the
steady-state error.
Kd : Derivative gain ; and use to reduce the
e= r(t)- y(t)
overshoot and settling time
e: error
3
PID Controller Dr.Wisam Asmat
∫𝟎 𝒆(𝒕)𝒅𝒕 + 𝑲𝒅. 𝒅𝒕
controller: 𝒕 𝒅
Take Laplace
𝑲
𝒖(𝒔) = 𝑲𝒑. 𝑬(𝒔)
𝑰 + 𝒔
. 𝑬(𝒔) + 𝑲𝒅𝒔.
𝑬(𝒔)--------(2)
𝑲
𝑰
𝑻𝑰
(𝑲 𝒄𝒓)
With the PID controller transfer function:
𝟏
𝑪(𝒔) = 𝑲𝒄𝒓(𝟏 +
--------(5)
𝑻𝑰
Where: +𝑻𝒅𝒔) 𝑺
But the Ziegler–Nichols method was reported as the best tuning method when
both performance and robustness are considered.
Ziegler and Nichols devised two empirical methods for obtaining (PID) controller
parameters, even with computer aids; the following two methods are still
employed today, and are considered among the most common. These methods are:
These two methods were used to describe a two simple mathematical procedures which
using to tuning PID parameters i.e. (KP, KI and Kd).
These procedures are now accepted as standard in control systems practice. Both
techniques make a priori assumptions on the system model. Ziegler-Nichols formulae for
specifying the controllers are based on plant steps or processes steps responses.
The second method (Ziegler-Nichols Closed - Loop Tuning Method) was chosen
for study.
Ziegler and Nichols proposed rules for determining values of the proportional gain, (Kp)
integral time, (Ti) and derivative time (Td) based on the response characteristics
according to the formula shown in Table 1. And through these values we can be
calculated the values of Proportional Gain (Kp), Integral Gain (Ki) and Derivative
gain(Kd ).
5
PID Controller Dr.Wisam Asmat
Pcr =
𝟐𝝅 �
�
Where:
Pcr: period of oscillation
3.Plug these values into the Ziegler-Nichols closed loop equations and determine
the necessary settings for the controller.
Example (1): Determine the parameters of PI & PID controller by using the Z-N method
for the model which given as shown below:
6
PID Controller Dr.Wisam Asmat
𝟏𝟎𝐾c
r
(𝑺+𝟏𝟎)
--------(6)
(𝑺𝟐+𝟑𝑺+𝟔)+𝟏𝟎𝐾cr
7
PID Controller Dr.Wisam Asmat
(𝑺 + 𝟏𝟎)(𝑺𝟐 + 𝟑𝑺 + 𝟔) + 𝟏𝟎𝐾cr = 𝟎
𝑺𝟑 + 𝟏𝟑𝑺𝟐 + 𝟑𝟔𝑺 + 𝟔𝟎 +
𝑺𝟑 + 𝟑𝑺𝟐 + 𝟔𝑺 + 𝟏𝟎𝑺𝟐 + 𝟑𝟎𝑺 + 𝟔𝟎 + 𝟏𝟎𝐾cr =--------
𝟎
𝟏𝟎 𝑲𝐜𝐫 = 𝟎
𝑺 = 𝒋𝝎 in eq (7)
(7)
Sub
NOTE:
For eq(9)
(−𝒋𝝎)𝟑 + 𝟑𝟔(𝒋𝝎) = 𝟎
(𝝎)𝟑 − 𝟑𝟔(𝝎) = 𝟎
(𝝎)𝟑 = 𝟑𝟔(𝝎)
𝝎𝟐 = 𝟑𝟔
𝝎=𝟔
−𝟏𝟑(𝟔) 𝟐 + 𝟔𝟎 + 𝟏𝟎
408
𝑲𝐜𝐫==𝟎
𝑲𝐜𝐫 =
10
40.8
−𝟒𝟔𝟖 + 𝟔𝟎 + 𝟏𝟎 𝑲𝐜𝐫
= 𝟎 𝟐𝝅 �
Pcr =
�
8
PID Controller Dr.Wisam Asmat
𝟐𝝅
�
Pcr =
=1.04 �
For table (1), the parameters of (PI)
Controller
𝑷𝒄𝒓
Kp=18.36
TI= 𝟏.𝟎𝟒
𝟏.𝟐
= 𝟏.𝟐
=0.866
𝑲 𝟏𝟖.𝟑
𝑲𝑰 =𝒑 �𝑻 𝟔
𝟎.𝟖𝟔
= 21.2
� 𝟔
=
For table (1), the parameters of (PID)
Controller
𝑲 𝟐𝟒.𝟒
𝑲𝑰 =𝒑 �𝑻 𝟖𝟎.𝟓 = 47.07
𝟐
𝑲𝒅 = 𝑲 𝒑𝑻𝒅
�
=
𝑻𝒅 = 𝟎. 𝟏𝟐𝟓 𝐏𝐜𝐫 = 𝟎. 𝟏𝟐𝟓
∗ 𝟏. 𝟎𝟒
𝑻𝒅 = 𝟎. 𝟏𝟑
𝑲𝒅 =24.48* 𝟎. 𝟏𝟑
𝑲𝒅 = 𝟑. 𝟏𝟖
9
PID Controller Dr.Wisam Asmat
Example (2): By using the Z-N method determine the parameters (K P,TI,Td) for
the below model?
Where:
𝟓 𝟎,𝟒 𝟐
𝑮 ,𝑮 ,𝑮
𝟐 = 𝟐𝑺+𝟏 𝟑 = 𝟓𝑺+𝟏 𝟒 = 𝑺+𝟏
Solution:
1. Use equation (5) & Sub (TI=∞ & Td=0) then the eq (5) became
(𝐾𝑐𝑟)
𝟓𝑺+𝟏
. 𝑺+𝟏
=𝐊𝐜𝐫∗𝟓∗𝟎.𝟒∗𝟐
𝐊𝐜𝐫∗𝟓∗𝟎.𝟒∗𝟐 =
𝟒𝐊
𝐜𝐫 (sub
=
(𝟐𝑺+𝟏).(𝟓𝑺+𝟏).(𝑺+𝟏) (𝟐𝑺+𝟏).(𝟓𝑺+𝟏).(𝑺+𝟏) (𝟐𝑺+𝟏).(𝟓𝑺+𝟏).
(𝑺+𝟏)
in
eq 𝒚 (𝒔 )
𝒓(𝒔)
𝑮𝟏 .𝑮𝟐.𝑮𝟐𝟑.𝑮
𝟏+𝑮 .𝑮 𝟑 𝟒.𝑮𝟒
=
.𝑮
(TS): 𝟏
1
0
PID Controller Dr.Wisam Asmat
𝟒𝐊𝐜 𝟒𝐊𝐜
𝒚 ( 𝐫
( 𝟐𝑺 +𝟏) .( 𝟓𝑺 + 𝟏) .
𝐫
( 𝟐𝑺 +𝟏) .( 𝟓𝑺 +𝟏) .( 𝑺
𝟒𝐊𝐜𝐫
𝒔) = 𝟏+
( 𝑺 +𝟏)
𝟒𝐊𝐜
+𝟏)
(𝟐𝑺+𝟏).(𝟓𝑺+𝟏).
= =
𝐫
𝒓(𝒔) (𝟐𝑺+𝟏).(𝟓𝑺+𝟏).
( 𝟐𝑺 +𝟏) .( 𝟓𝑺 + 𝟏) .( 𝑺
(𝑺+𝟏) (𝑺+𝟏)+𝟒𝐊𝐜𝐫
𝒚( 𝒔) 𝟒𝐊𝐜𝐫+𝟏) +𝟒𝐊𝐜𝐫 (𝟐𝑺+𝟏).
𝒓(𝒔 (𝟐𝑺+𝟏).(𝟓𝑺+𝟏). (𝟓𝑺+𝟏).(𝑺+𝟏)
)=
(𝑺+𝟏)+𝟒𝐊𝐜𝐫
3-Neglect the numerator of (TS) equation :
+ 𝟏𝟕𝑺𝟐 + 𝟖𝑺 + 𝟏 + 𝟒𝐾cr = 𝟎
Sub S=𝒋𝝎
10(𝒋𝝎)𝟑 + 𝟏𝟕(𝒋𝝎)𝟐 + 𝟖(𝒋𝝎) + 𝟏 + 𝟒𝐾cr = 𝟎
−𝟏𝟎𝒋𝝎𝟑 + 𝟖(𝒋𝝎)
=𝟎
𝟏𝟎𝝎𝟑 = 𝟖𝝎(𝝎)=𝟏
𝟐 𝟖
=0.8 𝟎
𝝎 = 𝟎. 𝟖𝟗𝟒
−𝟏𝟐. 𝟔 + 𝟒 𝑲𝐜𝐫 = 𝟎
10
PID Controller Dr.Wisam Asmat
𝟒 𝑲𝐜𝐫 =
𝟏𝟐. 𝟔
𝟏𝟐.
𝑲𝐜𝐫 𝟔 = 𝟑.
= 𝟏𝟓
�
�
�
Pcr =
𝟐𝝅
𝟐
�
Pcr = 𝝅
𝟎.𝟖𝟗
=7.02
𝟒
For table (1), the parameters of (PID)
Controller
𝑻𝒅 = 𝟎. 𝟖𝟕
11