# Documentation

### This is machine translation

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

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# lms

Construct least mean square (LMS) adaptive algorithm object

## Syntax

```alg = lms(stepsize) alg = lms(stepsize,leakagefactor) ```

## Description

The `lms` 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 = lms(stepsize)` constructs an adaptive algorithm object based on the least mean square (LMS) algorithm with a step size of `stepsize`.

`alg = lms(stepsize,leakagefactor)` sets the leakage factor of the LMS algorithm. `leakagefactor` must be between 0 and 1. A value of 1 corresponds to a conventional weight update algorithm, and a value of 0 corresponds to a memoryless update algorithm.

### Properties

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

PropertyDescription
`AlgType`Fixed value, `'LMS'`
`StepSize`LMS step size parameter, a nonnegative real number
`LeakageFactor`LMS leakage factor, a real number between 0 and 1

## Examples

For examples that use this function, see Equalize Using a Training Sequence in MATLAB, Example: Equalizing Multiple Times, Varying the Mode, and Example: Adaptive Equalization Within a Loop.

## Algorithms

Referring to the schematics presented in Adaptive Algorithms, 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 weights, w, this adaptive algorithm creates the new set of weights given by

(`LeakageFactor`) w + (`StepSize`) u*e

where the * operator denotes the complex conjugate.

## References

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

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

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

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