Professional Documents
Culture Documents
Guy Dumont
January 2010
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 1 / 21
Recursive Identification
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 2 / 21
Recursive Least-Squares
with
Y T (t) = [ y(1) · · · y(t)]
T
x (1)
..
X(t) = .
xT (t)
Assume one additional observation becomes available, the problem is then to
find θ̂ (t + 1) as a function of θ̂ (t) and y(t + 1) and u(t + 1).
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 3 / 21
Recursive Least-Squares
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 4 / 21
Recursive Least-Squares Matrix Inversion Lemma
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 5 / 21
Recursive Least-Squares Matrix Inversion Lemma
A−1 BCA−1
(A + BC)−1 = A−1 −
1 + CA−1 B
Now, consider
A = X T (t)X(t) B = x(t + 1) C = xT (t + 1)
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 6 / 21
Recursive Least-Squares RLS Algorithm
RLS
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 7 / 21
Recursive Least-Squares RLS Algorithm
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 8 / 21
Recursive Least-Squares RLS Algorithm
There are some very strong connections between the recursive least-squares
algorithm and the Kalman filter. Indeed, the RLS algorithm has the structure
of a Kalman filter:
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 9 / 21
Recursive Least-Squares RLS Algorithm
Matlab Implementation
function [thetaest,P]=rls(y,x,thetaest,P)
% RLS
% y,x: current measurement and regressor
% thetaest, P: parameter estimates and covariance matrix
K= P*x/(1+x’*P*x); % Gain
P= P- (P*x*x’*P)/(1+x’*P*x); % Covariance matrix update
thetaest= thetaest +K*(y-x’*thetaest); %Estimate update
end
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 10 / 21
RELS, AML and RML RELS and AML
can be written as
y(t) = xT (t)θ + e(t)
with
θ = [a1 , . . . , an , b1 , . . . , bn , c1 , . . . , cn ]T
xT (t) = [−y(t − 1), . . . , −y(t − n), u(t − 1),
. . . , u(t − n), e(t − 1), . . . , e(t − n)]T
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 11 / 21
RELS, AML and RML RELS and AML
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 12 / 21
RELS, AML and RML RELS and AML
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 13 / 21
RELS, AML and RML RELS and AML
Sometimes ε(t) and η(t) are also referred to as a-priori and a-posteriori
prediction errors.
Because it uses the latest estimate θ̂ (t), as opposed to θ̂ (t − 1) for ε(t),
η(t) is a better estimate, especially in transient behaviour.
Note however that if θ̂ (t) converges as t −→ ∞ then η(t) −→ ε(t).
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 14 / 21
RELS, AML and RML RELS and AML
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 15 / 21
RELS, AML and RML RELS and AML
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 16 / 21
RELS, AML and RML RML
Recursive Maximum-Likelihood
1 t 2
V(t) = ∑ ε (i)
2 i=1
1
xf (t) = x(t)
Ĉ(q−1 )
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 17 / 21
RELS, AML and RML RML
Recursive Maximum-Likelihood
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 18 / 21
RELS, AML and RML Properties of AML
Properties of AML
Definition
A discrete transfer function is said to be strictly positive real if it is stable and
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 19 / 21
RELS, AML and RML Properties of AML
Properties of AML
E[ε(t, θ̂ ) − e(t)]2 = 0
θ̂ (t) −→ θ as t −→ ∞
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 20 / 21
RPEM
A Unified Algorithm
Looking at all the previous algorithms, it is obvious that they all have the
same form, with only different parameters. They can all be represented by a
recursive prediction - error method (RPEM).
RPEM
Guy Dumont (UBC EECE) EECE 574 - Adaptive Control January 2010 21 / 21