Matlab Implementation and Performance Analysis of Ofdm Transceiver
Matlab Implementation and Performance Analysis of Ofdm Transceiver
MINI – PROJECT
REPORT
ON
Bachelor of Science In
Haftom Tesfay,
Haftamu Gidey
Hilemariam Tsigabu
CERTIFICATE
This is to certify that this project report entitled matlab implementation and
performance analysis of OFDM transceiver by:
Haftom Tesfay
Hailemariam Tsigabu
Haftamu Gidey
SIGNATURE SIGNATURE
______________ ______________
Examiners:
Name Signature
1._______________________ _____________
2. _______________________ ___________
3._______________________ ____________
We want to first thank our advisor, instructor Kiros (MSc.), for giving us the chance to do
this work, for the encouragement, and for the guidance. Our special thanks goes to our friends
Abrahaley and Gebremicheal for their help to finish this project.
ABSTRACT
ACKNOWLEDGEMENT…………………………………………………….i
ABSTRACT……………………………………………………………………i
TABLE OF CONTENTS……………………………………………………...ii
CHAPTER 1. INTRODUCTION……………………………………………..1
1.2 Introduction………………………………………………………..2
1.3 Motivation………………………………………………………….2
2.2.1 Orthogonality………………………………………………...3
4.2 Discussion……………………………………………………………..12
5.1 Conclusion………………………………………………………………12
REFERENCES……………………………………………………………………..
List of Figures
CHAPTER 1. INTRODUCTION
Chapter one is about the introduction and motivation of the project. It introduces to what OFDM
is and the motivation we have to do the project. Chapter two deals about the basic principle
behind OFDM and previous works on the project. Chapter three is about design approach to the
system. The actual matlab simulation results are shown and discussed in chapter four. And the
final chapter, chapter five, is about the future recommendation and conclusion.
1
1.2 Introduction
OFDM is a unique multicarrier transmission, in which a single data stream is transmitted over
several lower-rate orthogonal subcarriers. In a single carrier system, entire link can fail even if a
single fade or interferer occurs. But, in a multicarrier system, only a small percentage of the
subcarriers will be affected. With the fast development of advanced digital communication, there
is the need for high-speed data transmission with faster rate. The mobile telecommunication
industries are confronting the issue of providing the technology that can support a variety of
services ranging from the lower rate voice communication up to wireless multimedia in which
bit rate is higher.
1.3 Motivation
What motivated us to do this project is the fact that OFDM transmission system offers
possibilities for alleviating many of the problems encountered with single carrier systems. It has
the advantage of spreading out a frequency selective fade over many symbols. This effectively
randomizes burst errors caused by fading or impulse interference so that instead of several
adjacent symbols being completely destroyed; many symbols are only slightly distorted. This
allows successful reconstruction of majority of them even without forward error correction.
Besides, spectral overlapping among sub-carriers is allowed in OFDM, in contrast to
conventional Frequency Division Multiplexing, since orthogonality will ensure the subcarrier
separation at the receiver, providing better spectral efficiency.
2
noise (AWGN) channels was simulated [4].Matlab simulation of OFDM using QAM modulation
was done in 2013[1]. And at the same year also, the performance of OFDM using 16 QAM and
QPSK was simulated and compared and the result showed that 16 QAM is worse in terms of bit
error rate (BER) but, higher in terms of bandwidth efficiency than QPSK [2]. Still in the same
year (2013), matlab Simulink simulator for QPSK based OFDM transceiver was proposed [3].
During modulation, OFDM symbols are typically divided into frames, so that the data will be
modulated frame by frame in order for the received signal be in sync with the receiver. Long
symbol periods diminish the probability of having inter-symbol interference, but could not
eliminate it. To make ISI nearly eliminated, a cyclic extension (or cyclic prefix) is added to each
symbol period. An exact copy of a fraction of the cycle, typically 25% of the cycle, taken from
the end is added to the front.
2.2.1 Orthogonality
The key to OFDM is maintaining orthogonality of the carriers. If the integral of the product of
two signals is zero over a time period, then these two signals are said to be orthogonal to each
other. Two sinusoids with frequencies that are integer multiples of a common frequency can
satisfy this criterion. Therefore, orthogonality is defined by:
𝑇
∫ sin(2𝜋𝑛𝑓𝑡) cos(2𝜋𝑚𝑓𝑡)𝑑𝑡
0
3
Where n and m are integers, f is the fundamental frequency and T is the period over which the
integration is taken.
4
Figure 1: OFDM transceiver block diagram
At the transmitter, the user information bit sequence is first subjected to channel encoding to
reduce the probability of error at the receiver due to the channel effects. Then the bits are
mapped to symbols. Usually, the bits are mapped into the symbols of either 16-QAM or QPSK
(in our project we simulated the system using M-PSK).The symbol sequence is converted to
parallel format and IFFT (inverse Fourier transform) is applied and the sequence is once again
converted to the serial format. Guard time is provided between the OFDM symbols and the guard
time is filled with the cyclic extension of the OFDM symbol. The resulting sequence is converted
to an analog signal using a DAC and passed on to the RF modulation stage. The resulting RF
modulated signal is, then, transmitted to the receiver using the transmit antennas. At the receiver,
first RF demodulation is performed. Then, the signal is digitized using an ADC and timing and
frequency synchronization are performed. The guard time is removed from each OFDM symbol
and the sequence is converted to parallel format and FFT (OFDM demodulation) is applied. The
output is then serialized and symbol demapping is done to get back the coded bit sequence.
Channel decoding is, then, done to get the user bit sequence. In our project, channel
coding/decoding, DAC/ADC, RF transmission block, and the synchronization block are not
simulated.
5
3.2 OFDM transmitter
We used our source data to be a gray scale bit map image file and the matlab program
obtains an h-by-w matrix where h is the height of the image and w is the width (in
pixels). This matrix is rearranged into a serial data stream. Since the input image is an
8-bit gray scale bitmap, its word size is always 8 bits/word. The source data will then
be converted to the symbol size corresponding to the order of PSK chosen by the user.
At the exit of the receiver, the data will be converted back to the original 8 bits/word.
The core of the OFDM transmitter is the modulator, which modulates the input data
stream frame by frame.
The modulator modulates the data using differential multilevel phase shift keying
(MPSK) whose order is selected by a user input. Data is divided into frames based on
the number of symbols per frame per carrier selected by user input. If the total number
of symbols in a data stream to be transmitted is less than the total number of symbols
per frame, the data would not be divided into frames and would be modulated all at
once.
As shown in the Figure below, even if the data stream is not sufficiently long to be
divided into multiple frames, two frame guards with all zero values and in a length of
one symbol period are still added to both ends of the modulated time signal. This is to
assist the receiver to locate the beginning of the substantial portion of the time signal.
For modulated signals with multiple frames, a frame guard is inserted in between any two
adjacent frames as well as both ends of the cascaded time signal. Finally, a pair of headers is
padded to both ends of the guarded series of frames as shown in the figure below.
6
header Frame Modulated data Frame guard Modulated data Frame guard header
guard
To obtain the transmitting time signal matrix, Inverse Fast Fourier Transform (IFFT) of this
matrix is taken. Only the real part of the IFFT result is useful, so the imaginary part is discarded.
There is a built in matlab function to do this.
The channel is assumed to have both power clipping and channel noise. The channel noise is
assumed to additive white Gaussian noise (AWGN) defined by:
It has a mean of zero and a standard deviation equaling the square root of the quotient of the
variance of the signal over the linear Signal-to-Noise Ratio, the dB value of which is set by the
user as well. The channel’s power clipping property is also set by a user in dB.
7
3.4 OFDM receiver
OFDM demodulation is basically a reverse process of OFDM modulation. And like its
modulator, the OFDM demodulator demodulates the received data frame by frame unless the
transmitted data has length less than the designed total number of symbols per frame.
A portion of the received signal in a selective length is processed by the frame detector in order
to determine the start of the signal frame. The selected portion of received signal is sampled to a
shorter discrete signal with a sampling rate defined by the system. A moving sum is taken over
this sampled signal. The index of the minimum of the sampled signal is approximately the start
of the frame guard while one symbol period further from this index is the approximate location
for the start of the useful signal frame. The frame detector will then collect a moving sum of the
input signal from about 10% of one symbol period earlier than the approximate start of the frame
guard to about one third of s symbol period further than the approximate start of the useful signal
frame. The first portion, with a length of one less than a symbol period of this moving sum is
discarded. The first minimum of this moving sum is the detected start of the useful signal frame.
At the receiver side fast Fourier transform is applied to the received signal resulting in the
spectrum of the received signal. Finally, a parallel to serial operation is performed and the
demodulated data stream for this frame is obtained. Note that a series of zeros may have been
padded to the original data before transmission in order to make each carrier have the same
number of data symbols.
8
CHAPTER 4. SIMULATION RESULTS AND DISCUSSION
The figures below show the original image and the matlab simulated OFDM received images for
different selected orders of PSK and signal to noise ratio (SNR).
9
Figure 5: BPSK; SNR=5 dB
10
Figure 7: 16PSK; SNR=5 dB
11
4.2 Discussion
Lower order of modulation has smaller bit error rate and data rate for a given SNR than higher
order modulation. As the selected order of modulation increases, data rate increases. But, it
needs higher SNR values to counteract the higher bit error rate. A balanced trade-off between
BER-tolerance and desire of data rate needs to be found for the type of data to be transmitted
using OFDM.
5.1 Conclusion
We successfully simulated the project resulting in the demonstration of the basic concept and
feasibility of OFDM. But we were faced some challenges in developing this OFDM simulation
• Keeping track of data format and data size throughout all the processes of the whole
simulation.
• Designing an appropriate frame detector for the receiver, and debugging the MATLAB
codes.
• Failure of simulation for certain combination of OFDM parameters entered by from the
user input
12
5.2 Future work
Despite several advantages, the OFDM systems also have some major problems like:
Correct timing between FFT and IFFT is required at the receiver side. OFDM
system is highly sensitive to Doppler shifts which affect the carrier frequency
offset, resulting in inter carrier interference
REFERENCES
[1] Behavior of OFDM system using matlab simulation S.S Ghorpade, S.V.Sankpal
[2] Comparison of BER of OFDM System using QPSK and 16QAM over Multipath Rayleigh
Fading channel using Pilot-Based Channel Estimation by Sanjay Kumar Khadagade, N.K. Mittal
[3] OFDM simulator using matlab by Deepak Sharma, Praveen Srivastava
[4] Study of OFDM performance over AWGN channels by Ender Bolat
[5] A Review on OFDM: Concept, Scope & its Applications by Manushree Bhardwaj[6] Study of
OFDM modulation Eldo Mabiala, Mathias Coinchon Eurecom institute
13