Documentation

This is machine translation

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

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

reset

System object: dsp.LMSFilter
Package: dsp

Reset filter states for LMS filter

Syntax

reset(lms)

Description

reset(lms) resets the filter states of the LMS FIR filter, lms, to their initial values specified in the InitialConditions property. The initial filter state values correspond to the initial conditions for difference equation defining the adaptive filter. After the step method applies the LMS filter to nonzero input data, the states may be different. Invoking the step method again without first invoking thereset method may produce different outputs for an identical input.

Reset an LMS Filter

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).

 lms1 = dsp.LMSFilter(11, 'StepSize', 0.01);
 filt = dsp.FIRFilter; % System to be identified
 filt.Numerator = fir1(10, .25);
 x = randn(1000,1); % input signal
 d = filt(x) + 0.01*randn(1000,1); % desired signal
 [y,e,w] = lms1(x, d);

Call LMS algorithm again without resetting filter states.

 [y1,e1,w1] = lms1(x,d);
 isequal(y,y1)
ans =

  logical

   0

Now reset the filter states to zero.

 reset(lms1)

Call the LMS algorithm.

 [y2,e2,w2] = lms1(x,d);
 isequal(y,y2)
ans =

  logical

   1

Was this topic helpful?