Main Content

comm.GeneralQAMTCMModulator

Encode binary data using convolutional encoder and map result to general QAM constellation

Description

The comm.GeneralQAMTCMModulator System object™ implements trellis-coded modulation (TCM) by encoding the binary input signal using a convolutional code and by mapping the result to a general quadrature amplitude modulation (QAM) signal constellation. For more information about TCM, see the Algorithms section.

To encode binary data using a convolutional code and map the result to a general QAM constellation:

  1. Create the comm.GeneralQAMTCMModulator 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

gqamtcmMod = comm.GeneralQAMTCMModulator creates a general QAM TCM modulator System object, gqamtcmMod. This object employs a convolutional encoder to encode a binary input signal and maps the result to a general QAM constellation.

gqamtcmMod = comm.GeneralQAMTCMModulator(trellis) additionally sets the TrellisStructure property to trellis.

gqamtcmMod = comm.GeneralQAMTCMModulator(___,Name=Value) creates a general QAM TCM modulator System object using any of the previous syntaxes and sets properties using one or more name-value arguments. For example, comm.GeneralQAMTCMModulator(TerminationMethod="Continuous") sets the termination method of the encoded frame to "Continuous".

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.

Trellis structure of the convolutional code, specified as a MATLAB® structure that contains the trellis description of the convolutional code. Use the istrellis function to check whether a trellis structure is valid.

The trellis structure contains these fields.

Number of symbols input to the encoder, specified as an integer equal to 2K, where K is the number of input bit streams.

Number of symbols output from the encoder, specified as an integer equal to 2N, where N is the number of output bit streams.

Number of states in the encoder, specified as a power of 2.

Next states for all combinations of current states and current inputs, specified as a matrix of integers. The matrix size must be numStates by 2K.

Outputs for all combinations of current states and current inputs, specified as a matrix of octal numbers. The matrix size must be numStates by 2K.

Data Types: struct

Termination method of the encoded frame, specified as one of these options.

  • "Continuous" — The object retains the encoder states at the end of each input vector for use with the next input vector.

  • "Truncated" — The object treats each input vector independently. The encoder is reset to the all-zeros state at the start of each input vector.

  • "Terminated" — The object treats each input vector independently. However, for each input vector, the object uses extra bits to set the encoder to the all-zeros state at the end of the vector. For a rate K/N code, the convolutional encoder outputs the vector with a length given by N×(L+S)K, where S = constraintLength – 1 (or, in the case of multiple constraint lengths, S = sum(constraintLength(i) – 1)). L indicates the length of the input.

Modulator reset input, specified as a logical 0 (false) or 1 (true). Set this property to true to call the object with an additional input. For nonzero reset input values, the internal states of the encoder reset to initial conditions.

Dependencies

To enable this property, set the TerminationMethod property to "Continuous".

Signal constellation, specified as a complex vector that lists the points in the signal constellation used to map the result of the convolutional encoder. You must specify the constellation in set-partitioned order. The length of the constellation vector must equal the number of possible input symbols to the convolutional encoder of the general QAM TCM modulator object. This value corresponds to 2N for a rate K/N convolutional code. The default value corresponds to a set-partitioned order for the points of an 8-PSK signal constellation.

Data Types: single | double
Complex Number Support: Yes

Data type of the output, specified as "double" or "single".

Usage

Description

Y = gqamtcmMod(X) applies general QAM TCM to the input data, X, and returns the trellis-coded general quadrature amplitude modulated data, Y.

Y = gqamtcmMod(X,R) resets the encoder of the general QAM TCM modulator object to the all-zeros state when you input a reset signal, R, that is nonzero. This syntax applies when you set the value of the ResetInputPort property to true.

Input Arguments

expand all

Input binary data, specified as a column vector. X must be of data type numeric, logical, or unsigned fixed point of word length 1 (fi object). For a rate K/N code, the length of the input vector, X, must be K×Q (which equals L), for some positive integer Q.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | fi

Reset signal, specified as a logical 0 (false), 1 (true), or numeric scalar.

Dependencies

To use this argument, set the ResetInputPort property to true.

Data Types: double | logical

Output Arguments

expand all

Output data, returned as a column vector. The length of Y is Q. The data type of the output data depends on the OutputDataType property.

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

Modulate data using QAM TCM modulation with an arbitrary four point constellation. Display a scatter plot of the modulated data.

Create binary data.

data = randi([0 1],1000,1);

Use the trellis structure with generating polynomial [171 133] and four point arbitrary constellation { ejπ/4, ejπ/2, ej3π/4, ej3π/2 } to perform QAM TCM modulation.

trellis = poly2trellis(7,[171 133]);
gqamtcmMod = comm.GeneralQAMTCMModulator(trellis, ...
    Constellation=exp(pi*1i*[1 2 3 6]/4));

Modulate and plot the data.

modData = gqamtcmMod(data);
scatterplot(modData);

Figure Scatter Plot contains an axes object. The axes object with title Scatter plot, xlabel In-Phase, ylabel Quadrature contains a line object which displays its values using only markers. This object represents Channel 1.

Algorithms

The trellis-coded modulation technique partitions the constellation into subsets called cosets to maximize the minimum distance between pairs of points in each coset.

As an example, this diagram shows one way to devise a set-partitioned order for the points for an 8-PSK signal constellation. The figure at the top of the tree is the entire 8-PSK signal constellation, while the eight figures at the bottom of the tree contain one constellation point each. Each level of the tree corresponds to a different bit in a binary sequence (b3,b2,b1), while each branch in a given level of the tree corresponds to a particular value for that bit. Listing the constellation points using the sequence at the bottom of the tree leads to the vector exp(2*pi*j*[0 4 2 6 1 5 3 7]/8).

Set Partitioning for 8-PSK

References

[1] Biglieri, E., D. Divsalar, P.J. McLane, and M.K. Simon. Introduction to Trellis-Coded Modulation with Applications. New York: Macmillan, 1991.

[2] Proakis, John G. Digital Communications. 4th ed. New York: McGraw Hill, 2001.

[3] Ungerboeck, G. “Channel Coding with Multilevel/Phase Signals.” IEEE® Transactions on Information Theory IT28 (Jan. 1982): 55–67.

Extended Capabilities

Version History

Introduced in R2012a