Main Content

comm.MLSEEqualizer

Equalize modulated signals using maximum likelihood sequence estimation

Description

The comm.MLSEEqualizer System object™ uses the Viterbi algorithm to equalize a linearly modulated signal through a dispersive channel. The object processes input frames and outputs the maximum likelihood sequence estimate (MLSE) of the signal. This process uses an estimate of the channel modeled as a finite impulse response (FIR) filter.

To equalize a linearly modulated signal and output the maximum likelihood sequence estimate:

  1. Create the comm.MLSEEqualizer object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

mlse = comm.MLSEEqualizer creates a maximum likelihood sequence estimation (MLSE) equalizer System object, mlse. This object uses the Viterbi algorithm and a channel estimate to equalize a linearly modulated signal that has been transmitted through a dispersive channel.

mlse = comm.MLSEEqualizer(channel) sets the Channel property to channel. For example, comm.MLSEEqualizer([1;0.7;0.5;0.1]) creates an MLSE equalizer object that sets the channel coefficients to [1;0.7;0.5;0.1] and ChannelSource to 'Input port'.

mlse = comm.MLSEEqualizer(___,Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in previous syntaxes. For example, comm.MLSEEqualizer(TracebackDepth="10",TerminationMethod="Continuous") creates an MLSE equalizer object that uses the continuous termination method and expects a traceback depth of 10.

example

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Source of channel coefficients, specified as 'Property' or 'Input port'.

  • When this property is set to 'Property', use the Channel property to specify channel coefficients.

  • When it is set to 'Input port' use the second input, channel, to specify channel coefficients.

Channel coefficients, specified as a numeric column vector that contains an estimate of the channel modeled as a finite impulse response (FIR) filter. The length of this vector determines the memory length of the channel. The vector length must be an integer multiple of the SamplesPerSymbol property value.

Dependencies

This property applies when you set the ChannelSource property to 'Property'.

Input signal constellation, specified as a vector of complex symbol values.

Example: The default, [1+1i -1+1i -1-1i 1-1i], are symbols for a QPSK-modulated constellation. You can generated such symbols by running pskmod(0:3,4).

Traceback depth of Viterbi algorithm, specified as a positive integer. The traceback depth indicates the number of trellis branches (the number of symbols) and influences the decoding accuracy and delay. The decoding delay represents the number of zero symbols that precede the first decoded symbol in the output.

  • When you set the TerminationMethod property to 'Continuous', the decoding delay equals the number of zero symbols of this property.

  • When you set the TerminationMethod property to 'Truncated', there is no output delay.

Termination method of Viterbi algorithm, specified as 'Truncated' or 'Continuous'.

  • When you set this property to 'Continuous', the object initializes the Viterbi algorithm metrics of all the states to 0 the first time the object executes. The object saves its internal state metric at the end of each frame, for use with the next frame.

  • When you set this property to 'Truncated', the object resets at every frame. The Viterbi algorithm processes each frame of data independently, resetting the state metric at the end of each frame. The input data signal must contain at least TracebackDepth symbols, not including an optional preamble.

    The traceback path always starts at the state with the minimum metric. The initialization of the state metrics depends on whether you specify a preamble or postamble.

    • If you set the PreambleSource property to 'None', the object initializes the metrics of all the states to 0 at the beginning of each data frame.

    • If you set the PreambleSource property to 'Property', the object uses the preamble specified by the Preamble property to initialize the state metrics at the beginning of each data frame. When you specify a preamble, the traceback path ends at one of the states represented by that preamble.

    • If you set the PostambleSource property to 'None', the traceback path starts at the state with the smallest metric.

    • If you set the PostambleSource property to 'Property', the traceback path begins at the state represented by the postamble that you specify at the Postamble property. If the postamble does not decode to a unique state, the decoder identifies the smallest of all possible decoded states that are represented by the postamble. The decoder then begins traceback decoding at that state.

Option to enable the reset equalizer input, specified as a numeric or logical 0 (false) or 1 (true). To use the object syntax with the reset input argument, set this property to true.

Dependencies

This property applies when you set the TerminationMethod property to 'Continuous'.

Source of preamble, specified as 'None' or 'Property'.

  • When you set this property to 'None', the object assumes there is no preamble when processing the input signal.

  • When you set this property to 'Property', specify a preamble using the Preamble property.

Dependencies

This property applies when you set the TerminationMethod property to Truncated.

Preamble that precedes the input signals, specified as a row vector of integer values. The values of the preamble must be in the range [0, M1]. M is the number of symbols in the signal constellation that you specify in the Constellation property. An integer value of (k – 1) in the vector corresponds to the kth entry in the vector stored in the Constellation property.

Dependencies

This property applies when you set the TerminationMethod property to 'Truncated' and the PreambleSource property to 'Property'.

Source of postamble, specified as 'None' or 'Property'.

  • When you set this property to 'None', the object assumes there is no postamble when processing the input signal.

  • When you set this property to 'Property', specify a postamble using the Postamble property.

Dependencies

This property applies when you set the TerminationMethod property to 'Truncated'.

Postamble that follows the input signals, specified as a row vector of integer values. The values of the postamble must be in the range [0, M1]. M is the number of symbols in the signal constellation that you specify in the Constellation property. An integer value of (k – 1) in the vector corresponds to the kth entry in the vector stored in the Constellation property.

Dependencies

This property applies when you set the TerminationMethod property to 'Truncated' and the PostambleSource property to 'Property'.

The number of samples per symbol in the input signal, specified as an integer scalar value.

Usage

Description

Y = mlse(X) equalizes the linearly modulated data input signal using the Viterbi algorithm.

Y = mlse(X,channel) uses channel as the channel coefficients when you set the ChannelSource property to 'Input port'.

Y = mlse(X,reset) uses reset as the reset signal when you set the TerminationMethod property to 'Continuous' and the ResetInputPort property to true. The object resets when reset has a nonzero value.

Y = mlse(X,channel,reset) uses values defined by optional channel and reset input arguments. To use this syntax, set TerminationMethod to 'Continuous', and set ChannelSource and ResetInputPort to true.

Input Arguments

expand all

Linearly modulated data input signal, specified as a column vector.

Data Types: double | single
Complex Number Support: Yes

Channel coefficients, specified as a numeric column vector containing the coefficients of an FIR filter in descending order of powers of z. The length of this vector is the channel memory, which must be an integer multiple of the samples per input symbol specified in the SamplesPerSymbol property.

Dependencies

To enable this input argument, set ChannelSource to 'Input port'.

Data Types: double | single
Complex Number Support: Yes

Reset signal, specified as numeric scalar or logical. The object resets the object to initial conditions when reset has a nonzero value.

Dependencies

To enable this input argument, set TerminationMethod to 'Continuous' and ResetInputPort to true.

Data Types: double | logical
Complex Number Support: Yes

Output Arguments

expand all

Maximum likelihood sequence estimate of the signal, returned as a column vector that has the same length and data type as input signal X.

Object Functions

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)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

Use an MLSE equalizer to remove the effects of a frequency-selective channel.

Specify static channel coefficients.

chCoeffs = [.986; .845; .237; .12345+.31i];

Create an MLSE equalizer object. Create an error rate calculator object.

mlse = comm.MLSEEqualizer( ...
    TracebackDepth=10, ...
    Channel=chCoeffs, ...
    Constellation=pskmod(0:3,4,pi/4));
errorRate = comm.ErrorRate;

The processing loop QPSK modulates frames of data applies, filters the QPSK-modulated signal through a multipath channel, applies equalization and QPSK demodulation, and then computes cumulative error rate statistics.

snr = 9;
for n = 1:50
    data= randi([0 3],100,1);
    modSignal = pskmod(data,4,pi/4,'gray');

    chanOutput = awgn(filter(chCoeffs,1,modSignal),snr,'measured');
    
    eqSignal = mlse(chanOutput);
    demodData = pskdemod(eqSignal,4,pi/4,'gray');
    
    errorStats = errorRate(data,demodData);
end

Display the bit error rate and the number of errors.

ber = errorStats(1)
ber = 
0.0156
numErrors = errorStats(2)
numErrors = 
78

Create an MLSE equalizer System object, specifying the TerminationMethod property as "Continuous".

mlse = comm.MLSEEqualizer(TerminationMethod="Continuous");
mlse.Constellation = pskmod([0:3].',4,pi/4);

Create an error rate calculator System object, specifying the receive delay as the traceback depth of the MLSE equalizer. This is to compensate for the delay that the continuous termination method introduces.

errorRate = comm.ErrorRate(ReceiveDelay=mlse.TracebackDepth);

This processing loop generates random data, QPSK-modulates it, adds noise, equalizes, demodulates, and computes cumulative error rate statistics.

snr = 10;
for n = 1:30
    data = randi([0 3],100,1);
    tx = pskmod(data,4,pi/4);
    rx = awgn(filter(mlse.Channel,1,tx),snr,'measured');
    eqSignal = mlse(rx);
    demodData = pskdemod(eqSignal,4,pi/4);
    errorStats = errorRate(data,demodData);
end

Display the bit error rate and the number of errors.

ber = errorStats(1)
ber = 
0.0148
numErrors = errorStats(2)
numErrors = 
44

Algorithms

expand all

References

[1] Proakis, John G. Digital Communications. 5th ed. New York: McGraw Hill, 2007.

[2] Steele, Raymond, Ed. Mobile Radio Communications. Chichester, England: John Wiley & Sons, 1996.

Extended Capabilities

Version History

Introduced in R2012a