Accelerating the pace of engineering and science

# comm.DPSKDemodulator System object

Package: comm

Demodulate using M-ary DPSK method

## Description

The DPSKDemodulator object demodulates a signal that was modulated using the M-ary differential phase shift keying 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 that was modulated using differential phase shift keying:

1. Define and set up your DPSK modulator object. See Construction.

2. Call step to demodulate a signal according to the properties of DPSKDemodulator. The behavior of step is specific to each object in the toolbox.

## Construction

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

H = comm.DPSKDemodulator(Name,Value) creates an M-DPSK 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.DPSKDemodulator(M,PHASE,Name,Value) creates an M-DPSK demodulator object, H. This object has the ModulationOrder property set to M, the PhaseRotation property set to PHASE, 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 a positive, integer scalar value. The default is 8. PhaseRotation Additional phase shift Specify the additional phase difference between previous and current modulated symbols in radians as a real scalar value. The default is pi/8. This value corresponds to the phase difference between previous and current modulated symbols when the input is zero. BitOutput Output data as bits Specify whether the output consists of groups of bits or integer symbol values. The default is false. When you set this property to true the step method outputs a column vector of bit values. The length of this column vector is equal to log2(ModulationOrder) times the number of demodulated symbols. When you set this property to false, the step method outputs a column vector. The length of this column vector is equal to that of the input data vector. The output contains integer symbol values between 0 and ModulationOrder-1. 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. The default is Gray. 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 ($0\le m\le$ ModulationOrder–1) maps to the current symbol. This mapping uses exp(j$×$PhaseRotation + j$×$$2×\pi ×$m/ModulationOrder)$×$(previously modulated symbol). OutputDataType Data type of output Specify the output data type as one of Full precision | Smallest unsigned integer | double | single | int8 | uint8 | int16 | uint16 | int32 | uint32. The default is Full precision. When you set this property to Full precision, the input data type is single or double precision, the output data is the same as that of the input. When you set the BitOutput property to true, logical data type becomes a valid option.

## Methods

 clone Create M-DPSK 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 M-DPSK demodulator object step Demodulate using M-ary DPSK method

## Examples

Modulate and demodulate a signal using 8-DPSK modulation.

hMod = comm.DPSKModulator(8,pi/4);
hAWGN = comm.AWGNChannel('NoiseMethod', ...
'Signal to noise ratio (SNR)','SNR',20);
hDemod = comm.DPSKDemodulator(8,pi/4);
% Create an error rate calculator, account for the one symbol transient caused by the differential modulation
hError = comm.ErrorRate('ComputationDelay',1);
for counter = 1:100
% Transmit a 50-symbol frame
data = randi([0 hMod.ModulationOrder-1],50,1);
modSignal = step(hMod, data);
noisySignal = step(hAWGN, modSignal);