eece 574 - adaptive control - recursive identification in closed-loop and adaptive...
TRANSCRIPT
EECE 574 - Adaptive ControlRecursive Identification in Closed-Loop and Adaptive Control
Guy Dumont
Department of Electrical and Computer EngineeringUniversity of British Columbia
January 2010
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 1 / 43
Tracking Time-Varying parameters
Tracking Time-Varying Parameters
All previous methods use the least-squares criterion
V(t) =1t
t
∑i=1
[y(i)− xT(i)θ ]2
and thus identify the average behaviour of the process.
For standard RLS, the estimation gain eventually converges to zero andadaptation stops.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 2 / 43
Tracking Time-Varying parameters Forgetting Factor
Forgetting Factor
When the parameters are time varying, it is desirable to base the identificationon the most recent data rather than on the old one, not representative of theprocess anymore. This can be achieved by exponential discounting of olddata, using the criterion
V(t) =1t
t
∑i=1
λt−i[y(i)− xT(i)θ ]2
where 0 < λ ≤ is called the forgetting factor.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 3 / 43
Tracking Time-Varying parameters Forgetting Factor
Forgetting Factor
The new criterion can also be written
V(t) = λV(t−1)+ [y(t)− xT(t)θ ]2
Then, it can be shown (Goodwin and Payne, 1977) that the RLS schemebecomes
RLS with Forgetting
θ(t +1) = θ(t)+K(t +1)[y(t +1)− xT(t +1)θ(t)]K(t +1) = P(t)x(t +1)/[λ + xT(t +1)P(t)x(t +1)]
P(t +1) ={
P(t)− P(t)x(t +1)xT(t +1)P(t)[λ + xT(t +1)P(t)x(t +1)]
}1λ
In choosing λ , one has to compromise between fast tracking and long termquality of the estimates. The use of the forgetting may give rise to problems.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 4 / 43
Tracking Time-Varying parameters Forgetting Factor
Forgetting Factor
The smaller λ is, the faster the algorithm can track, but the more theestimates will vary, even the true parameters are time-invariant.
A small λ may also cause blowup of the covariance matrix P, since inthe absence of excitation, covariance matrix update equation essentiallybecomes
P(t +1) =1λ
P(t)
in which case P grows exponentially, leading to wild fluctuations in theparameter estimates.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 5 / 43
Tracking Time-Varying parameters Forgetting Factor
Variable Forgetting Factor
One way around this is to vary the forgetting factor according to theprediction error ε as in
λ (t) = 1− kε2(t)
Then, in case of low excitation ε will be small and λ will be close to 1.In case of large prediction errors, λ will decrease.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 6 / 43
Tracking Time-Varying parameters EFRA
Exponential Forgetting and Resetting Algorithm
The following scheme1 is recommended:
EFRA Algorithm
ε(t +1) = y(t +1)− xT(t +1)θ(t)
θ(t +1) = θT(t)+
αP(t)x(t +1)λ + xT(t +1)P(t)x(k +1)
ε(t)
P(t +1) =1λ
[P(t)− P(t)x(t +1)xT(t +1)P(t)
λ + x(t +1)TP(t)x(t +1)
]+β I− γP(t)2
where I is the identity matrix, and α , β and γ are constants.
1M.E. Salgado, G.C. Goodwin, and R.H. Middleton, “Exponential Forgetting andResetting”, International Journal of Control, vol. 47, no. 2, pp. 477–485, 1988.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 7 / 43
Tracking Time-Varying parameters EFRA
Exponential Forgetting and Resetting Algorithm
With the EFRA, the covariance matrix is bounded on both sides:
σminI ≤ P(t)≤ σmaxI ∀t
where
σmin ≈β
α−ησmax ≈
η
γ+
β
η
with
η =1−λ
λ
With α = 0.5, β = γ = 0.005 and λ = 0.95, σmin = 0.01 and σmax = 10.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 8 / 43
Identification in Closed Loop The Identifiability Problem
Identification in Closed Loop
The Identifiability ProblemLet the system be described by
y(t)+a · y(t−1) = b ·u(t−1)+ e(t)
withu(t) = g · y(t)
Let a and b be closed-loop estimates of a and b.
Then,the closed-loop system can be written as:
y(t)+(a− b ·g)y(t−1) = e(t)
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 9 / 43
Identification in Closed Loop The Identifiability Problem
Identification in Closed Loop
Hence any estimates a and b that satisfy
a− b ·g = a−b ·g
will give the same value for the identification criterion.
All estimates such that
a = a+ k ·gb = b+ k
will give a good description of the process.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 10 / 43
Identification in Closed Loop The Identifiability Problem
Identification in Closed Loop
If the identification is performed using two feedback gains g1 and g2 or ifthe parameter a is fixed, then the system becomes identifiable, becausewe have as many equations as unknowns.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 11 / 43
Identification in Closed Loop Definitions
Definitions
Let the discrete plant be described by
y(t) = GD(q−1)u(t)+GN(q−1)e(t)
where GD and GN are linear rational transfer functions in the backwardshift operatorq−1 (i.e. q−1y(t) = y(t−1) that can be parameterized by avector θ , {e(t)}= N(0,σ). Let S denote this true system.
Let us assume that the identification is performed with the feedbackcontroller R such that u(t) = R · y(t).The problem is then to find θ , an estimate of θ such that the modelM(θ)given by
y(t) = GD(q−1)u(t)+ GN(q−1)e(t)
where GD(q−1) and GN(q−1) are parameterized by θ , describes thesystem S. Assume that an identification method denoted I is used toobtain the estimate θ .
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 12 / 43
Identification in Closed Loop Definitions
Definitions
A loose and intuitive definition of identifiability is that M(θ) describes Sas the number of measurements N tends to infinity. Let us define
DT(S,M) = {θ |GD(q−1)≡ GD(q−1) and GN(q−1) = GN(q−1)∀q}
This is the set of desired estimates which corresponds to models M(θ)with the same plant and noise transfer functions as the actual systemS(θ).Note that this set does not depend on the regulator R nor on theidentification method I. Note also that the orders of the model transferfunctions can be greater than those of the system, in which case thereexist some pole-zero cancellations.
The actual estimates θ depend on the number of measurements, thesystem and its model, the regulator and the identification method and canbe written as θ(N;S,M, I,R).
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 13 / 43
Identification in Closed Loop Definitions
Definitions
Definition 1: The system S is said to be system identifiable under M, I,R, i.e.SI(M, I,R)if
θ(N;S,M, I,R)−→ DT(S,M)w.p.1
as N→ ∞.
Definition 2: The system S is said to be strongly system identifiable under I and R, i.e.SSI(I,R) if it is SI(M, I,R) for all M s.t. DT(S,M) 6= φ where φ denotes the empty set.
Definition 3: The system S is said to be parameter identifiable under M, I and R,i.e.PI(M, I,R) if it is SI(M, I,R) and DT(S,M) consists of only one element.
According to those definitions, the system of Example 1 is neither SI nor PI for the class of
models (2). Moreover, since for the model (2) DT(S,M) 6= φ , the system is not SSI either.
However, when two regulators are used, the system becomes PI. It is also important to note
that when a system is SSI(I,R), the fact that the identification is performed under closed-loop
is irrelevant and the identification can then be performed as if the system were operating in
open-loop.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 14 / 43
Identification in Closed Loop Definitions
Example
Consider the system
A(q−1)y(t) = B(q−1)q−ku(t)+C(q−1)e(t)
with the feedbackF(q−1)u(t) = G(q−1)y(t)
The closed-loop system can then be described as
(AF−q−kBG)y(t) = CFe(t)
It is then obvious that any estimates A and B such that
(AF−q−kBG) = (AF−q−kBG)
will describe the above system.Hence, if L(q−1) is an arbitrary polynomial, any Aand B s.t.{
A = A+LGB = B+qkLF
(1)
are possible estimates.This means that the true order of the system cannot be established from this type ofclosed-loop experiment and thus, has to be known à-priori.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 15 / 43
Identification in Closed Loop Identifiability Conditions
Identifiability Conditions
Let the system S be described by the following ARMAX process:
A(q−1)y(t) = q−kB(q−1)u(t)+C(q−1)e(t)
where
A(q−1) = 1+a1q−1 + . . .+anaq−na
B(q−1) = b1q−1 + . . .+bnbq−nb
C(q−1) = 1+ c1q−1 + . . .+ cncq−nc
k ≥ 0 na ≥ 0 nb ≥ 1 nc ≥ 0
A, B, C are assumed to co-prime, i.e. have no common factors.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 16 / 43
Identification in Closed Loop Identifiability Conditions
Identifiability Conditions
Let the regulator R be given by:
F(q−1)u(t) = G(q−1)y(t)
whereF(q−1) = 1+ f1g−1 + . . .+ fnf q
−nf
G(q−1) = g0 +g1q−1 + . . .+gngq−ng
F and G are co-prime and G may contain a delay, i.e. some of its leadingcoefficients may be zero.
Let the class of models M(θ) be
A(q−1)y(t) = q−kB(q−1)u(t)+ C(q−1)e(t)
with na ≥ 0, nc ≥ 0, k ≥ 0, nb ≥ 1
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 17 / 43
Identification in Closed Loop Identifiability Conditions
Identifiability Conditions
Introduce
n∗ = min [(na−na),(nb + k−nb− k),(nc−nc)]
The system with its feedback can be written as
y =CF
AF−q−kBG
Let us define np be the number of common factors between C and(AF−q−kBG) and let the order of the polynomial AF−q−kBG bemax[(na +nf ),(k +nb +ng)]− r with r ≥ 0. Note that r > 0 meansna +nf = k +nb +ng and that some of highest order coefficients arezeros.
Assume that a direct identification, using the sequences {u(t)} and{y(t)}, is employed to estimates θ such that M(θ) describes S(θ).
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 18 / 43
Identification in Closed Loop Identifiability Conditions
Identifiability Conditions
Theorem (Söderström, 1973)
A necessary and sufficient condition for the set of desired estimates DT(S,M)to be non-empty is
n∗ ≥ 0 and k∗ ≤ k
From the definition of n∗, it is seen that the condition simply means thatthe true system is contained in the model set, i.e. that the model order issufficient and that the dead-time is not overestimated.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 19 / 43
Identification in Closed Loop Identifiability Conditions
Identifiability Conditions
A related well known sufficient identifiability condition is that the orderof the feedback law be greater than or equal to the order of the forwardpath, see Goodwin and Payne (1977).
The presence of dead-time k > 0 helps identifiability. This can beexplained by the fact that the feedback signal then contains a componentmore or less independent of the current output y(t).The previous condition unfortunately involve the true order of thesystem. If the true order isnot known à-priori, then these conditionscannot be checked à-posteriori, since the order cannot be determined inclosed-loop identification.
These conditions are thus of little use in a practical application. Thefollowing theorem provides a way to guarantee SSI without knowledgeof the systems order.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 20 / 43
Identification in Closed Loop Identifiability Conditions
Identifiability in Closed Loop
Theorem (Söderström et al. (1975))Consider the system S:
y(t) = GD(q−1)u(t)+GN(q−1)e(t)
wheredim y = ny,dim u = nu,dim e = ny, e = N(O,Λ)
andGN(q−1) has all zeros outside unit circle
. Let the control signal be given by
u(t) = Fi(q−1)y(t)+ ki(q−1)v(t)
{v} is an external signal of dim v = nv and Fi and kiare rational functions and i = 1, . . .r.Assume, without loss of generality, that there is a dead-time either in the process or in theregulator, i.e. GD(0)Fi(0) = 0. Then, the system S is identifiable if and only if
n0{rankny{
nv︷︸︸︷k1(z) . . .kr(z)
ny︷︸︸︷Fi(z) . . .Fr(z)
0 . . .0 I . . . I
= ny +nu ∀z
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 21 / 43
Identification in Closed Loop Identifiability Conditions
Practical Conditions for Closed-Loop Identifiability
A necessary condition for identifiability is
r(nv +ny)≥ ny +nu
orr ≥ (nu +ny)/(nv +ny)
If nv = nu, then closed-loop identifiability always satisfied
Without external signal (nv = 0),
r ≥ 1+nu/ny
which when ny = nu becomes r ≥ 2
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 22 / 43
Identification in Closed Loop Identifiability Conditions
Consequences for Adaptive Control
Under time-varying feedback, identifiability should be garanteed.
Because in adaptive control, the controller parameters are constantlyupdated, identifiability should be garanteed (at least during the transientphase).
Nonlinearities in the controller should also help identifiability.
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 23 / 43
Identification in Closed Loop Relevant Loops
Identification for Control
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 24 / 43
Effect of Under-modelling PEM and Undermodelling
Prediction Error Identification
(Gevers, 2005)
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 25 / 43
Effect of Under-modelling PEM and Undermodelling
Properties of the Identified Model
(Gevers, 2005)
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 26 / 43
Effect of Under-modelling Bias and Variance Errors
Bias and Variance Errors
Ljung (1985) was the first to formalize the situation when the true plantdoes not belong to the model setModelling error consists of two distinct components:
The bias error arises when the model structure is unable to represent thetrue systemThe variance error is caused by the noise and the finiteness of the data set
The variance error goes asymptotically to zero as the number of datagoes to zero.
If the model is not exact, then its quality should reflect its intended use
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 27 / 43
Effect of Under-modelling Bias and Variance Errors
Bias and Variance Errors
(Gevers, 2005)
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 28 / 43
Effect of Under-modelling Bias and Variance Errors
Bias and Variance Errors
Introduce θ ∗ as the convergence point of the prediction error estimate:
θ∗ = lim
N→∞θN = arg min
θ∈Dθ
V(θ)
As defined by Ljung (1985), the bias and variance of the transferfunction estimates are:
Definition: Bias and Variance Errors
G0(ejω)− G(ejω , θN) = G0(ejω)− G(ejω ,θ ∗)︸ ︷︷ ︸Bias
+ G(ejω ,θ ∗)− G(ejω , θN)︸ ︷︷ ︸Variance
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 29 / 43
Effect of Under-modelling Bias and Variance Errors
Quantifying the Variance
DefineVar(GN(ejω)) = E[|G(ejω , θN)−E[G(ejω , θN)]|2]
With Φu and Φv the power spectral densities of u and H0e0, Ljung (1985)showed that
limn→∞
limN→∞
= Var(GN(ejω)) =nN
Φv(ω)Φu(ω)
where n is the model order
Recently, exact expressions for finite-order models have been derived
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 30 / 43
Input Design PRBS
Pseudo Random Binary Sequences (PRBS)
(Landau, Lozano, M’Saad, Adaptive Control, Springer-Verlag,1998, pp. 179-182)
A PRBS is a sequence of rectangular pulses of constant magnitude,modulated in width that approximates a white noise, and thus is rich infrequencies.
A PRBS of length 2N−1 is generated by means of a shift register of Nstages:
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 31 / 43
Input Design PRBS
Pseudo Random Binary Sequences (PRBS)
Maximum duration of a PRBS rectangular pulse is dmax = NTs
For estimation of static gain, the duration of at least one pulse must begreater than the rise time of the process, dmax = NTs > tR
Typically, duration L of test is taken s.t. L = (2N−1)Ts
The condition NTs > tR might result in too long an experiment
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 32 / 43
Input Design PRBS
Pseudo Random Binary Sequences (PRBS)
By choosing the PRBS clock frequency s.t.
fPRBS =fsp
p = 1,2,3, · · ·
the condition becomes dmax = pNTs > tRIf p is the PRBS frequency divider, then
dmax = pNTs L′ = pL p = 1,2,3 · · ·
If N is increased by p−1, then
dmax = (N +p−1)Ts L′ = 2(p−1)L p = 1,2,3 · · ·
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 33 / 43
Input Design PRBS
Pseudo Random Binary Sequences (PRBS)
Dividing the PRBS clock frequency reduces high frequencies while augmentinglow frequencies
Recommended to choose p < 4
For example for N = 8 and p = 1,2,3
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 34 / 43
Input Design Optimal Input Design
Optimal Input Design
Optimal design requires knowledge of the true system!This advocates iterative method...
First use a PRBSThen, using estimated model, calculate an input optimal for that model
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 35 / 43
Input Design Persistent Excitation
Persistent Excitation
A signal u is called persistently exciting of order n if the matrix Cn
defined below is positive definite
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 36 / 43
Input Design Persistent Excitation
Persistent Excitation
A step is PE of order 1(q−1)u(t) = 0
A sinusoid is PE of order 2
q2−2qcosωh+1)u(t) = 0
To identify a transfer function of order n one needs n sinusoids
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 37 / 43
Examples
Example 1
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 38 / 43
Examples
Example 1: Excitation
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 39 / 43
Examples
Example 1: Feedback
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 40 / 43
Examples
Example 1: Forgetting Factor
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 41 / 43
Examples
Example 2: Model Structure
Consider the process
y(t)−0.8y(t−1) = 0.5u(t−1)+ e(t)−0.5e(t−1)
First use the estimation model with RLS
y(t)+ay(t−1) = bu(t−1)+ e(t)
Then use the estimation model with RELS
y(t)+ay(t−1) = bu(t−1)+ e(t)+ ce(t−1)
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 42 / 43
Examples
Example 2: Model Structure
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 43 / 43