Equalize linearly modulated signal using Viterbi algorithm

`y = mlseeq(x,chcffs,const,tblen,`

* opmode*)

y = mlseeq(x,chcffs,const,tblen,

`opmode`

y = mlseeq(...,

`'rst'`

y = mlseeq(...,

`'cont'`

init_metric,init_states,init_inputs)

[y,final_metric,final_states,final_inputs] = ...

mlseeq(...,

`'cont'`

`y = mlseeq(x,chcffs,const,tblen,`

equalizes
the baseband signal vector * opmode*)

`x`

using the Viterbi
algorithm. `chcffs`

is a vector that represents the
channel coefficients. `const`

is a complex vector
that lists the points in the ideal signal constellation, in the same
sequence that the system's modulator uses. `tblen`

is
the traceback depth. The equalizer traces back from the state with
the best metric. `opmode`

Value of opmode | Typical Usage |
---|---|

`'rst'` | Enables you to specify a
preamble and postamble that accompany your data. The function processes `x` independently
of data from any other invocations of this function. This mode incurs
no output delay. |

`'cont'` | Enables you to save the
equalizer's internal state information for use in a subsequent invocation
of this function. Repeated calls to this function are useful if your
data is partitioned into a series of smaller vectors that you process
within a loop, for example. This mode incurs an output delay of `tblen` symbols. |

`y = mlseeq(x,chcffs,const,tblen,`

specifies
the number of samples per symbol in * opmode*,nsamp)

`x`

, that is,
the oversampling factor. The vector length of `x`

must
be a multiple of `nsamp`

. When `nsamp`

>
1, the `chcffs`

input represents the oversampled
channel coefficients.`y = mlseeq(...,`

specifies
the preamble and postamble that you expect to precede and follow,
respectively, the data in the input signal. The vectors ** 'rst'**,nsamp,preamble,postamble)

`preamble`

and `postamble`

consist
of integers between 0 and M-1, where M is the order of the modulation,
that is, the number of elements in `const`

. To omit
a preamble or postamble, specify `[]`

.When the function applies the Viterbi algorithm, it initializes state metrics in a way that depends on whether you specify a preamble and/or postamble:

If the preamble is nonempty, the function decodes the preamble and assigns a metric of 0 to the decoded state. If the preamble does not decode to a unique state (that is, if the length of the preamble is less than the channel memory), the decoder assigns a metric of 0 to all states that can be represented by the preamble. The traceback path ends at one of the states represented by the preamble.

If the preamble is unspecified or empty, the decoder initializes the metrics of all states to 0.

If the postamble is nonempty, the traceback path begins at the smallest of all possible decoded states that are represented by the postamble.

If the postamble is unspecified or empty, the traceback path starts at the state with the smallest metric.

`y = mlseeq(...,`

causes
the equalizer to start with its state metrics, traceback states, and
traceback inputs specified by ** 'cont'**,nsamp,...

init_metric,init_states,init_inputs)

`init_metric`

, `init_states`

,
and `init_inputs`

, respectively. These three inputs
are typically the extra outputs from a previous call to this function,
as in the syntax below. Each real number in `init_metric`

represents
the starting state metric of the corresponding state. `init_states`

and `init_inputs`

jointly
specify the initial traceback memory of the equalizer. The table below
shows the valid dimensions and values of the last three inputs, where `numStates`

is
M`[],[],[]`

.Input Argument | Meaning | Matrix Size | Range of Values |
---|---|---|---|

`init_metric` | State metrics | 1 row, `numStates` columns | Real numbers |

`init_states` | Traceback states | `numStates` rows, `tblen` columns | Integers between 0 and `numStates-1` |

`init_inputs` | Traceback inputs | `numStates` rows, `tblen` columns | Integers between 0 and M-1 |

```
[y,final_metric,final_states,final_inputs]
= ...
```

returns the normalized state metrics, traceback states, and traceback
inputs, respectively, at the end of the traceback decoding process.

mlseeq(...,** 'cont'**,...)

`final_metric`

is
a vector with `numStates`

elements that correspond
to the final state metrics. `final_states`

and `final_inputs`

are
both matrices of size `numStates`

-by-`tblen`

.The example below illustrates how to use reset operation mode on an upsampled signal.

% Use 2-PAM. M = 2; hMod = comm.PAMModulator(M); hDemod = comm.PAMDemodulator(M); hChan = comm.AWGNChannel('NoiseMethod', 'Signal to noise ratio (SNR)', ... 'SNR',5); const = step(hMod,(0:M-1)'); % PAM constellation tblen = 10; % Traceback depth for equalizer nsamp = 2; % Number of samples per symbol msgIdx = randi([0 M-1],1000,1); % Random bits msg = upsample(step(hMod,msgIdx),nsamp); % Modulated message chcoeffs = [.986; .845; .237; .12345+.31i]; % Channel coefficients chanest = chcoeffs; % Channel estimate hMLSEE = comm.MLSEEqualizer('TracebackDepth',tblen,... 'Channel',chanest, 'Constellation',const, 'SamplesPerSymbol', nsamp); filtmsg = filter(chcoeffs,1,msg); % Introduce channel distortion. msgRx = step(hChan,filtmsg); % Add Gaussian noise. msgEq = step(hMLSEE,msgRx); % Equalize. msgEqIdx = step(hDemod,msgEq); % Demodulate. %Calculate BER hErrorCalc = comm.ErrorRate; berVec = step(hErrorCalc, msgIdx, msgEqIdx); ber = berVec(1) nerrs = berVec(2)

The output is shown below. Your results might vary because this example uses random numbers.

nerrs = 1 ber = 0.0010

The example in Example: Continuous Operation Mode illustrates how
to use the final state and initial state arguments when invoking `mlseeq`

repeatedly.

The example in Use a Preamble in MATLAB illustrates how to use a preamble.

[1] Proakis, John G., *Digital
Communications*, Fourth Edition, New York, McGraw-Hill,
2001.

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

Was this topic helpful?