Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: OFDM Project
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
OFDM Project

Abstract
This report discusses the design and implementation of an OFDM modem for a simplex communication
between two PCs over a frequency selective channel. First a brief introduction is
provided by explaining the backrground and the specification of the project. Then the report
deals with the system model. Each block of the OFDM system is described (IFFT/FFT, cyclic
prefix, modulation/demodulation, channel estimation, bit loading). In the following section, the
system architecture is analysed. The transmission protocol, as well as the system parameters
are explained in details. Then, the DSP implementation is discussed. Finally, the results are
provided in the last chapter.
1
Aknowledgment
We would like to thank our project assistant, Xi Zhang, for his help during the course.
Chapter 1
Introduction
1.1 Background
In a basic communication system, the data are modulated onto a single carrier frequency. The
available bandwith is then totally occupied by each symbol. This kind of system can lead to
inter-symbol-interference (ISI) in case of frequency selective channel.The basic idea of OFDM is
to divide the available spectrum into several orthogonal subchannels so that each narrowband
subchannel experiences almost flat fading. With OFDM, it is possible to have overlapping
subchannels in the frequency domain, thus increasing the transmission rate. OFDM systems
have gained an increased interest during the last years. It is used in the European digital
broadcast radio system, as well as in wired environment such as asymmetric digital subscriberlines
(ADSL). This technique is used in digital subscriber lines (xDSL) to provides high bitrate
over a twisted-pair of wires. The project focuses on the latter application.
1.2 Specification
The goal of this project is to design and implement a point-to-point digital communication
between two PCs over a channel with similar characteristic as a telephone line. A feedback
channel is used to estimate the channel and to adapt the bit rate of each subcarrier. We provide
the possibility to transmit source files (pictures) and to display those on the screen at the
receiver. An graphical interface is implemented in order to be able to control the system.
1.3 Equipment
To complete our task the following equipment is available:
• Two laptops (Dell and IBM)
• Two DSP-cards (Texas Instruments DSK6713)
• Adjustable filter (ZePo95)
• Telephone line emulation hardware
• Noise generator
7
Chapter 1 Black TEAM
• Matlab, Code Composer Studio 1.12, Microsoft Visual C++, Frontpage, Illustrator 10.
1.4 Project overview
Our point-to-point communication system presents two sets of PCs, each equipped by a DSP
card. Even if in practice, a full-duplex system is used, we consider a simplex communication :
one of the PCs is the transmitter whereas the other is the receiver. The two PCs communicate
through a telephone line (modeled by emulation hardware in the project). Pictures shall be
transmitted and displayed on the receiver’s screen. The receiver estimates the channel on each
carrier and feeds back information to the transmitter through the feedback link. In practice the
feedback link has the same characteristicsas the direct link. In this project, we will use a simple
cable as feedback link (as it is not the interesting part of the research).
Transmitter
PC
Receiver
DSP DSP PC
Telephone
line emulation
simple cable
Figure 1.1: Point to point communication
Page 8
Chapter 2
System Model
2.1 Overview
In this section, an overview of the following system is described.
feedback
Channel
estimation
Channel
compensation
match
CP 4 filter
FFT
remove
complex
mirror
Bit loading
TX Convolution
encoder Interleaver Modulation CP 4
IFFT
with
complex
mirror
pulse
shaping
D/A
Channel
A/D
RX Decoder Deinterleaver Demodulation
Figure 2.1: OFDM system
2.1.1 Transmitter
• Convolutional encoder. In order to decrease the error rate of the system, a simple convolution
encoder of rate 1/2 is used as channel coding.
• Interleaver. The interleaver rearranges input data such that consecutive data are split
among different blocks. This is done to avoid bursts of errors. An interleaver is presented
as a matrix. The stream of bits fills the matrix row by row. Then, the bits leave the
matrix column by column. The depth of interleaver can be adjusted.
• Modulation. A modulator transforms a set of bits into a complex number corresponding
to a signal constellation. The modulation order depends on the subcarrier. A subcarrier
9
Chapter 2 Black TEAM
input bits
...
output bits
...
Figure 2.2: Bits flow through an interleaver
with high SNR will be assigned more bits than a subchannel with low SNR. Modulations
implemented here are QPSK, 16QAM and 64QAM.
• Symmetrical IFFT. Data are transformed into time-domain using IFFT. The total number
of subcarriers translates into the number of points of the IFFT/FFT. A mirror operation
is performed before IFFT in order to get real symbols as output.
• Cyclic Prefix (CP). To preserve the orthogonality property over the duration of the useful
part of signal, a cyclic prefix is then added. The cyclic prefix is a copy of the last elements
of the frame.
• D/A. Convert digital symbols to analog signals. This operation is done using the AIC
codec inside the DSP.
2.1.2 Channel
The channel must have the same characteristics as the pair of twisted wires found in the telephone
network. In order to achieve this, we use a telephone line emulation hardware. Also, we have
the possibility to use the adjustable filter ZePo and the noise generator. This can be very useful
to test the system performance.
2.1.3 Receiver
• A/D. Convert analog signals to digital symbols for processing.
• Synchronization. Due to the clock difference between transmitter and receiver, a synchronization
algorithm is needed to find the first sample in the OFDM frame.
• Remove cyclic prefix. This block simply removes the cyclic prefix added in the transmitter.
• Symmetrical FFT. Data are transformed back to frequency-domain using FFT. Then the
complex conjugate mirror added in the transmitter is removed.
• Channel estimation. The estimation is achieved by pilot frames.
• Channel compensation. The channel estimation is used to compensate for channel distortion.
• Bit loading. The receiver computes the bit allocation and send it to the transmitter.
Page 10
Chapter 2 Black TEAM
• Demodulation. Symbols are transformed back to bits. The inverse of the estimated channel
response is used to compensate the channel gain.
• Deinterleaver (Interleaving inverse operation). The stream of bits fills the matrix column
by column. Then, the bits leave the matrix row by row.
• Convolution decoder. The decoder performs the Viterbi decoding algorithm to generate
transmitted bits from the coded bits.
2.2 OFDM System
This section introduces OFDM and key system aspects are considered.
2.2.1 Evolution of OFDM
Frequency Division Multiplexing (FDM)
Frequency Division Multiplexing (FDM) has been used for a long time to carry more than one
signal over a telephone line. FDM divides the channel bandwidth into subchannels and transmits
multiple relatively low rate signals by carrying each signal on a separate carrier frequency. To
ensure that the signal of one subchannel did not overlap with the signal from an adjacent one,
some guard-band was left between the different subchannels. Obviously, this guard-band led to
inefficiencies.
Orthogonal Frequency Division Multiplexing (OFDM)
In order to solve the bandwidth efficiency problem, orthogonal frequency division multiplexing
was proposed, where the different carriers are orthogonal to each other. With OFDM, it is possible
to have overlapping subchannels in the frequency domain, thus increasing the transmission
rate. The basis functions are represented in Figure 2.3. This carrier spacing provides optimal
spectraCl heaffiptceire 3n c- yT.heory
10
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Figure 3.1: Orthogonal basis functions in an OFDM system
3.3 Cyclic Prefix
In order to maintain orthogonality through the transmission over the channel a cyclic prefix is
added. This is done by taking the M last symbols of the frame and put a copy of them in the
beginning of the frame. This will also make the output from the IDFT periodic. The signal
will now appear as shown below.
x(k N) ! 0 # " ! M k
! s(k) (3.2)
!
1
2 ( ) ( )
N
N
j n x k X n e ! 0 1 k N
Figure 2.3: Basis functions in OFDM system
Today, OFDM has grown to be the most popular communication system in high-speed
communications.
Page 11
Chapter 2 Black TEAM
2.2.2 Introduction to OFDM
Channel Channel
Bit loading estimation
feedback
demodulation Channel
compensation FFT CP
bits
Y(n) y(k)
modulation IFFT CP
bits X(n) x(k)
s(k)
r(k)
Figure 2.4: OFDM system
The OFDM system studied in this paper has the block structure as shown in Figure 2.4.
The system maps the input bits into complex-valued symbols X(n) in the modulation block,
which determines the constellation scheme of each subcarrier. The number of bits assigned to
each subcarrier is based on the signal to noise ratio of each subcarrier on the frequency range.
The adaptive bit loading algorithm will be detailed below. The IFFT block modulates X(n)
onto N orthogonal subcarriers. A cyclic prefix is then added to the multiplexed output of IFFT.
The obtained signal is then converted to a time continuous analog signal before it is transmitted
through the channel. At the receiver side, an inverse operation is carried out and the information
data is detected.
2.2.3 FFT and IFFT
The key components of an OFDM system are the inverse FFT at the transmitter and FFT at the
receiver. These operations performing linear mappings between N complex data symbols and
N complex OFDM symbols, result in robustness against fading multipath channel. The reason
is to transform the high data rate stream into N low data rate streams, each experiencing a flat
fading during the transmission. Suppose the data set to be transmitted is
X(1),X(2), ...,X(N)
where N is the total number of sub-carriers. The discrete-time representation of the signal after
IFFT is:
x(n) =
1
p
N
NX−1
k=0
X(k).ej2k n
N , n = 0..N − 1 (2.1)
At the receiver side, the data is recovered by performing FFT on the received signal,
Y (k) =
1
p
N
NX−1
n=0
x(n).e−j2k n
N , k = 0..N − 1 (2.2)
Page 12
Chapter 2 Black TEAM
An N-point FFT only requires Nlog(N) multiplications, which is much more computationally
efficient than an equivalent system with equalizer in time domain.
2.2.4 Cyclic Prefix
In an OFDM system, the channel has a finite impulse response. We note tmax the maximum
delay of all reflected paths of the OFDM transmitted signal, see Figure 2.5.
channel impulse response
t
0 tmax
Figure 2.5: Channel impulse response
Cyclic prefix is a crucial feature of OFDM to combat the effect of multipath. Inter symbol
interference (ISI) and inter channel interference (ICI) are avoided by introducing a guard interval
at the front, which, specifically, is chosen to be a replica of the back of OFDM time domain
waveform.
Figure 2.6 illustrates the idea.
CP FRAME
t
0 tc > tmax
Figure 2.6: Adding a cyclic prefix to a frame
From above expressions the subcarrier waveforms are now given by
s(k) =
(
x(k + N) −M  k < 0
x(n) = p1
N
PN−1
k=0 X(k).ej2k n
N 0  k < N − 1 (2.3)
The idea behind this is to convert the linear convolution (between signal and channel response)
to a circular convolution. In this way, the FFT of circulary convolved signals is equivalent
to a multiplication in the frequency domain. However, in order to preserve the orthogonality
property, tmax should not exceed the duration of the time guard interval. As shown below, once
the above condition is satisfied, there is no ISI since the previous symbol will only have effect
Page 13
Chapter 2 Black TEAM
IFFT CP Channel CP FFT
X(n) x(k) s(k) r(k) y(k) Y(n)
over samples within [0, tmax]. And it is clear that orthogonality is maintained so that there is
no ICI.
r(k) = s(k)
h(k) + e(k) (2.4)
Y (n) = DFT(y(k)) = DFT (IDFT(X(n))
h(k) + e(k)) (2.5)
= X(n).DFT(h(k)) + DFT(e(k)) (2.6)
= X(n).H(n) + E(n) , 0  k  N − 1 (2.7)
where
denotes circular convolution and E(n) = DFT(e(k)). Another advantage with the
cyclic prefix is that it serves as a guard between consecutive OFDM frames. This is similar
to adding guard bits, which means that the problem with inter frame interference also will
disappear.
2.2.5 Modulation and demodulation
Given the adaptive bit loading algorithm, the modulator has a number of bits and an energy
value as input for each sub-carriers. The output for one sub-carrier is a constellation symbol
with a desired energy, corresponding to the number of bits on the input. The modulator is taken
to get either 2bits, 4bits, 6bits or 8bits available, which means that, respectively, only QPSK,
16QAM, 64QAM and 256QAM are available for modulation on each sub-carrier.
01 0 1 1 0 0 1 0 1 1 1 0 0 1 0 1 0
Input buffer (bits)
BPSK QPSK BPSK 16-QAM QPSK QPSK
BPSK
s1 s2 s3 s4 s5 s6 s7
bits allocation is provided by the
receiver after bit loading algorithm
Figure 2.7: Bits allocation in modulation
Demodulation is performed using Maximum Likelihood (ML) approach, given knowledge of
the flat fading channel gain for each subcarrier.
Furthermore, in order to reduce bit errors, gray-coded constellations are also employed for
each modulation order available. This gray coding ensures that if a symbol error occurs, i.e.
the decoder selects an adjacent symbol to what the transmitter intended to be decoded, there
is only a single bit error resulting.
Page 14
Chapter 2 Black TEAM
4 - QAM 16- QAM
Figure 2.8: 4-QAM (left) and 16-QAM (right)
Large performance improvement can be obtained in this adaptive modulation application
where the modulator basis functions are designed as a function of measured channel characteristics.
On good subchannel (high SNR), modulation methods, such as 64 QAM, are used to
increase the bit rate. And a lower modulation, such as QPSK, is performed on bad subchannel
to keep the error rate in a low level.
2.2.6 Channel and Noise Estimation
The frequency response of channel has to be estimated to invert the effect of non-selective
fading on each subcarrier. Further, given full knowledge of channel and noise variance, the
transmitter and receiver can determine the channel gain at each tone of OFDM symbols, so
that the adaptive bit loading algorithm can proceed to calculate the optimal bit and energy
allocation. This algorithm will be expounded in next section.
Since the channel transfer function is not changing very rapidly, a block type channel estimation
has been developed, in which the pilot tones are inserted into all of the subcarriers of
OFDM symbols as shown in figure 2.9. Noise variance is estimated by the empty-pilot, i.e. the
symbols are all zero-valued.
If the channel is constant during the block, there will be little channel estimation error since
the pilots are sent at all carriers.
The pilots are inserted to all subcarriers with a specific period, and extracted after DFT
block. The estimated channel ˆH (n) is then obtained in channel estimation block. The received
signal can be presented as
Y (n) = X(n)H(n) + E(n) n = 1, 2, ...,N (2.8)
where E(n) is zero mean noise independent both in time and in frequency due to the linear
properties of FFT. The method we used to implement the channel estimation is based on the
forgetting factor technique :
ˆH
(n) = (L, n)
(L, n) n = 1..127 (2.9)
where
(n,L) = Xp(n,L)Yp(n,L) + (1 − ) (n,L − 1) (2.10)
(n,L) = Xp(n,L)Xp(n,L) + (1 − ) (n,L − 1) (2.11)
Page 15
Chapter 2 Black TEAM
frequency
time
block of 20
data frames
pilot on
every subchannel
127
subchannels
Figure 2.9: Block type channel estimation
and where Xp(n, l) is the transmitted pilot, Yp(n, l) is the received pilot,  is the forgetting factor,
L is the index of the current pilot frame and n is the subchannel index. In other words, X(n, l)
is the transmitted symbol of the lth pilot on the nth subchannel. The use of the forgetting
factor will be explained in the Section 3.6.
The channel response at the subcarrier estimated from the pilots is then used to find the
estimated transmitted signal ˆX (n).
ˆX
(n) = Y (n)
ˆH
(n)
(2.12)
The power spectrum of the white Gaussian noise added in the channel is estimated using the
empty-pilot.
Ee(n) = Yo(n) − ˆH(n).Xo(n) (2.13)
Here Xo(n) = 0, so the variance of N samples of noise is then calculated as
2N=
1
N
NX−1
n=0
Yo(n)2 (2.14)
2.2.7 Adaptive Bit Loading
The adaptive bit loading algorithm is an efficient technique to achieve power and rate optimization
based on knowledge of the subchannel gains. A subchannel with higher SNR is then
assigned more bits and energy than a subchannel with lower SNR.
There are two types of loading algorithms: those that try to maximize data rate and those
that try to maximize performance at a given fixed data rate. The adaptive technique employed
in this system is Rate-Adaptive (RA) loading criterion: a rate-adaptive loading procedure maximizes
(or approximately maximizes) the number of bits per symbol subject to a fixed energy
Page 16
Chapter 2 Black TEAM
f
Channel gain
f
bit loading
2
4
6
Figure 2.10: Adaptive bit loading
constraint:
max
En
b =
XN
n=1
log2

1 + En.gn