Communications Toolbox    
dmodce

Digital baseband modulator

Syntax

Optional Inputs

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

Description

The function dmodce performs digital baseband modulation and some related tasks. The corresponding demodulation function is ddemodce. The table below lists the modulation schemes that dmodce supports.

Modulation 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 Modulate Without Mapping

Ordinarily, the dmodce function first maps the digital message signal to an analog signal and then modulates the analog signal. The generic syntax

uses the /nomap flag to tell dmodce that the digital message has already been mapped to an analog signal x whose sampling rate is Fs. As a result, dmodce skips its usual mapping step. You can use the modmap function to perform the mapping step. In this generic syntax, method is one of the seven values listed in the table above, and the other variables are as in the next section.

To Modulate a Digital Signal (General Information)

The generic syntax y = dmodce(x,Fd,Fs,...) modulates the digital message signal that x represents. x is a matrix of nonnegative integers. If x is a vector of length n, then y is a vector of length n*Fs/Fd. Otherwise, if x is n-by-m, then y is (n*Fs/Fd)-by-m and each column of x is processed separately. Because dmodce implements baseband simulation, the entries of y are complex.

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. The initial phase in the modulation is zero.

The generic syntax y = dmodce(x,Fd,[Fs initphase],...) is the same, except that the third input argument is a two-element vector instead of a scalar. The first entry, Fs, is the sampling rate as described in the paragraph above. The second entry, initphase, is the initial phase in the modulation, measured in radians.

To Modulate a Digital Signal (Specific Syntax Information)

y = dmodce(x,Fd,Fs,'ask',M) performs M-ary amplitude shift keying modulation. Each entry of x must be in the range [0, M-1]. The maximum value of the modulated signal is 1.

y = dmodce(x,Fd,Fs,'fsk',M,tone) performs M-ary frequency shift keying modulation. Each entry of x must be in the range [0, M-1]. The optional argument tone is the separation between successive frequencies in the modulated signal y. The default value of tone is Fd. The maximum value of y is 1.

y = dmodce(x,Fd,Fs,'msk') performs minimum shift keying modulation. Each entry of x is either 0 or 1. The maximum value of y is 1. The separation between the two frequencies is Fd/2.

y = dmodce(x,Fd,Fs,'psk',M) performs M-ary phase shift keying modulation. Each entry of x must be in the range [0, M-1]. The maximum value of y is 1.

y = dmodce(x,Fd,Fs,'qask',M) performs M-ary quadrature amplitude shift keying modulation with a square signal constellation. The table below shows the maximum value of y for several small values of M.

M
Maximum Value of y
M
Maximum Value of y
2
1
32
5
4
1
64
7
8
3
128
11
16
3
256
15

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

y = dmodce(x,Fd,Fs,'qask/cir',numsig,amp,phs) performs quadrature amplitude shift keying modulation with a 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

This example uses FSK modulation and demodulation with different values of the frequency separation, tone. The output indicates that the symbol error rate varies depending on the value of tone. Your results might be different from those shown below, because the example uses random numbers.

The output is

See Also
ddemodce, dmod, ddemod, amod, amodce, modmap, apkconst


  dmod dpcmdeco