Ccp-Unit2-Ravi Book PDF
Ccp-Unit2-Ravi Book PDF
Ccp-Unit2-Ravi Book PDF
T T
E
INTRODUCTION
_ A model is an image of a dynamic system. A dynamic system is shown
in Fig. 3.1. The dynamic system is driven by input variables u(t) and
disturbances vet). The user can control u(t) to obtain desired output yet).
For a dynamic system the control action at time t will influence the output
at time instants s > t. t > 0.
Disturbance
v(t)
Concentration C 1 Concentration C z
h
Volume V
Concentration C
1. Mathematical Modeling -
I
2. System Identification
System identification is the field modeling dynamic syste~l or process
from experimental data. So it is an exper:::nental approach. Some
experiments are performed on the process' to collect input and output
data. Then a model is fille~ to the eAperimental data by assigningJsuitable
values to its parameterer. -
For example the model to be fitted is
yes)
R(s) - 't5+1
Where,
K- Process steady state gain
t - Tinle constant (in seconds)
Delay time (in seconds)
From experimental data, the process parameters such as K, 't and td
are estimated using system identification technique.
Start )
T
Construct an Priori knowledge
experimental setup of the model
!
Conduct an experiment
and collect data
-r
Determine / choose
model structure '';')
!
Choose method to
estimate parameters
! -
M('Idel validation
,
~----- -----I
I
I
I
No
~ew d'ata set'
Model
Accepted? I
Yes
StoQ
Fig. 3.3: Schematic Flowchart of-System Identification
Step 1: Construct an experimental set~p for the given process or plant.
Step 2: Conduct an experiment by exciting the process (usipg input
signal as step, sinusoidal or random signal) and observing
its input and output over a time interval and record it for
preprocessIng.
Step 3: Detern~ine /choose appropriate luodel structure (typically
linear differential equation of a certain order).
Step 4: Choose a suitable satistically based method to estimate the
unknown parameters of the model (such as coeficients in the
differential equation).
Note: In practice, the estimations of structure and parameters are
often done· iteratively.
Ste·p 5: The model obtained is validated to test whether it is an exact
model of the process. If the model is correct the identificafion
process wIll be stoped.· Otherwise the identification process
will be repeated by selecting new. experimental data, new
model structure (complex structure if. required), new
estimation methods· etc.
C' E F
s CAT
4.1 INTRODUCTION
This chapter describes four different non parametric m~thods for
system identification. Non-parametric identification methods are
characterised by. the property that the resulting models arc curves or
functions whichare not' necessarly paramaterized by a finite dimensional
parameter vector. In this, method estimated parameters will have some
physical insight of the process.
The four different non parametric methods for system identification are
1. Transient Analysis
In transient analysis, input is applied as a step or impulse and
recorded output helps to idendify model. Fig. 4.1 shows the transient
response of ~ first order syst~m with delay (~s~ l)tO a unit step input.
From Fig. 4.1, we can easily estimate model parameters such as steady
state gain K, time constant 't and delay time td·
y
K'~----'---==----
l-_-L-~----~t
~ t ~. ~ _I
Fig. 4.1: Response of a first order system with delay ( G ( s) =n K+ 1 e-',' ) to a unit step
2. Frequency AnalysJs
The input is sinusoidal. For a linear system the output will also be
sinusoidal at steady state. The change in amplitude and phase will give
the frequency response (Example: bode plot). From the frequency response
the model will be estimated.
3. Correlation Analysis .
The weighting function h(K) is' used in this method to model the
process.
00
Spectral Analysis:
Equation (4.1) is used as a model in spectral analysis. The model can
be estimated for arbitrary inputs by dividing the cross-spectrum (between
output and Input) to the input spectrum.
yes)
... (4.2)
U(s)
K l-------,-----:=::::::----
Step response
L...---L----L.-------.t
I. T ~I~ T~I
Fig. 4.4: Step response of FOOT system to a unit step ~nput
Identifying Second Order Model
Let us consider a second order system which IS described as a
transfer function model as shown below
Y(s)
... (4.2)
U(s)
. Y(t)
First Maxima
Second Maxima
I
K I
I .
I
I
I
I
: First minima:
t
t1 t2 t3
Fig. 4.6: Step response of a second order syst~m to a unit step input
The gain K is given by final value (after convergence) as shown in
Figure,4.6. The maxima and Minima of the step response occur· at times .
... (4.4)
n = 1, 2, ....
... (4.6)
"":logM
, 8 = ... (4.7)
From (4.7) and (4.8) the parameters 8 and COo can be determined.
Yet) ;-,
/' '\ ~Y(t)
I . 'f
\
\
\
\
I
I
I
I
uG) I
I
, I
\ I
" .... ,., /
- . fh('t:)asin(co(t-'t:»)d't:
o .'
t' (i~(t-'t)
e . -e -iro(t-T»)
- fh(t)a' 2i .' d't:
o
t
_ ~ fh('t:)(eiro(t-T) _ e-iro(t~T»)d't: .
o
_ f t
~ h ('t:) (e irot e-iror - e-irot e+i(l)t ) d't:
o
t t
_ ~ e imt fh(,)e(-iID')d~ _ e- imt fh(~)e-(-im')d~
o' 0 .
' y \. y
G(iro) G(-iro)
Since we can represent
G(iro) - re ie
Where, r = magnitude of G(iro) - I GUro) I
e = argument of G(iro) - eiarg G(iO)
= :.IG(iro)lsin(rot + argG(iro))~
~~ .
r-----------~--------~
I I
I w I
'~ft~t ----':~ L h(K)u (t-K) ...-...;..:_-Ii"' O~~~)ut
I 1(::.0 I
I I
I I
----------------------
System
Where
ryu('t) = Cross covariance function between output yet) and input u(t)
- EY (t + 't) u (t)
ru('t) - Covariance function of input u(t)
- Eu (t + 't) u (t)
Note: E is called expected value = meanvalue
Conduct <l.n experiment and collect Input u(t) and Output yet) data.
The covariance functions in (4.18) can be estimated from the Input and
Output data as
N-max('r,o)
- ~ L Y(t+'t)u(t) 't = 0, ±1, ±2, .. : ... (4.19)
N to=l-min(:r,o)
N-.
- ~N I: u(t+'t)u(t)
t=l
1\
ru (--r) -
1\
ru (-r) -r = 0, 1, 2, ...
Where
N - Numbe'r of experimental data
J\ J\
J\
r u (0) r u (00) J\
... (4.21)
J\ J\
ryu (0)
r u (0)
. [h(O) ryu (1)
h(l)
ru (0)
·lh(~)
From the above equation, the weighting function {h(K)} \i.e,h(O), h(l), ... ,
h( (0) can be easily estimated.
Where,
yet) - Output Signal
u(t) - Input Signal.
h(t) - Weighting sequence
vet) - Disturbance term
The system described in (4.23) is shown in Figure 4.9
Taking discrete fourier transforms for the system described in (4.23)~
the following relation for the spectral densities can be derived from cross
covariance function described in (4.18).
,
... (4.24)
Where
~Yu (co) - Cross spectral density between Input u(t) and
Output yet)
... (4.25)
_ Lh(K)e- iKm
K=O
Now the transfer function. H(e-i (() can be estimated from (4.24) as .
... (4.27)
N
-1 ~
1\
~u ((0) = 1\
~ ru ( 't) e -ItCO
•
. ... (4.28)
2n .
1:=-N
~YU (00) = 2~ L L
1:=-N t=l-min(t,O)
Y(tH)U(t)e-itro ... (4.29)
Next make the substitution s = t + 'to Figure 4.10 illustrates bow to
derive the limits for the new' summation index.
Since
_ e-ism . e itm
We get,
. . -_ _ ~ ---,."-J- ~_--"
... (4.30)
Where,
N
YN(ro) - Ly(s)e-i5(~ = Discrete fourier transform 'of yet)
5=1
N .
UN(ro) - L u(s)e- i5m = Discrete fourier transform of u(t)
s=l
Similarly,
1
-. 2rrN I I U(S)U(t)e-ISWe-ItW
N N .' .
s=J. t=1
... (4.31)
II.
~yu(~)
II.
~u(w)
... (4.32)
K I----~---,..----~=-
KI (' Transient
"
.. I respons~ to
.~ • c· _:" a unit step ,input
,.. I ..-,-
" ~ t
J~ T ~I~ td-./
The change in amplitude and phase will give the frequency r~sp ~ . onse
(example bode plot). Fro~ the frequency respo~se,. the lnudel will
be estimated. \
4. What is correlation analysis method for system identification?
The model used in correlation analysis is
co
E E
5.1 INTRODUCTION
A parametric method can be characterised as a maping from the
recorded data to the estimafed .pa~ameter vector. TQ~ estimated
parameters donot have any physical insight of the process. The various.
parametric methods of system identificution are
1. Least squares (LS) estimate
~. Prediction error method (PEM)
3. Instrumental variable .(IV) method.
- [-y(t - 1) u(t-l)][:]
- <j>T (t) 8 ... (5.3)
8 =
[:]
The elements' of <j>(t) are often called regression variables or
regressors while yet) is called the regressed variable. The 8 is called,
parameter vector. The variable t takes ~nteger values.
lExample 5.2 .
t I .""',:-,~
. . ~.~~~~ :~~'~'~~~
Consider a truncated weighting f~~~ilon<.inodel. '
yet) = h o u(t) + hI u (t - 1) + ... '+ 'hni~1 u(t- M + 1)
The input signal u(t) ... u(t - M + 1) are recorded during the
experiment. Hence regression' variables ,
<I> (t) - (u(t) u(t - .1) ... u (t - M + 1» is a M - vector of
,known quantities. and parameter vector.
(8 -; cho hI hm_1)T is' a 1V1-Ve~tor of unknown
p!i;ameters
, ,
to be estimated.
Y(l) - ~T (1) 8
Y(2) - ~T (2) 8
YeN) = ~T (N) 8
This can be written in matrix notation as
Y = <D8 ... (5.4)
Where,
Y(l)
Y- an (N x 1) vector '" (5.5a)
Y(N)
One way to find 8 from (5.4) would of course be to choose the number
of measurements, N to be equal to n. Then <D becomes a square matrix. If
this matrix is non singular the linear system of equations (5.4) could easily
be solved for 8. In practice, however noise, disturbances and model misfit
are good reasons for using a number of experimental data 'N' greater than
'n'. With the possible to get an improved estimate. When N > n, exact
solution for linear system of equations (5.4) in general not exist.
... (5.7)
Note:
The other form of loss functions are
V(S) = 1 T '8
-8 ... (5.8a)
2
... (5.8b)
... (5.10)
Note:
1. The matrix <1>T<1> is positive definite.
2. The form (5.9) of the least squares estimate can be rewritten in
the equivalent form
... (5.11)
Disturbances
Process
Regulator
Estimated
parameters
Recursive
identifier
Where, ~(t) - [-yet -1), ... , -y(t - n a ) u(t - 1) ... -u(t - nb)]
Note:
If we replace t by (t - 1) in (5.17), we get
8(t-l) = P(t-l)[~HS)Y(S)]
8(t-l)P-1(t-l) = [~HS)Y(S)] . ... (5.18)
By substituting (5.16)
•
. P(t-1)~(t)
K(t) = - ... (5.23)
[1 + <l>T (t)P(t-1)~(t)J
1\
E(t) - yet) - ~T (t)8(t-1)
pet -1)<j>(t)
K(t) -
[1 + <j>T(t)P(t-1)~(t)J
TWO MARKS OUESTIONS AND ANSWERS
1. Define parametric method of system identification.
A parametric nl thod cun b :1 aracterised as a maping from thE:
recorded data to the estinul L ·et parameter vector. The estimated
parameters do not have :1ny physical insight of the proces;'. The
various parametric methods of system identificati on are
1. Least squres (LS) estimate
N
Vee) = !2.I(Y(t) -q? (t)et
t=l .
This means that if there is an estimate a(t -1) based on data upto
A
8
time (t - 1) then a(t) is computed by some 'Simple modification' of (t- 1) .
This method is a central part of adaptive systems. .
The various recursive identification methods are
1. Recursive least squ.ares method
2. Real time identification method
3. Recursive instrumental variable method
4. Recursive prediction error method
7. What are the advantages of recursive identification method?
• They are central part of adaptive system
-
• Requires less primary memory
• They can be easily modified into real-time algorithms, aimed at
tracking time-varying parameters.
• U·sed in fault detection algorithm.
8. Write down recursive least square (RLS) algorithm.
The RLS algorithm consists of
1\ 1\ .
pet)
_ P(t-I) _ P(t-l)<j>(t)<j>T (t)P(t-l)
[1 + <j>T (t) P (t - 1) <j> (t )]