Main Content

comm.DQPSKDemodulator

Demodulate using DQPSK method

Description

The comm.DQPSKDemodulator System object™ demodulates a signal that was modulated using the differential quadrature phase shift keying method. The input is a baseband representation of the modulated signal.

To demodulate a signal that was modulated using differential quadrature phase shift keying:

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

example

dqpskdemod = comm.DQPSKDemodulator creates a demodulator System object, dqpskdemod. This object demodulates the input differential quadrature phase shift keying (DQPSK) modulated data.

example

dqpskdemod = comm.DQPSKDemodulator(Name=Value) sets properties using one or more name-value arguments.

example

dqpskdemod = comm.DQPSKDemodulator(phase,Name=Value) creates a DQPSK demodulator with the PhaseRotation property set to phase and the other specified properties set to the specified values.

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.

Additional phase difference between previous and current modulated symbols in radians, specified as a real scalar. This value corresponds to the phase difference between previous and current modulated symbols when the input is zero.

Option to return output in bits, specified as a numeric or logical 0 (false) or 1 (true).

  • When you set this property to true, the object method outputs a column vector of bit values that is equal in length to twice the number of demodulated symbols.

  • When you set this property to false, the object method outputs a column vector that is equal in length to the input data vector and contains integer symbol values between 0 and 3.

Data Types: logical

Constellation encoding, specified as "Gray" or "Binary". This property controls how the object maps an integer or group of two input bits to the corresponding modulated symbol. When you set this property to "Gray", the object uses a Gray-encoded signal constellation. When you set this property to "Binary", the input integer m, between 0m3, shifts the output phase. This shift is (PhaseRotation + 2×π×m4) radians from the previous output phase. The output symbol is exp(j×PhaseRotation + j×2×π×m4)×(previously modulated symbol).

Data Types: char | string

Data type of output, specified as Full precision", "Smallest unsigned integer", "double", "single", "int8", "uint8", "int16", "uint16", "int32", or "uint32". When you set this property to "Full precision", the output has the same data type as the input. In this case, the input data type is single- or double-precision value. When you set the BitOutput property to true, logical data type becomes a valid option.

Data Types: char | string

Usage

Description

y = mskdemod(x) applies DQPSK demodulation to the input signal and returns the demodulated signal.

Input Arguments

expand all

DQPSK-modulated signal, specified as a scalar or column vector.

Data Types: single | double

Output Arguments

expand all

Output signal, returned as a scalar or column vector. To specify whether the object outputs values as integers or bits, use the BitOutput property. The output data type is determined by 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

Create a DQPSK modulator and demodulator pair.

dqpskmod = comm.DQPSKModulator(BitInput=true);
dqpskdemod = comm.DQPSKDemodulator(BitOutput=true);

Create an error rate calculator. Set the ComputationDelay property to 1 to account for the one bit transient caused by the differential modulation.

errorRate = comm.ErrorRate(ComputationDelay=1);

Run the processing loop. It consists of these main steps:

  1. Generate 50 2-bit frames.

  2. DQPSK-modulate.

  3. Pass the signal through an AWGN channel with a signal-to-noise ratio of 9.

  4. DQPSK-demodulate.

  5. Collect error statistics.

for counter = 1:100
    txData = randi([0 1],100,1);
    modSig = dqpskmod(txData);
    rxSig = awgn(modSig,9);
    rxData = dqpskdemod(rxSig);
    errorStats = errorRate(txData,rxData);
end

Display the error statistics.

ber = errorStats(1)
ber = 0.0183
numErrors = errorStats(2)
numErrors = 183
numBits = errorStats(3)
numBits = 9999

Algorithms

expand all

Extended Capabilities

Version History

Introduced in R2012a