Sie sind auf Seite 1von 31

1 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.

Chapter 4
Channel Coding
2 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Outline
FEC (Forward Error Correction)
Block Codes
Convolutional Codes
Interleaving
Information Capacity Theorem
Turbo Codes
CRC (Cyclic Redundancy Check)
ARQ (Automatic Repeat Request)
Stop-and-wait ARQ
Go-back-N ARQ
Selective-repeat ARQ
3 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Information to
be transmitted
Source
coding
Channel
coding
Modulation Transmitter
Channel
Information
received
Source
decoding
Channel
decoding
Demodulation Receiver
Channel Coding in Digital Communication Systems
Channel
coding
Channel
decoding
4 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Forward Error Correction (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
Block codes,
Cyclic codes,
Reed-Solomon codes (Not covered here),
Convolutional codes, and
Turbo codes, etc.
5 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Block Codes
Information is divided into blocks of length k
r parity bits or check bits are added to each block
(total length n = k + r),.
Code rate R = k/n
Decoder looks for codeword closest to received
vector (code vector + error vector)
Tradeoffs between
Efficiency
Reliability
Encoding/Decoding complexity
6 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Block Codes: Linear Block Codes
Linear Block Code
The block length c(x) or C of the Linear Block Code is
c(x) = m(x) g(x) or C = m G
where m(x) or m is the information codeword block length,
g(x) is the generator polynomial, G is the generator matrix.
G = [p | I],
where p
i
= Remainder of [x
n-k+i-1
/g(x)] for i=1, 2, .., k, and I
is unit matrix.
The parity check matrix
H = [p
T
| I ], where p
T
is the transpose of the matrix p.
7 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
e H
T
= e H
T
e ) * H
T
=c H
T
e be the received message where c is the correct code and e is the error
Block Codes: Linear Block Codes
Let x = c
Compute S = x * H
T
=( c
If S is 0 then message is correct else there are errors in it, from common known error
patterns the correct message can be decoded.
The parity check matrix H is used to detect errors in the received code by using the fact
that c * H
T
= 0 ( null vector)
Generator
matrix
G
Code
Vector
C
Message
vector
m
Parity
check
matrix
H
T
Code
Vector
C
Null
vector
0
Operations of the generator matrix and the parity check matrix
8 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Block Codes: Example
Example : Find linear block code encoder G if code generator
polynomial g(x)=1+x+x
3
for a (7, 4) code.
We have n = Total number of bits = 7, k = Number of information bits = 4,
r = Number of parity bits = n - k = 3.
| | ,
1 0 0
0 1 0
0 0 1
|
2
1
(
(
(
(

= =
L
L L L L
L
L
k
p
p
p
I P G
where
k i
x g
x
of mainder p
i k n
i
, , 2 , 1 ,
) (
Re
1
L =
(

=
+

9 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Block Codes: Example (Continued)
| | 110 1
1
Re
3
3
1
+ =
(

+ +
= x
x x
x
p
| | 011
1
Re
2
3
4
2
+ =
(

+ +
= x x
x x
x
p
| | 111 1
1
Re
2
3
5
3
+ + =
(

+ +
= x x
x x
x
p
| | 101 1
1
Re
2
3
6
4
+ =
(

+ +
= x
x x
x
p
(
(
(
(

=
1010001
1110010
0110100
1101000
G
10 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Cyclic Codes
It is a block code which uses a shift register to perform encoding and
decoding
The code word with n bits is expressed as
c(x)=c
1
x
n-1
+c
2
x
n-2
+c
n
where each c
i
is either a 1 or 0.
c(x) = m(x) x
n-k
+ c
p
(x)
where c
p
(x) = remainder from dividing m(x) x
n-k
by generator g(x)
if the received signal is c(x) + e(x) where e(x) is the error.
To check if received signal is error free, the remainder from dividing
c(x) + e(x) by g(x) is obtained(syndrome). If this is 0 then the received
signal is considered error free else error pattern is detected from
known error syndromes.
11 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Cyclic Redundancy Check (CRC)
Using parity, some errors are masked - careful
choice of bit combinations can lead to better
detection.
Binary (n, k) CRC codes can detect the following
error patterns
1. All error bursts of length n-k or less.
2. All combinations of minimum Hamming distance
d
min
- 1 or fewer errors.
3. All error patters with an odd number of errors if the
generator polynomial g(x) has an even number of
nonzero coefficients.
12 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Common CRC Codes
16 1+x
5
+x
15
+x
16
CRC-CCITT
16 1+x
2
+x
15
+x
16
CRC-16
12 1+x+x
2
+x
3
+x
11
+x
12
CRC-12
Parity check
bits
Generator polynomial
g(x)
Code
13 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Convolutional Codes
Encoding of information stream rather than
information blocks
Value of certain information symbol also affects
the encoding of next Minformation symbols,
i.e., memory M
Easy implementation using shift register
Assuming k inputs and n outputs
Decoding is mostly performed by the Viterbi
Algorithm (not covered here)
14 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Convolutional Codes: (n=2, k=1, M=2)
Encoder
Input
Output
Input: 1 1 1 0 0 0
Output: 11 01 10 01 11 00
Input: 1 0 1 0 0 0
Output: 11 10 00 10 11 00
D1 D2
Di -- Register
x
y
1
y
2
c
15 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
01/0
01/1
11/1
11/0
State Diagram
11
10/1
00/0
00
10 01
10/0
00/1
16 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Tree Diagram
00
11
00
10
01
11
11
00
10
01
10
01
00
11
11
10
01
00
11
00
01
01
10
10
11
00
01
10
01
10
11
00
1
0
1 1 0 0 1
10 11 11 01 11

First input
First output
17 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Trellis
00 00
00
00
00
00
00
00
00
00
00
10 10 10 10 10 10
01 01 01 01 01 01
11 11 11 11 11 11
11
10
11
11
01
11 0 0 1

10 10 10
01
01 01
01 01 01
11 11 11
11
11
10 10 10
00 00 00
18 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Interleaving
a1, a2, a3, a4, a5, a6, a7, a8, a9,
Input Data
a1, a2, a3, a4
a5, a6, a7, a8
a9, a10, a11, a12
a13, a14, a15, a16
Write
R
e
a
d
Interleaving
a1, a5, a9, a13, a2, a6, a10, a14, a3, Transmitting
Data
a1, a2, a3, a4
a5, a6, a7, a8
a9, a10, a11, a12
a13, a14, a15, a16
Read
W
r
i
t
e
De-Interleaving
a1, a2, a3, a4, a5, a6, a7, a8, a9, Output Data
19 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Interleaving (Example)
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, Transmitting
Data
0, 1, 0, 0
0, 1, 0, 0
0, 1, 0, 0
1, 0, 0, 0
Read
W
r
i
t
e
De-Interleaving
0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, Output Data
Burst error
Discrete error
20 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Information Capacity Theorem
(Shannon Limit)
The information capacity (or channel capacity)
C of a continuous channel with bandwidth B
Hertz can be perturbed by additive Gaussian
white noise of power spectral density N
0
/2,
provided bandwidth B satisfies
where P is the average transmitted power P =
E
b
R
b
(for an ideal system, R
b
= C).
E
b
is the transmitted energy per bit,
R
b
is transmission rate.
ond bits
B N
P
B C sec / 1 log
0
2
|
|
.
|

\
|
+ =
21 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Shannon Limit
0 10 20 30
E
b
/N
0
dB
Region for which R
b
<C
Region for which R
b
>C
R
b
/B
-1.6
Shannon Limit
Capacity boundary R
b
<C
1
10
20
0.1
22 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Turbo Codes
A brief historic of turbo codes :
The turbo code concept was first introduced by C. Berrou in
1993. Today, 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 (E
b
/N
0
= -1.6 db
if R
b
0) at modest complexity!
Turbo codes have been proposed for low-power applications
such as deep-space and satellite communications, as well as
for interference limited applications such as third generation
cellular, personal communication services, ad hoc and sensor
networks.
23 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Turbo Codes: Encoder
Convolutional Encoder
1
Interleaving
Convolutional Encoder
2
Data
Source
X
X
Y
Y
1
Y
2
(Y
1
, Y2)
X: Information
Y
i
: Redundancy Information
24 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Turbo Codes: Decoder
Convolutional
Decoder 1
Convolutional
Decoder 2
Interleaving
Interleaver
De-interleaving
De-interleaving
X
Y
1
Y
2
X
X: Decoded Information
25 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Automatic Repeat Request (ARQ)
Source Transmitter Channel Receiver Destination
Encoder
Transmit
Controller
Modulation Demodulation Decoder
Transmit
Controller
Acknowledge
26 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Stop-And-Wait ARQ (SAW ARQ)
Transmitting
Data
1 3 2 3
Time
Received Data
1 2 3
Time
A
C
K
A
C
K
N
A
K
Output Data
1 2 3
Time
Error
Retransmission
ACK: Acknowledge
NAK: Negative ACK
27 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Stop-And-Wait ARQ (SAW ARQ)
Throughput:
S = (1/T) * (k/n) = [(1- P
b
)
n
/ (1 + D * R
b
/ n) ] * (k/n)
where T is the average transmission time in terms of a block duration
T = (1 + D * R
b
/ n) * P
ACK
+ 2 * (1 + D * R
b
/ n) * P
ACK
* (1- P
ACK
)
+ 3 * (1 + D * R
b
/ n) * P
ACK
* (1- P
ACK
)
2
+ ..
= (1 + D * R
b
/ n) / (1- P
b
)
n
where n = number of bits in a block, k = number of information bits in a block,
D = round trip delay, R
b
= bit rate, P
b
= BER of the channel, and P
ACK
= (1- P
b
)
n
28 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Go-Back-N ARQ (GBN ARQ)
Transmitting
Data
1
Time
Received Data
N
A
K
Output Data
Time
Error
Go-back 3
2 3 4 5 3 44 5 6 7 5
1
Time
2 3 44 5
Error
N
A
K
Go-back 5
1 2 3 44 5
29 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Throughput
S = (1/T) * (k/n)
= [(1- P
b
)
n
/ ((1- P
b
)
n
+ N * (1-(1- P
b
)
n
) )]* (k/n)
where
T = 1 * P
ACK
+ (N+1) * P
ACK
* (1- P
ACK
) +2 * (N+1) * P
ACK
*
(1- P
ACK
)
2
+ .
= 1 + (N * [1 - (1- P
b
)
n
])/ (1- P
b
)
n
Go-Back-N ARQ (GBN ARQ)
30 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Selective-Repeat ARQ (SR ARQ)
Transmitting
Data
1
Time
Received Data
N
A
K
Error
Retransmission
2 3 4 5 3 6 7 8 9 7
1
Time
2 4 3 6 8 7
Error
N
A
K
Retransmission
5 9
Buffer
1
Time
2 4 3 6 8 7 5 9
Output Data
1
Time
2 4 3 6 8 7 5 9
31 Copyright 2002, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved.
Selective-Repeat ARQ (SR ARQ)
Throughput
S = (1/T) * (k/n)
= (1- P
b
)
n
* (k/n)
where
T = 1 * P
ACK
+ 2 * P
ACK
* (1- P
ACK
) + 3 * P
ACK
* (1- P
ACK
)
2
+ .
= 1/(1- P
b
)
n

Das könnte Ihnen auch gefallen