My Avatar

LanternD's Castle

An electronics enthusiast - survive technically

Adaptive Control - Least-Squares Algorithm in Parameters Estimation

2016-09-08

Parameter estimation is one of the keystones in Adaptive control; the main idea of parameter estimation is to construct a parametric model and then use optimization methods to minimize the error between the true parameter and the estimation. Least-square algorithm is one of the common optimization methods.

Background

I take adaptive control course this semester, and in the homework after the second lecture, we are going to derive the formular for the estimated parameter vector θ(t) at time t.

Some terms we need to demonstrate the problem:

There are two algorithms that can solve this problem. The first one is Gradient (Descent) Algorithm, another one is what we are going to demonstrate here, Least-squares algorithm. Basically, the differences between these two algorithms are the cost function they employed and the method to minimize the cost function.

Problem

So here is our setting:

Given the cost function in Least-Squares algorithm,

J(θ(t))=120t|θT(t)ϕ(τ)y(τ)|2dτ

Take the partial derivative of J(θ(t)), let it be 0, solve the equation

J(θ)θ=0

and derive that

θ(t)=[0tϕ(τ)ϕT(τ)dτ]10ty(τ)ϕ(τ)dτ

Solution

J(θ)θ=12θ{0t[[θT(t)ϕ(τ)]22θT(t)ϕ(τ)y(τ)y2(τ)]dτ}=120tθ[θT(t)ϕ(τ)]2dτ120tθ[2θT(t)ϕ(τ)y(τ)]dτ=0tθT(t)ϕ(τ)θ[θT(t)ϕ(τ)]dτ0ty(τ)ϕ(τ)dτ=0tθT(t)ϕ(τ)ϕT(τ)dτ0ty(τ)ϕ(τ)dτ=0

Therefore,

θT(t)[0tϕ(τ)ϕT(τ)dτ]=0ty(τ)ϕ(τ)dτ [0tϕ(τ)ϕT(τ)dτ]θ(t)=0ty(τ)ϕ(τ)dτ

Finally,

θ(t)=[0tϕ(τ)ϕT(τ)dτ]10ty(τ)ϕ(τ)dτ

(The right hand side is a column vector, so when taking θT(t) out of the integral, it should transpose to become a column vector. And ϕ(τ)ϕT(τ)=[ϕ(τ)ϕT(τ)]T, because it is a symmetric matrix.)

Revision and Updates

Since the solution above required 0tϕ(τ)ϕT(τ)dτ to be invertible, in some scenario where t is very small, usually the matrix is not full ranked and is not invertible. To deal with this situation, we revise the cost function as

J(θ(t))=120t|θT(t)ϕ(τ)y(τ)|2dτ+12[θ(t)θ0]TQ0[θ(t)θ0]

where θ0=θ(0) is the initial estimation of parameters, and Q0=Q0T is a symmetric and positive definite matrix.

We can do the same process like the solution above, and we achieve:

θ(t)=[Q0+0tϕ(τ)ϕT(τ)dτ]1[Q0θ0+0ty(τ)ϕ(τ)dτ]

(Notice that: xTAxx=(Ax)T+xTA=xTAT+xTA, where x and A are matrices, A is not a function of x. If A is a symmetric matrix, AT=A, then the result would be 2xTA or 2xTAT.)

Positive definite matrix is always invertible, so this formula can suit for more situations.

Matrix Formula

VTUV=UT

Disqus Comment 0