22.01.2014 Views

Channel Coding – Exercise I

Channel Coding – Exercise I

Channel Coding – Exercise I

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Channel</strong> <strong>Coding</strong> – <strong>Exercise</strong> I<br />

Hochschule Wismar, University of Technology, Business and Design, Prof. Dr.-Ing. habil. A. Ahrens<br />

Baltic Summer School 2008, Tartu, Estonia, 08.08.–23.08.2008<br />

<strong>Exercise</strong> 1<br />

Hadamard-code<br />

a) Hadamard-codes belong to the class of linear block codes. The field of code words C<br />

of a Hadamard-code can be generated in matlab with the command hadamard(M)<br />

with M possible code words. The code words have the length n = M. Note, that the<br />

result doesn’t consist of zeroes and ones, but of the symbols ’+1’ and ’-1’. Generate<br />

a Hadamard-code for M = 8 and determine its distance properties A(D).<br />

b) For coding a group of m = 3 information bits is mapped on one out of M = 8<br />

code words. The 3-bit-words are for the present converted into decimal numbers<br />

that are applied for the addressing by the matlab-command bi2de (requires the<br />

communications toolbox). Alternatively, decimal numbers in the range of 1 up to M<br />

can be chosen by random and converted into 3-bit-words with the command de2bi.<br />

Determine the IOWEF A(W, D) of the coder.<br />

<strong>Exercise</strong> 2<br />

Error correction<br />

Given is a (n, m) block code with the minimal distance h min = 8.<br />

a) Determine the maximal number of correctable errors and the number of detectable<br />

errors at pure error detection.<br />

b) Demonstrate by illustration in the field of code words, how many possibilities of<br />

variation of a code word have to be taken into consideration at the transmission<br />

over a disturbed channel.<br />

<strong>Exercise</strong> 3<br />

Generator and parity check matrices<br />

State the generator matrix as well as the parity check matrix for a (n, 1, n) repetition<br />

code with n = 4.


<strong>Exercise</strong> 4<br />

Modification of linear block codes<br />

A (5, 4) linear block code is constructed by adapting a (7, 4) block code. The (7, 4) code<br />

can be described by the following generator matrix<br />

⎛<br />

⎞<br />

0 1 0 1 1 0 0<br />

G = ⎜ 1 0 1 0 1 0 0<br />

⎟<br />

⎝ 0 1 1 0 0 1 0 ⎠ .<br />

1 1 0 0 0 0 1<br />

a) Construct the codewords of the (5, 4) code and list them!<br />

b) What is the minimum distance of the (5, 4) code!<br />

<strong>Exercise</strong> 5<br />

Syndrome decoding<br />

a) State the number of syndromes of the (7, 4, 3)-Hamming code and compare it with<br />

the number of correctable error patterns.<br />

b) The word d = (1 1 0 1 0 0 1) is found at the receiver. Which information word i was<br />

sent with the greatest probability?<br />

<strong>Exercise</strong> 6<br />

<strong>Coding</strong> program<br />

Write a matlab-programm which codes and again decodes a certain number of input<br />

data bits. Besides it shall be possible to insert errors before the decoding. The (5, 2, 3)-<br />

Hamming code shall be used.<br />

Hint: The (5, 2, 3)-Hamming code maps m = 2 information symbols onto n = 5 code<br />

symbols. Within the matlab-program, m information symbols are randomly chosen using<br />

randint and encoded by the generator matrix. A randomly determined error vector is<br />

added and the syndrome is calculated. Please notice: all calculations have to be executed<br />

within GF (2).


<strong>Channel</strong> <strong>Coding</strong> – <strong>Exercise</strong> II<br />

Hochschule Wismar, University of Technology, Business and Design, Prof. Dr.-Ing. habil. A. Ahrens<br />

Baltic Summer School 2008, Tartu, Estonia, 08.08.–23.08.2008<br />

<strong>Exercise</strong> 7<br />

Convolution code<br />

Given is a convolution code with the code rate R = 1/3, memory (K − 1) = 2 and the<br />

generator polynomials g 1 (x) = 1 + x + x 2 and g 2 (x) = 1 + x 2 and g 3 (x) = 1 + x + x 2 .<br />

a) Determine the output sequence for the input sequence i = (0 1 1 0 1 0).<br />

b) Sketch the corresponding Trellis chart in the case of the under a) given input sequence.<br />

c) Sketch the state diagram of the encoder.<br />

d) Determine the corresponding free distance h free .<br />

<strong>Exercise</strong> 8<br />

Catastrophic codes<br />

Given is the convolution code with the generator polynomial g(x) = (1 + x 2 , 1 + x). Show<br />

that this is a catastrophic code and explain the consequences.<br />

<strong>Exercise</strong> 9 Puncturing of convolution codes of the rate 1/n<br />

Given is the non-recursive convolution code with the generators g 1 (x) = 1 + x + x 3 and<br />

g 2 (x) = 1 + x + x 2 + x 3 . The non-recursive convolution code shall now be punctured to<br />

the code rate R = 2/3. Give several puncturing patterns and find out, if the puncturing<br />

results in a catastrophic code.


<strong>Exercise</strong> 10<br />

Viterbi-decoding<br />

Given is a convolution code with g 1 (x) = 1+x+x 2 and g 2 (x) = 1+x 2 , where a terminated<br />

code shall be used.<br />

a) Generate the corresponding Trellis and encode the information sequence i = (1101).<br />

b) Conduct the Viterbi-decoding respectively for the transmitted code sequence c =<br />

(110101001011) and for the two disturbed receiving sequences d 1 = (111101011011)<br />

and d 2 = (11 11 10 01 10 11) and describe the differences.<br />

c) Check the results with the help of a Matlab-program. Define the convolution code<br />

with G=[7;5], r flag=0 and term=1, generate the trellis diagram with trellis =<br />

make trellis(G,r flag) and sketch it with show trellis(trellis). Encode the<br />

information sequence i with c = conv encoder (i,G,r flag,term) and decode<br />

this sequence with<br />

viterbi omnip(c,trellis,r flag,term,length(c)/n,1).<br />

Decode now the sequences d 1 and d 2 .<br />

d) Now the influence of the error structure at the decoder input shall be examined.<br />

Therefor specifically add four errors, that you once arrange bundled and another<br />

time distributed in a block, to the encoded information sequence. How does the<br />

decoding behave in both cases?<br />

<strong>Exercise</strong> 11<br />

Viterbi-decoding with puncturing<br />

Given is a convolution code with g 1 (x) = 1 + x + x 2 and g 2 (x) = 1 + x 2 , out of which shall<br />

be generated a punctured code by puncturing with the scheme<br />

P 1 =<br />

( 1 1 1 0<br />

1 0 0 1<br />

)<br />

.<br />

a) Determine the code rate of the punctured code.<br />

b) Conduct the Viterbi-decoding in the case of the undisturbed receiving sequence<br />

d = (1 1 0 0 0 1 0 1) (pay attention to the puncturing!).

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

Saved successfully!

Ooh no, something went wrong!