Note: This page has been translated by MathWorks. Click here to see

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

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

Compute output, error, and weights using block LMS adaptive algorithm

The `dsp.BlockLMSFilter`

System
object™ computes output, error, and weights using the block LMS adaptive
algorithm.

To compute the output, error, and weights:

Create the

`dsp.BlockLMSFilter`

object and set its properties.Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects? (MATLAB).

`blms = dsp.BlockLMSFilter`

`blms = dsp.BlockLMSFilter(length,blocksize)`

`blms = dsp.BlockLMSFilter(Name,Value)`

returns an
adaptive FIR filter, `blms`

= dsp.BlockLMSFilter`blms`

, that filters the input signal and computes
filter weights based on the block least mean squares (LMS) algorithm.

returns an adaptive FIR filter, `blms`

= dsp.BlockLMSFilter(`length`

,`blocksize`

)`blms`

, with the
`Length`

property set to `length`

and the
`BlockSize`

property set to `blocksize`

.

returns an adaptive FIR filter, `blms`

= dsp.BlockLMSFilter(`Name,Value`

)`blms`

, with each specified property
set to the specified value. Enclose each property name in single quotes. Unspecified
properties have default values.

**For versions earlier than R2016b, use the step
function to run the System object algorithm. The arguments to
step are the object you created, followed by
the arguments shown in this section.**

**For example, y = step(obj,x) and y = obj(x) perform equivalent operations.**

`[y,err,wts] = blms(x,d)`

`[y,err] = blms(x,d)`

`[___] = blms(x,d,mu)`

`[___] = blms(x,d,a)`

`[___] = blms(x,d,r)`

`[y,err,wts] = blms(x,d,mu,a,r)`

`[`

filters input `y`

,`err`

,`wts`

] = blms(`x`

,`d`

,`mu`

,`a`

,`r`

)`x`

, using `d`

as the desired signal,
`mu`

as the step size, `a`

as the adaptation
control, and `r`

as the reset signal. The object returns the filtered
output `y`

, the filter error `err`

, and the adapted
filter weights `wts`

. Set the properties appropriately to provide all
possible inputs.

To use an object function, specify the
System
object as the first input argument. For
example, to release system resources of a System
object named `obj`

, use
this syntax:

release(obj)

This object implements the algorithm, inputs, and outputs described on the Block LMS Filter block reference page. The object properties correspond to the block parameters.