IRJET - High Speed Inexact Speculative Adder using Carry Look Ahead Adder...
vorlage
1. BACHELOR THESIS
Implementation and simulation of various LDPC-codes
in fast fading environments
Karim El safty
Institute for Communications Engineering
Faculty of Electrical Engineering and Information Technology
Universität der Bundeswehr Munich
August 2011
2.
3. BACHELOR THESIS
Implementation and simulation of various
LDPC-codes in fast fading environments
by
Karim El safty
supervisor: Dipl.-Ing. Stephan Ludwig
head examiner: Prof. Dr.-Ing. Berthold Lankl
August 2011
Institute for Communications Engineering
Faculty of Electrical Engineering and Information Technology
4.
5. Institut f¨ur Telekommunikationstechnik
und Angewandte Informationstheorie
Universit¨at Ulm
DIPLOMARBEIT
UN
IVERSITÄT
U
L
M
·SCIENDO
·
DOCENDO
·
C
URANDO·
Simulation eines Direct-Sequence-Spread-Spectrum Verfahrens
im Uplink einer Funkverbindung zu einem Flugobjekt
Erl¨auterungen:
F¨ur den Uplink zu einem fliegenden Objekt soll im Rahmen einer Kooperation mit einem Indu-
striepartner ein Funk¨ubertragungssystem untersucht werden. Durch die zu betrachtende hohe
Fluggeschwindigkeit ergeben sich schnelle zeitliche ¨Anderungen des ¨Ubertragungskanals (Fast
Fading). Zus¨atzlich k¨onnen gezielte St¨orungen, wie beispielsweise durch einen sinusf¨ormigen oder
einen rauschartigen Jammer auftreten. Es soll ¨uberpr¨uft werden, ob der Funkkanal ¨ahnlich wie
im Mobilfunk aber mit angepassten Parametern wie Dopplerspread und Delayspread modelliert
werden kann. F¨ur die Untersuchung sind geeignete Kanalmodellparameter festzulegen.
Das zu verfeinernde Grobkonzept benutzt ein sogenanntes Direct-Sequence-Spread-Spectrum-
Verfahren, um die Resistenz gegen gezielte St¨orungen zu erh¨ohen. Zus¨atzlich ist eine Vorw¨arts-
fehlerkorrektur zu betrachten. Als Modulationsverfahren soll MSK eingesetzt werden, um ein
gutes Ausnutzen der verf¨ugbaren Sendeleistung sicherzustellen. Im inkoh¨arenten Empf¨anger sind
sowohl eine AGC (Automatic-Gain-Control) als auch ein Rake-Empf¨anger mit Fingerauswahl
/-abschaltung vorgesehen, die im Rahmen der Arbeit jedoch noch nicht untersucht werden sollen.
Die Signalstruktur ist unter Ber¨ucksichtigung der Kanaleigenschaften, der Leistungsf¨ahigkeit von
Spreizverfahren und Codierung sowie der Modulation festzulegen. Der Einfluss gezielter St¨orer
soll vorerst nicht detailliert betrachtet werden. Es ist ebenfalls zu untersuchen, ob ein eigener
Pilotkanal sinnvoll w¨are.
Zur Untersuchung des Uplinks soll dazu ein Simulationsmodell in MATLAB erstellt werden.
Zun¨achst sind einzelne Komponenten des vorliegenden Grobkonzepts zu konkretisieren und de-
ren Einfluss im Zusammenspiel mit anderen Komponenten zu untersuchen. Abschließend ist ein
darauf aufbauendes, detailliertes Systemkonzept zu erstellen, bei dem wichtige Systemparameter
festgelegt bzw. auf sinnvolle Wertebereiche eingegrenzt werden m¨ussen. Synchronisationsanfor-
derungen sind dabei nicht zu betrachten. Ziel der Arbeit ist neben der Kanaluntersuchung der
Entwurf eines detaillierten Systemkonzepts und dessen Best¨atigung durch Computersimulation.
Abgabetermin: 30. July 2007
Bearbeiter: Stephan Ludwig
Betreuung: Prof. Dr.-Ing. M. Bossert
Dipl.-Ing. A. Hof
Katalognr.: D/2007/XL/1
9. Chapter 1
Introduction
Low Density Parity Check Code (LDPC) codes which is now one of the fa-
mous channel coding techniques were found by Robert G. Gallager a famous
coding Guru in 1960 in.Despite this early invention the implementation of
LDPC began to increase very late in the begining of the last decade.Today
they play a very important role in modern comunication systems such as
WimaX or DVB-s2. The growing importance caused the IEEE comittee to
standerdize LDPC-codes in the IEE 802.16 Standerd.This standerd formed
the base of this bachelor thesis . The simulation is being done on short block
lengths to save time over fast fading environment under Rayleigh channel
model. The choice of modulation Technique (Binary Phase Shift Key , and
differential encoding ) was a perquisite and part of the system’s specification.
The main aim of this thesis is basically oriented around measuring the per-
formance of LDPC codes.To achieve this, Bit Error Rate (BER) simulations
are presented for the Additive White Gaussian Noise (AWGN) and Rayleigh
fading channel.Furthermore the extrinsic information exchange is being
devolped with Extrinsic Information Transfar (EXIT) charts to Changing
1
10. Chapter 1 Introduction
Signal to Noise Ratio (SNR) and changing doppler frequencies.Special atten-
tion for future work is for Short LDPC codes.
The thesis is divided into 3 main chapters . The first part is the theoretical
part defining the elements of the system in question.Fundemental parame-
ters such as the encoding and decoding, the commonly used matrices ,the
channel model and modulation scheme are presented in this chapter. The
next chapter describes how the project model is handled from putting the
equations and principles researched into practice to create a model to ob-
tain simulative results. The last chapter gives an overview about the results
obtained and includes notes about specifec behavior of the code in different
scenaries.
2
11. Chapter 2
Theory
In this chapter we explain an outline of the coding techniques and different
aspects used throughout the thesis. The basic need to understand them is
essential to implement the code. However many of the techniques presented
in the theoretical part could be used from an open source library (ITPP).
The following is an overview:
Random
genration
Channel
coding Modulation Channel
DemodulationDecodoer
Bit
Showing an application flow diagram dealing with the researched transmis-
sion process
2.1 Channel Coding
In simple terms channel coding means adding redundancy bits to a bit se-
quence increasing its length, many technical approaches exist to do this. One
3
12. Chapter 2 Theory
of them is multiplying the source word with the so called generator matrix,
designed from the parity check matrix. The gotten bit-sequence furthermore
can be passed through a different encoder and a channel interleaver. The
reversing processes are necessary to decode a codeword at the receiver. The
whole aim of channel coding is to decrease the amount of errors obtained
at the receiver. A well known issue in block coding is that increased block
length offers better forward error correction. Moreover the functions of the
encoder my help retrieving the bit for example adding a parity bit will help
us quickly discover if there an error exists in a received sequence if the
parity is 0 in an even parity check and the number of 1s is odd then there is
obviously an error.
2.1.1 Generator and Parity Check matrices
: The Generator matrix G and the parity check matrix H are the main pa-
rameters of block wise channel working encoder. They are used in encoding
as well as in decoding. A very important property of generator-parity check
pair is that their product is a zero vector
G · H = 0 (2.1)
. the multiplication of the received vector R and H yields the syndrome
vector S which indicates if the sequence R is valid codeword or not. If the
syndrome consists only of zeros the received vector is a correct codeword.
Otherwise revision is needed. This however is part of the decoding process
and the decoding process of LDPC-codes is an iterative process that uses
another error correction method. A code word that is produced using a gen-
erator matrix is called linear code. An interesting property of the codeword
is that the pair wise sum of all code words is a third valid codeword. The
4
13. 2.1 Channel Coding
generator matrix of a systematic linear code mainly consists of two parts; the
parity check elements and an identity matrix that is necessary to produce
the systematic functions of the codeword. In this project the creation of the
matrix H is done by fulfilling a series of steps explained later.
2.1.2 log likelihood decoding
: The log likelihood is a property in the science of statistics used to measure
the reliability of certain information. Or in other words the probability. Here
we use the method to analyze the more likelihood for the bit received to be 1
or 0; Or in this case 1 and -1. The General Rule for log likelihood decoding:
The law of total probability:
P (A) =
Bi
P (A|Bi) · P (Bi) (2.2)
Now for the maximum likelihood approach for Binary Phase Shift Keying
(BPSK) we refer to the following series of equations: And for calculating the
bit in question xi
xi = arg max
xiε{±1}
pXi|Y (xi|y)
= arg max
xiε{±1}
∼xi
pX|Y (x|y)
= arg max
xiε{±1}
∼xi
pY |X(y|x)pX(x)
= arg max
xiε{±1}
.
∼xi
(
.
j
pY |X(y|x)pX(x))I{xεC}
(2.3)
Where P is the probability density function. Where I{xεC(H)} =
1 if HxT = 0T
0 otherwise
5
14. Chapter 2 Theory
2.1.3 Binary Phase Shift Keying
: Modulation is the process of varying one or more properties of a high-
frequency periodic waveform, called the carrier signal, with a modulating
signal which typically contains information to be transmitted. BPSKis simply
changing the "1" bit to -1 and the "0" to 1.
2.2 Low Density Parity Check code
: LDPC codes belong to the well known iterative decoded family of turbo
codes. Due to its nature of dividing the decoder into Variable Node Degree
(VND) and the Check Node degree (CND).The concept of the code came
simply from the name Low density, i.e. low number of 1 bit relative to the
size of the code. That is done to have fewer edges at each variable node.
And therefore less calculation and complexity as well as less iterations. The
encoding is quite simple we multiply the information bits by the Generator
matrix, the whole idea is in the decoding technique that uses the concept of
log likelihood in obtaining the bit:
Z = ln(
p(z|x = 1)
p(z|x = −1)
) (2.4)
Where z is the received bit For the encoding part the whole idea lies in obtain-
ing a generator matrix in which in our case we used the one implemented in
the IEEE 802.16 standard established in 1999 how this is done is explained
further in the next chapter. As for the decoding part we witness the diagram:
6
15. 2.2 Low Density Parity Check code
v1
v2
v3
v4
v5
c1
c2
c3
+
+
+
H =
1 1 1 1 0
1 0 1 1 0
0 1 0 0 1
We notice on the left the variable node and on the left the check node. And
lies in between are the edges, where number of variable nodes is the number
of columns. While the number of check nodes is the number rows and
the edges represent the 1’s in each row connected to column. The simple
diagram is called a bipartite graph and is used to decode the received bits
in the original information bits by iterating between the variable node and
the check node. If we are assuming Bit erasure channel decoding, which
is if a bit is received 0 or 1 it is received correctly and any bit with low
7
16. Chapter 2 Theory
power and cannot know about the information the bit is donated with "?",
it is quite easy without much equations needed as seen from the example :
figure taking from LDPC chapter in Modern Coding theory [TR07]
The main rule is that the sum of bits any check node must add up to 0.
And since according to Bit erasure channel if a bit is received 0 or 1 it is
8
17. 2.2 Low Density Parity Check code
received correctly; With a few iterations bits that have unknown values can
be obtained easily. For summing the bits we Use the xor table :
0 0 0
0 1 1
1 0 1
1 1 0
xor table for bits
However in this thesis where BPSK modulation technique is used we use the
multiplication table to compensate for the change in symbols :
-1 -1 1
-1 1 -1
1 -1 -1
1 1 1
Multiplication table for 1,-1 equivalent to xor table for bits
For other channel models, the messages passed between the variable nodes
and check nodes are real numbers. Which expresses probabilities and likeli-
hoods of belief? We use the Log likelihood ratio test, which simply divides
the probability of the bit being 1 (or -1 in our case here) by the bit being
zero (or 1 in our case here) under the log function. And uses the sign as
the hard decision and the magnitude as the soft decision. Meaning that the
hard decision is the actual value taken either 1 or -1 and the soft value is the
realization of that value.
9
18. Chapter 2 Theory
2.2.1 Decoding
For Decoding we divide into two parts: As for the LDPC Model: 1.Calculat-
ing values of the edge coming outside from the Variable node which is quite
easy: l = K
k=1 lk. Where lk is derived from
r =
µ(1)
µ(−1)
=
K
k=1
rk(1), µ(1) =
K
k=1
µk(1), µ(−1) =
K
k=1
µk(−1), (2.5)
reaching lk = lnrk. Where to calculate the bit’s log likelihood ł at a certain
edge from the check node side we use the equation inserting all the other
edges log likelihood łj at that node.
ł = 2tan−1
J
j=1
tanh(łj/2)
That is derived from
r =
µ(1)
µ(−1)
=
∼x f (1,x1,...,xf )
J
j=1 µj(xj)
∼x f (−1,x1,...,xf )
J
j=1 µj(xj)
,
where f (1,x1,...,xf ) = I{ J
j=1 xj =x}, continuing we finally reach:
r =
1 + j
rj −1
rj +1
1 − j
rj −1
rj +1
,
where j
rj −1
rj +1 = r−1
r+1. Assuming r = eł therefore r−1
r+1 = tanh(ł/2) or
tanh(ł/2) =
r − 1
r + 1
=
j
rj − 1
rj + 1
=
J
j=1
tanh(łj/2).
And therefore reaching
ł = 2tan−1
J
j=1
tanh(łj/2)
.
The process of calculating the edge is repeated several times until all infor-
mation is realized correctly.
10
19. 2.3 Channels
2.3 Channels
: As any transferred object, bits need a medium to carry it. In our case here
two wireless channels are analyzed and used in this bachelor topic; AWGN
and correlated Rayleigh fading channel. Y = Hx + n As we can see from the
equation the effects of the channel differ. The Gaussian noise (n) is added
the bits and makes it Gaussian distributed. The correlated Rayleigh fading
channel (H) is multiplied by the bits transferred.
2.3.1 Rayleigh fading channel
: Although AWGN channel was the center of the research, as well as mostly
used in the course of the thesis. Rayleigh fading channel was the harder part
and the part. It required more effort especially in the charts. Rayleigh fading
channel is to transfer information over the course of fast fading environment.
Moving channel for example someone talks in his cell phone while in the car.
Rayleigh fading assumes no line of sight in its model. The two main factors
the fading channel properties depends on is the Doppler frequency (the
speed of the moving device) as well as the correlation factor. The correlation
factor is by how many degree does the next received bit depends on the
earlier received bit (from the perspective of the noise multiplied not the
actual bits produced at the beginning).For example an auto correlation of
1 meaning that the noise added is a straight horizontal line. Making the
attenuation just an amplitude modification, and therefore obtaining the
original bits becomes rather easy. This however makes the channel non
memory less contradicting with theories assumed in the calculations. And
therefore as later explained a compromise has to be realized. As for the
Doppler frequency we can see in the following two graphs the difference
11
20. Chapter 2 Theory
between the noises produced from a 10Hz Doppler frequency and a 100Hz
Doppler frequency:
The Figures are taken from Wikipedia from the page for Rayleigh fading
channel.
The whole reason behind the effect of Doppler frequency on the Rayleigh
fading channel, and the reason during that during the simulation the code
12
21. 2.3 Channels
was tested for various Doppler frequencies us the concept of correlation.
Which is the dependence of each noise in a discrete time interval on the
next? And therefore the dependence of received bit on the next one. In auto
correlation or correlation factor of one for low Doppler frequency the fading
spectrum becomes an amplitude modifier of the signal transmitted rather
than altering the signal. This however is relatively useless to design, as the
assumption of such low speed moving vehicle for example (approaching
still movement) would produce an unrealistic model. Moreover this pro-
duces a memory dependent system (each bits depends on the previous one).
This however contradicts with Ten brinks assumption in calculation of the
EXIT chart of a memory less system. On the other hand non-correlation
or correlation factor of 0 results in a completely memory less system. Yet
obtaining the received information tends to be impossible. Therefore for our
simulation we use normalized Doppler frequencies ranging from 10−4 up to
10−1.
An interesting fact is that the Doppler frequency affects the intensity of the
spread spectrum, i.e. for low Doppler frequencies the distribution of the
channel is wide and gets narrower for higher Doppler as seen in the figure
above. This therefore results in a strange behavior contradicting with what’s
stated earlier is that the increase in Doppler frequency yields better BER
as seen later. The reason behind that is the wide spectrum in low Doppler
frequency puts a huge part of the code at an error zone of the spectrum (low
power). And with it is the parity bits which would be error as well meaning
that the parity will be redundant and useless. The same is for the bits that
fall in the high power zone that will be error free then the parity will be
redundant and useless as well. As for increasing Doppler frequency the high
deviation in power results in higher chance of bits falling in the high power
13
22. Chapter 2 Theory
zone or at least the parity bits correcting those in error. Highly increasing
the Doppler frequency will reverse the process to high BER. This is due to
increase in attenuation to overcome the positive effect of fast interchanging.
One proposed solution of the low Doppler frequency producing high BER is
adding an interleaver. An interleaver repeats the bits and disperses them.
This will help retrieve the bits in error if they happen to fall in the low
power zone. However the interleaver increases the block length which is
unacceptable in our model. This could be for future work. The Doppler
frequency in our system is the Normalized Doppler frequency and not the
theoretical one that’s why such constrain is put on the Doppler frequency
(cannot exceed 1) as fnormalized = fD · Ts. Where f = v ·
fc
co
.
2.3.2 Additive White Gaussian Noise
: The channel from its name is self explanatory it is an additive noise that
is a wideband or white noise with constant spectral density and Gaussian
distributed of amplitude. The model does not account for fading, frequency
selectivity, interference, nonlinearity or dispersion. However it produces
simple and tractable mathematical models which are useful for gaining
insight into the underlying behavior of a system before these other phe-
nomena are considered. The Gaussian noise is usually a natural source of
noise from radiation from the sun etc. It is usually seen as a good channel
for free space transmission such as satellites. However the model cannot
exist without the channel explained earlier the Rayleigh fading channel.
In most of terrestrial links there is dispersion multipath and interference
from other sources.// The noise factor added to the equation stated earlier
n is independent and identically distributed with zero mean and normal
14
23. 2.4 Bit Error Rate
distribution of variance σ2 determined later in the implementation chapter.
It added as a sole element to the channel function in the C++ code to design
the channel.
2.4 Bit Error Rate
: A huge measurement of performance of any coding technique is simulating
the average number of errors obtained relative to the number of bits trans-
ferred. It is a simple graph of the number of bits in error divided number of
bits generated over increasing SNR.The graph usually takes a down fall, and
as the code improves the curve gets steeper. The model for the curve is often
compared to the Shannon limit theory and curve. Usually the BER Chart for
iterative decoding schemes would take 3 different shapes as we will witness
later in the results chapter. First for low SNR the number of error bits would
be large and the decline in their rate as we increase the SNR.In the beginning
the slope resembles a horizontal line. Then the decline starts getting huge for
small change in SNR,yet a lot of iterations known as the turbo cliff (also the
waterfall region). Later the final region which attracts a lot of researchers;
the region in which the change starts getting small low BER can be obtained
in small iterations. the strange observation is that it is not at the same rate as
the previous region, researches have been divided into either understanding
the reason behind this characteristic and try to overcome, or trying to find
at what particular point this region starts so simulations could stop there,
i.e. this would be the maximum SNR to be used as further SNR would be
useless. The noise : σ2 = 1
2SNR·R Is derived from SNR=
signalpower
noisepower = S
σ2 =
Eb
Tb
B·No
2
Where B is signal bandwidth 1/Ts. And given Ts
Tb
= R where R is the code rate.
15
24. Chapter 2 Theory
Therefore SNR = 2 · Eb
No
· R And therefore σ2 = S
2·
Eb
No
·R
where the signal power
is S = 1 for BPSK modulation and Eb
No
is donated as SNR for low Eb
No
values.
2.5 EXIT charts
: EXIT is chart developed by Stephan Ten Brink as a measure of performance
of the coding technique. It is usually used when more than one decoder
is included, i.e. turbo coding. In our case the parity check nodes and the
variable nodes are both considered as two separate decoders feeding each
other extrinsic information. This is to obtain the received bits without error.
EXIT charts is simply a graph of two curves of the decoders in our case the
parity check node and the variable node. The graph is a representation of
the mutual information obtained from both sides. The graph is drawn over
different enhancement for example increasing the SNR or decreasing the
Doppler frequency. These enhancements leads to the amount of information
obtained at each iteration to increase leading to less iterations needed to
solve the error. To make an optimal code the two transfer curves need to lie
far away from each other. This observation is supported by the theoretical
result. The main factor that affects the EXIT charts that is explained further
later, is the mutual information obtained from the two nodes that are in
return a priori information to the other decoder.
16
25. Chapter 3
Implementations
This chapter tackles mainly what have been done mainly throughout the
thesis. Beginning with altering the standards and equations published in
papers used, to the code written etc.
3.1 Generating the simulation
: This chapter discusses the generation of the different elements for the
simulation. From random information bits to finding a suitable generator
matrix, up until decoding and then using this simulation to one of our two
measurements tools. Either calculate the BER or to simulate/calculate the
EXIT chart with/without Rayleigh fading channel. The process of simulation
goes down to figure 3.1 each explained separately.
Random bits Generation of random bits using simple function of size k
with values 0 or 1 and probability of each 0.5.The k is determined from the
number of columns of the H matrix generated in the next step and not the
other way around. Where k equals the number of rows in the H matrix the
number of columns in the H matrix.
17
26. Chapter 3 Implementations
Random
bits
LDPC
Encoder
Diffrential
Encoding
BPSK
Modulation
Rayleigh
fading channel
AWGN
Channel
Diffrential
DecodingReal part
LDPC
Decoder
Bit error
calculation
Figure 3.1: Sequence of steps detailed
LDPC encoder First we generate a H matrix using 802.16 IEEE standard
for rate code that uses only one input Z (in our case we used a small z = 28 to
transfer bits of size not larger than 672 bits). The size of the H parity check
matrix is determined using a pre defined permutation matrix Hb: Then an
equation that translates the permutation element by inserting an identity
matrix of size ZxZ. In each element of the permutation shifted by scale f
where f is determined by the equation:
f =
p(i,j) p(i,j) ≤ 0
p(i,j)zf
zo
p(i,j) > 0
(3.1)
Where Zo=96. Then this matrix is used using the class ldpc_code() to gener-
ate a class for encoding and decoding.
Differential encoding Differential encoding is done using a for loop by
increasing the encoded vector of size n to n+1 where d(i) the produced
vector= d(i-1) xor c(i) the encoded vector.
BPSK modulation Is simply transferring on bit per sample by changing
the 1 into -1 and the 0 to 1.
18
28. Chapter 3 Implementations
AWGN channel A predefined class in the ITPP library that takes only the
noise variance argument. Which is a factor of the SNR and the rate. The
noise: σ2 = 1
2SNR·R SNR in this case is calculated in ratio.
Rayleigh fading channel This channel is sometimes included and often
not. As for the most of the thesis it is tested once with it and once without
it. Also the channel is a predefined class that takes 1 argument that is the
normalized Doppler frequency we tend to vary it from 1x10−5 to 1x10−1.
Differential decoding Simply multiplying the elements of the resultant
vector reducing back to size n.
Real Using the real function to obtain the real part of each element.
LDPC decoding Simply using the method from the class to obtain the
decoded bits of normal size k.
Error calculating The final step is calculating the BER. We start looping
across the elements of the final transmitted bits and the generated ones. The
number of bits error is summed over all iterations and divided then by the
number of iteration to get an average of bits in error. This is only done in
the BER calculation part and not in the EXIT chart.
3.1.1 Bit Error Rate
: This subsection is a brief section outlining what is done during the process
of drawing the BER curve for different signal to noise values. The model
was explained in the previous chapter where a whole simulation process
from encoding the information bits till decoding and comparing the bits
20
29. 3.2 EXIT charts
transferred, Then we use the model to draw the graphs as shown later in
the results we draw the BER for different Doppler frequency over Rayleigh
Fading channel and with only AWGN channel and without theLDPC encoder
and decoder.This is process was simply done by removing and adding
command line no new equations were used or needed.
3.2 EXIT charts
: In this chapter we divide our work in two directions, then compare the
results together. We first calculate the mutual information thus the EXIT
charts using the properties of the parity check matrix of the LDPC code.
Then the simulated part is done using the transferred bits right after en-
coding and before decoding. We notice from the equations in the paper by
Stephan Ten Brink that the extrinsic mutual information from the check
node side ICND is constant. Moreover it is independent of neither the simu-
lated part nor the calculated as it depends only on the a priori information
IA. This in our code is just an array increasing constantly from 0 to 1 and is
used as an input.
3.2.1 Calculated part
: In the calculated part we do not simulate the code but rather use the code’s
properties. Such properties are the variable and the check node’s edges of
the LDPC code. Those are used to calculate both the IV ND and the ICND. For
the Extrinsic information of the variable node we using the following series
of equations:
21
30. Chapter 3 Implementations
a. The rule for calculation the extrinsic information from the variable node
and the check node side:
IE,V ND(IA,dv,
Eb
No
,R) = J( (dv − 1)[J−1(IA)]2 + σ2
ch) (3.2)
IE,CND(IA,dc) = 1 − J( dc − 1.J−1
(1 − IA)) (3.3)
In which σchis not the noise variance of the AWGN channel but rather the
variance of the L-channel value. So the loglikelyhood values coming out of
the AWGN channel and therefore σ2
ch = 4
noisevariance where the noise variance
is as calculated in the AWGN channel. However these equations are specific
for each variable nodes of degree dv and dc for a generalized case we use the
equation:
IE,V ND(IA,
Eb
No
,R) =
D
i=1
bi · IE,V ND(IA,dv,i,
Eb
No
,R) (3.4)
As for bi or the b vector: We first calculate the number of ones in each
column, thus creating a vector with the percentage of edges each variable
node holds. For example in our case here there were 28% of the variable
nodes with degree 2 31.6% with degree 3 and39.4% with degree 6. the same
is done for the check node instead a vector d is used where the percentage
of edges in each check node and instead using the number of 1’s in rows.
Which in our case are 63.26% for edges with degree 6 and 36.74% for edges
with degree 7.
3.2.2 Simulated Part
: Originally the EXIT chart research was divided into finding out how to im-
plement EXIT charts for AWGN channel with and without Rayleigh fading
channel as factor, But after research we found out that Ten brink and his Col-
leagues suggest equations for calculation EXIT chart’s Mutual information
22
31. 3.2 EXIT charts
for different Coding schemes depending only on the properties of the code
and without having to simulate, However Ten brink assumed only AWGN
channel. Later in another paper [Bri01] he discusses the implementation of
EXIT charts using Rayleigh fading channel by simulating the whole process
of transmitting the bits. Obtaining the EXIT was divided, after researching
into two different parts depending on the required results. As explained
later in the results there were 3 different graphs 1 for the simulated part
without Rayleigh fading channel to compare with the calculated part and
2 for Rayleigh fading channel changing the SNR for constant Doppler fre-
quency and changing the Doppler frequency over 2 or 3 values of SNR. As
a whole the equations required to obtain the Mutual Extrinsic information
are independent of Which graph was used as well as the steps taken to
obtain the probability density function used later in the equations, Yet the
difference comes in which part of the code is taken to analyze this extrinsic
information
σa = J−1
(IA).IE =
1
2
· x = 1,−1
+∞
−∞
pE(ξ|X = x)lg
2 · pE(ξ|X = x)
pE(ξ|X = −1) + pE(ξ|X = 1)
dξ
(3.5)
Where sigma as stated above is a result of the J(.) inverse function of IA which
remains in the simulated as in the calculated an input vector increasing
from 0 to 1 in constant steps. As for the Probability Density Function (PDF)
of the received bit being of value 1 or -1 we obtain this value through a
series of steps. First we do a simple simulation of bit transfer over LDPC
then differential encoding then BPSK mapping and Rayleigh fading as well
as AWGN channel and then differential decoding and obtaining the real part
and we take this obtained vector into process (LDPC decoding is unnecessary
as we only need the vector information before the decoder).We as well
23
32. Chapter 3 Implementations
take the values before differential encoding and pass them through BPSK
mapping and use them later in obtaining the probability density function.
In case of calculating the EXIT chart using simulation but over only AWGN
channel we disregard the differential encoding, we also create vectors of
type double and not complex as in that case we would be applying variance
twice resulting in inaccurate results. The PDF is then created by creating a
number of matrixes of histograms 2 for each degree (so 6 in our case) one to
calculate the probability density function of the bits over all possible sigma’s
and therefore over all possible a priori Mutual information. The matrix
is looped through each row where each row represents an element in the
extrinsic mutual information obtained finally, but after several calculations
and averaging with the other PDF of the inverse sign then summing the
average over all variable nodes. After getting the vector from the BPSK and
after the real part we use the BPSK vector to determine whether the original
bit was 1 or -1 and accordingly update the histogram by the index://
4
σ2
noise
· y + µi · (dv − 1) ·
1
2
σ(i)2
+ σ(i) ∗ (dv − 1) ∗ n. (3.6)
n=random Gaussian noise with mean 0 and variance σ2.
y=the value of the vector before decoding. dv=is the variable node de-
gree and therefore the number of edges leaving the node. This equation
comes originally from the decoding scheme of LDPC codes, to calculate
the LExtrinsic of a certain edge at one node we need all the a priori edges
information except the one at that specific edge + the information coming
from the channel to this node LCh. Therefore:LExtrinsic = LCh +
dv−1
i=1 µi + ni
LExtrinsic = LCh +
dv−1
i=1 µi +
dv−1
i=1 ni
Now the Lch = σnoise2 y Where the scaling comes from the Log Likelihood
properties. For summing µ we just multiply it by dv and the scaling factor
24
33. 3.2 EXIT charts
σ2 We add random Gaussian noise for every edge. Multiply by the number
of edges and the variance (as the rule of probabilities when adding random
numbers mean is summed which remains 0 and variance is multiplied).
Note that the + sign after value taken before decoding is - if the original
bits transferred were -1.The PDF is then obtained from the histogram as a
discrete value and part of a vector. The 6 PDF’s are then used to obtain the
extrinsic mutual information.
25
34.
35. Chapter 4
results
In this chapter we analyze and show the results obtained throughout the
project. We do that through plotting the results over various SNR’s and
Doppler frequencies using the Mat lab tool.
4.1 Bit error rate simulation
First for BER we simulate over 500 thousand iterations with SNR from 0 to
20. In the course of this simulation we obtain the following semi-logarithmic
Graph:
27
36. Chapter 4 results
0 2 4 6 8 10 12 14 16 18 20
10−6
10−5
10−4
10−3
10−2
10−1
100
SNR in dB
BER
Ts · fd,max = 10−3 Ts · fd,max = 10−2
Ts · fd,max = 10−1 Ts · fd,max = 5 · 10−3
AW GN uncoded Rayleigh channel
BER for different channels
28
37. 4.1 Bit error rate simulation
A point worth mentioning is a stopping condition was added during the
simulation of the curve that after 300 iterations. Shall the number of errors
exceed 500 then we could say fairly that its reliable enough estimate of
the BER. And then we terminate the simulation. Often in low SNR’s the
breaking point is reached fast. And therefore we save a lot of time. For high
SNR’s however where error correction is much higher it might simulate up
to 5000 iterations before the stopping condition would be realized.
In the graph of the AWGN the simulation is done over SNR up to 20 dB as
well. However with only the AWGN channel, increasing the SNR slightly
decreases the noise variance enormously. This leads to fast disappearing
of the noise and therefore errors after a slight increase in SNR. The graph
includes measurement across different elements: First we compared the
Coded and un-coded transmission system for BER (i.e. with and without
LDPC encoder and decoder). And we do that for both Rayleigh fading
channel as well as AWGN channel alone. Then for coded system we change
the Doppler frequency ascending to witness improve in the behavior of the
BER which was explained earlier in the theoretical part.
However as also mentioned before increasing the Doppler frequency beyond
a certain limit the effect gets reversed and therefore we see this behavior:
29
38. Chapter 4 results
0 2 4 6 8 10 12 14 16 18 20
10−4
10−3
10−2
10−1
100
SNR
BER
fd,max = 1 · 10−1
fd,max = 3 · 10−1
Elaborating the weird behavior of the Rayleigh channel
4.2 EXIT charts simulation
In this part we analyze the results obtained for simulating as well as calcu-
lating the EXIT obtained from both the variable node and the check node
side vs. the a priori mutual information. Here we see a graph of the simu-
lated and calculated EXIT charts: The graph is divided into 21 curves 10 for
the simulated mutual information from the variable node side, ten for the
calculated ones and one for the mutual information from the check node
30
39. 4.2 EXIT charts simulation
side. Those graphs are all done over SNR from 1 to 10 dB, against the a
priori inserted manually from 0 0.99 in steps of 0.01.
31
41. 4.2 EXIT charts simulation
Comparison of simulated and calculated results.
And the legend is:
Green is the mutual information for the check node side for all SNR’s and
for both simulated and calculated (as mentioned before that the check node
only depends on Ia and not the variance. Therefore it doesn’t change for
different SNR and doesn’t require actual simulation of the code to obtain it.
Hence the same result for simulated as well as calculated).
Blue Dots is the graph for the extrinsic information vs. the a priori from the
variable node side for the simulated code.
Red is the graph for the extrinsic information vs. the a priori from the
variable side for the calculated code.
As shown in the graph the simulated and the calculated curves show almost
identical results both increasing the gap with the mutual information from
the check node side as SNR increase. Yielding less iteration required to
obtain full information of the transmitted bits.
The curve of the simulated part assume only AWGN channel to match the
conditions enforced on the calculated part. Yet the results were also obtained
over Rayleigh fading channel for different Doppler frequency and SNR’s as
shown below:
First for Doppler frequency of 10−3dB we analyze the results of the variable
node degree over increasing SNR from 1 dB to 10 dB.
33
43. 4.2 EXIT charts simulation
SNR Increasing for constant normalized Doppler frequency
Then the result across different Doppler frequencies is analyzed for SNR’s 0
, 10 and 20.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
a priori Mutual information
ExtrinsicMutualinformation
fd,max = 10−5SNR = 10
fd,max = 10−5SNR = 20
fd,max = 10−4SNR = 10
fd,max = 10−4SNR = 20
fd,max = 10−3SNR = 0
fd,max = 10−3SNR = 10
fd,max = 10−3SNR = 20
fd,max = 10−2SNR = 0
fd,max = 10−2SNR = 10
fd,max = 10−2SNR = 20
fd,max = 10−1SNR = 0
fd,max = 10−1SNR = 10
fd,max = 10−1SNR = 20
fd,max = 10−5SNR = 0
fd,max = 10−4SNR = 0
Changing both Doppler frequency and SNR.
35
44. Chapter 4 results
We notice a quite random result in the last graph and that is mainly ex-
plained as when the SNR increase beyond the effect of AWGN and the effect
depends solely on the Rayleigh fading channel.
36
45. Chapter 5
Conclusion
Several researches were made to choose an appropriate standard among
those where the DVB-s2 standard ,the WimaX standard and the 802.11n
standard. But all failed to measure up to the requirements of this bachelor
project. Among those was using a small size of info bits, mainly to speed
up the simulation as normally with the perfect 802.16 standard simulation
could take up to an half a day. After that the process of the bachelor started
by using Code blocks program in Ubunto operating system. To implement
C++ code to simulate a whole message transmission , using BPSK modula-
tion technique, AWGN and ray Leigh fading noise channels. Measurement of
the performance included EXIT charts as well as Bit error rate vs. SNR plot-
ting. The thesis succeded to achieve results near shannon limit for bit error
rate.Furthermore we devolped simulataed results similer to the calculated
ones.
37
49. Bibliography
[Bri01] Stephan ten Brink. “Convergence Behavior of Iteratively Decoded
Parallel Concatenated Codes”. In: IEEE TRANSACTIONS ON COM-
MUNICATIONS 49 (2001).
[TR07] T.RICHARDSON and R.URBANKE. Modern Coding Theory. Cam-
bridge University Press, 2007.
41