Professional Documents
Culture Documents
Continuous: System Identification Problem
Continuous: System Identification Problem
discrete {v(k)}
B( z 1 )
U(z) z n + Y(z)
A ( z 1 )
G(z)
where
1 1 na
A ( z ) 1 a1z ana z
B( z 1 ) b1z 1 b2 z 2 bnb z nb 283
giving the difference equation:
y( k ) a1 y( k 1) ana y( k na )
b1u( k n 1) b2 u( k n 2) bnb u( k n nb ) ( k )
n
and z represents an extra delay of n sampling
instants.
identification problem
determine n, na, nb (structure)
estimate a1 , a2 , , ana
(parameters)
b1 , b2 , , bnb
284
ARMAX model (autoregressive moving average with
exogenous variables)
(z) C ( z 1 )
A ( z 1 )
V(z)
H(z)
U(z) B( z 1 ) Y(z)
z n
A ( z 1 )
+
G(z)
where A ( z 1 ) 1 a1z 1 ana z na
B( z 1 ) b1z 1 b2 z 2 bnb z nb
1 1 nc
C( z ) 1 c1z cnc z 285
giving the difference equation:
y ( k ) a1 y ( k 1) ana y ( k na )
b1u( k n 1) b2 u( k n 2) bnb u( k n nb )
( k ) c1 ( k 1) cn ( k nc )
c
identification problem
determine n, na, nb, nc (structure)
estimate a1 , a2 , , an
a
b1 , b2 , , bnb (parameters)
c1 , c2 , , cnc 286
General Prediction Error Approach
u(t) y(t)
Process
-
e(t,)
Predictor with +
adjustable
parameters
Algorithm for
minimising some
function of e(t,)
288
Example of MATLAB Identification Toolbox Session
-1
-2
0 5 10 15 20 25
INPUT #1
-1
0 5 10 15 20 25
289
input and output data
MATLAB statements and results:
(ARX n, na = 2, nb = 2)
Results:
0.5
-0.5
-1
-1.5
64 65 66 67 68 69 70 71 72
Time
1
0. 0666 0 .0445 z
ARX model: G( z) z 3
1 12737
. z 1 0.3935z 2 291
MATLAB Demo
292
ADAPTIVE CONTROL
PERFORMANCE
ASSESSMENT &
UPDATING
MECHANISM
K J Astrom disturbances
regulator fast
parameters varying
REGULATOR PROCESS
ref + _
parameters slowly
varying
+ PID
controller Process
_
F
KG
1
1 I
T sJ
H Ts Ki
d
model
ideal
regulator ym output
parameters
adjustment
mechanism
uc y
u
regulator process
actual
output
298
The parameters of the regulator are adjusted such
that the error e = y - ym becomes small. The key
problem is to determine an appropriate adjustment
mechanism and a suitable control law.
MIT rule adjustment mechanism
d e
e
dt
where determines the adaptation rate. This rule
changes the parameters in the direction of the
negative gradient of e2
299
Combining the MIT rule with the control law: u (uc y )
and computing the sensitivity derivatives
e
produces the scheme:
ym
model
filter
integrator e _
s e
multiplier +
+
process
uc _ u y
multiplier
process parameters
design estimation
regulator
parameters
uc y
u
regulator process
actual
output
301
The process parameters are updated and the
regulator parameters are obtained from the solution
of a design problem. The adaptive regulator consists
of two loops:-
(i) inner loop consisting of the process and a
linear feedback regulator
(ii) outer loop composed of a parameter estimator
(recursive) and a design calculation. (To obtain
good estimates it is usually necessary to
introduce perturbation signals)
Two problems:-
(i) underlying design problem
(ii) real time parameter estimation problem
302
Example - SIMULINK Simulation of MRAS
reference
error
1/s -K- * -
+
Integrator g1 mult e
1/s -K- * 1
Integrator1 g2 mult_ s+2
filter_
* + 0.5
- Mux
to s+1
feedback
Input error process Mux reference,
Mux output,
command
Mux1 *
so
parameters
303
Input, Reference and Actual Outputs
0.8
0.6
0.4
0.2
-0.2
0 50 100 150
Time (second) 304
MATLAB Demo
305
INTRODUCTION TO THE KALMAN FILTER
State Estimation Problem
w(t) v(t)
SYSTEM
307
Construction of the Kalman-Bucy Filter
u(t) SYSTEM y(t)
x(t)
A
x
x y(t )
u(t)
B + z C + _ + y(t)
FILTER L(t)
x(t )
Filter equation :- x Ax Bu L(t )(y Cx Du)308
Filter equation :- x Ax Bu L(t )(y Cx Du)
L(t) is a time dependent matrix gain.
The estimation problem is now to find L(t) such that
the error between the real states x(t) and the estimated
states x(t ) is minimized. This can be formulated as:
min E GF
[x(t ) x
(t )] [x(t ) x
T I
(t )]J
L (t ) H K
R E Kalman
309
Duality Between the Optimum State Estimation
Problem and the Optimum Regulator Problem
It can be shown that the optimum state estimation problem:
min E F[
Gx(t ) (
x t )]T [x(t ) x
(t )]I
J
L (t ) H K
subject to:
x Ax Bu Gw
y Cx Du v
xˆ Axˆ Bu L(t )(y Cxˆ Du)
E(ww )=Q, E(vv )=R
T T
1
L(t ) R CS(t )
311
Linear Quadratic Estimator Design Using MATLAB
312
Example:
x1 x2
x2 x1 w(t ) , E ( w 2 (t )) 1
y x1 v (t ) , E (v (t )) 3
2
0.5562 313
0.1547
giving the filter equations:
x x l ( y y )
1 2 1
x x l ( y y )
2 1 2
y x1
314
w(t) v(t)
u(t) = 0 x2 x1 y(t)
1 1
+ +
s s
-1
SYSTEM
-1
1
x2 1
x1 _ +
+ +
s s
y y
l1
l2
FILTER
315
x2 ( t ) x1 ( t )
SIMULINK SIMULATION
vt
WS1
wt
1.7
WS2
v(t) sqrt(R)
PLANT
1 + +
- 1/s 1/s +
sqrt(Q) - x2 x1 y
w(t) meas(y)
+ +
- - e1t
y-Cx e1 WS3
- 1/s + Mux
+ + 1/s
_ x2hat __ x1hat Mux1 x1/x1hat
+ e2t
-
0.556 e2 WS4
l1 Mux
0.155
Mux x2/x2hat
l2
KALMAN FILTER
316
Comparison of actual (solid) and measured (dash) states
2
x1
0
-2
-4
-6
2
x2
0
-2
-4
-6
5
0
-5
-10
265 270 275 280
319
MATLAB Demo
320