0% found this document useful (0 votes)
39 views6 pages

OFDM Write Up

This document describes simulating an OFDM system over an AWGN channel in MATLAB. It includes: 1) Defining OFDM system parameters like number of subcarriers, bandwidth, etc based on IEEE 802.11a specifications. 2) Generating random data, performing BPSK modulation, assigning data to subcarriers, taking IFFT to generate time domain signal and adding cyclic prefix. 3) Adding white Gaussian noise to transmitted signal and extracting data after removing cyclic prefix and taking FFT at receiver. 3) Counting bit errors to calculate simulated BER and comparing it to theoretical BER curve of BPSK over AWGN channel.

Uploaded by

20112075
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views6 pages

OFDM Write Up

This document describes simulating an OFDM system over an AWGN channel in MATLAB. It includes: 1) Defining OFDM system parameters like number of subcarriers, bandwidth, etc based on IEEE 802.11a specifications. 2) Generating random data, performing BPSK modulation, assigning data to subcarriers, taking IFFT to generate time domain signal and adding cyclic prefix. 3) Adding white Gaussian noise to transmitted signal and extracting data after removing cyclic prefix and taking FFT at receiver. 3) Counting bit errors to calculate simulated BER and comparing it to theoretical BER curve of BPSK over AWGN channel.

Uploaded by

20112075
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Cellular Networks

T.E. (E&TC) Sem. - II Academic Year-2022-23

PVG's COET & GKPIM, Pune-411009

Accredited by NAAC with Grade “A”


Department of Electronics and Telecommunication Engineering
________________________________________________________________________

BER performance of OFDM System in AWGN channel


Name: Class: T.E. Division: I / II
Roll No: Date of performance: Date of Submission:
Signature of the subject teacher: Marks:
________________________________________________________________________

Objective: To simulate OFDM system in an AWGN environment

Mapped Outcome:

CO2:
Discuss and study OFDM and MIMO concepts

Theory:

OFDM MODEL OFDM is a type of frequency division multiplexing (FDM) in which a single
channel utilizes multiple subcarriers on adjacent frequencies. As the sub-carriers in an OFDM
system are overlapping, so it enhances the spectral efficiency [5]. OFDM system has less
interference because of the presence of orthogonal subcarriers. So OFDM system is widely used
in wireless communication.
Cellular Networks
T.E. (E&TC) Sem. - II Academic Year-2022-23

Figure1 Block Diagram of OFDM Model

The block diagram of OFDM model is shown in Figure 1.In this figure 1, the serial data from the
source is first converted into parallel form and then the modulation (mapping) technique is done.
After mapping technique, the IFFT (Inverse Fast Fourier Transform) operation is performed to
convert frequency domain signal into time domain and then the signal is passed to channel and
then at the receiver end the FFT (Fast Fourier Transform) operation is performed to convert back
the time domain signal into frequency domain and then demodulation is done and the recovered
signal is obtained after passing it to parallel to serial converter
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
Cellular Networks
T.E. (E&TC) Sem. - II Academic Year-2022-23

Data symbol duration, Td 3.2us


Total Symbol duration, Ts 4us

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

The theoretical BER of this system will be.

Simulated and theoretical BER are compared.

------------------------------------------------------------------------------------------------------
I. Printout of all programs must be headed by following information:

Name of student: Roll No:


Class: Academic Year:
Title of Practical Assignment:

II. Comments must be written for all important steps in code.

Printout of Results:

Questions:
Cellular Networks
T.E. (E&TC) Sem. - II Academic Year-2022-23

1. How OFDM signal is generated?


2. What are the advantages and disadvantages of OFDM?
3. Comment on BER performance of OFDM system.
Cellular Networks
T.E. (E&TC) Sem. - II Academic Year-2022-23

Code :
%Simulation of OFDM system in an AWGN environment
clear; clc;
%--------Simulation parameters----------------
nSym=10^4; %Number of OFDM Symbols to transmit
EbN0dB = -20:2:8; % bit to noise ratio
%---------------------------------------------
%--------OFDM Parameters - Given in IEEE Spec--
N=64; %FFT size or total number of subcarriers (used + unused) 64
Nsd = 48; %Number of data subcarriers 48
Nsp = 4 ; %Number of pilot subcarriers 4
ofdmBW = 20 * 10^6 ; % OFDM bandwidth
%----------------------------------------------
%--------Derived Parameters--------------------
deltaF = ofdmBW/N; %=20 MHz/64 = 0.3125 MHz
Tfft = 1/deltaF; % IFFT/FFT period = 3.2us
Tgi = Tfft/4;%Guard interval duration - duration of cyclic prefix
Tsignal = Tgi+Tfft; %duration of BPSK-OFDM symbol
Ncp = N*Tgi/Tfft; %Number of symbols allocated to cyclic prefix
Nst = Nsd + Nsp; %Number of total used subcarriers
nBitsPerSym=Nst; %For BPSK the number of Bits per Symbol is same as num of
subcarriers
%----------------------------------------------
EsN0dB = EbN0dB + 10*log10(Nst/N) + 10*log10(N/(Ncp+N)); % converting to symbol to
noise ratio
errors= zeros(1,length(EsN0dB));
theoreticalBER = zeros(1,length(EsN0dB));
%Monte Carlo Simulation
for i=1:length(EsN0dB);
for j=1:nSym
%-----------------Transmitter--------------------
s=2*round(rand(1,Nst))-1; %Generating Random Data with BPSK modulation
%IFFT block
%Assigning subcarriers from 1 to 26 (mapped to 1-26 of IFFT input)
%and -26 to -1 (mapped to 38 to 63 of IFFT input); Nulls from 27 to 37
%and at 0 position
X_Freq=[zeros(1,1) s(1:Nst/2) zeros(1,11) s(Nst/2+1:end)];
% Pretending the data to be in frequency domain and converting to time domain
x_Time=N/sqrt(Nst)*ifft(X_Freq);
%Adding Cyclic Prefix
ofdm_signal=[x_Time(N-Ncp+1:N) x_Time];
%--------------Channel Modeling ----------------
noise=1/sqrt(2)*(randn(1,length(ofdm_signal))+1i*randn(1,length(ofdm_signal)));
r= sqrt((N+Ncp)/N)*ofdm_signal + 10^(-EsN0dB(i)/20)*noise;
%-----------------Receiver----------------------
%Removing cyclic prefix
r_Parallel=r(Ncp+1:(N+Ncp));
%FFT Block
r_Time=sqrt(Nst)/N*(fft(r_Parallel));
%Extracting the data carriers from the FFT output
R_Freq=r_Time([(2:Nst/2+1) (Nst/2+13:Nst+12)]);
%BPSK demodulation / Constellation Demapper.Force +ve value --> 1, -ve value --> -1
R_Freq(R_Freq>0) = +1;
R_Freq(R_Freq<0) = -1;
Cellular Networks
T.E. (E&TC) Sem. - II Academic Year-2022-23

s_cap=R_Freq;
numErrors = sum(abs(s_cap-s)/2); %Count number of errors
%Accumulate bit errors for all symbols transmitted
errors(i)=errors(i)+numErrors;
end
theoreticalBER(i)=(1/2)*erfc(sqrt(10.^(EbN0dB(i)/10))); %Same as BER for BPSK over
AWGN
end
simulatedBER = errors/(nSym*Nst);
plot(EbN0dB,log10(simulatedBER),'r-o');
hold on;
plot(EbN0dB,log10(theoreticalBER),'k*');
grid on;
title('BER Vs EbNodB for OFDM with BPSK modulation over AWGN');
xlabel('Eb/N0 (dB)');
ylabel('BER');
legend('simulated','theoretical');

Output :

You might also like