Vous êtes sur la page 1sur 5

Nachrichtentechnik (SS2011)

Matlab Project 2

Matlab Project 2: OFDM


1 Introduction
In this exercise we take a look at Orthogonal Frequency Division Multiplexing (OFDM).
This document is structured as follows:
First we give a short introduction to OFDM, its applications, advantages and drawbacks. Section 2 gives an overview of a mathematical description of an OFDM transmission system. Then the details of your MATLAB implementation tasks are described
in Section 3, and Section 4 contains questions that are to be answered by you.
OFDM is known as an ecient technique for high data rate transmission systems.
The main advantages of OFDM are:
For longer delay spreads, OFDM is an ecient scheme to cope with multipath
propagation.
In relatively slow timevarying channels, it is possible to enhance the throughput
by adapting the data rate per subcarrier according to the signalto noise ratio
of that particular subcarrier. The drawback of this procedure is the need of a
reverse channel that yields the information about the signalto noise ratio of the
respective subcarrier.
OFDM is quite robust against narrowband interference, because this interference
aects only a few subcarriers. This makes it a suitable transmission scheme for
powerline communications, which suer from many narrowband interferers.
OFDM allows singlefrequency networking, which is especially attractive for
broadcasting applications like DVBT or DAB.
There are also some drawbacks compared to singlecarrier modulation:
OFDM is more sensitive to frequency oset and phase noise.
OFDM has a relatively large peaktoaverage power ratio, which tends to reduce
the power eciency of the RF amplier.
OFDM displays large outofband power, which requires very good lters to
increase the stopband attenuation.
In several practical applications the multipath spread experienced in the real
system is longer than the specied maximum multipath spread the OFDM system
is designed to cope with, which leads to a severe performance degradation of
conventional detectors.
OFDM also loses the subchannel orthogonality if the channel impulse response
changes during one OFDM block.

Information Technology University of Ulm

Version 1, June 16, 2011

Matlab Project 2

Nachrichtentechnik (SS2011)

2 Overview and system description


The following gure shows an uncoded OFDM transmission over a linear distorting
timeinvariant channel hK (t) in the equivalent lowpass domain:

  















  



 







 

 







  









 

 

 


  
 

 




 

 

A digital data source emits symbols x[i], taken from the symbol alphabet Ax . A serial
toparallel converter puts together blocks of NF symbols x[i] to obtain the column
vectors
x[k] = (x1 [k], x2 [k], . . . , xNF [k])T
where k is the block index and NF denotes the number of OFDM subcarriers. The
elements xi [k] are taken from the symbol alphabet Ax . Source and channel coding
may be included in x[k], but are not considered in this exercise. Each data block x[k]
is modulated onto NF subcarriers by a normalized inverse discrete Fourier transform
(IDFT), which can be described by a multiplication with an inverse Fourier matrix F 1
as follows:
1
j 2 (m1)(n1)
1
=
e NF
(1)
s[k] = F 1 x[k], with Fmn
NF
The last NG elements of the resulting vector s[k] are copied and put as cyclic prex
to form the OFDM block s[k], a column vector with NF + NG elements, which can be
expressed as
s[k] = (sNF NG +1 [k], . . . , sNF [k], s1 [k], s2 [k], . . . , sNF [k])T

(2)

After paralleltoserial conversion the diracsampled transmit signal is ltered by the


1
. The retransmit lter hTf (t) that is bandlimited to the cuto frequency fg = 2t
sulting signal s(t) is passed through the frequency selective and time invariant channel
hK (t). After adding complex white gaussian noise with twosided power spectral density
N0
2 , the signal g(t) is passed through the receive lter hRf (t) that is again bandlimited

Version 1, June 16, 2011

Information Technology University of Ulm

Nachrichtentechnik (SS2011)

Matlab Project 2

1
to the cuto frequency fg = 2t
. By sampling at it and serialtoparallel converting
we obtain the vector sequence y[k].

In this exercise we will describe the concatenation of the blocks hTf (t), hK (t), and
hRf (t) with the equivalent discretetime channel representation


1
.
(3)
[i] = hTf (t) hK (t) hRf (t)
4
t=it
The receiver removes the rst NG elements from the vector y[k], yielding y[k], and performs the demodulation by the normalized discrete Fourier transform (DFT), described
by
1
j 2 (m1)(n1)
e NF
(4)
x
0 [k] = F y[k], with Fmn =
NF
The zeroforcing (ZF) detection can be described as an elementwise division of x
0 [k]
by the transfer function of the discretetime channel, which is computed by a DFT of
the zeropadded discretetime channel impulse response

T
:= DFT [0], . . . , [L1], 01(NF L)

T

=
NF F [0], . . . , [L1], 01(NF L)

(5)

where L denotes the length of [i]. After a paralleltoserial conversion we obtain the
estimated symbols x
[i].

3 MATLAB tasks
Write a script OFDMsim.m that simulates an OFDM transmission. Consider the steps
described in the following subsections 3.1 and 3.2.

3.1 Basic transmission chain


Generate a (N F N Block) matrix q mat of random bits, using the function
RANDBITS from exercise 1. This matrix describes our packet of N Block OFDM
blocks in the frequency domain. Use the parameters N F = 16 and N Block = 3.
(Remark: Such kinds of packets are often called frames in practice.)

RANDBITS

Map the matrix q mat of random bits to the matrix x mat of transmit symbols
from the BPSK symbol alphabet Ax = {1, +1} using the function BIT2SYM from
exercise 1.

BIT2SYM

Write the functions FFTNORM and IFFTNORM which perform columnwise a normalized (inverse) fourier transform according to Equations (4) and (1), using the
functions FFT and IFFT.

Information Technology University of Ulm

Version 1, June 16, 2011

FFT, IFFT

Matlab Project 2

Nachrichtentechnik (SS2011)

Perform the normalized IFFT (function IFFTNORM) over the matrix x mat, resulting in the matrix s mat.
Add a cyclic prex of N G elements to each column of s mat according to Equation
(2), resulting in the matrix s mat guard. Choose N G = 3.
Execute a paralleltoserial conversion of the matrix s mat guard and perform
a convolution of the resulting vector with the discretetime channel impulse response [i]. The vector after this convolution shall be named ch out.
In this part of the exercise, use the threepath, fourtap channel with [i] =
0.7454 [i] + 0.5963 [i 2] + 0.2981 [i 3].
Generate a vector n vec of the same size as ch out with samples from complex
valued Gaussian noise of variance (sigma n)2 with sigma n as parameter. Use
the function RANDN. In this part of the exercise, choose sigma n = 0.5.
Add ch out and n vec, resulting in g vec.

RANDN

RESHAPE the vector g vec to a ((N F + N G) N Block) matrix g mat, hereby extracting the (N F+N G)N Block elements of g mat corresponding to s mat guard.

RESHAPE

Remove the rst N G rows from g mat and perform the normalized FFT (function
FFTNORM) over the remaining matrix, resulting in the matrix x schl.

FFTNORM

Compute the frequency response alpha vec of the discretetime channel impulse
response [i] according to Equation (5). In order to avoid numerical problems
in the ZF detection, dene a parameter epsilon = 0.01 and set the elements of
alpha vec with an absolute value smaller than epsilon to 1.
Perform the ZF detection using the modied vector alpha vec, execute a sign
decision, yielding the matrix x hut of decided symbols. Compute the number of
bit errors in this packet.

3.2 BER simulations


In Section 3.1 we have transmitted one packet of N Block = 3 OFDM blocks. In order
Eb
to get BER graphs, we will now transmit N Packet = 1000 packets for each of the N
0
values from 0 dB to 23 dB in steps of 2,5 dB (to be called EbN0dB in the MATLAB le).
Compute sigma n from the parameters channel energy and EbN0dB. Do not
forget to consider the increase in transmit energy by the N G symbols of the cyclic
prex.
Eb
loop and an inner packet loop. This inner packet loop sums
Create an outer N
0
up the packets bit errors.

Carry out simulations for


case 1: N G = 3

Version 1, June 16, 2011

Information Technology University of Ulm

IFFTNORM

Nachrichtentechnik (SS2011)

Matlab Project 2

case 2: N G = 0
and the following normalized channels:
ideal AWGN channel [i] = [i]
twopath channel [i] = 0.7071 [i] + 0.7071 [i 1]
threepath, fourtap channel [i] = 0.7454[i]+0.5963[i2]+0.2981[i3]
Create three BER graphs (one for each channel model), each displaying the detection results for N G = 3, N G = 0, and the analytical curve for the AWGN channel
(compare exercise 1).

4 Questions
1. Compare the transfer functions of the three simulated channels.
2. Classify the simulated channels by the resulting BERs. Which channel shows the
worst performance?
3. What is the BER for the twopath channel [i] = 0.7071 [i] + 0.7071 [i 1]
Eb
? Give reasons.
in case of N
0
4. Explain the degradation of the BER for NG = 3 in the case of the threepath,
fourtap channel [i] = 0.7454[i]+0.5963[i2]+0.2981[i3] in comparison
with the AWGN BER.
5. What is the reason for the dierence of the BERs at the threepath, fourtap
channel [i] = 0.7454 [i] + 0.5963 [i 2] + 0.2981 [i 3] for NG = 0 and
NG = 3? Is the used ZF detector the appropriate detector in case of NG = 0?

Information Technology University of Ulm

Version 1, June 16, 2011

Vous aimerez peut-être aussi