LAB 7: 16QAM Transmitting Modem

 

In digital communication over a wireless medium, the received signal is given as:

 

where and are the received signal and the channel coefficient vectors at the L branches, d (i) is the data symbol that was transmitted, and n (i) is an additive white Gaussian noise (AWGN) L*1 vector with auto-correlation . For our simulation the transmitted signal will be modulated by 16-Quardrature Amplitude modulated (16QAM) scheme. Below is a quick tutorial of M-ary Phase Shift keying (MPSK) modulation schemes.

 

 

A Quick Tutorial on M-ary PSK Digital Transmission:

 

The waveform of the transmitted signal can be defined as:

 

where ; and

To modulate the carrier signal we could modulate A, fc, or q (t); which are the amplitude, center frequency and phase of the signal, respectively. In PSK-based transmission we modulate the phase of the signal.

 

BPSK:

 

The figure below describes how the BPSK modulated scheme works:

 

 

 

We see that the a digital signal of 0 is converted to the phase p , and 1 is converted to the phase 0.

QPSK:

 

 

 

A QPSK is modeled by two BPSK signals. We are able to identify the two different signals by using two orthogonal signals [1]. The first is given by , and the other by . Using and , we can represent the signal as:

 

[1]

where the channel for is called the in-phase channel ( Ich), and the channel for is called the quardrature-phase channel (Qch) [1]. Consequently, Modulation schemes that use the Ich and Qch are defined as quardrature modulation schemes [1].

QAM:

 

 

In M-ary PSK modulation, the amplitude of the signal was forced to remain constant, resulting in the circular constellation. A reason that Quadrature amplitude modulation (QAM) is also know as Amplitude-phase shift keying (APK), is because the amplitude is also allowed to vary with the phase. The signal can now be written as the equation in the diagram above.

 

 

Procedure:

Setting up for Data Visualization

 

This part of the tutorial will examine the capabilities of Code Composer Studio beyond the "traditional" scope of mainstream debuggers. Sample data will be used to test the execution of an algorithm and how such investigation lends insight into the operation of DSP code on target systems.

DSP applications are usually quite data-specific and therefore difficult to debug through exclusive use of the stepping/watching capability discussed in Developing a Simple Program. One of the best methods of debugging code is through the use of sample data by observing and investigating the effect of the data on your code. Because of the application-specific nature of DSP code, input files containing sample data can provide a more functional representation of the algorithm by permitting the developer to observe how known data is changed by the code they have written.

For your convenience, the Modem application has been set up as a Code Composer Studio Project. Before you start building a Data Visualization Diagram, you need to open the project and define a Probe Point and input data for the diagram:

  1. Copy all of the Lab 7 files to U:\Faith\modem (create a file named modem).
  2. From the Project menu, choose Open.
  3. Browse to U:\Faith\modem\modem.pjt and click Open.
  4. From the Project menu, choose Build Options. Select the Compiler tab. Make sure the optimization level is set to "None".
  5. From the Project Menu, choose Rebuild All.
  6. From the File menu, choose Load Program. Browse to U:\modem\Debug\. Select modem.out and click Open.
  7. From the Debug menu, choose Go Main.
  8. Open modemtx.C and Right-click in the line of the following function (line 335):

ReadNextData();

  1. From the pop-up dialog, choose Toggle Breakpoint.
  2. From the Debug menu, choose Run.
  3. Right-click on the ReadNextData(); function and choose Toggle Probe Point.
  4. From the File menu, select FileI/O.
  5. On the File Input tab, select Add File.
  6. From the File Input window, select pseudo.dat and click Open.
  7. In the Address field, type: g_ModemData.dataSymbols.
  8. In the Length field, type 1.
  9. Check the Wrap Around check box.
  10. On the File Input tab, select Add File.
  11. From the File Input window, select gauss32.dat and click Open.
  12. In the Address field, type: g_ModemData.cNoise.
  13. In the Length field, type 2.

Your File I/O dialog should look something like this:

Now let's connect a Probe Point to the data file.

  1. In the File I/O dialog, select gauss32.dat and click Add Probepoint.
  2. Select the Probe Point tab and click on the line that says modemtx.c line 335 --> No Connection.
  3. In the Connect to list, select FILE IN: gauss32.dat.
  4. Select Replace.
  5. Click OK.
  6. In the File I/O dialog, select pseudo.dat, and click Add Probepoint.
  7. Select the Probe Point tab and click on the line that says modemtx.c line 335 -->.
  8. In the Connect to list, select FILE IN: pseudo.dat.
  9. Select Add.
  10. Click OK to save the changes and dismiss the File I/O dialog.

Amplitude vs Time Diagram

CCS - L5

Next, you will create an Amplitude vs. Time Diagram for the in-phase delay line which holds the modulation shaping filter.

  1. From the View menu, choose Graph Time/Frequency.
  2. Fill in the Graph Property Dialog with the information in the following image:

New_integer_value = integer/2Q-Value

 

New_integer_value = integer/2Q-Value

 

  1. Click OK to save your input and create the Amplitude vs. Time diagram. It should look something like this:

Now let's Animate the Diagram by connecting it to a data source.

  1. From the Debug menu, choose Probe Points.
  2. From the Probe Point list, select one of the lines that reads MODEMTX.C line 335 -->.
  3. In the Connect To field, choose In Phase Delay Line and click Add.
  4. Click OK to save your input and close the dialog box.
  5. From the Debug menu, choose Animate, or click on the Animate shortcut on the tool bar.

The In Phase Delay Line Graph should now look something like this:

 

Eye Diagram

CCS - L5

In this part of the lesson, you will create an Eye Diagram.

  1. From the View menu, choose Graph Eye Diagram.
  2. Fill in the Graph Property Dialog with the information in the following image:

  1. Click OK to save your input and create the Eye diagram. It should look something like this:

Now let's Animate the Eye Diagram by connecting it to a data source.

  1. From the Debug menu, choose Probe Points.
  2. From the Probe Point list, select one of the lines that reads MODEMTX.C line 335 -->.
  3. In the Connect To field, choose Eye Diagram and click Add.
  4. Click OK to save your input and close the dialog box.
  5. From the Debug menu, choose Animate, or click on the Animate shortcut on the tool bar.

The Eye Diagram should now look something like this:

Eye diagrams are also used to qualitatively examine signal fidelity. Incoming signals are continuously superimposed upon each other within a specified display range and the result becomes an "eye shape". The periodicity of the signal is shown in a time fashion by plotting the signal in a serial manner and wrapping it around when a Zero-Crossing is detected. The resulting eye diagram provides us with a great deal of information about the performance of our system, namely:

In this case, you have set up two signal sources that are used to generate an eye diagram – Trigger Source (g_ModemData.SymbolClock variable) is an ideal representation of a signal against which our Data Source (g_ModemData.Idelay variable) signal values are measured. Data Source signal is wrapped around to the beginning of our display frame (size of which is defined by Display Length) whenever Trigger Source crosses the Zero-Crossing (set in Trigger Level as 0 in our case) and the Minimum Interval Between Triggers is exceeded. Persistence Size contains the number of samples in history that the graph will display

 

Eye diagrams are also used to qualitatively examine signal fidelity. Incoming signals are continuously superimposed upon each other within a specified display range and the result becomes an "eye shape". The periodicity of the signal is shown in a time fashion by plotting the signal in a serial manner and wrapping it around when a Zero-Crossing is detected. The resulting eye diagram provides us with a great deal of information about the performance of our system, namely:

In this case, you have set up two signal sources that are used to generate an eye diagram – Trigger Source (g_ModemData.SymbolClock variable) is an ideal representation of a signal against which our Data Source (g_ModemData.Idelay variable) signal values are measured. Data Source signal is wrapped around to the beginning of our display frame (size of which is defined by Display Length) whenever Trigger Source crosses the Zero-Crossing (set in Trigger Level as 0 in our case) and the Minimum Interval Between Triggers is exceeded. Persistence Size contains the number of samples in history that the graph will display.

Constellation Diagram

CCS - L5

In this part of the lesson, you will create a Constellation Plot Diagram.

  1. From the View menu, choose GraphConstellation.
  2. Fill in the Graph Property Dialog with the information in the following image:

 

  1. Click OK to save your input and create the Constellation Plot diagram. It should look something like this:

Now let's Animate the Constellation Plot by connecting it to a data source.

  1. From the Debug menu, choose Probe Points.
  2. From the Probe Point list, select one of the lines that reads MODEMTX.C line 335 -->.
  3. In the Connect To field, choose Constellation Plot and click Add.
  4. Click OK to save your input and close the dialog box.
  5. From the Debug menu, choose Animate, or click on the Animate shortcut on the tool bar.

The Constellation Plot should now look something like this:

Constellation plot is used as one of the most effective measures of signal noise detection. As such, it plays an important role in telecommunications applications of DSP code in general and is thus used as a noise detector for our modem application. The input signal is separated into two components and the resulting data is then plotted with time using the Cartesian coordinate system. Toggling Interleaved Data Sources to "On" allows us to make this Cartesian "separation" possible. System noise perturbations can be seen with constellation points being plotted in a non-uniform manner. We can thus effectively picture signal noise as the "offset" causing the expected (theoretical) message point to be different from the (actual) received signal point in the constellation plot.

In this case, you are plotting the constellation points that are created as part of the source code – we are thus working on a per-sample basis (hence Acquisition Buffer set to 1) and are creating a plot using a maximum of 1024 constellation points (Constellation Points setting).

Fast Fourier Transform (FFT) Diagram

CCS - L5

In this part of the lesson, you will create a Fast Fourier Transform (FFT) Diagram.

  1. From the View menu, choose GraphTime/Frequency.
  2. Fill in the Graph Property Dialog with the information in the following image:

  1. Click OK to save your input and create the FFT diagram. It should look something like this:

Now lets Animate the FFT Waterfall by connecting it to a data source.

  1. From the Debug menu, choose Probe Points.
  2. From the Probe Point list, select one of the lines that reads MODEMTX.C line 335 -->.
  3. In the Connect To field, choose FFT Waterfall and click Add.
  4. Click OK to save your input and close the dialog box.
  5. From the Debug menu, choose Animate, or click on the Animate shortcut on the tool bar.

The FFT Waterfall should now look something like this:

FFT Waterfall is a magnitude vs. frequency plot of the signal, formed by performing an FFT (Fast Fourier Transform) on the data contained in the Display Buffer and then plotted as a frame. A chronological series of these frames forms an FFT waterfall graph. For more information on FFT and its implementation, please refer to any text covering DSP theory. In this case, we are plotting the FFT with respect to time of the g_ModemData.OutputBuffer variable, based on settings which include the following:

 

Questions/ Exercises:

 
    1. Explain, in detail, the operation/purpose of each function in the modemtx.c file. Describe what role they play in a wireless communications link.
    2. What does the pseudo.dat and the gauss32.dat represent, in the received signal of a wireless channel?
    3. What is the exact purpose of the Shaping Filter?
    4. Looking at the constellation diagram, does that correlate with the constellation points for 16QAM ? Give a reason for your answer.
    5. If you were to increase your noise volume, what happens to the eye diagram? Why does this happen?
    6. How would you modify the code to create a QPSK digital transmission system? Indicate what sections you would have to change.

 

References:

[1] Harada, Hiroshi; Prasad, Ramjee, 'Simulation and Software Radio for mobile communications', Artech House, 2000.

[2] Dickerson, Julie; EE 422, http://www.eng.iastate.edu/ee423/ee422.htm.