Adaptive Control – Landau, Lozano, M’Saad, Karimi
1
Adaptive Control Chapter 5: Recursive plant model identification in - - PowerPoint PPT Presentation
Adaptive Control Chapter 5: Recursive plant model identification in open loop 1 Adaptive Control Landau, Lozano, MSaad, Karimi Chapter 5: Recursive plant model identification in open loop 2 Adaptive Control Landau, Lozano,
Adaptive Control – Landau, Lozano, M’Saad, Karimi
1
Adaptive Control – Landau, Lozano, M’Saad, Karimi
2
Adaptive Control – Landau, Lozano, M’Saad, Karimi
3
Adaptive Control – Landau, Lozano, M’Saad, Karimi
4
Adaptive Control – Landau, Lozano, M’Saad, Karimi
5
Adaptive Control – Landau, Lozano, M’Saad, Karimi
6
Adaptive Control – Landau, Lozano, M’Saad, Karimi
7
s clock
s s s N
1
− s
R
Adaptive Control – Landau, Lozano, M’Saad, Karimi
8
power amplifier filter
u(t) y(t)
inertia d.c. motor . tacho generator
M
TG
Adaptive Control – Landau, Lozano, M’Saad, Karimi
9
0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.5
10
a) p = 1 dB
0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.5
10
b) p = 2 dB
0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.5
10
c) p = 3 dB f/fs
N=8
Adaptive Control – Landau, Lozano, M’Saad, Karimi
10
Adaptive Control – Landau, Lozano, M’Saad, Karimi
11
B A
complexity penalty term error term (should be unbiased) S(n,N) n CJ (n) J (n) minimum nopt
ˆ ˆ
n n
B A
Adaptive Control – Landau, Lozano, M’Saad, Karimi
12 u(t) y(t)
Plant ADC Discretized plant
+
estimation algorithm
y(t)
Estimated model parameters ) ( ˆ t θ Adjustable discrete-time model
DAC + ZOH
Adaptive Control – Landau, Lozano, M’Saad, Karimi
13
1 1 1 1 1 1 − − − − − − − −
d d
1 1 1 1 1 − − − − −
A A
n n
1 1 1 1 1 − − − − −
B B
n n
1 1
Tψ
− −
B A
n n T
1 1
B A T
u y
Adaptive Control – Landau, Lozano, M’Saad, Karimi
14
1 1
Tψ
− −
Plant Model
T
Estimated model
T
Prediction error (a priori) Parameter adaptation algorithm (P.A.A.)
2 1 2 1 1 1
− −
T
Adaptive Control – Landau, Lozano, M’Saad, Karimi
15
1 1
Tψ
− −
Plant Model
T
Estimated model
B A
n n T
1 1
B A T T
+
Disturbance P.A.A
y(t) u(t)
Adjustable Predictor ) (
0 t
ε
y°(t)
>
y(t-1)
1 −
q
See functions: rls.sci(.m)
Regressor vector
Adaptive Control – Landau, Lozano, M’Saad, Karimi
16
Adaptive Control – Landau, Lozano, M’Saad, Karimi
17
=
N i
1
= −
N i T
1 1
(*)
Adaptive Control – Landau, Lozano, M’Saad, Karimi
18
) 1 ( ) ( ) 1 ( ) ( ) 1 ( + + = + + = + t w t t w t t y
T T
φ θ ψ θ
= − =
1 1 1
N t T N t
1 1
− = ∞ →
N i N
Condition for asymptotic unbiased estimation
noise regressor (observation) vector
It is necessary that φ(t-1)(the regressor) and w(t) be uncorrelated
(***) (**)
Adaptive Control – Landau, Lozano, M’Saad, Karimi
19
Tφ
1 1
− = ∞ →
N i N
(****)
necessary condition
Adaptive Control – Landau, Lozano, M’Saad, Karimi
20
Adaptive Control – Landau, Lozano, M’Saad, Karimi
21 + + u(t) y(t) 1 A q-d B A e(t)
) ( ) ( ) ( ) ( ) ( : 1
1 1
t e t u q B q t y q A S
d
+ =
− − −
(Recursive) Least Squares Ouput Error(O.E.) Instrumental Variable…
+ + u(t) y(t) 1 q-d B A e(t) CA
) ( ) ( / 1 ) ( ) ( ) ( ) ( : 4
1 1 1
t e q C t u q B q t y q A S
d − − − −
+ = Generalized Least Squares
+ + u(t) y(t) A q-d B A e(t) C
) ( ) ( ) ( ) ( ) ( ) ( : 3
1 1 1
t e q C t u q B q t y q A S
d − − − −
+ = Extended Least Squares O.E. with Extended Prediction Model (Recursive) Maximum Likelihood
~ 64% % of use: ~ 1% % of use: ~ 2% % of use:
+ + u(t) y(t) q-d B A w(t)
) ( ) ( ) ( ) ( ) ( ) ( : 2
1 1 1
t w q A t u q B q t y q A S
d − − − −
+ = ~ 33% % of use:
u and w are independent
Adaptive Control – Landau, Lozano, M’Saad, Karimi
22
Perturbation PROCEDE A.A.P. PREDICTEUR AJUSTABLE q
y(t) +
u(t) φ( t- 1) ) ε
ο
θ(t ) > > (t)
) ( ; 2 ) ( ; 1 ) ( ) ( ) ( ) ( ) ( ) 1 (
2 1 2 1 1
> < ≤ ≤ < Φ Φ + = +
−
F t t t t t F t t F
T
λ λ λ λ
Adaptive Control – Landau, Lozano, M’Saad, Karimi
23
1 1 1
1 1 1
One replaces e(t) par ε(t)
1 1 1
T
1 1 1
T T
T T
1 1 1
Adaptive Control – Landau, Lozano, M’Saad, Karimi
24
2 2 2 1
−
C B A T
1 1 1
C B A
n n n T =
Can explain the non convergence for some noise ;
Adaptive Control – Landau, Lozano, M’Saad, Karimi
25
ω ω
j j
ω Continuous time s σ ω
j
R
e H
Im H z = e
j ω
Discrete time z
R
e z 1
+
j j
z = e
ω j
s = j R
e H
Im H H (e
ω
)
j
Re H < 0 Re H > 0 Re H < 0 Re H > 0 H ( ω)
j
Adaptive Control – Landau, Lozano, M’Saad, Karimi
26
1 1 1
1 1 1 1
1 1 1
T
1 1 1
) ( ), ( ), ( ˆ ) ( ) ( ; ) ( ˆ ), ( ˆ ), ( ˆ ) ( ˆ
1 1 1
t t u t y t t t h t b t a t
T T
ε φ θ − = = Φ =
Instead of y(t) in RELS
Adaptive Control – Landau, Lozano, M’Saad, Karimi
27
1 1
Tψ
− −
Estimated model Plant Model
B A
n n T
1 1
B A T
T
a posteriori
a priori
Plant Disturbance P.A.A
+
u(t)
Adjustable Predictor
y°(t)
>
) (
0 t
ε
y°(t-1)
>
1 −
q
1 1
T
− −
B A
n n T
1 1
Regressor vector
Adaptive Control – Landau, Lozano, M’Saad, Karimi
28
;
2 2 2 1
−
Adaptive Control – Landau, Lozano, M’Saad, Karimi
29
T
T T
f
1 1 − −
1
f
−
An estimation of the polynomial A(q-1)
2 2 2 1 1
− −
B A
n n T
1 1
B A T
Adaptive Control – Landau, Lozano, M’Saad, Karimi
30
1 1 − −
1
f
−
Estimation of polynomial A(q-1) provided by the algorithm itself
1 1 − −
1 = −
Adaptive Control – Landau, Lozano, M’Saad, Karimi
31
Normalized autocorrelations
number
1 N 2.17 N 97%
pratical value :
+
y y ε Plant Model q-1 q-1 ARMAX (ARARX) predictor
Whiteness Test
+
y y ε Plant Model q-1 Output Error Predictor
Uncorrelation Test
Adaptive Control – Landau, Lozano, M’Saad, Karimi
32
1 2
=
N t
max 1
N t
=
max
Adaptive Control – Landau, Lozano, M’Saad, Karimi
33
max 1
,..., 2 , 1 , ; ) ( ˆ ) ( 1 ) ( i i i t y t N i R
N t
= − = ∑
=
ε
max 2 / 1 1 2 1 2
,..., 2 , 1 , ; ) ( 1 ) ( ˆ 1 ) ( ) ( i i t N t y N i R i RN
N t N t
= ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎣ ⎡ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ =
= =
ε ) , max(
max
d n n i
B A
+ =
1 1
d − − −
max
Adaptive Control – Landau, Lozano, M’Saad, Karimi
34
Adaptive Control – Landau, Lozano, M’Saad, Karimi
35
Scilab Functions Matlab functions Description estorderls.sci estorderls.m Order estimation with the least squares criterion estorderiv.sci estorderiv.m Order estimation with the instrumental variable criterion nrls.sci nrls .m Non recursive Least squares rls.sci rls.m Recursive least squares rels.sci rels.m Recursive extended least squares
Output Error(recursive) foloe.sci foloe.m Output error with filtered observations afoloe.sci afoloe.m Output error with adaptive filtered observations xoloe.sci xoloe.m Output error with extended prediction model
Validation of plant models identified in open loop
Adaptive Control – Landau, Lozano, M’Saad, Karimi
36
Measured
Upper bound for the order
>> help estorderiv
B A
Order of a discrete time system:
Excitation
V - vector of the error criterion V=[V(0) V(1) V(2) ….]^T,where V(0)=1 S – vector of penalty coefficients. Model complexity n is penalized VS – normalized vector of penalized criterion VS=V+S S n VS V minimum n opt
Adaptive Control – Landau, Lozano, M’Saad, Karimi
37
>> help rls lam1=1;lam0=1 : decreasing gain (default algorithm) 0.95<lam1<1; lam0=1 : decreasing gain with fixed forgetting factor 0.95<lam1,lam0<1 : decreasing gain with variable forgetting factor (typical value :0.97)
Initial adaption gain (Fin=1000 by default)
1
Measured
Excitation Model
Model Polynomials (identified)
Adaptive Control – Landau, Lozano, M’Saad, Karimi
38
>> help oloe lam1=1;lam0=1 : decreasing gain (default algorithm) 0.95<lam1<1; lam0=1 : decreasing gain with fixed forgetting factor 0.95<lam1,lam0<1 : decreasing gain with variable forgetting factor (typical value :0.97)
Measured
Excitation Initial adaption gain (Fin=1000 by default)
1
Model
Model Polynomials (identified)
Adaptive Control – Landau, Lozano, M’Saad, Karimi
39
>> help rels lam1=1;lam0=1 : decreasing gain (default algorithm) 0.95<lam1<1; lam0=1 : decreasing gain with fixed forgetting factor 0.95<lam1,lam0<1 : decreasing gain with variable forgetting factor (typical value :0.97)
Measured
Excitation Initial adaption gain (Fin=1000 by default)
1
Model
Model Polynomials (identified)
>> help xoloe
Adaptive Control – Landau, Lozano, M’Saad, Karimi
40
Model Polynomials (identified)
>> help olvalid
Measured
Excitation Predicted output (output error predictor) Correlations (normalized) Error variance (output error predictor) Error variance (ARMAX predictor) Predicted output (ARMAX predictor) Crosscorrelations (normalized)
Adaptive Control – Landau, Lozano, M’Saad, Karimi
41
1 1 1 1
− − − −
B A