You are on page 1of 50

Chapter 2 Identification

(Empirical Modeling)
Process Control Prof. Cai Wenjian 2
Lecture 3
1. Fundamentals of Empirical Modeling
2. Identification from Step Response
Process Control Prof. Cai Wenjian 3
What is Process Modeling?
Constructing process model from experimentally obtained
input/output data, with no recourse to physical nature and
properties of system.
What are three problems in control engineering?
Given input and model find
output?
Given output and model
find input?
Given input and output find
model?
Process Control Prof. Cai Wenjian 4
Purpose of Modeling
Improve Process Understanding: Simulation on dynamic and steady-state
process behavior before plant is constructed, model based simulation can
investigate process transient without disturb process.
Train plant operating personnel: Interfacing a process simulator with
standard process control equipment to create a realistic training environment,
train plant operators to run complex units and deal with emergency situations
Develop control strategy for new processes: Process dynamic model
allows alternative control strategies to be evaluated. For model-based
control strategies, process model is part of the control law.
Optimize process operating conditions: Use steady-state model to
recalculate optimum operating conditions to maximize profit or minimize
cost. Use steady-state process model and economic information to
determine most profitable operating conditions.
Process Control Prof. Cai Wenjian 5
Models Classification
Empirical model: obtained by fitting experimental
data.
Hybrid model: combination of the two; values
of some parameters in a theoretical model are
calculated from experimental data.
Theoretical model: developed using the
principles of chemistry, physics, and biology.
Process Control Dr. Cai Wenjian 6
Procedure of Empirical Modeling
Empirical modeling (identification) consists of following
steps:
1. Problem Definition Step 1. Problem Definition
2. Model Formulation Step 2. Model Formulation
3. Input function selection Step 3. Input function Selection
4. Parameter Estimation Step 4. Parameter Estimation
5. Model Validation Step 5. Model Validation
Flow Chart of Process Identification
Process Control Prof. Cai Wenjian 7
Step 1. Problem Definition
Different interpretation, resulting different models
same aspect but various angles, vary degree of complexity.
how simple or complex, will model have to be?
model only useful with tool available for solution
which aspects of process most relevant and be contained in model?
Impossible to represent all aspect of the physical process,
capture those aspects that most relevant to problem at hand.
what do we intend to use the model for?
Some modeling solved analytically, others by numerical
methods
how can we test the adequacy of model?
how much time do we have for the modeling exercise?
Procedure of Empirical Modeling
Process Control Prof. Cai Wenjian 8
Step 2. Model Formulation
In empirical modeling, we analysis of input/output data to detect
model form capable of explaining the observed behavior
( )
1
Ls
p
K
g s e
Ts

=
+
2
( )
( 1)
Ls
p
K
g s e
Ts

=
+
Four parameter model
1 2
( )
( 1)( 1)
Ls
p
Ke
g s
s s t t

=
+ +
( )
2
sL
p
e
g s
as bs c

=
+ +
Five parameter model Procedure of Empirical Modeling
1 2
( 1)
( )
( 1)( 1)
Ls
p
K s e
g s
s s

t t

+
=
+ +
( )
2
( 1)
sL
p
s e
g s
as bs c


+
=
+ +
Three parameter model
Process Control Prof. Cai Wenjian 9
Step 3. Input function Selection
Process information of output data dependent on input function.
Input should provide output rich in useful information and easily extracted.
Typical input functions used in process identification are:
Sine waves
Impulse#
Pulse (rectangular or arbitrary)#
White noise
Pseudo random binary sequences
Step#
Relay#
Procedure of Empirical Modeling
Process Control Prof. Cai Wenjian 10
Step 4. Parameter Estimation
After candidate model selected, estimate unknown
parameters.
Fitting experimental data to a predetermined model
form by finding the parameter values which provide
the best fit.
Estimating unknown parameters carried in time
domain or in the frequency domain.
Procedure of Empirical Modeling
Process Control Prof. Cai Wenjian 11
Step 5. Model Validation
-0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
Final step involves checking how the empirical model fits data it supposed to
represent.
Comparing model predictions with additional process data, and
evaluating the fit.
Time domain, response to certain signal
Frequency domain, Nyquist Plot. Procedure of Empirical Modeling
Process Control Prof. Cai Wenjian 12
Flow Chart of Process Identification
Process Control Prof. Cai Wenjian 13
Basic Requirement of Step Response
Obtain process model from a transient response experiment.
inject step input at the process
measure response
Requirement:
stable process
Amplitude of step input must be determined before test
sufficiently large so response is easily visible above noise level
as small as possible
not to disturb the process more than necessary
keep the dynamics linear.
Process Control Prof. Cai Wenjian 14
Theoretical Step-Response Expressions
/
( ) (1 )
t
y t AK e
t
=
First-order-plus-time-delay
Parameters: K, T.
( )
1
p
K
G s
Ts
=
+

>
<
=

t ); 1 (
t 0
) (
/ ) (
L e AK
L
t y
L t t
First-order-plus-time-delay
Parameters: K, , L.
Ls
p
e
Ts
K
s G

+
=
1
) (
Process Control Prof. Cai Wenjian 15
Graphic Method
( )
1
p
K
g s
s t
=
+
/
( ) (1 )
t
y t y e
t

=
A
y
K

= steady-state gain
Time Constant
Deepest Slop
/
( )
( )
max
t
y dy t
e
dt
y dy t
dt
t
t
t

=
=
tan to (0)
y
y t
t

=
t
Process Control Prof. Cai Wenjian 16
Graphic Method
Ls
p
e
Ts
K
s G

+
=
1
) (
when times greater than the time delay
) 1 ( ) (
/ ) ( t L t
e y t y

=
A
y
K

=
steady-state gain
Time Constant
Time Delay L:
t
Process Control Prof. Cai Wenjian 17
Two Points Method
( )
1
Ls
p
K
g s e
Ts

=
+
) 1 ( ) (
T
L t
e KA t y

=
y()% 28.4 39.3 55 59.3 63.2 77.7 86.5
time(t) T/3+L T/2+L 0.8T+L 0.9T+L T+L 1.5T+L 2T+L
t
1
and t
2
, the time when response
with value 28.4%and 63.2%
) ( 5 . 1
1 2
t t T =
) 3 ( 5 . 0
2 1
t t L =
Process model and step response
t
1
= T/3+L t
2
=T+L
Process Control Prof. Cai Wenjian 18
Lecture 4
Identification from Step Response (2)
Process Control Prof. Cai Wenjian 19
Log Method
( )
1
Ls
p
K
g s e
Ts

=
+
when times greater than the time delay
) 1 ( ) (
/ ) ( t L t
e y t y

=
y
y AK K
A

= =
t / ) ( L t
k
e
y
y y

ln
y y L t
y t t

| |

=
|
\ .
steady-state gain
Time Constant and Time Delay L:
Process Control Prof. Cai Wenjian 20
Log Method
Plot against t: a straight line with
slope of
intercept y-axis at L / .
meet the t-axis at the point t = L.
1/t
ln
y y L t
y t t

| |

=
|
\ .
Process Control Prof. Cai Wenjian 21
Area Method
0 0 0
( )/
0
[ ( ) ( )] ( ) [ ( ) ( )]
[1 (1 )]
L
L
ar
L
t L T
L
y y t dt y dt y y t dt
A
T
K K K
Kdt K e dt
T L
K


+
= = =

= = +
} } }
} }
Average residence time T
ar
is computed form the area of A
0
Process Control Prof. Cai Wenjian 22
Area Method
1
0
/
0
1
] 1 [ ) (

= = =
} }
KTe dt e K dt t y A
T
T t
T
ar
0 0 1 1
( )

ar
T
ar
e y t dt
A eA eA
T L T T
K K K K
= = = =
}
Measure and compute area A
1
under step response up to time T
ar
Than T and L can be estimated as
ar
T T L = +
Process Control Dr. Cai Wenjian 23
Time domain Evaluation
1
1
( ) ( ) ( ) ( ) ( )
Ls
b
Y s g s U s Y s e U s
s a

= = =
+
( ) ( ) ( )
1 1
y t a y t bu t L + =
( ) ( ) ( )
1 1
0 0
t t
y t a y t b u t L + =
} }
Process
Integrating n time, yields
For open loop step input
( )
0
( )
t
u t L A t L =
}
Process Control Dr. Cai Wenjian 24
Numerical Integration
Integral of a continuous time signal over
0,
f
t (

approximate
( )
0
0
0
( ) ( ) ( )
f
l
t
i
l s i
i
y d y t y t lT q y t t t o o o

=
~ + + =

}
T
s
: integration step size,
l: length factor of the integrator (a natural number);
-1
q
1
( ) ( ).
s
q y t y t T

=
unit delay operator
a
0
a
l
: coefficients
For trapezoidal integration rule, filter coefficients:
| |
0
, , 1, 1
2
s
l i s
T
T i l o o o = = = e
Process Control Dr. Cai Wenjian
25
FOPDT Process
( ) ( ) ( ) L t hb d y a t y
t
+ =
}
1
0
1
t t
( )
0
1 1 1
( ) ( )
( ) [ ]
[ ]
t
T
t y t
t y d h th
a b L b

t t
u
=

}
( ) ( ) t t e u = +
Define
1
1
( ) ( )
Ls
b
Y s e U s
s a

=
+
Process Control Dr. Cai Wenjian
26
Least Squares Solution
, A + + = I u
( ) I + + + =

T T
1

u
(
(
(

=
(
(
(

3 2
3
1
1
1
/ u u
u
u
L
b
a
Least Squares Solution
Taking N input output samples
Parameter solved
Must start t L >
1 1
1
2 2
1
1
( ) ( )
( ) ( )
, ,
( ) ( )
N N
t t
a
t t
b L
b
t t
|
|
u
|
( (
(
( (
(
( (
+ = I = =
(
( (
(
( (


Process Control Prof. Cai Wenjian 27
Working Example
8
1
( )
( 1)
g s
s
=
+
Process Control Prof. Cai Wenjian 28
Two Points Method
28.4%, t
1
= 6.2s
63.2%, t
2
= 8.64s
T = 1.5(t
2
- t
1
)
= 1.5(8.64 - 6.2) = 3.66s
L = 0.5(3t
1
- t
2
)
= 0.5(3*6.2 -8.64) = 4.98s
4.98
1
( )
3.66 1
s
g s e
s

=
+
K = y

/u = 1
Log Method
( )
ln( )
i i
y L
y T
y t
T
t

=
4.27;
/ 1.65
4.27 / 1.65 2.59
L
L T
T
=
=
= =
4.27
1
( )
2.59 1
s
g s e
s

=
+
K = y

/u = 1
For i=1N, calculate the
equation;
Draw a straight line which
best approximate the curve
Process Control Prof. Cai Wenjian 30
Area method
( ) ( ) ( ) ( )
0 1
A 1 1 1 / 2 7.9989 T y i y i
(
= + + =

( ) ( )
1 2
A 1 / 2 1.4960 T y i y i = + + = (

1
1.496 4.0665
eA
T e
K
= = =
0
7.9989 4.0665 3.9324
A
L T
K
= = =
3.9324
1
( )
4.0665 1
s
g s e
s

=
+
K = y

/u = 1
Process Control Prof. Cai Wenjian 31
Least Squares Method

I
303 matrix
301 vector
Sampling: (start after apparent time delay) 4 to 34,
Sampling time: 1s
( )
1
0.2843

0.2200
0.2875
T T
u

| |
|
= + + + I =
|
|
\ .
7653 . 0 2875 . 0 / 2200 . 0 2875 . 0 , 0.2843
3 1 1 1
= = = = = = L b a u u
4.7653
1
1
4.7653
0.2875
( )
0.2843
1.0113
( )
1 3.5174s 1
Ls s
Ls s
b
g s e e
s a s
K
g s e e
Ts


= =
+ +
= =
+ +
N = 30
Process Control Prof. Cai Wenjian 32
Verification (time domain)
Process Control Prof. Cai Wenjian 33
Verification (frequency domain)
Process Control Prof. Cai Wenjian 34
Lecture 5
Relay Feedback Method
Process Control Prof. Cai Wenjian 35
Identification from Relay Feedback
Procedure
Closed-loop I dentification
Generating Sustained Oscillation Generating Sustained Oscillation
Determine Critical Parameters Determine Critical Parameters
Approximate Transfer Functions Fourier series Analysis
Process Control Prof. Cai Wenjian 36
Generating Sustained Oscillation
Increased u by h, (e.g., 5%)
Bring the system to steady-state
Repeat to generate sustained oscillation
After L, y increase, relay switches to
opposite position,
Output-input phase lag: -, limit cycle
with period P
u
.
Identification from Relay Feedback
Process Control Prof. Cai Wenjian 37
Determine Critical Parameters
u
u
P
t
e
2
=
Limit cycle period P
u
, obtain
H, height of the relay;
a, amplitude of oscillation.
L, difference between e and y
Identification from Relay Feedback
Process Control Prof. Cai Wenjian 38
Fourier series Analysis
t a t e e sin ) ( =
0
1
( ) cos sin
2
n n
n
A
u t A n t B n t e e

=
= + +

}
}
=
=
t
t
e e
e e
2
0
2
0
sin ) (
cos ) (
t td n t u B
t td n t u A
n
n

=
=
1
sin ) (
n
n
t n B t u e

=
=
=

, 6 , 4 , 2 , 0
, 5 , 3 , 1 ,
4
n
n
n
h
B
n t
Input signal (e(t)) to relay: sinusoidal wave:
Output u(t) of relay: square wave:
u(t): odd-symmetric
(N(a): unbiased and symmetric)
A
0
and A
n
zero
Process Control Prof. Cai Wenjian 39
Describing function
Transfer function of nonlinear system.
only the first Fourier coefficient
2 2
1 1
( )
B A
N a
a
+
=
t a
h
a N
4
) ( =
For ideal relay, A
1
= 0, B
1
=4h/,
Process Control Prof. Cai Wenjian 40
Ultimate Gain
1 ( ) ( ) 0
u
N a g e + =
1 4
( )
( )
u
u
h
K N a
g j a e t
= = =
Relay feedback oscillation frequency
corresponds to limit of stability:
Ultimate gain (K
u
) becomes:
( ) 1
u u
K g je =
Results:
Process Control Prof. Cai Wenjian 41
Steady-state Gain
u
y
K
p
A
A
=
K
p
: compare input and output values at two different steady-states:
changes in u: small enough so it represents the linearized gain. highly nonlinear
processes, changes as small as 10
-3
to 10
-6
percent of full range
such small changes only feasible for mathematical steady-state gains
impractical to obtain reliable steady-state gains from plant data. (how to improve?)
Process Control Prof. Cai Wenjian 42
Transfer function Modeling
Once the model is selected, model parameters back-calculated from ultimate gain
and ultimate frequency equations.
( ) 1
u u
K g je =
| |
arg ( )
u
g je t =
Process Control Prof. Cai Wenjian 43
Three Parameter Model
Both T or K
p
needed to solve for time constant, if L available
( )
1
p Ls
p
K
g s e
Ts

=
+
2
( )
( 1)
p Ls
p
K
g s e
Ts

=
+
( )
2
1 1
1
u
p jL
u u p u
u
K
K e K K T
jT
e
e
e

= = +
+
1
tan
u u
L T e e t

=
tan( )
u
u
L
T
t e
e

=
( )
2
1
u
p
u
T
K
K
e +
=
( )
2
tan( ) / 2

1
u
u
u
p
u
L
T
T
K
K
t e
e
e

|
=

\
Process Control Prof. Cai Wenjian 44
Four Parameter Model
K
p
assume to be known
K
u
and L needed to solve for two time constants
1 2
( )
( 1)( 1)
Ls
p
Ke
g s
s s t t

=
+ +
1 1
1 2
2 2
1 2
tan ( ) tan ( )
1
[1 ( ) ][1 ( ) ]
u u u
p
u
u u
L
K
K
t e e t e t
e t e t

=
=
+ +
1 2
and t t
Process Control Prof. Cai Wenjian 45
Example: Wood and Berry column
Transfer function between top composition and reflux flow.
True value: K
u
=2.1,
u
=1.608
Relay feedback test: K
u
=1.71,
u
=1.615
Parameters calculated for
Model 1: (assume L=1 is known)
Model 2: (assume L=1 is known)
Model 3: (assume L=1 and K
p
are known)
12.8
( )
16.8 1
s
p
g s e
s

=
+
13.2
( )
14.8 1
s
p
g s e
s

=
+
2
1.12
( )
(0.59 1)
s
p
g s e
s

=
+
12.8
( )
(13.5 1)(0.0009 1)
s
p
e
g s
s s

=
+ +
Process Control Prof. Cai Wenjian 46
Fourier Transform Method
y(t) and u(t) are piece wise continuous and periodic, Laplace transform
0
1
( ) ( )
1
P
st
Ps
Y s y t e dt
e

}
0
1
( ) ( )
1
P
st
Ps
U s u t e dt
e

}
0
0
( )
( )
( )
( )
( )
P
st
P
st
y t e dt
Y s
G s
U s
u t e dt

= =
}
}
1 1
2 2
( )
( )
( )
Y j c jd
G j a jb
U j c jd
e
e
e

= = = +

1
0
( ) cos( )
P
c y t t dt e =
}
1
0
( )sin( )
P
d y t t dt e =
}
2
0
( ) cos( )
P
c u t t dt e =
}
2
0
( )sin( )
P
d u t t dt e =
}
1 2 1 2
2 2
2 2
1 2 1 2
2 2
2 2
( )
( )
( )
( )
c c d d
a
c d
c d d c
b
c d
+
=
+

=
+
Process Control Prof. Cai Wenjian 47
Working Example
8
1
( )
( 1)
g s
s
=
+
0 10 20 30 40 50 60 70 80 90 100
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Process Control Prof. Cai Wenjian 48
Three Parameter Model
0 10 20 30 40 50 60 70 80 90 100
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
4.5 L =
0.7442 a =
6 1 ?
u
P =
4
1.7183
u
h
K
a t
= =
Reading:
4.5
1
( )
2.4463 1
s
p
g s e
s

=
+
2
0.57
u
u
P
t
e = =
( )
2
1
1
2.4463
p
p u
u
K
K K
T
e
=

= =
Process Control Prof. Cai Wenjian 49
Model verification
0 5 10 15 20 25
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1


Step Response
Time (sec)
A
m
p
l
i
t
u
d
e
sys
G
Process Control Prof. Cai Wenjian 50
Summary
1. Time-saving, easy to use, automatically extracts
process response at an important frequency, facilitates
simple push-button tuning
2. Test under closed-loop to keeps the process in linear
region, good on highly nonlinear processes
3. No requirement for careful choice of sampling rate,
useful in initializing a more sophisticated adaptive
controller.
4. Can be modified to cope with disturbances and
perturbations to process.