Main Content

comm.DPSKDemodulator

Demodulate using M-ary DPSK method

Description

The comm.DPSKDemodulator object demodulates a signal modulated using the M-ary differential phase shift keying (M-DPSK) method. The input is a baseband representation of the modulated signal. The input and output for this object are discrete-time signals. This object accepts a scalar-valued or column vector input signal.

To demodulate a signal modulated using differential phase shift keying:

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

dpskdemod = comm.DPSKDemodulator creates a demodulator System object™. This object demodulates the input signal using the M-ary differential phase shift keying (M-DPSK) method.

dpskdemod = comm.DPSKDemodulator(Name=Value) sets Properties using one or more name-value arguments.

dpskdemod = comm.DPSKDemodulator(M,phase,Name=Value) creates an M-DPSK demodulator object that has the ModulationOrder property set to M, the PhaseRotation property set to phase, and optional name-value arguments.

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.

Number of points in the signal constellation, specified as a positive integer.

Data Types: double

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

Data Types: double

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

  • When you set this property to false, the output of the System object is a column vector of integer symbol values in the range [0, (M – 1)], where M represents the value of the ModulationOrder property.

  • When you set this property to true, the output is a column vector of bit values whose length is an integer multiple of log2(ModulationOrder). This vector contains bit representations of integers in the range [0, (M – 1)].

Data Types: logical

Constellation encoding, specified as "Gray" or "Binary". This property controls how the object maps an integer or a group of log2(ModulationOrder) input bits to the corresponding modulated signal.

  • 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 L, in the range [0, (M – 1)], maps to the current symbol. This mapping uses exp(j×ϕ + j×2×π×L / M)× (previously modulated symbol). ϕ is the value of the PhaseRotation property.

Data type of output, specified as "Full precision", "Smallest unsigned integer", "double", "single", "int8", "uint8", "int16", "uint16", "int32", "uint32", or "logical".

  • If the input data type is single or double precision and you set this property to "Full precision", the output data type is the same as that of the input.

  • The data type "logical" is a valid option only when you set the BitOutput property to true.

Data Types: char | string

Usage

Description

Y = dpskdemod(X) demodulates the input signal by using the M-DPSK method.

Input Arguments

expand all

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

Data Types: double | single
Complex Number Support: Yes

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 DPSK modulator and demodulator pair.

bps = 3;   % Bits per symbol
M = 2^bps; % Modulation order  
dpskmod = comm.DPSKModulator(M,pi/8,BitInput=true);
dpskdemod = comm.DPSKDemodulator(M,pi/8,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 a loop processing frames of data that consists of these main steps:

  1. Generate data frames of 150 3-bit symbols.

  2. 8-DPSK-modulate the data.

  3. Filter the data through an AWGN channel.

  4. 8-DPSK-demodulate the data.

  5. Collect error statistics.

numframes = 100; % Number of frames
spf = 150;       % Symbols per frame
snr = convertSNR(10,"ebno","snr",BitsPerSymbol=3);
for counter = 1:numframes
    txData = randi([0 1],spf,1);
    modSig = dpskmod(txData);
    rxSig = awgn(modSig,snr,'measured');
    rxData = dpskdemod(rxSig);
    errorStats = errorRate(txData,rxData);
end

Display the error statistics.

ber = errorStats(1)
ber = 0.0095
numErrors = errorStats(2)
numErrors = 143
numBits = errorStats(3)
numBits = 14999

Algorithms

expand all

Extended Capabilities

Version History

Introduced in R2012a