Communications Toolbox    
demodmap

Demap a digital message from a demodulated signal

Syntax

Optional Inputs

Input
Default Value
tone
Fd
amp
[1:length(numsig)]
phs
numsig*0

Description

The digital demodulation process consists of two steps: demodulating an analog signal and demapping the demodulated signal to a digital signal. You can perform the first step using ademod, ademodce, or your own custom demodulator. The function demodmap performs the second step. The table below lists the demodulation schemes that demodmap supports.

Demodulation Scheme
Fourth Input Argument
M-ary amplitude shift keying
'ask'
M-ary frequency shift keying
'fsk'
Minimum shift keying
'msk'
M-ary phase shift keying
'psk'
Quadrature amplitude shift keying
'qask', 'qask/arb', or 'qask/cir'

To Demap a Digital Signal (General Information)

The generic syntax z = demodmap(y,Fd,Fs,...) demaps the digital message signal z from a received analog signal y. After measuring the distance from the received signal to all possible digits in the coding scheme, the demapper returns the nearest digit.

y is a matrix. The sizes of y and z depend on the demodulation method:

The sampling rates in hertz of y and z, respectively, are Fs and Fd. (Thus 1/Fs represents the time interval between two consecutive samples in y, and similarly for z.) The ratio Fs/Fd must be a positive integer. The time interval between two decision points is 1/Fd.

To shift the decision times ahead by the integer offset, use the alternative syntax

instead of the demapping syntaxes listed in this section and the next. The default decision offset is 0.

To Demap a Digital Signal (Specific Syntax Information)

z = demodmap(y,Fd,Fs,'ask',M) demaps from an M-ary amplitude shift keying signal constellation. Each entry of z is in the range [0, M-1].

z = demodmap(y,Fd,Fs,'fsk',M,tone) demaps using the coherent M-ary frequency shift keying method. The optional argument tone is the separation between successive frequencies in the modulated signal y. The default value of tone is Fd. Each entry of z is in the range [0, M-1].

z = demodmap(y,Fd,Fs,'msk') demaps using the minimum shift keying method. Each entry of z is either 0 or 1. The separation between the two frequencies is Fd/2.

z = demodmap(y,Fd,Fs,'psk',M) demaps from an M-ary phase shift keying signal constellation. Each entry of z is in the range [0, M-1].

z = demodmap(y,Fd,Fs,'qask',M) demaps from an M-ary quadrature amplitude shift keying square signal constellation. The table below shows the maximum among in-phase and quadrature coordinates of constellation points, for several small values of M.

M
Maximum of Coordinates of Constellation Points
M
Maximum of Coordinates of Constellation Points
2
1
32
5
4
1
64
7
8
3 (quadrature maximum = 1)
128
11
16
3
256
15

z = demodmap(y,Fd,Fs,'qask/arb',inphase,quadr) demaps from a quadrature amplitude shift keying signal constellation that you define using the vectors inphase and quadr. The signal constellation point for the kth message has in-phase component inphase(k+1) and quadrature component quadr(k+1).

z = demodmap(y,Fd,Fs,'qask/cir',numsig,amp,phs) demaps from a quadrature amplitude shift keying circular signal constellation. numsig, amp, and phs are vectors of the same length. The entries in numsig and amp must be positive. If k is an integer in the range [1, length(numsig)], then amp(k) is the radius of the kth circle, numsig(k) is the number of constellation points on the kth circle, and phs(k) is the phase of the first constellation point plotted on the kth circle. All points on the kth circle are evenly spaced. If you omit phs, then its default value is numsig*0. If you omit amp, then its default value is [1:length(numsig)].

Examples

The script below suggests which regions in the in-phase/quadrature plane are associated with different digits. It demaps random points, looks for points that were demapped to the digits 0 and 2, and plots those points in red and blue, respectively. The horizontal axis shows in-phase components and the vertical axis shows quadrature components.

See Also
modmap, ddemod, ddemodce, ademod, ademodce, eyediagram, scatterplot


  decode dftmtx