# comm.RectangularQAMDemodulator

(To be removed) Demodulate using rectangular QAM signal constellation

`comm.RectangularQAMDemodulator` will be removed in a future release. Use `qamdemod` instead. For more information, see Compatibility Considerations.

## Description

The `RectangularQAMDemodulator` object demodulates a signal that was modulated using quadrature amplitude modulation with a constellation on a rectangular lattice.

To demodulate a signal that was modulated using quadrature amplitude modulation:

1. Define and set up your rectangular QAM demodulator object. See Construction.

2. Call `step` to demodulate the signal according to the properties of `comm.RectangularQAMDemodulator`. 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.RectangularQAMDemodulator` creates a demodulator System object, `H`. This object demodulates the input signal using the rectangular quadrature amplitude modulation (QAM) method.

`H = comm.RectangularQAMDemodulator(Name,Value)` creates a rectangular QAM 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.RectangularQAMDemodulator(M,Name,Value)` creates a rectangular QAM demodulator object, `H`. This object has the `ModulationOrder` property set to `M`, and the other specified properties set to the specified values.

## Properties

 `ModulationOrder` Number of points in signal constellation Specify the number of points in the signal constellation as scalar value with a positive, integer power of two. The default is `16`. `PhaseOffset` Phase offset of constellation Specify the phase offset of the signal constellation, in radians, as a real scalar value. The default is `0`. `BitOutput` Output data as bits Specify whether the output consists of groups of bits or integer symbol values. When you set this property to true the step method outputs a column vector of bit values whose length equals log2(`ModulationOrder`) times the number of demodulated symbols. When you set this property to `false`, the `step` method outputs a column vector with a length equal to the input data vector. This vector contains integer symbol values between `0` and `ModulationOrder`-`1`. The default is `false`. `SymbolMapping` Constellation encoding Specify how the object maps an integer or group of log2(`ModulationOrder`) bits to the corresponding symbol as one of `Binary` | `Gray` | `Custom`. The default is `Gray`. When you set this property to `Gray`, the object uses a Gray-coded signal constellation. When you set this property to `Binary`, the object uses a natural binary-coded constellation. When you set this property to `Custom`, the object uses the signal constellation defined in the `CustomSymbolMapping` property. `CustomSymbolMapping` Custom constellation encoding Specify a custom constellation symbol mapping vector. The default is `0:15`. This property is a row or column vector with a size of `ModulationOrder` and with unique integer values in the range [`0`, `ModulationOrder`-`1`]. The values must be of data type `double`. The first element of this vector corresponds to the top-leftmost point of the constellation, with subsequent elements running down column-wise, from left to right. The last element corresponds to the bottom-rightmost point. This property applies when you set the `SymbolMapping` property to `Custom`. `NormalizationMethod` Constellation normalization method Specify the method used to normalize the signal constellation as `Minimum distance between symbols` | ```Average power``` | `Peak power`. The default is `Minimum distance between symbols`. `MinimumDistance` Minimum distance between symbols Specify the distance between two nearest constellation points as a positive, real, numeric scalar value. The default is `2`. This property applies when you set the `NormalizationMethod` property to `Minimum distance between symbols`. `AveragePower` Average power of constellation Specify the average power of the symbols in the constellation as a positive, real, numeric scalar value. The default is `1`. This property applies when you set the `NormalizationMethod` property to `Average power`. `PeakPower` Peak power of constellation Specify the maximum power of the symbols in the constellation as a positive, real, numeric scalar value. The default is `1`. This property applies when you set the `NormalizationMethod` property to `Peak power`. `DecisionMethod` Demodulation decision method Specify the decision method the object uses as ```Hard decision``` | `Log-likelihood ratio` | `Approximate log-likelihood ratio`. The default is `Hard decision`. When you set the `BitOutput` property to `false` the object always performs hard-decision demodulation. This property applies when you set the `BitOutput` property to `true`. `VarianceSource` Source of noise variance Specify the source of the noise variance as `Property` | `Input port`. The default is `Property`. This property applies when you set the `BitOutput` property to `true` and the `DecisionMethod` property to ```Log-likelihood ratio``` or ```Approximate log-likelihood ratio```. `Variance` Noise variance Specify the variance of the noise as a positive, real scalar value. The default is `1`. If this value is very small (i.e., SNR is very high), log-likelihood ratio (LLR) computations may yield Inf or -Inf. This result occurs because the LLR algorithm computes the exponential of very large or very small numbers using finite-precision arithmetic. In such cases, using approximate LLR is recommended because its algorithm does not compute exponentials. This property applies when you set the `BitOutput` property to `true`, the `DecisionMethod` property to ```Log-likelihood ratio``` or `Approximate log-likelihood ratio`, and the `VarianceSource` property to `Property`. This property is tunable. `OutputDataType` Data type of output Specify the output data type as `Full precision` | `Smallest unsigned integer` | `double` | `single` | `int8` | `uint8` | `int16` | `uint16` | `int32` | `uint32`. The default is ```Full precision```. This property applies only when you set the `BitOutput` property to `false` or when you set the `BitOutput` property to `true` and the `DecisionMethod` property to ```Hard decision```. In this case, when the `OutputDataType` property is set to ```Full precision```, and the input data type is single- or double-precision, the output data has the same data type as the input. When the input data is of a fixed-point type, the output data type behaves as if you had set the `OutputDataType` property to `Smallest unsigned integer`. When you set the `BitOutput` property to `true` and the `DecisionMethod` property to `Hard Decision`, then `logical` data type becomes a valid option. When you set the `BitOutput` property to `true` and the `DecisionMethod` property to ```Log-likelihood ratio``` or `Approximate log-likelihood ratio`, the output data type is the same as that of the input. In this case, that data type can only be single- or double-precision.

## Methods

 constellation (To be removed) Calculate or plot ideal signal constellation step (To be removed) Demodulate using rectangular QAM method
Common to All System Objects
`release`

Allow System object property value changes

expand all

## Algorithms

This object implements the algorithm, inputs, and outputs described on the Rectangular QAM Demodulator Baseband block reference page. The object properties correspond to the block parameters.

## Compatibility Considerations

expand all

Not recommended starting in R2018b

## Extended Capabilities

### Objects

Introduced in R2012a