Vous êtes sur la page 1sur 157

Abstract

The concept of OFDM is not new but receiver designs are constantly im-
proved. With new advances in DSP technologies, OFDM has become pop-
ular for the reasons of ecient bandwidth usage and ease of synthesis with
new DSP technology. However, it is sensitive to synchronisation error and
has a relatively large peak to average power ratio. This thesis will provide
an over all look into OFDM systems and its developments. It will also look
into the challenges OFDM faces and concentrate on two main aspects of an
OFDM receiver design, channel estimation and equalization.
i
ii CHAPTER 0. ABSTRACT
Acknowledgements
We would like to thank Dr Choi for providing our team with guidance and
sharing his wisdom in learning with us, and especially for introducing us
to our thesis topic. We have really enjoyed learning about OFDM. Many
thanks to Stephen with his great help in encouragement, LaTeX and signal
processing concepts. Thanks also to Alfred and Buu for support in the thesis
labs which were at times stressful and frustrating but the more worthwhile
in the end. Last but denitely not least, we would like to thank Du. We
wish you the very best and know you will do well in the future.
iii
iv CHAPTER 0. ACKNOWLEDGEMENTS
Forward
James Shen
This thesis was dicult to do, particularly from scratch. My goal was to
get a thorough understanding of the fundamentals of OFDM and its under-
lying intricacies.
It is hard to come by materials which explain concepts without needing a
high degree of prior knowledge. I have waged through much material only
to have them become much clearer towards the end of this thesis. In such, I
have tried to layout this thesis from rst principles.
I believe the basic principals are most important. One cannot design a good
OFDM system without having a great deal of understanding and a feeling for
the how it all works. It is most important to ask yourself quality questions to
get quality answers. I enjoyed this thesis and have learnt much, more than
just the maths too.
Mathew Liu
At the beginning of this thesis, I had no idea what OFDM was. From study-
ing this thesis, I have been able to witness its widespread application to
telecommunications engineering.
Along this journey to discovering OFDM, I have also learn a lot of useful
concepts in maths and signal processing that I should have learnt already
during my 5 years here at university. I have found that this thesis has pro-
vided the perfect opportunity to really actually learn something before you
graduate.
Also i would just like to mention our website at http://www.geocities.com/ofdm99.
v
vi CHAPTER 0. FORWARD
This website was started as a means of communication between group mem-
bers and contains a comprehensive list of references, as well as a diary of our
tasks for this thesis.
I hope you will enjoy and learn much about OFDM from reading this thesis.
Contents
Abstract i
Acknowledgements iii
Forward v
1 Introduction 1
2 Background 3
2.1 DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Zero Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Nyquist and Shannon . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Nyquist Condition for Zero ISI . . . . . . . . . . . . . . . . . . 8
2.6 Random Processes . . . . . . . . . . . . . . . . . . . . . . . . 10
2.6.1 Time Averages . . . . . . . . . . . . . . . . . . . . . . 11
2.7 Linear Prediction . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.8 Wiener Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.9 Multipath Channels . . . . . . . . . . . . . . . . . . . . . . . . 14
2.9.1 Power Delay prole . . . . . . . . . . . . . . . . . . . . 15
2.9.2 RMS Delay Spread . . . . . . . . . . . . . . . . . . . . 15
2.9.3 Coherence Bandwidth . . . . . . . . . . . . . . . . . . 15
2.9.4 Coherence Time . . . . . . . . . . . . . . . . . . . . . . 16
2.9.5 Doppler Spectrum . . . . . . . . . . . . . . . . . . . . 16
2.9.6 Fading in Multipath . . . . . . . . . . . . . . . . . . . 16
3 OFDM basics 19
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Advantages / Disadvantages . . . . . . . . . . . . . . . . . . . 20
3.3 Multicarrier vs Single carrier . . . . . . . . . . . . . . . . . . . 20
3.4 Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
vii
viii CONTENTS
3.4.1 OFDM sub-carriers . . . . . . . . . . . . . . . . . . . . 21
3.4.2 OFDM Spectrum . . . . . . . . . . . . . . . . . . . . . 22
3.5 Cyclic Prex / Guard Interval . . . . . . . . . . . . . . . . . . 23
3.5.1 Inter symbol Interference . . . . . . . . . . . . . . . . . 24
3.5.2 Inter carrier Interference . . . . . . . . . . . . . . . . . 24
3.6 IDFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.7 OFDM Transmitter Block . . . . . . . . . . . . . . . . . . . . 25
3.8 OFDM Receiver Block . . . . . . . . . . . . . . . . . . . . . . 25
4 OFDM Simulation Model 27
4.0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 27
4.0.2 The Simulation . . . . . . . . . . . . . . . . . . . . . . 28
4.0.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . 36
5 Channel Estimation 41
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2 System Environment . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.1 Wireless . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.2 Multipath Fading . . . . . . . . . . . . . . . . . . . . . 42
5.2.3 Fading Eects due to Multi-path Fading . . . . . . . . 42
5.2.4 White noise . . . . . . . . . . . . . . . . . . . . . . . . 43
5.3 Channel Model . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.3.1 Rayleigh Distribution . . . . . . . . . . . . . . . . . . . 45
5.3.2 Power Delay Prole . . . . . . . . . . . . . . . . . . . . 46
5.3.3 AWGN . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.3.4 Channel Synchronisation . . . . . . . . . . . . . . . . . 47
5.3.5 Assumptions on channel . . . . . . . . . . . . . . . . . 48
5.4 Pilot Based Channel Estimation . . . . . . . . . . . . . . . . . 48
5.5 Least Squares Estimator . . . . . . . . . . . . . . . . . . . . . 48
5.6 Linear Minimum Mean Square Error Estimator . . . . . . . . 49
5.7 Wiener Optimum Filters . . . . . . . . . . . . . . . . . . . . . 51
5.8 Optimal Rank Reduction using Singular Value Decompositions 51
5.8.1 Singular Value Decompositions . . . . . . . . . . . . . 52
5.9 Simulation Results and Comparisons . . . . . . . . . . . . . . 52
5.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6 Equalization 55
6.1 Introduction to Equalization . . . . . . . . . . . . . . . . . . . 55
6.2 Linear Equalization . . . . . . . . . . . . . . . . . . . . . . . . 56
6.3 Zero-Forcing Equalizer . . . . . . . . . . . . . . . . . . . . . . 57
6.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 57
CONTENTS ix
6.3.2 Implementation and Results . . . . . . . . . . . . . . . 59
6.4 LMMSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 63
6.4.2 Implementation and Results . . . . . . . . . . . . . . . 65
6.5 Adaptive Equalization . . . . . . . . . . . . . . . . . . . . . . 66
6.6 Method of Steepest Descent . . . . . . . . . . . . . . . . . . . 66
6.7 LMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.7.1 Adaptation Algorithm . . . . . . . . . . . . . . . . . . 68
6.7.2 Implementation and Results . . . . . . . . . . . . . . . 69
6.8 RLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.8.1 Least Squares . . . . . . . . . . . . . . . . . . . . . . . 73
6.8.2 Adaptation Algorithm . . . . . . . . . . . . . . . . . . 74
6.8.3 Implementation and Results . . . . . . . . . . . . . . . 76
6.9 Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7 Synchronisation 81
8 Further Research 83
9 Conclusion 85
Appendix A 91
Appendix B 97
Appendix C 103
Appendix D 109
Appendix E 115
Appendix F 119
Appendix G 123
Appendix H 127
x CONTENTS
List of Figures
2.1 DFT axes mapping. . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Zero padding in the time domain. . . . . . . . . . . . . . . . . 7
2.3 Inter-symbol interference in eye patterns. . . . . . . . . . . . . 8
2.4 Scatter graph depiction. (a) Transmitted Symbols, (b) Re-
ceived Symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Harmonics which are summed to create sub-carriers. . . . . . . 22
3.2 OFDM symbol spectrum. . . . . . . . . . . . . . . . . . . . . . 23
4.1 OFDM simulation block diagram. . . . . . . . . . . . . . . . . 29
4.2 Signal at (B). . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3 Signal at (E). . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.4 Signal at (F). . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.5 Signal at (G). . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.6 Signal at (G)/(H). . . . . . . . . . . . . . . . . . . . . . . . . 36
4.7 Signal at (G)/(H). . . . . . . . . . . . . . . . . . . . . . . . . 37
4.8 Signal at (J). . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.9 Signal at (N). . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.1 Parallel Gaussian channels. . . . . . . . . . . . . . . . . . . . . 43
5.2 Resampling a non-sample-spaced channel extends the channel
length. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.3 An example of block based pilot information. . . . . . . . . . . 49
5.4 Block diagram of the rank-p channel estimator. . . . . . . . . 53
6.1 Linear transversal lter. . . . . . . . . . . . . . . . . . . . . . 56
6.2 Zero-forcing equalizer block diagram. . . . . . . . . . . . . . . 58
6.3 OFDM Zero-forcing equalizer block diagram. . . . . . . . . . . 60
6.4 OFDM Zero-forcing equalizer block diagram for simulation. . . 60
6.5 Diagram of 3 types of symbol sequences. . . . . . . . . . . . . 61
6.6 Error of Zero-forcing equalizer over 10 OFDM symbols. . . . . 62
6.7 OFDM Zero-forcing equalizer BER vs SNR (dB). . . . . . . . 63
xi
xii LIST OF FIGURES
6.8 LMS equalizer block diagram. . . . . . . . . . . . . . . . . . . 69
6.9 LMS equalizer tracking over rst symbol. . . . . . . . . . . . . 70
6.10 Error sequence over the rst OFDM symbol. . . . . . . . . . . 71
6.11 Error sequence of LMS tracking over 10 OFDM symbols. . . . 72
6.12 RMS equalizer block diagram. . . . . . . . . . . . . . . . . . . 77
6.13 RLS tracking over rst OFDM symbol. . . . . . . . . . . . . . 78
6.14 Error sequence of RLS tracking over rst OFDM symbol. . . . 79
6.15 LMS vs RLS in tracking 5 OFMD symbols. . . . . . . . . . . . 80
Chapter 1
Introduction
Where did it begin?
In 1966 Robert W. Chang published a paper on the synthesis of ban-
dlimited orthogonal signals for multichannel data transmission [7]. It de-
scribes a method in which signal can be simultaneously transmitted through
a bandlimited channel without ICI (Interchannel Interference) and ISI (Inter-
symbol Interference). The idea of dividing the spectrum into several channels
allowed transmission at a low enough data rate to counter the eect of time
dispersion in the channel. As the subchannels are orthogonal they can over-
lap providing a much more ecient use of the available spectrum.
In 1971, S.B. Weinstein and P.M. Ebert introduced the DFT (Discrete
Fourier Transform) to perform the baseband modulation and demodulation
[9]. This replaced the traditional bank of oscillators and multipliers needed
to create and modulate onto each subcarrier.
In 1980, A.Peled and A. Ruiz introduced the cyclic prex [8].This takes
the last part of the symbol and attaches it to the front. When this extension
is longer than the channel impulse response, the channel matrix is seen as
cirulant and orthogonality of the subcarriers is maintained over the time
dispersive channel.
OFDM is currently used in European Digital Audio Broadcasting (DAB).
OFDM is used in DSL (Digital Subscriber Line) where it is know as DMT
(Discrete Multitone). It is used in the European standard Hyperlan/2 and
in IEEE 802.11a.
This thesis will explore concepts and designs which have already been
established and look into some newer technologies. However, we will concen-
trate on what really makes an OFDM system work, for which a certain degree
of knowledge and understanding of signal processing and digital communi-
cations is necessary. From here, we will launch into important background
information which did take a somewhat long time to understand. I hope you
1
2 CHAPTER 1. INTRODUCTION
will nd the explanation clear and insightful!
Chapter 2
Background
This chapter explains the main concepts needed to understand an OFDM
system. The principles behind OFDM are quite simple but it is important
to thoroughly understand these. It is the basics we have spent most time to
understand. The following background sections are not frequently referenced
as they are mostly basic open knowledge which we attempt to insightfully
explain.
2.1 DFT
The DFT is no doubt one of the most important components of the OFDM
system. It replaces the need for the large carrier banks of traditional multi-
carrier systems. Refer to Chapter 3.
One cannot hope to understand any further concepts without a thorough
understanding of the foundations, particulary in the DFT. I will attempt to
explain the DFT in an intuitive and insightful way.
Music notes are made up of sinusoids of harmonics of a fundamental fre-
quency. In wireless communications, carriers are sinusoids. The motivation
of the DFT is to project a signal onto a basis that is made up of such har-
monics. This provides great insight into why the DFT matrix looks like it
does. Further more, sinusoids of dierent harmonics are orthogonal to each
other. This is a very important characteristic for the basis of the DFT. This
orthogonal criterion is as follows
_
T
0
sin(
2kt
T
) sin(
2lt
T
) dt =
_
T
2
(k = l and k, l ,= 0)
0 (k ,= l and k, l ,= 0)
(2.1)
It is not usually conventional, but let us rst take a look at the DFT ma-
trix. The DFT matrix is made up complex exponentials and is common and
3
4 CHAPTER 2. BACKGROUND
conveniently dened as
W
N
=
_

_
1 1 1 1
1 e
j2/N
e
j2/N
e
j2(N1)/N
1 e
j4/N
e
j8/N
e
j22(N1)/N
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 e
j2(N1)/N
e
j2(N1)/N
e
j2(N1)(N1)/N
_

_
(2.2)
where N is the size of the DFT. Noting that
W
k
N
= (e
j2/N
)
k
= e
j2k/N
(2.3)
where k is the frequency index and that W
k
N

k=0,1,...,N1
are the N complex
roots of unity. So now let us dene
w
k
[n] = W
nk
N
= e
j
2nk
N
(2.4)
This allows us to express the DFT as
X[k] = x, w
k
) (2.5)
and the inverse as
x =
1
N
N1

k=0
X[k]w
k
(2.6)
This formulation provides great insight into the DFT operation! We can see
that the vectors w
k
form the basis of the set of the N input sequence x. As
mentioned before, the basis is orthogonal as w
i
, w
j
) = 0 for i ,= j.
We can even dene orthonormal basis sets but we will not do that at this
stage.
So in all, the DFT is conventionally expressed as
X[k] =
N1

n=0
x[n]e
j
2nk
N
, 0 k < N (2.7)
x[n] =
1
N
N1

k=0
X[k]e
j
2nk
N
, 0 n < N (2.8)
Since DFT has only nite support, 0 n < N, it is a sampling of the true
Fourier Transform x() of the input sequence x(t).
Let us now nish o by describing how the samples in the time domain
map to the samples in the frequency domain. See Figure 2.1 As you can
see above that the highest positive frequency is the Nyquist frequency at
2.2. CONVOLUTION 5

x[k]
N 1 0
0
t
k k
X[k]
+f f
N 1 N/2 0
0
f
f = N/2T
DFT
T
f = 2/T
f = 1/T
Figure 2.1: DFT axes mapping.
sample number N/2. Note that in Matlab, when mapping the frequency
axis, if you put an array [f1 f2] dened as f1 = 1/T:1/T:N/(2*T); f2
= -N/(2*T):1/T:-1/T; what you will actually see in the graph is a correct
mapping but Matlab will just simply reorder the axes from negative to posi-
tive. The point is, as long as you map the axes correctly, you will avoid much
trouble.
2.2 Convolution
The concept of convolution is important because the property of circular
convolution will come into play. We all know that a property of the Fourier
transform is that multiplication in the frequency domain has the eect of
convolution in the time domain. Meaning
y =

h() x() y[n] = (h x)[n] (2.9)
where convolution is dened as
(h x)[n] =

x[i]h[n i] (2.10)
Convolution of two discrete sequences of length M and N results in a se-
quence of length M +N 1.
The DFT has a similar but dierent property. Multiplication in time
results in a circular convolution in the frequency domain and produces a
sequence of length N for a DFT dened by 0 n < N. This is a property
6 CHAPTER 2. BACKGROUND
important in the use of the Cyclic Prex that will be described in greater
detail in Section 3.5. So we have
y =

h() x() y[n] = (h x)[n] (2.11)
where convolution is dened as
(h x)[n] =
N1

k=0
x[k]h[(n k)modN] (2.12)
As you can see, what basically happens is that the summation is wrapped
around by the mod function. When we start summing at indexes greater
than N, we just go back to the start. This makes perfect sense as otherwise
there would be a loss of information if we were to chop o convolutions in at
N with which the DFT supports.
2.3 Zero Padding
Zero padding has interesting properties which are used in our system. The
importance of zero padding in relation to the DFT is that the DFT is discrete
and nitely supportive. Thus we need at times, we may need to increase sam-
pling rates for better resolutions of signals. Sampling rates can be changed
by a rational factor
M
u
M
d
. This can be done by rst interpolating at M
u
and
then decimating at M
d
. It could be done in the reverse but that would lead
to a loss of too much information.
Zero padding can be used in achieve the same eect when a higher reso-
lution is needed in the frequency domain. Zero padding in the time domain
gives what is called spectral interpolation. In the time domain, zero padding
at the end of a signal results in the increase in spectral samples which are
samples of the true Fourier transform. This provides higher resolution. An
example is shown in Figure 2.2
Zero padding in the frequency domain has two distinct dierences. Firstly,
we zero pad after the Nyquist frequency at N/2 samples. This is because it
is the highest positive frequency and we can maintain spectral symmetry in
doing so. Secondly, we obtain a time domain sequence which has a reduced
amplitude. This easily be x by a multiplication of a constant gain of M
u
.
2.4 Nyquist and Shannon
Heres a bit of history to lead us into the next section. Nyquist set out to
nd the optimum pulse shape bandlimited to W Hz which maximized the
2.4. NYQUIST AND SHANNON 7
0 5 10 15 20 25 30 35
0
0.5
1
32 point Hanning window
a
m
p
l
i
t
u
d
e
0 5 10 15 20 25 30 35
0
10
20
32 point FFT
a
m
p
l
i
t
u
d
e

d
B
0 20 40 60 80 100 120 140
0
0.5
1
132 point Hanning window
a
m
p
l
i
t
u
d
e
0 20 40 60 80 100 120 140
0
10
20
132 point FFT
a
m
p
l
i
t
u
d
e

d
B
Figure 2.2: Zero padding in the time domain.
bit rate over a bandlimited telegraph channel without ISI (Inter Channel
Inteference).
His ndings led him to what is now called the Nyquist rate, that is the
maximum pulse rate 2W pulses/s. This pulse rate was found to be achieved
by sinc interpolation, that is using a pulse (sin2Wt)/2Wt. This is also
how we may obtain f(t) from x[n], where f(t) is the true Fourier transform
of x[n]. This is called the Nyquist Cycle.
Shannon derived limits for digital communications systems and estab-
lished foundations in information transmission. He incorporated transmis-
sion power, bandwidth and noise into what is called the channel capacity.
An ideal band-limited channel with white Gaussian noise and bandwitdh W
has a caapcity C given by
C = Wlog
2
(1 +
P
WN
o
) bits/s (2.13)
8 CHAPTER 2. BACKGROUND
Here, P is the average transmitted power and N
o
is the PSD (Power Spectral
Density) of the white noise.
2.5 Nyquist Condition for Zero ISI
The amount of inter-symbol interference can be viewed through what is
commonly called eye patterns, shown in 2.3. Two dimensional digital
eye patterns are commonly known as scatter graphs, shown in Figure 2.4.
They compare the constellation of the original transmitted symbols to that
of the received ones.
Sampling time
Noise margin Peak distortion
Timing error sensitivity
Figure 2.3: Inter-symbol interference in eye patterns.
Lets now have a look at an expression for inter-symbol interference[3,
p.554]. I rst hesitated to put this in because the maths is not very insightful
but the formulas in its form will be seen again. When we receive a signal it
can be expressed as
y(t) =

n=
x
n
g(t nT) +v(t) (2.14)
where g(t) represents the overall channel lter, x
n
the input sequence and
v(t) a noise sequence.
If y(t) is samples now at t = kT +
0
, k = 0, 1, ..., then we have
y(kT +
0
)

n=0
x
n
g(kT nT +
0
) +v(kT +
0
) (2.15)
2.5. NYQUIST CONDITION FOR ZERO ISI 9
(b) (a)
Figure 2.4: Scatter graph depiction. (a) Transmitted Symbols, (b) Received
Symbols.
which can be written simply as,
y
k

n=0
x
n
g
kn
+v
k
, k = 0, 1, ... (2.16)
here
0
is the delay through the channel. We can now re-write this as
y
k
= g
0
_
x
k
+
1
g
0

n=0, n=k
x
n
g
kn
_
+v
k
, k = 0, 1, ... (2.17)
For the sake of convenience, we now set g
0
= 1 and we get
y
k
= x
k
+

n=0, n=k
x
n
g
kn
+v
k
, k = 0, 1, ... (2.18)
And nally, this is the form we want to arrive at because the rst term x
k
represents the desired symbol and more importantly the second term

n=0, n=k
x
n
g
kn
(2.19)
represents the ISI. v
k
is the additive noise at the sampling instant k.
The condition for no inter-symbol interference is
p(t = nT) x
n
=
_
1 (n=0)
0 (n = 1, 2, ..)
(2.20)
for a pulse shape p(t) and a sampling period of T. There are long mathe-
matical proofs that provide further insight. But the principal is really quite
simple and intuitive.
10 CHAPTER 2. BACKGROUND
Picture sampling a signal at period T. To change this discrete signal into
an analog signal, we can introduce a convolution with a pulse shape. This
pulse shape obviously needs to have nulls at all other sampling points other
than the current sampling point for which we are shaping. Otherwise we will
be interfering with other symbols.
This condition is know as the Nyquist pulse shaping criterion or the
Nyquist condition for zero ISI. What has been shown is
p(t)

k=
(t kT) =

k=
p(kT)(t kT) = (t) (2.21)
This just demonstrates the recovery of the samples as explained earlier. It
basically follows the previous criteria. From here, we can do a Fourier trans-
form to obtain

m=
P(f
m
T
) = T (2.22)
So it follows that the smallest theoretical bandwidth to obtain 0 ISI is W =
1/2T. This would obtained by using the ideal bandlimited sinc-pulse. In the
frequency domain, it is always symmetrical with respect to 1/2T.
2.6 Random Processes
This section has been included because our signals, channel and interferences
need to be characterized in some statistical sense and standard notation. So
lets dene some of the terms to get us familiar with the underlying statistics
behind our OFDM system.
Firstly, what is a stochastic process? A stochastic process is a random
process that generates a random variable at any given instant of time. A
random variable is only but a single realization of all the possible samples or
sample functions. The entire set of all possible sample functions is termed
the ensemble. This is in general often assumed to be innite in size and all
we can do is to estimate this for which there are statistical averages to do so.
We will always denote random variables in capitals. Now lets take a
sequence of random variables X
t
, t = n, n+1, ..., m from a stochastic process
X(t). If we take another sequence of an arbitrary time shift k and if the joint
PDFs X
t
and X
t+k
are identical, then we say that original stochastic process
is stationary.
What is a PDF? Well, the Probability Distribution Function can be
characterized by a funciont F(x) of the random variable X where we consider
2.6. RANDOM PROCESSES 11
X x where x '. Then we can write
F(x) = P(X x), < x < (2.23)
2.6.1 Time Averages
Now that we have said that these ensembles are generally innitely large, how
can estimate them? Lets rst take a look at some denitions that require
averaging over the innite length ensemble and then rene it to its estimates.
We shall restrict our attention to WSS random processes. Wide-Sense
Stationary (WSS) is just the property of having stationary mean and autocor-
relation functions. You most probably will come across the termmean ergodic,
so lets quickly dene this. If for realizations x[n] of a random process X[n],
the time average m
x
is always be found to be equal to the ensemble average

X
, then the random process is said to be mean-ergodic. The time average
of a specic realization can be dened as
m
x
= lim
N
1
2N + 1
N

n=N
x[n] (2.24)
Now the autocorrelation for realizations x[n] of process X[n], can be dened
as
r
xx
[m] = lim
N
1
2N + 1
N

n=N
x[n]x[n m] (2.25)
This is the correlation ergodic random process which will always result in the
same sequence for the underlying random process. Note here that r
xx
[n] is
calculated from a single realization whereas R
XX
[m] is a statistical property
of the underlying random process.
Now we are able to look at what is called Biased and Unbiased estimates
of R
XX
[m]. For a sequence x[n] for 0 n < N, the unbiased estimate is as
follows
r
unbiased
xx
[m] =
1
N [m[
N1m+max(0,m)

n=max(0,m)
x[n]x[n m], [m[ < N (2.26)
This is said to be unbiased because the average is taken over all outcomes
x[n].
Another estimate can be formed and that is of the biased estimate
r
biased
xx
[m] =
1
N
N1m+max(0,m)

n=max(0,m)
x[n]x[n m], [m[ < N (2.27)
12 CHAPTER 2. BACKGROUND
2.7 Linear Prediction
I believe this section is worth talking about since it leads directly into Wiener
lters and all other lters we will deal with. We will see the famous normal
equations which is really just a solution to a second order problem of min-
imising mean square errors. Hence, this solution and its many forms are
basically seen everywhere!
The aim of linear prediction is to predict a future sample of a random
process. How is this possible? We try to nd a set of coecients a
1
, a
2
, ..., a
N
of past values which will minimize the prediction error e[n]. Lets write some
equations
x[n] =
p

i=1
a
i
x
ni
(2.28)
here x[n] is the prediction of the actual value of x[n]. The prediction error
sequence e[n] is commonly known as the innovations sequence as it has
fundementally new information.
e[n] = x[n] x[n] (2.29)
What we now want to do is to minimize expected squared prediction er-
ror. We will use X[n] since we want to nd coecients that work for the
underlying random process X[n].
E[(X[n]

X[n])
2
] = E
_
_
_
X[n]
N

i=1
a
i
X[n i]
_
2
_
_
(2.30)
Now what is called the normal equations is found by dierentiating with
respect to a
p
for each p. The derivative set to zero gives
0 =

a
p
E
_
_
_
X[n]
N

i=1
a
i
X[n i]
_
2
_
_
= 2E
_
X[n p]
_
X[n]
N

i=1
a
i
X[n i]
__
= 2E[X[n p]X[n]] 2
N

i=1
E[a
i
X[n p]X[n i]]
= 2R
XX
[p] 2
N

i=1
a
i
R
XX
[p i], 1 p N (2.31)
2.8. WIENER FILTERING 13
If we write this out in matrix form, we can see that R
XX
has a particular
structure known as toeplitz for which robust algorithm for its inverse exist.
_

_
R
XX
[0] R
XX
[0] R
XX
[N 1]
R
XX
[1] R
XX
[1] R
XX
[N 2]
.
.
.
.
.
.
.
.
.
.
.
.
R
XX
[N 1] R
XX
[N 2] R
XX
[0]
_

_
_

_
a
1
a
2
.
.
.
a
N
_

_
=
_

_
R
XX
[1]
R
XX
[2]
.
.
.
R
XX
[N]
_

_
using the notation representaion
R
XX
a = r
for which we can solve for the coecients
a = R
1
XX
r (2.32)
2.8 Wiener Filtering
We are actually not talking about sausages here but something just as in-
teresting. In linear prediction, we assume we have access to the sequence
y[n i], 1 i < N where N is the lter order, for which we predict y[n].
But in most real cases we do not have access to the original sequence. It
is usually corrupted by noise or interference when received. So what we do
now is we predict y[n] from another sequence x[n] which comes from the
process X[n]. For this to work, the random processes Y [n] and X[n] must
be correlated in some way otherwise the prediction would be of no use.
Like Linear prediction, we will try to nd the optimal coecients a
0
, .., a
N
to predict y[n].
y[n] =
N

i=0
a
i
x
ni
(2.33)
Again, we try to minimize the expected power of the error e[n] = y[n] y[n].
That is we try to minimize
E[(Y [n]

X[n])
2
] = E
_
_
_
Y [n]
N

i=0
a
i
X[n i]
_
2
_
_
(2.34)
At this point, we can dierentiate or apply the orthogonality principle with
which we can say that an optimal linear predictor will provide an innovation
E[n] which is uncorrelated with the source random variables. Note that E[n]
14 CHAPTER 2. BACKGROUND
here should not be confused with an expectation of n. It is the random
process from which the realization e[n] is made.
0 = E[E[n]X[n p]]
= E
__
Y [n]
N

i=0
a
i
X[n i]
_
X[n p]
_
= R
Y X
[p]
N

i=0
a
i
R
XX
[p i], 0 p N (2.35)
In matrix from, the expression is as follows. This should look familiar
_

_
R
XX
[0] R
XX
[0] R
XX
[N]
R
XX
[1] R
XX
[1] R
XX
[N 1]
.
.
.
.
.
.
.
.
.
.
.
.
R
XX
[N] R
XX
[N 1] R
XX
[0]
_

_
_

_
a
1
a
2
.
.
.
a
N
_

_
=
_

_
R
XX
[0]
R
XX
[2]
.
.
.
R
XX
[N]
_

_
The coecients a
0
, .., a
N
form an FIR lter. When we lter the source se-
quence x[n], we will obtain y[n]. This is simply what is known as the N
th
order Wiener lter!
2.9 Multipath Channels
The concept of multipath propagation is very simple, there is no need for
a diagram. Whenever a signal is transmitted and there are obstacles and
surfaces for reection, multiple reected signals of the same source can ar-
rive at the receiver at dierent times. Such echoes will no doubt eect
other incoming signals. These echoes are directly inuenced by the material
properties of the surface it reects or permeates. These can be relative to
dieletric constants, permeability, conductivity, thickness, etc. These echoes
can contain useful information but we will not concern ourselves with that
eld of study in this thesis.
Multipath propagation in indoor environments are traditionally modeled
using ray tracing which just calculates all the reections. If no measure
are taken to counter the echoes, then these echoes will interfere with other
signals causing ISI. We will now describe multipath with some mathematical
terminology.
2.9. MULTIPATH CHANNELS 15
2.9.1 Power Delay prole
The PDP is dened as the square absolute value of the channel impulse
response.
P(t) =
N1

k=0
a
2
k
(t
k
) (2.36)
P(t) is the PDP as a function of t, k is the lter tap index and is the
time delay. The PDP represents the relative received power in excess delay
with respect to the rst path. Power delay proles are usually found by
averaging instantaneous PDP measurements. With indoor RF channels, the
PDP of the channel is most usually an exponentially decaying function. And
of course the instantaneous frequency response of a channel can be calculated
from the PDP.
2.9.2 RMS Delay Spread
The RMS delay spread
rms
, follows directly from PDP so lets quickly dene
what it is

rms
=

_
(t )
2
P(t)dt
_
P(t)dt
where =
_
tP(t)dt
P(t)dt
(2.37)
The value
rms
can be used as a rough indication of the maximum data rate
that can be reliably supported by the channel without equalization.
2.9.3 Coherence Bandwidth
The coherence bandwidth B
coh
gives a measure of the statistical average
bandwidth for which the channel characteristics are correlated.
Let us start by dening the autocorrelation of a channel frequency re-
sponse from its statistical expectation. According to [1, p.21]
R(f) = E[H(f)H

(f + f)] =
1
1 + j2
rms
f
(2.38)
and
R(f) = E[H(f)[[H

(f + f)[ =
1
1 + (2
rms
f)
2
(2.39)
Now B
c
is dened as the value of f for which R
A
(f) has decreased with
3 dB
R(f)
R(0)
=
1
2
for which f = B
c
(2.40)
It is useful to note that for exponential delay spread channels, B
c
= 1/(2
rms
).
16 CHAPTER 2. BACKGROUND
2.9.4 Coherence Time
The coherence time T
c
is the time for which the correlation of the channel
responses decrease by 3 dB. The time correlation function is dened as
R(t) =
_
h(t)h

(t + t)dt (2.41)
As the time between two channel responses increase, the correlation generally
declines.
2.9.5 Doppler Spectrum
The Doppler spectrum can be obtained from the Fourier transform of the
time correlation function.
P
h
(f) =
_
R(t)e
j2ft
dt (2.42)
The Doppler bandwidth is dened as the 3dB bandwidth of the Doppler
spectrum.
2.9.6 Fading in Multipath
The terminology we have so far dened allows us to conveniently characterize
dierent types of channels.
The rst two are characterised in the frequency domain and the latter
two are characterised in the time domain.
Lets rst look at Non-Frequency Selective (Flat) Fading. It basi-
cally means what its name says. This channel type has linear phase which
means constant group delay. How this fading aects communication is de-
termined by the relation between the bandwidth of the signal B
s
and the
coherence bandwidth B
c
.
B
s
B
c
(2.43)
This channel type is particularly evident on OFDM systems with narrow
band subcarriers. Because each resides over a small bandwitdh, the cannel
response can be considered constant and thus at.
As opposed to the above, Frequency Selective Fading is usually re-
ferred to as wideband channel because the bandwidth of the signal is wider
than bandwidth of the channels frequency response. In frequency selective
fading, the spectral component of the signal undergoes a non constant gain
2.9. MULTIPATH CHANNELS 17
and non linear phase distortion as such the signal spectra is not preserved.
That is
B
s
> B
c
(2.44)
Let us now turn to analysing channels in the time domain. In Slow Fading
channels, the impulse response changes slowly compared to that of the symbol
period T
s
. That is
T
s
T
c
(2.45)
Fast Fading on the other hand just means the opposite. That is
T
s
> T
c
(2.46)
This means that during a single symbol period, the impulse response of the
channel may have changed more than once.
18 CHAPTER 2. BACKGROUND
Chapter 3
OFDM basics
3.1 Introduction
OFDM is a modulation technique in that it modulates data onto equally
spaced sub-carriers. The information is modulated onto the sub-carrier by
varying the phase, amplitude, or both. Each sub-carrier then combined to-
gether by using the inverse fast fourier transform to yield the time domain
waveform that is to be transmitted. To obtain a high spectral eciency the
frequency response of each of the sub-carriers are overlapping and orthogonal.
This orthogonality prevents interference between the sub-carriers (ICI) and
is preserved even when the signal passes through a multipath channel by in-
troducing a Cyclic Prex, which prevents Inter-symbol Interference (ISI) on
the carriers. This makes OFDM especially suited to wireless communications
applications.
19
20 CHAPTER 3. OFDM BASICS
3.2 Advantages / Disadvantages
OFDM has the following advantages[5, p.23-24]:
OFDM is an ecient way to deal with multipath; implementation com-
plexity is signicantly lower than single carrier with equalizer.
In relatively slow time-varying channels, performance can be enhanced
by the adaptability of the data rate according to the SNR ratio of that
sub-carrier.
OFDM is robust against narrowband interference, because such inter-
ference aects only a small number of sub-carriers.
OFDM makes single-frequency networks possible, which is especially
attractive for broadcasting applications.
On the other hand, OFDM has the following disadvantages compared to
single-carrier modulation:
OFDM is more sensitive to frequency osets and phase noise.
OFDM has a relatively large peak-to-average power ratio, which re-
duces the power eciency of the RF amplier.
3.3 Multicarrier vs Single carrier
This table compares the advantages of single carrier and multi carrier modulation[2,
p.204]:
Issue Single Multi Equivalent
Performance in Gaussian Noise x
Sensitive to impulse noise x
Sensitive to narrowband noise x
Sensitive to clipping x
Sensitive to timing jitter and phase noise x
Latency x
Computations per unit time x
Cost and power usage in analog sections x
Adaptability of bit rate x
Table 3.1: Advantages of single and multi-carrier modulation.
3.4. ORTHOGONALITY 21
3.4 Orthogonality
Two periodic signals are orthogonal when the integral of their product over
one period is equal to zero.
For the case of continuous time:
_
T
0
cos(2nf
0
t)cos(2mf
0
t)dt = 0, (m ,= n) (3.1)
For the case of discrete time:
N1

k=0
cos
_
2kn
N
_
cos
_
2km
N
_
dt = 0, (m ,= n) (3.2)
To maintain orthogonality between sub-carriers, it is necessary to ensure
that the symbol time contains one or more multiple cycles of each sinusoidal
carrier waveform. In the case of OFDM, the sinusoids of our sub-carriers will
satisfy this requirement since each is a multiple of a fundamental frequency.
Orthogonality is critical since it prevents inter-carrier interference (ICI). ICI
occurs when the integral of the carrier products are no longer zero over
the integration period, so signal components from one sub-carrier causes
interference to neighbouring sub-carriers. As such, OFDM is highly sensitive
to frequency dispersion caused by Doppler shifts, which results in loss of
orthogonality between sub-carriers.
3.4.1 OFDM sub-carriers
Each sub-carrier in an OFDM system is a sinusoid with a frequency that is
an integer multiple of a fundamental frequency f
0
. Each sub-carrier is like
a Fourier series component of the composite signal, an OFDM symbol. In
Figure 3.1, all the sub-carriers have the same amplitude and phase, but in
practice these will be modulated separately through the use of Quadrature
Amplitude Modulation (QAM). The sub-carrier waveform can be expressed
as the following equation:
s(t) = cos(2f
c
t +
k
)
= a
n
cos(2nf
0
t) +b
n
sin(2nf
0
t)
=
_
a
2
n
+b
2
n
cos(2nf
0
t +
n
), where
n
= tan
1
(
bn
an
) (3.3)
The sum of the sub-carriers is then the baseband OFDM signal:
s
B
(t) =
N1

n=0
a
n
cos(2nf
0
t) b
n
sin(2nf
0
t) (3.4)
22 CHAPTER 3. OFDM BASICS
0 200 400 600 800 1000 1200
0
1
2
Harmonics Summed To Create Parralel Data Signals.
0 200 400 600 800 1000 1200
1
0
1
0 200 400 600 800 1000 1200
1
0
1
0 200 400 600 800 1000 1200
1
0
1
0 200 400 600 800 1000 1200
1
0
1
0 200 400 600 800 1000 1200
1
0
1
Figure 3.1: Harmonics which are summed to create sub-carriers.
3.4.2 OFDM Spectrum
Our OFDM symbol is a sum of sinusoids of a fundamental frequency and its
harmonics in the time domain. The rectangular windowing of the transmitted
OFDM symbol results in a sinc function at each sub-carrier frequency in the
frequency response. Thus, the frequency spectrum of an OFDM symbol is
as shown below:
The Figure 3.2 is not the actual spectrum of OFDM. The spectrum of
each sub-carrier has been superimposed to illustrate the orthogonality of the
sub-carriers. Although overlapping, the sub-carriers do not interfere with
each other since each sub-carrier peak corresponds to a zero crossing for all
other sub-carriers.
3.5. INTER SYMBOL INTERFERENCE 23
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1
0
1
2
3
4
5
6
7
8
9
10
OFDM Symbol Spectrum
Figure 3.2: OFDM symbol spectrum.
3.5 Inter symbol Interference
Inter symbol interference (ISI) is when energy from one symbol spills over
to the next symbol. This is usually caused by time dispersion in multi-path
when reections of the previous symbol interfere with the current symbol. In
OFDM, because each sub-carrier is transmitting at a lower data rate (longer
symbol duration), this will negate the eects of time dispersion, which results
in ISI.
3.6 Inter carrier Interference
Inter carrier interference (ICI) is occurs when the sub carriers lose their
orthogonality, causing the sub carriers to interfere with each other. This can
arise due to doppler shifts and frequency and phase osets.
24 CHAPTER 3. OFDM BASICS
3.7 Cyclic Prex / Guard Interval
The Cyclic Prex is a periodic extension of the last part of an OFDM symbol
that is added to the front of the symbol in the transmitter, and is removed
at the receiver before demodulation.
The Cyclic Prex has two important benets:
The Cyclic Prex acts as a guard space between successive OFDM
symbols and therefore prevents Inter-symbol Interference (ISI), as long
as the length of the CP is longer than the impulse response of the
channel.
The Cyclic Prex ensures orthogonality between the sub-carriers by
keeping the OFDM symbol periodic over the extended symbol duration,
and therefore avoiding Inter-carrier Interference (ICI).
Mathematically, the Cyclic Prex / Guard Interval converts the linear con-
volution with the channel impulse response into a cyclic convolution. This
results in a diagonalised channel, which is free of ISI and ICI interference.
(see part ??)
The disadvantage of the Cyclic Prex is that there is a reduction in the
Signal to Noise Ratio due to a lower eciency by duplicating the symbol.
This SNR loss is given by:
SNR
loss
= 10log
10
_
1
T
cp
T
_
(3.5)
where T
cp
is the length of the Cyclic Prex and T = T
cp
+T
s
is the length of
the transmitted symbol.
To minimise the loss of SNR, the CP should not be made longer than neces-
sary to avoid ISI and ICI.
3.8 IDFT
OFDM modulation is applied in the frequency domain. The complex QAM
data symbols are modulated onto orthogonal sub-carriers. But in order to
transmit over a channel, we need a signal in the time domain. To do this,
we apply the Inverse Discrete Fourier Transform (IDFT) in the transmitter
to convert the signal from frequency domain to an OFDM symbol in the
3.8. IDFT 25
time domain. Because the IDFT is a linear transformation, the DFT can be
applied at the receiver to convert the data back into the frequency domain.
This section will provide an explanation of the IDFT / DFT and why it is a
key component of an OFDM system.
To implement the multi-carrier system using a bank of parallel oscillators
and modulators would not be very ecient in analog hardware. However, in
the digital domain, multicarrier-modulation can be done very eciently with
the current DSP hardware and software.
To do this modulation we exploit the properties of the Discrete Fourier Trans-
form (DFT) and the Inverse DFT (IDFT). From Fourier, we know that when
the DFT of a sampled time signal is taken, the frequency domain results are
the components of the signal with respect to the Fourier Basis which are
multiples of a fundamental frequency as a function of the sampling period
and the number of samples. The IDFT performs the opposite the DFT. It
takes the signal dened by the frequency components and converts them to
a time signal.
In OFDM, we compose the signal in the frequency domain. Since the Fourier
Basis is orthogonal, we just take the IDFT of the N inputs which are our fre-
quency components to convert to a time domain equivalent for transmission
over the channel.
In practice, the Fast Fourier Transform (FFT) and IFFT are used instead of
the DFT and IDFT because of their lower hardware complexity. All further
references will be to FFT and IFFT.
26 CHAPTER 3. OFDM BASICS
Chapter 4
OFDM Simulation Model
There have been a few implementations of OFDM systems done in past
theses. All of which do not really provide any insight into the system and how
it works. All are done in baseband with simple IFFT and FFT modulation
and simple Cyclic extensions and removal to obtain the original signal. This
may be due to a lack of understanding in the basics of digital modulation.
I say this because personally, I have spent many hours getting over hurdles
which were rather basic. Some of these problems and their solution are
already documented in Chapter 2 and I will not reiterate on those. Before
we look into the bandpass OFDM, a basic skeleton OFDM can be found in
Appendix A. This model does not provide great insight into the workings of
OFDM but is used as a structure for our other simulations. From here on
we will look at an OFDM simulation model that provides greater insight in
taking its symbols into the bandpass.
4.0.1 Introduction
My motivation was to use the parameters of the European standard Hyper-
lan/2 and see how they aect an OFDM system. The Hiperlan/2 standard
for wireless LAN transmissions in the 5.2 GHz frequency band makes use of
OFDM modulation with a TDMA access scheme to eciently exploit time
dispersive channels with frequency selective fading. The use and advantages
of narrowband subcarrier multi-carrier transmissions have been explored in
Chapter 3.
Looking at OFDM formulas in text books and papers intrigued me to
nd what these signals actually look like in bandpass transmission. This is
what this simulation will show.
There was no real reason for choosing Hyperlan/2 over 802.11a, which is
also another standard for wireless LAN transmissions. Their parameters are
27
28 CHAPTER 4. OFDM SIMULATION MODEL
quite similar but they work on dierent frequencies, have dierent synchro-
nisation protocol and others. The main purpose of the simulation is to see
what these signals look like at various stages in the transmission process.
Important OFDM parameters for Hiperlan/2 [16] are summarized in Ta-
ble 4.1. These parameters are incorporated into our OFDM model which can
be found in Appendix B.
Parameter Value
Sampling rate F
0
= 1/T 20 MHz
Carrier central frequency f
c
5.2 GHz
FFT size N 64
Useful symbol part duration T
U
64T = 3.2s
Cyclic prex duration T
CP
16T = 0.8s (optional 8T = 0.4s)
Symbol interval TS = T
U
+T
CP
80T = 4.0s (optional 72T = 3.6s)
Number of data sub-carriers N
SD
48
Number of pilot sub-carriers N
SP
4
Total sub-carriers N
ST
= N
SD
+N
SP
52
Sub-carrier spacing F = 1/T
U
0.3125 MHz
Nominal bandwidth B = N
ST
F 16.25 MHz
Data symbol constellations BPSK, QPSK, 16-QAM, 64-QAM
Table 4.1: OFDM parameters for Hyperlan/2.
So, here I will present my OFDM model based on Hyperlan/2 paramaters,
modulating baseband QAM symbols onto a carrier at the 2.4GHz frequency.
Hyperlan/2 actually runs at on 5.2GHz but that would mean I had to sample
at more than 10.4GHz which had taken considerable time and strained my
computer. Lets take a look at what I have done then!
4.0.2 The Simulation
To begin, we should look at a diagram of the implementation to get a general
idea of what is begin simulated.
Figure 4.1 shows the exact model of our simulation. Each part will be
explained carefully in all its intricacies. At this point I should also mention
that two downconversion methods were implemented. Downconversion is
done to take a signal from the bandpass to the baseband. This can be done
in many ways but the two implemented techniques are the LPF method and
the Hilbert. Both will be discussed later.
Please take note of the letters in Figure 4.1. Each letter corresponds to
the signal at that time. These will be used to make our model clearer as we
discuss signals and their Figures.
29
QAM
P/S
f
c
f
c
LPF Sampler
calcuation
BER
G
P
H
A
IFFT
Transmit
Filter
channel
uknown

h(w)
binary input
P/S FFT S/P
GII
GIR
QAM
demodulation
and detector
output
binary
J N
M K L
O
B C D E
F
I
modulation
Figure 4.1: OFDM simulation block diagram.
First on the diagram is the QAM modulation block. The code for this
can be found in Appendix A. It just basically takes in an arbitrary number
of bits to encode a symbol, a bit stream of data and outputs a sequence of
QAM symbols. In all our simulations, we have used 4 bits per symbol. This
constellation pattern can be seen in Figure 4.2.
The QAM modulator performs a serial to parallel (S/P) conversion au-
tomatically to feed the signal into the IFFT which is the next block. This
operation of feeding signals in parallel is because the FFT operates on sam-
ples simultaneously. The principal of using the DFT was brought up in [9]
and discussed previously in section 3.6.
I would also like to mention the use of adaptive loading in variable SNR
environments. This is discussed in [11] and would be interesting for further
research. This concerns the QAM modulator which in our case is static
as always encodes 4 bits per symbol no matter the channel quality on the
subcarrier. [11] also describes the power spectra of multi-carrier systems
which we will look into later.
Assigning data onto the sub-carriers is also subject to much debate. Hy-
perlan/2 only uses 48 data carrying carriers for an FFT of size 64. 4 sub-
carriers are used for pilot tones and the remaining are left unused. In our
simulation, we use all 64 carriers to carry data.
The spacing between these sub-carriers is determined by the sampling
frequency. To understand this, please refer to Section 2.1. It is a basic
principal of the DFT which is explained in detail.
30 CHAPTER 4. OFDM SIMULATION MODEL
3 2 1 0 1 2 3
3
2
1
0
1
2
3
4 bit QAM constellation
I
m
a
g
i
n
a
r
y
Real
Figure 4.2: Signal at (B).
Now the IFFT outputs a signal (C) which is then passed into the P/S
block. This may seem trivial but it has many implications. At rst I thought
that the signal (D) which is period in the frequency domain could be band-
pass windowed at the carrier frequency to obtain a train of sinc functions in
the time domain. This signal would be a bandpass signal already particularly
since the sinc function satises the Nyquist zero ISI criterion and would be a
natural pulse shape lter! This would also change our discrete time domain
signal to be analog. The problem with this is that the frequency samples
are complex and will introduce delays in the time domain. This is because
a phase shift in the frequency domain is equivalent to a delay in the time
domain. The periodically spaced frequency samples are most likely complex
and contain a non zero angle.
Some OFDM systems propose that the signal (C)/(D) should be real [8].
How does one generate real outputs from an IFFT? Well, it is a property of
the DFT known as the conjugate symmetry. That is the IDFT of D[n] is
real if D[n] = D

[N n] for the sequence length N.


Anyhow, this does not really suit our purpose since we can send complex
signal over the I and Q channels. This will be discussed when we come to
31
upconverting.
The signal (D) is now passed through to the GII (Gaurd Interval Inser-
tion) also commonly known as the Cyclic Prex Insertion. The implications
of this are important and is discussed in detail in Section 3.5. May papers
refer to [8] as the inventors of this method but their paper just seems to
merely state the use of it. Anyway, an OFDM symbol at (E) now has 80
samples. This is because the original symbol has 64 samples and we add the
16 cyclic extended samples to give 80.
Many OFDM systems window the signal (E). We do not do this because
we have not incorporated a cyclic postx and thus we would have attenuated
some subcarriers near the Nyquist and DC frequency The OFDM cyclic prex
is discussed in detail in section 3.5. Cyclic postxes are discussed in [5] and
in other sources because of the eects of the OFDM window operation. The
cylic postx just acts as a gaurd against the roll-o eects of windowing
without a perfect LPF. Paper [9] and in the text [5, p.65] windowing of the
OFDM is discussed in detail. The reason for windowing arises from the fact
that an OFDM (D) is made from a series of IFFTs that are concatenated
to each other. Therefore, at each symbol boundary, there will be a signal
discontinuity between the end of one symbol and the start of the next. This
can cause high frequency spectral noise which should be avoided. So that is
why a window function with some type of smooth roll-o whould be applied.
Some proposed OFDM systems use window sizes which zero cross at
the FFT Nyquist frequency[17, p.109]. This leads to distortion in the sub-
carriers near the Nyquist frequency due to attenuation by the lter roll-os.
The DC carriers may also be distorted and is commonly not used for data
transmissions.
Figure 4.3 shows the signal at (E). This signal may seem somewhat erratic
but it does have some underlying structure to it because it is basically the
output of the FFT which is a sampled version of the sum weighted harmonics.
Now, signal (E) is passed to the transmit lter where we pulse shape it
using the raised cosine pulse. This is because this particular pulse shape
satises the Nyquist criteria for zero ISI as discussed in Section 2.5. It also
converts our digital signal into a somewhat analog form and also LPF our
spectrum. You may think that passing a signal through a LPF will remove
information from the signal. Well, it is true that the signal is attenuated,
but the important thing in pulse shaping is that the sampling points actually
remain the same! This is the Nyquist zero ISI theorem once again.
We should note that before we pulse shape lter the signal, we need to
interpolate the signal so that there would be enough samples for upconverting
to the carrier frequency. We in fact need more samples than that determined
by the carrier frequency. To make all this clearer, the receiver needs to
32 CHAPTER 4. OFDM SIMULATION MODEL
0 0.5 1 1.5 2 2.5 3 3.5 4
x 10
6
0
0.2
0.4
0.6
0.8
1
Cycl. Ext. Signal (Time)
A
m
p
l
i
t
u
d
e
Time (s)
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1
x 10
7
0
2
4
6
8
Specturm of Cycl. Ext. Signal (Freq)
A
m
p
l
i
t
u
d
e
Frequncy (Hz)
Figure 4.3: Signal at (E).
sample the transmitted bandpass signal at twice the highest frequency, which
is indeed the carrier frequency. The simulation model samples at ve times
the carrier frequency. In order to do this, we need all those extra samples
and thats why we need to interpolate. The interpolation factor is determined
from
Ts = 4e-6; % Symbol period is 4e-6 seconds.
fc = 2.4e9; % Carrier freq.
Rfs = 5*fc; % Simulation frequency.
RT = 1/Rfs; % The real-time sampling period
rt = RT:RT:Ts; % The time samples in real-time bandpass
and the interpolation factor itself is given by over=size(rt)/80-1=599
which can be seen in the code accordingly.
Figure 4.4 shows the pulse shaping in action. We can see how the raised
cosine does not introduce ISI by attenuating the amplitude at the other
sample times. The spectrum of the signal shows the bandwidth of the OFDM
symbol.
33
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x 10
7
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Signal after pulse shaping.
A
m
p
l
i
t
u
d
e
Time (s)
5 4 3 2 1 0 1 2 3 4 5
x 10
11
0
1000
2000
3000
4000
A
m
p
l
i
t
u
d
e
Frequncy (Hz)
Spectrum of OFDM Symbol
Figure 4.4: Signal at (F).
Interesting things happens when this signal is upconverted to the carrier
frequency.
We cannot transmit imaginary symbols, it has no meaning, so the signal
G) is made real by taking the real components of the multiplication with a
complex carrier.
For a complex symbol a + jb, on multiplication with a complex carrier
e
jfct
and taking the real components gives
real[(a +jb)e
jf
c
t
] = real [(a +jb)(cos(f
c
t) + jsin(f
c
t))]
= real [acos(f
c
t) +ajsin(f
c
t) + bjcos(f
c
t) bsin(f
c
t)]
= acos(f
c
t) bsin(f
c
t) (4.1)
This is our bandpass signal at G) which is real. We actually need to scale
this by a factor of two, the reason for this will be made clear when we come
to downconverting the signal. So how can we split it back into its real and
imaginary parts for demodulation? This is the operation of the downcon-
verter, to bring the signal back into baseband. This was done using an LPF
34 CHAPTER 4. OFDM SIMULATION MODEL
and a Hilbert lter. We will discuss this later. Now, we will have a look at
what our bandpass signal looks like. Figure 4.5 shows the envelope structure
of the time domain signal. The solid looking component is actually a car-
rier sinusoid at the frequency of 2.4 GHz as indicated by the corresponding
spectrum graph. The time domain graph does not span an entire OFDM for
graphing purposes, otherwise we would not see it properly.
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x 10
7
1.5
1
0.5
0
0.5
1
1.5
A
m
p
l
i
t
u
d
e
Time (s)
Bandpass signal (time)
6 4 2 0 2 4 6
x 10
9
0
1000
2000
3000
4000
Spectrum of Bandpass Signal (Freq)
A
m
p
l
i
t
u
d
e
Frequncy (Hz)
Figure 4.5: Signal at (G).
Block diagrams usually show the process of downconverting to be just that
of a multiplication with a complex carrier e
jf
c
t
. This is somewhat misleading
because when we are dealing with I and Q channels multiplying e
jfct
by the
signal (G) in Equation (4.1) does not recover the original complex baseband
signal a + jb. Something more needs to be done and thats where the LPF
and the Hilbert transform comes in.
Lets just multiply our signal (G) with the complex sinusoid and see what
we get
35
(G)e
jf
c
t
= (acos(f
c
t) bsin(f
c
t))(cos(f
c
t) jsin(f
c
t))
= acos
2
(f
c
t) ajcos(f
c
t)sin(f
c
t) bcos(f
c
t)sin(f
c
t) +bjsin
(
f
c
t)
=
a
2
(cos(2f
c
t) + 1)
aj
2
sin(2f
c
t)
b
2
sin(f
c
t) +
bj
2
(1 cos(2f
c
t))
(now applying LPF to lter out the double angles above)
=
a
2
+
bj
2
(4.2)
So amazingly, we have recovered our complex baseband signal. In the fre-
quency domain however, the use of the LPF is much more intuitive. On
modulation with a carrier, we of course result in the duplication of the base-
band signal spectrum at the carrier frequency. This is because the dual of
multiplication is convolution in the frequency domain. After shifting this
spectrum back down on multiplication with e
jf
c
t
, we must remove the other
duplicate and thus the need for the LPF. We should also note here that the
recovered signal power has descreased by half the signal amplitude. For this
reason, we introduce the gain of 2 in the transmitter as previously mentioned.
Lets have a look at an LPF implementation of this in our simulation.
The LPF is designed by the Parks-McClellan optimal equiripple FIR lter
design. It is optimal in the sense with which it best approximates the desired
frequency response for a given lter order. Figure 4.6 shows the LPF in red
as it lters the relevant part of our signal. Note that in a noiseless channel,
the signal (G) (H).
Downconversion can also be done with the Hilbert transformer. This
basically splits the signal with respect to phase on reception. Thus, all we
need to do is downconvert on multiplying by e
jfct
with no need for a LPF.
Figure 4.7 shows the Hilbert lter in action on the signal (G/(H)).
Just a small note, the time domain signal in Figure 4.7 may look dierent
in this graph, it is because the Hilbert lter is in another le and the inputs
are randomly generated. The code for our OFDM system using a Hilbert
transform on reception can be found in Appendix C.
After we perform either the LPF or use the Hilbert transform and down-
conversion, we get the signal (J). Under noiseless conditions it is the same as
the pulse shaped signal found in Figure 4.4. This recovered signal is displayed
in Figure 4.8.
What we now do is sample it periodically corresponding to the discrete
signals in Figure 4.4. This is where OFDM synchronisation becomes such an
important and sensitive issue. But once sampled, we have already recovered
our baseband symbols! This is the signal at (K). All we do now is just do
36 CHAPTER 4. OFDM SIMULATION MODEL
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x 10
7
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Received Baseband Signal (time)
A
m
p
l
i
t
u
d
e
Time (s)
6 4 2 0 2 4 6
x 10
9
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Spectrum of Baseband Signal (Freq)
A
m
p
l
i
t
u
d
e
Frequncy (Hz)
Figure 4.6: Signal at (G)/(H).
the inverse of that in the transmitter and we get our QAM symbols back at
the receiver, that is signal (N). Figure ?? shows the recovered signal at (N)
without the use constellation detection.
Figure ?? is a scatter diagram showing no noise. This is because the chan-
nel was noiseless for the purposes of demonstrating the OFDM transmission
and reception technique.
4.0.3 Summary
We have taken an OFDM symbol from baseband to bandpass and back again.
This model has provided us with realizations of the signals at each stage of
OFDM syntheses. We have been able to analyse the signals both in time
and frequency to see the implications of the parameters we have used. We
hope that future thesis students who research this area may gain considerable
insight from our model and be able to take it further.
37
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x 10
7
0
0.5
1
1.5
2
Received Baseband Signal (time)
A
m
p
l
i
t
u
d
e
Time (s)
6 4 2 0 2 4 6
x 10
9
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Spectrum of Baseband Signal (Freq)
A
m
p
l
i
t
u
d
e
Frequncy (Hz)
Figure 4.7: Signal at (G)/(H).
38 CHAPTER 4. OFDM SIMULATION MODEL
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
x 10
7
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Received Baseband LPF Signal (time)
A
m
p
l
i
t
u
d
e
Time (s)
6 4 2 0 2 4 6
x 10
9
0
1000
2000
3000
4000
Spectrum of Baseband LPF Signal (Freq)
A
m
p
l
i
t
u
d
e
Frequncy (Hz)
Figure 4.8: Signal at (J).
39
3 2 1 0 1 2 3
2.5
2
1.5
1
0.5
0
0.5
1
1.5
2
2.5
Received Symbols
I
m
a
g
i
n
a
r
y
Real
Figure 4.9: Signal at (N).
40 CHAPTER 4. OFDM SIMULATION MODEL
Chapter 5
Channel Estimation
5.1 Introduction
In a wireless environment, the channel is much more unpredictable than a
wire channel because of a combination of factors such as multi-path, fre-
quency oset, timing oset, and noise. This results in random distortions
in amplitude and phase of the received signal as it passes through the chan-
nel. These distortions change with time since the wireless channel response
is time varying. Channel estimation attempts to track the channel response
by periodically sending known pilot symbols, which enables it to characterise
the channel at that time. This pilot information is used as a reference for
channel estimation. The channel estimate can then be used by an equal-
izer to correct the received constellation data so that they can be correctly
demodulated to binary data.
Modulation can be classied as dierential or coherent. For dierential,
information is encoded in the dierence between two consecutive symbols so
no channel estimate is required. However, this limits the number of bits per
symbol and results in a 3-dB loss in SNR [?]. Coherent modulation allows
the use of arbitrary signaling constellations, allowing for a much higher bit
rate than dierential modulation and better eciency. This chapter will give
a description of our system environment, the channel model and present sev-
eral channel estimation techniques that are required for the case of coherent
modulation.
41
42 CHAPTER 5. CHANNEL ESTIMATION
5.2 System Environment
5.2.1 Wireless
The system environment we will be considering in this thesis will be wireless
indoor and urban areas, where the path between transmitter and receiver
is blocked by various objects and obstacles. For example, an indoor envi-
ronment has walls and furniture, while the outdoor environment contains
buildings and trees. This can be characterized by the impulse response in a
wireless environment.
5.2.2 Multipath Fading
Most indoor and urban areas do not have direct line of sight propagation
between the transmitter and receiver. Multi-path occurs as a result of re-
ections and diractions by objects of the transmitted signal in a wireless
environment. These objects can be such things as buildings and trees. The
reected signals arrive with random phase osets as each reection follows a
dierent path to the receiver. The signal power of the waves also decreases as
the distance increases. The result is random signal fading as these reections
destructively and constructively superimpose on each other. The degree of
fading will depend on the delay spread (or phase oset) and their relative
signal power.
5.2.3 Fading Eects due to Multi-path Fading
Time dispersion due to multi-path leads to either at fading or frequency
selective fading:
Flat fading occurs when the delay is less than the symbol period and
aects all frequencies equally. This type of fading changes the gain of
the signal but not the spectrum. This is known as amplitude varying
channels or narrowband channels, since the bandwidth of the applied
signal is narrow compared to the channel bandwidth.
Frequency selective fading occurs when the delay is larger than the
symbol period. In the frequency domain, certain frequencies will have
greater gain than others frequencies.
5.3. CHANNEL MODEL 43
5.2.4 White noise
In wireless environments, random changes in the physical environment re-
sulting in thermal noise and unwanted interference from many other sources
can cause the signal to be corrupted. Since it is not possible to take into
account all of these sources, we assume that they produce a single random
signal with uniform distributions across all frequencies. This is known as
white noise.
5.3 Channel Model
This section will show how the channel will become diagonalised from a cyclic
convolution due to the insertion of the Cyclic Prex. If the Cyclic Prex is
longer than the impulse response of the channel, we can show that the OFDM
channel can be viewed as a set of parallel Gaussian channel (a complex gain
followed by Additive White Gaussian noise) that is free of ISI and ICI.
h
N1
h
0
y
0
x
N1
x
0
.
.
.
.
.
.
y
N1
n
N1
n
0
Figure 5.1: Parallel Gaussian channels.
First, let our QAM signalling symbols be expressed as
x =
_

_
x
0
x
1
.
.
.
x
N1
_

_
(5.1)
After we apply the IFFT to s, our OFDM symbol becomes
x = F
H
x =
_

_
X
0
X
1
.
.
.
X
N1
_

_
(5.2)
44 CHAPTER 5. CHANNEL ESTIMATION
where the matrix F is the DFT matrix. For the channel impulse response
h =
_

_
h
0
h
1
.
.
.
h
m1
_

_
(5.3)
where m is less than the length of the cyclic prex.
To simplify our derivation, we will choose N = 4 sub-carriers and m = 2
tap impulse response, but this proof will generally apply as long as m sat-
ises the above condition. So after passing through the multi-path channel,
the received OFDM symbol can be expressed as a convolution, h x. In
matrix form, this becomes
y =
_

_
Y
0
Y
1
Y
2
Y
3
_

_
=
_

_
h
0
0 0 0
h
1
h
0
0 0
0 h
1
h
0
0
0 0 h
1
h
0
_

_
_

_
X
0
X
1
X
2
X
3
_

_
(5.4)
If we insert the cyclic prex before sending across the channel, this convolu-
tion becomes
y =
_

_
Y
CP
Y
0
Y
1
Y
2
Y
3
_

_
=
_

_
h
0
0 0 0 0
h
1
h
0
0 0 0
0 h
1
h
0
0 0
0 0 h
1
h
0
0
0 0 0 h
1
h
0
_

_
_

_
X
3
X
0
X
1
X
2
X
3
_

_
(5.5)
And after removing the cyclic prex at the receiver, we can express this as
y =
_

_
Y
0
Y
1
Y
2
Y
3
_

_
=
_

_
h
0
0 0 h
1
h
1
h
0
0 0
0 h
1
h
0
0
0 0 h
1
h
0
_

_
_

_
X
0
X
1
X
2
X
3
_

_
Y = HX = H
c
X (5.6)
This is equivalent to a circular convolution. The channel matrix H
c
is now a
circulant matrix and X is the cyclically extended symbol.
We can now use the property of circular convolution on nite length
sequences,
y = h x Y[k] = H[k]X[k], k = (0, ..., N 1) (5.7)
5.3. CHANNEL MODEL 45
This property means every circulant matrix H
c
is diagonalised by the DFT
matrix F.
x = FY = FH
c
X = FH
c
F
H
x = x, =
_

_
H[0] 0
.
.
.
.
.
.
.
.
.
0 H[N 1]
_

_
(5.8)
So our multi-path fading channel can be written as:
y = H
c
x +n (5.9)
where y is the received vector of signalling points, x is the transmitted sig-
nalling points, H
c
is the diagonalised channel attenuation vector, and n is a
vector of complex, zero mean, Gaussian noise with variance
2
n
.
The attenuation on each tone is given by
H[k] = G
_
k
NT
s
_
, k = 0, ..., N 1 (5.10)
where G(.) is the frequency response of the channel during the current OFDM
symbol and T
s
is the sampling period of the system.
The impulse response of the channel can be expressed as
g() =
M1

k=0

k
(
k
T
s
) (5.11)
where
k
are independent zero mean, complex Gaussian random variables,
and
k
is the delay of the kth impulse. The next few sections will talk about
our considerations regarding some issues on the wireless channel and the
justications for our channel model.
5.3.1 Rayleigh Distribution
The Rayleigh distribution is a statistical distribution that is used to model
amplitude variations of the impulse response in a wireless multi-path channel.
A Rayleigh distribution assumes:
There is no direct line of sight (LOS) component in the received signal.
There are many indirect components from reected and scattered sig-
nals, each taking dierent paths to the receiver.
46 CHAPTER 5. CHANNEL ESTIMATION
Because these assumptions are valid for the wireless environment described
above, we will use a Rayleigh distributed model for our channel response.
It can be shown amplitude of two quadrature Gaussian noise sources fol-
lows a Rayleigh distribution. If we let s(t) be the signal transmitted through
a Rayleigh channel, then r(t) can be expressed as [?]:
r(t) = x(t)cos(2f
c
t) y(t)sin(2f
c
t) (5.12)
where x(t) and y(t) are normalised random processes, with zero mean and
and variance . Then the combination probability density function is
p(x, y) =
1
2
2
exp
_
x
2
+y
2
2
2
_
(5.13)
We can express r(t) in polar form in terms of amplitude and phase of the
received signal
r(t) = R(t)cos(2f
c
t +(t)) (5.14)
where R(t) and (t) are given by
R(T) = R =
_
x
2
+y
2
(t) = = tan
1
_
y
x
_
(5.15)
By using the polar transformation, the probability density function now be-
comes:
p(R, ) =
R
2
2
exp
_
R
2
2
2
_
(5.16)
Integrating p(R, ) over from 0 to 2, we obtain the probability density
function p(R):
p(R) =
R

2
exp
_
R
2
2
2
_
(5.17)
which follows a Rayleigh distribution.
5.3.2 Power Delay Prole
The Power Delay Prole (PDP) describes the envelope of the impulse re-
sponse as a function of the delay. The PDP of an urban and indoor envi-
ronment is generally described by an exponential, since each delayed impulse
usually has less power than the previous ones. Thus, our PDP is described
by the following equation
() exp
_

rms
_
(5.18)
5.3. CHANNEL MODEL 47
5.3.3 AWGN
When the signal passes through the channel, it is corrupted by white noise.
This is modelled by the addition of white Gaussian noise (AWGN). AWGN
is a random process with power spectral density as follows:
(f) =
1
2
N
0
[W/Hz] (5.19)
where N
0
is a constant and often called the noise power density.
5.3.4 Channel Synchronisation
There are two types of channel synchronisation models - Sample spaced and
Non sample spaced synchronisation.[1]
Sample spaced synchronisation assumes all delayed impulses of its chan-
nel impulse response are at integer multiples of the sampling period T.
In non sample spaced channels, the delayed impulses are not at periods
of the sampling period T, thus the most of the impulse power is spread
locally among the closest sampling intervals at the receiver, and leads
to a larger impulse response at the receiver as shown in gure 5.2.
spaced Sample spaced
channel
Channel
length
t
P
Channel
length
t
P
Non sample
channel
Figure 5.2: Resampling a non-sample-spaced channel extends the channel
length.
For simplicity, we will only consider synchronised sample spaced channels
for channel estimation in this thesis.
48 CHAPTER 5. CHANNEL ESTIMATION
5.3.5 Assumptions on channel
To simplify our simulated channel, the following are assumed to hold:
The impulse response is shorter than the Cyclic Prex. Therefore, there
is no ISI and ICI and the channel is therefore diagonal.
The channel is a synchronised, sample spaced channel.
Channel noise is additive, white and complex Gaussian.
The fading on the channel is slow enough to be considered constant
during one OFDM frame.
5.4 Pilot Based Channel Estimation
The following estimators use on pilot data that is known to both transmitter
and receiver as a reference in order to track the fading channel. The esti-
mators use block based pilot symbols, meaning that pilot symbols are sent
across all sub-carriers periodically during channel estimation. This estimate
is then valid for one OFDM frame before a new channel estimate will be
required.
Since the channel is assumed to be slow fading, our system will assume a
frame format, transmitting one channel estimation pilot symbol, followed by
ve data symbols, as indicated in the time frequency lattice shown in g-
ure 5.3. Thus each channel estimate will be used for the following ve data
symbols.
5.5 Least Squares Estimator
The simplest channel estimator is to divide the received signal by the input
signals, which should be known pilot symbols. This is known as the Least
Squares (LS) Estimator and can simply be expressed as:
H
LS
=
y
x
(5.20)
This is the most naive channel estimator as it works best when no noise is
present in the channel. When there is no noise the channel can be estimated
perfectly. This estimator is equivalent to a zero-forcing estimator.
5.6. LINEAR MINIMUM MEAN SQUARE ERROR ESTIMATOR 49

Time (OFDM symbols)
Frequency
(subcarriers)
Figure 5.3: An example of block based pilot information.
The main advantage is its simplicity and low complexity. It only requires
a single division per sub-carrier. The main disadvantage is that it has high
mean-square error. This is due to its use of an oversimplied channel and
does not make use of the frequency and time correlation of the slow fading
channel.
An improvement to the LS estimator would involve making use of the chan-
nel statistics. We could modify the LS estimator by tracking the average of
the most recently estimated channel vectors.
5.6 Linear Minimum Mean Square Error Es-
timator
The Linear Minimum Mean Squares Error (LMMSE) Estimator minimises
the mean square error (MSE) between the actual and estimated channel by
using the frequency correlation of the slow fading channel. This is achieved
through a optimizing linear transformation applied to the LS estimator de-
scribed in the previous section. From adaptive lter theory, the optimum
50 CHAPTER 5. CHANNEL ESTIMATION
solution in terms of the MSE is given by the Wiener-Hopf equation[5]:
h = R
hh
ls
R
1
h
ls
h
ls
h
ls
(5.21)
where X is a matrix conatining the transmitted signalling points on its diago-
nal,
2
n
is the additive noise variance. The matrix R
hh
ls
is the cross correlation
between channel attenuation vector h and the LS estimate h
ls
and R
h
ls
h
ls
is
the auto correlation matrix of the LS estimate h
ls
, given by
R
hh
ls
= Ehh
H
ls

R
h
ls
h
ls
= Eh
ls
h
H
ls
(5.22)
Since white noise is uncorrelated with the channel attenuation, the cross
correlation between the channel h and noisy channel h
ls
is the same as the
autocorrelation of the channel h. Thus we can replace R
hh
ls
with R
hh
. Also
the autocorrelation of R
h
ls
h
ls
is equavalent to R
hh
plus the noise power
2
and signal power. So the estimator can be expressed as:
h
lmmse
= R
hh
_
R
hh
+
2
n
(XX
H
)
1
_
1
h
ls
(5.23)
The above equation seems to pose a contradiction since we need the auto-
correlation of our desired channel vector in order to estimate an optimum
channel vector. But we do not know what our desired channel vector since
we do not know the channel. To overcome this problem, we replace the
autocorrelation with its expected value. This can be done in two ways:
By theoretically calculating the expected value based on assumed or
known channel statistics. This simplies the complexity as the inverse
only needs to be calculated once, which will be explained further on.
The values will need to be recalculated each time the statistics of the
channel changes.
Through realization, the autocorrelation matrix can be averaged each
time channel estimation occurs. This approach will converge slower
than the above method since the expected value is calculated adaptively
but is more exible since it does not assume any xed channel statistics.
For our OFDM channel estimation, we will use the rst approach because of
its lower complexity and easier implementation.
The main disadvantage of this estimator is that it has a very high com-
plexity. The evaluation of inverse R and XX
H
involves the inversion of a
5.7. OPTIMAL RANK REDUCTION USING SINGULAR VALUE
DECOMPOSITIONS 51
matrix of dimension N x N which makes this estimator computationally com-
plex.
By using statistics that we know about the additive noise and the transmit-
ted data, we can simplify the estimator. Since the binary data is completely
random, we can assume equal probability on all constellation points, and we
can replace XX
H
by its expected value
EXX
H
= E[
1
x
k
[
2
I (5.24)
Thus our simplied estimator can be expressed as[?]:
h
lmmse
= R
hh
_
R
hh
+

SNR
I
_
1
h
ls
(5.25)
where I is the Identity matrix, SNR is the average signal-to-noise ratio is
dened as E[x
k
[
2
/
2
n
. is a signal constellation dependent constant. For the
case of 16-QAM
= E[x
k
[
2
E[1/x
k
[
2
= 17/9 (5.26)
Thus the inverse need only be calculated once every time channel estimation
occurs, or just once if set to theoretical values.
5.7 Optimal Rank Reduction using Singular
Value Decompositions
The complexity of the LMMSE estimator can be further reduced using a sin-
gular value decomposition on the autocorrelation matrix R
hh
, which is nearly
rank decient due to its frequency correlation. Hence we can apply a rank
reduction and use only the most signicant parts of R
hh
. This simplication
will come at the expense of a small reduction in performance.
This approach to reduce the computational complexity is based on using
transforms that concentrate the channel power to a few transform coe-
cients, allowing ecient channel estimation to be performed with little eort
in the transform domain. The idea is that by excluding the transform coe-
cients with the least amount of channel power, an accurate approximation of
the high complexity lter can be obtained. This is illustrated in gure 5.4.
The optimal rank reduction of the LMMSE estimator, using singular value
52 CHAPTER 5. CHANNEL ESTIMATION
U

h
0
x
1
N1
x
1
0
y
N1

h
N1

p1 .
.
.
.
.
.
.
.
.
.
.
.
y
0
0
0
.
.
.
.
.
.
U
H
Figure 5.4: Block diagram of the rank-p channel estimator.
decomposition, is obtained by excluding the base vectors corresponding to
the smallest singular values. The channel autocorrelation R
hh
can be decom-
posed as:
R
hh
= UU
H
(5.27)
where U is a matrix with orthonormal columns and is a diagonal matrix
containing the singular values
0

1
...
N1
0 on its diagonal.
By applying the Singular Value Decomposition as follows [?]:
R
hh
ls
R
1/2
h
ls
h
ls
= Q
1
DQ
H
2
(5.28)
where Q is a matrix with orthonormal columns and D is a diagonal matrix
containing the singular values d
0
d
1
... d
N1
0 on its diagonal.
Since R
hh
ls
= R
hh
and R
h
ls
h
ls
= R
hh
+

SNR
I, they all share the same singular
values as R
h
h, so we can simplify the expression as
R
hh
ls
R
1/2
h
ls
h
ls
= UU
H
(U( +

SNR
I)U
H
)
1/2
= U( +

SNR
I)
1/2
U
H
= Q
1
DQ
H
2
=Q
1
= Q
2
= U and D = ( +

SNR
I)
1/2
(5.29)
5.8. SIMULATION RESULTS AND COMPARISONS 53
By taking including only the rst p singular values corresponding to the
upper left corner of the diagonal matrix D, the best rank p approximation
of the estimator is then
h
p
= R
hh
ls
R
1/2
h
ls
h
ls
R
1/2
h
ls
h
ls
h
ls
= Q
1
_
D
p
0
0 0
_
Q
H
2
R
1/2
h
ls
h
ls
h
ls
= U
_
D
p
0
0 0
_
U
H
(U( +

SNR
I)U
H
)
1/2
h
ls
= U
_
D
p
0
0 0
_
( +

SNR
I)
1/2
U
H
h
ls
= U
_

p
0
0 0
_
U
H
h
ls
(5.30)
where
p
is the upper left corner of the matrix .
=
_
+

SNR
I
_
1
= diag
_

0

0
+

SNR
, ...,

N1

N1
+

SNR
_
(5.31)
5.8 Simulation Results and Comparisons
The channel estimation simulation is based on the basic OFDM model in the
Appendices. The simulation is normally run independently from the equal-
ization simulation. It includes a basic equalizer for performance measurement
purposes.
The channel estimator performance will be tested by varying the average
Signal to Noise Ratio and plotted against a performance measure. This is
achieved by varying the variance of the additive noise and then running chan-
nel estimation for a xed amount of OFDM frames. The performance result
is recorded in vectors for comparison and graphing purposes.
The performance of the channel will be measured in terms of the Mean
square error (MSE), Symbol error rate (SER) and Bit error rate (BER) to
obtain three performance measures.
54 CHAPTER 5. CHANNEL ESTIMATION
0 5 10 15 20 25 30 35 40 45 50
5
10
15
20
Estimator MSE Comparison
M
e
a
n

S
q
u
a
r
e

E
r
r
o
r
SNR (dB)
MSE LS
MSE LMMSE
MSE SVD
Figure 5.5: Average Mean Squared Error for the channel estimators.
Since the LMMSE estimator is based on the MSE, it is important we com-
pare its performance with other estimators under this measure. The MSE is
calculated according to:
MSE = E[h h
est
[
2
(5.32)
where h
est
is the estimated channel attenuation and h is the true channel
attenuation.
The symbol error rate will be calculated for data symbols only according
to:
SER =
Total error symbols
Total data symbols sent
(5.33)
Similarly the bit error rate will be calculated as:
5.8. SIMULATION RESULTS AND COMPARISONS 55
0 5 10 15 20 25 30 35 40 45 50
10
3
10
2
10
1
10
0
Estimator SER Comparison
S
y
m
b
o
l

E
r
r
o
r

R
a
t
e
SNR (dB)
SER LS
SER LMMSE
SER SVD
Figure 5.6: Average Symbol Error Rate for the channel estimators.
BER =
Total error bits
Total data bits sent
(5.34)
After running the simulations, it is obvious that in terms of pure perfor-
mance, the LMMSE estimator and its low rank approximation are the most
appealing of the three estimators considered under the three performance
measures. As expected, the LMMSE estimator is the best performer with
reference to the MSE, especially at lower SNRs. With reference to the SER
in gure ?? and BER in gure ??, the dierence in performance between the
LS and the other estimators is approximately 5dB for all error rates. Thus,
the LS estimator can be a suitable choice for high SNR channels where com-
plex estimators are not viable.
But a good channel estimator design is based on achieving a balance between
performance and complexity. In terms of complexity the LMMSE requires
56 CHAPTER 5. CHANNEL ESTIMATION
0 5 10 15 20 25 30 35 40 45 50
10
5
10
4
10
3
10
2
10
1
10
0
Estimator BER Comparison
B
i
t

E
r
r
o
r

R
a
t
e
SNR (dB)
BER LS
BER LMMSE
BER SVD
Figure 5.7: Average Bit Error Rate for the channel estimators.
much more computation than the low rank and least squares estimator. The
low rank estimator in this regard is the clearly better than LMMSE, as it
achieves almost identical performance to the LMMSE, but has an advan-
tage of a substantial reduction in the number of computations required. The
LMMSE estimator is a 64 x 64 matrix while the rank 5 SVD approximation is
only a 5 x 5 matrix. As seen in gure ?? and ??, the performance dierence
between the LMMSE and low rank estimator is virtually identical. Only
under the MSE measure is the dierence in performance between the two
estimators evident. But under practical measures situations, these two have
approximately the same performance under BER and SER measure. Thus,
the negligible performance benets of the LMMSE does not seem to justify
its higher complexity. The low rank estimator seems the more feasible and
practical option.
5.9. SUMMARY 57
5.9 Summary
In this thesis, we have provided a detailed explanation of the basic princi-
ples and analysis of three block based pilot estimators suitable for an OFDM
system using coherent modulation. These estimators use pilot tones on all
carriers to track the channel characteristics. Through analytical and practi-
cal simulations, the LMMSE estimator was found to perform better than the
LS estimator, especially in low SNR environments, but only marginally bet-
ter than its low rank approximation estimator. But its substantially higher
complexity does not justify the minor performance gain. In this respect,
the low rank estimator achieves a compromise between the two competing
interests of high performance and low complexity. The LS estimator is often
neglected due to its relatively poor performance, but for its low complexity,
the LS estimator is adequate for channels with a high SNR.
We need to remember though that the LMMSE and its low rank approx-
imation are based on noise and channel statistics. If the channel statistics
are incorrect or change later on, then mismatch will occur and performance
will be sub standard.
58 CHAPTER 5. CHANNEL ESTIMATION
Chapter 6
Equalization
Equalizers. They are found in ampliers, in car stereo systems and in your
computers music players. These are basically all subband gain controllers.
They split your signal into separate frequency bands allowing the user to
change the gains in each spectrum. So does this have anything in OFDM?
Well, an equalizers aim in a communications receiver is to basically put the
transmitted signal back together. We will explore dierent types of equaliz-
ers, their advantages, disadvantages and further challenges.
6.1 Introduction to Equalization
There are several methods of equalization commonly used. These are
Maximum Likelihood (ML) sequence detection - Optimal in the sense
of error probability.
Linear Equalization - lters with adjustable coecients.
Decision Feedback Equaization (DFE) - uses previously detected sym-
bols to suppress ISI in the symbol presently being detected.
It is clear that equalization in OFDM can be very simple. This is one of
the major advantages of using OFDM over single carrier systems. Channel
equalization in OFDM actually can be done by just a simple division in
the frequency domain. This is because the channel as a lter is convolved
with the input signal in the time domain on transmission. This operation
is equivalent to multiplication in the frequency domain and thus undoing
the eects of the channel is just a division. This optimization follows the
Zero-Forcing criteria (ZF) which will be discussed in the following section.
59
60 CHAPTER 6. EQUALIZATION
Now, Equalizers like the zero-forcing and MMSE require channel esti-
mation, refer Sections 6.3 and 6.4. This can introduce additional errors in
equalization. To test if we can combat this, I have implemented adaptive
complex RLS (Recursive Least Squares) and LMS (Least Mean Squares)
equalizers. These algorithms can use the statistical averages of correlated
signals to derive a representation of the channel and undo its eects accord-
ingly.
The following sections contain somewhat long derivations of the LMS and
RLS algorithms. To see what each step does (not just brieng over them)
has taken considerable time. I thought it was only betting to include these
since so much time was spent in reading these and again in revision for the
report. I believe I have been able to explain them again in simpler terms.
So lets get into it and see a this of the work have been doing.
6.2 Linear Equalization
The linear lter for equalization is most usually the transversal lter shown
in Figure 6.1.
algorithm
outnput
w
0
w
1
w
2
w
3
z
1
z
1
z
1

input
unequalized
equalized
Tap gain adjustment
Figure 6.1: Linear transversal lter.
For an input sequence v[n] and the output as an estimation of y[n], the
estimate of the nth symbol for a 2N + 1 tap lter is
y[n] =
N

i=N
w
i
v
ni
(6.1)
6.3. ZERO-FORCING EQUALIZER 61
Here, w
i
are the complex equalizer tap weights selected based on some opti-
mization criterion. We will continue to denote w
i
as the equalizer coecients.
This is because they are done so in the Matlab code.
There are two basic criterion of optimization for which the following equal-
izers are made.
Peak Distortion Criterion - for which the Zero-Forcing Equalizer is
derived.
Mean-Square-Error (MSE) Criterion - for which the LMMSE equalizer
is derived
6.3 Zero-Forcing Equalizer
In OFDM, as long as the cyclic prex remains long enough to maintain the
orthogonality of the subcarriers, then equalization can be achieve simply by
the zero-forcing equalizer. It is the designated method of channel equalization
in OFDM in the Sari-Karam-Jeanclaude paper[10]. It is discussed in paper
[22]
6.3.1 Introduction
The zero-forcing equalizer minimizes the peak distortion which is simply
dened as the worst case symbol interference at the equalizer output.
It is important to mention that our equalizer takes place in the frequency
domain. The transversal lters mentioned above and in [3] take place in the
time domain.
The derivation below of the zero-forcing lter coecients are derived in
[3]. I will attempt to explain it more simply because the author likes to word
things in a dicult way. His solution results from a z transform which can
be easily changed to a frequency perspective on the substitution of z = e
jw
.
The linear channel lter with coecients h
n
and the equalizer with
coecients w
n
can be expressed as a single lter simply by the convolution
of the two
q
n
=

j=
w
j
h
nj
(6.2)
We are assuming that the equalizer has innite taps and then look at the
situation where it is nite. The output at the kth sampling can be expressed
as
y
k
= q
0
y
k
+

n=k
y
n
q
kn
+

j=
w
j

kj
(6.3)
62 CHAPTER 6. EQUALIZATION
where y
k
is the transmitted information sequence and
kj
is a noise term.
This can be seen more clearly by reference to equation 2.18. And as estab-
lished before the second term is the ISI term. Now, the peak value of this
interference is called the peak distortion. Reference [3] uses the notation
D(w) =

n=,n=0
[q
n
[ (6.4)
=

n=,n=0

j=
w
j

kj

(6.5)
Now what we do is select a nite number of taps to force D(w) to zero,
that is D(w) = 0 and q
n
= 0 for all n except n = 0. Thats why its called
zero forcing as we are completely eliminating the inter-symbol interference.
The condition for this is
q
n
=

j=
w
j
h
nj
=
_
1 n = 0
0 n ,= 0
(6.6)
Finally, if we take the z transform of this, we get
Q(z) = W(z)H(z) = 1 (6.7)
in other words
W(z) =
1
H(z)
(6.8)
So, what this means is that the lter which satises the zero forcing criterion
has the set of coecients W(z) which is just the inverse of of the channel
coecients H(z). This what is called a zero forcing equalizer. A traditional
zero forcing lter operation in shown in Figure 6.2.
y
k
y
k

Equalizer Channel
AWGN
H(z)
W(z) =
1
F)z)
Figure 6.2: Zero-forcing equalizer block diagram.
It is important to note that this equalizer does not eliminate ISI as long as
the lter is of nite length. The remaining ISI can be reduced by increasing
the lter length which will increase lter complexity.
6.3. ZERO-FORCING EQUALIZER 63
However, this may all seem somewhat irrelevant to a system that uses
a cyclic prex. A cyclic extension which is longer than the channel impulse
response can cancel out ISI and ICI, refer to Section 3.5. In OFDM where the
zero forcing equalizer takes place in the frequency domain, the ICI is forced
to zero for which is already zero. Thus, the role of the equalizer becomes just
a gain operation and phase adjustment in each sub-carrier.
The main disadvantage of such a method is that when the H(w) is close to
zero, the reciprocal lter W(w) will be very large in which will dramatically
amplify noise or numerical round-o errors.
6.3.2 Implementation and Results
Let us now focus on the Matlab design of an OFDM equalizer. The basic
OFDM model can be found in Matlab code in Appendix D. On top of this
is built the zero forcing equalizer.
Well it may seem quite simple to design such an equalizer, we just need to
nd the inverse lter. But, the trick here is to implement it in the frequency
domain. This is simple because an OFDM system, we begin and end in the
frequency domain. Instead of nding an inverse lter in the time domain, we
just dot divide each of the values in received signal spectrum by that of the
coecients of channel spectrum. As mentioned before, this can be seen as a
deconvolution of the the channel impulse response.
The question is now, how can we obtain the frequency response of the
channel? We will use the Least Squares (LS) estimate mentioned in Section
[?]. It is actually equivalent the zero-forcing equalizer in the way it estimates
the channel. This will allow perfect recovery in noiseless situations, though
impractical we will demonstrate its recovery in a training period with 100
dB SNR.
The problem with the zero forcing equalizer is that it relies on an estimate
of the channel is is liable to change in time. This problem is the same for all
equalizers. The only time in which the equalizer can estimate the channel
spectrum is during the training or pilot symbol transmissions. These signals
which are sent are previously known to the receiver. This allows the receiver
to statistically compare the sequences and nd the channel characteristics.
In the zero forcing equalizer, the coecients cannot be adjusted until
the next bath of pilot symbols arrive though is not the case for adaptive
equalizers.
Figure 6.3 is a simple diagram to represent the zero-forcing equalizer in
OFDM. Theoretically, perfect reconstruction of the signals in the training
period can be achieved. In practice this is not the case. The channel eects
64 CHAPTER 6. EQUALIZATION
receiver and
Baseband
demodulation
channel
uknown
input
modulation
Baseband
transmitter
OFDM

h(w)
Constellation
detector
output
OFDM
equalizer
Figure 6.3: OFDM Zero-forcing equalizer block diagram.
are not perfectly cancelled out but is very low, can be considered to be zero.
This is due the small errors in the estimate of the channel spectrum.
The simulation model is a little dierent to that in Figure 6.3. The used
for the purposes of simulating it equalizers eectiveness is shown in Fig-
ure 6.4. This model estimates the channel spectrum from the rst incoming
equalizer
channel
uknown

h(w)
input
Baseband
modulation
OFDM
transmitter
Baseband
demodulation
Channel
estimate
output
z
1
detector
Constellation
OFDM
receiver and
Figure 6.4: OFDM Zero-forcing equalizer block diagram for simulation.
symbol and then uses it to equalize the next signal. This shows how the
equalizer would work with regular pilot symbols.
Figure 6.5 and Figure 6.6 shows the symbol recovery ability of the zero
forcing during training. This was done on an OFDM model using 4 bit QAM,
64 point FFT and 16 symbol cyclic extension. The channel is modeled by a
3 tap lter with an exponential PDP. The channel also contains AWGN at
an SNR of 100 dB for the purposes of clearer reconstruction. Constellation
detection is achieved by simple mapping to the closest constellation symbol
distance wise.
6.3. ZERO-FORCING EQUALIZER 65
0 10 20 30 40 50 60 70
0
1
2
3
4
5
6
7
Transmitted Symbols vs Equalized Symbols vs Unequalized Symbols
A
m
p
l
i
t
u
d
e
Symbol
Tansmitted Symbols
Equalized Symbols
Unequalized Symbols
Figure 6.5: Diagram of 3 types of symbol sequences.
We can see in Figure 6.5 that the equalized symbols are closely matched
to the transmitted symbols in comparison the the unequalized symbols. The
shape of the unequalized symbols are due to that of the lter. An almost
erratic plot is shown in Figure 6.6. However, the error is somewhat correlated
to the channel spectrum. The rst thing we notice is the large error at the
beginning. This is because the rst received symbols is not equalized but
used in channel estimation for equalization of the next symbol. We can also
see that the error jumps up in the middle of each symbol across the last nine
symbols. This is because the channel coecients are closer to zero at this
point and thus noise is amplied. This noise is that of the channel estimate
and the additive AWGN.
Lets now increase SNR and see what happens. In Figure 6.7 we can see
a somewhat exponential decay in BER as we increase the SNR. This can be
due to the constellation detection algorithm. As symbols get closer to the
actual constellation symbols, the mapping is attributed the sphere packing in
66 CHAPTER 6. EQUALIZATION
0 100 200 300 400 500 600 700
10
6
10
5
10
4
10
3
10
2
10
1
10
0
10
1
Zero Force Equalizer Error Over 10 Symbols
E
r
r
o
r

S
q
u
a
r
e
d
OFDM Symbol
Figure 6.6: Error of Zero-forcing equalizer over 10 OFDM symbols.
vector quantization. That is the symbols which are mapped are in a certain
radius from the constellation point. This area around the constellation point
is resembles a circle.
6.4 LMMSE
The zero-forcing equalizer does not account for additive noise in its opti-
mization. Here we will base our equalizer on the Mean-Square-Error (MSE)
Criterion. This type of equalizer can be called the Linear Mean Squared Error
Equalizer (LMMSE). Anyhow, we have seen the MSE criterion before dur-
ing Linear prediction and Winer ltering. It is the well known second order
equation which upon application of orthogonality or partial dierentiation
arrives at the normal equations, refer Sections 2.7 and 2.8. The LMMSE
equalizer for OFDM is mention by Sari in [10].
6.4. LMMSE 67
0 2 4 6 8 10 12 14 16 18 20
2
3
4
5
6
7
8
x 10
3
BER vs SNR
B
E
R
SNR (dB)
Figure 6.7: OFDM Zero-forcing equalizer BER vs SNR (dB).
6.4.1 Introduction
The LMMSE solution makes a tradeo between residual ISI and noise en-
hancement. This provides a far better solution for channels with spectral
nulls.
There are many derivation for the equalizer coecients with which satisfy
the MMSE criterion. Some are more insightful than others but they all
begin with minimizing the expected error squared. For the purposes of our
simulation, the proof by intuition from the Wiener solution in [6] is much
clearer than than in [3]. I will present it in my own words to make clear some
of my own insights into these equations.
Let us start with the basic system
X[n] = (h
s
Y )[n] + V [n] (6.9)
where X[n] is the received signal random process, Y [n] the input and V [n]
the additive noise. The cross-correlation sequence is dened as
68 CHAPTER 6. EQUALIZATION
R
Y X
[m] = E
_
Y [n]
_
V [n m] +

k
h
s
[k]Y [n mk]
__
= R
Y V
+

k
h
s
[k]R
Y Y
[m +k]
= R
Y V
+
_

h
s
[k] R
Y Y
_
[m] (6.10)
where

h
s
is the time reversal of h
s
. The auto-correlation sequence is
R
Y X
[m] = E
__
V [n] +

k
h
s
[k]Y [n k]
__
V [n m] +

k
h
s
[k]Y [n mk]
__
= R
V V
[m] +

k
h
s
[k]

j
h
s
[j]R
Y Y
[m +k j] +

k
h
s
[k]R
Y V
[mk]+

j
h
s
[j]R
V Y
[m +k]
= R
V V
[m] +
_
h
s


h
s
R
Y Y
_
[m] + (h
s
R
Y V
)[m] + (h
s
R
Y V
)[m]
Now we can actually simply these quite a bit by assuming that the noise se-
quence is uncorrelated with the signal Y [n], so R
Y V
= 0 for all m, R
V V
[m] =

2
V
[m] and R
Y Y
[m] =
2
Y
[m]. So the above can be rewritten as
R
Y X
[m] =
_

h
s
R
Y Y
_
[m] (6.11)
R
XX
[m] =
2
V
[m] +
_
h
s


h
s

2
Y

_
[m] (6.12)
taking the Fourier transform of these gives
S
Y X
[m] =

h

s
(w)S
Y Y
(w) (6.13)
S
XX
[m] =
2
V
+

h
s
(w)

2
Y
(6.14)
which gives the unconstrained Wiener lter given by

(w) =
S
Y X
(w)
S
XX
(w)
=

s
(w)

h
s
(w)

2
+
2
V
/
2
Y
(6.15)
6.4. LMMSE 69
Note that the MMSE solution reduces to the zero-forcing solution for
2
=
0. An intuitive way to see this work is that when

h
s
(w) is close to zero,
we concentrate on ltering out the noise rather than trying to recover the
attenuated signal.
You may also be wondering how

h

(w) =
S
Y X
(w)
S
XX
(w)
in equation (6.15).
Well, it can be derived directly from the denitions of the auto and cross
correlation sequences. This is an interesting property which I found valuable
to understand. So here it is and we will begin by talking about PSDs.
We can estimate the spectrum of the channel using estimations called the
Power Spectral Denisties (PSD). Denoted by S
XX
(w) for the random process
X[n], it is the Fourier transform of the autocorrelation sequence R
XX
[m].
That is
R
XX
[m] =
1
2
_

S
XX
(w)e
jwm
dw (6.16)
This is a more robust method of obtaining the channel spectrum than per-
forming the FFT over the impulse response. This is because the impulse is
not an ideal signal to transmit through a channel. Other methods of channel
estimation was explored in Chapter 5.
A rough guide to the channel estimation used can be found in[6]. It
arises from the Unconstrained Wiener solution and even more simply from
the cross-correlation denition. The cross-correlation sequence, R
Y X
[m], is
dened at the convolution of the autocorrelation sequence R
XX
[m] and the
impulse response, h[m]. That is
R
Y X
[m] =

k
h[k]R
XX
[mk] (6.17)
Since convolution is equivalent to multiplication in the Fourier domain, the
Fourier transform of the equation above becomes simply
S
Y X
(w) = S
XX
(w)

h(w) (6.18)
which gives

h(w) =
S
Y X
(w)
S
XX
(w)
(6.19)
6.4.2 Implementation and Results
The Matlab code for this equalizer can be found in Appendix E. This was
done on the same base OFDM model as with the zero forcing equalizer, using
4 bit QAM, 64 point FFT and 16 symbol cyclic extension. The channel is
modeled by a 3 tap lter with an exponential PDP. The channel also con-
tains AWGN at an SNR of 100 dB for the purposes of clearer reconstruction.
70 CHAPTER 6. EQUALIZATION
Constellation detection is achieved by simple mapping to the closest constel-
lation symbol distance wise. The LMMSE equalizer implementation was not
particularly successful. The code can be found in Appendix E but the results
will not be documented.
6.5 Adaptive Equalization
What adaptive equalizers do is basically update its coecients with each
incoming symbol. Simply, what the an adaptive lter does is it nds a set of
coecients with with on ltering an incoming sequence will result in a desired
sequence. Traditional literature on OFDM never really mentioned use of such
equalizers mainly because it does not really exploit the advantages of OFDM.
The two adaptive equalizers I have looked into operate in the time do-
main on baseband symbols. Most OFDM literature use Decision Feedback
Equalizers (DFE) which consist of a forward and backwards transversal l-
ter. DFEs for OFDM are discussed in [2, p.103], [11] and [5, p.50] but I will
not go into DFEs. I decided I would look into two well known adaptive al-
gorithms and nd what advantages they have to oer and the disadvantages
they pose. The rst algorithms is based on a method of steepest descent.
Here is where we shall begin.
6.6 Method of Steepest Descent
The method of steepest descent is a gradient-based adaptation technique
which is recursive in the sense that its feedback system proceeds iteratively
over with incoming samples. This method is described in detail in [3, p.663]
and [4, p.203].
This proof is a little hairy and I will attempt to explain it clearly.
To understand the basic idea, we dene a cost function J which is usually
associated with the mean-square error
J = E[e[n]e

[n]] = E[[e[n][
2
] (6.20)
where e(n) is an error sequence. Usually J is a function of the equalizer
coecients w, ie J(w). We can express the kth complex coecient as
w
k
= a
k
+jb
k
, k = 0, 1, 2, ... (6.21)
This will allow us to to dene the all important gradient operator as

k
=

a
k
+j

b
k
, k = 0, 1, 2, ... (6.22)
6.7. LMS 71
Now if we apply the operator to the cost function J, we obtain the gradient
vector J for which the kth element is

k
J =
J
a
k
+j
J
b
k
, k = 0, 1, 2, ... (6.23)
We will see later, the implications of descent in two dimensions a
k
and b
k
for
the complex LMS algorithm. Now, in the method of steepest descent, the
adjustments to w are in the direction of steepest descent which is opposite to
the gradient vector of the cost function J(w). For which we can now describe
the steepest-descent algorithm as
w(n + 1) = w(n)
1
2
J(w) (6.24)
where is a step-size parameter, w(n) is the vector of equalizer coecients
at time n and the factor of 1/2 is for numerical convenience which we will
soon see why. Equation (6.24) shows the recursive procedure for the equalizer
coecient updates. The question now is how do we nd J(w) and what
does do?
I think it is best if we now jump to the gradient vector as a function of the
cross-correlation vector p, refer Equation (6.27), and the correlation matrix
R, refer Equation (6.26), as shown in [4, p.206]
J(w) = 2p + 2Rw(n) (6.25)
where
R = E[x(n)x
H
(n)] (6.26)
where x(n) is the vector of lter inputs at time n. We can see that R is the
M-by-M correlation matrix for x(n) with length M. And
p = E[x(n)d

(n)] (6.27)
which is the m-by-1 cross-correlation vector between the the lter inputs and
the desired response d(n).
We are now in a situation to start looking into the LMS algorithm and
implementation.
6.7 LMS
We have seen that in the case of Wiener lters, we depend on the knowledge
of the cross and auto-correlation function R
Y X
[m] and R
XX
[m]. But in many
72 CHAPTER 6. EQUALIZATION
cases, we cannot estimate these ahead of time to x the Wiener coecients.
More commonly, the statistics vary slowly in time from which we can make
crude approximations and x the coecients gradually. The Least-Mean-
Square algorithm does not require us to keep track of past outcomes to
estimate statistics but one of the disadvantages as we will see is the somewhat
slow adaptation to change.
6.7.1 Adaptation Algorithm
The LMS algorithm we are dealing with needs to be complex since our fre-
quency downconverted symbols are complex. The complex form of the LMS
originally proposed by Widrow-McCool-Ball 1975 [23], the exact measure-
ments of the gradient vector J(w) at time n would require the prior knowl-
edge of the correlation matrix R and the cross-correlation vector p. So
according to [4, p.235], what we do in the LMS algorithm is to use instanta-
neous estimates of R and p dened by

R = x(n)x
H
(n) (6.28)
and
p = x(n)d

(n) (6.29)
and substitute them into into Equation (6.25) giving
J(w) = 2x(n)d

(n) + 2x(n)x
H
(n) w(n) (6.30)
Now on substitution back into Equation (6.24), we get
w(n + 1) = w(n) x(n)
_
d

(n) x
H
(n) w(n)

(6.31)
From which results in the following three relations with which denes the
LMS algorithm!
1. Compute lter output y(n) = w
H
(n)x(n) (6.32)
2. Compute error e(n) = d(n) y(n) (6.33)
3. Update coecients w(n + 1) = w(n) + x(n)e

(n) (6.34)
Here, y(n) is the output of the equalizer lter and e(n) is the error sequence
which is the dierence between the desired signal and the ltered signal.
Since we are taking the instantaneous products between e

(n) and x(n),


instead of the statistical expectation, our approximation will most likely to be
inaccurate. But if we make small adjustments to the lter coecients at each
6.7. LMS 73
time step, determined by , then the instantaneous approximation errors can
be averaged out and we move slowly towards the optimal coecients.
There are entire papers written on the selection of but in general, a
large value will increase the rate of convergence but will tend to oscillate
around the optimal coecient values. It is common to use a large value of
to begin with and then take on a smaller value as the algorithm converges.
The parameter according to [4, p.238] can be set to
0 < <
2
MS
max
(6.35)
where S
max
is the maximum value of the power spectral density of the
lter inputs x(n) and M is the lter length.
6.7.2 Implementation and Results
An adaptive LMS equalizer is usually implemented according to to the sim-
plied Figure 6.8.
d

(n)
channel
uknown

h(w)
input
Baseband
modulation
OFDM
transmitter
Baseband
demodulation detector
Constellation
OFDM
receiver and
equalizer
output
Resynthesis
Figure 6.8: LMS equalizer block diagram.
For the equalizer which is not in training, Figure 6.8 shows a system
that adapts its coecients using the resynthesised symbols as the desired
sequence. This of course introduces errors which may accumulate with each
iteration. To overcome this, we need to periodically send training symbols
to correct the lter coecients.
The simulation model for our LMS equalizer on OFDM can be found in
Appendix F. The following simulation models that in the training period,
so there is no resynthesis block. The equalizer takes in a noisy sequence, a
training sequence known as pilot tones (which are known in advance by the
74 CHAPTER 6. EQUALIZATION
receiver) and outputs a ltered signal based on the adapted coecients. The
equalizer is built on top of the basic OFDM baseband model used in the
previous equalizer simulations of Sections 6.3 and 6.4. The OFDM model
uses 4 bit QAM, 64 point FFT and 16 symbol cyclic extension. The channel
is modeled by a 3 tap lter with an exponential PDP. The channel also con-
tains AWGN at variable SNR. Constellation detection is achieved by simple
mapping to the closest constellation symbol with respect to distance. Figure
0 10 20 30 40 50 60 70 80
10
2
10
1
10
0
LMS tracking over first OFDM symbol
A
b
s
o
l
u
t
e

A
m
p
l
i
t
u
d
e
QAM symbol in OFDM symbol
Desired Sequence
Equalized Sequence
Figure 6.9: LMS equalizer tracking over rst symbol.
6.9 shows the LMS equalizer adapting its coecients to mimic the desired
signal. The two input signals, desired and noisy, must me correlated for the
coecients to make any real sense. We can see that the equalizer output
has a delay of 3 samples shown by the beginning of red line. This is be-
cause the LMS equalizer is defaulted to 3 coecients. The three samples
are used to equalize the 4th samples and so on, so the rst three samples
cannot be equalized unless we decrease the lter order. This simulation was
performed in presence of no noise. This is done to demonstrate its ability
6.7. LMS 75
to equalize channel attenuation. Performance of course degrades when noise
is introduced and the SNR is lowered. This will be discussed in this section
later on. Figure 6.10 shows the LMS convergence property over one OFDM
0 10 20 30 40 50 60 70 80
10
12
10
10
10
8
10
6
10
4
10
2
10
0
Error Sequence e(n)=d(n)y(n)
M
e
a
n

S
q
u
a
r
e
d

E
r
r
o
r
QAM symbol in OFDM symbol
Figure 6.10: Error sequence over the rst OFDM symbol.
symbol. We can see that the LMS algorithm does allow considerable conver-
gence over one symbol. We further speed up the convergence by changing
the step-size associated with in the LMS algorithm. For the rst half of
the input sequence we set = 0.4 and then = 0.15 for the remaining
half. This is so the LMS tracking does not bounce around near convergence.
The error sequence here starts at the 10th symbol, the reason for this is the
same for that in Figure 6.9. Looking at the convergence rate of LMS is not
too clear over just one symbol so let us take a look at it working over ten
OFDM symbols. It may also be useful to remind the reader that an OFDM
symbol consists of 80 samples. Derived from Hyperlan/2 standards, we use
a 64 point FFT and 16 samples Cyclic Prex which adds to 80 samples for
which a whole symbol spans 4 seconds. Figure 6.11 shows the LMS con-
76 CHAPTER 6. EQUALIZATION
0 100 200 300 400 500 600 700 800
10
25
10
20
10
15
10
10
10
5
10
0
LMS Tracking Over 10 OFDM Symbols
M
e
a
n

S
q
u
a
r
e
d

E
r
r
o
r
QAM symbol
Figure 6.11: Error sequence of LMS tracking over 10 OFDM symbols.
vergence property over 10 OFDM symbol, that is over 800 samples within
40 seconds. This simulation was achieved by keeping the coecient weights
from symbol to another so that with each new symbol, we did not have to
start the algorithm training from scratch. This used a channel with additive
noise with an SNR 100dB. Even though this noise level is quite low, we can
achieve a BER of zero with an SNR of 7 dB. The only variables to initialize
in the LMS algorithm is the lter coecients w(n). If prior knowledge of the
signals are available, then these can be set to their statistics. In our case,
we initialize w(0) = 0. Of course prior estimations and assignment of w(n)
would lead to faster convergence times.
We can see that nal convergence takes place around the 450th sample
mark. That is almost the 5th OFDM symbol. The slow convergence of
the LMS algorithm is indeed one of its disadvatanges which we will try to
overcome with the RLS algorthm in Section 6.8.
6.8. RLS 77
6.8 RLS
The advantage in the LMS steepest-descent algorithm lies in its computa-
tional simplicity but the price paid is slow convergence. Now, to design an
algorithm with a faster convergence we need to trade it o for a more complex
algorithm involving additional parameters.
The Kalman lter provides the basic framework from which all Recursive-
Least-Squares lters are derived. The family of RLS lters consist of
The standard RLS lters
Square-root RLS lters
Order-recursive RLS lters
We will deal with the standard RLS lter in its complex form. Information
concerning the other lter categories can be found in [4]. Complex adpative
lters are aslo covered in [22].
In Kalmans 1960 paper [24], describes a recursive solution to the discrete-
data linear ltering problem. The recursive relation can be found in Theorem
3 of [24]. It is an extensive paper and now with advances in digital signal
computations, the Kalman lter has been the subject of extensive research
and applications.
6.8.1 Least Squares
In deriving an algorithm with faster convergence, we adopt the Least-Squares
approach. This allows us to directly minimize the quadratic performance
index in terms of a time average rather than a statistical average.
The following derivation is taken from [3, p.683]. We will use his notation
in the following where he likes to use I(n) as the information carrying desired
sequence, Y
N
(n) as the noisy input to the lter of length N. From now on,
will drop the subscript N (as we have previously done) because everything is
basically of length N anyway. However, we will denote lter taps with W(n)
because this is the notation used in my Matlab code and is also standard in
[4]. Weighting factors will be denoted by . So let us now begin with our
last equalization algorithm!
The RLS is formulated to minimize the time-average weighted square
error

LS
N
=
t

n=0

tn
[e(n, t)[
2
(6.36)
78 CHAPTER 6. EQUALIZATION
where the error is dened as
e(n, t) = I(n) W(t)Y(n) (6.37)
It maybe confusing to have the n and t indices. What this means is that each
coecient vector W(t) is calculated from the vectors Y(n), n = 0, 1, ..., t.
6.8.2 Adaptation Algorithm
The formulation of the RLS time update equations are actually not that
complex though formulating it yourself might be. Let us continue from the
equations 6.36 and 6.37 already established. The weighting factor 0 < < 1
introduces an exponential weighting on past data appropriate to our channel
PDP. The minimization of
LS
N
with respect to W(t) yields the set of linear
equations
R(t)W(t) = D(t) (6.38)
where R(t) is the signal correlation matrix
R(t) =
t

n=0

tn
Y

(n)Y

(n) (6.39)
and D(t) is the cross-correlation vector
D(t) =
t

n=0

tn
I(n)Y

(n) (6.40)
For which the form should look familiar now. On solving for the lter coef-
cients
W(t) = R
1
(t)D(t) (6.41)
On which we should mention that R(t) is not a Toeplitz matrix for which
was the case in Equation (2.32). Also important to the purposes of our
implementation, R(t) may be ill conditioned for small values of t and so the
add the matrix I to R(t), where is a small positive constant and I is the
N-by-N identity matrix.
Now according to Equation (refe:wupdate1) if we had access to W(t 1)
to compute W(t), we will need to solve N linear equations for each new
symbol arriving. To avoid this ineciency we compute R(t) recursively with
R(t) = R(t 1) +Y

(t)Y

(t) (6.42)
6.8. RLS 79
As we need the to nd the inverse correlation matrix of Equation (6.41) we
dene the following recursion accordingly
R
1
(t) =
1

_
R
1
(t 1)
R
1
(t 1)Y

(t)Y

(t)R
1
(t 1)
+Y

(t)R
1
(t 1)Y

(t)
_
(6.43)
And since this is such a mess, lets just dene P(t) = R
1
(t).
We will now dene what is commonly known as the Kalman gain vector
to be
K(t) =
1
+(t)
P(t 1)Y

(t) (6.44)
with (t) conveniently dened as follows to simplify the inverse correlation
matrix.
(t) = Y

(t)R
1
(t 1)Y

(t) (6.45)
so that the inverse correlation matrix in Equation (6.43) becomes
P(t) =
1

[P(t 1) K(t)Y

(t 1)P(t)] (6.46)
Now if we just postmulitply both side by Y

(t)
P(t)Y

(t) =
1

[P(t 1)Y

(t) K(t)Y

(t 1)P(t)Y

(t)]
=
1

([ +(t)]K(t) K(t)(t)) on subs (6.45) and (6.44)


= K(t) (6.47)
Which gives us a much simpler expression for the Kalman gain expression.
Now since by the denition of P(t),
W(t) = P(t)D(t)
and
D(t) = D(t 1) + I(t)Y

(t) (6.48)
for the same reasoning as in Equation 6.42. Then we have
W(t) =
1

[P(t 1) K(t)Y

(t 1)P(t)] [D(t 1) + I(t)Y

(t)]
= P(t 1)D(t 1) +
1

I(t)P(t 1)Y

(t)
K(t)Y

(t 1)P(t 1)D(t 1)

I(t)K(t)Y

(t 1)P(t)Y

(t)
= W(t 1) +K(t) [I(t) Y

(t)W(t 1)] (6.49)


80 CHAPTER 6. EQUALIZATION
This messy expression can be simplied just by noting that Y
H
(t)W(t 1)
is the equalizer output at time t. So noting

I(t) = Y

(t)W(t 1) (6.50)
and
e(t) = I(t)

I(t) (6.51)
then the recursive update equation for W(t) is as follows

W(t) = W(t 1) +K(t)e(t) (6.52)


and thats it! We can summarize our RLS update equations into ve steps
1. Compute lter output

I(t) = Y

(t)W(t 1)
2. Compute the error e(t) = I(t)

I(t)
3. Compute Kalman gain vector K(t) =
P(t 1)Y

(t)
+Y

(t)P(t 1)Y

(t)
(6.53)
4. Update inverse correlation matrix
P(t) =
1

[P(t 1) K(t)Y

(t 1)P(t)]
5. Update coecients

W(t) = W(t 1) +K(t)e(t)
This algorithm is called the RLS direct form which in [3] is said to be the
Kalman algorithm. It is important at this time to note that the equalizer
coecients change by the amount K(t)e(t). Since K(t) is N-dimensional,
each coecient is controlled by an element of K(t). Thus we have a faster
convergence algorithm compared to that of the LMS where the only variable
parameter is the step-size.
6.8.3 Implementation and Results
Now that we are familiar with the algorithm, lets take a deep breath and
look at the simulation model. Our RLS equalizer on OFDM looks just like
that of the LMS as shown in Figure 6.12
The RLS equalizer is built on top of the same basic OFDM model used
in the previous equalizer simulations of Sections 6.3, 6.4 and 6.7. Just as a
reminder, the OFDM model uses 4 bit QAM, 64 point FFT and 16 symbol
cyclic extension. The channel is modeled by a 3 tap lter with an exponential
PDP. The channel also contains AWGN with variable SNR. The baseband
symbol detection is achieved by simple mapping to the closest constellation
symbol with respect to distance. PLease refer to Appendix G for the code.
6.9. COMPARISON 81
d

(n)
channel
uknown

h(w)
input
Baseband
modulation
OFDM
transmitter
Baseband
demodulation detector
Constellation
OFDM
receiver and
equalizer
output
Resynthesis
Figure 6.12: RMS equalizer block diagram.
Figure (6.13) shows how well the RLS equalizer can track the desired signal.
The most important feature of the following graphs are the rate of conver-
gence compared to those of the LMS in Figure (6.9) and (6.10). Similarly,
these graphs show a delay of 3 samples in the error sequence and the equal-
ized signal. This is because we are using an order 3 lter. This simulation
performed under zero noise and a 3 tap channel to give zero BER which is
what was expected. We will inject some noise into the channel with specic
SNR later on. Figure (6.14) shows evidently the much faster convergence of
the RLS algorithm in comparison to that of the LMS. Both Figures were per-
formed under a weighting factor = 0.99. This is an exponential weighting
of the past data, that is it determines how quickly the lter forgets past
samples. Setting = 1 implies innite memory.
6.9 Comparison
The code used for the comparisons can be found in Appendix H. We have
actually already considerably discussed the case of the convergence properties
of the two algorithms. This is due to the criteria each is optimized for and
basically because the LMS only converges in two dimensions for a complex
weighting function where as in RLS, each element in the Kalman vector aect
the coecients giving greater exibility.
Figure (6.15) just overlaps the tracking sequence of both algorithms for
the purposes of comparison. The RLS algorithm is not considerably much
more complex than the LMS algorithm though there are many papers which
look into reducing the complexity of the RLS like that in [26]. It all depends
on the application, to nd a suitable equalizer for the system specics.
82 CHAPTER 6. EQUALIZATION
0 10 20 30 40 50 60 70 80
10
2
10
1
10
0
RLS Tracking Over OFDM Symbol
M
e
a
n

S
q
u
a
r
e
d

E
r
r
o
r
Baseband Symbol Number
Desired Signal
Equalized Signal
Figure 6.13: RLS tracking over rst OFDM symbol.
6.10 Summary
The analysis of the four type of equalizers bring me to the conclusion that
the complexities involved in the adaptive lters analysed to do not merit
a much better system than that of the instantaneous equalizers in the zero
forcing and LMMSE solutions. In the training period, all the equalizers can
perform rather optimally and after that, all endure noise eects which are
carried through. In the adaptive lters, noise eects from having incorrect
desired signals will accumulate inaccuracies in the equalizer coecients
until the next pilot symbols arrive. Such is the case for the zero forcing and
LMMSE algorithms which use the same coecients until the next pilot sig-
nal are received, but the simplicity of these equalizers cannot be over looked.
Particularly when they are performed in the frequency domain utilizing the
role of the DFT in the OFDM system. Further research needs to be done
to come to a fairer conclusion. Looking into Decision Feedback Equalizers
which use zero forcing and LMMSE is necessary. There are also other adap-
tive schemes for zero forcing and LMMSE which I would encourage future
students to look into. I hope I have covered ground in explaining fundamen-
6.10. SUMMARY 83
0 10 20 30 40 50 60 70 80
10
8
10
7
10
6
10
5
10
4
10
3
10
2
10
1
RLS Error Over OFDM Symbol
M
e
a
n

S
q
u
a
r
e
d

E
r
r
o
r
Baseband Symbol Number
Figure 6.14: Error sequence of RLS tracking over rst OFDM symbol.
tals clearly enough so that future thesis students who may read this do not
have to re-invent the wheel and spend too much time on the basics in order to
move on. One area which I planned to look into but didnt get to was nding
TEQ (Time domain Equalizers) to shorten the eective channel impulse re-
sponse. This is useful in the case where carrier orthogonality is compromised
when the channel impulse response grows larger than the length of the cyclic
prex. Relevant papers on these include [18], [19], [20] and [21]. In wireless
time variant channels, the impulse response can change be it slowly with
laptops which people use on a table. Well, thats all on Equalization from
me. I found it somewhat a bad tradition in signal processing circles to use
language hard to understand and equations that look like a mess. Hopefully
I have presented material, although already no new, but in a clearer way.
84 CHAPTER 6. EQUALIZATION
0 50 100 150 200 250 300 350 400
10
25
10
20
10
15
10
10
10
5
10
0
LMS vs RLS Receivers
M
e
a
n

S
q
u
a
r
e
d

E
r
o
r
r
Number of Iteration
RLS algorithm
LMS algorithm
Figure 6.15: LMS vs RLS in tracking 5 OFMD symbols.
Chapter 7
Further Research
As you may have noticed, we have already talked about further research as
we have progressed in this thesis. A well know challenge in OFDM systems
is that of synchronization in time, to nd which instance to sample and to
nd where the cyclic prex starts synchronization in frequency, the frequency
oset must be very small.
For Equalization, one area which would be interesting to look into is nding
TEQ (Time domain Equalizers) to shorten the eective channel impulse re-
sponse. This is useful in the case where carrier orthogonality is compromised
when the channel impulse response grows larger than the length of the cyclic
prex.
It is most common for OFDM equalizers to to used in a DFE (Decision
Feedback Equalization) structure. I would encourage future students to look
into this and why this is such a popular technique and the intricacies behind
it.
There is also work to be done on what some people call pre-equalization.
These are recovery techniques done at the transmitter using some kind of
feedback link. Optimizations in adaptive loading has also been mentioned as
a tool for engineers to use in OFDM systems.
The channel estimators considered in this thesis have all been block based
channel estimators. In order to obtain better spectral eciency, we can inves-
tigate the performance of channel estimation based on pilot patterns where
pilot symbols occur only on some sub carriers. This would free the sub car-
riers to carry data. This can then be compared to the performance of block
based estimators.
85
86 CHAPTER 7. FURTHER RESEARCH
The LMMSE and low rank approximate estimators in this thesis only con-
siders the frequency correlation of the signal. In order to maximize the
performance, we should consider both time and frequency correlation in the
channel estimator. The problem with this is that it is very high complexity
due to two correlation. One possible solution to this is to use a seperable
lter to consider each correlation separately from the other, which will result
in a small performance degradation, but substantial reduction in complexity.
Other possible areas for future study include the study of channel estimation
under fast fading environments, where the channel changes faster than the
symbol, or estimation under non-sample spaced channels.
Chapter 8
Conclusion
From the 1960s to today, we can see that OFDM is another tool for which the
engineer can use to overcome channel eects in a wireless environment. The
are many advantages in OFDM, but there are still many complex problems
to solve.
We hope this thesis has provided a basic simulation tool for future students
to use as a starting point in their theses. It is our motivation that by using
the parameters of a working system, a much clearer and insightful exaplana-
tion of the fundementals of OFDM have been presented.
Channel Estimation is an important part of an OFDM receiver, especially in
wireless environments where the channel is unpredictable and changing con-
tinuously. A good channel estimation will allow the equalizer to correct the
fading eects of the channel. Of the three channel estimators studied in this
thesis, the low rank approximate estimator seems to be the most practical
in terms of good performance and low complexity. The LS does not perform
well in low SNR environments while the LMMSE estimator complexity seems
to high for a small performance improvement.
In OFDM equalization, it seems that the adaptive algorithms used in the
OFDM did not add many special benets. Its adaptive capability allowed
the equalizer coecients to change with time but it is done on the basis on
resythesised symbols for which noise and rounding errors may accumulate.
These algorithm did not exploit OFDM characteristics which the zero forcing
and LMMSE did. It may be wise to incorporate LMMSE design into a DFE.
Because the zero forcing and LMMSE equalizers exploit the OFDM design
by equalizing in the frequency domain, it is very simple, epsecially compared
the the complexities of the adaptive algorithms.
87
88 CHAPTER 8. CONCLUSION
The conclusion of the matter is, the journey that is thesis has taught as
much. It has enabled us to learn for ourselves and digest textbooks which
would have boggled our eyes and minds before. As our supervisor, Dr. Choi,
said, I think we have stronger stomachs for doing it all on our own from
scratch. Enjoy your thesis!
For further information, please visit our thesis website at:
http://www.geocities.com/ofdm99
for a comprehensive list of references and internet resources on OFDM.
Bibliography
[1] M. Engels, Wireless OFDM Systems How to make them work?, Kluwer
Academic Publishers, Massachusets, USA, 2002.
[2] A.R.S. Bahai, B.R. Saltzberg, Multi-Carrier Digital Communications
Theory and Applications of OFDM, Kluwer Academic/Plenum Pub-
lishers, New York, USA ,1999.
[3] J.G. Proakis, Digital Communications 4th Edition, McGraw-Hill
Higher Education, New York, USA, 2001.
[4] S. Haykin, Adaptive Filter Theory 4th Edition, Prentice Hall, New
Jersey , USA, 2002.
[5] R. van Nee, R. Prasad, OFDM for Wireless Multimedia Communica-
tions , Artech House, 2000
[6] J. Terry, J. Heiskala, OFDM Wireless LANs: A Theoretical and Practi-
cal Guide , Sams Publishing, 2002
[7] H. Harada, R. Prasad, Simulation and software radio for mobile com-
munications , Artech House Publishers
[8] D.S. Taubman, Elec4042: Signal Processing 2 Complete Set of Written
Materials Session 1, 2003, 2003.
[9] R.W. Chang. Synthesis of bandlimited orthogonal signals for multichan-
nel data transmission., Bell System Tech. Journal, 45 pp. 17751796,
Dec. 1966.
[10] A. Peled and A. Ruiz. Frequency domain data transmission using
reduced computational complexity algorithms., In proc. IEEE Conf.
Acoust., Signal Processing, pp. 964967, Denver, CO, 1980.
89
90 BIBLIOGRAPHY
[11] S. B. Weinstein and P.M. Ebert. Data transmission by frequency-
divison multiplexing using the discrete Fourier transform., IEEE Trans.
Commun., COM- 19, No.5. pp. 628634, Oct 1971
[12] H. Sari, G. Karam, and I. Jeanclaude, Transmission techniques for
digital terrestrial TV broadcasting,, IEEE Commun. Mag., vol. 33, pp.
100109, Feb. 1995.
[13] Bingham, J.A.C., Multicarrier modulation for data transmission: An
idea whose time has come, IEEE Communications Magazine, vol. 28,
no. 5, pp. 5-14, May 1990.
[14] J. A. C. Bingham, ADSL, VDSL, and Multicarrier Modulation, Wiley-
Interscience, 2000.
[15] J. S. Chow, J. C. Tu, and J. M. Cio, A discrete multitone transceiver
system for HDSL applications, IEEE Journal on Selected Areas in Com-
munications, vol. 9, no. 6, pp. 895-908, Aug. 1991.
[16] P. S. Chow, J. M. Cio, and J. A. C. Bingham, A practical discrete
multitone transceiver loading algorithm for data transmission over spec-
trally shaped channels, IEEE Transactions on Communications, vol. 73,
no. 2, pp. 773-775, Feb./Mar./Apr. 1995.
[17] P. S. Chow, J. C. Tu, and J. M. Cio, Performance evaluation of a
mutlichannel transceiver system for ADSL and VHDSL services, IEEE
Journal on Selected Areas in Communications, vol. SAC-9, no. 6, pp.
909-919, Aug. 1991.
[18] Broadband Radio Access Networks; Hiperlan Type 2; Physical (PHY)
Layer, ETSI Standard TS 101 475, ETSI, February 2001.
[19] K. Witrisal, 11 OFDM Air-Interface Design for Multimedia Communi-
cations, Ch.4 Ph.D. Thesis, Delft University of Technology, The Nether-
lands, April 2002.
[20] Henkel, W., Kessler, Th., Maximizing the Channel Capacity of Multi-
carrier Transmission by Suitable Adaptation of the Time-Domain Equal-
izer, IEEE Transactions on Communications, Vol. 48, No. 12, pp. 2000
2004, Dec. 2000.
[21] Peter J.W. Melsa, Richard C.Younce, and Charles E. Rohrs. Impulse
Response Shortening for Discrete Multitone Transceivers., IEEE Trans-
actions on Communications, 44(12):1662-1672, December 1996.
BIBLIOGRAPHY 91
[22] Kok-Wui Cheong and John M. Cio. Precoder for DMT with Insuf-
cient Cyclic Prex. In Proc. of the IEEE International Conference on
Communications, ICC, Atlanta, USA, June 1998.
[23] N. Al-Dhahir and J. M. Cio, Optimum Finite-length equalization for
multicarrier transceivers, IEEE Trans. Commun., vol. 44, no. 1, 1996,
pp. 5664.
[24] Ove Edfors, Magnus Sandell, Jan-Jaap van de Beek, Daniel Landstrom
and Frank Sjoberg, An introduction to orthogonal frequency-division
multiplexing September 1996.
[25] Jan-Jaap van de Beek, Ove Edfors, Magnus Sandell, Sarah Kate Wilson
and Per Ola Borjesson, On Channel Estimation in OFDM Systems,
in Proc. IEEE Vehicular Technology Conf.,vol. 2,Chicago, IL, July 1995,
pp. 815819.
[26] Ove Edfors, Magnus Sandell, Jan-Jaap van de Beek, Sarah Kate Wilson
and Per Ola Borjesson, OFDM Channel Estimation by Singular Value
Decomposition, IEEE Trans. Comms., July 1998, 46(7) pp. 931939
[27] S. U. H. Qureshi, Adaptive Equalization, Proc. IEEE, vol. 73, no. 9,
pp. 13491387, Sept. 1985.
[28] B. Widrow, J. McCool, and M. Ball, Complex LMS Algorithm., IEEE
Proceedings, vol. 63, p:719720, 1975.
[29] R.E. Kalman. A new approach to linear ltering and prediction prob-
lems., Transactions of the ASME, Journal of Basic Engineering, 82,
p:3545, 1960.
[30] J. S. Chow, J. M. Cio and J. Bingham, Equalizer training algorithms
for multicarrier modulation systems, in Int. Conf. Commun., 1993, pp.
761765.
[31] G. Iliev and N. Kasabov. Channel equalization using adaptive ltering
with averaging, 5th Joint Conference on Information Sciences (JCIS
2000), Atlantic City, USA, 27 Feb - 3 March
92 BIBLIOGRAPHY
Appendix A
Basic OFDM model
%+----------------------------------------------------------------+
%| |
%| Name: ofdm.m |
%| Author: Mathew Liu, James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| This is meant to provide a skeleton for further |
%| implmentations. Channel estimates, Equalizers and bandpass |
%| models will be built on top of this. |
%| Requirements: closest.m, qammod.m, qamdemod.m |
%| |
%+----------------------------------------------------------------+
% We assume that with are using 64 length FFT with 64 subcarriers
% all carrying data. So there are no carriers specifically assigned
% to pilot.
clear all;
close all;
%============= Some standard Hyperlan Params ======================
%--- These params are not used in this particular model------------
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing
%============== Our params based on Hyperlan/2 ====================
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
93
94 CHAPTER 8. APPENDIX A
M = 4; % Bits encoded in a QAM symbol.
%+----------------------------------------------------------------+
%| OFDM TRANSMITTER |
%+----------------------------------------------------------------+
%======== Data Generation =========================================
input = rand(1,FFTLen*M) > 0.5; % Binary data generation
%======== Serial To Block (FFTLen, M) =============================
input_para = reshape(input,FFTLen,M);
%======== Baseband Modulation =====================================
input_symbols = qammod(input_para,FFTLen, M);
%================= IFFT ===========================================
input_time_para = ifft(input_symbols);
%================ Parallel to Serial ==============================
input_time_serial = reshape(input_time_para,1,FFTLen);
% Time domain signal
%============= Gaurd Interval Removal (GII) ======================
input_ext = [input_time_serial((FFTLen-CPLen+1):FFTLen), ...
input_time_serial];
%+----------------------------------------------------------------+
%| CHANNEL MODEL |
%+----------------------------------------------------------------+
%=============== Pass Through Rayleigh Channel ==========
output_ext = filter(1, 1, input_ext); % Does nothing at the moment.
%+----------------------------------------------------------------+
%| OFDM RECEVIER |
%+----------------------------------------------------------------+
%============== Gaurd Interval Removal (GIR) ======================
output_time_serial = output_ext((CPLen+1):FFTLen+CPLen);
%======== Serial To Parallel ======================================
output_time_para = reshape(output_time_serial,FFTLen,1);
%================= FFT ============================================
95
output_symbols = fft(output_time_para);
%================= Baseband Demodulation ==========================
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial ==============================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%================ Error Calculation ===============================
% Error is ZERO, so it works.
error1= input - output;
figure(1);
semilogy(abs(error1));
%====================== End File ==================================
%+----------------------------------------------------------------+
%| |
%| Name: qammod.m |
%| Author: Mathew Liu, James Shen |
%| Description: takes in a binary stream "in_binary" and maps |
%| them to a constellation defined by QAM symbols. The number |
%| of QAM symbols on this constellation is determined by M^2. |
%| |
%+----------------------------------------------------------------+
function[symbols] = qammod(in_binary, carrier_count, M)
% M^2 = number of points on constellation.
% in_binary(64,M) 64 derived from IFFT size
% in_binary is made from the S/P
%=================== Generate QAM Alphabet =========================
temp_M = -(M-1):2:(M-1);
for i=1:M
for k = 1:M
QAM(i,k) = temp_M(i) + j*temp_M(k);
end
end
QAM = QAM(:).;
%================= Binary to Decimal and assign Symbol ==============
symbols = zeros(carrier_count, 1);
96 CHAPTER 8. APPENDIX A
index = 1;
for row=1:carrier_count
index = 1;
for bit_position=1:M
index = index + ((2^(bit_position-1))*in_binary(row,bit_position));
% index is a number from 1-16
end
symbols(row) = QAM(index);
end
%====================== End File ====================================
%+----------------------------------------------------------------+
%| |
%| Name: qamdemod.m |
%| Author: Mathew Liu, James Shen |
%| Description: Takes in in_symbol which can be noisy, ie |
%| it does not lie on the original constellation. We map it to |
%| the closest symbol in the constellation, find its index in |
%| the QAM alphabet array and turn it back into a binary. |
%| |
%+----------------------------------------------------------------+
function[out_binary] = qamdemod(in_symbols, carrier_count, M)
%================ Generate QAM alphabet again =================
temp_M = -(M-1):2:(M-1); % Generate QAM Alphabet
for i=1:M
for k = 1:M
QAM(i,k) = temp_M(i) + j*temp_M(k);
end
end
QAM_alpha = QAM(:).;
%========= Map Symbol to Constellation and Dec2Bin ============
for row=1:carrier_count
[out_symbol, index] = closest(QAM_alpha, in_symbols(row));
index = index - 1;
97
% The index is always 1 more than the binary number since the
% index needs to start with one, where as the binary data can be 0.
% Decimal to Binary conversion
for bit_position = M:-1:1
if (index >= 2^(bit_position-1))
out_binary(row,bit_position) = 1;
index = index - 2^(bit_position-1);
else
out_binary(row,bit_position) = 0;
end
end
end
%====================== End File =================================
%+----------------------------------------------------------------+
%| |
%| Name: closest.m |
%| Author: Mathew Liu, James Shen |
%| Description: Takes in a QAM alphabet and a noisy_symbol and |
%| finds the closest match on the constellation. It also returns |
%| the index of it inside the QAM alphabet array. |
%| |
%+----------------------------------------------------------------+
function[out_symbol, index] = closest(QAM_alpha, noise_symbol)
for i=1:length(QAM_alpha)
dist(i) = abs(QAM_alpha(i) - noise_symbol);
end
[val,index] = min(dist);
out_symbol = QAM_alpha(index);
%====================== End File =================================
98 CHAPTER 8. APPENDIX A
Appendix B
Passband Simulation OFDM model us-
ing LPF
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_LPF.m |
%| Author: Mathew Liu, James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| Using rcosine as transmit filter. Works using LPF at the |
%| receiver. |
%| |
%+----------------------------------------------------------------+
% We assume that with are using 64 length FFT with 64 subcarriers
% all carrying data. So there are no carriers specifically assigned
% to pilot.
clear all;
close all;
%=============== Some standard Hyperlan Params ====================
T = 50e-9; % System baseband sampling period.
fs = 1/T; % System baseband sampling freq = 20MHz .
Tcp = 16*T;% CP period.
Tu = 64*T; % Useful symbol period.
Ts = Tu+Tcp; % OFDM Symbol period 80 samples.
delta_f = 0.3125e6; % Frequency spacing.
time_scale = T:T:Ts; % Time samples in baseband signals.
N = length(time_scale); % NUmber of time samples in baseband.
f1 = 1/Ts:1/Ts:N/(2*Ts); % Freqs in the 1st half of Nyquist circle.
f2 = -N/(2*Ts):1/Ts:-1/Ts; % Freqs in the 2nd half of Nyquist circle.
freq_scale = [f1 f2]; % Baseband frequency scale.
fc = 2.4e9; % Carrier freq.
99
100 CHAPTER 8. APPENDIX B
% If Rfs=2*fc then,
% If fc=5.2, over=size(rt)/80 - 1=519;
% If fc=2.4, over=239
% If Rfs=5*fc then,
% If fc=5.2, over=size(rt)/80 - 1=1299;
% If fc=2.4, over=599
Rfs = 5*fc; % Simulation frequency.
% Mimics real time behaviour for bandpass signal.
% Sampling at Nyquist rate of twice the highest freq.
RT = 1/Rfs; % The real-time sampling period
rt = RT:RT:Ts; % The time samples in real-time bandpass
RN = length(rt); % Number of samples in real-time bandpass
f3 = 1/Ts:1/Ts:RN/(2*Ts);
f4 = -RN/(2*Ts):1/Ts:-1/Ts;
rf_scale = [f3 f4]; % Bandpass freq scale.
%============== Our params based on Hyperlan/2 ====================
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
%+----------------------------------------------------------------+
%| OFDM TRANSMITTER |
%+----------------------------------------------------------------+
%==================== Data Generation =============================
input = rand(1,FFTLen*M) > 0.5; % transmits one symbol
%================ Serial To Block (FFTLen, M) =====================
input_para = reshape(input,FFTLen,M);
%================== Baseband Modulation ===========================
input_symbols = qammod(input_para,FFTLen, M);
figure(1);
plot(input_symbols,ob);grid;axis square;axis equal, ...
title(4 bit QAM constellation), ylabel(Imaginary), xlabel(Real);
%====================== IFFT =======================================
input_time_para = ifft(input_symbols);
%================ Parallel to Serial ===============================
input_time_serial = reshape(input_time_para,1,FFTLen); % Time domain signal
101
%============= Gaurd Interval Insertion (GII) =====================
input_ext = [input_time_serial((FFTLen-CPLen+1):FFTLen),input_time_serial];
figure(2);
subplot(2,1,1);
stem(time_scale, abs(input_ext)), title(Cycl. Ext. Signal (Time)), ...
ylabel(Amplitude), xlabel(Time (s));
subplot(2,1,2);
stem(freq_scale, abs(fft(input_ext))), ...
title(Specturm of Cycl. Ext. Signal (Freq)), ...
ylabel(Amplitude), xlabel(Frequncy (Hz));
%=================== Pulse shaping Tansmit Filter ====================
over = 599; % Oversampling factor according to Simulation frequency.
input_over = kron(input_ext, [1, zeros(1,over)]);
Nover = length(input_over);
pulse_shape = rcosine(1,(over+1),normal,0.35); % raised-cosine pulse-shape
[trash,pos] = max(pulse_shape); % raised cosine filter delay pos
input_shaped_temp = conv(pulse_shape, input_over);
input_shaped = input_shaped_temp(pos:(pos+Nover-1));% Get rid of transient
%-----------------Over sampling scales--------------------------------
overt = Ts/Nover:Ts/Nover:Ts;
f5 = 1/T:1/T:Nover/(2*T);
f6 = -Nover/(2*T):1/T:-1/T;
overf_scale = [f5 f6];
%=================== Graphing Section ================================
figure(3);
subplot(2,1,1);
stem(overt(1:5000), abs(input_over(1:5000)), b), ...
title(Signal after over sampling), ...
ylabel(Amplitude), xlabel(Time (s)); hold on;
plot(overt(1:5000), abs(input_shaped(1:5000)), r), ...
title(Signal after pulse shaping.); hold off;
subplot(2,1,2);
plot(overf_scale, abs(fft(input_shaped))), ...
ylabel(Amplitude), xlabel(Frequncy (Hz));
%================== Upconverter to Carrier Freq =======================
input_bandpass = 2*real(input_shaped.*exp(j*2*pi*fc*rt)); % Bandpass signal
figure(4);
102 CHAPTER 8. APPENDIX B
subplot(2,1,1);
plot(rt(1:5000), input_bandpass(1:5000)), title(Bandpass signal (time)), ...
ylabel(Amplitude), xlabel(Time (s));
subplot(2,1,2);
stem(rf_scale, abs(fft(input_bandpass))), ...
title(Spectrum of Bandpass Signal (Freq)), ...
ylabel(Amplitude), xlabel(Frequncy (Hz));
%+----------------------------------------------------------------+
%| CHANNEL MODEL |
%+----------------------------------------------------------------+
%=============== Pass Through Rayleigh Channel ====================
output_ext = filter(1, 1, input_bandpass); % Does nothing at the moment.
%+----------------------------------------------------------------+
%| OFDM RECEVIER |
%+----------------------------------------------------------------+
%================ Downconvert ====================================
rec_over_bad = output_ext.*exp(-j*2*pi*fc*rt); % I/Q downconversion
figure(5);
subplot(2,1,1);
plot(rt(1:5000), abs(rec_over_bad(1:5000))), ...
title(Received Baseband Signal (time)), ...
ylabel(Amplitude), xlabel(Time (s));
subplot(2,1,2);
rec_over_temp = abs(fft(rec_over_bad));
rec_over_temp = rec_over_temp./max(abs(rec_over_temp));
% Normalize spectrum for plotting.
stem(rf_scale, rec_over_temp), ...
title(Spectrum of Baseband Signal (Freq)), ...
ylabel(Amplitude), xlabel(Frequncy (Hz)); hold on;
f = remez(50,[0 0.1 0.2 1],[1 1 0 0]);
% Design of the receiver lowpass filter, order 50
LPF = freqz(f,1,-pi:2*pi/RN:pi-2*pi/RN); % Frequency response of the filter
plot([f4, f3], abs(LPF),r); hold off;
rec_over_temp = conv(f, rec_over_bad); % Signal is filtered
rec_over = rec_over_temp(26:(26+Nover-1)); % Discard transient
%(delay is here 26, linear phase FIR of order 50)
103
figure(6);
subplot(2,1,1);
plot(rt(1:5000), abs(rec_over(1:5000))), ...
title(Received Baseband LPF Signal (time)), ...
ylabel(Amplitude), xlabel(Time (s));
subplot(2,1,2);
stem(rf_scale, abs(fft(rec_over))), ...
title(Spectrum of Baseband LPF Signal (Freq)), ...
ylabel(Amplitude), xlabel(Frequncy (Hz)); hold on;
rec_baseband = rec_over(1:over+1:Nover);
output_ext = rec_baseband;
%============== Gaurd Interval Removal (GIR) =========================
output_time_serial = output_ext((CPLen+1):FFTLen+CPLen);
%======== Serial To Parallel =========================================
output_time_para = reshape(output_time_serial,FFTLen,1);
%================= FFT ===============================================
output_symbols = fft(output_time_para);
%================= Baseband Demodulation =============================
figure(7);
plot(output_symbols,ob);grid;axis square;axis equal, ...
title(Received Symbols), ylabel(Imaginary), xlabel(Real);;
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial =================================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%==================== BER Calculation ================================
errors = abs(input - output);
num_errors = sum(sum(errors));
BER = num_errors/(FFTLen*M)
104 CHAPTER 8. APPENDIX B
Appendix C
Passband Simulation OFDM model us-
ing Hilbert
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_Hilbert.m |
%| Author: Mathew Liu, James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| Using rcosine as transmit filter. Hilbert transform at |
%| recevier. |
%| |
%+----------------------------------------------------------------+
% We assume that with are using 64 length FFT with 64 subcarriers all
% carrying data. So there are no carriers specifically assigned to pilot.
clear all;
close all;
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System baseband sampling period.
fs = 1/T; % System baseband sampling freq = 20MHz .
Tcp = 16*T; % CP period.
Tu = 64*T; % Useful symbol period.
Ts = Tu+Tcp; % OFDM Symbol period 80 samples.
delta_f = 0.3125e6; % Frequency spacing.
time_scale = T:T:Ts; % Time samples in baseband signals.
N = length(time_scale); % NUmber of time samples in baseband.
f1 = 1/Ts:1/Ts:N/(2*Ts); % Freqs in the 1st half of Nyquist circle.
f2 = -N/(2*Ts):1/Ts:-1/Ts; % Freqs in the 2nd half of Nyquist circle.
freq_scale = [f1 f2]; % Baseband frequency scale.
fc = 2.4e9; % Carrier frequency
% If Rfs=2*fc then,
105
106 CHAPTER 8. APPENDIX C
% If fc=5.2, over=size(rt)/80 - 1=519;
% If fc=2.4, over=239
% If Rfs=5*fc then,
% If fc=5.2, over=size(rt)/80 - 1=1299;
% If fc=2.4, over=599
Rfs = 5*fc; % Simulation frequency.
% Sampling at Nyquist rate of twice the highest freq.
RT = 1/Rfs; % The real-time sampling period
rt = RT:RT:Ts; % The time samples in real-time bandpass
RN = length(rt); % Number of samples in real-time bandpass
f3 = 1/Ts:1/Ts:RN/(2*Ts);
f4 = -RN/(2*Ts):1/Ts:-1/Ts;
rf_scale = [f3 f4]; % Bandpass freq scale.
%============== Our params based on Hyperlan/2 =================
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
%+----------------------------------------------------------------+
%| OFDM TRANSMITTER |
%+----------------------------------------------------------------+
%======== Data Generation ===============================
input = rand(1,FFTLen*M) > 0.5; % transmits one symbol
%======== Serial To Block (FFTLen, M) ============================
input_para = reshape(input,FFTLen,M);
%======== Baseband Modulation ===========================
input_symbols = qammod(input_para,FFTLen, M);
figure(1);
plot(input_symbols,ob);grid;axis square;axis equal;
%================= IFFT =================================
input_time_para = ifft(input_symbols);
%================ Parallel to Serial ====================
input_time_serial = reshape(input_time_para,1,FFTLen); % Time domain signal
%============= Gaurd Interval Insertion (GII) =================
input_ext = [input_time_serial((FFTLen-CPLen+1):FFTLen),input_time_serial];
figure(2);
107
subplot(2,1,1);
stem(time_scale, abs(input_ext)), title(Cycl. Ext. Signal (Time));
subplot(2,1,2);
stem(freq_scale, abs(fft(input_ext))), ...
title(Specturm of Cycl. Ext. Signal (Freq));
%=================== Pulse shaping Tansmit Filter ===============================
%input_shaped = input_ext.*hamming(FFTLen+CPLen).;
over = 599; % Oversampling factor according to Simulation frequency.
input_over = kron(input_ext, [1, zeros(1,over)]);
Nover = length(input_over);
%pulse_shape = ones(1, over+1);
pulse_shape = rcosine(1,(over+1),normal,0.35);
% basic raised-cosine pulse-shape
[trash,pos] = max(pulse_shape); % raised cosine filter delay pos
input_shaped_temp = conv(pulse_shape, input_over);
input_shaped = input_shaped_temp(pos:(pos+Nover-1));% Get rid of transient
%-----------------Over sampling scales---------------
overt = Ts/Nover:Ts/Nover:Ts;
f5 = 1/T:1/T:Nover/(2*T);
f6 = -Nover/(2*T):1/T:-1/T;
overf_scale = [f5 f6];
%================= Graphing Section ================================
figure(3);
subplot(2,1,1);
stem(overt(1:5000), abs(input_over(1:5000)), b), ...
title(Signal after over sampling); hold on;
plot(overt(1:5000), abs(input_shaped(1:5000)), r), ...
title(Signal after pulse shaping.); hold off;
subplot(2,1,2);
stem(overf_scale, abs(fft(input_shaped))), ...
title(Spectrum of signal after pulse shaping);
%================== Upconverter to Carrier Freq ==========================
input_bandpass = 2*real(input_shaped.*exp(j*2*pi*fc*rt)); % Bandpass signal
figure(4);
subplot(2,1,1);
plot(rt(1:5000), input_bandpass(1:5000)), title(Bandpass signal (time));
108 CHAPTER 8. APPENDIX C
subplot(2,1,2);
stem(rf_scale, abs(fft(input_bandpass))), ...
title(Spectrum of Bandpass Signal (Freq));
%+----------------------------------------------------------------+
%| CHANNEL MODEL |
%+----------------------------------------------------------------+
%=============== Pass Through Rayleigh Channel ==========
output_ext = filter(1, 1, input_bandpass); % Does nothing at the moment.
%+----------------------------------------------------------------+
%| OFDM RECEVIER |
%+----------------------------------------------------------------+
%================ Downconvert ==================================
rec_over_bad = output_ext;
figure(5);
subplot(2,1,1);
plot(rt(1:5000), abs(rec_over_bad(1:5000))), ...
title(Received Baseband Signal (time)), ...
ylabel(Amplitude), xlabel(Time (s));
subplot(2,1,2);
rec_over_temp = abs(fft(rec_over_bad));
rec_over_temp = rec_over_temp./max(abs(rec_over_temp));
% Normalize spectrum for plotting.
stem(rf_scale, rec_over_temp), ...
title(Spectrum of Baseband Signal (Freq)), ...
ylabel(Amplitude), xlabel(Frequncy (Hz)); hold on;
h = remez(200,[0.02 0.98],[1 1],Hilbert); % Design of a
% Hilbert filter of order 200
f2 = 0.5*([zeros(1,100) 1 zeros(1,100)]+ j*h); % Complex Phase
%splitter filter whose real part is a delay and
pos = 101; % imaginary part is a Hilbert transformer
F2 = freqz(f2,1,-pi:2*pi/RN:pi-2*pi/RN); % Frequency response
% of the complex filter
plot([f4, f3],abs(F2),r); hold off;
rec_over_temp = conv(f2,rec_over_bad); % Signal is filtered
rec_over = rec_over_temp(pos:(pos+Nover-1)); % Get rid of transient part.
109
rec_baseband = rec_over.*exp(-j*2*pi*fc*rt); % I/Q downconversion
figure(6);
subplot(2,1,1);
plot(rt(1:5000), abs(rec_baseband(1:5000))), ...
title(Received Baseband Downconverted Signal (time));
subplot(2,1,2);
stem(rf_scale, abs(fft(rec_baseband))), ...
title(Spectrum of Baseband Downconverted Signal (Freq)); hold on;
output_ext = rec_baseband(1:over+1:Nover);
%============== Gaurd Interval Removal (GIR) ==================
output_time_serial = output_ext((CPLen+1):FFTLen+CPLen);
%======== Serial To Parallel =================================
output_time_para = reshape(output_time_serial,FFTLen,1);
%================= FFT =================================
output_symbols = fft(output_time_para);
%================= Baseband Demodulation ===========================
figure(7);
plot(output_symbols,ob);grid;axis square;axis equal;
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial ====================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%==================== BER Calculation =========================
errors = abs(input - output);
num_errors = sum(sum(errors));
BER = num_errors/(FFTLen*M)
110 CHAPTER 8. APPENDIX C
Appendix D
Channel Estimation
%+-----------------------------------------------------------------+
%| |
%| Name: ofdm_CE.m |
%| Author: Mathew Liu |
%| Description: Test File for Channel Estimation |
%| This file can be run to produce the graphs |
%| |
%+----------------------------------------------------------------+
%--------------------------------------------------------------------------
% System parameters
clear all;
para = 64;
gilen = 16;
fftlen = 64;
fftlen2 = fftlen + gilen;
ml = 4;
rayleigh_var = 0.5;
noiseVar = 0.001;
frame_count = 300;
symbol_count = 5;
%--------------------------------------------------------------------------
% Initialise Error Vectors
SER = zeros(1,11);
BER = zeros(1,11);
MSE = zeros(1,11);
111
112 CHAPTER 8. APPENDIX D
SER_LS = zeros(1,11);
BER_LS = zeros(1,11);
MSE_LS = zeros(1,11);
SER_LMMSE = zeros(1,11);
BER_LMMSE = zeros(1,11);
MSE_LMMSE = zeros(1,11);
SER_SVD5 = zeros(1,11);
BER_SVD5 = zeros(1,11);
MSE_SVD5 = zeros(1,11);
%SER_SVD10 = zeros(1,11);
%BER_SVD10 = zeros(1,11);
for i = 1:11
% Set Channel noise variable
SNRdB = (i-1) * 5; % SNRdB = 0 - 40dB
SNR = 10^(SNRdB/10);
noiseVar = 1 / SNR;
% Simulating 1000 OFDM Frames
% Each frame has 6 OFDM symbols
% The first symbol is for Channel Estimation, and the others for data
% The channel is assumed to be constant for one frame (6 symbols)
for frames = 1:frame_count
impulse_response = [rayleigh(rayleigh_var,gilen) zeros(1,para-gilen)];
channel_attn = fft(impulse_response);
% Generate random binary data (pilot tones)
Tx_sel_data = binary_data(1, para*ml);
% Serial -> Parallel conversion
Tx_para_data = reshape(Tx_sel_data,para,ml);
% 16-QAM modulation
113
Tx_QAM_data = qammod(Tx_para_data, para, ml);
% OFDM Transmitter
Tx_data = ofdm_transmit(Tx_QAM_data, para, gilen);
% Normalise signal power
Tx_data = (1 / sqrt(power_calc(Tx_data))) * Tx_data;
% Pass through noisy multipath channel
Rx_data = channel(Tx_data, impulse_response, noiseVar);
% OFDM Receiver
Rx_QAM_data = ofdm_receive(Rx_data, para, gilen);
% Channel Estimation
h_LS = LS_estimate(Rx_QAM_data, Tx_QAM_data);
h_LMMSE = LMMSE_estimate(Rx_QAM_data, Tx_QAM_data, h_LS, ...
rayleigh_var, noiseVar, para, gilen, channel_attn);
h_SVD5 = SVD5_estimate(Rx_QAM_data, Tx_QAM_data, h_LS, ...
rayleigh_var, noiseVar, para, gilen, channel_attn);
% Update the MSE vector
MSE(i) = MSE(i) + mean((abs(channel_attn - channel_attn)).^2);
MSE_LS(i) = MSE_LS(i) + mean((abs(channel_attn - h_LS)).^2);
MSE_LMMSE(i) = MSE_LMMSE(i) + mean((abs(channel_attn - h_LMMSE)).^2);
MSE_SVD5(i) = MSE_SVD5(i) + mean((abs(channel_attn - h_SVD5)).^2);
for symbols = 1:symbol_count
% Generate random binary data (pilot tones)
Tx_sel_data = binary_data(1, para*ml);
% Serial -> Parallel conversion
Tx_para_data = reshape(Tx_sel_data,para,ml);
% 16-QAM modulation
Tx_QAM_data = qammod(Tx_para_data, para, ml);
% OFDM Transmitter
Tx_data = ofdm_transmit(Tx_QAM_data, para, gilen);
114 CHAPTER 8. APPENDIX D
% Normalise signal power
Tx_data = (1 / sqrt(power_calc(Tx_data))) * Tx_data;
% Pass through multipath channel
Rx_data = channel(Tx_data, impulse_response, noiseVar);
% OFDM Receiver
Rx_QAM_data = ofdm_receive(Rx_data, para, gilen);
% Equalise data - a simple equaliser (division in freq domain)
Rx_QAM_data_LS = Rx_QAM_data ./ h_LS;
Rx_QAM_data_LMMSE = Rx_QAM_data ./ h_LMMSE;
Rx_QAM_data_SVD5 = Rx_QAM_data ./ h_SVD5;
% 16-QAM demodulation
Rx_para_data = qamdemod(Rx_QAM_data, para, ml);
Rx_para_data_LS = qamdemod(Rx_QAM_data_LS, para, ml);
Rx_para_data_LMMSE = qamdemod(Rx_QAM_data_LMMSE, para, ml);
Rx_para_data_SVD5 = qamdemod(Rx_QAM_data_SVD5, para, ml);
% Parallel -> Serial conversion
Rx_sel_data = reshape(Rx_para_data, 1, para*ml);
Rx_sel_data_LS = reshape(Rx_para_data_LS, 1, para*ml);
Rx_sel_data_LMMSE = reshape(Rx_para_data_LMMSE, 1, para*ml);
Rx_sel_data_SVD5 = reshape(Rx_para_data_SVD5, 1, para*ml);
% Calculate error
bit_errors = sum(xor(Tx_sel_data, Rx_sel_data));
if (bit_errors ~= 0)
BER(i) = BER(i) + bit_errors;
SER(i) = SER(i) + 1;
end
% Calculate LS error
bit_errors_LS = sum(xor(Tx_sel_data, Rx_sel_data_LS));
if (bit_errors_LS ~= 0)
BER_LS(i) = BER_LS(i) + bit_errors_LS;
SER_LS(i) = (SER_LS(i) + 1);
end
115
% Calculate LMMSE error
bit_errors_LMMSE = sum(xor(Tx_sel_data, Rx_sel_data_LMMSE));
if (bit_errors_LMMSE ~= 0)
BER_LMMSE(i) = BER_LMMSE(i) + bit_errors_LMMSE;
SER_LMMSE(i) = (SER_LMMSE(i) + 1);
end
% Calculate SVD Rank 5 error
bit_errors_SVD5 = sum(xor(Tx_sel_data, Rx_sel_data_SVD5));
if (bit_errors_SVD5 ~= 0)
BER_SVD5(i) = BER_SVD5(i) + bit_errors_SVD5;
SER_SVD5(i) = (SER_SVD5(i) + 1);
end
end
end
end
%--------------------------------------------------------------------------
% Average the Errors to find the error rate
BER = BER ./ (symbol_count * frame_count * para * ml);
BER_LS = BER_LS ./ (symbol_count * frame_count * para * ml);
BER_LMMSE = BER_LMMSE ./ (symbol_count * frame_count * para * ml);
BER_SVD5 = BER_SVD5 ./ (symbol_count * frame_count * para * ml);
SER = SER ./ (symbol_count * frame_count)
SER_LS = SER_LS ./ (symbol_count * frame_count)
SER_LMMSE = SER_LMMSE ./ (symbol_count * frame_count)
SER_SVD5 = SER_SVD5 ./ (symbol_count * frame_count)
MSE = MSE ./ frame_count;
MSE_LS = MSE_LS ./ frame_count;
MSE_LMMSE = MSE_LMMSE ./ frame_count;
MSE_SVD5 = MSE_SVD5 ./ frame_count;
% Plot graphs
figure(1);
plot([0:5:50], MSE_LS, ro:), title(Estimator MSE Comparison), ...
ylabel(Mean Square Error), xlabel(SNR (dB)); hold on;
116 CHAPTER 8. APPENDIX D
plot([0:5:50], MSE_LMMSE, bx:), legend(MSE LS,MSE LMMSE,MSE SVD);
plot([0:5:50], MSE_SVD5, c^:); hold off;
figure(2);
semilogy([0:5:50], BER_LS, ro:), title(Estimator BER Comparison), ...
ylabel(Bit Error Rate), xlabel(SNR (dB)); hold on;
semilogy([0:5:50], BER_LMMSE, bx:), legend(BER LS,BER LMMSE,BER SVD);
semilogy([0:5:50], BER_SVD5, c^:); hold off;
figure(3);
semilogy([0:5:50], SER_LS, ro:), title(Estimator SER Comparison), ...
ylabel(Symbol Error Rate), xlabel(SNR (dB)); hold on;
semilogy([0:5:50], SER_LMMSE, bx:), legend(SER LS,SER LMMSE,SER SVD);
semilogy([0:5:50], SER_SVD5, c^:); hold off;
%+----------------------------------------------------------------+
%| |
%| Name: binary_data.m |
%| Author: Mathew Liu |
%| Description: Random Binary Data Generator |
%| |
%| |
%+----------------------------------------------------------------+
function [bin_data] = binary_data(rows, cols)
bin_data = rand(rows,cols) > 0.5;
%+----------------------------------------------------------------+
%| |
%| Name: qammod.m |
%| Author: James Shen, Mathew Liu |
%| Description: QAM16 modulator |
%| |
%| |
%+----------------------------------------------------------------+
function[symbols] = qammod(in_binary, carrier_count, M)
% M^2 = number of points on constellation.
% in_binary(64,M) 64 derived from IFFT size
117
% in_binary is made from the S/P
% Generate QAM Alphabet
temp_M = -(M-1):2:(M-1);
for i=1:M
for k = 1:M
QAM(i,k) = temp_M(i) + j*temp_M(k);
end
end
QAM = QAM(:).;
% Find the index corresponding to signal point
symbols = zeros(carrier_count, 1);
index = 1;
for row=1:carrier_count
for bit_position=1:M
index = index + ((2^(bit_position-1)) * in_binary(row,bit_position));
% sum should be a number from 1-16
end
symbols(row) = QAM(index);
index = 1;
end
%+----------------------------------------------------------------+
%| |
%| Name: closest.m |
%| Author: James Shen, Mathew Liu |
%| Description: function to return the closest QAM16 signal point|
%| This function is used by qamdemod and is part of the basic |
%| model. |
%+----------------------------------------------------------------+
function[out_symbol] = closest(QAM_alpha, noise_symbol)
for i=1:length(QAM_alpha)
dist(i) = abs(QAM_alpha(i) - noise_symbol);
end
[val,index] = min(dist);
out_symbol = QAM_alpha(index);
118 CHAPTER 8. APPENDIX D
%+----------------------------------------------------------------+
%| |
%| Name: giins.m |
%| Author: Mathew Liu |
%| Description: Cyclic Prefix / Guard Interval Insertion |
%| |
%| |
%+----------------------------------------------------------------+
function [outdata]= giins(data,fftlen,gilen);
outdata = [data(fftlen-gilen+1:fftlen,:); data];
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_transmit.m |
%| Author: Mathew Liu |
%| Description: Basic OFDM transmitter |
%| |
%| |
%+----------------------------------------------------------------+
function [Tx_data] = ofdm_trasmit(Tx_QAM_data, para, gilen)
% Parameter Derivation Initialisation
fftlen = para;
fftlen2 = fftlen + gilen;
% Convert to Time Domain Signal
Tx_IFFT_data = ifft(Tx_QAM_data);
% Cyclic Prefix Insertion
Tx_data = giins(Tx_IFFT_data,fftlen,gilen);
%+----------------------------------------------------------------+
%| |
%| Name: channel.m |
%| Author: Mathew Liu |
%| Description: Represents the noisy multipath channel |
119
%| This is based on the model decribed under channel estimation |
%| |
%+----------------------------------------------------------------+
function [Rx_data] = channel(Tx_data, impulse_response, noiseVar)
fftlen2 = length(Tx_data);
% Channel Distortion
Rx_faded_data = filter(impulse_response,1,Tx_data);
% Add Noise
white_noise = AWGN_noise(noiseVar,fftlen2);
Rx_data = Rx_faded_data + white_noise;
%+----------------------------------------------------------------+
%| |
%| Name: rayleigh.m |
%| Author: Mathew Liu |
%| Description: Rayleigh Distributed Multi path Fading Channel |
%| Channel is based on exponential PDP as described under CE |
%| |
%+----------------------------------------------------------------+
function [impulse_response] = rayleigh(var,gilen)
% Parameter Initialisation
impulse_response = zeros(1,gilen);
sigma=sqrt(var); %The standard deviation
rms_delay = floor(gilen / 4);
for i=1:gilen
% Two gaussian distribution
x=sigma * randn(1);
y=sigma * randn(1);
% Amplitude is a Rayleigh distribution
amp = sqrt (x^2 + y^2);
120 CHAPTER 8. APPENDIX D
% Scale according to exponential PDP
impulse_response(i) = amp * exp(-(i-1)/rms_delay);
end
%+----------------------------------------------------------------+
%| |
%| Name: AWGN_noise.m |
%| Author: Mathew Liu |
%| Description: Additive White Gaussian Noise Generator |
%| Generates Complex Noise with variance noiseVar |
%| |
%+----------------------------------------------------------------+
function noise = AWGN_noise(noiseVar,noiseLength)
sigma=1/sqrt(2)*sqrt(noiseVar);
noise=randn(1,noiseLength)*sigma ...
+ i*randn(1,noiseLength)*sigma;
%+----------------------------------------------------------------+
%| |
%| Name: LS_estimate.m |
%| Author: Mathew Liu |
%| Description: Function to return the LS channel estimation |
%| |
%| |
%+----------------------------------------------------------------+
function [h_LS] = LS_estimate(Rx_QAM_data, Tx_QAM_data)
h_LS = Rx_QAM_data ./ Tx_QAM_data;
%+----------------------------------------------------------------+
%| |
%| Name: LMMSE_estimate.m |
%| Author: Mathew Liu |
%| Description: Function to calculate LMMSE channel estimate |
%| |
%| |
%+----------------------------------------------------------------+
121
function [h_LMMSE] = LMMSE_estimate(Rx_QAM_data, Tx_QAM_data, h_LS, ...
rayleigh_var, noiseVar, para, gilen, channel_attn)
% Parameter initialisation
SNR = 10 / noiseVar;
beta = 17 / 9;
% Calculate frequency correlation matrix
R_hh = channel_attn * channel_attn;
R_hy = R_hh + (beta/SNR * eye(para));
% Calculate LMMSE estimate
h_LMMSE = R_hh * inv(R_hy) * h_LS;
g_LMMSE = ifft(h_LMMSE);
%+----------------------------------------------------------------+
%| |
%| Name: SVD5_estimate.m |
%| Author: Mathew Liu |
%| Description: Function to calculate Rank 5 Approximation |
%| |
%| |
%+----------------------------------------------------------------+
function [h_SVD] = SVD5_estimate(Rx_QAM_data, Tx_QAM_data, h_LS, ...
rayleigh_var, noiseVar, para, gilen, channel_attn)
% Derive parameters
SNR = 10 / noiseVar;
beta = 17 / 9;
rms_delay = gilen / 4;
% Optimal Low Rank LMMSE Estimator using SVD
R_hh = channel_attn * h_LS;
[U,S,V] = svd(R_hh);
delta = diag(S) ./ (diag(S) + (beta/SNR));
h_SVD = U * diag(delta)*P * V * h_LS;
%+----------------------------------------------------------------+
%| |
122 CHAPTER 8. APPENDIX D
%| Name: ofdm_receive.m |
%| Author: Mathew Liu |
%| Description: Basic OFDM model receiver |
%| |
%| |
%+----------------------------------------------------------------+
function [Rx_QAM_data] = ofdm_receive(Rx_data, para, gilen)
% Parameter Derivation initialisation
fftlen = para;
fftlen2 = fftlen + gilen;
% Cyclic Prefix Removal
Rx_FFT_data = girem(Rx_data,fftlen2,gilen);
% Convert to Frequency Domain Signal
Rx_QAM_data = fft(Rx_FFT_data);
%+----------------------------------------------------------------+
%| |
%| Name: girem.m |
%| Author: Mathew Liu |
%| Description: Cyclic Prefix / Guard Interval Deletion |
%| |
%| |
%+----------------------------------------------------------------+
function [out]= girem(data,fftlen2,gilen);
out=data(gilen+1:fftlen2,:);
%+----------------------------------------------------------------+
%| |
%| Name: qamdemod.m |
%| Author: James Shen, Mathew Liu |
%| Description: QAM16 demodulator |
%| This file calls the closest function to map noisy signalling |
%| points. |
%+----------------------------------------------------------------+
123
function[out_binary] = qamdemod(in_symbols, carrier_count, M)
% Generate QAM Alphabet
temp_M = -(M-1):2:(M-1);
for i=1:M
for k = 1:M
QAM(i,k) = temp_M(i) + j*temp_M(k);
end
end
QAM_alpha = QAM(:).;
% Find the index corresponding to signal point
for row=1:carrier_count
out_symbol = closest(QAM_alpha, in_symbols(row));
index=0;
for i=1:length(QAM_alpha)
if(out_symbol == QAM_alpha(i))
index = i;
end
end
index = index-1;
% Calculate the binary value from decimal index
for bit_position = M:-1:1
if (index >= 2^(bit_position-1))
out_binary(row,bit_position) = 1;
index = index - 2^(bit_position-1);
else
out_binary(row,bit_position) = 0;
end
end
end
%----------------------------------END------------------------------------------
124 CHAPTER 8. APPENDIX D
Appendix E
Zero Forcing Equalizer
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_mutlisymbol_ZF.m |
%| Author: James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| This model can transmit a specified number of symbols . |
%| |
%+----------------------------------------------------------------+
clear all;
close all;
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
Ns = 10; % Number of Symbols/Carrier
w = ones(FFTLen, 1); % Filter coeff, initial to zero order 10 by default.
SNRdB = 100; % SNR of AWGN in channel in dB
store_input = zeros(Ns, FFTLen*M); % Used to calculate BER at the end.
store_output = zeros(Ns, FFTLen*M);
store_error = zeros(Ns, FFTLen);
%=================== Simulation ===============================
125
126 CHAPTER 8. APPENDIX E
for sym=1:Ns
%----------- Data genration ------------------
input = rand(1,FFTLen*M) > 0.5; %transmits one symbol
store_input(sym,:) = input;
%----------- Transmit Data -------------------
[signal_tx, input_symbols] = transmitter(input, FFTLen, CPLen, M);
%----------- Channel the data ----------------
signal_rx = channel(signal_tx, SNRdB);
%-------------- Receiver ---------------------
[signal_recovered, w, error_sym] = ...
receiver_zf(signal_tx, signal_rx, ...
input_symbols, FFTLen, CPLen, M, w);
store_output(sym,:) = signal_recovered;
store_error(sym,:) = error_sym.;
end
%=============== Simulation End ============================
%==================== BER Calculation =========================
errors_ext = abs(store_input - store_output);
errors = errors_ext(FFTLen+1:length(errors_ext));
num_errors = sum(sum(errors));
BER = num_errors/(FFTLen*M*(Ns-1))
%=================== Plot Equlaizer Convergence ==================
figure(10);
error_samples = reshape(store_error.,1,(FFTLen)*Ns);
semilogy(abs(error_samples.^2)), ...
title(Zero Force Equalizer Error Over 10 Symbols) ...
,ylabel(Error Squared), xlabel(OFDM Symbol);
%===================== END FILE ===================================
%+----------------------------------------------------------------+
%| |
%| Name: receiver_zf.m |
%| Author: James Shen |
%| Description: Takes ina signal and tries to demodulate it. |
%| We assume that we are receiving pilot signals so that the |
%| desired signal is know already. What happens in a real |
%| implementation is that the equalizer coefficients derived |
%| will continue to be used with data and the desired signal |
127
%| will then be the decovered signal. This will accumulate |
%| errors in the coefficients until the next batch of |
%| pilot symbols arrive. Receives one OFDM. |
%| |
%+----------------------------------------------------------------+
function[recovered_signal,w, error1] = ...
receiver_zf(desired_signal, noisy_signal, ...
input_symbols, FFTLen, CPLen, M, w);
%============== Gaurd Interval Removal (GIR) ==================
% Remove cyclic extension from desired signal.
desired_time_serial = desired_signal((CPLen+1):FFTLen+CPLen);
% Remove cyclic extension from noisy signal.
noisy_time_serial = noisy_signal((CPLen+1):FFTLen+CPLen);
%================= Serial To Parallel =================================
output_time_para = reshape(noisy_time_serial,FFTLen,1);
%================= FFT =================================
output_noisy_symbols = fft(output_time_para);
%============== Zero Forcing Equalizer ========================
% LS channel estimator in frequency domain
h_est = output_noisy_symbols ./ input_symbols;
% Zf equalizer
output_symbols = output_noisy_symbols ./ w;
%================= Baseband Demodulation ===========================
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial ====================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%================ Returning output ===============================
recovered_signal = output;
w = h_est;
%e = - _time_serial;
% The code below should be commented out when
128 CHAPTER 8. APPENDIX E
% running for more than one iteration as it just
% shows graphs for one symbol
%================ Error Calculation ===========================
%figure(1);
%plot(abs(input_symbols), bx); hold on;
%plot(abs(output_symbols), ro), ...
% title( );
%plot(abs(output_noisy_symbols), gd), ...
% legend( ) ...
% ,ylabel(Amplitude), xlabel(Symbol); hold off;
error1= input_symbols - output_symbols;
%================ Graphs ===========================
%figure(2);
%semilogy(abs(desired_signal), b); hold on;
%semilogy(abs(output_ext), r); hold off;
%figure(3);
%semilogy(abs(e));
%===================== END FILE ===================================
%+----------------------------------------------------------------+
%| |
%| Name: transmitter.m |
%| Author: Mathew Liu, James Shen |
%| Description: Takes in a bit stream and makes it into an OFDM |
%| signal ready to transmit. Only does it for one symbol. |
%| Transmits based on the FFT. |
%| |
%+----------------------------------------------------------------+
function[trans_signal, input_symbols] = transmitter(input, FFTLen, CPLen, M);
% We assume that with are using 64 length FFT with 64 subcarriers all carrying
% data. So there are no carriers specifically assigned to pilot.
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
129
delta_f = 0.3125e6; % Frequency spacing
%============== Our params based on Hyperlan/2 =================
%+----------------------------------------------------------------+
%| OFDM TRANSMITTER |
%+----------------------------------------------------------------+
%======== Serial To Block (FFTLen, M) ============================
input_para = reshape(input,FFTLen,M);
%======== Baseband Modulation ===========================
input_symbols = qammod(input_para,FFTLen, M);
%================= IFFT =================================
%input_time_para = FFTLen*ifft(input_symbols);
input_time_para = ifft(input_symbols);
% Need to multiply by FFTLen since the IFFT scales it by (1/N)
%================ Parallel to Serial ==========================
input_time_serial = reshape(input_time_para,1,FFTLen); % Time domain signal
%============= Gaurd Interval Insertion (GII) ===================
input_ext = [input_time_serial((FFTLen-CPLen+1):FFTLen),input_time_serial];
%==================== Return output ==========================
trans_signal = input_ext;
input_symbols = input_symbols;
%===================== END FILE ===================================
%+----------------------------------------------------------------+
%| |
%| Name: channel.m |
%| Author: Mathew Liu, James Shen |
%| Description: Filters an input signal based on channel |
%| characteristics. |
%| |
%+----------------------------------------------------------------+
function[output] = channel(input, SNRdB);
130 CHAPTER 8. APPENDIX E
%+----------------------------------------------------------------+
%| CHANNEL MODEL |
%+----------------------------------------------------------------+
%=============== Pass Through Rayleigh Channel ====================
h = [1 0.5 0.1 0.001];
output = filter(h, 1, input) + AWGN_noise(input, SNRdB);
%===================== END FILE ===================================
%+----------------------------------------------------------------+
%| |
%| Name: AWGN_noise.m |
%| Author: James Shen |
%| Description: Takes a signal and a SNR to output a noise |
%| sequence as a row vector. |
%| |
%+----------------------------------------------------------------+
function[noise] = AWGN_noise(input, SNR);
% SNR = 10*log10(var(input)/var(noise))
noise = crand(1, length(input))*( var(input)/(10^(SNR/10)) );
%===================== END FILE ===================================
Appendix F
LMMSE Equalizer
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_multisymbol_LMMSE.m |
%| Author: James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| This model can transmit a specified number of symbols . |
%| |
%+----------------------------------------------------------------+
clear all;
close all;
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
Ns = 10; % Number of Symbols/Carrier
%F = 3; % Order of the filter
w = ones(FFTLen, 1); % Filter coeff, initial to zero order 10 by default.
SNRdB = 0; % SNR of AWGN in channel in dB
store_input = zeros(Ns, FFTLen*M); % Used to calculate BER at the end.
store_output = zeros(Ns, FFTLen*M);
131
132 CHAPTER 8. APPENDIX F
store_error = zeros(Ns, FFTLen);
%=================== Simulation ===============================
for sym=1:Ns
%----------- Data genration ------------------
input = rand(1,FFTLen*M) > 0.5; %transmits one symbol
store_input(sym,:) = input;
%----------- Transmit Data -------------------
[signal_tx, input_symbols] = transmitter(input, FFTLen, CPLen, M);
%----------- Channel the data ----------------
signal_rx = channel(signal_tx, SNRdB);
%-------------- Receiver ---------------------
[signal_recovered, w, error_sym] = ...
receiver_lmmse(signal_tx, signal_rx, ...
input_symbols, FFTLen, CPLen, M, w, SNRdB);
store_output(sym,:) = signal_recovered;
store_error(sym,:) = error_sym.;
end
%=============== Simulation End ============================
%==================== BER Calculation =========================
errors = abs(store_input - store_output);
num_errors = sum(sum(errors));
BER = num_errors/(FFTLen*M*Ns)
%=================== Plot Equlaizer Convergence ==================
figure(10);
error_samples = reshape(store_error.,1,(FFTLen)*Ns);
semilogy(abs(error_samples.^2)), ...
title(Zero Force Equalizer Error Over 10 Symbols) ...
,ylabel(Error Squared), xlabel(OFDM Symbol);
%==================== END FILE ===================================
%+----------------------------------------------------------------+
%| |
%| Name: receiver_lmmse.m |
%| Author: James Shen |
%| Description: Takes ina signal and tries to demodulate it. |
%| We assume that we are receiving pilot signals so that the |
%| desired signal is know already. What happens in a real |
%| implementation is that the equalizer coefficients derived |
133
%| will continue to be used with data and the desired signal |
%| will then be the decovered signal. This will accumulate |
%| errors in the coefficients until the next batch of |
%| pilot symbols arrive. Receives one OFDM. |
%| |
%+----------------------------------------------------------------+
function[recovered_signal,w, error1] = ...
receiver_lmmse(desired_signal, noisy_signal, ...
input_symbols, FFTLen, CPLen, M, w, SNRdB);
%============== Gaurd Interval Removal (GIR) ==================
% Remove cyclic extension from desired signal.
desired_time_serial = desired_signal((CPLen+1):FFTLen+CPLen);
% Remove cyclic extension from noisy signal.
noisy_time_serial = noisy_signal((CPLen+1):FFTLen+CPLen);
%================= Serial To Parallel =================================
output_time_para = reshape(noisy_time_serial,FFTLen,1);
%================= FFT =================================
output_noisy_symbols = fft(output_time_para);
%============== Zero Forcing Equalizer ========================
% LS channel estimator in frequency domain
h_est = output_noisy_symbols ./ input_symbols;
% LMMSE equalizer
SNR = 10^(SNRdB/10);
new_w = conj(h_est) ./ ( abs(h_est).^2 + 1/SNR);
output_symbols = output_noisy_symbols .* w;
%================= Baseband Demodulation ===========================
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial ====================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%================ Returning output ===============================
recovered_signal = output;
w = new_w;
134 CHAPTER 8. APPENDIX F
% The code below should be commented out when
% running for more than one iteration as it just
% shows graphs for one symbol
%================ Error Calculation ===========================
%figure(1);
%plot(abs(input_symbols), bx); hold on;
%plot(abs(output_symbols), ro), ...
% title();
%plot(abs(output_noisy_symbols), gd), ...
% legend() ...
% ,ylabel(Amplitude), xlabel(Symbol); hold off;
error1= input_symbols - output_symbols;
%================ Graphs ===========================
%figure(2);
%semilogy(abs(desired_signal), b); hold on;
%semilogy(abs(output_ext), r); hold off;
%figure(3);
%semilogy(abs(e));
%=============== END FILE ================================
Appendix G
LMS Equalizer
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_multisymbol.m |
%| Author: James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| This model can transmit a specified number of symbols . |
%| |
%+----------------------------------------------------------------+
clear all;
close all;
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
Ns = 10; % Number of Symbols/Carrier
F = 3; % Order of the filter
w = zeros(F,1); % Filter coeff, initial to zero order 10 by default.
store_input = zeros(Ns, FFTLen*M); % Used to calculate BER at the end.
store_output = zeros(Ns, FFTLen*M);
store_error = zeros(Ns, FFTLen+CPLen);
135
136 CHAPTER 8. APPENDIX G
%=================== Simulation ===============================
for sym=1:Ns
%----------- Data genration ------------------
input = rand(1,FFTLen*M) > 0.5; %transmits one symbol
store_input(sym,:) = input;
%----------- Transmit Data -------------------
signal_tx = transmitter(input, FFTLen, CPLen, M);
%----------- Channel the data ----------------
signal_rx = channel(signal_tx);
%-------------- Receiver ---------------------
%[signal_recovered, w, error_sym] = ...
% receiver_rls(signal_tx, signal_rx, FFTLen, CPLen, M, w, F);
[signal_recovered, w, error_sym] = ...
receiver_lms(signal_tx, signal_rx, FFTLen, CPLen, M, w, F);
store_output(sym,:) = signal_recovered;
store_error(sym,:) = error_sym;
end
%=============== Simulation End ============================
%==================== BER Calculation =========================
errors = abs(store_input - store_output);
num_errors = sum(sum(errors));
BER = num_errors/(FFTLen*M*Ns)
%=================== Plot Equlaizer Convergence ==================
figure(10);
error_samples = reshape(store_error.,1,(FFTLen+CPLen)*Ns);
semilogy(abs(error_samples).^2), ...
title(LMS Tracking Over 10 OFDM Symbols), ...
ylabel(Mean Squared Error), xlabel(QAM symbol);
%======================= END FILE ================================
%+----------------------------------------------------------------+
%| |
%| Name: receiver_lms.m |
%| Author: James Shen |
%| Description: Takes ina signal and tries to demodulate it. |
%| We assume that we are receiving pilot signals so that the |
%| desired signal is know already. What happens in a real |
%| implementation is that the weiner coefficients derived will |
137
%| continue to be used with data and the desired signal will |
%| then be the decovered signal. This will accumulate errors in |
%| the coefficients until the next batch of pilot symbols |
%| arrive. Receives one OFDM. |
%| |
%+----------------------------------------------------------------+
function[recovered_signal,w,e] = ...
receiver_lms(desired_signal, noisy_signal, FFTLen, CPLen, M, w, F);
% desired_signal The signal you want to obtain after filtering.
% noisy_signal This signal is somehow correlated to the desired_signal.
% FFTLen This is the size of the FFT to be used. Should be a power of
% 2. Hyoerlan works to 64 points.
% M Bits per symbol used in baseband mod and demod.
% w The filter coefficients
% F Samples taken for correlation and that of the Kalman filter.
% e Error (desired_signal - noisy_signal)
% recovered _signal = the signal that is finally output.
%+----------------------------------------------------------------+
%| OFDM RECEVIER |
%+----------------------------------------------------------------+
%======================= RLS Equalizer ================================
%======================= Initializations ================================
N = length(desired_signal);
F = 3; % Filter order.
udata = noisy_signal; % Noisy signal yet correlated to desired.
d = desired_signal; % Desired signal.
%mu = 0.25; % Typically 0<mu<2
a = 1e-10; % Used to overcome instability.
%====================== Filter Iterations ==============================
for n=F:N
if n < round(0.5*N)
mu=0.4;
else
mu=0.15;
end
u = flipud(udata(n:-1:(n-F+1)).); %col vector now
y(n) = w*u;
e(n) = d(n)-y(n);
w = w + (mu/(a + u*u))*u*conj(e(n));
138 CHAPTER 8. APPENDIX G
end
output_ext = y; % ext means still with cyclic prefix extension.
%============== Gaurd Interval Removal (GIR) ==================
output_time_serial = output_ext((CPLen+1):FFTLen+CPLen);
%======== Serial To Parallel =================================
output_time_para = reshape(output_time_serial,FFTLen,1);
%================= FFT =================================
output_symbols = fft(output_time_para);
%================= Baseband Demodulation ===========================
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial ====================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%================ Returning output ===============================
recovered_signal = output;
w = w;
e = e;
% The code below should be commented out when
% running for more than one iteration as it just
% shows graphs for one symbol
%================ Error Calculation ===========================
% Error is ZERO, so it works!
error1= desired_signal - output_ext;
figure(1);
semilogy(abs(error1));
%================ Graphs ===========================
%figure(2);
%semilogy(abs(desired_signal), b); hold on;
%semilogy(abs(noisy_signal), g);
%semilogy(abs(output_ext), r); hold off;
%figure(3);
%semilogy(abs(e));
%======================= END FILE ================================
Appendix H
RLS Equalizer
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_multisymbol.m |
%| Author: James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| This model can transmit a specified number of symbols . |
%| |
%+----------------------------------------------------------------+
clear all;
close all;
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
Ns = 10; % Number of Symbols/Carrier
F = 3; % Order of the filter
w = zeros(F,1); % Filter coeff, initial to zero order 10 by default.
store_input = zeros(Ns, FFTLen*M); % Used to calculate BER at the end.
store_output = zeros(Ns, FFTLen*M);
store_error = zeros(Ns, FFTLen+CPLen);
%=================== Simulation ===============================
139
140 CHAPTER 8. APPENDIX H
for sym=1:Ns
%----------- Data genration ------------------
input = rand(1,FFTLen*M) > 0.5; %transmits one symbol
store_input(sym,:) = input;
%----------- Transmit Data -------------------
signal_tx = transmitter(input, FFTLen, CPLen, M);
%----------- Channel the data ----------------
signal_rx = channel(signal_tx);
%-------------- Receiver ---------------------
[signal_recovered, w, error_sym] = ...
receiver_rls(signal_tx, signal_rx, FFTLen, CPLen, M, w, F);
% [signal_recovered, w, error_sym] = ...
% receiver_lms(signal_tx, signal_rx, FFTLen, CPLen, M, w, F);
store_output(sym,:) = signal_recovered;
store_error(sym,:) = error_sym;
end
%=============== Simulation End ============================
%==================== BER Calculation =========================
errors = abs(store_input - store_output);
num_errors = sum(sum(errors));
BER = num_errors/(FFTLen*M*Ns)
%=================== Plot Equlaizer Convergence ==================
figure(10);
error_samples = reshape(store_error.,1,(FFTLen+CPLen)*Ns);
semilogy(abs(error_samples).^2), ...
title(LMS Tracking Over 10 OFDM Symbols), ...
ylabel(Mean Squared Error), xlabel(QAM symbol);
%======================= END FILE ================================
%+----------------------------------------------------------------+
%| |
%| Name: receiver_rls.m |
%| Author: James Shen |
%| Description: Takes ina signal and tries to demodulate it. |
%| We assume that we are receiving pilot signals so that the |
%| desired signal is know already. What happens in a real |
%| implementation is that the weiner coefficients derived will |
141
%| continue to be used with data and the desired signal will |
%| then be the decovered signal. This will accumulate errors in |
%| the coefficients until the next batch of pilot symbols |
%| arrive. Receives one OFDM. |
%| |
%+----------------------------------------------------------------+
function[recovered_signal,w,e] = ...
receiver_rls(desired_signal, noisy_signal, FFTLen, CPLen, M, w, F);
% desired_signal The signal you want to obtain after filtering.
% noisy_signal This signal is somehow correlated to the desired_signal.
% FFTLen This is the size of the FFT to be used. Should be a power of
% 2. Hyoerlan works to 64 points.
% M Bits per symbol used in baseband mod and demod.
% w The filter coefficients
% F Samples taken for correlation and that of the Kalman filter.
% e Error (desired_signal - noisy_signal)
% recovered _signal = the signal that is finally output.
%+----------------------------------------------------------------+
%| OFDM RECEVIER |
%+----------------------------------------------------------------+
%======================= RLS Equalizer ================================
%======================= Initializations ================================
N = length(desired_signal);
P = zeros(F,1); % Inverse correlation matrix.
P = eye(F)*100;
udata = noisy_signal; % Noisy signal yet correlated to desired.
d = desired_signal; % Desired signal.
lambda = 0.9; % Weighting factor 0.95<=w<=1
%====================== Filter Iterations ==============================
for n=F:N
u = flipud(udata(n:-1:(n-F+1)).); %col vector now
K = P*u ./ ((1-lambda) + u.*P*u);
y(n) = w.*u;
e(n) = d(n) - y(n);
w = w + K*e(n);
P = (1/(1-lambda))*(eye(F) - K*u.)*P;
end
output_ext = y; % ext means still with cyclic prefix extension.
142 CHAPTER 8. APPENDIX H
%============== Gaurd Interval Removal (GIR) ==================
output_time_serial = output_ext((CPLen+1):FFTLen+CPLen);
%======== Serial To Parallel =================================
output_time_para = reshape(output_time_serial,FFTLen,1);
%================= FFT =================================
output_symbols = fft(output_time_para);
%================= Baseband Demodulation ===========================
output_para = qamdemod(output_symbols,FFTLen, M);
%================ Parallel to Serial ====================
output = reshape(output_para,1,FFTLen*M); % Time domain signal
%================ Returning output ===============================
recovered_signal = output;
w = w;
e = e;
% The code below should be commented out when
% running for more than one iteration as it just
% shows graphs for one symbol
%================ Error Calculation ===========================
error1= desired_signal - output_ext;
figure(1);
semilogy(abs(error1));
%================ Graphs ===========================
figure(2);
semilogy(abs(desired_signal), b); hold on;
semilogy(abs(noisy_signal), g);
semilogy(abs(output_ext), r); hold off;
figure(3);
semilogy(abs(e));
%======================= END FILE ================================
Appendix I
RLS vs LMS
%+----------------------------------------------------------------+
%| |
%| Name: ofdm_rlsvslms.m |
%| Author: James Shen |
%| Description: Basic OFDM model used for simulation purposes. |
%| Compares LMS to RLS equalizer. |
%| |
%+----------------------------------------------------------------+
clear all;
close all;
%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period
fs = 1/T; % System sampling freq = 20MHz
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing
FFTLen = 64; % Length of FFT.
CPLen = 16; % Length of Cyclic Prefix
M = 4; % Bits encoded in a QAM symbol.
Ns = 5; % Number of Symbols/Carrier
F = 3; % Order of the filter
R = zeros(F,1); % Filter coeff, initial to zero order 10 by default.
L = zeros(F,1); % Filter coeff, initial to zero order 10 by default.
store_input = zeros(Ns, FFTLen*M); % Used to calculate BER at the end.
store_output_rls = zeros(Ns, FFTLen*M);
store_output_lms = zeros(Ns, FFTLen*M);
143
144 CHAPTER 8. APPENDIX I
store_error_rls = zeros(Ns, FFTLen+CPLen);
store_error_lms = zeros(Ns, FFTLen+CPLen);
%=================== Simulation ===============================
for sym=1:Ns
%----------- Data genration ------------------
input = rand(1,FFTLen*M) > 0.5; %transmits one symbol
store_input(sym,:) = input;
%----------- Transmit Data -------------------
signal_tx = transmitter(input, FFTLen, CPLen, M);
%----------- Channel the data ----------------
signal_rx = channel(signal_tx);
%-------------- Receiver ---------------------
[signal_recovered, R, error_sym] = ...
receiver_rls(signal_tx, signal_rx, FFTLen, CPLen, M, R, F);
store_output_rls(sym,:) = signal_recovered;
store_error_rls(sym,:) = error_sym;
[signal_recovered, L, error_sym] = ...
receiver_lms(signal_tx, signal_rx, FFTLen, CPLen, M, L, F);
store_output_lms(sym,:) = signal_recovered;
store_error_lms(sym,:) = error_sym;
end
%=============== Simulation End ============================
%==================== BER Calculation =========================
error_rls = abs(store_input - store_output_rls);
error_lms = abs(store_input - store_output_lms);
num_error_rls = sum(sum(error_rls));
num_error_lms = sum(sum(error_lms));
BER_rls = num_error_rls/(FFTLen*M*Ns)
BER_lms = num_error_lms/(FFTLen*M*Ns)
%=================== Plot Equlaizer Convergence ==================
figure(10);
error_samples_rls = reshape(store_error_rls.,1,(FFTLen+CPLen)*Ns);
error_samples_lms = reshape(store_error_lms.,1,(FFTLen+CPLen)*Ns);
semilogy(abs(error_samples_rls).^2,r), ...
title(LMS vs RLS Receivers); hold on;
semilogy(abs(error_samples_lms).^2,b), ...
title(LMS vs RLS Receivers) ...
,legend(RLS algorithm,LMS algorithm) ...
,ylabel(Mean Squared Erorr), xlabel(Number of Iteration); ...
145
hold off;
%======================= END FILE ================================

Vous aimerez peut-être aussi