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. 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 be removed) Construct normalized least mean square (LMS) adaptive algorithm object

normlms will be removed in a future release. Use comm.LinearEqualizer or comm.DecisionFeedback instead.


alg = normlms(stepsize)
alg = normlms(stepsize,bias)


The normlms 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 Equalization.

alg = normlms(stepsize) constructs an adaptive algorithm object based on the normalized least mean square (LMS) algorithm with a step size of stepsize and a bias parameter of zero.

alg = normlms(stepsize,bias) sets the bias parameter of the normalized LMS algorithm. bias must be between 0 and 1. The algorithm uses the bias parameter to overcome difficulties when the algorithm's input signal is small.


The table below describes the properties of the normalized LMS adaptive algorithm object. To learn how to view or change the values of an adaptive algorithm object, see Equalization.

AlgTypeFixed value, 'Normalized LMS'
StepSizeLMS step size parameter, a nonnegative real number
LeakageFactorLMS leakage factor, a real number between 0 and 1. A value of 1 corresponds to a conventional weight update algorithm, while a value of 0 corresponds to a memoryless update algorithm.
BiasNormalized LMS bias parameter, a nonnegative real number


collapse all

For proper equalization using adaptive algorithms other than CMA, you should set the reference tap so that it exceeds the delay, in symbols, between the transmitter's modulator output and the equalizer input. When this condition is satisfied, the total delay between the modulator output and the equalizer output is equal to (RefTap-1)/nSampPerSym symbols. Because the channel delay is typically unknown, a common practice is to set the reference tap to the center tap in a linear equalizer, or the center tap of the forward filter in a decision-feedback equalizer.

For CMA equalizers, the expression above does not apply because a CMA equalizer has no reference tap. If you need to know the delay, you can find it empirically after the equalizer weights have converged. Use the xcorr function to examine cross-correlations of the modulator output and the equalizer output.

Techniques for Working with Delays

Here are some typical ways to take a delay of D into account by padding or truncating data:

  • Pad your original data with D extra symbols at the end. Before comparing the original data with the received data, omit the first D symbols of the received data. In this approach, all the original data (not including the padding) is accounted for in the received data.

  • Before comparing the original data with the received data, omit the last D symbols of the original data and the first D symbols of the received data. In this approach, some of the original symbols are not accounted for in the received data.

This example illustrates the second approach by omitting the last D symbols to account for the delay. For an example that illustrates both approaches in the context of interleavers, see Delays of Convolutional Interleavers.

Create a random signal and BPSK modulate it. Assign a portion of the signal as a training signal.

M = 2; % Use BPSK modulation
msg = randi([0 M-1],1000,1); % Random data
bpskMod = comm.BPSKModulator('PhaseOffset',0);
modmsg = bpskMod(msg); % Modulate
trainlen = 100; % Length of training sequence
trainsig = modmsg(1:trainlen); % Training sequence

Define an equalizer and equalize the received signal.

eqlin = lineareq(3,normlms(.0005,.0001),pskmod(0:M-1,M));
eqlin.RefTap = 2; % Set reference tap of equalizer.
[eqsig,detsym] = equalize(eqlin,modmsg,trainsig); % Equalize.

Demodulate the detected signal.

bpskDemod = comm.BPSKDemodulator('PhaseOffset',0);
detmsg = bpskDemod(detsym);

Compute bit error rate while compensating for delay introduced by RefTap and ignoring training sequence.

D = (eqlin.RefTap-1)/eqlin.nSampPerSym;
hErrorCalc = comm.ErrorRate('ReceiveDelay',D);
berVec = step(hErrorCalc, msg(trainlen+1:end), detmsg(trainlen+1:end));
ber = berVec(1)
ber = 0
numerrs = berVec(2)
numerrs = 0


Referring to the schematics presented in Equalization, 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


where the * operator denotes the complex conjugate and H denotes the Hermitian transpose.

Compatibility Considerations

expand all

Not recommended starting in R2019a


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

Introduced before R2006a