06.06.2022 Views

B. P. Lathi, Zhi Ding - Modern Digital and Analog Communication Systems-Oxford University Press (2009)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14.13 MATLAB Exercises 863

Exl4 3

r =

1 0 1 0 1 1 1

Syndrome Error Pattern

1 0 1 1 0 0 0 0 0 0

1 1 1 0 1 0 0 0 0 0

1 1 0 0 0 1 0 0 0 0

0 1 1 0 0 0 1 0 0 0

1 0 0 0 0 0 0 1 0 0

0 1 0 0 0 0 0 0 1 0

0 0 1 0 0 0 0 0 0 1

syndrome

1 0 0

error =

0 0 0 0 1 0 0

cword =

1 0 1 0 0 1 1

COMPUTER EXERCISE 14.2

In a more realistic example, we will use the Hamming (7,4) code to encode a long binary message bit

sequence. The coded bits will be transmitted in polar signaling over an additive white Gaussian noise

(AWGN) channel. The channel outputs will be detected using a hard-decision function sgn. The channel

noise will lead to hard-decision errors. The detector outputs will be decoded using the Hamming (7,4)

decoder that is capable of correcting 1 bit error in each codeword of length 7.

This result is compared against the uncoded polar transmission. To be fair, the average Eb/ JI/ ratio

for every information bit is made equal for both cases. MATLAB program Sim7 4Harnming . mis given;

the resulting BER comparison is shown in Fig. 14.25.

% Matlab Program <Sim7 4Harnming .m>

% Simulation of the Hamming (7,4) code performance

% under polar signaling in AWGN channel and performance

% comparison with uncoded polar signaling

clf; clear sigcw BER_uncode BER_coded

G= [l O O O 1 0 1 % Code Generator

0 1 0 0 1 1 1

0 0 1 0 1 1 0

0 0 0 1 0 1 1] ;

H= [l 1 1 0 1 0 0 % Parity Check Matrix

0 1 1 1 0 1 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!