Documentation Center

  • Trial Software
  • Product Updates

Contents

dpskdemod

Differential phase shift keying demodulation

Syntax

z = dpskdemod(y,M)
z = dpskdemod(y,M,phaserot)
z = dpskdemod(y,M,phaserot,symbol_order)

Description

z = dpskdemod(y,M) demodulates the complex envelope y of a DPSK modulated signal. M is the alphabet size and must be an integer. If y is a matrix with multiple rows and columns, the function processes the columns independently.

    Note:   The first element of the output z, or the first row of z, if z is a matrix with multiple rows, represents an initial condition, because the differential algorithm compares two successive elements of the modulated signal.

z = dpskdemod(y,M,phaserot) specifies the phase rotation of the modulation in radians. In this case, the total phase shift per symbol is the sum of phaserot and the phase generated by the differential modulation.

z = dpskdemod(y,M,phaserot,symbol_order) specifies how the function assigns binary words to corresponding integers. If symbol_order is set to 'bin' (default), the function uses a natural binary-coded ordering. If symbol_order is set to 'gray', it uses a Gray-coded ordering.

Examples

The example below illustrates the fact that the first output symbol of a differential PSK demodulator is an initial condition rather than useful information.

M = 4; % Alphabet size
x = randi([0 M-1],1000,1); % Random message
y = dpskmod(x,M); % Modulate.
z = dpskdemod(y,M); % Demodulate.
% Check whether the demodulator recovered the message.
s1 = symerr(x,z) % Expect one symbol error, namely, the first symbol.
s2 = symerr(x(2:end),z(2:end)) % Ignoring 1st symbol, expect no errors.

The output is below.

s1 =

     1


s2 =

     0

For another example that uses this function, see Example: Curve Fitting for an Error Rate Plot.

See Also

| |

Was this topic helpful?