You are on page 1of 69

Process Control for Chemical Engineers:

Design and Tuning of Single Loop


Control System

Muhammad Mufti Azis, Ph.D


Department of Chemical Engineering,
Faculty of Engineering
Universitas Gadjah Mada, Indonesia
Learning Objective:

• Student should be able to implement PID Controller


tunings for designing a feedback control system
• Student should be able to identify the pros and cons of
each tuning methods
Agenda:
• Tuning 1: Ziegler-Nichols Ultimate Cycle Method
• Tuning 2: Process Reaction Curve Method
• Tuning 3: Minimal Integration of Error Method
• Tuning 4: Direct Synthesis Method
• Tuning 5: Internal Model Controller (IMC) Method
Feedback Control System
Ysetpoint + Gc Gv Gp Youtput
-
Process control is fun

Gm

Gc=Transfer function of controller (typically PID type controller)


Gv=Transfer function of final control element or valve
Gp=Transfer function of the process or plant
Gm=Transfer function of a measurement device or sensor

From Block Diagram Manipulation, we learn that this system can be simplified as:
𝑌𝑜𝑢𝑡𝑝𝑢𝑡 𝐺𝑐 ∙ 𝐺𝑣 ∙ 𝐺𝑝
=
𝑌𝑠𝑒𝑡𝑝𝑜𝑖𝑛𝑡 1 + 𝐺𝑐 ∙ 𝐺𝑣 ∙ 𝐺𝑝 ∙ 𝐺𝑚

GOL (open loop tranfer


function)=Gc.Gv.Gp.Gm
Tuning Method 1: Ziegler-Nichols
Ultimate Cycle (1942)
Ziegler-Nichols Ultimate Cycle
• We will begin our tuning with the oldest/classic method of Ziegler-Nichols method which
was taken from their publication in 1942 entitled: Optimum settings for automatic
controllers. Trans. ASME, 759-768, 1942. This is perhaps the first tuning method available
and let’s put appreciation on their work.
• WIKIPEDIA: The Ziegler–Nichols tuning method is a heuristic method of tuning a PID
controller. It was developed by John G. Ziegler and Nathaniel B. Nichols. It is performed
by setting the I (integral) and D (derivative) gains to zero. The "P" (proportional) gain, Kc
is then increased (from zero) until it reaches the ultimate gain Ku, which is the largest
gain at which the output of the control loop has stable and consistent oscillations; higher
gains than the ultimate gain Ku have diverging oscillation. The value of ultimate gain Ku
and the oscillation period Pu are then used to set the P, I, and D gains depending on the
type of controller used and behavior desired.

John G. Ziegler (August 21, 1909 – December 9, 1997) was an


Nathaniel B. Nichols (1914–1997) was an American
American control engineer who made significant
control engineer who made significant contributions
contributions to the field of control theory. He is well known
to the field of control theory. He is well known for his
for his research paper on Ziegler-Nichols method, co-
book Theory of Servomechanisms, one of the most
authored with Nathaniel B. Nichols.
widely read books in control engineering
Ziegler-Nichols Ultimate Cycle
Methodology:
1. Plot the amplitude ratio (AR) and the phase angle of GOL as in standard Bode Diagram.
At this step, the controller is a proportional-only algorithm with the gain Kc set to 1.
2. Determine the critical frequency (ωc) and the AR at critical frequency.
3. Calculate the value of the controller gain for P-only controller that would result in the
feedback system being at the stability margin. The stability margin is characterized by
AR of 1 at critical frequency (ωc). Calculate the ultimate gain and ultimate period as:
1 2𝜋
Ultimate gain: 𝐾𝑈 = Ultimate period: 𝑃𝑈 = 𝜔
𝐺𝑝 (𝑖.𝜔𝑐 )𝐺𝑣 (𝑖.𝜔𝑐 )𝐺𝑚 (𝑖.𝜔𝑐 ) 𝑐

note: The value of Ku is similar to Gm with Kc=1

4. Calculate the controller tuning constant values


according to the Ziegler-Nichols closed-loop
tuning correlations as in Table 10.4

Source: Process Control, Designing Processes


and Control Systems for Dynamic
Performance, Thomas Marlin, 2015, McMaster
University
Ziegler-Nichols Ultimate Cycle
Example: Let us revisit an example from Part 5. FRA

Ysetpoint + Kc=1 1/s*1/(2s+3) 1/(s+2)2 Youtput


-
Gv Gp

1
Then, we obtain:
𝐾𝑐 clear all GM = wcg =
𝐺𝑂𝐿 = clc
𝑠 2𝑠 + 3 𝑠 + 2 2 close all 19.4372 1.0444
Kc=1;
Set the value of Kc=1 to yield: G1=tf(Kc,[1 0]); PM = wcp =
G2=tf(1,[2 3]);
1 G3=tf(1,[1 2]); 82.0781 0.0830
𝐺𝑂𝐿 = 2 G4=tf(1,[1 2]);
𝑠 2𝑠 + 3 𝑠 + 2 GOL=G1*G2*G3*G4;
[GM,PM,wcg,wcp]=margin(GOL)

Calculate Ku and Pu by using GM


and PM computation at Kc=1 as in Hence, Ku=19.4372 and
previous example in FRA part. Pu=2π/wcg= 2π/1.0444=6.0161
Ziegler-Nichols Ultimate Cycle
Our calculation shows that: Ku=19.4372 and Pu=6.0161
By using table 10.4 Marlin or in Table 12.4 in Seborg, we could calculate PID parameters for ZN based on
Frequency Response Analysis (FRA) technique.

Let’s suppose that we implement PI controller:


Kc=Ku/2.2=8.8351
TI=Pu/1.2=5.0134

The value of ZN can also be compared with


Tyreus-Luyben Setting as in Table 12.4

Now, let’s run simulation of disturbance rejection


The standard form of PID Controller in
and set-point change in SIMULINK ! Laplace Domain (Source: Marlin)
Ziegler-Nichols Ultimate Cycle
SIMULINK Block Diagram to facilitate Set point change and disturbance
rejection

1 unit step at time 100


(set point change)

1 unit step at time 0


(set point change)

1 𝑁
PID form in SIMULINK: 𝑃 + 𝐼 + 𝐷 1
𝑠 1+𝑁𝑠
1
Our standard PID: 𝐾𝐶 1 + + 𝑇𝐷 𝑠
𝑇𝐼 𝑠

Kc

Kc/TI
Ziegler-Nichols Ultimate Cycle
Simulation result:

Set-point change Disturbance rejection

• The simulation result shows that ZN parameters gave rather strong oscillation both during set
point change (servo mechanism) and disturbance rejection. In some cases, this oscillation is not
permissible.
• Many improvements have been made since 1942. There are hundreds of tuning correlations
available in literature. Some of them will be discussed here.
Tuning Method 2: Process Reaction
Curve
Process Reaction Curve
Example: Let us analyze a high order transfer function system as follows:

1 unit step at time 0


(set point change)

The open-loop response is:

This response can be approximated by a


first order plus time delay (FOPTD) model:

𝐾𝑝 ∙ 𝑒 −𝑡𝑑𝑠
𝐺𝑃 =
𝜏𝑠 + 1
Process Reaction Curve
Approximation of First Order Plus Time Delay Model (FOPTF) Method 1
Let’s modify our transfer function as follows:
5
𝐺(𝑠) =
2𝑠 + 3 𝑠 + 2 2

5
𝐺(𝑠) = 2
2 1
3 𝑠+1 ∙ 2 𝑠+1
3 2

5
𝐺(𝑠) = 12
2 1 1
3𝑠 + 1 2𝑠 + 1 2𝑠 + 1

We keep this term as the root of


this term, -1.5 is the closest to We can neglect this terms (the roots are
the imaginary axis -2). The root of -1.5 is closer to the
imaginary axis than -2
Process Reaction Curve
Let’s modify our transfer function as follows:
5
𝐺(𝑠) = 2
2𝑠 + 3 𝑠 + 2

5
𝐺(𝑠) = 2
2 1
3 𝑠+1 ∙ 2 𝑠+1
3 2

5
𝐺(𝑠) = 12
2 1 1
3𝑠 + 1 2𝑠 + 1 2𝑠 + 1

We keep this term as the root of


this term, -1.5 is the closest to We can neglect this terms (the roots are -2). The
the imaginary axis and we root of -1.5 is closer to the imaginary axis than -2
denote as the dominant pole
Process Reaction Curve
The time delay can be approximated from the neglected terms:
5
𝐺(𝑠) = 12
2 1 1
3𝑠 + 1 2𝑠 + 1 2𝑠 + 1
𝑛

𝑡𝑑 ≈ ෍ 𝜏𝑖
𝑖≠1
Hence, the FOPTD model is:

5 − 0.5+0.5 𝑠 5
∙ 𝑒 ∙ 𝑒 −𝑠
𝐺 𝑠 = 12 = 12
2 2
3 𝑠 + 1 3𝑠 + 1

There is also other approximation using SOPTD (Second Order Plus Time Delay)
𝐾𝑝 ∙ 𝑒 −𝑡𝑑 𝑠
𝐺𝑃 =
𝜏1 𝑠 + 1 𝜏2 𝑠 + 1
Process Reaction Curve
Comparison with the initial model:

1 unit step at time 0


(set point change)

1 unit step at time 0


(set point change) Time delay 1 s
Process Reaction Curve
Approximation of First Order Plus Time Delay Model (FOPTF) Method 2
FOPTD approximation can also be conducted by observing the response alone
according to empirical relation (Marlin Chap 6):

𝐾𝑝 ∙ 𝑒 −𝑡𝑑 𝑠
𝐺𝑃 =
𝜏𝑠 + 1 Gain

t28%=td+τ/3
t63%=td+τ

Gain=Δoutput/Δinput=0.4167/1=0.4167
τ=3/2*(1.8-1.02)=1.17
td=1.8-1.17=0.63 t63%≈1.80
Thus: t28%≈1.02
0.4167 ∙ 𝑒 −0.63𝑠
𝐺𝑃 =
1.17𝑠 + 1
Process Reaction Curve
Comparison of FOPTD method 2 with original model and FOPTD Method 1:

1 unit step at time 0


Time delay 0.63 s
(set point change)
Process Reaction Curve
Approximation of First Order Plus Time Delay Model (FOPTD) Method 3

FOPTD approximation can also be conducted by using Skogestad’s half rule as presented in
Seborg 3rd ed. Chapter 6 Page 100. Similar to previous exercise, the original model is:
5
𝐺(𝑠) = 12
2 1 1
𝑠+1 𝑠+1 𝑠+1
3 2 2
To apply Skogestad’s method, the largest neglected time constant has a value of 0.5.
According to his half rule, half of this value is added to the next largest time constant:
τ=0.67+0.25=0.92.
The other half provides a new time delay. The new total time delay=0.25+0.5=0.75.
The new FOPTD model is:

0.4167 ∙ 𝑒 −0.75𝑠
𝐺(𝑠) =
0.92𝑠 + 1
Process Reaction Curve
Comparison with original model and FOPTD Method 1,2,3:

1 unit step at time 0


Time delay 0.75 s
(set point change)
Process Reaction Curve
Once we obtain the FOPTD model, then we can estimate the PID parameters:

Note: This is Ziegler-Nichols


Method based on Process
Reaction Curve (PRC) which
also appeared in 1942 paper.
This is somewhat different
with ZN Ultimate Cycle

Source: Pao Chau,


Process Control: A First
Course with MATLAB,
Cambridge University
Press, 2002
Process Reaction Curve
Ok, now let’s demonstrate tuning method with PRC using FOPTD method:

5
𝐺𝑂𝐿 = 𝐺𝐶 ∙ 2
2𝑠 + 3 𝑠 + 2

𝐾𝑝 ∙ 𝑒 −𝑡𝑑 𝑠
Approximation of GOL with 𝐺𝑃 =
FOPTD Model: 𝜏𝑠 + 1

5
∙ 𝑒 −𝑠 0.4167 ∙ 𝑒 −0.63𝑠 0.4167 ∙ 𝑒 −0.75𝑠
𝐺 𝑠 = 12 𝐺(𝑠) =
2 𝐺𝑃 = 0.92𝑠 + 1
1.17𝑠 + 1
3𝑠 + 1
Method 1 Method 2 Method 3
We can now calculate PID parameters using the table as in previous slide
Process Reaction Curve
Let’s suppose to choose PI Controller with Cohen-Coon Method:
clear all
clc
𝜏 1 close all
𝐾𝐶 𝐾 = 0.9 +
𝑡𝑑 12
td=[1 0.64 0.75];
𝑡 tau=[2/3 1.17 0.92];
30 + 3( 𝜏𝑑 ) K=0.4167;
𝜏𝐼 = 𝑡𝑑 𝑡 KcK=0.9.*tau./td+1/12;
9 + 20( 𝜏𝑑 ) taui=td.*(30+3.*td/tau)/(9+20*(td/tau));

Kc=KcK./K;
P=Kc;
I=Kc./taui;

PID Parameters in SIMULINK:


P=[1.64 4.15 2.85] % FOPTD Method 1,2,3
I=[1.25 4.97 2.91] % FOPTD Method 1,2,3
Process Reaction Curve
Comparison results of PRC Tuning based on FOPTD model derived from Method
1,2,3 1 unit step at time 30
(disturbance rejection)

Set-point change Disturbance Rejection

1 unit step at time 0


(set point change)
With Cohen-Coon Method, it is clear that the FOPTD
model of method 2 and 3 are more oscillating
Tuning Method 3: Minimal Integration
of Error
Minimal Integration of Error
There are different ways to define the error function to be minimized. A few possibilities are
as follows:

1. Integral of the square error (ISE): 𝐼𝑆𝐸 = න 𝑒(𝑡) 2 𝑑𝑡
0

The ISE magnifies large errors. The resulting controller setting tends to have a high
proportional gain and the system is very underdamped

2. Integral of the absolute error (IAE): 𝐼𝐴𝐸 = න 𝑒 𝑡 𝑑𝑡
0

The IAE simply integrates the absolute value and puts equal weight to large and small
errors.

3. Integral of the time-weighted absolute error (ITAE): 𝐼𝑇𝐴𝐸 = න 𝑡 ∙ 𝑒 𝑡 𝑑𝑡
0
The time-weighting function puts a heavy penalty on errors that persist for long period
of time. The weighting function also helps to derive controller settings that allow for low
settling times.
Minimal Integration of Error
In MATLAB, the value of ISE, IAE and ITAE can be easily computed using:

e=error=Y-Ysp

IAE=trapz(t,abs(e));
ISE=trapz(t,e.^2);
ITAE=trapz(t,t’.*abs(e));

To demonstrate the use of IAE method, we can revisit the previous system and perform
disturbance rejection case. Using Cohen-Coon method, one of the PI suggested were 2.85 and
2.91. We can then perform scanning of PI values and calculate their IAE value. The best parameters
gave the smallest values of IAE.
Minimal Integration of Error
Let us revisit our previous system:

IAE=trapz(tout,abs(simout.Data))
Here is just a simple illustration when we scan the P from 2.5 to 3.5 and I from 2.5
to 3.5. You can use for loop to obtain more rigorous step

P=2.5 3 3.5
I=2.5 … … …
3 … … …
3.5 … … …
Minimal Integration of Error
Here is the illustration for P=2.5 and I=2.5 which gives:

IAE=trapz(tout,abs(simout.Data))
IAE=0.3177
P=2.5 and I=2.5

The scanning results of IAE computation is presented below:

P=2.5 3 3.5
It is indicative that
I=2.5 0.3177 0.2849 0.2653 P=3.5 and I=2.5 gave
3 0.3479 0.3052 0.2770 the smallest value of
IAE.
3.5 0.3922 0.3380 0.3017
Minimal Integration of Error
clear all
clc
close all
P = linspace(2,8,12);
I = linspace(1,6,10);
IAE=zeros(length(P),length(I));
for i = 1:1:length(P)
for j = 1:1:length(I)
P_exp = P(i);
I_exp = I(j);
%optimasi parameter PI
simout=sim('IAEcomputation');
load('Ydata.mat');
t=ans.Time;
IAEdata=ans.Data;
IAE(i,j)=trapz(t,abs(IAEdata));
end
end
imagesc(I,P,IAE)
grid on
xlabel('I values')
ylabel('P values')
colormap('jet')
colorbar

Here, we call Simulink from m-file.


Calculate IAE for various values of P and I This is IAEcomputation.slx. You can make
to get the IAE in a matrix form the P and I parameter opens by setting it
with P_exp and I_exp
Minimal Integration of Error
The result from scanning P and I parameters is presented below. It can be
shown that the lowest IAE value is obtained at P=6.909 and I=3.222 to give
IAE value of 0.2285
IAE=0.2285
Although it gives
P=6.9 and I=3.2 the smallest IAE,
but it oscillates
more. ITAE perhaps
would be better
criteria for this!

It can be compared with P=2.5 and I=2.5 below

Searching for the minimum IAE


by scanning P and I values
Minimal Integration of Error
Now, we would like to implement ITAE method by adopting FOPTD model of our
system. We can estimate the PID parameters using ITAE criterion for both setpoint
change and load change/disturbance rejection

By using FOPTD model:


𝐾𝑝 ∙ 𝑒 −𝑡𝑑 𝑠
𝐺𝑃 =
𝜏𝑠 + 1

Source: Pao Chau, Process Control: A First Course


with MATLAB, Cambridge University Press, 2002
Minimal Integration of Error
𝐾𝑝 ∙ 𝑒 −𝑡𝑑 𝑠
Approximation of GOL with 𝐺𝑃 =
FOPTD Model: 𝜏𝑠 + 1

5
∙ 𝑒 −𝑠
0.4167 ∙ 𝑒−0.63𝑠 0.4167 ∙ 𝑒 −0.75𝑠
𝐺 𝑠 = 12 𝐺𝑃 = 𝐺(𝑠) =
0.92𝑠 + 1
2 1.17𝑠 + 1
3𝑠 + 1
Method 1 Method 2 Method 3

Let us choose all FOPTD method 1,2,3, then we can now calculate P and I parameters
using the ITAE table as in previous slide for load change:
Minimal Integration of Error
P and I tuning using ITAE Method for load change
clear all
clc
close all

td=[1 0.64 0.75];


tau=[2/3 1.17 0.92];
K=0.4167;

a1=0.859;
a2=0.674;
b1=0.977;
b2=0.680;

Kc=a1./K.*(tau./td).^b1;
taui=tau./a2.*(td./tau).^b2;

P=Kc;
I=Kc./taui;

P=[1.3872, 3.7166, 2.5168]


I=[1.0645, 3.2269,2.1187]
Tuning Method 4: Direct Synthesis
Method

References: Seborg, Edgar, Mellichamp, Doyle, Process


Dynamics and Control 3th ed. , John Wiley & Sons, 2011
Direct Synthesis (DS) Method
A standard Feedback Control System can be shown as below:
Disturbance Gd

Ysetpoint Km + Gc Gv Gp +
+
Youtput
-

Gm

• In the DS method, the controller design is based on a process model and a desired
closed-loop transfer function.
• The DS approach provides valuable insight into the relationship between the process
model and the resulting controller.
• The DS method does produce PI or PID controller for common process models, as
demonstrated here.
Direct Synthesis (DS) Method
Disturbance Gd

Ysetpoint Km + Gc Gv Gp +
+
Youtput
-

Gm

For set point changes:


𝑌𝑜𝑢𝑡𝑝𝑢𝑡 𝐾𝑚 𝐺𝐶 𝐺𝑉 𝐺𝑃
=
𝑌𝑠𝑒𝑡𝑝𝑜𝑖𝑛𝑡 1 + 𝐺𝐶 𝐺𝑉 𝐺𝑃 𝐺𝑀

Let Km=Gm, and 𝐺 ≜ 𝐺𝑉 𝐺𝑃 𝐺𝑀

𝑌𝑜𝑢𝑡𝑝𝑢𝑡 𝐺 ∙ 𝐺𝐶
=
𝑌𝑠𝑒𝑡𝑝𝑜𝑖𝑛𝑡 1 + 𝐺 ∙ 𝐺𝐶
Direct Synthesis (DS) Method
We can rearrange the equation to yield:
𝑌ൗ
1 𝑌𝑠𝑝
𝐺𝐶 =
𝐺 1 − 𝑌ൗ
𝑌 𝑠𝑝

Now, let us introduce the model transfer function of 𝐺෨ (read G tilde) to approximate the
actual process of G. It is common that we don’t know the transfer function of actual
process and we then we can make approximation. In addition, Let us set a
𝑌 𝑌
𝑜𝑟 .Then the controller equation becomes:
𝑌𝑠𝑝 𝑌𝑠𝑝
𝑑𝑒𝑠𝑖𝑟𝑒𝑑 𝑑

𝑌ൗ
1 𝑌𝑠𝑝
𝑑
𝐺𝐶 =
𝐺෨ 1 − 𝑌
ൗ𝑌
𝑠𝑝 𝑑
𝑌
The specification of is the key design decision in DS tuning method. In addition,
𝑌𝑠𝑝
𝑑
1
the inverse of the process model, 𝐺෨ , is also distinguishing characteristic of model based
control.
Direct Synthesis (DS) Method
𝑌
Specification of 𝑌𝑠𝑝
𝑑
For a process without time delays, the first order model is a reasonable choice:

𝑌 1
=
𝑌𝑠𝑝 𝜏𝑐 𝑠 + 1
𝑑

Where 𝜏𝑐 is the desired closed-loop time constant and it is also our tuning
parameter. There is a guideline later on how to choose 𝜏𝑐 . By substitution, we can
obtain:
𝑌ൗ
1 𝑌𝑠𝑝 1 1
𝑑
𝐺𝐶 = = ∙
𝐺෨ 1 − 𝑌 𝐺෨ 𝜏𝑐 𝑠
ൗ𝑌
𝑠𝑝 𝑑
The term 1/𝜏𝑐 𝑠 provides integral control action and thus eliminate offset. Low 𝜏𝑐
makes the controller more aggressive and high 𝜏𝑐 makes the controller less
aggressive.
Direct Synthesis (DS) Method
𝑌
Specification of 𝑌𝑠𝑝
𝑑
For a process with time delays, the FOPTD model is a reasonable choice:

𝑌 𝑒 −𝜃𝑠
=
𝑌𝑠𝑝 𝜏𝑐 𝑠 + 1
𝑑

𝑌
Combining the with controller function as in previous procedure yields:
𝑌𝑠𝑝
𝑑
1 𝑒 −𝜃𝑠
𝐺𝐶 = ∙
𝐺෨ 𝜏𝑐 𝑠 + 1 − 𝑒 −𝜃𝑠

Now, lets expand the 𝑒 −𝜃𝑠 with truncated Taylor series:

𝑒 −𝜃𝑠 ≈ 1 − θ𝑠
Direct Synthesis (DS) Method
𝑌
Specification of 𝑌𝑠𝑝
𝑑
1 𝑒 −𝜃𝑠 1 𝑒 −𝜃𝑠
Hence, we can obtain: 𝐺𝐶 = ∙ = ∙

𝐺 𝑐𝜏 𝑠 + 1 − 𝑒 −𝜃𝑠 𝐺෨ (𝜏𝑐 + θ)𝑠

Notes:
𝑌
• The Gc above is set for FOPTD model. It is generally true and we will use for
𝑌𝑠𝑝
𝑑
later part when we derive the Gc.
• this controller also contains integral control action.
• it is not necessary to approximate time-delay term in the numerator, because it is
cancelled by the identical term in 𝐺,෨ when the time-delay is known exactly.

So far so good, Ok now let’s move to approximate the process model (𝐺)

Direct Synthesis (DS) Method
Estimation of 𝐺෨ or process model
Let us first assume that the G
෩ = G (perfect model). Next, we consider the common
FOPTD model as our G ෩ as shown below:
𝐾 ∙ 𝑒 −𝜃𝑠

𝐺(𝑠) =
𝜏𝑠 + 1
Here, again θ=td =time delay
𝑌
Rearrangement and substitution to controller transfer function with 𝑌𝑠𝑝
as FOPTD, we
𝑑
obtain:
1 𝑒 −𝜃𝑠 𝜏𝑠+1 𝑒 −𝜃𝑠 1 𝜏𝑠+1 1 𝜏 1 1 𝜏 1
𝐺𝐶 = ∙ = ∙ =𝐾∙ =𝐾 + = 𝐾𝜏 1 + 𝜏𝑠
𝐺෨ 𝜏𝑐 +𝜃 𝑠 𝐾∙𝑒 −𝜃𝑠 𝜏𝑐 +𝜃 𝑠 𝜏𝑐 +𝜃 𝑠 𝜏𝑐 +𝜃 𝜏𝑐 +𝜃 𝑠 𝑐 +𝜃

1
Now, let us compare with standard PI controller transfer function as: 𝐺𝐶 = 𝐾𝑐 (1 + )
𝜏𝐼 𝑠
Then, it is easy to see that:
1 𝜏
𝐾𝐶 = and 𝜏𝐼 = τ
𝐾 𝜏𝑐 + 𝜃
Direct Synthesis (DS) Method
Estimation of 𝐺෨ or process model
Now let’s suppose that we approximate our model with second order plus time delay
model (SOPTD) model:
𝐾 ∙ 𝑒 −𝜃𝑠

𝐺(𝑠) =
𝜏1 𝑠 + 1 𝜏2 𝑠 + 1
Here, again θ=td =time delay
Rearrangement and substitution to controller transfer function as previous
procedure can obtain a standard PID transfer function as:
1
𝐺𝐶 = 𝐾𝑐 (1 + + 𝜏𝐷 𝑠)
𝜏𝐼 𝑠
To speed up the explanation and skip the math procedure, we can finally arrive at the
final form:
1 𝜏1 + 𝜏2 𝜏1 𝜏2
𝐾𝐶 = and 𝜏𝐼 = 𝜏1 + 𝜏2 and 𝜏𝐷 =
𝜏1 + 𝜏2
𝐾 𝜏𝑐 + 𝜃
Direct Synthesis (DS) Method
Estimation of 𝐺෨ or process model
Now let’s suppose that we approximate our model with second order plus time delay
model (SOPTD) model:
𝐾 ∙ 𝑒 −𝜃𝑠

𝐺(𝑠) =
𝜏1 𝑠 + 1 𝜏2 𝑠 + 1
Here, again θ=td =time delay
Rearrangement and substitution to controller transfer function as previous
procedure, we can then obtain a standard PID transfer function as:
1
𝐺𝐶 = 𝐾𝑐 (1 + + 𝜏𝐷 𝑠)
𝜏𝐼 𝑠
To speed up the explanation and skip the math procedure, we can finally arrive at the
final form:
1 𝜏1 + 𝜏2 𝜏1 𝜏2
𝐾𝐶 = and 𝜏𝐼 = 𝜏1 + 𝜏2 and 𝜏𝐷 =
𝜏1 + 𝜏2
𝐾 𝜏𝑐 + 𝜃
Direct Synthesis (DS) Method
Demonstration example:
Let’s suppose that we have a SOPTD process model:
2 ∙ 𝑒 −𝑠
𝐺(𝑠) =
10𝑠 + 1 5𝑠 + 1

Consider three values of τc =1,3 and 10, evaluate the controllers for unit step
change in both set point and the disturbance, assuming that Gd=G. Assume that
the process model is perfect (𝐺෨ = 𝐺) and plot the response with SIMULINK.

First we have to calculate the PID parameters using the formula of:

1 𝜏1 + 𝜏2 𝜏1 𝜏2
𝐾𝐶 = and 𝜏𝐼 = 𝜏1 + 𝜏2 and 𝜏𝐷 =
𝜏1 + 𝜏2
𝐾 𝜏𝑐 + 𝜃
Direct Synthesis (DS) Method
We compute the PID parameters using the formula of:
1 𝜏1 + 𝜏2 𝜏1 𝜏2
𝐾𝐶 = and 𝜏𝐼 = 𝜏1 + 𝜏2 and 𝜏𝐷 =
𝜏1 + 𝜏2
𝐾 𝜏𝑐 + 𝜃

clear all
clc
close all

td=[1 0.64 0.75];


tau=[2/3 1.17 0.92];
K=0.4167;

a1=0.859;
a2=1.03;
b1=0.977;
b2=0.680;

Kc=a1./K.*(tau./td).^b1;
taui=tau./a2.*(td./tau).^b2;

P=Kc;
I=Kc./taui;

Here is to compare 3 tauc values


Direct Synthesis (DS) Method
Previous calculation gives:

The result of PID parameter tuning


with DS method

tauc= [1 3 10];
Kc= [3.75 1.875 0.6818]
tauI=15;
tauD=3.33;
Direct Synthesis (DS) Method
There are some notes for DS method:
𝑌
• It is common to assume as FOPTD model. In a certain situation it is not
𝑌𝑠𝑝
𝑑
possible to assume FOPTD. For instance, a process contains a RHP zero term
𝑌
denoted by (1-τas) where τa > 0. The use of standard as FOPTD model will
𝑌𝑠𝑝
𝑑
cause unstable process. Hence, this problem can be avoided by replacing
𝑌
as:
𝑌𝑠𝑝
𝑑 𝑌 (1 − 𝜏𝑎 𝑠)𝑒 −𝜃𝑠
=
𝑌𝑠𝑝 𝜏𝑐 𝑠 + 1
𝑑

• The DS approach should not be used directly for process models with unstable
poles. However, it can be applied if the model is first stabilized by an additional
feedback control loop.
Tuning Method 5: Internal Model
Control (IMC) Method

References: Seborg, Edgar, Mellichamp, Doyle, Process


Dynamics and Control 3th ed. , John Wiley & Sons, 2011
IMC Method
• A more comprehensive model-based design method, Internal Model Control
(IMC), was developed by Morari and coworkers.
• IMC and DS are closely related and produce identical controllers if the design
parameters are specified in a consistent manner.
• IMC has advantages that it allows model uncertainty and tradeoff between
performance and robustness to be considered in a systematic fashion.
• Comparison between conventional feedback control system and IMC are shown
below:
IMC Method

As seen in the figure of IMC model, we used IMC controller as Gc* which gives output P.
The output P will be used for process model 𝐺෨ and output ෩𝑌. In general, ෩𝑌≠𝑌 due to
modeling errors ( ෩𝐺≠G) and unknown disturbance that are not accounted in the model
(D≠0).

It can be shown that the two block diagrams are equivalent if the controllers Gc and Gc*
satisfy the relation:
𝐺𝐶∗
𝐺𝐶 =
1 − 𝐺𝐶∗ 𝐺෨
Thus, any IMC controller Gc* is equivalent to a standard feedback controller Gc, and vice
versa.
IMC Method
By using block diagram manipulation, the IMC model can be described as:

𝐺𝐶∗ 𝐺 1 − 𝐺𝐶∗ 𝐺෨
𝑌= 𝑌𝑠𝑝 + 𝐷
1+ 𝐺𝐶∗ (𝐺 − 𝐺෨ ൯ 1 + 𝐺𝐶∗ (𝐺 − 𝐺෨ ൯

For a special case of a perfect model where 𝐺෨ = 𝐺, then the above equation reduces to:

𝑌 = 𝐺𝐶∗ 𝐺 𝑌𝑠𝑝 + (1 − 𝐺𝐶∗ 𝐺)𝐷

The IMC controller is designed in two steps:


Step 1. The process model is factored as
𝐺෨ = 𝐺෨+ ∙ 𝐺෨−

Where 𝐺෨+ contains any time delays and RHP zeros. In addition, 𝐺෨+ is required to have a
steady-state gain equal to one in order to ensure that the two factors are unique.
IMC Method
Step 2. The IMC controller is specified as
1
𝐺𝐶∗ = 𝑓
𝐺෨−
Where f is the low-pass filter with a steady-state gain of one. It typically has the form:
1
𝑓=
(𝜏𝑐 𝑠 + 1)𝑟
The same as in DS method, 𝜏𝑐 is the desired closed-loop time constant. The usual choice
is r=1. The resulting IMC controller 𝐺𝐶∗ is guaranteed to be physically realizable and stable.

For the ideal situation where 𝐺෨ = 𝐺, by substitution we can obtain:


𝑌
= 𝐺෨+ ∙ 𝑓
𝑌𝑠𝑝
The IMC and DS design methods can produce equivalent controllers and identical closed-
𝑌
loop responses, even when modeling errors are present. This equivalence is set
𝑌𝑠𝑝
𝑑
𝑌
equal to in the equation above. Recall also the relation between Gc* and Gc as
𝑌𝑠𝑝
𝐺𝐶∗
𝐺𝐶 =
1 − 𝐺𝐶∗ 𝐺෨
IMC Method

Example: Use the IMC design method to design controller for the FOPTD model
𝐾 ∙ 𝑒 −𝜃𝑠

𝐺(𝑠) =
𝜏𝑠 + 1
By using Pade approximation we know that:
𝜃
1− 𝑠
𝑒 −𝜃𝑠 = 2
𝜃
1+2𝑠

Thus:
𝜃
𝐾 ∙ (1 − 2 𝑠)

𝐺(𝑠) =
𝜃
(1 + 2 𝑠) 𝜏𝑠 + 1

Then we can factorize the above equation to:

𝐺෨ = 𝐺෨+ ∙ 𝐺෨−
IMC Method
Where:
𝜃
𝐺෨+ = 1 − 𝑠
2
𝐾
𝐺෨− =
𝜃
(1 + 2 𝑠) 𝜏𝑠 + 1

We know that:
𝜃
1 (1 + 2 𝑠) 𝜏𝑠 + 1 1
𝐺𝐶∗ = 𝑓= ∙
𝐺෨− 𝐾 𝜏𝑐 𝑠 + 1

The Gc can be obtained through substitution:


𝜃

𝐺𝐶 (1 + 𝑠) 𝜏𝑠 + 1
𝐺𝐶 = = 2
1 − 𝐺𝐶∗ 𝐺෨ 𝜃
𝐾 ∙ 𝜏𝑐 + 𝑠
2
The Gc can now be compared with the standard PID controller:
1
𝐺𝐶 = 𝐾𝑐 (1 + + 𝜏𝐷 𝑠)
𝜏𝐼 𝑠
IMC Method
Through substitution and comparison with standard PID Controller, we obtain:
𝜏 𝜏
1 2 +1 𝜃
𝐾𝐶 = 𝜃 𝜏𝐼 = + 𝜏 𝜏𝐷 =
𝜏 2 𝜏
𝐾2 𝑐 +1 2 𝜃 +1
𝜃

Selection of 𝜏𝑐
The choice of 𝜏𝑐 is a key decision in both the DS and IMC design methods. In general,
increasing 𝜏𝑐 produces a more conservative controller because Kc decreases while 𝜏𝐼
increases. Several IMC guidelines for 𝜏𝑐 have been published for the FOPTD model
𝜏𝑐

𝜃
> 0.8 𝑎𝑛𝑑 𝜏𝑐 > 0.1 ∙ 𝜏 Rivera et al., 1986

• τ > 𝜏𝑐 > θ Chien and Fruehauf, 1990


• 𝜏𝑐 = θ Skogestad, 2003
IMC Method
IMC Tuning Relations:
• Table 12.1 presents the PID controller tuning relations for the parallel form that were
derived by Chien and Fruehauf (1990) for common types of process models.
• The IMC filter f was selected according to:
1
𝑓=
(𝜏𝑐 𝑠 + 1)𝑟
with r=1 for first order and second order models.
• For models with integrating elements, the following expression was employed:
2𝜏𝑐 − 𝐶 𝑠 + 1 𝑑 𝐺෨−
𝑓= where C = อ
(𝜏𝑐 𝑠 + 1) 2 𝑑𝑠
𝑠=0
• For some process models, two controllers are listed (e.g. G and H, and also M and
N). For these models, the PI controllers in the first row was derived based on the
time-delay model approximation of first order Taylor series while the PID controller
in the next row was derived based on Pade approximation.
IMC Method
IMC Tuning Relations:
This is to follow the standard PID
controller transfer function:
1
𝐺𝐶 = 𝐾𝑐 (1 + + 𝜏𝐷 𝑠)
𝜏𝐼 𝑠
IMC Method

There is possibility to use different form of PID Controller setting such as parallel
form and series form. Table 12.2 provides conversion table for both PID controller
setting:
IMC Method
Demonstration example:
A process model for a liquid storage system is given by Chien and Fruehauf
(1990) as:
𝐾 ∙ 𝑒 −7.4𝑠

𝐺(𝑠) =
𝑠
Use table 12.1 to calculate PI and PID controller settings for K=0.2 and 𝜏𝑐 =8 and 15 !
By using part M and N in table 12.1 we can obtain:
IMC Method
Demonstration example:
PID parameter calculation in Matlab
clear all
clc
close all

theta=7.4;
tauc=[8 15];
K=0.2;
%PI Setting in M
Kc1=1./K.*(2.*tauc+theta)./(tauc+theta).^2;
tauI1=2.*tauc+theta;

%PID setting in N
Kc2=1./K.*(2.*tauc+theta)./(tauc+theta./2).^2;
tauI2=2.*tauc+theta;
tauD2=(tauc.*theta+theta.^2./4)./(2.*tauc+theta);
IMC Method
Demonstration example:
PID parameter calculation in Matlab

Kc τI τD
PI (τc=8) 0.493 23.4 -
PI (τc=15) 0.373 37.4 -
PID (τc=8) 0.855 23.4 3.12
PID (τc=15) 0.535 37.4 3.33
IMC Method
Demonstration example:
IMC Method
Demonstration example:

Simulation result for PI controller Simulation result for PID controller


setting using IMC tuning relation setting using IMC tuning relation
Conclusions
• In this part, we have demonstrated 5 tuning methods for PID control
system.
• In general they can be classified as empirical tuning method (ZN
ultimate cycle, PRC and Minimal Integration of Error) and model
based system (DS and IMC)
• Both theoretical and simulation methods have been presented.
Simulation helps us to visualize better the PID tuning process.
• Modern Process Control relies more on model based system (DS and
IMC) therefore it is also important for you to understand the concept
of DS and IMC
References of this course:
I have used several Process Control text books to develop this course. Here are the
major references of this course:

Luyben Marlin Chau


Notes: I like the modeling Notes: It is freely available and Notes: I like this book as it really used MATLAB to
concept of Luyben and the way rather thick. I only used up to handle almost ALL problems in Process Control.
he divides his book into time, chapter 12 in this book. FRA and Zn The book is rather thin and quite comprehensive.
Laplace and FRA domains. methods are good as we used the Tuning method based on empirical models as
Many challenging modeling conversion table here. This book well as numerous tricks were taken from this
problems found here. Yet, No contains small examples of MATLAB book. Limited SIMULINK Exercise in this book
MATLAB in this book demo in this book
References of this course:

Seborg Bequette
Notes: This is also a modern Process Control book with emphasize in
Notes: I would say this is a modern book for Process Control course. It is
simulation using MATLAB and Simulink. Many god examples are
new and fresh by putting emphasize on simulation. A number of
presented in this book. A number of SIMULINK and Matlab Modules
examples were solved with MATLAB and Simulink. The problems here
were given in this book.
are also comprehensive. I have used all materials from this book for
describing the IMC and DS tuning methods. In addition, they also
presented a number of modern problems such as dynamic modeling in
biological system. I would say, we are also heading to the same direction
to tackle dynamic system of biology.
Closing remark

Two roads diverged in a wood, and I—


I took the one less traveled by,
And that has made all the difference

Robert Frost, The Road Not Taken, 1916

You might also like