Adaptive Control - pdfs.semanticscholar.org
Transcript of Adaptive Control - pdfs.semanticscholar.org
Adaptive Control – Landau, Lozano, M’Saad, Karimi1
Adaptive Control
Chapter 9: Recursive plant model identification in closed loop
Adaptive Control – Landau, Lozano, M’Saad, Karimi2
Chapter 9:Recursive plant model identification in closed loop
Adaptive Control – Landau, Lozano, M’Saad, Karimi3
Outline
- Identification in closed loop. Why ?- An example (flexible transmission) and explanations- Objectives of identification in closed loop- Basic Schemes - The CLOE Algorithms (closed loop output error)- Properties of the algorithms- Properties of the estimated models- Validation of models identified in closed loop- Iterative identification in closed loop and controller re-design- Experimental results ( flexible transmission)- CLID – a toolbox for closed loop identification- Use of open loop identification alg.for identification in closed loop- Conclusions
Adaptive Control – Landau, Lozano, M’Saad, Karimi4
Plant Identification in Closed Loop
There are systems where open loop operationis not suitable ( instability, drift, .. )
A controller may already exist ( ex . : PID )
Iterative identification and controller redesign
May provide better « design » models
Re-tuning of the controllera) to improve achieved performancesb) controller maintenance
Why ?
Cannot be dissociated from thecontroller and robustness issues
Adaptive Control – Landau, Lozano, M’Saad, Karimi5
Φm
axismotor
d.c.motor
Positiontransducer
axisposition
Φref
load
Controlleru(t)
y(t)
DAC
R-S-Tcontroller
ADC+
+
Identification in Closed Loop
The flexible transmission
Adaptive Control – Landau, Lozano, M’Saad, Karimi6
What is the good model (for control design) ?
« closed loop identified » model« open loop identified » model
fs = 20Hz 0% load
Adaptive Control – Landau, Lozano, M’Saad, Karimi7
output
control
real system
controller design using theopen loop identified model
output
control
real system
computed polecl. loop syst. pole
Benefits of identification in closed loop (1)
The pattern of identified closed loop poles is different fromthe pattern of computed closed loop poles
Adaptive Control – Landau, Lozano, M’Saad, Karimi8
real system
output
control
controller computed using theclosed loop identified model
output
control
real system
computed polecl. loop syst. pole
Benefits of identification in closed loop (2)
The computed and the identified closed loop poles are very close
Adaptive Control – Landau, Lozano, M’Saad, Karimi9
Notations
K G
v(t) p(t)y
v(t)r u
-
)q(A)q(Bq)q(G 1
1d1
−
−−− =
)q(S)q(R)q(K 1
11
−
−− =
Sensitivity functions :
KG11)z(S 1
yp +=−
KG1K)z(S 1
up +−=−
KG1KG)z(S 1
yr +=−
KG1G)z(S 1
yv +=−
)z(R)z(Bz)z(S)z(A)z(P 11d111 −−−−−− +=
; ; ;
Closed loop poles :
True closed loop system :(K,G), P, SxyNominal simulated(estimated) closed loop : xyS,P),G,K(
Adaptive Control – Landau, Lozano, M’Saad, Karimi10
Identification in Closed Loop
Open loopinterpetation
- take advantage of the « improved » input spectrum- are insensitive to noise in closed loop operation
Objective : development of algorithms which:
ω
dB
Syp
= - MΔSyp max
0q-dBA
w
ASPru
yu +
+
ARP
+
+Syp
-Sup
noise
q-dBA
w
Plant++
T 1/S
R
+
-r=const.
u y
ru
+
+
Adaptive Control – Landau, Lozano, M’Saad, Karimi11
CLOE Algorithms
Objective of the Identification in Closed Loop
(identification for control)
Find the « plant model » which minimizes the discrepancybetween the « real » closed loop system and the « simulated »closed loop system.
noise
Controller Plant
Controller Model
r u y
û y
+-
++
ParametricAdaptationAlgorithm
Simulated System
Closed Loop Output Error
Adaptive Control – Landau, Lozano, M’Saad, Karimi12
closed loop system
R
1/S q-dBA
Model
+
-
-
εCL
T+
r
u y
yReferenceModel
ParameterAdaptationAlgorithm
adjustable system( closed loop predictor)
- M.R.A.S. point of view :
- Identification point of view :A re-parametrized adjustable predictor of the closed loop
Identification in Closed Loop
Adaptive Control – Landau, Lozano, M’Saad, Karimi13
Closed Loop Output Error Identification Algorithms(CLOE)
K
P.A.A.
G
uru
u y
y
CLε
+
+
+
−
−
−
K
G
Excitation added to controller output
K G
G
ru
uy
y+
+
+−
−
−
P.A.A.
CLε
K
+
+p
Excitation added to reference signal
Same algorithm but different properties of the estimated model!
rSRy
SRu +−= r
SRy
SRu +−= ˆˆ ury
SRu +−=
urySRu +−= ˆˆ
Adaptive Control – Landau, Lozano, M’Saad, Karimi14
R/S
ru u y
û y
R/S
q-d B/A
p
εCL+
+
+ ++
-
-
-q-d B/A
Closed Loop Output Error Algorithms (CLOE)
The closed loop system (for p = 0):
)()()(*)()(*)1( 11 tdtuqBtyqAty Tψθ=−+−=+ −−
[ ]nBn
T bbaaA
,...,,... 11=θ[ ])(),..(),1(),..()( BA
T ndtudtuntytyt −−−+−−−=ψ
urtySRtu +−= )()(
Excitationadded to theplant input
Adaptive Control – Landau, Lozano, M’Saad, Karimi15
CLOE
Adjustable predictor (closed loop)
urtySRtu +−= )(ˆ)(ˆ
[ ])(ˆ),..(ˆ),1(ˆ),..(ˆ)( BAT ndtudtuntytyt −−−+−−−=φ
[ ])(ˆ),...(ˆ),(ˆ),...(ˆ)(ˆ11 tbtbtatat
BA nnT =θ
)()1(ˆ)1(ˆ ttty T φθ +=+
Predicted output :
a posteriori)()(ˆ)(ˆ),(*ˆ)(ˆ),(*ˆ)1(ˆ 110 ttdtuqtBtyqtAty T φθ=−+−=+ −− a priori
Closed loop prediction (output) error
)1(ˆ)1()()1(ˆ)1()1(
)1(ˆ)1()()(ˆ)1()1( 00
+−+=+−+=+
+−+=−+=+
tytytttyt
tytytttytT
CL
T
CL
φθε
φθε a priori
a posteriori
Adaptive Control – Landau, Lozano, M’Saad, Karimi16
The Parameter Adaptation Algorithm
2)(0;1)(0;)()()()()()1()1()()1()(ˆ)1(ˆ
)1(ˆ)1()()(ˆ)1()1(
2121
11
0
00
<≤≤<ΦΦ+=+
+Φ++=+
+−+=−+=+
−− ttttttFttFtttFtt
tytytttyt
T
CL
TCL
λλλλεθθ
φθε
)()( tt φ=Φ
CLOE
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
ΦΦ+
ΦΦ−=+
)()()()()(
)()()()()()(
1)1(
2
11 ttFttt
tFtttFtFt
tFT
T
λλλ
Updating F(t):
Adaptive Control – Landau, Lozano, M’Saad, Karimi17
)1(ˆ)1()()(ˆ)1()1(
)()()(1)1()1(
2)(0;1)(0;)()()()()()1()1()()()(ˆ)1(ˆ
00
0
212
1
1
1
+−+=−+=+
ΦΦ++
=+
<≤≤<ΦΦ+=++Φ+=+
−−
tytytttyt
ttFttt
ttttttFttFtttFtt
T
CL
TCL
CL
T
CL
φθε
εε
λλλλεθθ
The Parameter Adaptation Algorithm (alternative form)
Mostly used for analysis purposes
CLOE
Adaptive Control – Landau, Lozano, M’Saad, Karimi18
)()( tt φ=Φ
)()(ˆ)()(ˆˆ)()(ˆ)()( 1111
1
1−−−−−
−
−
+==Φ qRqBqqSqAPtqPqSt dφ
RtqBqStqAtqPttqP
qSt d ),(ˆ),(ˆ),(ˆ)(),(ˆ
)()( 111
1
1−−−−
−
−
+==Φ φ
CLOE Algorithms
CLOE
F-CLOE
AF-CLOE
[ ])(ˆ),..(ˆ),1(ˆ),..(ˆ)( BAT ndtudtuntytyt −−−+−−−=φ
Remarks :• F-CLOE needs an « estimated model » for filtering. This can be an «open loop model»or a model identified with CLOE or AF-CLOE• For AF-CLOE « inital estimation » for filtering can be 0ˆ,1ˆ == BA
Adaptive Control – Landau, Lozano, M’Saad, Karimi19
CLOE Properties
Case 1: The plant model is in the model set(i.e. the estimated model has the good order)
Asymptotic unbiased estimates in the presence of noisesubject to a (mild) sufficient passivity condition
2// λ−PS
2//ˆ λ−PPnone (local)
•CLOE:
•F-CLOE:•AF-CLOE:
2)(max 2 <≤ λλ tt
Strictly positive real transfer fct.
• The controller is constant• An external excitation is applied• Measurement noise independent w.r.t. the external excitation
Adaptive Control – Landau, Lozano, M’Saad, Karimi20
2)(0;1)(0;)()()()()()1()1()()()(ˆ)1(ˆ
212
1
1
1 <≤≤<ΦΦ+=++Φ+=+
−− ttttttFttFtttFtt
T
CL
λλλλεθθ
Consider the PAA
Assume that the a posteriori prediction error satisfies:
[ ] )()1(ˆ)()1( 1 ttqHtT
CL Φ+−=+ − θθε
Then:
tt
tt CLtCLt
∀∞<Φ
=+=+∞→∞→
;)(
0)1()1( 0limlim εε
2)(.;..2
)( 2
1 max <≤=−− λλλ
tRPSzHt
If:
for any initial conditions
A basic result – deterministic environment
Adaptive Control – Landau, Lozano, M’Saad, Karimi21
CLOE analysis –Deterministic environment
(a posteriori prediction error equations)
[ ] )()1(ˆ)1( ttPSt
T
CL φθθε +−=+
[ ] )(ˆ)1(ˆˆ
)1( tPSt
PPt
T
CL φθθε +−≈+
[ ] )()(ˆ)1(ˆ)(ˆ
)1( ttP
StPtPt
T
CL φθθε +−≈+
Φ(t)
CLOE
F-CLOE
AF-CLOE
To have in addition « parameter convergence » one needsa persistent excitation (i.e.: rich input like P.R.B.S.)
S.P.R. conditions for prediction error convergence
Adaptive Control – Landau, Lozano, M’Saad, Karimi22
A basic result – stochastic environment
Assume that for any along the trajectories of the algorithm:θ
[ ] )1(')ˆ,(ˆ)()ˆ,1( 1 ++Φ−=+ − twtqHtT
CL θθθθε
{ } 0)1(')ˆ,( =+Φ twtE θ (regressor and noise are uncorrelated)and:
0)(,2)(.;..2
)( 22
1 max ><≤=−− ttRPSzHt
λλλλ
If:
Decreasingadaptation gain{ } 1)(ˆlim =∈
∞→C
tDtrobP θ
[ ]{ }0)ˆ,(ˆ:ˆ =Φ−= θθθθ tDT
C
Then:
where:
Remark : With « persistent excitation » θ=CD
)1)(lim(1 11 ==∞→t
tor λλ
Adaptive Control – Landau, Lozano, M’Saad, Karimi23
R/S
ru u y
û y
R/S
q-d B/A
p
εCL+
+
+ ++
-
-
-q-d B/A
The closed loop system:
)1()()(*)()(*)1( 11 ++−+−=+ −− tApdtuqBtyqAty
0≠w
Noisy case
[ ] )1()()1(ˆ)1( +++−=+ tpP
ASttPSt
T
CL φθθε
CLOE analysis – Stochastic environment
The a posteriori prediction error equation:
Adaptive Control – Landau, Lozano, M’Saad, Karimi24
CLOE analysis – Stochastic environment
[ ] )1()()1(ˆ)1( +++−=+ tpP
ASttPSt
T
CL φθθε
The « frozen » error equation:
[ ] )1()(ˆ)ˆ,1( ++−=+ tpP
AStPSt
T
CL φθθθε
H 'w
The a posteriori prediction error equation:
=− 2// λPS 2)(max 2 <≤ λλ tt
{ } 0)1(')ˆ,( =+twtE θφ
S.P.R
(the input and output of the estimated model do not depend on the noise for fixed estimated parameters)
Convergence condition:
Adaptive Control – Landau, Lozano, M’Saad, Karimi25
Case 2: The plant model is not in the model set(ex.: the estimated model has a lower order)
See the next slides
CLOE Properties
Basic idea for analysis of identification algorithms(Ljung) :Convert time domain minimization criterion in frequency
domain criterion using Parseval th. and Fourrier transforms
Adaptive Control – Landau, Lozano, M’Saad, Karimi26
Analysis of identification algorithms in the frequency domain
(properties of the estimated model)
Identification criterion (time domain)
{ })ˆ,(minarg)ˆ,(minarg*ˆ 2
ˆ1
2
ˆ
1lim θεθεθ
θθtEt
D
N
D Nt ∈∈≈= ∑
∞→
Assumption: ∞<∑∞→
Nt
Nt 1
2 )ˆ,(1lim θε
domain of admissible parameters
Identification criterion (frequency domain)
ωθφπ
θ ωπ
πεθ
de j
D)ˆ,(
21minarg*ˆ
ˆ∫
−∈=
Spectral density of prediction error
Adaptive Control – Landau, Lozano, M’Saad, Karimi27
A recursive identification algorithm minimizes a criterion of the form:
∑∞→∈
N
Dt
Nt 1
2
ˆ)ˆ,(min 1
lim θεθif:
⎥⎦⎤
⎢⎣⎡ +−+=+Φ+=+ )1(
21)()(ˆ)1()()()(ˆ)1(ˆ 2 tgradtFttttFtt εθεθθ
[ ] )()1(ˆ)1( ttPSt
T
CL φθθε +−=+
(+)
For CLOE algorithms:
AF-CLOE minimizes a criterion of the form (+)(CLOE and F-CLOE achieve approximatively the same optimization)
Criterion minimized by CLOE algorithms
)1()1(ˆ)1()1(
21 2 +
+∂+∂
=+ ttttgrad ε
θεε
CLOEAFtPS
tt
−Φ−≈−=+∂+∂ )(
)1(ˆ)1( φ
θε
Adaptive Control – Landau, Lozano, M’Saad, Karimi28
R/S
ru u y
û y
R/S
q-d B/A
p
εCL+
+
+ ++
-
-
-q-d B/A
yvu
yvu
Syr
Syrˆˆ =→
=→
=
=
)()(
ωφ
ωφ
p
ruSpectral density of external excitation
Spectral density of the measurement noiseru and p are independent )0)(( =ωφ
upr
CLOE – (excitation added to controller output)
pSrSS ypuyvyvCL +−= ]ˆ[ε
GKGS
KGGS
yv
yv
ˆ1ˆˆ
1
+=
+=
Adaptive Control – Landau, Lozano, M’Saad, Karimi29
ωωφωφ
ωωφωφθπ
πθ
π
πθ
dSGGS
dSSS
prypyp
pypryvyv
u
u
)]()(ˆˆ[minarg
)]()(ˆ[minargˆ
222
22*
+−=
+−=
∫
∫
−
−
Properties of the Estimated Model (1)
Excitation added to controller output
- will minimize the 2 norm between the true sensitivityfunction and the sensitivity function of the closed loopestimator when r(t) is a white noise (PRBS)
G
-The noise does not affect the asymptotic estimation
-Plant -model error heavily weighted by the sensitivity functions
Adaptive Control – Landau, Lozano, M’Saad, Karimi30
ωωφωφ
ωωφωφθπ
πθ
π
πθ
dSGGS
dSSS
prupyp
pyprypyp
)]()(ˆˆ[minarg
)]()(ˆ[minargˆ
222
22*
+−=
+−=
∫
∫
−
−
Excitation added to reference signal
Properties of the Estimated Model (2)
- will minimize the 2 norm between the true sensitivityfunction and the sensitivity function of the closed loopestimator when r(t) is a white noise (PRBS)
G
-The noise does not affect the asymptotic estimation
-Plant -model error heavily weighted by the sensitivity functions
Adaptive Control – Landau, Lozano, M’Saad, Karimi31
Excitation added to reference signal
Properties of the Estimated Model (3)
yryrypyp SSSS ˆˆ −=−One has:
Therefore one has also :
ωωφωφ
ωωφωφθπ
πθ
π
πθ
dSSS
dSSS
pyprypyp
pypryryr
)]()(ˆ[minarg
)]()(ˆ[minargˆ
22
22*
+−=
+−=
∫
∫
−
−
The differences with respect to the output sensitivity function and the complimentary sensitivity function are minimized
Adaptive Control – Landau, Lozano, M’Saad, Karimi32
- The quality of the identified model is enhanced in the criticalfrequency regions for control (compare with open loop id.)
OLOE
-Identification in closed loop can be used for model reduction. The approximation will be good in the critical frequencyregions for control.
Identification in closed loop - Some remarks
ωωφωφθπ
πθdSGGS prypyp )]()(ˆˆ[minargˆ 222
* +−= ∫−
ωωφωφθπ
πθdGG pr )]()(ˆ[minargˆ 2* +−= ∫
−
CLOE
Adaptive Control – Landau, Lozano, M’Saad, Karimi33
T 1/S
R
q-dBA
p
Plant
R
1/S q-dBA
Model
++
+
+
+
-
-
- ε CLr
u y
u y
+q-dB
A
1/S R
R1/S
T
εCL+
-
q-dBA
+
+
+
-
-+
+
Plant p
+
+
ruu y
yu
r
u = -RS y + TS r u = -RS y + TS r u = -RS y+ru u = -RS y +ru
Excitation added to controller output
Excitation added to reference signal
Closed Loop Output Error Identification Algorithms(CLOE)
R-S-T Controller
Adaptive Control – Landau, Lozano, M’Saad, Karimi34
[ ]
[ ]yvyv
yryr
SSST
RBSASB
BRASBS
ST
SSRT
RBSARB
BRASBR
RT
RBSATB
BRASBT
ˆˆˆ
ˆ
ˆˆˆ
ˆˆˆ
ˆ
−=⎥⎦
⎤⎢⎣
⎡+
−+
=
−=⎥⎦
⎤⎢⎣
⎡+
−+
=+
−+
ωωφωφ
ωωφωφθ
π
πθ
π
πθ
dSSTSS
dSRTSS
pypryvyv
pypryryr
)]()(ˆ[minarg
)]()(ˆ[minargˆ
22
2
22
2*
+−=
+−=
∫
∫
−
−
RTST
== Excitation added to the plant input
Use of the prefilter T (R-S-T controller )
Difference between closed loop transfer functions (excitation through T)
Properties of the estimated model:
Excitation added to the controller input (measure)
r T 1/S
R
q-dBA
p
Plant
R
1/S q-dBA
Model
++
+
+
+
-
-
- εCL
u y
u y
Adaptive Control – Landau, Lozano, M’Saad, Karimi35
R/S
ru u y
y
R/S
B/A
εCL
CA
e
+
-
1/S
++
-+
+
û+
+
-
-B
q-1H*
q-1A*
Identification in Closed Loop of ARMAX Models
Extended Closed Loop Output ErrorX-CLOE
nPnHHqHRBSASCH ≅+=−−= − *;1;**** 1
)1()(*)()(*)()(*)1( 11 +++−+−=+ −− teteCdtuqBtyqAty
)(*1)( 111 −−− += qCqqC
CCBBAA === ˆ;ˆ;ˆ
Optimal predictorfor the closed loopwhen :
Adaptive Control – Landau, Lozano, M’Saad, Karimi36
X-CLOE – the algorithm
urtySRtu +−= )(ˆ)(ˆ
[ ])1(),.(),(ˆ),.(ˆ),1(ˆ),.(ˆ)( +−−−−+−−−= HCLfCLfBA
T nttndtudtuntytyt εεφ
[ ])(ˆ),...(ˆ),(ˆ),...(ˆ),(ˆ),...(ˆ)(ˆ111 ththtbtbtatat
HBA nnn
T
e =θ
)()(ˆ)1(ˆ ttty e
T
e φθ=+°Predicted output :
a priori
Closed loop prediction (output) error
)1(ˆ)1()()(ˆ)1()1( 00 +−+=−+=+ tytytttyt e
T
eCL φθε a priori
)(1)( tS
t CLCLf εε =
Adaptive Control – Landau, Lozano, M’Saad, Karimi37
The Parameter Adaptation Algorithm
2)(0;1)(0;)()()()()()1()1()()1()(ˆ)1(ˆ
)1(ˆ)1()()(ˆ)1()1(
212
1
1
1
0
00
<≤≤<ΦΦ+=++Φ++=+
+−+=−+=+
−− ttttttFttFtttFtt
tytytttyt
T
CL
e
T
eCL
λλλλεθθ
φθε
)()( tt eφ=Φ
X-CLOE – the algorithm
Adaptive Control – Landau, Lozano, M’Saad, Karimi38
X-CLOE Properties
Case 1: The plant model is in the model set
Deterministic case:• Global convergence does not require any S.P.R. condition(works allways)
Stochastic case (noise)• Asymptotic unbiased estimates• Convergence condition: 1/C – λ/2= S.P.R
(like in open loop for ELS and OEEPM)
Case 2: The plant model is not in the model set
• Slightly less good « approximation » properties than CLOE• Provides better results than « open loop » identification alg.
Adaptive Control – Landau, Lozano, M’Saad, Karimi39
Validation of Models Identified in Closed Loop
Controller dependent validation !
1) Statistical Model Validation
2) Pole Closeness Validation
4) Time Domain Validation
3) Sensitivity Functions ClosenessValidation
Adaptive Control – Landau, Lozano, M’Saad, Karimi40
Identification in Closed Loop
Statistical Model Validation
UncorrelationTestR/S
ru u y
û y
R/S
Plant
εCL
+
+
+
-
-
-B/A
1;17.2)( ≥≤ iN
iRN
normalizedcrosscorelations
numberof data
1N2.17
N
97%
136.0)(256 ≤→= iRNN15.0)( ≤iRNpratical value :
Controller dependent validation !
Adaptive Control – Landau, Lozano, M’Saad, Karimi41
« Uncorrelation » Test
: centered sequence of residual closed loop prediction errorsOne computes:
max1,...,2,1,0;)(ˆ)(1)( iiityt
NiR
N
t CL =−= ∑=ε
max2/1
1
2
1
2
,...,2,1,0;)(1)(ˆ1
)()( iit
Nty
N
iRiRNN
t CL
N
t
=
⎥⎦⎤
⎢⎣⎡
⎟⎠⎞
⎜⎝⎛
⎟⎠⎞
⎜⎝⎛
=∑∑==ε
),max(max dnni BA +=;
Remark: 1)0( ≠RN
Theoretical values: RN(i) =0; i = 1, 2…imax
• Finite number of data • Residual structural errors ( orders, nonlinearities, noise)• Objective: to obtain « good » simple models
Real situation:
Validation criterion (N = number of data):
1;17.2)( ≥≤ iN
iRN max,...,1;15.0)( iiiRN =≤or:
{ })(tCLε
Adaptive Control – Landau, Lozano, M’Saad, Karimi42
Controller Plant
Controller
r u ynoise
û y
+
-
++
EstimatedModel
Identification in Closed Loop
Pole Closeness Validation
true
If the estimated model is good, the poles of the « true » loopand of the « simulated » loop should be close
simulated
•The poles of the « simulated » system can be computed
•The poles of the « true » system should be estimated
Adaptive Control – Landau, Lozano, M’Saad, Karimi43
Identification in Closed Loop
Sensitivity Function Closeness Validation
If the estimated model is good, the sensitivity functions of the « true » loop and of the « simulated » loop should be close
Controller Plant
Controller
r u ynoise
û y
+
-
++
EstimatedModel
true
simulated
•The sensitivity fct. of the « simulated » system can be computed
•The sensitivity fct. of the « true » system should be estimated
Adaptive Control – Landau, Lozano, M’Saad, Karimi44
Closed loop poles/Sensitivity functions Estimation
+
-
1S
R
+-
P.A.A.
u y
q-dBP
PLANT
q-dBA
Estimatedmodel of theclosed loop
- use of open loop identification algorithms- same signals as those used for the identification of theplant model in closed loop operation
- attention to the selection of the order !
Rem:
Adaptive Control – Landau, Lozano, M’Saad, Karimi45
How to asses the poles/sensitivity fct. closeness ?
Poles:• Patterns of the poles map• Closeness of and
computed polecl. loop syst. pole (estimated)
P/1 P/1
Sensitivity functions:• Closeness of and
xyS xyS
Τhe closeness of two transfer functions can be measured by the« Vinnicombe distance » (ν gap) (min = 0, max = 1)(will be discussed later)
XX
: Closed loop transfer function computed with the estimated plant model
: Estimated closed loop transfer function
Adaptive Control – Landau, Lozano, M’Saad, Karimi46
)()()( GnGnGwnoii pz −=
Unstable zeros Unstable poles
)(Gwno = number of encirclements of the origin (winding number)(+ : counter clock wise , - : clock wise)
0)()()()1( 2211
*
2 1=−−++ GnGnGnGGwno Ppp ii
One can compares transfer functions satisfying :
G* = complex conjugate of G )( 21GnP = number of poles on the unit circle
Normalized distance between two transfer functions(Vinnicombe distance or ν−gap)
),( 21 GG
{w}
wno(G)>0 wno(G)<0
The winding number:
Adaptive Control – Landau, Lozano, M’Saad, Karimi47
1),(0 21 <≤ GGνδ
One assumes that {w} is satisfied.
[ ] ( ) ( ) 2/122
2/121
2121
)(1)(1
)()()(),(
ωω
ωωωω
jGjG
jGjGjGjG
++
−=Ψ
Normalized difference :
[ ] [ ]∞
Ψ=Ψ= )(),( )(),( ),( 21max2121 ωωωωδω
ν jGjGjGjGGGsf
Normalized distance (Vinnicombe distance or ν-gap) :
πω to0for =
If {w} is not satisfied : 1),( 21 =GGνδ
Normalized distance between two transfer functions(Vinnicombe distance or ν−gap)
),( 21 GG
Adaptive Control – Landau, Lozano, M’Saad, Karimi48
Identification in Closed Loop
- not enough accuracy in many cases- difficult interpretation of the results in some cases
Rem.:
Time Domain ValidationComparison of « achieved » and « simulated » performancein the time domain
Controller Plant
Controller
r u ynoise
û y
+
-
++
EstimatedModel
AchievedPerformance(true system)
Design system(simulation)
Adaptive Control – Landau, Lozano, M’Saad, Karimi49
OPEN LOOP IDENTIFICATION
OPEN LOOPMODEL VALIDATION
OPEN LOOP BASEDCONTROLLER
PLANT IDENTIFICATIONIN CLOSED LOOP
(OLBC)
IDENTIFICATION OFTHE CLOSED LOOP
COMPARATIVECLOSED LOOP VALIDATION
BEST PLANT MODEL
CLOSED LOOP BASEDCONTROLLER
(CLBC)
Methodologyof Plant ModelIdentification
in Closed Loop
Adaptive Control – Landau, Lozano, M’Saad, Karimi50
Two possibilities for error generation:-output error (CLOE)-input error (CLIE)
Two possibilities for applying the external excitation:-added to the controller input (reference)-added to the plant input
What is in fact important ?The nominal sensitivity function we would like to approximateby the closed loop predictor (the identification criterion)
Closed loop identification schemes
Remark:Once a scheme is selected, to process the data one can use all the versionsof the algorithms (choice of the regressor vector)
Adaptive Control – Landau, Lozano, M’Saad, Karimi51
Excitation added to controller input (reference)
Closed loop input error (CLIE)
Landau I.D., Karimi A., (2002) : « A unified approach to closed-loop plant identificationand direct controller reduction », European Journal of Control, vol.8, no.6
For details, see:
K
P.A.A.
G
ru
u
y
yCLε
+
+
+
−
−
−
K
G+
+
c
cp
Adaptive Control – Landau, Lozano, M’Saad, Karimi52
CLOE with external excitationadded to the controller input
equivalent toCLIE with external excitation
added to the plant input
CLIE with external excitationadded to the controller input
CLOE with external excitationadded to the controller outputyvyv SS ˆmin −
upup SS ˆmin −
ypyp SS ˆmin −
yryr SS ˆmin −
or
Closed loop identification schemeIdentificationcriterion
Selection of closed loop identification schemes
Adaptive Control – Landau, Lozano, M’Saad, Karimi53
Iterative Identification in Closed Loop and Controller Re-Design
Repeat 1, 2, 1, 2, 1, 2,…εCL
εCL
Step 1 : Identification in Closed Loop-Keep controller constant-Identify a new model such that
Step 2 : Controller Re – Design- Compute a new controller such that
p1/S
RPlant
R
1/S
Model
++
+
+
+
-
-
- εCL
r u y
u y
T q-d B/A
q-d B/A
Adaptive Control – Landau, Lozano, M’Saad, Karimi54
T 1/S
R
q-dBA
w
Plant
R
1/S q-dBA
Model
++
+
+
+
-
-
- ε CLr
u y
u y
Use R=0, S=T=1 and you get the open loop identification algorithms
An interesting connection CL/OL
Open loop identification algorithms are particular cases of closed loop identification algorithms
CLOE (OL)OEX-CLOE X(OL)OE
Adaptive Control – Landau, Lozano, M’Saad, Karimi55
Experimental Results
Identification in closed loop and controller re-design for
a flexible transmission
Adaptive Control – Landau, Lozano, M’Saad, Karimi56
Φm
axismotor
d.c.motor
Positiontransducer
axisposition
Φref
load
Controlleru(t)
y(t)
DAC
R-S-Tcontroller
ADC+
+
Identification in Closed Loop
The flexible transmission
Adaptive Control – Landau, Lozano, M’Saad, Karimi57
Flexible TranmissionFrequency Characteristics of the Identified Models
CL model OL model
OL model
Flexible Transmission
f/fs
f/fs (fs = 20 Hz)
Adaptive Control – Landau, Lozano, M’Saad, Karimi58
Model Validation in Closed LoopPoles Closeness Validation
Model identified in open loop Model identified in closed loopThe model identified in closed loop provides « computed » polescloser to the « real » poles than the model identified open loop
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1x identified CL poles o computed CL poles
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1x identified CL poleso computed CL poles
Controller computed using open loop identified controller (OLBC)
Adaptive Control – Landau, Lozano, M’Saad, Karimi59
Model Validation in Closed Loop
Time Domain Validation
29 30 31 32 33 34 35 36
0
0.2
0.4
0.6
0.8
1
temps (s)
posi
tion
(V)
29 29.5 30 30.5 31 31.5 32 32.5 33 33.5 34
0
0.2
0.4
0.6
0.8
1
temps (s)po
sitio
n (V
)
Model identified in open loop Model identified in closed loopThe simulation using the model identified in C.L. is closer to the real response than the simulation using the O.L.identified model
O.L.B.C.
Adaptive Control – Landau, Lozano, M’Saad, Karimi60
29 29.5 30 30.5 31 31.5 32 32.5 33 33.5 34
0
0.2
0.4
0.6
0.8
1
temps (s)
posi
tion
(V)
29 30 31 32 33 34 35 36
0
0.2
0.4
0.6
0.8
1
temps (s)po
sitio
n (V
)
Re-designed controller (CLBC) Initial controller (OLBC)
Controller Re-design Based on the Model Identified in Closed Loop(on-site controller re-tuning)
The CLBC controller provides performance which is closer to thedesigned performance than that provided by the OLBC controller
Adaptive Control – Landau, Lozano, M’Saad, Karimi61
CLIDTM
(Matlab) Toolbox for Closed Loop Identification
To be downloaded from the web site:http//:landau-bookic.lag.ensieg.inpg.fr
• files(.p and.m)• examples (type :democlid)• help.htm files (condensed manual)
Adaptive Control – Landau, Lozano, M’Saad, Karimi62
>> help clid
CLOSED LOOP IDENTIFICATION MODULEby :ADAPTECH4 rue du Tour de l'Eau, 38400 Saint Martin d'Heres, [email protected] by Adaptech, 1997-1999
List of functions
cloe - Closed Loop Output Error Identification
fcloe - Filtered Closed Loop Output Error Identification
afcloe - Adaptive Filtered Closed Loop Output Error Identification
xcloe - Extended Closed Output Error Identification
clvalid - Validation of Models Identified in Closed Loop using also Vinnicombe gap
clie - Closed Loop Input Error Identification
CLID Toolbox
Adaptive Control – Landau, Lozano, M’Saad, Karimi63
>> help cloe
CLOE is used to identify a discrete time model of a plant operating in closed-loop with an RST controller based on the CLOE method.
[B,A]=cloe(y,r,na,nb,d,R,S,T,Fin,lam1,lam0)
y and r are the column vectors containing respectively the output and the excitation signal.
na, nb are the order of the polynomials A,B and d is the pure time delay
R, S and T are the column vectors containing the parameters of a twodegree of freedom controller. S*u(t)=-R*y(t)+T*r(t)Remark: when the excitation signal is added to the measured output (i.e. the controller is in feedforward with unit feedback) we have T=R and when the excitation signal is added to the control input (i.e. the controlleris in feedback) we have T=S.
Fin is the initial gain F0=Fin*(na+nb)*eye(na+nb) (Fin=1000 by default)
lam1 and lam0 make different adaptation algoritms as follows:
lam1=1;lam0=1 :decreasing gain (default algorithm)0.95<lam1<1;lam0=1 :decreasing gain with fixed forgetting factor0.95<lam1,lam0<1 :decreasing gain with variable forgetting factor
See also FCLOE, AFCLOE, XCLOE and CLVALID.Copyright by Adaptech, 1997-1999
Adaptive Control – Landau, Lozano, M’Saad, Karimi64
>> help cloe
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
[B,A]=cloe(y,r,na,nb,d,R,S,T,Fin,lam1,lam0)
Measuredoutput
Excitation
Modelorders
ControllerPolynomials
Initial adaption gain(Fin=1000 by default)
1λ 0λ
ModelPolynomials(identified)
{•Excitation superposed to the reference: Need to specify R, S and T
• Excitation superposed to the controller output (i.e. plant input): Need to take T=S
S 1/S
R
ruu yPlant
+
-1/S
R
ruu yPlant
+
+-
CLOE – closed loop output error identification function
Adaptive Control – Landau, Lozano, M’Saad, Karimi65
[lossf,gap,Pcal,Piden,yhat]=clvalid(B,A,R,S,T,y,r,pcl)
lossf :
gap : Vinnicombe gap metric between identified and computed closed loop transfer function
Pcal : Computed closed loop poles by given model and controller
Piden : Identified closed loop poles from [y r] data
yhat : Closed loop estimated output
>> help clvalid
[ ]2
1)(ˆ)(1
∑ −N
tytyN
pcl = 1 : performs pole closeness validation (poles map display)pcl =0; default
ModelPolynomials(identified)
ControllerPolynomials
{ {
CLVALID – closed loop model validation function
)/( PBT
Display also the normalized crosscorelationsPlots : cross correlations, autocorrelations (validation of the closed loop identified model),identified and computed closed loop transfer function, identified and computed poles
)ˆ,( yr
Adaptive Control – Landau, Lozano, M’Saad, Karimi66
DEMOCLID –demo function>> democlid
Load excitation( r ) (PRBS), output data (y) controller and values for Fin (=1000), lam1(= 1), lam0(= 0)
211
211211
9.06.11)(
0 ; 5.0)( ; 7.05.11)(−−−
−−−−−−
++=
=+=+−=
qqqC
dqqqBqqqA
Plant modelfor data generation
)()()()()()( 111 teqCtuqBqtyqA d −−−− +=
Data are generated in closed loop with a RST controllerThe external excitation is superposed to the reference
T 1/S
R
r u yPlant+
-
11.0)(
3717.06283.01)(
5204.02763.18659.0)(
1
211
211
=
−−=
+−=
−
−−−
−−−
qT
qqqS
qqqRControllerfor data generation
(simubf4.mat)(r,y,u)
(simubf_rst.mat)
Adaptive Control – Landau, Lozano, M’Saad, Karimi67
100 200 300 400 500 600 700 800 900 1000
-1
-0.5
0
0.5
1
Output
100 200 300 400 500 600 700 800 900 1000
-0.2
0
0.2
Input
100 200 300 400 500 600 700 800 900 1000-1
-0.5
0
0.5
1
Excitation
Output (y)
Plant input(u)
Externalexcitation
(r)
File SIMUBF
Excitation superposed to the reference
Adaptive Control – Landau, Lozano, M’Saad, Karimi68
>> [B,A]=cloe(y,r,na,nb,d,R,S,T,Fin,lam1,lam0)
B =
0 0.9527 0.4900
A =
1.0000 -1.4808 0.6716
>> [B,A]=afcloe(y,r,na,nb,d,R,S,T,Fin,lam1,lam0)
B =
0 0.9684 0.4722
A =
1.0000 -1.4844 0.6821
CLOE
AF-CLOE
Identification results
Adaptive Control – Landau, Lozano, M’Saad, Karimi69
Model of the plant identified in closed loop with AF-CLOE
Statistical Validation of the model identified in closed loop
1;0678.01024
17.217.2)( ≥==≤ iN
iRNIs OK.
Adaptive Control – Landau, Lozano, M’Saad, Karimi70
Stochactic validation of the identified model of the closed loopIs OK. Can be used for poles closeness validation and ν-gap validation
Poles closeness validation and ν-gap validation
Poles mapo identifed poles of the true CL systemx computed poles of the simulated CL systemIs OK
ν−gap = 0.0105 (min = 0, max =1)
Adaptive Control – Landau, Lozano, M’Saad, Karimi71
1a 2a 1b 2b
0.08430.03230.5080.9750.6034-1.3991OL type
identification (RLS.)
0.02370.03120.37750.96680.6822-1.49X-CLOE
0.00850.031750.51520.95910.6704-1.4692F-CLOE
0.02840.031810.48620.95920.6674-1.476CLOE
0.00920.031760.52760.9910.6699-1.4689AF-CLOE
0.510.7-1.5NominalModel
NormalizedIntercorrelations
(validation bound 0.068) |RN(max)|.
CLError
VarainceR(0)
Méthod
File SIMUBF – comparison of identified models
Closed Loop Statisitical Validation
Best results
Open loop type identification(between u and y ignoring the controller)
Adaptive Control – Landau, Lozano, M’Saad, Karimi72
Concluding Remarks
- Methods are available for efficient identification in closed loop- CLOE algorithms provide unbiased parameter estimates- CLOE provides “control oriented “reduced order” models(precision enhanced in the critical frequency regions for control)
-The knowledge of the controller is necessary (for CLOE and FOL)-In many cases the models identified in closed loop allow toimprove the closed loop performance-For controller re-tuning, opening the loop is no more necessary-Identification in closed loop can be used for “model reduction”-By duality arguments one can use the algorithms for controllerreduction- Successful use in practice - A MATLAB Toolbox is available (CLID- see website))-A stand alone software is available (WinPIM/Adaptech)
Adaptive Control – Landau, Lozano, M’Saad, Karimi73
A.A.P.
+
+
+
−
−
−
AB/
SR/
ur
111
−−q 1ˆ/ˆ AB
)1( 1−−qSR
'u 'y
CLε
yu
A.A.P.
+
+
−
−
+
−
AB/
SR/
ur
1ˆ/ˆ AB
)1( 1−−qSR
'u 'y
11 −− qy′yu
CLε
Appendix
How to identify in closed loop systems with integrators ?
Replace the input of the closed looppredicor by its integral
Replace the measured outputby its variations
Attention :• the controller in the predictor has to be modified• one identifies the plant model without integrator