联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2018-12-01 09:56

Assignment - Simulation of a Hamming-coded BPSK

System

Digital Communications (EEEN 3009J)

You are required to write, in MATLAB, a time domain simulation of a communication

system which uses coded binary phase shift keying (BPSK) modulation. The code used is

a (7, 4) linear block code called a Hamming code. The system model is shown in Figure 1

below. The channel model uses symbol rate sampling and the only channel impairment is

additive white Gaussian noise (AWGN).

BPSK

MODULATOR

AWGN

CODE

BITS

DATA

ESTIMATES

DATA BIT

ENCODER

HAMMING

DECODER

HAMMING

DEMODULATOR

(HARD DECISION)

BITS

Figure 1: Block Diagram of the Hamming-coded BPSK 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 =



Ink 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 bit error rate (BER) versus Eb/N0 curve for the system.

Plot BER on a log scale and Eb/N0 in dB.

On the same graph, plot the theoretical BER curve for uncoded BPSK.

From the curves, estimate the value of Eb/N0 above which the Hamming code offers

improved performance over an uncoded system, i.e., find the values of BER and Eb/N0

at which the two curves cross over each other.

From the curves find the coding gain (in dB) at a BER of 10 5

.

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.

The m-file script should be saved in the following format: yourfirstname_yourUCDID.m.

General comments about the methods you used and the results obtained should be

included in comments at the end of your program. Any other relevant points should

also be clearly indicated in the these comments.

The answers to the questions asked above should also be stated clearly as part of these

comments.

The working m-file, together with the relevant graphs of results, should be uploaded

via Blackboard.

The deadline is 5pm on Friday 30th November 2018.

2

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 be awarded 0 marks.

You may find the following MATLAB tips useful:

The function rand generates a random number which is uniformly distributed between

0 and 1. Thus for example, b = rand < 0.5 generates a random bit b.

The function randn generates a Gaussian-distributed random number with mean 0

and variance 1. Thus, multiplying this number by σ produces a Gaussian-distributed

random number with mean 0 and variance σ2.

The function semilogy(x,y) plots x against y, rather like plot(x,y), except that it

uses a log scale for the y-axis.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp