You are on page 1of 7

Oflate, I am getting frequent requests for bit error rate simulations using OFDM (Orthogonal

Frequency Division Multiplexing) modulation. In this post, we will discuss a simple OFDM
transmitter and receiver, find the relation between Eb/No (Bit to Noise ratio) and Es/No (Signal
to Noise ratio) and compute the bit error rate with BPSK.

OFDM modulation
Let us use the OFDM system loosely based on IEEE 802.11a specifications.

Parameter Value
FFT size. nFFT 64
Number of used subcarriers. nDSC 52
FFT Sampling frequency 20MHz
Subcarrier spacing 312.5kHz
Used subcarrier index {-26 to -1, +1 to +26}
Cylcic prefix duration, Tcp 0.8us
Data symbol duration, Td 3.2us
Total Symbol duration, Ts 4us

You may refer to post Understanding an OFDM Transmission for getting a better understanding
of the above mentioned parameters.

Cyclic prefix
In an OFDM transmission, we know that the transmission of cyclic prefix does not carry extra
information in Additive White Gaussian Noise channel. The signal energy is spread over time
whereas the bit energy is spread over the time i.e.
.

Simplifying,

Frequency spread
In OFDM transmission, all the available subcarriers from the DFT is not used for data
transmission. Typically some subcarriers at the edge are left unused to ensure spectrum roll off.
For the example scenario, out of the available bandwidth from -10MHz to +10MHz, only
subcarriers from -8.1250MHz (-26/64*20MHz) to +8.1250MHz (+26/64*20MHz) are used.

This means that the signal energy is spread over a bandwidth of 16.250MHz, whereas noise is
spread over bandwidth of 20MHz (-10MHz to +10MHz), i.e.
Simplifying,

Relation between Eb/No and Es/No in OFDM


Combining the above two aspects, the relation between symbol energy and the bit energy is as
follows:

Expressing in decibels,

Simulation model
The attached Matlab/Octave simulation script performs the following:

(a) Generation of random binary sequence

(b) BPSK modulation i.e bit 0 represented as -1 and bit 1 represented as +1

(c) Assigning to multiple OFDM symbols where data subcarriers from -26 to -1 and +1 to +26
are used, adding cyclic prefix, concatenation of multiple symbols to form a long transmit
sequence

(d) Adding White Gaussian Noise

(e) Grouping the received vector into multiple symbols, removing cyclic prefix, taking the
desired subcarriers

(f) Demodulation and conversion to bits

(g) Counting the number of bit errors

Click here to download: Script for BER computation of BPSK using OFDM
Figure: Bit Error Rate plot for BPSK using OFDM modulation

Can observe that the simulated bit error rate is in good agreement with the theoretical bit error
rate for BPSK modulation i.e.

Understanding an OFDM transmission

by Krishna Sankar on February 3, 2008

Let us try to understand simulation of a typical Orthogonal Frequency Division Multiplexing


(OFDM) transmission defined per IEEE 802.11a specification.

Orthogonal pulses
In a previous post (here ), we have understood that the minimum frequency separation for two
sinusoidals with arbitrary phases to be orthogonal is , where is the symbol period.

In Orthogonal Frequency Division Multiplexing, multiple sinusoidals with frequency separation


is used. The sinusoidals used in OFDM can be defined as (Refer Sec6.4.2 in [DIG-COMM-
BARRY-LEE-MESSERSCHMITT]:

, where
correspond to the frequency of the sinusoidal and

is a rectangular window over .

Using of inverse Fourier Transform

We now have understood that OFDM uses multiple sinusoidals having frequency separation
where each sinusoidal gets modulated by independent information. The information is
multiplied by the corresponding carrier and the sum of such modulated sinusoidals form
the transmit signals. Mathematically, the transmit signal is,

The interpretation of the above equation is as follows:


(a) Each information signal multiplies the sinusoidal having frequency of .
(b) Sum of all such modulated sinusoidals are added and the resultant signal is sent out as .

Update: 29th May 2008

(thanks to the comment by Mr. Mork)

The sampled version of the above equation is,

It is reasonable to understand that above operation corresponds to an inverse Discrete Fourier


Transform (IDFT) operation.

Understanding of an OFDM transmission specified per IEEE 802.11a [80211A]

From the Table 79 in [80211A], the symbol duration .


This implies that the used subcarriers are and so on.
The available bandwidth of 20MHz is split into 64 subcarriers. Out of the available 64
subcarriers having indices , the number of used subcarriers is 52. The used
subcarriers are having indices from are used for transmitting
information sequence to .

To understand in detail the correspondence between the subcarrier index and frequency, one may
refer to a previous post (here).
Once the bits in each symbol are assigned to appropriate IDFT inputs (Ref. Figure 109 in
[80211A]), the IDFT operation is performed to obtained the time domain signal.

For each symbol, some samples from the end are appended to the beginning of the symbol
(referred to as cyclic prefix insertion). We may discuss the pros/cons of cyclic prefix in a future
post.

Simulation Model
A simple Octave script where a BPSK modulated signal is transmitted on the 52 used
subcarriers, may be used for understanding generation of an OFDM signal. The script is loosely
based on 802.11a specification.
Click here to download.

Figure: Spectrum of an OFDM transmission (based on 802.11a specification)

% Script for computing the Bit Error probability using OFDM modulation

clear all
nFFT = 64; % fft size
nDSC = 52; % number of data subcarriers
nBitPerSym = 52; % number of bits per OFDM symbol (same as the number of
subcarriers for BPSK)
nSym = 10^4; % number of symbols

EbN0dB = [0:10]; % bit to noise ratio


EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80); % converting to
symbol to noise ratio

for ii = 1:length(EbN0dB)

% Transmitter
ipBit = rand(1,nBitPerSym*nSym) > 0.5; % random 1's and 0's
ipMod = 2*ipBit-1; % BPSK modulation 0 --> -1, 1 --> +1
ipMod = reshape(ipMod,nBitPerSym,nSym).'; % grouping into multiple
symbolsa

% Assigning modulated symbols to subcarriers from [-26 to -1, +1 to +26]


xF = [zeros(nSym,6) ipMod(:,[1:nBitPerSym/2]) zeros(nSym,1)
ipMod(:,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;

% Taking FFT, the term (nFFT/sqrt(nDSC)) is for normalizing the power of


transmit symbol to 1
xt = (nFFT/sqrt(nDSC))*ifft(fftshift(xF.')).';

% Appending cylic prefix


xt = [xt(:,[49:64]) xt];

% Concatenating multiple symbols to form a long vector


xt = reshape(xt.',1,nSym*80);

% Gaussian noise of unit variance, 0 mean


nt = 1/sqrt(2)*[randn(1,nSym*80) + j*randn(1,nSym*80)];

% Adding noise, the term sqrt(80/64) is to account for the wasted energy
due to cyclic prefix
yt = sqrt(80/64)*xt + 10^(-EsN0dB(ii)/20)*nt;

% Receiver
yt = reshape(yt.',80,nSym).'; % formatting the received vector into
symbols
yt = yt(:,[17:80]); % removing cyclic prefix

% converting to frequency domain


yF = (sqrt(nDSC)/nFFT)*fftshift(fft(yt.')).';
yMod = yF(:,[6+[1:nBitPerSym/2] 7+[nBitPerSym/2+1:nBitPerSym] ]);

% BPSK demodulation
% +ve value --> 1, -ve value --> -1
ipModHat = 2*floor(real(yMod/2)) + 1;
ipModHat(find(ipModHat>1)) = +1;
ipModHat(find(ipModHat<-1)) = -1;

% converting modulated values into bits


ipBitHat = (ipModHat+1)/2;
ipBitHat = reshape(ipBitHat.',nBitPerSym*nSym,1).';

% counting the errors


nErr(ii) = size(find(ipBitHat - ipBit),2);

end

simBer = nErr/(nSym*nBitPerSym);
theoryBer = (1/2)*erfc(sqrt(10.^(EbN0dB/10)));

close all; figure


semilogy(EbN0dB,theoryBer,'bs-','LineWidth',2);
hold on
semilogy(EbN0dB,simBer,'mx-','LineWidth',2);
axis([0 10 10^-5 1])
grid on
legend('theory', 'simulation');
xlabel('Eb/No, dB')
ylabel('Bit Error Rate')
title('Bit error probability curve for BPSK using OFDM')

You might also like