# comm.PSKTCMDemodulator

Demodulate convolutionally encoded data mapped to M-ary PSK signal constellation

## Description

The PSKTCMDemodulator object uses the Viterbi algorithm to decode a trellis-coded modulation (TCM) signal that was previously modulated using a PSK signal constellation.

To demodulate a signal that was modulated using trellis-coded modulation:

1. Define and set up your PSK TCM demodulator object. See Construction.

2. Call step to demodulate the signal according to the properties of comm.PSKTCMDemodulator. The behavior of step is specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

## Construction

H = comm.PSKTCMDemodulator creates a trellis-coded, M-ary phase shift, keying (PSK TCM) demodulator System object, H. This object demodulates convolutionally encoded data that has been mapped to an M-PSK constellation.

H = comm.PSKTCMDemodulator(Name,Value) creates a PSK TCM demodulator object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

H = comm.PSKTCMDemodulator(TRELLIS,Name,Value) creates a PSK TCM demodulator System object, H. This object has the TrellisStructure property set to TRELLIS and the other specified properties set to the specified values.

## Properties

 TrellisStructure Trellis structure of convolutional code Specify trellis as a MATLAB structure that contains the trellis description of the convolutional code. Use the istrellis function to check whether the trellis structure is valid. The default is the result of poly2trellis([1 3], [1 0 0; 0 5 2]). TerminationMethod Termination method of encoded frame Specify the termination method as one of Continuous | Truncated | Terminated. The default is Continuous. When you set this property to Continuous, the object saves the internal state metric at the end of each frame. The next frame uses the same state metric. The object treats each traceback path independently. If the input signal contains only one symbol, use Continuous mode. When you set this property to Truncated, the object treats each input vector independently. The traceback path starts at the state with the best metric and always ends in the all-zeros state. When you set property to Terminated, the object treats each input vector independently, and the traceback path always starts and ends in the all-zeros state. TracebackDepth Traceback depth for Viterbi decoder Specify the scalar, integer number of trellis branches to construct each traceback path. The default is 21. The traceback depth influences the decoding accuracy and delay. The decoding delay is 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 consists of TracebackDepth zero symbols or TracebackDepth$×$K zero bits for a rate K/N convolutional code. When you set the TerminationMethod property to Truncated or Terminated, no output delay occurs and the traceback depth must be less than or equal to the number of symbols in each input vector. ResetInputPort Enable demodulator reset input Set this property to true to enable an additional input to the step method. The default is false. When this additional reset input is a nonzero value, the internal states of the encoder reset to initial conditions. This property applies when you set the TerminationMethod property to Continuous. ModulationOrder Number of points in signal constellation Specify the number of points in the signal constellation used to map the convolutionally encoded data as a positive, integer scalar value. The number of points must be 4, 8, or 16. The default is 8. The ModulationOrder property value must equal the number of possible input symbols to the convolutional decoder of the PSK TCM demodulator object. The ModulationOrder property must equal 2N for a rate K/N convolutional code. OutputDataType Data type of output Specify output data type as logical | double. The default is double.

## Methods

 step Demodulate convolutionally encoded data mapped to M-ary PSK constellation
Common to All System Objects
release

Allow System object property value changes

reset

Reset internal states of System object

## Examples

collapse all

Modulate and demodulate data using 8-PSK TCM modulation in an AWGN channel. Estimate the resulting error rate.

Define a trellis structure with four input symbols and eight output symbols.

t =  poly2trellis([5 4],[23 35 0; 0 5 13]);

Create modulator and demodulator System objects™ using trellis, t, having modulation order 8.

hMod = comm.PSKTCMModulator(t,'ModulationOrder',8);
hDemod = comm.PSKTCMDemodulator(t,'ModulationOrder',8, ...
'TracebackDepth',16);

Create an AWGN channel object.

hAWGN = comm.AWGNChannel('NoiseMethod','Signal to noise ratio (SNR)', ...
'SNR',7);

Create an error rate calculator with delay in bits equal to TracebackDepth times the number of bits per symbol.

hDemod.TracebackDepth*log2(t.numInputSymbols));

Generate random binary data and modulate with 8-PSK TCM. Pass the modulated signal through the AWGN channel and demodulate. Calculate the error statistics.

for counter = 1:10
% Transmit frames of 250 2-bit symbols
data = randi([0 1],500,1);
% Modulate
modSignal = step(hMod,data);
% Pass through AWGN channel
noisySignal = step(hAWGN,modSignal);
% Demodulate
% Calculate error statistics
end

Display the BER and the number of bit errors.

fprintf('Error rate = %5.2e\nNumber of errors = %d\n', ...
errorStats(1),errorStats(2))
Error rate = 2.17e-02
Number of errors = 108

## Algorithms

This object implements the algorithm, inputs, and outputs described on the M-PSK TCM Decoder block reference page. The object properties correspond to the block parameters.