Communications Toolbox    
modmap

Map a digital signal to an analog signal

Syntax

Optional Inputs

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

Description

The digital modulation process consists of two steps: mapping the digital signal to an analog signal and modulating this analog signal. The function modmap performs the first step. You can perform the second step using amod, amodce, or your own custom modulator. The table below lists the digital modulation schemes that modmap supports.

Modulation Scheme
Value of 'method'
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/cir', or 'qask/arb'

To Plot a Signal Constellation

modmap('method',...) creates a plot that characterizes the M-ary modulation method that 'method' specifies. 'method' is one of the entries in the right-hand column of the table above. If 'method' is a value other than 'fsk' or 'msk', then the plot shows the signal constellation; otherwise, it shows the spectrum.

For most methods, the input parameters that follow 'method' in this syntax are the same as those that follow 'method' in the corresponding mapping syntax. For more information about them, see the section To Map a Digital Signal (Specific Syntax Information) below.

However, if 'method' is 'msk', then the syntax is

where Fd is the sampling rate of the message signal.

To Map a Digital Signal (General Information)

The generic syntax y = modmap(x,Fd,Fs,...) maps the digital message signal x onto an analog signal. x is a matrix of nonnegative integers. The sizes of x and y depend on the modulation method:

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

To Map a Digital Signal (Specific Syntax Information)

y = modmap(x,Fd,Fs,'ask',M) maps to an M-ary amplitude shift keying signal constellation. Each entry of x must be in the range [0, M-1]. Each entry of y is in the range [-1, 1].

y = modmap(x,Fd,Fs,'fsk',M,tone) maps to frequencies in an M-ary frequency shift keying set. Each entry of x must be in the range [0, M-1]. The optional argument tone is the separation between successive frequencies in the FSK set. The default value of tone is Fd.

y = modmap(x,Fd,Fs,'msk') maps to frequencies in a minimum shift keying set. Each entry of x is either 0 or 1. The separation between the two frequencies is Fd/2.

y = modmap(x,Fd,Fs,'psk',M) maps to an M-ary phase shift keying signal constellation. Each entry of x must be in the range [0, M-1].

y = modmap(x,Fd,Fs,'qask',M) maps to an M-ary quadrature amplitude shift keying square signal constellation. The table below shows the maximum value of the in-phase and quadrature components in y, for several small values of M.

M
Maximum of y
M
Maximum of y
2
1
32
5
4
1
64
7
8
3 (quadrature maximum is 1)
128
11
16
3
256
15

y = modmap(x,Fd,Fs,'qask/arb',inphase,quadr) maps to 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).

y = modmap(x,Fd,Fs,'qask/cir',numsig,amp,phs) maps to 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 command below plots a phase shift keying (PSK) signal constellation with 32 points.

The script below maps a digital signal using the 32-point PSK constellation. It then adds noise and computes the resulting error rate while demapping. Your results might vary because the example uses random numbers.

See Also
demodmap, dmod, dmodce, amod, amodce, apkconst


 marcumq oct2dec