* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download EET 465 LAB #2 - Pui Chor Wong
Linear least squares (mathematics) wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Determinant wikipedia , lookup
System of linear equations wikipedia , lookup
Matrix (mathematics) wikipedia , lookup
Four-vector wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Jordan normal form wikipedia , lookup
Orthogonal matrix wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Gaussian elimination wikipedia , lookup
Matrix calculus wikipedia , lookup
EET 465 LAB #2
Linear Block Code
Introduction
An (n,k) block code is completely defined by M = 2k binary sequences each of fixed
length n.
Each of the sequences of fixed length n is referred to as a code word. k is the number of
information bits.
The Code C thus consists of M code words
C = {c1, c2, c3, c4, …cM}
Practical codes are normally block codes. A block code converts a fixed length of k data
k
bits to a fixed length n codeword, where n > k. The code rate Rc is: Rc , and the
n
k
redundancy of the code is 1 .
n
Generator and Parity check Matrices
The output of a linear binary block encoder (i.e a codeword ) for an (n,k) linear block
code, is a linear combination of a set of k basis vectors, each of length n, denoted by g1,
g2, …..gk.
The vectors g1, g2, …..gk are not unique.
From linear algebra, the basis vectors, g1, g2, …..gk, can be represented as a matrix G
defined as:
g
1
g 2
G
g k
The k-by-n G matrix is called the generator matrix.
Since the vectors g1, g2, …..gk are not unique, the matrix G is also not unique. The G
matrix has the property that any linear combination of the rows is a code word
In an (n,k) linear block code let the code word corresponding to an input information
sequence Xm be denoted by Cm.
Example
1000110
0100011
0000000
0000
0010111
0001101
1000110
0100011
0001101
0001
0010111
0001101
1000110
0100011
0010111
0010
0010111
0001101
1000110
0100011
0010111 0001101 0011010
0011
0010111
0001101
Parity Check Matrix
Take the Parity matrix in the Generator matrix and transpose it, add an addition
Identity matrix:
1011 100
H 1110 010
0111 001
110
011
111
101
T
H
100
010
001
The transpose of the Parity Check Matrix can now be used as it is a 7×3 matrix:
110
011
111
0001101 101 101 100 001 000 ,
100
010
001
a zero vector indicate the codeword with a valid parity check.
Syndrome
In general we know with successful parity check, cHT should be zero. Since error
is added due to noise to the codeword, the received codeword r=c+e is the
codeword to go through parity check:
rHT=(c+e)HT=cHT+eHT using matrix operations
The results is called the syndrome
Due to the fact that cHT is zero, the syndrome becomes eHT.
Error in each bit position generates a different syndrome:
110
011
111
0000001 101 001
100
010
001
110
011
111
0000010 101 010
100
010
001
110
011
111
0000100 101 100
100
010
001
Purpose of the lab:
1. Given the following generator matrix:
1000110
0100011
G
0010111
0001101
write a matlab function:
function codeword=lbc_gen(message)
% This is my 7,4 linear block code generator function
%
...
based on the generator matrix G given.
test your function with a few message as done in class.
2. Create another function using the parity check matrix H to determine the
syndrome of the received codeword:
function syndrome=syndrome_gen(codeword)
% This is my 7,4 linear block code syndrome generator function
%
...
3. Determine the function which will correct the error in the received codeword
based on the syndrome.
4. Report with screenshots to describe any finding and suggest another
generator matrix G which is different from the one used in this lab.