You are on page 1of 32

Department Electronics & Communication

Engineering
Central University of Karnataka Kalaburgi

Declaration

I, K. Prasanna kumar, hereby declare that this thesis entitled Modeling and
Simulation of OFDM based Communication System submitted to the Depart-
ment of Electronics and Communication Engineering, School of Engineering, Central
University of Karnataka, Kalaburgi, for partial fulfillment of the degree of Bachelors
of Technology in Electronics and Communication Engineering has been carried out
by me under the guidance and supervision of Mr. Vidyadhar S Melkeri, is a
bonafide research work which is also free from plagiarism. I also declare that it has
not been submitted previously in part or in full to this University for the award of
any degree. I hereby agree that my thesis can be deposited in Central Library of
Central University of Karnataka.

Mr. K.Prasanna kumar


Reg No:2013IEN17

Date:

1
Department Electronics & Communication
Engineering
Central University of Karnataka Kalaburgi

Certificate

This is to certify that the thesis entitled, Modeling and Simulation of OFDM
based Communication System being submitted by Mr. K. PRASANNA
KUMAR for the award of the degree of Bachelor of Technology in Electronics and
Communication Engineering is a record of bonafide project work carried out by him in
the Department of Electronics and Communication Engineering of Central University
of Karnataka, Kalaburagi.
Mr. K. Prasanna Kumar has worked under my guidance and supervision and has
fulfilled the requirements for the submission of this thesis, which to my knowledge has
reached the requisite standard. The results obtained here in have not been submitted
to any other University or Institute for the award of any degree.

Mr. Vidyadhar S Melkeri


Project Supervisor
Assistant Professor, Department of ECE

Dr. V. Sandeep
Assistant Professor & Coordinator

Date:

2
Acknowledgement

The satisfaction and euphoria that accompany the successful completion of any
task would be incomplete without mentioning the people who made it possible, whose
constant guidance and encouragement crowned my efforts with success.

I deeply express my sincere gratitude to Dr. V. Sandeep, Coordinator, De-


partment of Electronics and Communication Engineering, Central University of Kar-
nataka for encouraging me to work on the current research areas and helping me
get exposed to current research by sending me to IIT Hyderabad. I thank Dr.
Moammed Zafar Ali Khan for helping me to get aware of basic concepts be-
hind the OFDM Technology.

I am highly grateful to my guide, Mr. Vidyadhar S Melkeri, Assistant Profes-


sor, Department of Electronics and Communication, for his support, guidance, advice
and encouragement and also for his invaluable support, timely suggestions and re-
views.

I take this opportunity to convey my gratitude to all those who have been kind
enough to offer their advice and provide assistance when needed which has led to the
successful completion of this project.

Last but not least, my heart full gratitude to my parents and my friends for their
constant support, motivation and encouragement throughout this project.

K. Prasanna kumar

3
Abstract

This project explains about the modeling of OFDM (Orthogonal Frequency Di-
vision Multiplexing) based communication system, performance analysis using Bit
Error Rate (BER) at modulation and error control coding stages respectively using
MATLAB. Theoretical concepts of digital communication & their simulation, devel-
opment of mathematical model of OFDM technique and Importance of OFDM in the
development of wireless communication technologies are clearly explained.

The model which is developed can transfer the real world Audio, Image and Text
efficiently with less BER through the AWGN channel simulation model. The model
consists of all the major blocks of digital communication with OFDM technique. All
the blocks are explained in this report.

This project is the study analysis of basic OFDM based communication system,
which gives the fundamental knowledge in OFDM technology and helps to develop
for further research techniques in OFDM.
Contents

Acknowledgement 3

1 Introduction 4
1.1 Parallel data transmission . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Inter Symbol Interference (ISI) . . . . . . . . . . . . . . . . . 5
1.2.2 Inter Channel Interference (ICI) . . . . . . . . . . . . . . . . . 5
1.3 Disadvantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Signal Space Representation of Waveform 6


2.1 Vector Space Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 Inner Product of Vectors . . . . . . . . . . . . . . . . . . . . . 6
2.1.2 Orthogonality of Vectors . . . . . . . . . . . . . . . . . . . . . 7
2.2 Signal Space Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 Inner Product of Signals . . . . . . . . . . . . . . . . . . . . . 8
2.2.2 Orthogonal Signals . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Digital Communication Systems 11


3.1 Single Carrier Communication System . . . . . . . . . . . . . . . . . 11
3.2 Multi Carrier Communication System . . . . . . . . . . . . . . . . . . 12

4 OFDM Technology 17
4.1 Development of OFDM from MCM . . . . . . . . . . . . . . . . . . . 17

1
4.2 Cyclic Prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.1 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.2 Disadvantage . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Modeling using MATLAB 21


5.1 Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.1.1 Audio Recorder Model . . . . . . . . . . . . . . . . . . . . . . 22
5.1.2 Image Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1.3 Video Recorder Model . . . . . . . . . . . . . . . . . . . . . . 22
5.1.4 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 ADC and DCA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.1 Audio ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.2 Image ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2.3 Text ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2.4 Audio DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2.5 Image DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2.6 Text DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.3 Source Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.4 Channel Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.5 Modulation Technique . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.6 OFDM Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.7 OFDM Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

References 28

Appendix 29

2
List of Figures

3.1 Schematic diagram of MCM System . . . . . . . . . . . . . . . . . . . 14

4.1 Schematic diagram of basic OFDM System . . . . . . . . . . . . . . . 18


4.2 Schematic diagram of OFDM System . . . . . . . . . . . . . . . . . . 20

3
Chapter 1

Introduction

OFDM (Orthogonal Frequency Division Multiplexing) is the revolutionary tech-


nology because it forms as the basis for Wireless LAN standards and 4G cellular
standards. Wireless LAN standards like 802.11a, 802.11g , & 802.11n and WiMAX
(Worldwide Interoperability for Microwave Access) are based on OFDM technology.
LTE (Long Term Evolution) which is 4G standards is based on OFDM technology
only.[3]

1.1 Parallel data transmission


OFDM is a parallel data transmission technology. In OFDM the wide band frequency
allotted for data transmission will be divided into N number parallel narrow band
frequencies, Such that the wide band carrier signal is divided into N number of sub
carriers on which data constellation symbols can be loaded. Typically number sub-
carrier are the power of 2 i.e. N = 2n where n belong to set of integers.[2]

1.2 Advantages
In the signal carrier data transmission when the transmitted with high data rates
we will have mainly two disadvantages ISI (Inter Symbol Interference) and ICI (Inter
Channel Interference). But in this OFDM technology we can overcome ISI & ICI, that

4
is the main advantage of this OFDM, which made to increase the data transmission
rate in the channel.

1.2.1 Inter Symbol Interference (ISI)

Inter symbol interference (ISI) is a form of distortion of a signal in which one symbol
interferes with subsequent symbols. In wireless communication the ISI is caused in
multi path propagation, due to delay spread. Higher the data rate the ISI will become
worst, Conventional solution is to design an equalizer, so that he data can be recovered
correctly. But design of equalizer becomes complicated with increment in data rates.
OFDM is simple way to deal multi path propagation because it uses relatively simple
DSP antilogarithm.[2]

1.2.2 Inter Channel Interference (ICI)

Inter channel interference (ICI) course occurs in band limited channels due to Doppler
shift or effect between transmitter and receiver. As OFDM is robust against narrow
band interference we can overcome ICI.

1.3 Disadvantages
1. More sensitive to frequency offset. Small frequency offset can cause loss of
orthogonality between the sub-carriers.

2. High peak to average power ratio, sensitive to non-linear distortions.

1.4 Applications
1. Digital Audio Broadcast (DAB).

2. High-definition television (HDTV).

3. IEEE 802.16 Wireless Broadband Standards.

5
Chapter 2

Signal Space Representation of


Waveform

2.1 Vector Space Concepts


Let v be the column vector in the N dimensional vector space characterized by by
the components [1]
v = [v1 , v2 , ....vn ]T

The vector formed by transposing the vector and conjugating its elements is known
as Hermition Vector. It is explained by the following equations. let vT , vH be the
transpose and hermition vector of v then

v = [v1 , v2 , ....vn ]T

vT = [v1 , v2 , ....vn ]

vH = [v1∗ , v2∗ , ....vn∗ ]

2.1.1 Inner Product of Vectors

let v1 and v2 be two vectors in the N dimensional vector space where

v1 = [v11 , v12 , ....v1n ]T

v2 = [v21 , v22 , ....v2n ]T

6
then the inner product of two vectors v1 and v2 is as follows
N
v1 iv2∗ i = vH
X
(v1 , v2 ) = v1 .v2 = 2 v1
i=1

2.1.2 Orthogonality of Vectors

let v1 and v2 be two vectors in the N dimensional vector space where v1 = [v11 , v12 , ....v1n ]T
v2 = [v21 , v22 , ....v2n ]T and these two vectors are said to be orthogonal if the inner
product of two vectors v1 and v2 is zero

(v1 , v2 ) = 0

If a vector cannot be represented as the linear combination of some vectors then we


say that the vector is linearly independent to those vectors.[1]

Properties

1. A vector can be represented as the linear combination of orthogonal unit vertors


or orthonormal basis ∩i , where i belongs to (0,n).
n
ui .∩i
X
u=
i=0

where ui is the projection of the vector u on to the unit vector ∩i .

2. Set of m vectors ui are orthogonal if (ui . uj ) equal to zero for all i,j belongs to
(1,m) and (i not equal to j), then the norm of the vector u is denoted by
qP
n
|u|= (u.u)2 = i=1 | ui |2 which is a n dimensional vector space

Note:

• A set of vectors are said to be orthonormal, if the vectors are orthogonal and
each vector has a unit norm.

• A set of m vectors are said to be linearly independent if no one vector can be


represented as the linear combination of remaining vectors.

7
2.2 Signal Space Concepts
Signal can be represented as vector based on the dimensionality of signal and sam-
pling. As it is known that vector can be an array or a matrix, single dimensional or
1D signal like audio, ECG etc.. can be represented as an array (i.e row matrix or
column matrix) and Two dimensional signals like image can be represented as matrix.

2.2.1 Inner Product of Signals

If the signal is treated as a vector then the inner product of two signals x1 (t) and
x2 (t) is defined as
Z ∞
(x1 (t).x2 (t)) = (x1 (t).x2 (t∗ ))dt
−∞

2.2.2 Orthogonal Signals

Orthogonal functions

If we have two signals with finite energy and they are deterministic, then their exists
set of functions.
φk (t) ∀ k belongs to [1.........N], the inner product of two functions is
Z ∞
(φi (t).φj (t)) = φi (t).φ∗j (t)dt
−∞

is equal to 1 if (i equal to j) else 0 (i.e i not equal to j). Then we say that φi (t) and
φj (t) are orthogonal functions where i, j belongs to (1,N)

Orthogonal expression of signals

let s(t) be a deterministic signal with finite energy


Z ∞
s = | s(t) |2 dt
−∞

we approximate the signal with a linear combination of orthogonal function


k
X
S(t) = si .φi (t)
i=1

8
Where
si are the Coefficients of approximation of s(t)
S(t) is approximate signal

Orthogonality of signals

It is a property that allows transmission of more than one signal over a common
channel with successful detection. The following are the three conditions for orthog-
onality.

• Transmitting more than one signal over a period of time.

• Using a signal channel

• Detection of signal is done successfully at the receiver.

Note:

1. Two signals are said to be orthogonal if they are mutationally independent.

2. If we have two signals and they do not interfere with each other, they are
mutationally independent then we say those two signals are orthogonal signals.

3. Orthogonal signals can be transmuted through a common channel and we get


successful detection at receiver.

Properties

1. Two harmonics (signals) of different frequencies are orthogonal.

x1 (t) = sin(nωo t + φ1 )

x2 (t) = sin(mωo t + φ2 )

where m is not equal to n, so their frequencies are not same.


Therefore inner product of two signals is zero
Z T
(sin(nωo t + φ1 ).sin(mωo t + φ2 ))dt = 0
0

9
2. sin and cosin functions with same phase and same frequency are orthogonal.
Z T
(sin(nωo t + φ).cos(nωo t + φ))dt = 0
0

Therefore the inner product of sin and cos functions is zero

3. DC value and Sin function is also orthogonal


let a be some Direct Current value
Z T
a.sin(nωo t + φ))dt = 0
0

If x1 (t) and x2 (t) are orthogonal then their inner product is zero and norm of the
signal is sZ
∞ √
| x1 (t) | = (x1 (t))2 dt = x
−∞

where x is the energy in x1 (t)[1]


Note:

• set of signals are orthogonal if their inner product is zero.

• set of signals are orthonormal if they are orthogonal and their norms are all
unity.

• set of m signals are linearly independent, if no signal can be represented as


linear combination of other signals.

10
Chapter 3

Digital Communication Systems

3.1 Single Carrier Communication System


Communication system in which one modulator & demodulator are present, single
carrier signal is used for modulation & demodulation and the complete bandwidth
allocated to the communication system is occupied by the carrier signal is said to be
Single Carrier Communication system. The modulation technique used in the single
carrier communication system is said to Single Carrier Modulation.

let us consider a single carrier communication system to which a double sided


bandwidth of B, is allocated for its communication.

Bandwidth = B
1
Symboltime = T =
B
sample rate is the rate of transmission of symbols or transmission of one symbol every
second. Sr be the symbol rate, then
1 1
Sr = = 1
T B
Sr = B

Therefore the symbol rate or the data speed in single carrier communication system
is B Mbps(Mega Bits Per Second).[3]

11
3.2 Multi Carrier Communication System
Communication system in which multi carrier modulation technique is used is said
to a Multi carrier communication (MCC) system.
let us consider a multi carrier communication system to which a double sided band-
width of B, is allocated for its communication. Divided the bandwidth into N sub-
carriers. It means a wide band or broad band B allocated to system is divided into
N narrow bands. Typically number of sub-carriers N is the power of 2 i.e. N = 2n
where n belongs to positive integers.

Multi Carrier Data Transmission

Number of sub-carriers is N.
 
B B
Sub Carrier spacing is N
Consider it h Sub Carrier has the center frequency i N
 
B
So, i N
is the center frequency of it h Sub Carrier i.e.

N N
−( − 1) =< i =<
2 2

Data stream transmitted on the it h Sub Carrier be Xi


Modulated signal or Modulated data stream be

Si (t) = Xi ei2πFi t (3.1)

where
Xi = data that is transmitted on it h Sub Carrier
B
Fi = Center frequency of the it h Sub Carrier. Fi = i N
There are N Sub-Carriers so, we have N data streams. In multi Carrier transmission,
we sum all the modulated signals and transmit.
X
S(t) = Si (t) (3.2)
i

where
Si (t) is the modulated signal of it h data stream modulated on to the it h Sub Carrier
S(t) is the composite transmission signal, which is summation of all the modulated

12
signals. [3]

Xi ei2πFi t
X
S(t) = (3.3)
i
B
Xi ei2πi N t
X
S(t) = (3.4)
i
N
2
B
Xi ei2πi N t
X
S(t) = (3.5)
i=−( N
2
−1)

Multi Carrier Data Detection

If we design any technique for transmission, we should be able to decode the technique
at the detection then it will became communication scheme.
Here we are considering there is no noise and y(t) be the received signal then

y(t) = s(t) (3.6)

Coherent demodulate each stream with corresponding Sub-Carrier y(t)e−2πFi t this is


done to co-relate and recover each data stream. Now co-relating with it h Sub Carrier
N
BZ BX
Xi e2πFi t e−2πFi t
N 0 i
N
BZ BX B B
Xi e2πi N t e−2πl N t
N 0 i
i2π(i−l) B
N
B X Z B Xi e N dt

N i 0
N
B XZ B B
Xi ei2πn N dt
N i 0
Here
we considered (i -l) as the variable n.
N
We limit the interval of integration to B
because it is a fundamental period.
i.e. from Fourier series we can notice that
B
Fundamental frequency F0 = N
1 N
Fundamental Time T0 = B
= B
N
XZ B B
Xi ei2πn N dt = 0, i = l (3.7)
i 0

N
= ,i = l (3.8)
B
13
In the coherent demodulation all the Sub Carriers resulting to zero except it h Sub
Carrier, since they are orthogonal.
Therefore demodulation with ith coherent sub-carrier

B N
.Xl . = Xl = Xi (3.9)
N B

Here
Xl is the information symbol transmitted on lth Sub Carrier. Since l = i
To recover symbols corresponding to N Sub Carriers, coherently demodulate with N
Sub Carriers corresponding to l, where

N N
l = −( − 1)............
2 2

Figure 3.1: Schematic diagram of MCM System

The above scheme is known as multi carrier modulation technique and this the
basis for the development of OFDM technique. The communication system which use
multi carrier modulation technique is said to be multi carrier communication system.

The window of time (sub carrier spacing) associated with detection of multi car-
N
rier symbol is B
, which is time period of integration.

14
Here
multi carrier modulation scheme transmits N symbols using N sub carriers in time
N N
period B
. i.e. N symbols in B
time period.
Symbol rate Sr is number symbol traveled in the given time period. In the mathe-
matical terminology, it is the ratio between total number of symbols transmitted in
the given time period.
N
Sr = N =B
B
The overall symbol rate in single carrier Vs multi carrier system is unchanged.
Consider an example to understand the advantage between single carrier modu-
lation and multi carrier modulation.
let us consider a bandwidth of 1024KHz is allocated for communication
In single carrier modulation the complete bandwidth is allocated for a single carrier
signal.
Bandwidth = B = 1024kHz
1
Symboltime = T =
B
symbolrate = B = 1024M bps

The coherence bandwidth of communication is Bc is 2000 − 300 KHz.


Here Bc << B then it will become a frequency selective channel. Carrier signal in
such a case will experience inter symbol interference(ISI).
In multi carrier modulation the complete bandwidth (i.e. wide band) is divided
into narrow bands.
let number of sub carrier in this system be 256

B = 1024KHz&N = 256

B 1024
Bandwidth of each sub carrier is N
= 256
= 4KHz.
Here bandwidth of each sub carrier is much less than the coherence bandwidth
B
Bc >> N
. so each sub carrier experience frequency flat fading and there is no inter
symbol interference ISI.

15
Take a stream of data load them parallely to the sub carrier with help of modula-
tion technique and recover them parrellly at the receiver with the help of demodulation
technique, then we can reduce the inter symbol interference (ISI). It is the biggest
advantage of Multi carrier modulation (MCM).

But their is a bottle neck in MCM system, We need a bank of modulators and de-
modulators to modulate and demodulate sub carriers respectively. Design of a single
modulator and demodulator in a single carrier communication system is so difficult
then to design bank of modulators is really challenging. Not only designing, hardware
implementation with the RF components is the big challenge.

Hence the is a big advantage and bottle neck for the implementation of Multi
carrier modulation(MCM).

By taking the MCM technique as the bases, the OFDM technology had been
designed, in which the bottle neck of MCM technique removed and advantage of
MCM technique is utilized.[3]

16
Chapter 4

OFDM Technology

4.1 Development of OFDM from MCM


Multi Carrier Modulation (MCM) technique is the bases for OFDM technology, in
which the main drawback of MCM technique had overcome and the advantage of
MCM technique is utilized. There was a key advancement made by Weinstein &
Ebert in the paper ’Data transmission made by FDM using DFT ’in the year 1971.
Both were the scientists in the BEL Laboratory.

Consider a communication system with a band limit B (which is double sided


bandwidth). Sample at a rate B and recover in the latter stage. Hence the Nyquist
1
sample rate is B, sampling time is Ts = B
. Now the time t is equal to uTs , where u
is the number of the sample of the carrier signal.
from
B
Xi ei2πi N t
X
S(t) =
i

where S(t) is composite multi carrier signal, Consider S(t) be sampled at a rate B,
now the uth sample is
B
Xi ei2πi N uTs
X
S(t) = S(uTs ) =
i
B 1
Xi ei2πi N u B
X
x(u) =
i

17
u
Xi ei2πi N
X
x(u) =
i

where
x(u) is the samples of MCM signal.
u
Xi ei2πi N is Inverse Discrete Fourier Transform (IDFT) of Xi information symbols.
P
i

Therefore the samples of MCM signal is the IDFT of information symbols and uTs is
the time corresponding to the uth sample.

Result is that to generate the composite signal bank of N modulators are not
required, sampled version of composite signal can be generated, which is sampled at
rate B (which is Nyquest rate) by essentially computing IDFT.

The scheme of generating MCM transmission signal by signal employing IDFT was
proposed by Weinstein & Ebert. The scheme of generating MCM transmission sig-
nal by signal has lower implementation complexity, compared to bank of modulators.
This is termed as Orthogonal Frequency Division Multiplexing (OFDM).
[3]

Figure 4.1: Schematic diagram of basic OFDM System

18
4.2 Cyclic Prefix
In telecommunications, the term cyclic prefix refers to the prefixing of a symbol with
a repetition of the end. The most effective guard period to use is a cyclic extension
of the symbol. If a mirror in time, of the end of the symbol waveform is put at the
start of the symbol as the guard period, this effectively extends the length of the
symbol, while maintaining the orthogonality of the waveform. This provides Multi
path immunity as well as symbol time synchronization tolerance.[5]

4.2.1 Advantages

• Provides robustness: The addition of the cyclic prefix adds robustness to the
OFDM signal. The data that is retransmitted can be used if required.

• Reduces inter-symbol interference: The guard interval introduced by the


cyclic prefix enables the effects of inter-symbol interference to be reduced.

4.2.2 Disadvantage

• Reduces data capacity: As the cyclic prefix re-transmits data that is already
being transmitted, it takes up system capacity and reduces the overall data rate.

19
After Cyclic prefix operation the set of symbols which form digital signal are converted
to analog signal, sent into the channel using antenna. The receiving antenna feed the
analog signal to ADC and form the symbols. The symbol are sent to remove the cyclic
prefix. The complete OFDM technique is shown in the following block diagram.

Figure 4.2: Schematic diagram of OFDM System

20
Chapter 5

Modeling using MATLAB

According to the signal constellations concept we say that a signal is a vector (i.e.
an array or a matrix). Signal processing is applying mathematical computation tech-
niques to the signal to get realizability in the application. In other words by con-
sidering the signal constellation concept we can say that signal processing is the
computational techniques applied on a vector (i.e. array or matrix).

MATLAB is a matrix laboratory which can perform high end computational tech-
niques on matrices, So MATLAB is the high preferred and efficient tool for signal
processing and communication related works. A communication model which works
on OFDM technique was developed. In this model the main important stage or the
basic stages of Digital communication are designed using MATLAB.

5.1 Source
Source is the natural one so it is analog in nature. Generally in wireless communi-
cation the sourc is a data which is Audio, Video, Image or Text. We use different
sources for data generation for example, audio data we use sound card or micro phone
etc. MATLAB has the ability to access all these sources directly by using the peace
of code as shown

21
5.1.1 Audio Recorder Model

%% I n i t i a l i z a t i o n of device
nBit = 8 ;
nC = 1 ;
Fs = 8 0 0 0 ;
a = a u d i o r e c o r d e r ( Fs , nBit , nC ) ;
%% Recording t h e Audio s i g a l
d i s p l a y ( ’ Get Ready ’ )
d i s p l a y ( ’ S t a r t Speaking ’ )
r e c o r d b l o c k i n g ( a , 1)
d i s p l a y ( ’ stop ’ )
myRecorder = getaudiodata ( a ) ; [ 4 ]

5.1.2 Image Acquisition

% I n i t i a l we s h o u l d hardware i n f o r m a t i o n o f webcam .
% To g e t hardware i n f o r m a t i o n th e f o l l o w i n g command i s used
% imaqhwinfo = image a q v a s i t i o n hardware i n f o r m a t i o n .
% A s s g i n and i d by s e l e c t i n name o f t he came form th e i n f o r m a t i o n
% same command r = imaqhwinfo ( ’ name ’ , 1 )
% f o l l o w th e f o l l o w i n g commonds
x = v i d e o i n p u t ( ’ winvideo ’ , 1 ) ;
img = g e t s n a p s h o t ( x ) ;
imshow ( img ) [ 4 ]

5.1.3 Video Recorder Model

Write a for loop for the image acquisition code then it is an Video recorder, Video is
nothing but a series of images.

22
5.1.4 Text

Text is as similar as entering the string.

dataInText = i n p u t ( ’ Enter t he s t r i n g −− ’)

In between the single cotes, Any thing can be typed but not a single cote, even double
cote can also be typed, it is not a problem. This is the only bottle neck in this code.

5.2 ADC and DCA


Analog to digital conversion(ADC) is the basic need for the digital communication as
the source is analog device. In ADC consists of three components Sampling, Quanti-
zation and encoding, sampling is collection of samples form the analog source using
Nyquest criteria, Quantization is the scaling the amplitude to a fixed point and finally
encoding is to convert the fixed floating point to binary to make digital signal.

As MATLAB works on digital system it takes the input in digitalized fashion


and store it as a vector so, sampling and quantization are down by the system itself.
Encode is the part of designer, this encoding involves only to make digital signal or
digital signal vector.

5.2.1 Audio ADC

%% Analog t o D i g i t a l C on v e r s i on
s i g n a l h e x = num2hex ( myRecorder ) ;
[ nRS1 nCS1 ] = s i z e ( s i g n a l h e x ) ;
P 2 S s i g n a l h e x = r e s h a p e ( s i g n a l h e x , nRS1∗nCS1 , 1 ) ;
Aud hex dec = hex2dec ( P 2 S s i g n a l h e x ) ;
d a t a I n B i n S t r = d e c 2 b i n ( Aud hex dec ) ;
[ nRS nCS ] = s i z e ( d a t a I n B i n S t r ) ;
P 2 S B i S t r= r e s h a p e ( d a t a I n B i n S t r , nRS∗nCS , 1 ) ;
dataOUT = str2num ( P 2 S B i S t r ) ; [ 4 ]

23
5.2.2 Image ADC

% Digital conversion
[ nXE nYE nZE ] = s i z e ( img ) ;
IISC = r e s h a p e ( img , nXE∗nYE∗nZE , 1 ) ;
% I n t e g e r e i n s i n g l e colum
I m g b i n a r y s t r = d e c 2 b i n ( IISC ) ;
I m g b i n a r y= s t r 2 b i n ( i m g b i n a r y s t r ) ;
dataIn = Img binary str ( : ) ; [ 4 ]

5.2.3 Text ADC

d a t a I n B i n S t r = d e c 2 b i n ( dataInText ) ;
[ nRS nCS ] = s i z e ( d a t a I n B i n S t r ) ;
P 2 S B i S t r= r e s h a p e ( d a t a I n B i n S t r , nRS∗nCS , 1 ) ;
d a t a I n = str2num ( P 2 S B i S t r ) ; [ 4 ]

Digital to analog conversion(DAC) is also an important part to observe the pro-


cessed signal at the sink or receiver, since all the sinks are also analog devices. DAC
again consists of three components Decoder, De quantizer and Signal Reconstruction.
These three block will do the reverse operation of ADC blocks. As it is mentioned
earlier MATLAB will store the signal in the form vector then to construct vector
using processed binary vector, only designing binary decoder using MATLAB code is
sufficient.

5.2.4 Audio DAC

%% D i g i t a l t o Analog C on v e r s i on
dataIN = num2str ( dataOUT ) ;
S 2 P B i S t r = r e s h a p e ( dataIN , nRS , nCS ) ;
dataInDecStr = bin2dec ( S2P Bi Str ) ;
A u d i o d e c h e x = dec2hex ( d a t a I n D e c S t r ) ;

24
S 2 P s i g n a l h e x = r e s h a p e ( Audio dec hex , nRS1 , nCS1 ) ;
y o urRecorder = hex2num ( S 2 P s i g n a l h e x ) ;

5.2.5 Image DAC

% Analog C o nv e r s i o n ( R e c o n s t r a c t i o n )
dataOut = r e s h a p e ( dataIn , l e n g t h ( d a t a I n )/ 8 ,8);
I I S C r e c = b i n 2 d e c ( dataOut ) ;
i m g r e c = r e s h a p e ( I I S C r e c , nXE, nYE, nZE ) ;
figure
imshow ( i m g r e c )

5.2.6 Text DAC

%% D i g i t a l t o Analog C on v e r s i on
dataIN = num2str ( dataOUT ) ;
S 2 P B i S t r = r e s h a p e ( dataIN , nRS , nCS ) ;
dataInDecStr = bin2dec ( S2P Bi Str ) ;
A u d i o d e c h e x = dec2hex ( d a t a I n D e c S t r ) ;
S 2 P s i g n a l h e x = r e s h a p e ( Audio dec hex , nRS1 , nCS1 ) ;
y o urRecorder = hex2num ( S 2 P s i g n a l h e x ) ;

5.3 Source Coding


Source coding in the communication is down to compress the data and reduce the
utilization of bandwidth. Halfman coding et.. are some examples of source coding.
Source codings also helps to reduce the computational complexity, i.e. if the number
of bits increases, it is difficult to compute in less time. For example, audio single
can be computed in less time period compared to image signal. So, source coding is
necessary for the communication system to reduce the time delay and utilization of
bandwidth.

25
Source encoder and Source decoder are the communication block added to the
system for source coding. In this project Halfman coding is used for developing
source encoder and decoder.

5.4 Channel Coding


Channel coding is also known as error control coding, it is used in communication
system to have reliable communication by reducing the error present in the signal at
the receiver due to the addition noise in the channel to the transmuted signal.

Many error control coding techniques are developed to maintain reliable communi-
cation. Some of them are linear block codes, Reed Solomon codes, BCH codes, Tarbo
codes, Polar codes etc..Channel encoder and Channel decoder are the communication
block added to the system for error control coding. In this project Convoluntional
encoder and decoder are used.

5.5 Modulation Technique


Transmission of low frequency massage signal over the high frequency carrier signal
by using some parameters like amplitude, frequency and phase of the carrier signal is
known as modulation. There are many modulation techniques developed among the
QPSK and QAM are high efficient modulation techniques. In this project 16-QAM
techniques is used for the development of modulation and demodulation blocks.

5.6 OFDM Transmitter


OFDM transmitter has four main blocks Serial to Parallel converter, IFFT, Cyclic
Prefix and Parallel to Serial converter.

• Serial to Parallel Converter: The set of constellation symbols received from


modulator are feed to Serial to Parallel Converter, based on the number of sub

26
carriers, the symbols are divided into parallel streams.

• IFFT: Parallel data streams are feed and IFFT computation takes place.

• Cyclic Prefix: The IFFT symbols are feed into this block, based on the per-
centage of cyclic prefix operation, the parallel streams of IFFT symbols present
at the end are place at the prefix.

• Parallel to Serial converter: All the parallel steams are joined to make a
serial steam and feed into DAC to generate analog signal.

5.7 OFDM Receiver


OFDM receiver has four main blocks Serial to Parallel converter, Cyclic Prefix Re-
moval, FFT and Parallel to Serial converter.

• Serial to Parallel Converter: The set of symbols received from ADC are
feed to Serial to Parallel Converter, based on the number of sub carriers, the
symbols are divided into parallel streams.

• Cyclic Prefix Removal: Here the cyclic prefix is removed from the OFDM
symbol.

• FFT: Parallel data streams are feed and FFT computation takes place.

• Parallel to Serial converter: All the parallel steams are joined to make a
serial steam and feed into demodulator.

Thus the complete OFDM communication system is developed and simulated in


MATLAB R2017a for real world audio, image, video and text.

27
References

[1] John G. Prokis, Masoud Salehi Digital Communications, Fourth edition Copy-
right 2008 by The McGraw-Hill Companies.

[2] Bannour Ahmed, Mohammad Abdul Matin Coding for MIMO-OFDM in Fu-
ture Wireless Systems (SpringerBriefs in Electrical and Computer Engineering),
Springer International Publishing (2015)

[3] Dr. Aadatiya Jagganatham Lecture videos of wireless communications

[4] Mathworks Matlab official website, WWW.Mathworks.com

[5] Melkeri Vidyadhar S., Yamuna B. J. and Chetna Singhal Das Estimation of Time
Offset in OFDM Systems in the Presence of CFO IJEECE 5(2) July-December
2013; pp. 149-158

28

You might also like