This is machine translation

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


System object: dsp.LMSFilter
Package: dsp

Reset filter states for LMS filter




reset(H) resets the filter states of the LMS FIR filter,H, 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.

Example of resetting filter states:

 hlms1 = dsp.LMSFilter(11, 'StepSize', 0.01);
 hfilt = dsp.DigitalFilter; % System to be identified
 hfilt.TransferFunction = 'FIR (all zeros)';
 hfilt.Numerator = fir1(10, .25);
 x = randn(1000,1); % input signal
 d = step(hfilt, x) + 0.01*randn(1000,1); % desired signal
 [y,e,w] = step(hlms1, x, d);
 % Call step method again without resetting filter states
 [y1,e1,w1] = step(hlms1,x,d);
 isequal(y,y1) % Returns 0
 % Now reset the filter states to zero
 % invoke step method
 [y2,e2,w2] = step(hlms1,x,d);
 isequal(y,y2) % Returns 1
Was this topic helpful?