Communications Toolbox | ![]() ![]() |
Representing Digital Signals
This section describes the formats for digital message signals, the analog signals to which they map, and the analog signals that result from the two-stage baseband digital modulation process. The last part, Constellations and Mapped Signals (PSK, QASK), discusses some special formats that apply to the PSK and QASK modulation methods.
Message Signals
To perform M-ary baseband modulation of a digital signal using this toolbox, start with a message signal consisting of integers in the range [0, M-1]. Represent the signal using a vector x
. Associate with the message signal a sampling rate Fd
, which means that the entries of x
give the signal's values in time increments of 1/Fd
.
Mapped Signals
Mapping produces a real signal y
whose sampling rate Fs
must satisfy
(For passband simulation, in which the carrier frequency Fc
appears explicitly, both of the relations Fs
> Fc
> Fd
and Fs
> 2Fc
must hold.) If x
consists of n samples, then y
contains n*Fs/Fd
samples. The actual dimensions of y
depend on the modulation scheme, as described in To Map a Digital Signal (General Information).
For example, the vector x
below samples a random digital signal 100 times per second for 2 seconds. The vector y
represents the mapped signal, sampled three times as frequently. The output shows that y
contains three times as many samples as x
.
Fd = 100; % Sampling rate of x M = 32; % Digital symbols are 0,1,2,...,31 x=
randint(2*Fd,1,M); % Representation of the digital signal Fs=
3*Fd; % Sampling rate of mapped signal y=
modmap(x,Fd,Fs,'ask',M); % Mapped signal r = [size(x,1) size(y,1)] % Number of rows in x and y r = 200 600
Modulated Signals
Baseband modulation produces a complex signal with sampling rate Fs
. Notice that this is the same sampling rate as the mapped signal. Baseband signals are explained briefly in Representing Analog Signals; for more details, see the works listed in Selected Bibliography for Modulation. To illustrate the size and nature of the modulated signal, supplement the example in the paragraph above with these commands.
z = dmodce(x,Fd,[Fs pi/2],'ask',M); whos Name Size Bytes Class Fd 1x1 8 double array Fs 1x1 8 double array M 1x1 8 double array r 1x2 16 double array x 200x1 1600 double array y 600x1 4800 double array z 600x1 9600 double array (complex) Grand total is 1405 elements using 16040 bytes
Constellations and Mapped Signals (PSK, QASK)
If you map a digital message using the phase shift keying (PSK) or quadrature amplitude shift keying (QASK) modulation method, then modmap
describes the amplitude and phase of the resulting analog signal using an in-phase part and a quadrature part. For this reason, one column in the original message signal vector corresponds to two columns in the mapped signal matrix.
For example, compare the code below with the example in Mapped Signals above. The mapped signal ypsk
is a two-column matrix, whereas the earlier ASK example produced a column vector. The first column of ypsk
gives the in-phase components of the samples and the second column gives the quadrature components.
Fd = 100; % Sampling rate of x M = 32; % Digital symbols are 0,1,2,...,31. x=
randint(2*Fd,1,M); % Representation of the digital signal Fs=
3*Fd; % Sampling rate of mapped signal ypsk=
modmap(x,Fd,Fs,'psk',M); % PSK mapped signal s = size(ypsk) s = 600 2
Using Signal Constellation Plots. To understand the in-phase and quadrature description more easily, refer to a signal constellation plot. Each point in the constellation represents an analog signal to which modmap
can map the digital message data. Each row of y
in the example above gives the two rectangular coordinates of some point in the constellation. To produce a signal constellation plot that corresponds to the example above, use the command
More about creating signal constellation plots is in the section Representing Signal Constellations.
![]() | Digital Modulation Overview | Significance of Sampling Rates | ![]() |