ii baseband modulation schemes 020206[1]

Upload: umair-hadi

Post on 08-Apr-2018

247 views

Category:

Documents


4 download

TRANSCRIPT

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    1/24

    TSTE91 System Design

    Communications System Simulation Using Simulink

    Part II Baseband Modulation schemes

    Sebastian Prot, Kent Palmkvist

    Electronic Systems, Dept. EE, LiTH

    020206

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    2/24

    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.1Properties 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.1MASK modulator............................................................... 13

    3.1.1.2S-QAM modulator ............................................................. 14

    3.1.2 Phase modulation .................................................................... 15

    3.1.2.1MPSK modulator ............................................................... 16

    3.1.2.2Arbitrary-map QASK......................................................... 16

    3.2 Sampled read from workspace multilevel data source .......... 173.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

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    3/24

    1

    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 carrieraccording 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, doesnt 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 Xaxis defines the real part and the Yaxis 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 ).

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    4/24

    2

    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 theconstellation map used in the process of data mapping.

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

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    5/24

    3

    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, andZsignifies the magnitude altered during

    ASK mapping.

    In the case of PSK can the modulation process be described as a function of

    the angle:

    f()=ej( +)

    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}.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    6/24

    4

    The circle radius is independent of the modulation M parameter, since it is

    equivalent to the signal magnitude and is constant. Thus, when Mincreases, 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

    Mis 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 +j2m/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).

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    7/24

    5

    (4))Re(

    )Im(arctan

    (3))(Re)(Im 22

    =

    +=

    X

    X

    XXMag

    Fig.5. 64 PSK signal constellation.

    Example.1.

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

    data m defined as integer number in the range [0M-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 +j20/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 ispresented.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    8/24

    6

    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 differentvalues: 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

    Mis equal to 2.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    9/24

    7

    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 arethen summed before transmitting (its equivalent to the I and Q components

    summing in the baseband model, fig.9).

    Fig.9. Baseband quadrature modulator.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    10/24

    8

    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

    andRe(x) with the in-phaseIcomponent.

    Setting different constellation maps changes the type of modulation. For

    example, in QAM, BPSK, and QPSK, according to IEEE802.11a standard, is thebinary 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 Output0 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 ofM.

    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 parameterM.

    The distances between those points are however much larger then in

    equivalent PSK modulation for the same value ofM (compare fig.1 with fig.3,

    and fig.5 with fig.10), and can be calculated according to expressions in (6).

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    11/24

    9

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

    (6)1

    22Magint,even42

    ;24

    ;22

    ==>=

    ====

    MaKM

    aM

    aM

    MAX

    K

    2.3.1.1Properties of QASK mapping

    QASK properties depend strongly onMvalue.

    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.

    (7).10sin0cos1

    10sin0cos10

    0

    ====+===

    =

    =

    jeZ

    jeZZe

    j

    jj

    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

    generates1, while in binary QASK m=0 generates1 and m=1 generates 1.

    1 In general 1 or -1.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    12/24

    10

    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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    13/24

    11

    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 ofMis 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,

    Iand 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 ofM.

    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

    Eulers 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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    14/24

    12

    8sincos )(xjxejx +=

    )(M

    mee M

    Mj

    jx 92cosRe)Re()

    ]1:0[2(

    =

    =

    )(M

    mee M

    Mj

    jx 102sinIm)Im()

    ]1:0[2(

    =

    =

    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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    15/24

    13

    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.1MASK 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).

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    16/24

    14

    Fig.17. MASK block setup mask.

    3.1.1.2S-QAM modulatorSquare-map amplitude modulation is performed by the S-map basebandQAM 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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    17/24

    15

    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 modulatedoutput 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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    18/24

    16

    3.1.2.1MPSK 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.2Arbitrary-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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    19/24

    17

    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 usingmeasurement 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).

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    20/24

    18

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

    Color codes and line properties can be found, by typing in theMatlab command window or simplyplotin 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 ofM causes different

    mapping schemes to be simulated. Table 1 presents some popular and practical

    system specifications.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    21/24

    19

    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-QPSK16 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 commandsThe 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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    22/24

    20

    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 toanalyze 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.

    WhenMis 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 quadraturemodulator.

    Further increases of the value ofMcauses 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).

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    23/24

    21

    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.

  • 8/6/2019 II Baseband Modulation Schemes 020206[1]

    24/24

    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. Inthe 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