4@22!10!23 PID Controller
4@22!10!23 PID Controller
Wisam Esmat
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
the error by adjusting the process through use of a manipulated variable as shown in
figure 1, which it represents the basic block diagram of a PID controller system.
1
PID Controller Dr.Wisam Esmat
2
PID Controller Dr.Wisam Esmat
Take Laplace
𝑲𝑰
𝒖(𝒔) = 𝑲𝒑 . 𝑬(𝒔) + . 𝑬(𝒔) + 𝑲𝒅 𝒔. 𝑬(𝒔)--------(2)
𝒔
𝑲𝑰
𝒖(𝒔) = 𝑬(𝒔)[𝑲 𝒑 + +𝑲𝒅 𝒔]--------(3)
𝒔
𝒖(𝒔) 𝑲𝑰
G(PID): = (𝑲 𝒑 + +𝑲𝒅 𝒔) --------(4)
𝑬(𝒔) 𝒔
3
PID Controller Dr.Wisam Esmat
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 ).
4
PID Controller Dr.Wisam Esmat
𝟐𝝅
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:
5
PID Controller Dr.Wisam Esmat
1-Sub in eq(5), (TI=∞ & Td=0) then the eq(5) became (𝐾𝑐𝑟)
𝟏𝟎𝐾cr
(𝑺+𝟏𝟎)(𝑺𝟐 +𝟑𝑺+𝟔)+𝟏𝟎𝐾cr
--------(1)
6
PID Controller Dr.Wisam Esmat
3-Take characteristic equation from equation (1). [ 0( ومساواته مع1( ]يعني إهمال بسط المعادلة
(𝑺 + 𝟏𝟎)(𝑺𝟐 + 𝟑𝑺 + 𝟔) + 𝟏𝟎𝐾cr = 𝟎
Sub 𝑺 = 𝒋𝝎 in eq (2)
NOTE:
For eq(9)
(−𝒋𝝎)𝟑 + 𝟑𝟔(𝒋𝝎) = 𝟎
(𝝎)𝟑 − 𝟑𝟔(𝝎) = 𝟎
(𝝎)𝟑 = 𝟑𝟔(𝝎)
𝝎𝟐 = 𝟑𝟔
𝝎=𝟔
−𝟏𝟑(𝟔)𝟐 + 𝟔𝟎 + 𝟏𝟎 𝑲𝐜𝐫 = 𝟎
−𝟒𝟔𝟖 + 𝟔𝟎 + 𝟏𝟎 𝑲𝐜𝐫 = 𝟎
408
𝑲𝐜𝐫 = = 40.8
10
𝟐𝝅
Pcr =
𝝎
7
PID Controller Dr.Wisam Esmat
𝟐𝝅
Pcr = =1.04
𝟔
Kp=18.36
𝑷𝒄𝒓 𝟏.𝟎𝟒
TI= = =0.866
𝟏.𝟐 𝟏.𝟐
𝑲𝒑 𝟏𝟖.𝟑𝟔
𝑲𝑰 = = = 21.2
𝑻𝑰 𝟎.𝟖𝟔𝟔
Kp= 24.48
TI=0.5 Pcr
TI=0.5 *1.04
TI=0.52
𝑲𝒑 𝟐𝟒.𝟒𝟖
𝑲𝑰 = = = 47.07
𝑻𝑰 𝟎.𝟓𝟐
𝑲𝒅 = 𝑲 𝒑 𝑻𝒅
𝑻𝒅 = 𝟎. 𝟏𝟑
𝑲𝒅 =24.48* 𝟎. 𝟏𝟑
𝑲𝒅 = 𝟑. 𝟏𝟖
8
PID Controller Dr.Wisam Esmat
Example (2): Determine the parameters of PI & PID controller by using the Z-N method
for the model which given as shown below:
1-Sub in eq(5), (TI=∞ & Td=0) then the eq(5) became (𝐾𝑐𝑟)
9
PID Controller Dr.Wisam Esmat
(𝒔+𝟗)
𝒄(𝒔) 𝒌𝒄𝒓 .
𝒔(𝒔+𝟑)(𝒔+𝟓)
= (𝒔+𝟗)
𝒓(𝒔) 𝟏+𝒌𝒄𝒓 .
𝒔(𝒔+𝟑)(𝒔+𝟓)
𝒌𝒄𝒓 (𝒔+𝟗)
𝒄(𝒔) 𝒔(𝒔+𝟑)(𝒔+𝟓)
= 𝒌 (𝒔+𝟗)
𝒓(𝒔) 𝟏+ 𝒄𝒓
𝒔(𝒔+𝟑)(𝒔+𝟓)
𝒄(𝒔) 𝒄𝒓 𝒄𝒓 𝒔𝒌 +𝟗𝒌
= 𝟑 𝟐 -------- (2)
𝒓(𝒔) 𝒔 +𝟖𝒔 +𝒔(𝟏𝟓+𝒌 )+𝟗𝒌 𝒄𝒓 𝒄𝒓
3-Take characteristic equation from equation (2). [ 0( ومساواته مع2( ]يعني إهمال بسط المعادلة
For eq(5)
𝝎𝟐 = (𝟏𝟓 + 𝒌𝒄𝒓 )
10
PID Controller Dr.Wisam Esmat
−𝟖(𝝎)𝟐 + 𝟗 𝑲𝐜𝐫 = 𝟎
−𝟏𝟐𝟎 + 𝑲𝐜𝐫 = 𝟎
𝑲𝐜𝐫 = 𝟏𝟐𝟎
𝑺𝒖𝒃 𝒊𝒏 𝒆𝒒 (𝟔)
𝝎 = √(𝟏𝟓 + 𝟏𝟐𝟎)
𝝎 = √𝟏𝟑𝟓
𝝎 = 𝟏𝟏. 𝟔
𝟐𝝅
Pcr =
𝝎
𝟐𝝅
Pcr = =0.54
𝟏𝟏.𝟔
Kp=54
𝑷𝒄𝒓 𝟎.𝟓𝟒
TI= = =0.45
𝟏.𝟐 𝟏.𝟐
𝑲𝒑 𝟓𝟒
𝑲𝑰 = = = 129
𝑻𝑰 𝟎.𝟒𝟓
11
PID Controller Dr.Wisam Esmat
Kp= 72
TI=0.5 Pcr
TI=0.5 *0.54
TI=0.27
𝑲𝒑 𝟕𝟐
𝑲𝑰 = = = 266
𝑻𝑰 0.27
𝑲𝒅 = 𝑲 𝒑 𝑻𝒅
𝑻𝒅 = 𝟎. 𝟎𝟔𝟕
𝑲𝒅 =72* 𝟎. 𝟎𝟔𝟕
𝑲𝒅 = 𝟒. 𝟖𝟔
12