| Communications Toolbox™ | ![]() |
h = modem.qamdemod(M)
h = modem.qamdemod(M, phaseoffset)
h = modem.qamdemod(property1, value1,
...)
h = modem.qamdemod(qammod_object)
h = modem.qamdemod(qammod_object, property1,
value1, ...)
h = modem.qamdemod
The modem.qamdemod function creates a demodulator object that you can use with the demodulate method to demodulate a signal. To learn more about the process for demodulating a signal, see Using Modem Objects.
h = modem.qamdemod(M) constructs a QAM demodulator object h for M-ary demodulation.
h = modem.qamdemod(M, phaseoffset) constructs a QAM demodulator object h whose constellation has a phase offset of phaseoffset radians.
h = modem.qamdemod(property1, value1, ...) constructs a QAM demodulator object h with properties as specified by the property/value pairs. If a property is not specified, it is assigned a default value. See the following section on properties.
h = modem.qamdemod(qammod_object) constructs a QAM demodulator object h by reading the property values from the qammod_object QAM modulator object. The properties that are unique to the QAM demodulator object are set to default values.
h = modem.qamdemod(qammod_object, property1, value1, ...) constructs a QAM demodulator object h by reading the property values from the qammod_object QAM modulator object. Additional properties are specified by the property/value pairs.
h = modem.qamdemod constructs a QAM demodulator object h with default properties. It constructs a demodulator object for 16-QAM demodulation and is equivalent to:
h = modem.qamdemod('M', 16, 'PhaseOffset', 0, 'SymbolOrder',...
'binary', 'OutputType', 'integer', 'DecisionType',...
'hard decision')This object has a method demodulate that is used to demodulate signals.
The syntax is y = demodulate(h, x), where h is the handle to a demodulator object and x is a signal. This syntax processes the binary words (bits) or symbols (integers) in signal x with the demodulator object and output the baseband signal y.
x can be a multichannel signal. The columns of x are considered individual channels, while the rows are time steps.
The demodulator object's property DecisionType should be set depending on whether you want hard or soft (LLR or approximate LLR) decisions. To allow for soft decisions, the demodulator object's property OutputType must be set to 'bit'.
For h.outputtype = ‘bit', an
output y of size
is computed for
an input x of size
, where nBits =
log2(h.M).
For h.outputtype = ‘integer',
an output y of size
is computed for
an input x of size
.
See Using Modem Objects for usage examples.
The following table describes the properties of the QAM demodulator object.
| Property | Description |
|---|---|
| Type | Type of modulation object. This property is a fixed value, set to 'QAM Demodulator'. |
| M | M-ary value. Default is 2. |
| PhaseOffset | Phase offset of ideal signal constellation in radians. Default is 0. |
| Constellation | Ideal signal constellation. This property is not writable and is automatically computed based on the M and PhaseOffset properties. |
| SymbolOrder | Type of mapping employed for mapping symbols to ideal constellation points. The choices are 'binary' (binary mapping), 'gray' (Gray mapping), and 'user-defined' (custom mapping). Default is 'binary'. |
| SymbolMapping | Symbol mapping values corresponding to ideal constellation points. This property is writable only when SymbolOrder is set to 'user-defined'. Each element of the symbol mapping vector contains the symbol mapped to the corresponding element of the constellation vector. Thus, the first element of the symbol mapping vector contains the symbol mapped to the first element of the constellation vector, the second element contains the symbol mapped to the second element of the constellation vector, and so on. |
| OutputType | Type of output to be computed by the QAM demodulator object. The choices are 'bit' (bit/binary output), and 'integer' (integer/symbol output). Default is 'integer'. |
| DecisionType | Type of output values to be computed by the QAM demodulator object. The choices are 'hard decision' (hard-decision values), 'llr' (log-likelihood ratio), and 'approximate llr' (approximate log-likelihood ratio). Default is 'hard decision'. |
| NoiseVariance | Noise variance of the channel or equalized signal to be processed by the QAM demodulator object. The noise variance is used to compute LLR or Approximate LLR, hence NoiseVariance is visible only when DecisionType is set to 'llr' or 'approximate llr'. If the NoiseVariance value is very small (i.e., SNR is very high), LLR computations may yield Inf or –Inf because the LLR algorithm would involve computing exponentials of very large or very small numbers using finite precision arithmetic. In such cases, use of approximate LLR is recommended, as its algorithm does not involve computing exponentials. |
A QAM demodulator object has the following functions for inspection, management, and simulation:
See Using Modem Objects for details and examples of their use.
See Exact LLR Algorithm and Approximate LLR Algorithm.
% Construct a demodulator object for 16-QAM demodulation.
h = modem.qamdemod % note that default value of M is 16
% Construct an object to compute log-likelihood ratio of a
% baseband signal using 64-QAM modulation. The constellation
% has Gray mapping.
% The estimated noise variance of input signal is 12.2.
h = modem.qamdemod('M', 64, 'SymbolOrder', 'Gray', ...
'OutputType', 'Bit', 'DecisionType', 'LLR', ...
'NoiseVariance', 12.2)
% Construct a demodulator object from an existing modulator
% object for QAM modulation in order to compute approximate
% log-likelihood ratio for a baseband signal whose estimated
% noise variance is 3.81.
modObj = modem.qammod('M', 8, 'InputType', 'Bit')
demodObj = modem.qamdemod(modObj, 'DecisionType', ...
'Approximate LLR', 'NoiseVariance', 3.81)modem, modem.dpskdemod, modem.dpskmod, modem.genqamdemod, modem.genqammod, modem.mskdemod, modem.mskmod, modem.oqpskdemod, modem.oqpskmod, modem.pamdemod, modem.pammod, modem.pskdemod, modem.pskmod, and modem.qammod
![]() | modem.pskmod | modem.qammod | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |