DC-mod 4 Notes - 1
DC-mod 4 Notes - 1
decoder"
encodiError
at the
the transmitter systematically adds digits tothe transmitted message digits. These additional
digits carTry "no information", but make it possible for the channel decoder to detect and This
in
ebitrate ofFthe coded output block {d, will be r,=, (n/k) bits/sec. This is the rate at
The,
shich
the modem operates, to produce a message block få.} at the receiver. The channel
decoderthen decodes this message to get back the information block 6. at the receiver.
Thisinformation block {b,} occasionally difers from the transmitted block {b}. Thus
thepprobabilityofeerror
P. = P {b, b) . . (5.1)
must be less than the prescribed value. The probability of error "q," of
The quantity P
modemwwhich depends on bit rate r, is defined as
the
4. = P{ä, d} (5.2)
wihout error control coding, q will be much higher than the desired value of probability
oferror. It is required to design an error control
coding scheme so that the overall probability
desired value.
oferroris less than some
Eample of Error-Control Coding :
having bandwidth B= 3000
Suppose that we want to transmit data over atelephone link
probability of error less than 10. We are
Hz (S/N)of 13dB at a rate of 1200 bits/sec with
modem that can operate at a speed of 3600 bits/sec with error probability q, =8 x 10
given a
desired to design an error control coding scheme having overall probability of error P.
It is
<10.
Design :
Given = 1200 bits/sec, B = 3000 Hz
3600 bits/sec
= 8x 104
S
10 loB10 N= 13dB
S 101:3 = 19.953
N
From Shannon-}Hartley law, the channel capacity
S
C -B log, 1+ N.
19.953)
= 3000 1og,(1+
bits/sec
C = 13167
second theorem, it is possible to transmit
according to Shannon's to reduce P, to as small
a
tla Since r, and
with an r <C,
small probability of error.
i.e., it is possible
arbitrarily
ea5 possible by a suitable coding technique.
(5.3)
bits/sec
We have r, =
Information Theory and C
294
Coding
3600
=3
k 1200
Ifk1, then n= 3.
.: The number of check bits =n-k=2 bits.
triplets "000" or
Thus we have an error control coding scheme wherein the of 3 bi:sare
a
transmitted when b, = 0' andl' respectively. In these triplets, detinitely 2 out
red1ndant and hence they carry no information.
the channel may a
Let us suppose that the triplet '000 is transmitted. The noise in combinatione
any one bit, or any two bits or allthe three bits in his triplet, resulting in eight orre
which are listed in table 5.1. Let us suppose that the receiver decodes the received triplet hy
using a majority-logic decoding scheme [i.e., if the number of 0's in the received triplet is
more than the number of l's,then it is decoded as 0'. Ifit is the other way, then it is decodedtpu decod
as 1'). rCgar
000 001 010 100 011 101 110 CeIv
Received Triplets
Decoded Message 1
methc
Table 5.1 :Table showing majority logic decoding scheme
As seen from the table 5.1, when the noise affects "only one" of the binary digits in Mhen
"000", then the decoder recovers the data correctly. If two or more errors occur, then the data Smuc
is not recovered correctly.
From equation (5.1), the overall probability of error
P. = P{6, b,} Was
= P (number of errors > 2)
Let Xbe a random variable representing the number of errors, Then X is a binomial
random variable with parameters n =3and p =probability of abit is in error = 4,
P. = P(X 2)
.C, p° (U-p)"
X2
X2
C,(4.)*(1-q.)*
= 34'(l -4) t4,
=q(3-2q.)
= (8 x 10 )² [3 -(2) (8 x 10 ]
P. 0.02 x 10 which is much less than
i0.
Introductionto Error Control Coding 295
correction method.
IS much lower than probability of error for error
requirements of reverse channel
The disadvantages of error detection method are the
transmission. (This is because the transmitter has
and slow down of the effective rate of data message).
before transmitting next
to wait for an acknowledgement from the receiver
5.5 TYPES OF ERRORS present in the
digital communication systems, errors are caused by the noise communication
In noise are encountered in
COmmunication channel. Usually, two kinds of
Impulse noise". Due to these, two types of errors
Channels namely Gaussian noise" and
0Ccur. errors that occur due to the presence of
white
transmission include thermal
() Random Error : The errors". Sources of Gaussian noise
random
aussian noise are refened to as receiving equipment, thermal noise in the channel and
transmitting and
d shot noise in the
adiation picked up by the receiving antenna. by long quiet intervals followed by
characterized
(i) Burst Error: Impulse
noise is
impulse noise are noise that arises due to lightning.
anplitude noise bursts, Examples of
such noise bursts occur, they affect more
3n man-made noise etc. When
WHChing transijents, Error".
the error caused is called Burst
than
one symbol and
296
Information Theory and Codino
5.6 TYPES OF CODES
As already mentioned in section 5.2, error control codes are divided into two broad
categories namely block codes" and"convolutional codes".
() Block Codes: Block code consists of (n - k) number of check bits (redundant hitel
code-words.These (n-k) numbe
being added to k number of information bits to form 'n' bit thesc
of check bits are "derived fromk informnation bits".[At the receiver, the check bits are used
n-bit code-words.
todetect and correct errors which may occur in the entire
Th
(ii) Convolutional Codes : In this code, the check bits are continuously interleaved nearb
with information bits. These check bits willhelp to correct errors not only in that particular
block but also in other blocks as well.
No
5.7 LINEAR BLOCK CODES
In channel encoder, ablock of 'k' message bits is encoded into a block of 'n' bits by
Imaini
adding (n k) number of check bits as shown in figure 5.2. Clearly n > k and such a code onot
formed is called (n, k) block code. These (n -k) check bits are "derived'" from k-message In
bits which will be shown in the next section.
tor (
CHANNEL
ENCODER The
MESSAGE CHECK-BITS
MESSAGE
k -k-BITS k
OR
These (n -k) number of check bits Ck+1 7+2 ......., C are derived from k-message bits
USing a predetermined rule as below :
=P,d, + P, d, + t P
C7+2 * Ppd, + P, d, t ..... (5.8)
...are either 0'sor l's and the addition above is performed using
Wnere p,u» PPi» Pa
hodulo-2 arithmetic. actually the EXCLUSIVE
the addition of two binary digits is
|In modulo-2 arithmatic, given in the following table 5.2 (a). Table 5.2 (b)
two binary digits as
OR" operation of thosemultiplication and table 5.2
Comparing
(c) modulo-2 subtraction. modulo-2
Ows the modulo-2 modulo-2 subtraction is "same' as
conclude that
Dies 5.2 (a) and (c), one can
addition).
298 Information Theory and Coding
Pi,n-k
010. . 0 P21 P22 P2.n-k
. . (5.9)
1 0 0: 1 0 1]
[G] =0 1 0: 0 1 1
|0 0 1:1 1 0
[C] = [D][G] = [d, d, d,][1 0 0 1 0 1
01 0 0 1 1
0 0 1 110|
=[d,, d,, d,, (dd), (d+d,), (4, +d))
For amessage of (d, d, d,) = (01 1)
We have [C] = [0 1110 1]
For a message of (d, d, d) = (10 1), [C] =[10101 1]
which are listed below table 5.3
In a similar wav, the other code-vectors can be found
Code Message-vector Code-vector for (6, 3)
linear block code
Name
000 000000
001110
001
010011
010
011101
011
100101
100
101011
101
110110
110
111000
111
code of example S.1
Code-vector table for (6, 3)
Table 5.3 :
Information Theory and Codine
300
It can be verified easily that the addition of any two code-vectors is a code-vector
5.3.
belonging to the same (6, 3) code, referring to table
in the above table.
For example, consider addition of C, and C,
C, +C, = (010011) + (110110)
= (100101) which is the code-vector C,.
combinations to prove that
In a similar way, the above property can be verified for other
block code.
(6, 3) code of example 5.1 is indeed a linear
PARITY CHECK MATRIX [H}:
From equation (5.11), we have the generator matrix given by
k columns (n- k)columns
Pkj
0
(ktj)" element 1
Ihis equation is true for every values of iand j and hence, in matrix form, we have
[G](H]" = 0 ....$.17)
both sides of equation (5.17) by [D], we
get
Pre-multi(D]plyin[G]
g (HJ" [D] [0] =0
But from equation (5.10), [C]-[D][(G]
[C] [HJ" = 0 (5.18)
CH" =0
LINEAR BLOCK CODES
UNCODI N G
wth Expanding
sides,
CIRCUT FOR (n,
the matrix of
we get
k)
equation (5.9) and equating the corresponding elements on
302 Information Theory and
C, = d,
C, = d,
Ck+ *P,d, + P d,
&+2* P2d, + P d, + +P
. . 5.19)
C,=Pi,n-d, tP.d, t... +P,nk
The implementation of the above equation in a circuit fashion results in the encode. t
(n, k) linear block code. Sucha realization of encoder circuit is shown in figure 5.3 consieti
of a k-bit shift register, a n-segment commutator and (n - k) number of modulo-2 adders
Message
Input d,
n-scgmeat
. Commutatot
Modulo-2
Adders
Constructthe
slution
corresponding encoding(d,td,).
circuit.(d,+d). (d, +d,))
Theccode-vector bits are given by
Since.k=3, we require a 3-bit shift
1-k=6-3= and hence we register to move the message bits into it. We have
require 3 modulo-2 adders and a 6segment
entire encoding circuit is shown in figure 5.4. commutator. The
Message
Input d, d, d,
3-bit
Shift Register Commutator
+ To
channel
Fig. 5.4: Encoding circuit for (6, 3) linear code of example 5.1
|1 0 1 1 0 01
01 1 010
||I0 0 0 1
|1 0
0 1 1
110
[HJ = 1 0 0
01 0
100101[1 0 11 1
o1
10
0 1 0
Byusing modulo-2 00
multiplication andsinceaddition,0, the syndrome is found to
S = [1 0 0
[The first syndrome bit s, is
’ S# it be
found
s, = (1.1) from represents an error.
= 10 (1.0) (0.1)
0 O 0 (0.1)> (1.0)
= 1since 0 (0.0)
Ifit is 'even' then the the total number of 1's
corresponding syndrome bit will
present is 'odd'.
Consider s, = (1.0) be 0.
(1.1) >(0.1) D>(0.0) (1.1 (0.0)
0 1 0 0 1 0
= 0the
This syndrome vector S = number of 1's is 2 which is even
n the received (100) is present in the 4h row of H' number of l's].
vector R counting from left is in matrix and hence the 4th
i. Ihe corrected error.
mtable 5.3 code-yector 110110 which is a valid transmitted
is
corresponding to a message Vector 110. code-vector as seen
NDROME CALCULATION CIRCUIT
Letthe
received-vector R (rI,... The syndrome vector Sis then given by cquation
[S] = (s S Sh-=RHT
0 1
10 0
|0 0
Byusing modulo-2 multiplication and
S= [1 0 0] ’ addition, the
(The first syndrome bit s, is since S # 0, it syndrome is found to be
found from
s, = (1.1) represents an error.
(1.0) (0.1) (0.1)
= | 0 0
00 D0 (1.0) (0.0)
=l
Iit is 'even' then the since the total number of
1's present is
Consider s, corresponding
= (1.0) (1.1) syndrome bit will be '0'. 'odd'.
= 0 (0.1) (0.0) (1.1) (0.0)
1 0D0 1 0
=0 the
Ihis syndrome vector S = number of 1's is 2 which is even
n the received (100) is present in the 4h row of H' number of 1'sl.
vector R counting from left is in
matrix and hence the 4th
Ihe corrected error.
mtable 5.3 code-vector is 110110 which is a valid transmitted
corresponding to a message vector l110. code-vector as seen
NDROME CALCULATION CIRCUIT
Letthe
mas received-vector R =([, I, ... I The syndrome vector Sis then given by cquation
S] = s, S, . . .SkJ= RH"
Bs..s,J= [r, I, ...J|P Piz Pi,n-k
P21 P22 P2,n-k
1
"
S, =rp2 t I, P2 :
P,e ......
SModulo-2 Adders
307
equation (5.22), S = s, s, s,] =RHT
From
0 1 1
11 0
1 0 0
0 1
|0 0 1
=
S S
Fig. 5.6 : Syndrome calculation circuit for (6, 3) code of example 5.1
Example 5.6 :For asystematic (7, 4) linear block code, the parity matrix Pis given by
[1 1 1]
1 1 0
[P] = 1 0
0 1 1
Find all possible valid code-vectorS.
DrAaw the correspopding encoding circuit.
single error has occurred in cach of these received vectors. Detect and correct those
errors.
- [0111110]
(c) R =[1010000].
Draw the syndrome calculation
(b) Rp [1011100]
circuit.
Information
Theory annd
308
Going
Solution
equation (5.11) as
() Thegenerator matrix (G] is given by
(G]= [ P]=[! P]
1 0 0 0: 1 1
01 0 0 : I 1 0
0 010: l 0 1
0 0 1: 0 1 1
Commutator
To
channel
S = R, H" I
=[1011100][1 1 1]
1 1 0
1 0 1
01 1
1 0 0
0 1 0
00 1
01
= [0
10]’This is present in the 6h row of H'.
Control Coding
to Error
suction
311
errOr vectorEr = [O 00001 0]
The
Correctedcode-vector = Cç = Rc+ Ec
: = [101 0000] + [O 00 00 1 01
= [1010010j
againa valid code-vector corresponding to the message
Gis vector 1010 in table 5.4.
Syndrome Calculation Circuit:
Letthereceived vector be represented, in general, by
0 1
1 0 0
0 1 0
0 0 1
S= (s,, S, S,]=[,tr,tr,tr),
The syndrome (,tr,tr,), (r,tr,tr,t,)]
calculation circuit can be easily constructed as shown in figure 5.8.
7-bit Shift Register
Received
Vector R