You are on page 1of 23

CS 6910 Pervasive Computing

Spring 2007

Section 4 (Ch.4):
Channel Coding and Error Control
Prof. Leszek Lilien
Department of Computer Science
Western Michigan University
Slides based on publishers slides for 1st and 2nd edition of:
Introduction to Wireless and Mobile Systems by Agrawal & Zeng
2003, 2006, Dharma P. Agrawal and Qing-An Zeng. All rights reserved.

Some original slides were modified by L. Lilien, who strived to make such modifications clearly
visible. Some slides were added by L. Lilien, and are 2006-2007 by Leszek T. Lilien.
Requests to use L. Liliens slides for non-profit purposes will be gladly granted upon a written
request.

1
Chapter 4

Channel Coding and Error Control

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved (Modified by LTL) 2
Outline
We skip some sections in this Chapter
You have to use it on your own if needed (e.g., for your project)

Introduction
Linear Block Codes
Cyclic Codes
Cyclic Redundancy Check (CRC)
Convolutional Codes
Interleaver
Information Capacity Theorem
Turbo Codes
ARQ (Automatic Repeat Request) Techniques
Stop-and-wait ARQ
Go-back-N ARQ
Selective-repeat ARQ

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 3
4.1. Introduction
Why need channel coding for radio communication?
Why need error control for radio communication?
Severe transmission problems

In terrestrial mobile communications due to:

Multipath fading
E.g., reflections / diffractions / scattering in cellular wireless
communications
Low S/N (signal-to-noise) ratio
In satellite communications due to:
Limited xmitting power for forward channels
(downlink )
Limited satellite energy resources

=> Need means to improve transmissions


Channel coding and error control forare such means

2007 by
Copyright Leszek T. Lilien
2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 4
4.1. Introduction cont. 1

=> Need channel coding and error control to improve


transmissions
Channel coding (CC)
= coding (discrete digital) information into a form suitable for
transmission, with emphasis on enhanced reliability
CC adds redundancy that allows for info restoration or
recovery when needed
Price paid: need broader bandwidth

CC ensures proper transmission quality


Measured by
Bit error quality (BER) / Frame error quality (FER)

See where channel coding/decoding is done (next slide)

2007 by
Copyright Leszek T. Lilien
2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 5
4.1. Introduction cont. 2

Channel coding/decoding in a wireless


communication system
Information to
be transmitted Source Channel
Channel
Modulation Transmitter
coding coding
coding

Channel
Information
received Source Channel
Channel
Demodulation Receiver
decoding decoding
decoding

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 6
4.1. Introduction cont. 3

CC includes error control


Error control = at least error detection , preferably also
error correction

Error detection w/o error correction is insufficient


Means transmission failure since requires for
retransmission

2007 by
Copyright Leszek T. Lilien
2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 7
Error Correction (EC)

The key EC idea:


Transmit enough redundant data to allow receiver to
recover from errors all by itself
No sender retransmission required

Major categories of EC codes


(really: forward error correction FEC)
Linear block codes
Cyclic codes
Reed-Solomon codes
Convolutional codes
Turbo codes

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved (Modified by LTL) 8
4.2. Linear 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 = k/(k + r)
Decoder looks for code word closest to received vector
Received vector = code vector + error vector

Tradeoffs between
Efficiency

Reliability

Encoding/decoding complexity

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 9
*** SKIP *** 4.3. Cyclic Codes (are Block Codes)

It is a linear block code which uses a shift register to perform encoding


and decoding
The code word with n bits is expressed as
c(x)=c1xn-1 +c2xn-2+ cn
where each ci is either a 1 or 0.
c(x) = m(x) xn-k + cp(x)
where cp(x) = remainder from dividing m(x) xn-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.

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 10
4.4. Cyclic Redundancy Check (CRC)
Cyclic redundancy code (CRC) is an error-checking code.
Xmitter appends an extra n-bit sequence to every frame
Called Frame Check Sequence (FCS)

FCS holds redundant information about the frame

Helps receivers to detect/correct errors in received frames

CRC is based on polynomial manipulations using modulo


arithmetic
Blocks of input bits treated as coefficient sets for polynomials (called message
polynomials)
E.g., for message 11001, message polynomial is: 1 * x4 + 1 * x3 + 0 * x2 + 0 * x1 + 1 * x0
CRC also uses another polynomial - with constant coefficients (called the generator
polynomials)
Polynomial manipulations using modulo arithmetic are applied to the 2 polynomials

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 11
Most Common CRC Polynomials

Code Generator polynomial Parity check


g(x) bits
CRC-12 1+x+x2+x3+x11+x12 12

CRC-16 1+x2+x15+x16 16

CRC-CCITT 1+x5+x12+x16 16
CRC-32 | (see text) | 32
(used by DoD) | |

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved (Modified by LTL) 12
4.5. Convolutional Codes
Among most commonly used channel codes
E.g., in GSM and IS-95
Encoding of information stream rather than information blocks
Output (encoded bits) depends not only on current input bits but

also on past data bits


M - max. # of (past) stages (a.k.a. memory size ) affecting output
Easy implementation using shift register
Assuming k inputs and n outputs
Decoding most often based on the Viterbi Algorithm

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved (Modified by LTL) 13
4.6. Interleaver
Interleaving is heavily used in wireless communication for
protection against burst errors
Recall:
Burst error a contiguous sequence of symbols, received over a data
transmission channel, such that:
(a) the first symbol and the last symbol are in error, and
(b) there exists no contiguous subsequence of m correctly received
symbols within the error burst
The last symbol in a burst and the first symbol in the following burst
are separated by m correct bits or more
The length of a burst of errors in a frame is defined as the number

of bits from the first error to the last, inclusive

Block interleaver - most common interleaver


Concept next slide

2007 by
Copyright Leszek T. Lilien
2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 14
Concept of Interleaver

1) Sender writes row-by-


row into buffer
2) Read col-by-col from
buffer onto link

1) Write col-by-col from


link into buffer
2) Receiver reads row-by-
row from buffer

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 15
How Interleaver Works An Example

[LTL] Interleaver disperses burst error into 4 discrete errors


It is much easier to correct 4 discrete 1-bit errors, than to correct
1 continuous 4-bit burst error
Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 16
4.7. Turbo Codes
Brief history of turbo codes:
First introduced by C. Berrou et al. only in 1993

Considered as the most efficient FEC coding schemes

Performance close to the (perfect) Shannon Limit at modest complexity!

Turbo codes use known components


Including: simple convolutional or block codes, interleaver,

soft-decision decoder
Turbo codes proposed for
Low-power applications

Such as deep-space and satellite communications,


Interference-limited applications
Such as 3G cellular, PCS (personal communication services), ad hoc networks
and sensornets

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 17
*** SKIP *** 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 N0/2, provided bandwidth B satisfies
P

C B log 2 1 bits / sec ond
N0 B
where: P is the average transmitted power P = EbRb (for an
ideal system, Rb = C).
Eb is the transmitted energy per bit,
Rb is transmission rate.

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 18
*** SKIP *** Shannon Limit
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

0.1

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 19
***SKIP*** Turbo Codes: Encoder
Data X
X
Source

Convolutional Encoder
1 Y1

Interleaving Y
(Y1, Y2)
Convolutional Encoder Y2
2

X: Information
Yi: Redundancy Information

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 20
***SKIP*** Turbo Codes: Decoder

De-interleaving

Convolutional
Y1 Interleaver
Decoder 1

X Interleaving Convolutional
Decoder 2 De-interleaving
Y2
X

X: Decoded Information

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 21
4.8. Automatic Repeat Request (ARQ)
[LTL] Sometimes CC can detect but cant correct errors
Must ask for retransmission
Can use Automatic Repeat Request (ARQ)
D sends (positive) acknowledgement ACK if received packets correct
If D detects error it cant correct, D sends negative acknowledge-
ment NAK this requests retransmission

Source S Transmitter Channel Receiver Destination D

Transmit Transmit
Encoder Modulation Demodulation Decoder
Controller Controller

Acknowledge
(ACK or NAK)

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 22
The End of Section 4

Copyright 2003, Dharma P. Agrawal and Qing-An Zeng. All rights reserved 23

You might also like