OFDM
OFDM
Matlab Project 2
Matlab Project 2
Nachrichtentechnik (SS2011)
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)
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.
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.
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.
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?