You are on page 1of 10

26/03/2017 Block Interleaver Design for RS codes GaussianWaves

Published October 28, 2010 by Mathuranathan

Block Interleaver Design for RS codes


(2 votes, average: 5.00 out of 5)

Introduction:

A (n, k) Reed Solomon (RS) encoder, takes k user data symbols and
converts it into a n symbol wide codeword, by adding n k parity
symbols. The error correcting capability (t) of the RS code is computed
nk
as t . That is, a RS code with n k parity symbols can correct a
2
nk
burst error of upto symbol errors.
2

Block Interleavers:

Suppose, assume that the dominant error mechanism in a channel is of


burst type. A burst of length b is defined as a string of b unreliable
consecutive symbols. If the expected burst length, b is less than or equal
to t (the number of correctable symbol errors by RS coding), the code can
be used as it is. However, if bursts length b > t, the error correcting code
will fail. This is where interleaving comes to our rescue.

Let us assume that b > t and b t d , where d (the interleaving depth)


is an integer. The Reed-Solomon (n, k) code can be used if we can spread
the burst error sequence over several code blocks so that each block has
no more than t errors (which can then be corrected). This can be
accomplished using block interleaving as follows. Instead of encoding
blocks of k symbols and then sending the encoded symbols
consecutively, we can interleave the encoded blocks and transmit the
interleaved data. In the case where
n = 255, k = 235, t = 10, d = 5 ,the data bytes output from the Reed-

Solomon encoder would appear as shown below , where bytes

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 1/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

numbered 0 to 234 are the data bytes and bytes 235 to 254 are the parity
check bytes.

Code Structure for Reed Solomon (RS) Codes

Here, the data is written row by row and read back column by
column.Consider now the effect of a burst error of length b > t, (where t
is the number of correctable errors per block) and b v d for some v,
on the received symbols in the table. Because of the order in which the
symbols are sent, a burst length less than or equal to d i will effect at
most d + 1 consecutive columns of the table, depending on where the
burst starts. Notice that any single row (which corresponds to a
codeword) has no more than v errors in it. If d > t, these errors are
within the error correction capability of the code and can be corrected.
In this case, d becomes the interleaving depth. The trade-off is that extra
buffer space is required to store the interleaver table and additional
delay is introduced. The worst case burst length determines the size of
the table (and the interleaving depth) and the table size determines the
amount of buffer space required and the delay.

Design Example:

Consider a (255,235) Reed Solomon coding system. This code can correct
nk
upto t = = 10 symbols errors. Lets assume that the channel that we
2

are going to use, is expected to cause b = 253 symbols. Then the


interleaver depth (d ) is calculated as

b 253
d > = = 25.3
t 10

In this case , an interleaver depth of 26 is enough to combat the burst


errors introduced by the channel. The block interleaver dimensions
would be d n = 26 255 (26 rows by 255 columns).

Matlab Code:
http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 2/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

A sample matlab code that simulates the above mentioned block


interleaver design is given below. The input data is a repeatitive stream
of following symbols
THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_. A
(255,235) Reed Solomon decoder (with correction capability of 10
symbols) is used. We assume that the channel is expected to produce a
maximum of consecutive 20 symbols of burst error. The burst errors are
denoted by *.

1 %Demonstration of design of Block Interleaver for Reed Solomon Code


2
3 %Author : Mathuranathan for http://www.gaussianwaves.com
4
5 %License - Creative Commons - cc-by-nc-sa 3.0
6
7 clc;
8 clear;
9 %____________________________________________
10
11 %Input Parameters
12
13 %____________________________________________
14
15 %Interleaver Design for Reed-Solomon Codes
16
17 %RS code parameters
18
19 n=255;%RS codeword length
20 k=235;%Number of data symbols
21 b=20;%Number of symbols that is expected to be corrupted by the channel
22 %____________________________________________
23
24
25 p=n-k;%Number of parity symbols
26 t=p/2; %Error correction capability of RS code
27
28 fprintf('Given (%d,%d) Reed Solomon code can correct : %d symbols \n',n,k,
29 fprintf('Given - expected burst error length from the channel : %d symbols \n'
30 disp('____________________________________________________________________________'
31 if(b>t)
32 fprintf('InterleavingMAY help in this scenario\n');
33 else
34 fprintf('Interleaving will NOT help in this scenario\n');

Simulation Result:

Given : (255,235) Reed Solomon code can correct : 10 symbols


Given : expected burst error length from the channel : 20 symbols
___________________________________________________________________________
_
Interleaving MAY help in this scenario
___________________________________________________________________________
_
Input Data to the Interleaver ->
THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUIC

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 3/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

K_BROWN_FOX_JUMPS_OVER_T
HE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_
DOG_THE_QUICK_BROWN_FOX_
JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OV
ER_THE_LAZY_DOG_THE_QUIC
K_BROWN_FOX_JUMPS_OVER_THE_THE_QUICK_BROWN_FOX_JUMPS
_OVER_THE_LAZY_DOG_THE_
QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_BR
OWN_FOX_JUMPS_OVER_THE_
LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
_THE_QUICK_BROWN_FOX_JU
MPS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER
_THE_THE_QUICK_BROWN_FOX
_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OV
ER_THE_LAZY_DOG_THE_QUIC
K_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_
FOX_JUMPS_OVER_THE_LAZY_
DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_
QUICK_BROWN_FOX_JUMPS_O
VER_THE_________________________________________________________________
____________

Interleaver Output after being corrupted by 20 symbols burst error


marked by *->
TTTHHHEEE___QQQUUUIIICCC********************N___FFFOOOXXX_
__JJJUUUMMMPPPSSS___OOOVV
VEEERRR___TTTHHHEEE___LLLAAAZZZYYY___DDDOOOGGG___TTTH
HHEEE___QQQUUUIIICCCKKK
___BBBRRROOOWWWNNN___FFFOOOXXX___JJJUUUMMMPPPSSS___O
OOVVVEEERRR___TTTHHH
EEE___LLLAAAZZZYYY___DDDOOOGGG___TTTHHHEEE___QQQUUUII
ICCCKKK___BBBRRROOOWWWN
NN___FFFOOOXXX___JJJUUUMMMPPPSSS___OOOVVVEEERRR___TTTH
HHEEE___LLLAAAZZZYYY___
DDDOOOGGG___TTTHHHEEE___QQQUUUIIICCCKKK___BBBRRROOO
WWWNNN___FFFOOOXXX___JJJ
UUUMMMPPPSSS___OOOVVVEEERRR___TTTHHHEEE___LLLAAAZZZY
YY___DDDOOOGGG___TTTHHHEE
E___QQQUUUIIICCCKKK___BBBRRROOOWWWNNN___FFFOOOXXX___
JJJUUUMMMPPPSSS___OOOV
VVEEERRR___TTTHHHEEE___LLLAAAZZZYYY___DDDOOOGGG___TTT
HHHEEE___QQQUUUIIICCCKKK___
BBBRRROOOWWWNNN___FFFOOOXXX___JJJUUUMMMPPPSSS___OOO

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 4/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

VVVEEERRR___TTTHHHEEE__
___________________________________________________________________________
__
Deinterleaver Output->
THE_QUIC*******_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_B
ROWN_FOX_JUMPS_OVER_THE_
LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
_THE_QUICK_BROWN_FOX_JUM
PS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_T
HE_LAZY_DOG_THE_QUICK_BR
OWN_FOX_JUMPS_OVER_THE_THE_QUIC*******_FOX_JUMPS_OVER_T
HE_LAZY_DOG_THE_QUICK_BRO
WN_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_J
UMPS_OVER_THE_LAZY_DOG_TH
E_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_B
ROWN_FOX_JUMPS_OVER_THE_
LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_THE_QUIC*
*****N_FOX_JUMPS_OVER_THE_L
AZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG_
THE_QUICK_BROWN_FOX_JUMPS
_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMPS_OVER_TH
E_LAZY_DOG_THE_QUICK_BROWN
_FOX_JUMPS_OVER_THE_LAZY_DOG_THE_QUICK_BROWN_FOX_JUMP
S_OVER_THE________________
_____________________________________________________________

As we can see from the above simulation that, eventhough the channel
introduces 20 symbols of consecutive burst error (which is beyond the
correction capability of the RS decoder), the interleaver/deinterleaver
operation has effectively distributed the errors and reduced the
maximum burst length to 7 symbols (which is easier to correct by
(255,235) Reed Solomon code.

See also:

[1] Introduction to Interleavers and deinterleavers


[2] Random Interleavers

Additional Resources:

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 5/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

[1] Notes on theory and construction of Reed Solomon Codes Bernard


Sklar
[2] Concatenation and Advanced Codes Applications of interleavers-
Stanford University

Recommended Books

Share this:

Share 18 Tweet Share 1 Share submit

More

Previous Post
Interleavers and deinterleavers

Next Post
Random Interleaver

Mathuranathan
Mathuranathan Viswanathan - Founder and Author
@ gaussianwaves.com which has garnered
worldwide readership. He is a masters in
communication engineering and has 9 years of
technical expertise in channel modeling and has
worked in various technologies ranging from read
channel design for hard drives, GSM/EDGE/GPRS,
OFDM, MIMO, 3GPP PHY layer and DSL. He also
specializes in tutoring on various subjects like signal

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 6/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

processing, random process, digital communication


etc.., LinkedIn Profile

C H A N N E L C O D I N G I N T E R L E AV E R L AT E ST A RT I C L E S R E E D S O L O M O N
CODES

C H A N N E L C O D I N G I N T E R L E AV E R S M AT L A B C O D E S R E E D S O L O M O N
CODES

0 Comments Gaussianwaves
1 Login

Sort by Best
Recommend Share

Start the discussion

Be the first to comment.

ALSO ON GAUSSIANWAVES

MIMO Diversity and Spatial Capacity of a SISO system over a


Multiplexing fading channel
8 comments 3 years ago 6 comments 3 years ago
Mukul I am scratching my head and Mathuranathan both are equivalent
internet together to find out the reason to
call TM6 as Spatial Multiplexing though

Constructing the Auto Correlation Modeling a Frequency Selective
Matrix in Matlab Multipath Fading channel using TDL
1 comment 2 years ago
2 comments 5 months ago
Ali Qadir Hello,Is there any Example Mathuranathan For a flat fading
you considered for constructing AR(1) channel tap is taken as 1. For frequency
Correlation Matrix? selective fading, the channel taps (N>1)
can be
Subscribe d Add Disqus to your site Add Disqus Add Privacy

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 7/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

Log in with:

SEARCH ARTICLES

Search... Go

LIKE THIS WEBSITE ? SUBSCRIBE

Enter your email address to subscribe to this blog and receive notifications of new posts
by email.

Join 110 other subscribers

Email Address

Subscribe

PARTICIPATE AND WIN

Participate in Forums and win 32-GB microSD every month. Just top the leaderboard with
maximum reps at the end of each month

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 8/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

SEARCH QUESTIONS

Search questions & answers Search

GRAB THIS EBOOK TODAY

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 9/10
26/03/2017 Block Interleaver Design for RS codes GaussianWaves

RECENT QUESTIONS

Viterbi for cpm demodulation

0 Answers | 0 Votes

BER for BPSK modulation in AWGN, Rayleigh, and Rician fading channels

1 Answer | 0 Votes

OFDM with QPSK

0 Answers | 0 Votes

QPSK Complex input

1 Answer | 0 Votes

Correct the statement

1 Answer | 0 Votes

RECENTLY SUBMITTED

http://www.gaussianwaves.com/2010/10/block-interleaver-design-for-rs-codes-2/ 10/10

You might also like