# Is there a published numerically stable version of the Recursive Least-Squares algorithm?

I have implemented in MATLAB the recursive least-squares algorithm given in, for instance, Hayes's excellent Statistical Digital Signal Processing and Modeling (p. 541ff).

However, when I run the algorithm on real data with a forgetting factor $\lambda<1$ (e.g. $\lambda = 0.9$), after about 2000 updates I always reach a point where my filter coefficients explode in size and obviously overflow. Stepping through the algorithm with a debugger reveals that the coefficients of $P$, the inverse correlation matrix, grow exponentially bigger due, I believe, to the division by $\lambda$ at each timestep.

I've done a literature search but found very little useful information. I found a paper by Bouchard who recommends to force $P$ to be symmetric, but that didn't help.

Is there a published version of the RLS algorithm that "fixes" these numerical instability problems? Or does anyone know what else I should try?

-

Have you looked into QR-RLS filters? I think Haykin's "Adaptive Filter theory" is the standard reference here.

-
Thanks, that sounds very promising. But I have no access to that book, at least not quickly. Do you know of a paper I could get hold of? –  lindelof Jun 1 '12 at 16:15
Not really.But Google is our friend. eg signal.hut.fi/~mobien/Thesis/QRD-RLS%20adaptive%20filter%20book/… –  leonbloy Jun 1 '12 at 16:25
Thanks for the link. It'll take me a while to test this algorithm but I'm going to assume it works for me and accept your answer. –  lindelof Jun 1 '12 at 16:32
BTW: I suggest you that next time you try dsp.stackexchange.com for this kind of question –  leonbloy Jun 1 '12 at 16:36
Point taken. Didn't even know they had a site for that :-) –  lindelof Jun 3 '12 at 19:57