This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Construct recursive least squares (RLS) adaptive algorithm object


alg = rls(forgetfactor)
alg = rls(forgetfactor,invcorr0)


The rls function creates an adaptive algorithm object that you can use with the lineareq function or dfe function to create an equalizer object. You can then use the equalizer object with the equalize function to equalize a signal. To learn more about the process for equalizing a signal, see Adaptive Algorithms.

alg = rls(forgetfactor) constructs an adaptive algorithm object based on the recursive least squares (RLS) algorithm. The forgetting factor is forgetfactor, a real number between 0 and 1. The inverse correlation matrix is initialized to a scalar value.

alg = rls(forgetfactor,invcorr0) sets the initialization parameter for the inverse correlation matrix. This scalar value is used to initialize or reset the diagonal elements of the inverse correlation matrix.


The table below describes the properties of the RLS adaptive algorithm object. To learn how to view or change the values of an adaptive algorithm object, see Access Properties of an Adaptive Algorithm.

AlgTypeFixed value, 'RLS'
ForgetFactorForgetting factor
InvCorrInitScalar value used to initialize or reset the diagonal elements of the inverse correlation matrix

Also, when you use this adaptive algorithm object to create an equalizer object (via the lineareq function or dfe function), the equalizer object has an InvCorrMatrix property that represents the inverse correlation matrix for the RLS algorithm. The initial value of InvCorrMatrix is InvCorrInit*eye(N), where N is the total number of equalizer weights.


For examples that use this function, see Defining an Equalizer Object and Example: Adaptive Equalization Within a Loop.


Referring to the schematics presented in Equalizer Structure, define w as the vector of all weights wi and define u as the vector of all inputs ui. Based on the current set of inputs, u, and the current inverse correlation matrix, P, this adaptive algorithm first computes the Kalman gain vector, K


where H denotes the Hermitian transpose.

Then the new inverse correlation matrix is given by

(ForgetFactor)-1(P – KuHP)

and the new set of weights is given by

w + K*e

where the * operator denotes the complex conjugate.


[1] Farhang-Boroujeny, B., Adaptive Filters: Theory and Applications, Chichester, England, John Wiley & Sons, 1998.

[2] Haykin, S., Adaptive Filter Theory, Third Ed., Upper Saddle River, NJ, Prentice-Hall, 1996.

[3] Kurzweil, J., An Introduction to Digital Communications, New York, John Wiley & Sons, 2000.

[4] Proakis, John G., Digital Communications, Fourth Ed., New York, McGraw-Hill, 2001.

Introduced before R2006a

Was this topic helpful?