dpskdemod
Differential phase shift keying demodulation
Description
Examples
DPSK Demodulation
Demodulate DPSK data in a communication channel in which a phase shift is introduced.
Generate a 4-ary data vector and modulate it using DPSK.
M = 4; % Alphabet size dataIn = randi([0 M-1],1000,1); % Random message txSig = dpskmod(dataIn,M); % Modulate
Apply the random phase shift resulting from the transmission process.
rxSig = txSig*exp(2i*pi*rand());
Demodulate the received signal.
dataOut = dpskdemod(rxSig,M);
The modulator and demodulator have the same initial condition. However, only the received signal experiences a phase shift. As a result, the first demodulated symbol is likely to be in error. Therefore, you should always discard the first symbol when using DPSK.
Find the number of symbol errors.
errs = symerr(dataIn,dataOut)
errs = 1
One symbol is in error. Repeat the error calculation after discarding the first symbol.
errs = symerr(dataIn(2:end),dataIn(2:end))
errs = 0
Input Arguments
y
— DPSK-modulated input signal
vector | matrix
DPSK-modulated input signal, specified as a real or complex
vector or matrix. If y
is a matrix, the function
processes the columns independently.
Data Types: double
Complex Number Support: Yes
M
— Modulation order
integer power of two
Modulation order, specified as an integer power of two.
Example: 2
| 4
| 16
Data Types: double
phaserot
— Phase rotation
0 (default) | scalar | []
Phase rotation of the DPSK modulation, specified in radians
as a real scalar. The total phase shift per symbol is the sum of phaserot
and
the phase generated by the differential modulation.
If you specify phaserot
as empty, then dspkdemod
uses
a phase rotation of 0 degrees.
Example: pi/4
Data Types: double
symorder
— Symbol order
'bin'
(default) | 'gray'
Symbol order, specified as 'bin'
or 'gray'
.
This argument specifies how the function assigns binary vectors to
corresponding integers.
If
symorder
is'bin'
, the function uses a binary-coded ordering.If
symorder
is'gray'
, the function uses a Gray-coded ordering.
Data Types: char
Output Arguments
z
— DPSK-demodulated output signal
vector | matrix
DPSK-demodulated output signal, returned as a vector or matrix
having the same number of columns as input signal y
.
Note
The differential algorithm used in this function compares two
successive elements of a modulated signal. To determine the first
element of vector z
, or the first row of matrix z
,
the function uses an initial phase rotation of 0
.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced before R2006a
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)