Encode binary data using convolutional encoder and map result to rectangular QAM constellation
expand all in page
Description
The comm.RectangularQAMTCMModulator
System object™ implements trellis-coded modulation (TCM) by encoding the binary input signal using a convolutional code and by mapping the result to a rectangular 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 rectangular QAM constellation:
Create the
comm.RectangularQAMTCMModulator
object and set its properties.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
Syntax
qamtcmMod = comm.RectangularQAMTCMModulator
qamtcmMod = comm.RectangularQAMTCMModulator(trellis)
qamtcmMod = comm.RectangularQAMTCMModulator(___,Name=Value)
Description
example
creates a rectangular QAM TCM modulator System object, qamtcmMod
= comm.RectangularQAMTCMModulatorqamtcmMod
. This object employs a convolutional encoder to encode a binary input signal and maps the result to a rectangular QAM constellation.
additionally sets the qamtcmMod
= comm.RectangularQAMTCMModulator(trellis)TrellisStructure
property to trellis
.
creates a rectangular QAM TCM modulator System object using any of the previous syntaxes and sets properties using one or more name-value arguments. For example, qamtcmMod
= comm.RectangularQAMTCMModulator(___,Name=Value
)comm.RectangularQAMTCMModulator(ModulationOrder=8)
sets the number of points in the signal constellation to 8
.
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.
TrellisStructure
— Trellis structure of convolutional code
poly2trellis
([3 1 1]
, [ 5 2 0 0; 0 0 1 0; 0 0 0 1]
) (default) | structure
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.
numInputSymbols
— Number of symbols input to encoder
2K
Number of symbols input to the encoder, specified as an integer equal to 2K, where K is the number of input bit streams.
numOutputSymbols
— Number of symbols output from encoder
2N
Number of symbols output from the encoder, specified as an integer equal to 2N, where N is the number of output bit streams.
numStates
— Number of states in encoder
power of 2
Number of states in the encoder, specified as a power of 2.
nextStates
— Next states
matrix of integers
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
— Outputs
matrix of octal numbers
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
TerminationMethod
— Termination method of encoded frame
"Continuous"
(default) | "Truncated"
| "Terminated"
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 , where S = constraintLength – 1 (or, in the case of multiple constraint lengths, S = sum(constraintLength(i) – 1)). L indicates the length of the input.
ResetInputPort
— Modulator reset input
false
or 0
(default) | true
or 1
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"
.
ModulationOrder
— Number of points in signal constellation
16
(default) | 4 | 8 | 32 | 64
Number of points in the signal constellation, specified as 4
, 8
, 16
, 32
, or 64
. The value of the ModulationOrder
property must equal the number of possible output symbols from the convolutional encoder of the QAM TCM modulator. Therefore, the value for the ModulationOrder
property must equal 2N for a rate K/N convolutional code.
Data Types: single
| double
OutputDataType
— Data type of output
"double"
(default) | "single"
Data type of the output, specified as "double"
or "single"
.
Usage
Syntax
Y = qamtcmMod(X)
Y = qamtcmMod(X,R)
Description
example
Y = qamtcmMod(X)
applies rectangular QAM TCM to the input data, X
, and returns the trellis-coded rectangular quadrature amplitude modulated data, Y
.
Y = qamtcmMod(X,R)
resets the encoder of the rectangular 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
X
— Input binary data
column vector
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×L (which equals L), for some positive integer Q.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| fi
R
— Reset signal
false
or 0
(default) | true
or 1
| numeric scalar
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
Y
— Output data
column vector
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
Common to All System Objects
step | Run System object algorithm |
release | Release resources and allow changes to System object property values and input characteristics |
reset | Reset internal states of System object |
Examples
collapse all
Modulate Data Using Rectangular QAM TCM
Open Live Script
Modulate data using rectangular 16-QAM TCM modulation and display the scatter plot.
Generate random binary data. The length of the data vector must be an integer multiple of the number of input streams into the encoder, log2(8) = 3.
data = randi([0 1],3000,1);
Create a rectangular 16-QAM TCM modulator System object™.
qamtcmMod = comm.RectangularQAMTCMModulator;
Modulate the data.
modData = qamtcmMod(data);
Plot the modulated data.
scatterplot(modData)
Algorithms
The trellis-coded rectangular QAM modulation uses a set partitioning technique to map the result of the convolutional encoder to a rectangular QAM signal constellation. The trellis-coded modulation technique partitions the constellation into subsets called cosets to maximize the minimum distance between pairs of points in each coset.
These figures show the labeled set-partitioned signal constellation that the object uses when the M-ary number is 16, 32, or 64.
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, Vol. IT28, Jan. 1982, pp. 55–67.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).
Version History
Introduced in R2012a
See Also
Objects
- comm.RectangularQAMTCMDemodulator | comm.PSKTCMModulator | comm.GeneralQAMTCMModulator | comm.ConvolutionalEncoder
Blocks
- General TCM Encoder | M-PSK TCM Encoder | Rectangular QAM TCM Encoder
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 简体中文
- English
- 日本 (日本語)
- 한국 (한국어)
Contact your local office