Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 0 down vote accepted

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

share|cite|improve this answer
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… – 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 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.