Documente Academic
Documente Profesional
Documente Cultură
l=1
|s[l]|
2
(1)
Use
Eb
N0
dB
= 10 log
10
Eb
2
n
, where E
b
= E
s
/, to calculate the noise variance
2
n
.
Demap the symbol sequence into a bit sequence.
Design a block de-interleaver and de-interleave the received bits.
Decode the de-interleaved bits with a Viterbi decoder. Use MATLABs built-in function vitdec.m. Use the
following code for the implementation of the decoder:
% Generate the trellis from the polynomials
tr = poly2trellis([m + 1], [g
(0)
g
(1)
]);
% Set the traceback length. If the code rate is 1/2, a typical value for tracebacklength is about ve times m.
tracebacklength = 5m;
% Call the vitdec function.
decoded = vitdec(coded, tr, tracebacklength,
term
,
hard
i=0
h
i
(n i) (2)
where h
i
is the gain of the ith path. Note that the delay of each path is a symbol wide. We set L = 5
and model h
i
as zero mean complex Gaussian random variable. We need to scale the variance of h
i
such
that
L1
i=0
|h
i
|
2
= 1. Use the following deterministic channel in your simulations:
h = [0.1641 j0.6395, 0.4582 + j0.3840, 0.0916 + j0.3695, 0.2131 + j0.0902, 0.0796 j0.0433]
T
Compute the frequency response of the channel and comment on the results. How is this channel characterized?
Add complex noise.
Calculate the average symbol energy:
E
s
=
1
M
M
l=1
|r[l]|
2
(3)
where M = N + N
cp
is the length of your OFDM signal, and r is the channel output signal. Use SNR
= 10 log
10
E
s
/
2
n
expression to calculate
2
n
.
Remove the CP.
Apply N-point FFT. Use the MATLAB function fft.m.
After applying the FFT, we need to equalize the output in order to remove the effect of different frequency
bin gains on the symbols. Consider the nth symbol y
n
after the FFT operation. You should equalize y
n
such that you obtain
y
n
= H
n
y
n
/|H
n
|
2
, (4)
6
where H
n
is the corresponding channel coefcient of the nth symbol in the frequency domain. Hence,
the receiver must estimate the values of H
n
.
Estimate the frequency domain channel coefcients, H
n
. In order to estimate the channel, use a pilot sequence
containing only 1s, which triggers all frequency bins of the channel impulse response. Repeat such pilot
transmission for 1, 2, 5 and 10 times, and estimate the channel by averaging the received symbols. Is this pilot
the best choice for estimating the channel coefcients? How could you improve the efciency of the system?
After estimating the channel coefcients and equalizing the symbols, map the symbol sequence to bits.
Compute the bit error probability. Note that to observe low BERs, you need to simulate around 1000 blocks
and take the average of these results.
Repeat the routine for different SNR values and for other modulation types (e.g., BPSK, QPSK, 16/64 QAM).
Plot BER versus SNR gures.
Compute the BER for QPSK with different cyclic prex lengths, N
cp
= 1, . . . , 6. What do you observe?
IV. COMBINATION TASKS: COFDM MODEM
The block diagram of the complete COFDM transceiver is given in Fig. 6. Combine channel coding with OFDM
and implement the blocks in Fig. 6.
Channel: You will simulate a block frequency-selective fading channel. Use L = 10 taps for the channel
impulse response. The channel is given by
h =
L1
i=0
a
i
h
i
(n i). (5)
The channel coefcients h
i
are i.i.d., drawn from a complex Gaussian distribution, with zero mean and variance
equal to 1. Compute the coefcients a
i
such that the power delay prole of the channel follows an exponential
decay function, with parameter = 1/5 and the average total power of the channel impulse response equals
1 (Hint: Place the rst tap at t = 0).
We assume a block fading channel model. This implies that the channel remains constant during a burst, and
changes to an independent realization in the following burst. Use blocks of 10 OFDM symbols. During this
burst, use 2 pilot symbols in order to estimate the channel, and transmit data with the remaining 8 symbols.
Repeat BER simulations for all possible symbol modulation types (e.g., BPSK/QPSK/16-/64-QAM).
Plot the channel-coded and uncoded BER results against E
b
/N
0
|
dB
and compare/observe the effect of coding.
How does the interleaver help the transmission in coded OFDM system?
Mapper IFFT CP
Demapper
FFT
CP
Removal
Channel
input
bits
Estimated
bits
Convolutional
Encoder
Interleaver
Viterbi
Decoder
De-
Interleaver
Fig. 6. The block diagram COFDM transceiver.