Download presentation
Presentation is loading. Please wait.
Published byLouisa Hodge Modified over 9 years ago
1
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming codes § 6.4 Syndrome decoding §6.1.1 Error control system §6.1.2 classification of error correcting codes
2
§6.1.1 Error control system FEC HEC IRQ ARQ Automatic Repeat Request Forward Error Correction Hybrid Error Correction Information Repeat Request
3
§6.1.1 Error control system 1. ARQ (Automatic Repeat Request) Error detecting codeword verdict
4
§6.1.1 Error control system 1. ARQ (Automatic Repeat Request) 1 1 2 ACK1 2 х NAK2 2 2 ACK2 3
5
§6.1.1 Error control system 123451 12345 х NAK1 2345 123 67 х 4567 345 1. ARQ (Automatic Repeat Request)
6
§6.1.1 Error control system 123451 1234 х NAK1 6 7 х NAK4 4 5167 8 4 9 8 10 9 11 10 х 12 1. ARQ (Automatic Repeat Request)
7
Error correcting codeword §6.1.1 Error control system 2. FEC (Forward Error Correction)
8
codeword 3. HEC (Hybrid Error Correction) §6.1.1 Error control system verdict
9
messages 4. IRQ (Information Repeat Request) §6.1.1 Error control system
10
1. Classification Error correct Non-linear codes Linear codes Block codes Convolution -al codes Cyclic codes Non-Cyclic codes Correct random errors Correct burst errors Correct hybrid errors §6.1.2 classification of error correcting codes
11
linear codes and nonlinear codes 1. Classification §6.1.2 classification of error correcting codes
12
( 00 ) ( 10 ) ( 01 ) ( 11 ) messages ( 001 )( 010 )( 100 )( 111 ) forbidden words ( 000 ) codewords ( 110 )( 101 )( 011 ) (3,2) block codes Example 6.1.1 block codes and convolutional codes §6.1.2 classification of error correcting codes
13
in out (2,1,3)convolutional codes Example 6.1.2 block codes and convolutional codes The encoder for (3,2,2)convolutional codes §6.1.2 classification of error correcting codes
14
systematic codes and nonsystematic codes 1. Classification §6.1.2 classification of error correcting codes
15
Exercise:
17
2. Error detecting codes parity check codes horizontal parity check codes Example : m=1101001001110011110000111 C = 101101111000011100010110110111 C’ = ( transmitting by column ) 101101111100000110100010011011101110 phalanx check codes §6.1.2 classification of error correcting codes
18
2. Error detecting codes parity check codes horizontal parity check codes phalanx check codes group counting codes §6.1.2 classification of error correcting codes
19
2. Error detecting codes constant rate codes 1 0 1 0 1 0 1 0 §6.1.2 classification of error correcting codes
20
Review KeyWords: ARQ FECHECIRQ Linear block codes Convolutional codes systematic codes Error detecting codes
21
Homework 1.List all (3:4) constant weight codewords. 2. If phalanx check code has error pattern as follows, can it detect these errors?
22
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming codes § 6.4 Syndrome decoding § 6.2 Channel coding conception
23
1. General method for channel coding Channel encoder M=(m k-1, …,m 0 ) Redundant bits Rules (n>k)(n>k) C=(c n-1, …,c 0 ) § 6.2 Channel coding conception
24
2. Decoding methods C0C1┋Ci┋C2k-1C0C1┋Ci┋C2k-1 C0C1Ci┋Cj┋C2k-1C0C1Ci┋Cj┋C2k-1 C 2 k ┋ C i ’ ┋ C 2 n -1 Permitted codewords Forbidden vectors Permitted codewords Transmitter Receiver Transmission mode map
25
Decoding rules table: 2. Decoding methods § 6.2 Channel coding conception
26
Example 6.2.1 2. Decoding methods ( 4 , 2 ) decoding table 1000 0100 0010 0001 1101 1011 1111 0011 0101 0110 1010 1100 § 6.2 Channel coding conception
27
( 6 , 3 ) decoding table § 6.2 Channel coding conception 2. Decoding methods message code word one bit error two bits error
28
1) Code rate 3. Parameters of coding ( n , k ) codes: § 6.2 Channel coding conception Example 6.2.2 ( 23 , 12 ) BCH code: DVB-S2 ( 16200 , 10800 ) LDPC code:
29
Definition: The number of nonzero components in a codeword c. 2) Hamming weight § 6.2 Channel coding conception 3. Parameters of coding
30
3) Hamming distance Definition: The number of bit positions which are different between two codewords c and c’. § 6.2 Channel coding conception 3. Parameters of coding
31
4) Minimum hamming weight Definition: The minimum value of nonzero hamming weight in a code C. 0000100101111110 (4,2) code: w min =2 § 6.2 Channel coding conception 3. Parameters of coding
32
5) Minimum hamming distance Definition: The minimum value of hamming distance in a code C. 0000100101111110 (4,2)code: d min (C) = 2 § 6.2 Channel coding conception 3. Parameters of coding
33
Theorem 6.1: A code C={c 1, c 2, …, c M } is capable of detecting all error patterns of weight e iff d min (C) e + 1. § 6.2 Channel coding conception 3. Parameters of coding
34
Theorem 6.2: A code C={c 1, c 2, …, c M } is capable of correcting all error patterns of weight t iff d min (C) 2t + 1. (p147 theorem 7.2 in textbook) § 6.2 Channel coding conception 3. Parameters of coding
35
Review KeyWords: The method for coding rate Hamming weight, Capability of code (encoding and decoding) Minimum hamming weight Hamming distance, Minimum hamming distance (for detecting errors or for correcting errors )
36
Homework 1.P163: T7.22 ; 2. Let code C={ (000000), (001110), (010101), (011011), (100011), (101101), (110110), (111000)}. (1) calculate its minimum distance. (2) if it is used as error-detecting code, how many errors can it detect? (3) if it is used as error-correcting code, how many errors can it correct?
37
Homework 3. Let C be an (n,k) code with minimum distance d min, and let t≤e be nonnegative integers. Show that if d min ≥ e+t+1, the C is t-error-correcting, e-error-detecting. (that is to say the errors within t can be corrected and meanwhile the e (t≤e ) errors can be detected.)
38
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming codes § 6.4 Syndrome encoding §6.3.1 Definition of linear block codes §6.3.2 The generator matrix §6.3.3 The parity-check matrix
39
§6.3.1 Definition of linear block codes 1. Vector space Let K be a field, a vector space over K is a set V with a special element 0(the zero vector) and with a vector addition denoted ‘+’ with the expected properties. 0 + v = v + 0 for all v V (property of 0) v + w = w + v for all v,w V (commutativity) (u +v) + w = u + (v + w) for all u,v,w V (associativity) a(v +w) = av + aw for all v,w V, a K (distributivity) (a + b)v = av + bv for all v V, ab K (distributivity) a(bv) = (ab)v for all v V, ab K (associativity) 1*v = v for all v V (property of 1)
40
1. Vector space A linear combination of vectors v 1, …, v n in a vector space V with coefficients a 1,…, a n in the scalars K is the vector The vectors v 1,…,v n are linearly dependent if there is a set of coefficients a 1,…,a n not all zero such that the corresponding linear combination is the zero vector: Conversely, vectors v 1,…,v n are linearly independent if implies that all the coefficients a i are 0. §6.3.1 Definition of linear block codes
41
1. Vector space Proposition: Given a basis e 1,…,e n for a vector space V, there is exactly one expression for an arbitrary vector v V as a linear combination of e 1, …, e n. Definition: The dimension of a vector space to be the number of elements in a basis for it. §6.3.1 Definition of linear block codes
42
2. Linear block codes Example 6.3.1 §6.3.1 Definition of linear block codes
43
2. Linear block codes Example 6.3.1 C: D: §6.3.1 Definition of linear block codes
44
2. Linear block codes Definition: An (n, k) linear code over F q is a k-dimensional subspace of the n-dimensional vector space V n,k (F q )={(x 1,…,x n ): x i F q }; n is called the length of the code, k the dimension. The code’s rate is the ratio k/n. Encoder (p140 definition in textbook) §6.3.1 Definition of linear block codes
45
Example 6.3.2 2. Linear block codes Information sequence codewords (7,3) linear code §6.3.1 Definition of linear block codes
46
§6.3.2 The generator matrix 1. The generator matrix
47
§6.3.2 The generator matrix 1. The generator matrix Definition: Let C be an (n,k) linear code over F q. A matrix G whose row-space equals C is called a generator matrix for C. Conversely, if G is a matrix with entries from F q, its row-space is called the code generated by G. Example 6.3.3 A (5,1) linear code C 1 with generator matrix. G 1 = [1 1 1 1 1]. (p140 definition in textbook)
48
§6.3.2 The generator matrix 1. The generator matrix Example 6.3.4 A (5,3) linear code C 2 with generator matrix.
49
§6.3.2 The generator matrix 1. The generator matrix Example 6.3.2 (continued)
50
§6.3.2 The generator matrix 1. The generator matrix For systematic codes:
51
2. The encoder circuit of linear block codes §6.3.2 The generator matrix c6c6 c5c5 c4c4 c3c3 c2c2 c1c1 c0c0 m2m2 m1m1 m0m0
52
§6.3.3 The parity-check matrix 1. The parity-check matrix
53
§6.3.3 The parity-check matrix 1. The parity-check matrix
54
§6.3.3 The parity-check matrix 1. The parity-check matrix Definition: Let C be an (n,k) linear code over F q. A matrix H with the property that Hx T = 0 iff x C is called a parity-check matrix for C. (p142 definition in textbook)
55
2. Relationship of G and H §6.3.3 The parity-check matrix (7,3) linear code Example 6.3.2 (continued)
56
2. Relationship of G and H §6.3.3 The parity-check matrix For systematic linear codes: G = [I k | P] H = [P T | I n-k ]
57
3. Shortened codes and dual codes §6.3.3 The parity-check matrix 1) Shortened codes C 0 =( 0000000 ) C 4 =( 1001011 ) C 1 =( 0010111 ) C 5 =( 1011100 ) C 2 =( 0101110 ) C 6 =( 1100101 ) C 3 =( 0111001 ) C 7 =( 1110010 ) ( 7 , 3 ) linear block code : (6,2) shortened code : C 0 =( 000000 ) C 1 =( 010111 ) C 2 =( 101110 ) C 3 =( 111001 ) Example 6.3.5
58
3. Shortened codes and dual codes §6.3.3 The parity-check matrix 1) Shortened codes
59
3. Shortened codes and dual codes §6.3.3 The parity-check matrix 2) Dual codes Example 6.3.5 (continued ) (7,4)
60
Overview KeyWords: Linear block code The generator matrix The parity-check matrix Shortened codes and dual codes
61
Homework 1. p159: T7.2 (a),(b) 2. A (7,4)linear code has generator matrix as follows: (a)Plot the encoder circuit. (b)Find its parity-check matrix H.
62
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming codes § 6.4 Syndrome decoding §6.4.1 Standard array decoding §6.4.2 Syndrome decoding
63
§6.4.1 Standard array decoding 1. The standard array Set of codewords x(0)x(0) x(1)x(1) x(2)x(2) x ( 2 k -1 ) (00…0) … Subset … m0m0 m1m1 m2m2 m 2 k -1 Forbidden vectors E1E1 E1+x(1)E1+x(1) E1+x(2)E1+x(2) E 1 +x ( 2 k -1 ) … E2E2 E2+x(1)E2+x(1) E2+x(2)E2+x(2) E 2 +x ( 2 k -1 ) … E 2 n-k -1 E 2 n-k -1 +x ( 1 ) E 2 n-k -1 +x ( 2 ) … E 2 n-k -1 +x ( 2 k -1 )
64
§6.4.1 Standard array decoding 1. The standard array Example 6.4.1:(4,2)linear code Forbidden codewords 1000111100100101 0100001111101001 0001011010111100
65
§6.4.1 Standard array decoding 2. The characters of standard array The sum vector of two vectors in the same row is a codeword in the set of C. There are not the same n-dimensional vectors in the same row. Each n-dimensional vector exists only in one row. Theorem 6.4 Each (n,k) linear code is capable of correcting all of 2 n-k error patterns. (Prove it by yourself)
66
§6.4.1 Standard array decoding Example 6.4.2
67
§6.4.2 Syndrome decoding 1. Syndrome vector R=x+E xH T =0 S=RH T =(s n-k-1 …s 1 s 0 ) =EH T
68
§6.4.2 Syndrome decoding 1. Syndrome vector Theorem 6.5 2 k codewords in each coset have the same syndrome, and different coset with different syndrome. Example 6.4.1 ( continued ) (Prove it by yourself)
69
§6.4.1 Standard array decoding Example 6.4.2 ( continued )
70
§6.4.2 Syndrome decoding 2. Syndrome decoding Example 6.4.3: ( 4 , 2 ) linear code syndrome decoding Step1 : Computing the syndrome S=RH T Step2 : getting E by S 令 E = ( e 3 e 2 e 1 e 0 ) , Step3 :
71
S0S0 R=(r 3 r 2 r 1 r 0 ) c0c0 c1c1 c2c2 c3c3 r0r0 r1r1 r2r2 r3r3 S1S1 e0e0 e2e2 e3e3 Output in series x=R+E ^ §6.4.2 Syndrome decoding 2. Syndrome decoding
72
r0r0 r1r1 r n-1 s0s0 s1s1 s r-1 e0e0 e1e1 e n-1 c0c0 c1c1 c n-1 A general decoding circuit of (n,k) linear codes S=RH t S=EHtS=EHt ^ x=R+Ex=R+E Received vectors storage Compute syndrome circuit Error pattern generator n-step shift-register output §6.4.2 Syndrome decoding
73
Overview KeyWords: Syndrome decoding Standard array decoding
74
Homework 1. p159: T7.2 (c),(e) 2. p159: T7.6 3. p159: T7.8 4. Give the standard array of (7,4) linear code with a parity matrix as follows:
75
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming codes § 6.4 Syndrome decoding
76
1. Relationship between H and S §6.5 Hamming codes Example 6.5.1: (7,3)linear code E = (e 6 e 5 e 4 e 3 e 2 e 1 e 0 ) S=RH T = EH T
77
1. Relationship between H and S §6.5 Hamming codes
78
1. Relationship between H and S S is the linear combination of columns of H according to nonzero codebits in E. §6.5 Hamming codes
79
1. Relationship between H and S (p147 Theorem 7.3 in textbook) §6.5 Hamming codes Theorem 6.6 If all possible linear combinations of ≤ t columns of H are distinct, then d min (C) ≥ 2t + 1, And so C can correct all error patterns of weight ≤ t. (p148 Corollary in textbook) Corollary If C is an (n,k) linear code with parity- check matrix H, d min (C) = the smallest number of columns of H that are linearly dependent. Hence if every subset of 2t or fewer columns of H is linearly independent, the code is capable of correcting all error patterns of weight ≤ t. Corollary : For a linear block code C(n, k) completely determined by its parity check matrix H, the minimum weight or minimum distance of this code is equal to the minimum number of columns of that matrix which when added together result in the all-zero vector. Corollary : Let a linear block code C have a parity check matrix H. The minimum distance d min of C is equal to the smallest positive number of columns of H which are linearly dependent. That is, all combinations of d min - 1 columns are linearly independent, so there is some set of d min columns which are linearly dependent.
80
2. Some bounds on error correcting codes Theorem 6.7 The minimum distance for an (n, k) linear code is bounded by d min (C)≤n-k+1. Theorem 6.8 Let C is an (n,k) linear code, A t-random error correcting code C must have redundancy r(=n-k) satisfying: §6.5 Hamming codes
81
3. Hamming codes Definition: Let H be an m ╳ (2 m -1) binary matrix such that the columns of H are the 2 m -1 nonzero vectors from V m (F 2 ) in some order. Then the n=2 m -1, k=2 m -1-m linear code over F 2 whose parity-check matrix is H is called a (binary) Hamming code of length 2 m -1. (p149 Definition in textbook) §6.5 Hamming codes Length: n = 2 m − 1 Number of information bits: k = 2 m − m − 1 Number of parity check bits: n − k = m Error-correction capability: t = 1, (d min = 3)
82
Example 6.5.2 : n=7 ( 7 , 4 ) hamming codes 1+2→11+2→1 1+3→21+3→2 1+2+3→11+2+3→1 §6.5 Hamming codes
83
Encoding circuit §6.5 Hamming codes 3. Hamming codes
84
Decoding circuit §6.5 Hamming codes 3. Hamming codes
85
Overview KeyWords: Hamming codes The singleton bound The Hamming bound H, S, d min, t
86
Homework 1. p161: T7.17 2. p163: T7.23
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.