Demodulate convolutionally encoded data mapped to arbitrary QAM constellation
The GeneralQAMTCMDemodulator object uses the Viterbi algorithm to decode a trellis-coded modulation (TCM) signal that was previously modulated using an arbitrary signal constellation.
To demodulate a signal that was modulated using a trellis-coded, general quadrature amplitude modulator:
H = comm.GeneralQAMTCMDemodulator creates a trellis-coded, general quadrature amplitude (QAM TCM) demodulator System object™, H. This object demodulates convolutionally encoded data that has been mapped to an arbitrary QAM constellation.
H = comm.GeneralQAMTCMDemodulator(Name,Value) creates a general QAM 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.GeneralQAMTCMDemodulator(TRELLIS,Name,Value) creates a general QAM TCM demodulator object, H. This object has the TrellisStructure property set to TRELLIS, and the other specified properties set to the specified values.
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 if a structure is a valid trellis structure. The default is the value that results from poly2trellis([1 3], [1 0 0; 0 5 2]).
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 this property to Terminated, the object treats each input vector independently, and the traceback path always starts and ends in the all-zeros state.
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 parameter influences the decoding accuracy and delay. The decoding delay indicates 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.
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 their initial conditions. This property applies when you set the TerminationMethod property to Continuous.
Specify a double- or single-precision complex vector. This vector lists the points in the signal constellation that were used to map the convolutionally encoded data. The constellation must be specified in set-partitioned order. See documentation for the General TCM Encoder block for more information on set-partitioned order. The length of the constellation vector must equal the number of possible input symbols to the convolutional decoder of the general QAM TCM demodulator object. This corresponds to 2N for a rate K/N convolutional code. The default corresponds to a set-partitioned order for the points of an 8-PSK signal constellation. This value is expressed as exp( ).
Data type of output
Specify output data type as one of logical | double. The default is double.
|clone||Create general QAM TCM demodulator object with same property values|
|getNumInputs||Number of expected inputs to step method|
|getNumOutputs||Number of outputs from step method|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|reset||Reset states of the general QAM TCM demodulator object|
|step||Demodulate convolutionally encoded data mapped to arbitrary QAM constellation|
Modulate and demodulate data using QAM TCM modulation with an arbitrary 4-point constellation.
% Define a trellis structure with binary inputs and 4-ary symbol outputs and define an arbitrary four-point constellation t = poly2trellis(7,[171 133]); const = exp(pi*1i*[1 2 3 6]/4); hMod = comm.GeneralQAMTCMModulator(t, 'Constellation', const); hAWGN = comm.AWGNChannel('NoiseMethod', ... 'Signal to noise ratio (SNR)', ... 'SNR',5, 'SignalPower',0.875); hDemod = comm.GeneralQAMTCMDemodulator(t, 'Constellation', const); % Create an error rate calculator with delay in bits equal to TracebackDepth times the number of bits per symbol hError = comm.ErrorRate(... 'ReceiveDelay', hDemod.TracebackDepth*log2(t.numInputSymbols)); for counter = 1:10 data = randi([0 1],500,1); modSignal = step(hMod, data); noisySignal = step(hAWGN, modSignal); receivedData = step(hDemod, noisySignal); errorStats = step(hError, data, receivedData); end fprintf('Error rate = %f\nNumber of errors = %d\n', ... errorStats(1), errorStats(2))
This object implements the algorithm, inputs, and outputs described on the General TCM Decoder block reference page. The object properties correspond to the block parameters.