Main Content

cma

(To be removed) Construct constant modulus algorithm (CMA) object

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

Syntax

alg = cma(stepsize)
alg = cma(stepsize,leakagefactor)

Description

The cma 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.

Note

After you use either lineareq or dfe to create a CMA equalizer object, you should initialize the equalizer object's Weights property with a nonzero vector. Typically, CMA is used with differential modulation; otherwise, the initial weights are very important. A typical vector of initial weights has a 1 corresponding to the center tap and 0s elsewhere.

alg = cma(stepsize) constructs an adaptive algorithm object based on the constant modulus algorithm (CMA) with a step size of stepsize.

alg = cma(stepsize,leakagefactor) sets the leakage factor of the CMA. leakagefactor must be 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.

Properties

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

PropertyDescription
AlgTypeFixed value, 'Constant Modulus'
StepSizeCMA step size parameter, a nonnegative real number
LeakageFactorCMA leakage factor, a real number between 0 and 1

Examples

collapse all

This example configures the recommended comm.LinearEqualizer System object™ and the legacy lineareq feature with comparable settings.

Initialize Variables and Supporting Objects

d = randi([0 3],1000,1);
x = pskmod(d,4,pi/4);
r = awgn(x,25);
sps = 2; %samples per symbol for oversampled cases
nTaps = 6;
txFilter = comm.RaisedCosineTransmitFilter('FilterSpanInSymbols',nTaps, ...
    'OutputSamplesPerSymbol',4);
rxFilter = comm.RaisedCosineReceiveFilter('FilterSpanInSymbols',nTaps, ...
    'InputSamplesPerSymbol',4,'DecimationFactor',2);
x2 = txFilter(x);
r2 = rxFilter(awgn(x2,25,0.5));
filterDelay = txFilter.FilterSpanInSymbols/2 + ...
    rxFilter.FilterSpanInSymbols/2; % Total filter delay in symbols

To compare the equalized output, plot the constellations using code such as:

% plot(yNew,'*')
% hold on
% plot(yOld,'o')
% hold off; legend('New Eq','Old Eq'); grid on

Use CMA Algorithm with Linear Equalizer

Configure lineareq and comm.LinearEqualizer objects with comparable settings. The LeakageFactor property has been removed from CMA algorithm. The comm.LinearEqualizer System object™ assumes that leakage factor is always 1.

eqOld = lineareq(5,cma(0.05),pskmod(0:3,4,pi/4))
eqOld =
  EqType: 'Linear Equalizer'
  AlgType: 'Constant Modulus'
  nWeights: 5
  nSampPerSym: 1
  SigConst: [0.7071 + 0.7071i -0.7071 + 0.7071i -0.7071 - 0.7071i 0.7071 - 0.7071i]
  StepSize: 0.0500
  LeakageFactor: 1
  Weights: [1 0 0 0 0]
  WeightInputs: [0 0 0 0 0]
  ResetBeforeFiltering: 1
  NumSamplesProcessed: 0
eqNew = comm.LinearEqualizer('NumTaps',5,'Algorithm','CMA','StepSize',0.05, ...
    'Constellation',pskmod(0:3,4,pi/4),'ReferenceTap',1)
eqNew = comm.LinearEqualizer with properties:
  Algorithm: 'CMA'
  NumTaps: 5
  StepSize: 0.0500
  Constellation: [0.7071 + 0.7071i -0.7071 + 0.7071i -0.7071 - 0.7071i 0.7071 - 0.7071i]
  ReferenceTap: 1
  InputSamplesPerSymbol: 1
  AdaptWeightsSource: 'Property'
  AdaptWeights: true
  InitialWeightsSource: 'Auto'
  WeightUpdatePeriod: 1

Call the equalizers.

yOld = equalize(eqOld,r);
yNew = eqNew(r);

Algorithms

Referring to the schematics 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

(LeakageFactor) w + (StepSize) u*e

where the * operator denotes the complex conjugate.

Compatibility Considerations

expand all

Warns starting in R2020a

References

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

[2] Johnson, Richard C., Jr., Philip Schniter, Thomas. J. Endres, et al., “Blind Equalization Using the Constant Modulus Criterion: A Review,” Proceedings of the IEEE, Vol. 86, October 1998, pp. 1927–1950.

Introduced before R2006a