You are on page 1of 10

Sri Lanka Institute of Information Technology

DSP & Mobile Communication


Electrical & Computer Engineering Year 3 Semester 1
Lab 02 BPSK, QPSK Modulation and Demodulation

1. OBJECTIVE
Gain knowledge to generate binary phase shift keyed (BPSK) and Quadrature phase shift keyed
(QPSK) signals and synchronous demodulation of each generated signals using Simulink in
MATLAB software.

2. APPARATUS
MATLAB software (new version)

3. PREREQUISITES
It would be advantageous if you have a basic knowledge of operating MATLAB software and
Simulink in the area of linear modulation and demodulation.

4. PREPARATION
4.1. Generation of BPSK
If a sinusoidal high frequency carrier is modulated by a given bi-polar bit stream (+1 is
represented by +1 and 0 is represented by -1), the output signals polarity will get reversed
every time when the bit stream changes its polarity. For a sine wave this is equivalent to a
180phase reversal (shift). Thus the multiplier output will be a BPSK signal.

Figure 01: Generation of BPSK

Here, the information about the bit stream can be identified by observing the changes of phase
of the transmitted (generated) signal.
The appearance of a BPSK signal in the time domain is shown in the Figure 02 below. The
upper trace is the Binary Bi-polar message sequence.

Figure 02: The Bi-polar message signal and BPSK signal in time domain

When you observe the BPSK wave form of the above Figure 02 you can clearly identify that the
wave shape is symmetrical at each phase transition. This is because the bit rate of the
message signal is a sub multiple of the carrier frequency

. Thus the message transitions

have been timed to occur at a zero crossing of the carrier.


This offers the advantage of simplifying the bit clock recovery from a received BPSK signal.
Once the carrier has been acquired then the bit clock can be derived by division.

4.2.

BPSK Demodulation

In the demodulation process a synchronous demodulator would be sensitive to identify the


phase reversals of the BPSK signal.
Demodulation of a BPSK signal can be considered as a two-stage process.
1. Translation back to baseband, with recovery of the band-limited message waveform
2. Regeneration from the band-limited waveform back to the binary message bit stream

Figure 03: Synchronous demodulation of BPSK

Here the stage 1, translation back to the baseband is achieved using a synchronous
demodulator. It requires a local synchronous carrier. Thus the same carrier that was been used
for modulation process is used for the process of demodulation.
The output of the translation process will reproduce a band limited version of the original binary
sequence.

4.3.

Generation of QPSK

The Quadrature Phase Shift Keying (QPSK) is a Modulation Scheme where the Phase of the
modulated signal is shifted depending on the incoming bit stream by an angle of +450 or +1350,
-1350(+2250), -450 (+3150). Data into the modulator is separated into two channels called I and
Q. Two bits are transmitted simultaneously in one channel. Here the modulation takes two input
bits at a time and creates a symbol that represents one of four phases. For this binary or gray
coding are used.

Figure 04: QPSK Symbol Mapping

In general the data to be modulated usually comes as a stream of contiguous binary signals. In
QPSK the modulator takes a pair of these signals and use one signal to modulate one carrier
and the other signal to modulate the other carrier.
In a 4-ary message signal the two sequences are been obtained by splitting the bit stream into
two paths. In one signal the convention that the first bit is used to modulate the sine wave and
the second bit the cosine wave of the carrier signal. (First bit received is left most bit)

Thus 4-ary sequence will become a serial-to-parallel conversion. The two streams become the
channel 1 and channel 2 messages as shown in figure below.
Once the binary signals have been identified then they can be used to implement QPSK using
the functional block diagram shown in the figure QPSK modulator. Conventionally the in phase
signal (cosine wave) is labeled as I carrier and the quadrature signal (sine wave) as the Q
carrier.

Channel 1

Channel 2

Figure 05: QPSK modulator


QPSK modulated waveform is shown below.

Figure 06: QPSK modulated signal

4.4.

Demodulation of QPSK

The QPSK receiver follows the similar principles as in the transmitter.


To demodulate, QPSK needs the recovery of the quadrature carriers. To recover the data signal
which modulated I carrier, the QPSK signal was multiplied by the recovered I carrier. The
recovery of the Q carrier, modulating signal used the recovered Q carrier. In the following figure
QPSK demodulator system is implemented.

Cosine Carrier

Low-pass Filter

Q Demodulated
Signal

QPSK signal

Low-pass Filter

I Demodulated
Signal

Sine Carrier

Figure 07: QPSK Demodulator

5. EXPERIMENT
5.1.

The BPSK Generator

Draw the schematic diagram to generate a BPSK signal in Simulink as shown in the figure
below.

Schematic for generating the BPSK signal

Change the parameters as follows,


Random Integer Generator

M-ARY Number

- 2

Initial Seed

- 1

Sample time

- 20

Output data type

- int8

Unipolar to Bipolar Converter

M-ARY Number

- 2

Polarity

- Positive

Output data type

- int8

Sine Wave

Sine type

- Sample based

Time (t)

- Use simulation time

Amplitude

- 1

Bias

- 0

Samples per period

- 20

Number of offset samples

- 0

Sample time

- 0.1

Adjust the simulation time to 1000.


After constructing the system double click the relevant scope, select parameters icon. In
History un-tick the Limit data points to last then run the model.
Q1. Plot all four scopes and identify the characteristics of each waveform.
Q2. Calculate the frequencies of both message and carrier signals (consider the x-axis in ms).
Q3. After modulating the carrier signal with the bipolar message signal what is the main change
that has been occurred in the transmitting signal?

5.2.

BPSK Demodulator

Here a synchronous demodulator is been used for the process of BPSK demodulation.
Continue drawing the schematic diagram to demodulate the transmitted BPSK signal
as shown in the figure below.

Schematic for demodulating the generated BPSK signal

BPSK Signal

(Use the same carrier signal for the process of demodulation)


To design the Low-pass filter, follow the instructions below. (Use fdatool to design the filter)

Use IIR Elliptic design method to construct the Low-pass filter.


Q4. Using the frequency and samples per period of the carrier signal calculate the sampling
frequency (Fs) required to design the filter.
Q6. Using the frequency of the message signal determine the required frequencies for Fpass
and Fstop.
Change the value of Astop in Magnitude Specifications to 40.
After changing the values according to the above instructions export the designed filter to
the Simulink model.
Finally run the model and observe the output wave form.
Q7. When observing the output waveform you will notice that the received waveform is no
longer rectangular in shape. Explain the reason.
Increase the bandwidth by changing the parameter values of Fpass and Fstop in order to
obtain the demodulator filter output waveform more equal to the transmitted bit sequence.

5.3.

The QPSK Generator

Build the model as below.

Set parameters as below. (Set the simulation time to 1000 and before running the Simulink disable
the data history limited to 5000).

Random Integer Generator


M ARY Number

Initial Seed

Sample time

20

Output data type

int8

QPSK Modulator
Phase offset

pi/4

Constellation Ordering

binary

Input Type

Integer

Cosine Wave
Sine type

Sample based

Time

Use Simulation time

Amplitude

Bias

Samples per period

20

Number of offset samples

Sample time

0.2

- Sine Wave
Sine type

Sample based

Time

Use Simulation time

Amplitude

Bias

Samples per period

20

Number of offset samples

10

Sample time

0.2

Q8. Calculate the frequencies of message and two carrier signals (sine and cosine) (consider
the x-axis in ms).

Q9. After modulating the message signal with carrier signals and adding them what is the main
change that has been occurred in the transmitting signal?

5.4.

QPSK Demodulator

Here a synchronous demodulator is been used for the process of BPSK demodulation.
Continue drawing the schematic diagram to demodulate the transmitted BPSK signal
as shown in the figure below.
Schematic for demodulating the generated BPSK signal

QPSK Signal

-Sine Wave

(Use the same carrier signals for the process of demodulation)


To design the Low-pass filter, follow the same instructions as above.
Finally run the model and observe the output wave form.
Q10. When observing the output waveform you will notice that the received waveform is no
longer rectangular in shape as in BPSK. Explain the reason.
Increase the bandwidth by changing the parameter values of Fpass and Fstop in order to
obtain the demodulator filter output waveform more equal to the transmitted bit sequence
same as above.

You might also like