Indcon 02 Chapter5 PID Controller Tuning 14-9-02
Indcon 02 Chapter5 PID Controller Tuning 14-9-02
First Semester
1402-1403 Tuning of PID Controllers
Industrial Control
فصل پنجم
فهرست مطالب
اهمیت تنظیم پارامترهای کنترل کننده ها .1
تنظیم دستی پارامترها .2
تنظیم با روش Ziegler–Nichols .3
تنظیم با روش های مبتنی بر مدل .4
تنظیم با روش های بدون مدل .5
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
کتاب مرجع
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Definition
Tuning is the procedure of adjusting the feedback controller parameters to
obtain a specified closed-loop performance.
For operation in a range of operating conditions, a compromise must be
reached in arriving at an acceptable set of tuning parameters.
1 𝑇𝑑 𝑠
𝐶 𝑠 = 𝐾𝑐 (1 + + )
𝑇𝑖 𝑠 1 + 𝜏𝑑 𝑠
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Design criteria
PID by MATLAB
DC gain is 0.05
Steady-state error IS 0.95
Rise time is about one second
Settling time is about 1.5 seconds
PID by MATLAB: Proportional Control
we have a closed-loop
system with no overshoot,
fast rise time, and no
steady-state error.
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
• Series with
Derivative Filter:
10 s + 1 4 s + 1
Gc ( s ) = 2
10 s 0.4 s + 1
Bode plot of PID controller
The PID gain bode plot is shown below illustrating the effect of changing only
the proportional factor (KP). As can be seen, increasing KP not only increases
the mid-frequency range proportional factor, but also lowers the frequency at
which the integration factor ceases effectiveness and raises the frequency at
which the differential factor begins to kick in. The effect of lowering KP is also
illustrated.
Bode plot of PID controller
Rate adjustment narrows and widens the The notch can be made high and narrow or
right side of the notch low and wide
Bode plot of PID controller
Increasing the differential gain (KD) lowers the frequency at which it has more
impact than the proportional factor (KP). This introduces positive phase shift
in the proportional range to help offset the negative phase shift from the
integration factor KI, thereby improving the phase margin and reducing the
ringing. It has the undesirable effect, however, of increasing the high
frequency gain, making the system more noise sensitive and encouraging the
undesirable effects of natural resonances.
Bode plot of PID controller
PB Reset Rate
Flow
P or PI control can be used with low controller gain. Use PI control for more accuracy
with high integration activity. Derivative control is not considered due to the rapid
fluctuations in flow dynamics with lots of noise.
Kc = 0.4-0.65 Ti = 6s
Level
P or PI control can be used, although PI control is more common due to inaccuracies
incurred due to offsets in P-only control. Derivative control is not considered due to the
rapid fluctuations in flow dynamics with lots of noise.
The following P only setting is such that the control valve is fully open when the vessel
is 75% full and fully closed when 25% full, being half open when 50% filled.
Kc = 2 Bias b = 50% Set point = 50%
For PI control:
Kc = 2-20 Ti = 1-5 min
Trial and error calculations
Pressure
Tuning here has a large range of possible values of Kc and Ti for use in PI control,
depending on if the pressure measurement is in liquid or gas phase.
Liquid
Kc = 0.5-2
Ti = 6-15 s
Gas
Kc = 2-10
Ti = 2-10 min
Temperature
Due to the relatively slow response of temperature sensors to dynamic temperature
changes, PID controllers are used.
Kc = 2-10
Ti = 2-10 min
Td = 0-5 min
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Step 1. After the process has reached steady state (at least
approximately), eliminate the integral and derivative control
action by setting:
TD= zero
TI = the largest possible value
Step 2. Set KP equal to a small value (e.g., 0.5) and
place the controller in the automatic mode.
Step 3. Gradually increase KP in small increments
until continuous cycling occurs. The term continuous
cycling refers to a sustained oscillation with a
constant amplitude.
Ultimate gain, Ku - The numerical value of KP that
produces continuous cycling (for proportional-only
control)
Ultimate period, Pu - The period of the corresponding
sustained oscillation
Ziegler and Nichols method: Continuous Cycling Method
(a)KP<KU (b)KP=KU
Frequency (rad/min)
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
𝑨𝟐 𝟏
≈
𝑨𝟏 𝟒
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Tangent Method
The time constant is then defined as the distance in the time axis between the point
where the tangent crosses the initial steady state of the output variable and the point
where it crosses the new steady-state value. The dead time is the distance in the time
axis between the occurrence of the input step change and the point where the tangent
line crosses the initial steady state.
t0 𝝉 𝒕𝟏
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Two-Points Method
The two-point method makes use of the 63.2% point (t=𝝉) defined in the tangent-and-
point method as well as one other point: where the step response reaches 28.3%
(t=𝝉/𝟑) of its total steady-state change.
𝝉 = 𝟏. 𝟓(𝒕𝟏 − 𝒕𝟐 )
𝒕𝟎 = 𝒕𝟏 − 𝝉
0,632 k
0,283 k
𝒕𝟐 𝒕𝟏
t0 𝝉 𝒕𝟏 t0
Tangent-and-Point Method Two Points Method
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
P 𝝉/Kt0 - -
PI 0.9𝝉/Kt0 o.33t0 -
Uncontrollability parameter
It also allows us to define the ratio of dead time to time constant as the
uncontrollability parameter of the loop:
𝒕𝟎
𝑷𝒖 =
𝝉
Where:
𝒕𝟎 = process dead time
𝝉 = process time constant
𝑻
𝒕𝟎 + 𝟐𝒔
𝑷𝒖 =
𝝉
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Step test:
0.8 mA (5%) change in controller output causes a SS change in temperature of 5.0 C.
Step Response
0.8 mA change in controller output causes a SS change in temperature of 5.0 C.
Assume the transmitter range for the steam heater is 50°C to 150°C.
𝟐𝒉
Relay Auto-Tuning
Example
Heat Exchanger Temperature Control: PI versus PID Performance with QDR Tuning.
To tune the proportional-integral (PI) and the proportional-integral-derivative (PID)
controllers for QDR response on the temperature controller, use the process
parameters estimated by the tangent method:
K= 1.0 % C.O. /% T.O. 𝝉= 0.86 min 𝒕𝟎 =0.12 min
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Gain Adjustment
✓ For good response to disturbances, when Pu is between 0.1 and 0.5, use the
formula:
𝟐𝝉
𝑲′𝒄 =
𝑲𝒕𝟎
✓ When Pu is less than 0.1 or greater than 0.5, you should use one half
this gain as the starting value.
✓ For optimum response to changes in set point, when Pu is in the range 0.1 to 0.5
and when using a PI controller, the following formula is appropriate:
𝟎. 𝟔𝝉
𝑲𝒄 =
𝑲𝒕𝟎
✓ For optimum response to changes in set point, when Pu is in the
𝟎.𝟖𝟑𝝉
range 0.1 to 0.5 and using a PID controller, use this formula: 𝑲𝒄 =
𝑲𝒕𝟎
✓ For 5 percent overshoot on set point changes, use the following formula:
𝟎. 𝟓𝝉
𝑲𝒄 =
𝑲𝒕𝟎
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Example: Heat Exchanger Temperature Control QDR versus IMC
This example compares the tuning of a PID controller using QDR tuning versus
IMC tuning. The QDR tuning parameters of the PID controller are the same as
previous example.
Recall that these parameters were obtained from the process parameters estimated
by the tangent method. By contrast, the process parameters estimated by the two-
point method are used to tune the IMC controller.
This is because the two-point method is simpler and more reproducible than the
other two methods. The process parameters are as follows:
K= 1.0 % T.O. /% C.O. 𝝉= 0.56 min 𝒕𝟎 =0.17 min
IMC tuning rules
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Example: Heat Exchanger Temperature Control QDR versus IMC
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Example: Heat Exchanger Temperature Control QDR versus IMC
To compare the performance to set point changes, the IMC gain must be adjusted to
the value recommended for set point changes.
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Where the gain of the IMC controller has been taken as one half the gain
given for disturbance inputs because the uncontrollability parameter is less
than 0.1. Notice that the gains are rather high, which indicates very tight
control.
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Notice that in this case the IMC formulas call for a faster integral
time than do the QDR formulas. The IMC gain is half the one
predicted for disturbance inputs because the uncontrollability
parameter is greater than 0.5.
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
✓ For very controllable processes, high controller gains are possible, but
they should be avoided when large variations in the controller output
may upset the process.
1
𝐺𝑐 𝑠 = 𝐾𝑃 (1 + 𝑇𝑑 𝑠 + )
𝑇𝑖 𝑠
𝑗
𝐺𝑐 𝑗𝜔 = 𝐾𝑃 1 + 𝑗𝜔𝑇𝑑 −
𝜔𝑇𝑖
At any frequency 𝜔0
𝑗
𝐺𝑐 𝑗𝜔0 = 𝐾𝑃 1 + 𝑗𝜔0 𝑇𝑑 − = 𝑟𝑐 𝑒 𝑗 𝜋+𝜑𝑐
𝜔0 𝑇 𝑖
At the ultimate frequency
𝐾𝑃 = 0.6𝐾𝑢 , 𝜔𝑢 𝑇𝑖 = 𝜋 , 𝜔𝑢 𝑇𝐷 = 𝜋ൗ4
𝑗
𝐺𝑐 𝑗𝜔𝑢 = 𝐾𝑃 1 + 𝑗𝜔𝑢 𝑇𝑑 − = 0.6𝐾𝑢 (1 + 𝑗(𝜋Τ4- 1Τ𝜋)) = 0.6𝐾𝑢 1 + 𝑗0.407 =
𝜔𝑢 𝑇 𝑖
°
0.6622𝐾𝑢 𝑒 𝑗25
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
2
1 𝑟𝑏
𝐾𝑃 1 + 𝜔0 𝑇𝐷 − =
𝜔0 𝑇𝐼 𝑟𝑎
1
𝜔0 𝑇𝐷 − = tan(𝜑𝑏 − 𝜑𝑎 )
𝜔0 𝑇𝐼
𝑟𝑏
𝐾𝑃 1 + tan2 (𝜑𝑏 − 𝜑𝑎 ) =
𝑟𝑎
𝑟𝑏
𝐾𝑃 = 𝑐𝑜𝑠(𝜑𝑏 − 𝜑𝑎 )
𝑟𝑎
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
𝑇𝐷 = 𝛿𝑇𝐼
1
𝑇I = (tan 𝜑𝑏 − 𝜑𝑎 + 4𝛿 + tan2 𝜑𝑏 − 𝜑𝑎 )
2𝜔0 𝛿
1
𝑇D = (tan 𝜑𝑏 − 𝜑𝑎 + 4𝛿 + tan2 𝜑𝑏 − 𝜑𝑎 )
2𝜔0
By changing 𝛿, you can decide on the relative effects of integral and derivative terms
based on our previous discussions.
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
𝑡0
𝑡0
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
EXAMPLE
𝑮𝒂𝒊𝒏 = 𝟏. 𝟎 %𝑻. 𝑶./%𝑪. 𝑶.
Process gain= 1%/%, time constant=0.62 min, dead time= 0.13 min
𝑲𝒄 %/% 𝑻𝑰 , 𝒎𝒊𝒏
Example 1:
Consider a 4th-order system:
𝟏
𝑮 𝒔 =
𝒔(𝒔+𝟏)(𝒔+𝟐)(𝒔+𝟑)
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Example 2
A 4th-order system with a repeated pole.
𝟏
𝑮 𝒔 =
(𝒔 + 𝟏)𝟒
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers
Dr Ahmad Afshar Industrial Control
First Semester
1402-1403 Tuning of PID Controllers