Personal tools
•
You are here: Home BPSK/QPSK Modulation and Demodulation

BPSK/QPSK Modulation and Demodulation

Objective

The objective of this lab is to learn about BPSK and QPSK by building a QPSK modulator and demodulator.

Building the QPSK Modulator and Demodulator

2. Open up your final model from Lab 6.  The essential elements in this model are:
• Binary source
• Look up table for converting bits to symbols
• Impulse generator (upsample block)
• Pulse generator (transmitter pulse filter)
• Additive white Gaussian noise channel
• Delay block (implemented by a filter)
• The linear receiver (implemented by a matched filter and a downsample block)
3. In this lab, we want to build a QPSK modulator.
4. Use the "Save as..." option in the file menu to create a new copy of your linear receiver model. Use the new copy as the starting point in this lab to create your QPSK modulator and demodulator.  Starting in this way, you will already have most of the blocks that you need for this lab.
5. Replace the Bernoulli Binary Generator in your model with a Random Integer Generator
• Comm Blockset -> Comm Sources -> Data Sources -> Random Integer Generator
6. Set the M-ary Number in the Random Integer Generator parameter dialog to 4 as shown below.

7. The Random Integer Generagor block is now configured to output the numbers 0, 1, 2, and 3 at random.  Think of this block as the source.  Instead of generating pairs of bits (00), (01), (10), and (11) it generates the integers 0, 1, 2, and 3.  We can use 0, 1, 2, and 3 in a look table to generate symbols as easily as we can the bit patterns.  Let's define the look up table next.

8. Change the Look-Up Table to reflect the QPSK symbols as shown below.

9. Why is there a scaling involving the sqare root of 2?
10. Now build the rest of the modulator, the AWGN channel and the demodulator.  An example follows.

11. This figure is color coded as follows.

• Orange - baseband pulse modulation
• Red - double balanced modulator used to create the bandpass quadrature modulated signal
• Green - additive white gaussian noise channel
• Red - another double balanced modulator to bring the signal back to baseband
• Magenta - filters to remove the double frequency components
• Blue - matched filters followed by symbol rate sampling
• Yellow - delay filters to compensate for the delay through the low-pass filters that removed the double frequency (Delay filters are necessary in order to make the eye diagram and the scatter plot look right.
12. Use a bit rate of 20,000 bits per second.
13. What is the symbol rate?  Use this rate to set the sample time in the Random Integer Generator.
14. After the look-up table, upsample by a factor of 100 as shown in the above figure.
15. After upsampling, what is the sample rate?  Use this sample rate to set the sample time in the Gaussian Noise Generator and the four Sine Wave blocks.
16. In the Gaussian Noise Generator, set the mean value to zero and the variance to a very small number (like 10^(-7)).
17. Generate a square-root Nyquist pulse such as a square-root RC pulse to serve as the impulse response of the transmitter pulse shaping filter that will be used in the I and Q branches.  Use the same filter as the matched filter at the receiver.
18. Use a carrier frequency of 100,000 Hz.
19. Set the frequency and phase in all four Sine Wave blocks.
20. Design the low-pass filter (using remez) to use at the receiver to remove the double frequency terms.  What frequencies mark the edge of the transition between pass and stop bands?
21. Set the impulse response of the delay filters to compensate for the delay of the low-pass filter.
22. Insert Eye Diagram blocks before and after the matched filters in the receiver.
23. Insert a Sactter Plot block after the downsampler.
24. Run 0.015 seconds of simulation.  This will pass 150 symbols through the system.
25. Your eye and scatter plots should look something like this.
26.

You can see the constellation showing up perfectly.  Of course, I didn't scale my pulses to have unit energy.  The eye diagram at the output of the matched filter is also fully open because we used a square-root Nyquist (shift-orthogonal) pulse.

27. Use Signal To Workspace blocks to extract the following signals.
• The in-phase signal at baseband
• The in-phase signal after modulation by cos at the receiver but before the low-pass filter
• The in-phase signal after modulation by cos and the low-pass filter at the receiver
Plot the spectra of these signals in Matlab using the sigspec function.

28. Next add 0.3 radians to the phases of the cos and sin blocks at the receiver.  This simulates demodulating with the wrong carrier phase.  Run the simulation again.  The MF output eye diagram and the scatter plot shold look like this.
29.

30. Explain the relationship between the eye diagram at the MF output and the scatter plot.  Why is the scatter plot rotated?
31. Now add some noise to the simulation.  Set the  variance in the Gaussian Noise Generator to 1.  Run the simulation.  They eye and scatter plots should look something like this.
32.

33. Describe the effect of noise on the scatter plot and the eye diagram.
34. How would you modify your model if you were running a BPSK simulation?
Copyright 2008, by the Contributing Authors. Cite/attribute Resource . admin. (2006, June 28). BPSK/QPSK Modulation and Demodulation. Retrieved January 07, 2011, from Free Online Course Materials — USU OpenCourseWare Web site: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Communication_Systems_I_1/lab7.html. This work is licensed under a Creative Commons License