In most media for communication, only a fixed range of frequencies is available for transmission. One way to communicate a message signal whose frequency spectrum does not fall within that fixed frequency range, or one that is otherwise unsuitable for the channel, is to alter a transmittable signal according to the information in your message signal. This alteration is called modulation, and it is the modulated signal that you transmit. The receiver then recovers the original signal through a process called demodulation.
The sections of this chapter are as follows.
The figure below shows the modulation techniques that Communications System Toolbox™ supports for digital data. All the methods at the far right are implemented in library blocks.
Like analog modulation, digital modulation alters a transmittable signal according to the information in a message signal. However, in this case, the message signal is restricted to a finite set. Using this product, you can modulate or demodulate signals using various digital modulation techniques. You can also plot signal constellations. Modulation functions output the complex envelope of the modulated signal.
Note: The modulation and demodulation functions do not perform pulse shaping or filtering. See Combine Pulse Shaping and Filtering with Modulation for more information about filtering. 
The available methods of modulation depend on whether the input signal is analog or digital. The tables below show the modulation techniques that Communications System Toolbox software supports for analog and digital signals, respectively.
Analog Modulation Method  Acronym  Function or Method 

Amplitude modulation (suppressed or transmitted carrier)  AM  ammod , amdemod 
Frequency modulation  FM  fmmod , fmdemod 
Phase modulation  PM  pmmod , pmdemod 
Single sideband amplitude modulation  SSB  ssbmod , ssbdemod 
Digital Modulation Method  Acronym  System object™ 

Differential phase shift keying modulation  DPSK 

Frequency shift keying modulation  FSK  comm.FSKDemodulator System object, comm.FSKModulator System object, 
General Quadrature amplitude modulation  General QAM 

Minimum shift keying modulation  MSK 

Offset quadrature phase shift keying modulation  OQPSK 

Phase shift keying modulation  PSK 

Pulse amplitude modulation  PAM 

Accessing Digital Modulation Blocks. Open the Modulation library by doubleclicking the icon in the main block library. Then open the Digital Baseband sublibrary by doubleclicking its icon in the Modulation library.
The Digital Baseband library has sublibraries of its own. Open each of these sublibraries by doubleclicking the icon listed in the table below.
Kind of Modulation  Icon in Digital Baseband Library 

Amplitude modulation  AM 
Phase modulation  PM 
Frequency modulation  FM 
Continuous phase modulation  CPM 
Trelliscoded modulation  TCM 
Some digital modulation sublibraries contain blocks that implement special cases of a more general technique and are, in fact, special cases of a more general block. These specialcase blocks use the same computational code that their general counterparts use, but provide an interface that is either simpler or more suitable for the special case. The following table lists specialcase modulators, their general counterparts, and the conditions under which the two are equivalent. The situation is analogous for demodulators.
General and Specific Blocks
General Modulator  Specific Modulator  Specific Conditions 

General QAM Modulator Baseband  Rectangular QAM Modulator Baseband  Predefined constellation containing 2^{K} points on a rectangular lattice 
MPSK Modulator Baseband  BPSK Modulator Baseband  Mary number parameter is 2. 
QPSK Modulator Baseband  Mary number parameter is 4.  
MDPSK Modulator Baseband  DBPSK Modulator Baseband  Mary number parameter is 2. 
DQPSK Modulator Baseband  Mary number parameter is 4.  
CPM Modulator Baseband  GMSK Modulator Baseband  Mary number parameter is 2, Frequency
pulse shape parameter is Gaussian . 
MSK Modulator Baseband  Mary number parameter is 2, Frequency
pulse shape parameter is Rectangular , Pulse
length parameter is 1.  
CPFSK Modulator Baseband  Frequency pulse shape parameter is Rectangular , Pulse
length parameter is 1.  
General TCM Encoder  Rectangular QAM TCM Encoder  Predefined signal constellation containing 2^{K} points on a rectangular lattice 
MPSK TCM Encoder  Predefined signal constellation containing 2^{K} points on a circle 
Furthermore, the CPFSK Modulator Baseband block is similar to the MFSK Modulator Baseband block, when the MFSK block uses continuous phase transitions. However, the MFSK features of this product differ from the CPFSK features in their mask interfaces and in the demodulator implementations.
For a given modulation technique, two ways to simulate modulation techniques are called baseband and passband. Baseband simulation, also known as the lowpass equivalent method, requires less computation. This product supports baseband simulation for digital modulation and passband simulation for analog modulation.
Baseband Modulated Signals Defined. If you use baseband modulation to produce the complex envelope y
of
the modulation of a message signal x
, then y
is
a complexvalued signal that is related to the
output of a passband modulator. If the modulated signal has the waveform
$${Y}_{1}(t)\mathrm{cos}(2\pi {f}_{c}t+\theta ){Y}_{2}(t)\mathrm{sin}(2\pi {f}_{c}t+\theta )$$
where f_{c} is the carrier frequency and θ is the carrier signal's initial phase, then a baseband simulation recognizes that this equals the real part of
$$[({Y}_{1}(t)+j{Y}_{2}(t)){e}^{j\theta}]\mathrm{exp}(j2\pi {f}_{c}t)$$
and models only the part inside the square brackets. Here j is
the square root of 1. The complex vector y
is
a sampling of the complex signal
$$({Y}_{1}(t)+j{Y}_{2}(t)){e}^{j\theta}$$
If you prefer to work with passband signals instead of baseband signals, then you can build functions that convert between the two. Be aware that passband modulation tends to be more computationally intensive than baseband modulation because the carrier signal typically needs to be sampled at a high rate.
Modulation is a process by which a carrier signal is
altered according to information in a message signal.
The carrier
frequency, denoted Fc
, is the frequency
of the carrier signal. The sampling rate is the rate at which
the message signal is sampled during the simulation.
The frequency of the carrier signal is usually much greater
than the highest frequency of the input message signal. The Nyquist
sampling theorem requires that the simulation sampling rate Fs
be
greater than two times the sum of the carrier frequency and the highest
frequency of the modulated signal in order for the demodulator to
recover the message correctly.
To modulate a signal using digital modulation with an alphabet
having M symbols, start with a real message signal whose values are
integers from 0 to M1. Represent the signal by listing its values
in a vector, x
. Alternatively, you can use a matrix
to represent a multichannel signal, where each column of the matrix
represents one channel.
For example, if the modulation uses an alphabet with eight symbols,
then the vector [2 3 7 1 0 5 5 2 6]'
is a valid
singlechannel input to the modulator. As a multichannel example,
the twocolumn matrix
[2 3; 3 3; 7 3; 0 3;]
3
.All digital modulation blocks process only discretetime signals and use the baseband representation. The data types of inputs and outputs are depicted in the following figure.
Note If you want to separate the inphase and quadrature components of the complex modulated signal, use the Complex to RealImag block in the Simulink Math Operations library. 
Some digital modulation blocks can accept either integervalued or binary–valued signals. The corresponding demodulation blocks can output either integers or groups of individual bits that represent integers. This section describes how modulation blocks process integer or binary inputs; the case for demodulation blocks is the reverse. You should note that modulation blocks have an Input type parameter and that demodulation blocks have an Output type parameter.
When you set the Input type parameter to Integer
,
the block accepts integer values between 0
and M1
. M represents
the Mary number block parameter.
When you set the Input type parameter to Bit
,
the block accepts binaryvalued inputs that represent integers. The
block collects binaryvalued signals into groups of K =
log_{2}(M) bits
where
K represents the number of bits per symbol.
The input vector length must be an integer multiple of K. In this configuration, the block accepts a group of K bits and maps that group onto a symbol at the block output. The block outputs one modulated symbol for each group of K bits.
Depending on the modulation scheme, the Constellation
ordering or Symbol set ordering parameter
indicates how the block maps a group of K input
bits to a corresponding symbol. When you set the parameter to Binary
,
the block maps [u(1) u(2) ... u(K)] to the
integer
$$\sum _{i=1}^{K}u(i){2}^{Ki}$$
and assumes that this integer is the input value. u(1) is the most significant bit.
If you set M = 8, Constellation
ordering (or Symbol set ordering)
to Binary
, and the binary input word is
[1 1 0], the block converts [1 1 0] to the integer 6. The block produces
the same output when the input is 6 and the Input type parameter
is Integer
.
When you set Constellation ordering (or Symbol
set ordering) to Gray
, the block
uses a Graycoded arrangement and assigns binary inputs to points
of a predefined Graycoded signal constellation. The predefined Mary
Graycoded signal constellation assigns the binary representation
M = 8; P = [0:M1]'; de2bi(bitxor(P,floor(P/2)), log2(M),'leftmsb')
to the P
^{th} integer.
The following tables show the typical Binary to Gray mapping for M = 8.
Binary to Gray Mapping for Bits
Binary Code  Gray Code 

000  000 
001  001 
010  011 
011  010 
100  110 
101  111 
110  101 
111  100 
Gray to Binary Mapping for Integers
Binary Code  Gray Code 

0  0 
1  1 
2  3 
3  2 
4  6 
5  7 
6  5 
7  4 
Gray Encoding a Modulated Signal. For the PSK, DPSK, FSK, QAM, and PAM modulation types, Gray constellations are obtained by selecting the Gray parameter in the corresponding modulation function or method.
For modulation objects, you can set the symbol order
property
to Gray to obtain Grayencoded modulation.
The following example demonstrates use of the symbol
order
property. The Scatter plot shows the modulated symbols
are Grayencoded.
% Create 8PSK Gray encoded modulator hMod = comm.PSKModulator('ModulationOrder',8, ... 'SymbolMapping','Gray','PhaseOffset',0); % Create a scatter plot constellation(hMod)
For modulation functions, set the symbol order argument to Gray.
Looking at the map above, notice that this is indeed a Grayencoded map; all adjacent elements differ by only one bit.
Digital modulation and demodulation blocks sometimes incur delays between their inputs and outputs, depending on their configuration and on properties of their signals. The following table lists sources of delay and the situations in which they occur.
Delays Resulting from Digital Modulation or Demodulation
Modulation or Demodulation Type  Situation in Which Delay Occurs  Amount of Delay 

FM demodulator  Samplebased processing  One output period 
All demodulators in CPM sublibrary  Multirate processing, and the model uses a variablestep solver
or a fixedstep solver with the Tasking Mode parameter
set to SingleTasking D = Traceback length parameter  D+1 output periods 
Singlerate processing, D = Traceback depth parameter  D output periods  
OQPSK demodulator  Singlerate processing  One output period 
Multirate processing, and the model uses a fixedstep solver
with Tasking Mode parameter set to Auto or MultiTasking .  Two output periods  
Multirate processing processing, and the model uses a variablestep
solver or the Tasking Mode parameter is set to
SingleTasking .  One output period  
All decoders in TCM sublibrary  Operation mode set to Continuous ,
Tr = Traceback depth parameter, and code rate
k/n  Tr*k output bits 
As a result of delays, data that enters a modulation or demodulation block at time T appears in the output at time T+delay. In particular, if your simulation computes error statistics or compares transmitted with received data, it must take the delay into account when performing such computations or comparisons.
First Output Sample in DPSK Demodulation. In addition to the delays mentioned above, the MDPSK, DQPSK, and DBPSK demodulators produce output whose first sample is unrelated to the input. This is related to the differential modulation technique, not the particular implementation of it.
Delays from Demodulation. For an example that illustrates delays from demodulation, see the Delays from Demodulation example.
Some digital modulation blocks can output an upsampled version of the modulated signal, while their corresponding digital demodulation blocks can accept an upsampled version of the modulated signal as input. In both cases, the Rate options parameter represents the upsampling factor, which must be a positive integer. Depending on whether the input signal is singlerate mode or multirate mode, the block either changes the signal's vector size or its sample time, as the following table indicates. Only the OQPSK blocks deviate from the information in the table, in that S is replaced by 2S in the scaling factors.
Process Upsampled Modulated Data (Except OQPSK Method)
Computation Type  Input Status  Result 

Modulation  Singlerate processing  Output vector length is S times the number of integers or binary words in the input vector. Output sample time equals the input sample time. 
Modulation  Multirate processing  Output vector is a scalar. Output sample time is 1/S times the input sample time. 
Demodulation  Singlerate processing  Number of integers or binary words in the output vector is 1/S times the number of samples in the input vector. Output sample time equals the input sample time. 
Demodulation  Multirate processing  Output signal contains one integer or one binary word. Output
sample time is S times the input sample time. Furthermore, if S > 1 and the demodulator is from the AM, PM, or FM sublibrary, the demodulated signal is delayed by one output sample period. There is no delay if S = 1 or if the demodulator is from the CPM sublibrary. 
Illustrations of Size or Rate Changes. The following schematics illustrate how a modulator (other than
OQPSK) upsamples a triplet of framebased and samplebased integers.
In both cases, the Samples per symbol parameter
is 2
.
The following schematics illustrate how a demodulator (other
than OQPSK or one from the CPM sublibrary) processes three doubly
sampled symbols using both framebased and samplebased inputs. In
both cases, the Samples per symbol parameter
is 2
. The samplebased schematic includes an output
delay of one sample period.
The model below plots the output of the DQPSK Modulator Baseband block. The image shows the possible transitions from each symbol in the DQPSK signal constellation to the next symbol.
To open this model enter doc_dqpsk_plot
at
the MATLAB command line. To build the model, gather and configure
these blocks:
Random Integer Generator, in the Random Data Sources sublibrary of the Comm Sources library
Set Mary number to 4
.
Set Initial seed to any positive
integer scalar, preferably the output of the randseed
function.
Set Sample time to .01
.
DQPSK Modulator Baseband, in the PM sublibrary of the Digital Baseband sublibrary of Modulation
Complex to RealImag, in the Simulink Math Operations library
XY Graph, in the Simulink Sinks library
Use the blocks' default parameters unless otherwise instructed. Connect the blocks as in the figure above. Running the model produces the following plot. The plot reflects the transitions among the eight DQPSK constellation points.
This plot illustrates π/4DQPSK modulation, because the
default Phase offset parameter in the DQPSK Modulator
Baseband block is pi/4
. To see how the phase offset
influences the signal constellation, change the Phase offset parameter
in the DQPSK Modulator Baseband block to pi/8
or
another value. Run the model again and observe how the plot changes.
The model below uses the MQAM Modulator Baseband block to modulate random data. After passing the symbols through a noisy channel, the model produces a scatter diagram of the noisy data. The diagram suggests what the underlying signal constellation looks like and shows that the noise distorts the modulated signal from the constellation.
To open this model,
enter doc_qam_scatter
at the MATLAB command
line. To build the model, gather and configure these blocks:
Random Integer Generator, in the Random Data Sources sublibrary of the Comm Sources library
Set Mary number to 16
.
Set Initial seed to any positive
integer scalar, preferably the output of the randseed
function.
Set Sample time to .1
.
Rectangular QAM Modulator Baseband, in the AM sublibrary of the Digital Baseband sublibrary of Modulation
Set Normalization method to Peak
Power
.
AWGN Channel, in the Channels library
Set Es/No to 20
.
Set Symbol period to .1
.
Constellation Diagram, in the Comm Sinks library
Set Symbols to display to 160
.
Connect the blocks as in the figure. From the model window's Simulation menu,
select Model Configuration parameters.
In the Configuration Parameters dialog box, set Stop time to 250
.
Running the model produces a scatter diagram like the following one.
Your plot might look somewhat different, depending on your Initial
seed value in the Random Integer Generator block. Because
the modulation technique is 16QAM, the plot shows 16 clusters of
points. If there were no noise, the plot would show the 16 exact constellation
points instead of clusters around the constellation points.
The example generates a random digital signal, modulates it, and adds noise. Then it creates a scatter plot, demodulates the noisy signal, and computes the symbol error rate.
% Create a random digital message M = 16; % Alphabet size x = randi([0 M1],5000,1); % Random symbols % Use 16QAM modulation. hMod = comm.RectangularQAMModulator('ModulationOrder',M); hDemod = comm.RectangularQAMDemodulator('ModulationOrder',M); % Create a constellation diagram object. cpts = constellation(hMod); hConst = comm.ConstellationDiagram('ReferenceConstellation',cpts, ... 'XLimits',[4 4],'YLimits',[4 4]); % Apply 16QAM modulation. y = step(hMod,x); % Transmit signal through an AWGN channel. ynoisy = awgn(y,15,'measured'); % Create constellation diagram from noisy data. step(hConst,ynoisy) % Demodulate ynoisy to recover the message. z = step(hDemod,ynoisy); % Check symbol error rate. [num,rt] = symerr(x,z) %% % ============================================== % Documentation example from % "Constellation for 16PSK" % in modulation.xml % begindocexample 16psk_const % Use 16PSK modulation with no phase offset and binary symbol mapping. hMod = comm.PSKModulator(16,0,'SymbolMapping','binary'); % Create a scatter plot constellation(hMod) % enddocexample 16psk_const %% % ============================================== % Documentation example from % "Constellation for 32QAM" % in modulation.xml % Example: Plotting Signal Constellations % Constellation for 32QAM % Copyright 2003 The MathWorks, Inc. close all; % begindocexample 32qam_const % Create 32QAM modulator with binary symbol mapping hMod = comm.RectangularQAMModulator(32,'SymbolMapping','binary'); % Create a scatter plot constellation(hMod) % enddocexample 32qam_const doctouchupfigure(gcf,1); %% % ============================================== % Documentation example from % "GrayCoded Signal Constellation" % in modulation.xml % begindocexample graycoded_const % Create 8QAM Gray encoded modulator hMod = comm.RectangularQAMModulator(8); % Create a scatter plot constellation(hMod) % enddocexample graycoded_const
The output and scatter plot follow. Your numerical results and plot might vary, because the example uses random numbers.
num = 83 rt = 0.0166
The scatter plot does not look exactly like a signal constellation. Where the signal constellation has 16 precisely located points, the noise causes the scatter plot to have a small cluster of points approximately where each constellation point would be.
Modulation is often followed by pulse shaping, and demodulation is often preceded by a filtering or an integrateanddump operation. This section presents an example involving rectangular pulse shaping. For an example that uses raised cosine pulse shaping, see Pulse Shaping Using a Raised Cosine Filter.
Rectangular Pulse Shaping. Rectangular pulse shaping repeats each output from the modulator a fixed number of times to create an upsampled signal. Rectangular pulse shaping can be a first step or an exploratory step in algorithm development, though it is less realistic than other kinds of pulse shaping. If the transmitter upsamples the modulated signal, then the receiver should downsample the received signal before demodulating. The "integrate and dump" operation is one way to downsample the received signal.
The code below uses the rectpulse
function
for rectangular pulse shaping at the transmitter and the intdump
function
for downsampling at the receiver.
M = 16; % Alphabet size x = randi([0 M1],5000,1); % Message signal Nsamp = 4; % Oversampling rate % Use 16QAM modulation. hMod = comm.RectangularQAMModulator; hDemod = comm.RectangularQAMDemodulator; % Modulate y = step(hMod,x); % Follow with rectangular pulse shaping. ypulse = rectpulse(y,Nsamp); % Transmit signal through an AWGN channel. ynoisy = awgn(ypulse,15,'measured'); % Downsample at the receiver. ydownsamp = intdump(ynoisy,Nsamp); % Demodulate to recover the message. z = step(hDemod,ydownsamp);
This example plots a phase tree associated with a continuous phase modulation scheme. A phase tree is a diagram that superimposes many curves, each of which plots the phase of a modulated signal over time. The distinct curves result from different inputs to the modulator.
This example uses the CPM Modulator Baseband block for its numerical computations. The block is configured so that it uses a raised cosine filter pulse shape. The example also illustrates how you can use Simulink and MATLAB together. The example uses MATLAB commands to run a series of simulations with different input signals, to collect the simulation results, and to plot the full data set.
Note
In contrast to this example's approach using both MATLAB and
Simulink, the 
The first step of this example is to build the model. To open the completed model, click here in the MATLAB Help browser. To build the model, gather and configure these blocks:
Constant, in the Simulink Commonly Used Blocks library
Set Constant value to s
(which
will appear in the MATLAB workspace).
Set Sampling mode to Framebased
.
Set Frame period to 1
.
Set Mary number to 2
.
Set Modulation index to 2/3
.
Set Frequency pulse shape to Raised
Cosine
.
Set Pulse length to 2
.
To Workspace, in the Simulink Sinks library
Set Variable name to x
.
Set Save format to Array
.
Do not run the model, because the variable s
is
not yet defined in the MATLAB workspace. Instead, save the model to
a folder on your MATLAB path, using the filename doc_phasetree
.
The second step of this example is to execute the following MATLAB code:
% Parameters from the CPM Modulator Baseband block M_ary_number = 2; modulation_index = 2/3; pulse_length = 2; samples_per_symbol = 8; L = 5; % Symbols to display pmat = []; for ip_sig = 0:(M_ary_number^L)1 s = de2bi(ip_sig,L,M_ary_number,'leftmsb'); % Apply the mapping of the input symbol to the CPM % symbol 0 > (M1), 1 > (M2), etc. s = 2*s'+1M_ary_number; sim('doc_phasetree', .9); % Run model to generate x. % Next column of pmat pmat(:,ip_sig+1) = unwrap(angle(x(:))); end; pmat = pmat/(pi*modulation_index); t = (0:L*samples_per_symbol1)'/samples_per_symbol; plot(t,pmat); figure(gcf); % Plot phase tree.
This code defines the parameters for the CPM Modulator, applies symbol mapping, and plots the results. Each curve represents a different instance of simulating the CPM Modulator Baseband block with a distinct (constant) input signal.
The loglikelihood ratio (LLR) is the logarithm of the ratio of probabilities of a 0 bit being transmitted versus a 1 bit being transmitted for a received signal. The LLR for a bit b is defined as:
$$L(b)=\mathrm{log}\left(\frac{\mathrm{Pr}(b=0r=(x,y))}{\mathrm{Pr}(b=1r=(x,y))}\right)$$
Assuming equal probability for all symbols, the LLR for an AWGN channel can be expressed as:
$$L(b)=\mathrm{log}\left(\frac{{\displaystyle \sum _{s\in {S}_{0}}{e}^{\frac{1}{{\sigma}^{2}}\left({(x{s}_{x})}^{2}+{(y{s}_{y})}^{2}\right)}}}{{\displaystyle \sum _{s\in {S}_{1}}{e}^{\frac{1}{{\sigma}^{2}}\left({(x{s}_{x})}^{2}+{(y{s}_{y})}^{2}\right)}}}\right)$$
where the variables represent the values shown in the following table.
Variable  What the Variable Represents 

$$r$$  Received signal with coordinates (x, y). 
$$b$$  Transmitted bit (one of the K bits in an Mary symbol, assuming all M symbols are equally probable. 
$${S}_{0}$$  Ideal symbols or constellation points with bit 0, at the given bit position. 
$${S}_{1}$$  Ideal symbols or constellation points with bit 1, at the given bit position. 
$${s}_{x}$$  Inphase coordinate of ideal symbol or constellation point. 
$${s}_{y}$$  Quadrature coordinate of ideal symbol or constellation point. 
$${\sigma}^{2}$$  Noise variance of baseband signal. 
$${\sigma}_{x}^{2}$$  Noise variance along inphase axis. 
$${\sigma}_{y}^{2}$$  Noise variance along quadrature axis. 
Note: Noise components along the inphase and quadrature axes are assumed to be independent and of equal power (i.e., $${\sigma}_{x}^{2}={\sigma}_{y}^{2}={\sigma}^{2}/2$$). 
Approximate LLR is computed by taking into consideration only the nearest constellation point to the received signal with a 0 (or 1) at that bit position, rather than all the constellation points as done in exact LLR. It is defined as [8]:
$$L(b)=\frac{1}{{\sigma}^{2}}\left(\underset{s\in {S}_{0}}{\mathrm{min}}\left({(x{s}_{x})}^{2}+\text{}\text{}{(y{s}_{y})}^{2}\right)\underset{s\in {S}_{1}}{\mathrm{min}}\left({(x{s}_{x})}^{2}+\text{}\text{}{(y{s}_{y})}^{2}\right)\right)$$
Digital modulation and demodulation blocks sometimes incur delays between their inputs and outputs, depending on their configuration and on properties of their signals. The following table lists sources of delay and the situations in which they occur.
Delays Resulting from Digital Modulation or Demodulation
Modulation or Demodulation Type  Situation in Which Delay Occurs  Amount of Delay 

FM demodulator  Samplebased processing  One output period 
All demodulators in CPM sublibrary  Multirate processing, and the model uses a variablestep solver
or a fixedstep solver with the Tasking Mode parameter
set to SingleTasking D = Traceback length parameter  D+1 output periods 
Singlerate processing, D = Traceback depth parameter  D output periods  
OQPSK demodulator  Singlerate processing  One output period 
Multirate processing, and the model uses a fixedstep solver
with Tasking Mode parameter set to Auto or MultiTasking .  Two output periods  
Multirate processing processing, and the model uses a variablestep
solver or the Tasking Mode parameter is set to
SingleTasking .  One output period  
All decoders in TCM sublibrary  Operation mode set to Continuous ,
Tr = Traceback depth parameter, and code rate
k/n  Tr*k output bits 
As a result of delays, data that enters a modulation or demodulation block at time T appears in the output at time T+delay. In particular, if your simulation computes error statistics or compares transmitted with received data, it must take the delay into account when performing such computations or comparisons.
In addition to the delays mentioned above, the MDPSK, DQPSK, and DBPSK demodulators produce output whose first sample is unrelated to the input. This is related to the differential modulation technique, not the particular implementation of it.
Demodulation in the model below causes the demodulated signal
to lag, compared to the unmodulated signal. When computing error statistics,
the model accounts for the delay by setting the Error
Rate Calculation block's Receive delay parameter
to 0
. If the Receive delay parameter
had a different value, then the error rate showing at the top of the
Display block would be close to 1/2.
To open this
model , enter doc_oqpsk_modulation_delay
at
the MATLAB command line. To build the model, gather and configure
these blocks:
Random Integer Generator, in the Random Data Sources sublibrary of the Comm Sources library
Set Mary number to 4
.
Set Initial seed to any positive integer scalar.
OQPSK Modulator Baseband, in the PM sublibrary of the Digital Baseband sublibrary of Modulation
AWGN Channel, in the Channels library
Set Es/No to 6
.
OQPSK Demodulator Baseband, in the PM sublibrary of the Digital Baseband sublibrary of Modulation
Error Rate Calculation, in the Comm Sinks library
Set Receive delay to 1
.
Set Computation delay to 0
.
Set Output data to Port
.
Display, in the Simulink Sinks library
Drag the bottom edge of the icon to make the display big enough for three entries.
Connect the blocks as shown above. From the model window's Simulation,
select Model Configuration parameters.
In the Configuration Parameters dialog box, set Stop
time to 1000
. Then run the model and
observe the error rate at the top of the Display block's icon. Your
error rate will vary depending on your Initial seed value
in the Random Integer Generator block.
[1] Jeruchim, M. C., P. Balaban, and K. S. Shanmugan, Simulation of Communication Systems, New York, Plenum Press, 1992.
[2] Proakis, J. G., Digital Communications, 3rd ed., New York, McGrawHill, 1995.
[3] Sklar, B., Digital Communications: Fundamentals and Applications, Englewood Cliffs, NJ, PrenticeHall, 1988.
[4] Anderson, J. B., T. Aulin, and C.E. Sundberg, Digital Phase Modulation, New York, Plenum Press, 1986.
[5] Biglieri, E., D. Divsalar, P.J. McLane, and M.K. Simon, Introduction to TrellisCoded Modulation with Applications, New York, Macmillan, 1991.
[6] Pawula, R.F., "On Mary DPSK Transmission Over Terrestrial and Satellite Channels," IEEE Transactions on Communications, Vol. COM32, July 1984, pp. 752–761.
[7] Smith, J. G., "OddBit Quadrature AmplitudeShift Keying," IEEE Transactions on Communications, Vol. COM23, March 1975, pp. 385–389.
[8] Viterbi, A. J., "An Intuitive Justification and a Simplified Implementation of the MAP Decoder for Convolutional Codes," IEEE Journal on Selected Areas in Communications, vol. 16, No. 2, pp 260–264, Feb. 1998