# 辅导案例-16-QAM-Assignment 2

Assignment 2 - Simulation of a Hamming-coded
16-QAM System
Digital Communications, EEEN3009J, Autumn 2020/21
You are required to write, in MATLAB, a time domain simulation of a communication
system which uses coded 16-QAM modulation. The code used is a (7, 4) linear block code
called a Hamming code. The system model is shown in Figure 1. The channel model uses
symbol rate sampling and the only channel impairment is additive white Gaussian noise
(AWGN).
Figure 1: Block Diagram of the Hamming-coded 16-QAM system to be simulated.
The (7, 4) Hamming code has the following generator matrix:
G =
(
P Ik
)
=

1 1 0 1 0 0 0
0 1 1 0 1 0 0
1 1 1 0 0 1 0
1 0 1 0 0 0 1
 . (1)
Note that the matrix G is in systematic form. Therefore, from class notes, the parity-check
matrix is given by H =
(
In−k P T
)
. Given that the received vector may be written as
r = c + e, where c denotes the transmitted codeword and e the error vector, decoding of
this code proceeds by using the received vector r to form the syndrome s = rHT = eHT .
The maximum-likelihood error vector e may then be identified via Table 1 below.
1
Table 1: Decoding table for the (7, 4) Hamming code.
Syndrome s Error Vector e
000 0000000
001 0010000
010 0100000
011 0000100
100 1000000
101 0000001
110 0001000
111 0000010
The following are the requirements:
• Use your simulation to plot the symbol error rate (SER) versus Es/N0 curve for the
system. Plot SER on a log scale and Es/N0 in dB.
• Then, on the same graph, plot the theoretical SER curve for the system. To do this,
you will need to derive an expression for the probability of symbol error for this system
as a function of Es/N0.
• From the curves, estimate the value of Es/N0 above which the Hamming code offers
improved performance over an uncoded system, i.e., find the values of SER and Es/N0
at which the two curves cross over each other.
• From the curves find the coding gain (in dB) at a SER of 10−4.
• Your program should consist of a single m-file script, and should be appropriately
annotated with comments. You should not use any procedures from the MATLAB
communications toolbox.
• Your assignment should be submitted via Brightspace, and should contain two files:
(a) Your MATLAB simulation m-file, and
(b) A short report (in PDF format) containing the system performance graphs
mentioned above. A brief commentary about the methods you used and the
results you obtained should also be included in this report. The answers to the
specific questions asked above should also be stated clearly in your report.
• The deadline is 11:30 pm (Dublin time) on Friday 20 November 2020.
• And most importantly: The program you submit should be your own work.
Programs will be scrutinized for evidence of copying. Programs in which copying is
found will NOT be awarded a pass grade.
2  Email:51zuoyejun

@gmail.com