1 / 48

Chapter 4 Channel Coding and Error Control

Chapter 4 Channel Coding and Error Control. 曾志成 國立宜蘭大學 電機工程學系 tsengcc@niu.edu.tw. Antenna. Information to be transmitted. Source coding. Channel coding. Transmitter. Modulation. Air. Antenna. Information received. Source decoding. Channel decoding. Receiver. Demodulation.

tess
Download Presentation

Chapter 4 Channel Coding and Error Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4Channel Coding and Error Control 曾志成 國立宜蘭大學 電機工程學系 tsengcc@niu.edu.tw EE of NIU

  2. Antenna Information to be transmitted Source coding Channel coding Transmitter Modulation Air Antenna Information received Source decoding Channel decoding Receiver Demodulation Channel Coding in A Wireless Communication Systems EE of NIU

  3. Forward Error Corrections (FEC)(正向糾錯) • The key idea of FEC is to transmit enough redundant data to allow receiver to recover from errors all by itself. • No sender retransmission required. • The major categories of FEC codes are • Linear block codes • Cyclic codes • CRC codes • Convolutional codes • Turbo codes, etc. EE of NIU

  4. Linear Block Codes (1) (線性區塊碼) • A linear code is an error-correcting code for which any linear combination of codewords is another codeword of the code. • (n,k) linear block codes • k information bits are encoded to an n bits codeword. • Among 2ndifferent combinations,only 2kcombinations are valid codewords. • Let the uncoded kinformation bits be represented by the vector m = (m1,m2,…,mk). • Let the corresponding codeword be represented by the n-bit vector c = (c1,c2,…,ck,ck+1,…,cn-1,cn). EE of NIU

  5. Linear Block Codes (2) • Each parity bit consists of a weighted modulo 2 sum of the data bits represented by ⊕ symbol. • Example: where pij (i=1,…k;j=k+1,…,n) is the binary weight of the particular data bit. EE of NIU

  6. Parity check matrix HT Air Code Vector c Null vector 0 Receiver Operations of The Generator Matrix and The Parity Check Matrix Message vector m Generator matrix G Code Vector c Transmitter EE of NIU

  7. Generator Matrix (生成矩陣) • The generator matrix G(kn matrix) is made up by concatenating the identity matrix Ik(kk matrix) and the parity matrix P(k(n-k) matrix) EE of NIU

  8. Representing The Code Vector c • Representing the code vector cas a matrix operation on the uncoded message vector m • For convenience, the code vector is expressed as • cp=mP is an (n-k)-bit parity check vector EE of NIU

  9. Parity Matrix (同位矩陣) • The parity matrix P(k(n-k) matrix)is given by • pi=rem [xn-k+i-1/g(x)] is the remainder of [xn-k+i-1/g(x)] for i=1, 2, .., k • g(x) is the generator polynomial (生成多項式). • All arithmetic is performed using modulo 2 operation. EE of NIU

  10. Modulo 2 Arithmetic • Exclusive-OR operation • Binary addition with no carries • Binary subtraction with no borrows EE of NIU

  11. Linear Block Codes: Example • For a (7,4) code, find the generator matrix G if code generator polynomial g(x)=1+x+x3. • n=7, k=4, n-k=3 • The generator matrix is EE of NIU

  12. Parity Check Matrix (1) (同位檢查矩陣) • Define a matrix HT as • Parity check matrix H(n-k)×n • In-kis a (n-k)×(n-k) unit matrix • PT is the transpose matrix of the parity matrix P EE of NIU

  13. Syndrome (症狀) s • Syndrome: s=xHT • x=ce is the received vector, e is the error vector. • dimension of sis(n-k). • s=0: the received vector xis correct. • s0: the received vector xis incorrect and the value of s is the location of the error bit. EE of NIU

  14. Example • For the (7,4) linear block code, given by G as • For m=[1011] and c=mG=[1011|001], if there is no error, the received vector x=c, and s=cHT=[000] EE of NIU

  15. Example • Let c suffer an error such that the received vector x=ce=[ 1 0 1 1 0 0 1 ][ 0 0 1 0 0 0 0 ] =[ 1 0 0 1 0 0 1 ] • The syndrome • This indicates error position, giving the corrected vector as [1011001] EE of NIU

  16. Cyclic Codes (1) (循環碼) • Cyclic codes are relatively easy to encode and decode than most other types of codes. • Most of block codes used in the FEC system are cyclic codes. • It is a block code which uses a shift register to perform encoding and decoding. EE of NIU

  17. Cyclic Codes(2) • The codeword with n bits is expressed as • each coefficient ci (i = 1, 2, …, n) is either a 1 or 0. • The codeword can be expressed by the data polynomial m(x) and the check polynomial cp(x) as EE of NIU

  18. Cyclic Codes (3) • The check polynomial cp(x) is the remainder from dividing m(x)xn-kby the generator polynomial g(x) • Denoting the error polynomial by e(x), the received signal polynomial or syndrome s(x) is • If there is no error, we have s(x) = 0。 EE of NIU

  19. Example: A (7,4) Cyclic Code • Find the codewords c(x) if m(x)=1+x+x2and g(x)=1+x+x3 • The check polynomial is • Then, the codewords can be found as EE of NIU

  20. Error Detection • error is inevitable • detect using error-detecting code • added by transmitter • recalculated and checked by receiver • still chance of undetected error • parity • parity bit set so character has even (even parity) or odd (odd parity) number of ones • even number of bit errors goes undetected Chih-Cheng Tseng

  21. Cyclic Redundancy Check • one of the most common and powerful checks • for block of k bits, transmitter generates an n bit frame check sequence (FCS) • transmits (k+n) bits which are exactly divisible by some number • receiver divides frame by that number • if no remainder, assume no error EE of NIU

  22. Commonly used CRC Polynomial EE of NIU

  23. CRC---Example (n+1)bits nbits T=M+R k bits message (M) FCS (R) OK!! Chih-Cheng Tseng

  24. Convolutional Code (1) • Most widely used channel code in practical communication systems for real-time error correction, e.g. GSMand IS-95. • The encoded bits depend not only on the current input bits but also on past input bits. • Encoding of information stream rather than information blocks. • Decoding is based on the well-known Viterbi Algorithm. EE of NIU

  25. Convolutional Codes (2) • The constraint length relates the number of bits on which the output depends and is defined as K=M+1 • Mis the maximum number of stages (memory size) in any shift register • The code rate ris defined as r = k / n • kis the number of parallel information bits • nisthe number of parallel output encoded bits at one time interval EE of NIU

  26. Convolutional Codes: (n=2, k=1, M=2) Encoder 1 0 y1 0 y1 1 Input Output x D1 0 1 D2 0 0 c 1 1 y2 y2 1 1 0 D1, D2 - Registers Input x: 1 1 1 0 0 0 … Output y1,y2: 11 01 10 01 11 00 … Input x: 1 0 1 0 0 0 … Output y1,y2: 11 10 00 10 11 00 … EE of NIU

  27. State Diagram 10/1 11 01/0 01/1 10/0 10 01 00/1 11/1 11/0 00 00/0 EE of NIU

  28. Tree Diagram 0 First input 00 First output 00 11 11 … 1 1 0 0 1 10 11 … 10 11 11 01 11 01 10 11 10 00 00 1 01 01 10 11 00 11 01 11 10 00 01 01 01 11 01 10 00 01 10 10 EE of NIU

  29. Trellis Diagram … 11001 00 00 00 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 11 10 10 10 10 10 10 … 00 00 00 10 10 10 10 01 01 01 01 01 01 01 01 01 01 01 01 01 11 11 11 11 11 11 10 10 10 EE of NIU

  30. Received Data a1, a5, a9, a13, a2, a6, a10, a14, a3, … Interleaver a1, a2, a3, a4, a5, a6, a7, a8, a9, … Input Data Write a1, a2, a3, a4 a5, a6, a7, a8 a9, a10, a11, a12 a13, a14, a15, a16 Read Interleaving Interleaver tries to prevent burst errors. Transmitting Data a1, a5, a9, a13, a2, a6, a10, a14, a3, … Through Air Read a1, a2, a3, a4 a5, a6, a7, a8 a9, a10, a11, a12 a13, a14, a15, a16 Write De-Interleaving Output Data a1, a2, a3, a4, a5, a6, a7, a8, a9, … EE of NIU

  31. Example:Occurring 4 Burst Bit Errors Burst error • Pros • Disperse the burst errors into multiple individual errors. • Cons • Additional delay is required as the sequence needs to be processed block by block. • Notice • Interleaving does not have error-correcting capability. Transmitting Data 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,… Read 0, 1, 0, 0 0, 1, 0, 0 0, 1, 0, 0 1, 0, 0, 0 Write De-Interleaving Output Data 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, … Discrete errors EE of NIU

  32. Information Capacity Theorem(Shannon Limit) • The information capacity (or channel capacity) C of a continuous channel with bandwidth B Hz can be perturbed by additive white Gaussian noise (AWGN) of power spectral density N0/2, provided bandwidth B satisfies • P is the average transmitted power P = EbRb(for an ideal system, Rb = C) • Ebisthe transmitted energy per bit • Rb is transmission rate (bps) • As long as the transmission rate is less than the channel capacity, there exists a coding scheme that makes the BER approaches to zero. EE of NIU

  33. Shannon Limit • As the bandwidth B goes infinity, the least SNR to achieve the channel capacity is -1.6 dB Rb/B 20 Region for which Rb>C 10 Capacity boundary Rb=C Shannon Limit Region for which Rb<C -1.6 1 Eb/N0 dB 0 10 20 30 • For details about the channel capacity and Shannon limit, a good reference can be downloaded at: • http://www.cteccb.org.tw/pdf/IECQ-49-4.pdf • http://www.cteccb.org.tw/pdf/IECQ-50-6.pdf 0.1 EE of NIU

  34. Turbo Codes • The turbo code concept was first introduced by C. Berrou in 1993. • Turbo codes are considered as the most efficient coding schemes for FEC. • Scheme with known components (simple convolutional or block codes, interleaver, soft-decision decoder, etc.) • Performance close to the Shannon Limit (Eb/N0 = -1.6 dB if Rb0 or B) than any other codes so far at modest complexity! EE of NIU

  35. Turbo Code Encoder • The fundamental turbo code encoder is built using two identical recursive systematic convolutional (RSC) codes with parallel concatenation. • The interleaver makes the input of the encoders uncorrelated. x Data Source x Convolutional Encoder 1 (RSC 1) y1 Interleaving y (y1, y2) y2 Convolutional Encoder 2 (RSC 2) EE of NIU

  36. Turbo Code Decoder • The output of the 2nd RSC decoder is feedbacked to the 1st RSC decoder TURBO De-interleaving Convolutional Decoder 1 Interleaver y1 Convolutional Decoder 2 x Interleaving De-interleaving y2 x’ x’: Decoded information EE of NIU

  37. Automatic Repeat reQuest (ARQ) • ARQis one of the error-handling mechanisms in data communication. • Three kinds of ARQ schemes • Stop-And-WaitARQ(SAW ARQ) • Go-Back-NARQ(GBN ARQ) • Selective-RepeatARQ (SR ARQ) EE of NIU

  38. Concept of ARQ Transmitter Channel Receiver Destination Source Demodulation Decoder Transmit Controller Encoder Transmit Controller Modulation Acknowledge EE of NIU

  39. Stop-And-Wait ARQ (SAW ARQ) Retransmission 1 2 3 3 Transmitting Data Time ACK NAK ACK 1 2 3 Received Data Time Error 1 2 3 Output Data Time ACK: Acknowledge NAK: Negative ACK EE of NIU

  40. Average Tx Time of The SAW ARQ • The average Tx time in terms of a block duration TSAW = (1+DRb/n)PACK+2(1+DRb/n)PACK(1-PACK) +3(1+DRb/n)PACK(1-PACK)2+… = (1+DRb/n)PACKi(1-PACK)i-1 = (1+DRb/n)PACK/[1-(1-PACK)]2 = (1+DRb/n)/PACK • n is the number of bits in a block • D is the round trip delay • Rb is the bit rate • Pb is the BER of the channel • PACK(1-Pb)n EE of NIU

  41. Throughput of The SAW ARQ • Throughput SSAW = (1/TSAW)(k/n) = [(1-Pb)n/(1+DRb/n)] (k/n) • n is the number of bits in a block • k is the number of information bits in a block • Rb is the bit rate • Pb is the BER of the channel • D is the round trip delay EE of NIU

  42. Go-Back-N ARQ (GBN ARQ) • A special case of the sliding window protocol with the transmit window size of N and receive window size of 1. Go-back 3 Go-back 5 Assume N=3 1 2 3 4 5 3 4 4 5 6 7 5 Transmitting Data Time NAK NAK 1 2 3 4 5 Received Data Time Error Error 1 2 3 4 Output Data Time EE of NIU

  43. Average Tx Time of The GBN ARQ • The average Tx time in terms of a single block duration is given by TGBN=1PACK+(N+1)PACK(1- PACK)+ (2N+1)PACK(1-PACK)2+ (3N+1)PACK(1-PACK)3+…. = PACK+PACK[(1-PACK)+(1-PACK)2 +(1-PACK)3+…]+ PACK[N(1-PACK)+2N(1-PACK)2 +3N(1-PACK)3+…] = PACK+PACK[(1-PACK)/{1-(1-PACK)}+N(1-PACK)/{1-(1-PACK)}2] = 1+N(1-PACK)/PACK  1+(N[1-(1-Pb)n ])/(1-Pb)n EE of NIU

  44. Throughput of The GBN ARQ • Throughput SGBN=(1/TGBN)(k/n) = [(1-Pb)n/((1-Pb)n+N(1-(1-Pb)n))](k/n) EE of NIU

  45. Selective Repeat ARQ • A general case of the sliding window protocol with the transmit and receive window sizes are greater than 1. Retransmission Retransmission Assume window size=5 1 2 3 4 5 3 6 7 8 9 7 Transmitting Data Time NAK NAK 3 1 2 4 5 6 8 9 7 Received Data Time Error Error 1 2 4 5 3 6 8 9 7 Buffer Time 1 2 3 4 5 6 7 8 9 Output Data Time EE of NIU

  46. Average Tx Time of The SR ARQ • The average Tx time in terms of a single block duration is given by TSR=1PACK+2PACK(1-PACK)+3PACK(1-PACK)2+…. = PACKi(1-PACK)i-1 = PACK/[1-(1-PACK)]2 = 1/(1-Pb)n where PACK(1-Pb)n EE of NIU

  47. Throughput of The SR ARQ • Throughput SSR = (1/TSR)(k/n) = (1- Pb)n(k/n) EE of NIU

  48. Homework • P4.4 • P4.5 • P4.6 • P4.10 EE of NIU

More Related