Anda di halaman 1dari 24

TSTE91 System Design

Communications System Simulation Using Simulink

Part II Baseband Modulation schemes

Sebastian Prot, Kent Palmkvist


Electronic Systems, Dept. EE, LiTH

020206
1 Abstract .............................................................................................. 1
2 Theory ................................................................................................ 1
2.1 Signal constellation ....................................................................... 1
2.2 Basic mapping schemes ................................................................ 2
2.2.1 M-ary PSK mapping.................................................................. 3
2.2.2 M-ary ASK mapping ................................................................. 6
2.3 Quadrature modulation................................................................ 7
2.3.1 QASK mapping......................................................................... 8
2.3.1.1 Properties of QASK mapping............................................... 9
2.4 Arbitrary-map QAM.................................................................. 11
3 Block descriptions............................................................................ 12
3.1 Modulator banks......................................................................... 13
3.1.1 Amplitude modulation............................................................. 13
3.1.1.1 MASK modulator............................................................... 13
3.1.1.2 S-QAM modulator ............................................................. 14
3.1.2 Phase modulation .................................................................... 15
3.1.2.1 MPSK modulator ............................................................... 16
3.1.2.2 Arbitrary-map QASK ......................................................... 16
3.2 Sampled read from workspace – multilevel data source .......... 17
3.2.1 Randint() function ................................................................... 17
3.3 Measurement tools...................................................................... 17
3.3.1 Scattered plot .......................................................................... 17
4 The system basics............................................................................. 18
4.1 The system setup parameters ..................................................... 18
4.1.1 Initial commands..................................................................... 19
4.2 The signals flow........................................................................... 20
4.3 Transmission analyses ................................................................ 20
5 Bibliography .................................................................................... 22
M-ary QAM and M-ary PSK modulations

1 Abstract

This manual introduces the basics of digital amplitude (MASK – M-ary


Amplitude Shift Keying / MQAM M-ary Quadrature Amplitude Modulation)
and phase (MPSK – M-ary Phase Shift Keying / MQPSK – M-ary Quadrature
Phase Shift Keying) modulation.

2 Theory

Like analog modulation, digital modulation alters an analog carrier


according to an information signal. However, in digital modulation, the
information signal is a discrete-time signal that can assume an finite number of
different values.
The simulink library includes both baseband and passband modulators.
Baseband, lowpass modulation methods requires less computation, producing
only complex envelope signal.
Passband modulation, on the other hand, alters an analog, time continues
carrier according to the baseband modulation envelope.

2.1 Signal constellation


Constellation, in this case, doesn’t have anything to do with astronomy. It
means: a two-dimensional space of possible values assigned to binary data
during the process of signal mapping.
The adjective - “two-dimensional” – describes a complex number domain,
where the X axis defines the real part and the Y axis defines the imaginary part
of a complex envelope. For example, in Fig.1 point X indicates the real part
equal to 1 and imaginary part equal to j0,33(3), where j signifies the imaginary
component.
The number of points, M, in signal constellation is adequate to the number
of possible values assigned to a binary data stream. Furthermore constellation
map shape, identifies the mapping scheme used in the process of signal mapping
(compare e.g., fig.1 and fig.3 ).

1
Fig.1. The square constellation map of 16QAM signal;
X{Re=1;Im=j0.33(3)}.

2.2 Basic mapping schemes


The main difference between MPSK and MASK modulation is the
constellation map used in the process of data mapping.

Fig.2. a). Phase modulator; b). Amplitude modulator.

2
In both systems is the modulator output signal in polar form:

Zej(φ +θ),

where φ is the signal angle altered during PSK (Phase Shift Keying)
mapping; θ is constant initial offset, and Z signifies the magnitude altered during
ASK mapping.
In the case of PSK can the modulation process be described as a function of
the angle:

f(φ)=e j(φ +θ) where θ is a constant phase offset,

and in AM (Amplitude Modulation) can the same process be characterized


as a function of the magnitude:

f(Z)=Ze-jθ where θ is also a constant phase offset.

2.2.1 M-ary PSK mapping


The M-ary PSK constellation is circle formed as the example in fig.3
shows.

Fig.3. Circle constellation map of a 16 PSK signal;


X{Re=1,Im=0j}.

3
The circle radius is independent of the modulation M parameter, since it is
equivalent to the signal magnitude and is constant. Thus, when M increases, the
distance between neighboring points in the signal constellation a (1) decrease
(compare fig.3 and fig.5).

a = 2Rsin (π/M) (1)

where a is the distance between the two points on the circle of R radius, and
M is the number of points in the constellation used for the mapping.

Equation 1 was derived according to fig.4.

Fig.4. Calculation of the distance between points


in the circle-map constellation.

Each points position in the circle-map of PSK can be calculated (see


Example 1) according to expression (2):

X(m ) = e (jθ +j2πm/M) (2),

where θ is the phase offset; m is an integer between 0 and M-1, and M


defines the total number of points in signal constellation.

The signal magnitude and phase that are presented in the constellation maps
are encoded in rectangular coordinates and can be found by performing
conversion to polar notation by equation (3) and (4).

4
Mag = Im 2 ( X ) + Re 2 ( X ) (3)
 Im( X ) 
θ = arctan  (4)
 Re( X ) 

Fig.5. 64 PSK signal constellation.

Example.1.

BPSK modulation is a two values digital modulation, M = 2. Thus, input


data m defined as integer number in the range [0…M-1], can take on only
two values 0 and 1. Assuming θ = 0, the modulated signal constellation
points can be calculated from (1) as follows:

Input value m = 0;
X(0) = e(0j +j2π0/2) = e(0) = 1;

m = 1;
X(1) = e(0j +j2π/2) =ejπ = cos(π ) + jsin(π ) = -1

Figure 6 shows several points of the 16PSK constellation map, in both polar
and rectangular notation. In all cases, the magnitude is equal to 1. The same
situation can be observed in fig. 5 where the 64PSK constellation map is
presented.

5
These constellation maps with M being large are not practical for
transmission over noisy channels, because of the small distances between the
points in signal constellation map (compare fig.1 and 3).
Other modulation scheme that alters one of the parameters of the complex
envelope in polar notation, includes the already mentioned MASK.

Fig.6. 16 PSK constellation map. Some points are converted from rectangular to
polar notation, revealing magnitude and phase of the signal.

2.2.2 M-ary ASK mapping


In the PSK case, all the points lay on a circle with a constant radius –
defining constant signal magnitude. On the other hand, in MASK all the points
form a line, which slope with relation to X axis is defined by the initial phase
parameter.
Figure 7 presents such a constellation map, where initial phase is equal to
zero. Observing the constallation map a conclusion can be drawn that in simple
ASK modulation, the phase is also modulated and it takes on two different
values: 0 and π (actually θ and θ +π, where θ is initial phase).
Right and Wrong! Why? The answer is simple. An AM modulator
multiplies a cosine carrier by a purely real modulating signal. When it takes on
values smaller then 0, carrier is simply inverted causing phase shift of π, or -π
(fig.8).
The key information here, is that phase shifts in ASK modulation are not
the results of phase modulation, since the modulator alters only the carriers
magnitude. Even so, MASK modulation gives the same results as MPSK when
M is equal to 2.

6
Fig.7. 16 ASK constellation map.

Fig.8. ASK modulation scheme.

2.3 Quadrature modulation


Baseband, quadrature modulation is based upon a binary signal mapping to
complex numbers in rectangular notation. Rectangular notation, means here
separate in-phase (I) and quadrature (Q) components.
In passband modulation, both of them modulate different carriers, which are
then summed before transmitting (its equivalent to the I and Q components
summing in the baseband model, fig.9).

Fig.9. Baseband quadrature modulator.

7
The parameters of the resulting signal can be calculated according to the
expressions (3) and (4), after replacing Im(x) with the quadrature Q component
and Re(x) with the in-phase I component.
Setting different constellation maps changes the type of modulation. For
example, in QAM, BPSK, and QPSK, according to IEEE802.11a standard, is the
binary data signal mapped to a Gray-coded constellation.
Gray coding maps an integer number into a set of integers where the binary
representation of a given number only differs by one bit from its neighbors
(Example 2).

Example.2.
Example of Binary to Gray and Gray to Binary Mappings
Binary to Gray Mode Gray to Binary Mode
Input Output Input Output
0 0 (000) 0 (000) 0
1 1 (001) 1 (001) 1
2 3 (011) 2 (010) 3
3 2 (010) 3 (011) 2
4 6 (110) 4 (100) 7
5 7 (111) 5 (101) 6
6 5 (101) 6 (110) 4
7 4 (100) 7 (111) 5

2.3.1 QASK mapping

The QASK modulator supplied in simulink library performs Gray-coded


mapping with an additional multiplication by a special normalization factor
KMOD (5), which assures approximately constant average power, regardless of
the value of M.

d=(I + Q)KMOD , (5)

where d is an output signal, I and Q are in-phase and quadrature


components before normalization and KMOD is a normalization factor.
Thus, the points form square constellation in the range [-1:1] of both axes
(Fig.10) regardless of the value of the parameter M.
The distances between those points are however much larger then in
equivalent PSK modulation for the same value of M (compare fig.1 with fig.3,
and fig.5 with fig.10), and can be calculated according to expressions in (6).

8
Fig.10. 4-QAM and 64-QAM constellation maps.

M = 2 ⇒ a = 2;
M = 4 ⇒ a = 2;
2
M = 2 K > 4 ∩ K ∈ even , int ∩ Mag MAX = 2 ⇒ a = (6)
M −1

2.3.1.1 Properties of QASK mapping


QASK properties depend strongly on M value.

M=2
When M = 2, a binary QAM mapping scheme is applied. In other words,
the carrier is multiplied by two opposite values1, depending on the data sequence
to be transmitted (Fig.11). This operation gives the same results as BPSK
modulation, and BPSK can thus be realized using a QASK modulator in the
physical applications.
Mathematical proof of that property can be derived by comparing example
1 with equation 7, where eq.7 depicts the binary QAM mapping process.

Z = 1 ⇒ e jθ =0 = cos 0° + j sin 0° = 1
Ze = (7).
Z = −1 ⇒ −e jθ =0 = − cos 0° − j sin 0° = −1
where, Z is signal magnitude and θ is initial phase.

The only differences between BPSK and QASK is the inverse signs of the
calculated values in the constellation maps. In PSK m=0 generates 1 and m=1
generates –1, while in binary QASK m=0 generates –1 and m=1 generates 1.

1
In general “1” or “-1”.

9
Fig.11. BPSK and square-map binary QAM constellation.

However, in Std 802.11a, the BPSK map is defined as presented in fig.12,


and it follows the rules of binary QAM mapping scheme, described in this
section, thus binary QASK is usually called BPSK in physical systems.

Fig.12. BPSK constellation bit encoding.

Fig.13. QPSK constellation bit encoding.


M=4
Similar situation can be observed when M = 4 (4-QAM is applied). In this
case, the points in the QAM are, again, assigned according to the gray-coded
map defined in Std 802.11a as presented in figure 13, where the input bit b0, is
the earliest in the stream.
Figure 14 presents both the 4-QAM and 4-PSK constellation maps
generated by the Simulink model. Notice, that in both cases, the magnitude is
constant regardless of the constellation point taken under consideration.
Although in QAM, transmitted energy is higher since a square map is applied.

10
Thus, a conclusion can be drawn, that in the case of M = 4, again, both
modulation schemes produce phase modulated signal. Thus, QPSK according to
Std 802.11a is realized by an QASK modulator.

Fig.14. 4-PSK and 4-QAM constellation maps.

M>4
If the value of M is larger then 4, both magnitude and phase alters in QAM.
Although phase shifts are not a straightforward effect of phase modulation. They
appear due to summation of sinusoids in the passband model, or corresponding,
I and Q components in the baseband model.
Taking all into account, BPSK, QPSK and M-ary QAM modulation
schemes with Gray-coded mapping specified in Std802.11a, can be performed
using a single QAM modulator.
Additionally, if the quadrature amplitude modulator has an option that
allows for constellation map definition, it is possible to define it in such a way,
that the system acts like a phase modulator, regardless of the value of M.

2.4 Arbitrary-map QAM


If a quadrature AM modulator allows the user to set the constellation map to
an arbitrary form2, the MPSK can be effectively modeled with the use of the
Euler’s relation (8), which is actually the key equation for using complex
numbers in science and engineering. In this case it allows the user to calculate
the constellation points from equation (1) receiving separate in-phase and
quadrature definition (9) and (10).

2
Separate for in-phase and quadrature component.

11
e jx = cos x + j sin x (8)

 j ( 2π [0:MM −1] )   m
=
jx
Re(e ) Re e  = cos 2π  (9)
   M

 j ( 2π [ 0:MM −1] )   m
Im(e ) = Im e
jx
 = sin  2π  ( 10 )
   M
where m defines modulator input as an integer value.

The resulting constellation map is identical to that of a PSK modulation


(fig.15), although it is produced by a quadrature amplitude modulator.

Fig.15. PSK constellation map, generated by


an Arbitrary-map QAM modulator.

3 Block descriptions

The system consists of three main sections (fig.16):


• Amplitude modulation
• Phase modulation
• Measurement tools

The blocks outside the marked regions are not important for understanding
the theory, but are important from a simulink point of view, since they are used
for stimuli generation and signal format conversion.

12
Fig.16. The Simulink system introducing basic and quadrature baseband digital
mapping schemes such as PSK, ASK, QASK and QPSK.

3.1 Modulator banks

3.1.1 Amplitude modulation

3.1.1.1 MASK modulator


Basic digital amplitude modulation is performed by the MASK modulator.
It generates a one dimensional constellation map.
The parameters are the same as in the S-QAM modulator (see the next
section below).

13
Fig.17. MASK block setup mask.

3.1.1.2 S-QAM modulator


Square-map amplitude modulation is performed by the S-map baseband
QAM modulator which requires the user to define a few basic mapping
parameters (fig.18).

M-ary number
The M-ary number parameter sets the mapping constellation of the signals.
The description in brackets defines the QAM modulator input signal, whose
values need to be in the range of [0:M-1]. If a binary data source is used in the
system, the signal needs to be converted by an Integer vector to scalar
converter from the Communication blockset/ Utility functions library.
Alternatively, a properly configured Read from workspace block can be
applied (see section 3.4).

Symbol interval and offset


When the symbol interval is a two-element vector, the second element is the
offset (default value is 0).

Fig.18. S-QASK model setup dialog box.

14
Initial phase
Initial phase is applied in the second stage of modulation (fig.10).

Sample time
The sample time parameter was probably supposed to define the modulated
output signal sampling rate, but model designer have forgotten to apply such
functionality into the subsystem. Thus, the sample time parameter does not have
any influence on the modulator operation and can be set, e.g., to zero.
If all the parameters are set correctly (fig.19), the QAM modulator first
maps the input signal according to square constellation definition, and in second
step it mixes in-phase and quadrature components to form a single complex
signal and optionally applies an initial phase offsets (fig.20).

Fig.19. S-QAM modulator subsystem.

Fig.20. Quadrature modulation stage.


3.1.2 Phase modulation
The phase modulation section introduces two methods of performing
MPSK. One of them performs a baseband MPSK modulation, and the other one
performs an Arbitrary-map QASK modulator.
In both cases, binary input data needs to be converted to a M-level signal,
since in both cases is the constellation defined by the same value of the M
parameter.

15
3.1.2.1 MPSK modulator
Like in almost all simulink models, the MPSK mod block setup mask
allows the user to specify basic parameters (fig.21). All of these are described in
section 3.1 above.

Fig.21. The MPSK model setup dialog box.

The baseband MPSK Mod alters the signal phase according to expression
(1), and outputs a baseband envelope of the modulated cosine signal.

3.1.2.2 Arbitrary-map QASK


The Arbitrary-map baseband quadrature modulator also generates a
modulated carrier envelope, but it alters both magnitude and phase of the input
signal (fig.22) according to constellation definition in rectangular notation.

In-phase and quadrature components


The two vectors define the values that are assigned to input data in the
process of data mapping.

Fig.22. A-QASK setup mask.

16
Sample Time
Like in the QASK modulator case, the sample time does not apply to this
system.

3.2 Sampled read from workspace – multilevel data source


Due to the modulators specifications, the input binary data stream needs to
be replaced with a M-level signal. That can be performed in several ways, but
the simplest is to replace the binary data source with a multilevel one.
The Sampled Read From Workspace block (Fig.23) was found to be
useful in this situation. This block allows a system to read data from workspace
or to create a data vector by executing a Matlab function. In this case, actual
data is generated with the use of the RANDINT() function – random integer
matrix generator – which is described in next section.

Fig.23. Data signal source.


3.2.1 Randint() function
The first and the second parameter specified in the call to this function
defines that a N-by-M matrix of random integers is to be generated.
The third parameter – RANGE - specifies the minimum and maximum
output integer. When RANGE is a scalar, positive integer, the output range is
[0, RANGE-1].
3.3 Measurement tools
The modulators output signals are to be measured and analyzed using
measurement tools collected in the Measurement tools section, which includes
Scattered plot and the already known Scope.

3.3.1 Scattered plot


Plots generated by this block illustrate signal constellations – imaginary and
real component – in the same two-dimensional space. The displayed color
definitions and axes settings can be changed in the model mask (fig.24).

17
Fig.24. Eye-diagram scattered plot setup mask.

Color codes and line properties can be found, by typing “ in the


Matlab command window or simply plot in Matlab Help Window.

Plot update sample time


The plot update sample time should be at least two times shorter than the
symbol period.
The key knowledge about scattered plot is that it displays two multiplexed
signals in the same 2-dimensional space. The more precise scattered plot, and
eye diagram description can be found in the third part of the manuals which
introduces passband modulation.

4 The system basics

Before starting the simulation, you should analyze the system carefully and
try to understand dependencies between particular blocks, parameters, etc.
The following description explains the signals flow and tasks that are
performed in different system stages.

4.1 The system setup parameters

The main mask allows the user to change the number of points in the signal
mapping constellation (Fig.25). Thus, different values of M causes different
mapping schemes to be simulated. Table 1 presents some popular and practical
system specifications.

18
Fig.25. The system setup dialog box.

Table 1. Popular modulation schemes realized by the simulink system.


M MASK MPSK QAM A-MAP QAM
2 BPSK BPSK BPSK BPSK
4 4-ASK C-map QPSK S-map QPSK C-map QPSK
8 8-ASK π/4-PSK 8-QAM π/4-QPSK
16 16-ASK 16-PSK 16-QAM 16-QPSK
64 64-ASK 64-PSK 64-QAM 64-QPSK
128 128-ASK 128-PSK 128-QAM 128-QPSK
Etc.
Where, yellow color distinguishes phase modulations.

4.1.1 Initial commands


The system needs one parameter to be set during the initialization process
(fig.26). That parameter specifies the input data bit duration Tbit,, and was
applied in the system for easier future development.

Fig.26. System mask definition with initialization parameter setup.

19
4.2 The signals flow
The complete system consist of two basic sections:
• modulator banks,
• measurement tools.

All modulators are fed by the multilevel data signal generated using the
randint() function and Read from Workspace block.
The modulator banks perform two types of signal modulation:
• AM:
o MASK,
o QAM,
• PM:
o MPSK,
o QPSK.

Next, in-phase and quadrature components of the modulated signals are


separated in order to generate scatter plots (fig.27) using the supplied tools
(fig.16). Additionally, mapped signal envelopes are also converted from
rectangular to polar form, producing separated magnitude and angle signals,
which are further cumulatively presented by the Scope block.
4.3 Transmission analyses
The Measurement Tools section, described above, allows the student to
analyze the signal constellations resulting from AM and PM modulation.
It is advised to set the M value in ascending order, according to the Table 1,
and compare the generated constellations from simulation to simulation.
When M is set to 2, binary PSK is applied by all the modulators. There are
no differences between the constellations.
When M = 4, it results in 4-ary PSK being applied, but differences when
identifying different maps can be noticed.
M = 8, results in π/4-QPSK modulation realized by the quadrature
modulator.
Further increases of the value of M causes the modulators to generate:
• MASK modulated signal in MASK mod case,
• MPSK modulated signal in MPSK mod case,
• M-QAM modulated signal in MQAM case,
• and M-QPSK modulated signal in A-map QAM case.
Plots generated by the Scope presents all modulators output signals on the
same screen, allowing the user to compare the magnitude and phase of digital
PM and AM modulated signals (fig.28).

20
Fig.27. Scattered plots depicting constellation maps of 16-MASK(left top),
16-QAM (left bottom), 16-PSK (right top) and 16-QPSK (right bottom).

This plot shows that PSK modulation actually only alters the signals phase
and that quadrature amplitude modulator generates phase modulated and/or
amplitude modulated signals, depending on the specified number of
constellation point.
Additionally, the system introduces alternative way of performing phase
modulation with the use of a standard QAM modulator and properly set
constellation map. In such case is the modulation called QPSK – Quadrature
Phase Shift Keying.

21
Fig.28. Magnitude and phase components of modulated signals. Characteristics
generated for 16 level mapping.

Fig.28 presents complex envelopes of the modulated signals for M = 16. In


the case of phase modulated signals, for M higher then 4, which was described
in chapter 2.3 Normalization, very small errors occurs causing magnitude
variation around its nominal value of “ . The Simulink block – Scope –
automatically enlarges those variations so they can be observed on the screen.

5 Bibliography
[1] Steven W. Smith. “The Scientist and Engineer's Guide to Digital Signal

22

Anda mungkin juga menyukai