ber analyses
TRANSCRIPT
PPSS ZZ 11 99 ::11 66 ((PPiinn dd.. 11 //99 77 )) UUnniivveerrss iittii TTeekknnoollooggii MMaallaayyss iiaa
BORANG PENGESAHAN STATUS TESIS¨
JUDUL : BER PERFORMANCE STUDY OF ORTHOGONAL FREQUENCY DIVISION
MULTIPLEXING (OFDM)
SESI PENGAJIAN : 2006 / 2007
Saya
(HURUF BESAR) mengaku membenarkan tesis (PSM/Sarjana/Doktor Falsafah)* ini disimpan di Perpustakaan Universiti Teknologi Malaysia dengan syarat-syarat kegunaan seperti berikut:
1. Tesis adalah hakmilik Universiti Teknologi Malaysia. 2. Perpustakaan Universiti Teknologi Malaysia dibenarkan membuat salinan untuk tujuan
pengajian sahaja. 3. Perpustakaan dibenarkan membuat salinan tesis ini sebagai bahan pertukaran antara
institusi pengajian tinggi. 4. ** Sila tanda ( )
SULIT (Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktud di dalam AKTA RAHSIA RASMI 1972)
TERHAD (Mengandungi maklumat yang TERHAD yang telah ditentukan
oleh organisasi/badan di mana penyelidikan dijalankan)
TIDAK TERHAD
Disahkan oleh
(TANDATANGAN PENULIS) (TANDATANGAN PENYELIA)
Alamat Tetap:
NO 7, JALAN 40, PROF DR THAREK ABDUL
DESA JAYA, KEPONG, RAHMAN
52100 KUALA KUMPUR Nama Penyelia
Tarikh: 01 DISEMBER 2006 Tarikh: 01 DISEMBER 2006
CATATAN: * Potong yang tidak berkenaan. ** Jika tesis ini SULIT atau TERHAD, sila lampirkan surat daripada pihak berkuasa/organisasi
berkenaan dengan menyatakan sekali sebab dan tempoh tesis ini perlu dikelaskan sebagai SULIT atau TERHAD.
¨ Tesis dimaksudkan sebagai tesis bagi ijazah Doktor Falsafah dan Sarjana secara penyelidikan, atau disertai bagi pengajian secara kerja kursus dan penyelidikan, atau Laporan Projek Sarjana Muda (PSM).
ANIS SALWA OSMAN
“I hereby declare that I have read this project report and in my opinion this project is
sufficient in terms of scope and quality for the award of the degree of Master of
Engineering (Electrical – Electronics & Telecommunication) by taught course.”
Signature : ………………………………………
Name of Supervisor : PROF DR THAREK ABD RAHMAN
Date : 01 DECEMBER 2006
BER PERFORMANCE STUDY OF ORTHOGONAL FREQUENCY DIVISION
MULTIPLEXING (OFDM)
ANIS SALWA OSMAN
A project report submitted in partial fulfillment of the
requirements for the award of the degree of
Masters of Engineering (Electrical – Electronics & Telecommunication)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
DECEMBER 2006
ii
I declare that this thesis entitled “BER Performance Study of Orthogonal Frequency
Division Multiplexing” is the result of my own research except as cited in the
references. The thesis has not been accepted for any degree and is not concurrently
submitted in candidature of any other degree.
Signature : ................................................................
Name : ANIS SALWA OSMAN
Date : 01 DECEMBER 2006
iii
ACKNOWLEDGEMENTS
My sincere thanks goes to my supervisor, Prof. Dr Tharek bin Abd Rahman,
for his guidance in the execution of the project, for keeping me on my toes, and for
his kind understanding. I am especially grateful for all the help he provided and
resources he made available without which the project would not have reached its
current stage. I am also indebted to thank Dr Zaharuddin bin Mohamed, for being
most efficient in coordinating the project. Many thanks also goes out to the project
presentation assessors, Dr Sevia Mahdaliza binti Idrus Sutan Nameh and Dr. Razali
Ngah, who have given me much advice and guidance during the project presentation.
Finally, I would like to thank my beloved family for just being there, giving me the
strength, love and much needed moral support.
iv
ABSTRACT
A mobile radio channel is characterized by a multipath fading environment.
The signal is offered to the receiver contains not only line of sight of radio wave, but
also a large number of reflected radio waves that arrive at the receiver at different
times. Delayed signals are a result of reflections from terrain features such as trees,
hills, mountains, vehicles or building. These reflected delayed waves interfere with
the direct wave and cause intersymbol interference (ISI), which causes significant
degradation of the network performance. In order to overcome a multipath fading
environment and achieve a wireless broadband multimedia communication system
(WBMCS), it is possible to use OFDM transmission scheme. OFDM is based on
parallel data transmission scheme that reduces that effects of multipath fading and
renders complex equalizers unnecessary. OFDM is expected to be used in wireless
LAN (WLAN) systems. In this project will study and identify t h e Orthogonal
Frequency Division Multiplexing (OFDM) technology that gives the best BER
performance in a multipath fading environment using computer simulation.
Essentially, ideal and worst case communication channel models were studied and
the simulation programs were written to simulate that channels. Orthogonal
Frequency Division Multiplexing is modeled and simulated under different channel
conditions such as AWGN and Rayleigh fading. Subsequently, a comparison study
is carried out to obtain the BER performance for Orthogonal Frequency Division
Multiplexing under under 1-path multipath fading conditions and to identify which
channel gives the best BER performance. The comparison study showed that BER
for AWGN channel gives the best BER performance compared to Rayleigh channel.
v
ABSTRAK
Saluran radio bergerak dikategorikan di dalam persekitaran “multipath
fading”. Di bahagian penerimaan, isyarat diterima daripada pelbagai sudut dan
waktu yang berbeza. Kelewatan isyarat berlaku apabila terdapatnya halangan
daripada pokok, bukit, gunung, kenderaan ataupon bangunan. Hasil pembalikkan
kelewatan isyarat dengan isyarat sebenar akan terhasilnya “intersymbol interference
(ISI)”, yang akan menyebabkan pencapaian rangkaian menurun. Untuk mengatasi
masalah “multipath fading” dan mencapai tahap “wireless broadband multimedia
communication system (WBMCS)”, skim penghantaran OFDM diperkenalkan.
OFDM menggunakan konsep penghantaran data digital secara selari untuk
mengatasi masalah “multipath fading”. OFDM dijangka digunakan di dalam sistem
komunikasi tanpa wayar rangkaian tempatatan. Di dalam projek ini akan
mempelajari dan mengenalpasti teknologi “Orthogonal Frequency Division
Multiplexing (OFDM)” yang akan yang memberikan nilai BER yang terbaik dalam
persekitaran “multipath fading” menerusi simulasi komputer. Model saluran
komunikasi yang “ideal” dan “worst” dijadikan sumber untuk dipelajari dan
program ditulis untuk tujuan simulasi. Seterusnya, “Orthogonal Frequency
Division Multiplexing” model direka dan disimulasi untuk setiap saluran yang
berbeza seperti “AWGN” dan “Rayleigh”. Satu perbandingan kajian dilaksanakan
untuk memperolehi tahap BER bagi “Orthogonal Frequency Division Multiplexing”
di bawah keadaan saluran “Multipath Fading” untuk menentukan saluran yang dapat
memberikan tahap BER yang terbaik. Hasil perbandingan menunjukkan BER di
bawah saluran AWGN memberikan BER yang terbaik berbanding BER di bawah
saluran Rayleigh.
vi
TABLE OF CONTENT
CHAPTER TITLE PAGE
DECLARATION ii
ACKNOWLEDGEMENTS iii
ABSTRACT iv
ABSTRAK v
TABLE OF CONTENTS vi
LIST OF TABLES xi
LIST OF FIGURES xii
LIST OF MATLAB CODES xiii
LIST OF APPENDICES xiv
1 INTRODUCTION 1
1.1 History of Mobile Wireless Communications 2
1.2 Objectives of the project 7
1.3 Scope of the project 8
1.4 Motivations 8
1.5 Problem statement 9
1.6 Methology and Report Structure 10
2 ORTHOGORNAL FREQUENCY DIVISION MULTIPLEXING
(OFDM) TRANSMISSION TECHNOLOGY 12
2.1 Introduction 12
2.2 Evolution of OFDM 13
2.2.1 Frequency Division Multiplexing (FDM) 13
2.2.2 Multicarrier Communication (MC) 13
2.2.3 Orthogonal Frequcny Division Multiplexing 14
vii
2.3 Orthogonal Frequency Division Multiplexing Technology 14
2.4 Concept of Paralle Transmission Scheme 15
2.5 Concept of OFDM Transmission Technology 19
2.5.1 Transmitter Configuration 19
2.5.1 Guard Interval 21
2.5.2 Receiver Configuration 23
2.6 Advantages of OFDM 24
2.7 Disadvantages of OFDM 25
3 DIGITAL MODULATION SCHEME 26
3.1 Modulation 26
3.2 Digital Modulation 27
3.3 Phase Shift Keying (PSK) 27
3.4 Bit Rate and Symbol Rate 29
3.3 QPSK 30
4 COMMUNICATION CHANNEL 33
4.1 Communication Channel 33
4.2 Multipath 34
4.3 Fading 36
4.4 Multipath Fading 36
4.5 Multipath Fading Characteristic 36
4.6 Diversity scheme 38
5 COMMUNICATION CHANNEL MODELLING AND
SIMULATION 39
5.1 Additive White Gaussian Noise (AWGN) Channel 39
5.1.1 Matlab Implementation 40
5.2 Rayleigh Fading Channel 41
5.2.1 Matlab Implementation 46
6 QUADRATURE PSK (QPSK) MODELLING AND
SIMULATION 55
6.1 QPSK Transmission Scheme 55
viii
6.1.1 Basic Configuration of Quadratue modulation scheme 55
6.1.2 Basic configuration of QPSK Transmission Scheme 57
6.2 Matlab Implementation 59
6.2.1 Matlab code QPSK modulation 59
6.2.2 Matlab code QPSK demodulation 60
7 ORTHOGORNAL FREQUENCY DIVISION MULTIPLEXING
(OFDM) MODELLING AND SIMULATION 62
7.1 Orthogornal Frequency Division Multiplexing (OFDM)
configuration using computer simulation 62
8 RESULT AND DISCUSSION 68
8.1 OFDM under AWGN channel 68
8.1.1 OFDM under AWGN channel (Theory) 68
8.1.2 OFDM under AWGN channel after matlab simulation 69
8.1.3 Comparison OFDM under AWGN channel theory and
after matlab simulation 70
8.2 OFDM under one path Rayleigh fading 71
8.2.1 OFDM under one path Rayleigh fading (Theory) 71
8.2.2 OFDM under one path Rayleigh fading after matlab
simulation 72
8.2.3 Comparison between theory and simulation (OFDM
under one path Rayleigh) 73
8.3 Comparison OFDM under two different channels: AWGN and
one path Rayleigh 74
9 CONCLUSION AND FURTHER WORK 77
9.1 Positive Conclusion 78
9.2 Further Improvement for this project 78
9.3 Future Research 79
9.4 Final Note 79
REFERENCES 80
APPENDICESA – G 81 - 101
ix
LIST OF TABLES
TABLE NO. TITLE PAGE
1.1 History of mobile communication 3
x
LIST OF FIGURES
FIGURE NO. TITLE PAGE
1.1 Evolution of mobile wireless communications 2
1.2 Flowchart to calculate BER performance 10
2.1 Typical impulse response of multipath fading: (a) time domain, (b)
frequency domain 16
2.2 Parallel Transmission scheme: multicode transmission 18
2.3 Parallel Transmission scheme: multicarrier transmission 18
2.4 OFDM transmission system: Transmitter 19
2.5 OFDM transmission signal in each subcarrier 20
2.6 Guard Interval 23
2.7 OFDM radio transmission system: Receiver 23
3.1 Constellation diagram 28
3.2 Bit rate and symbol rate 29
3.3 Constellation diagram for QPSK 30 3.4 Four symbols that represents the four phases in QPSK 31
4.1 Effect of multipath on a mobile station 37
5.1 Received signal corrupted by AWGN 39
5.2 Principle of multipath channel 42
5.3 Delayed wave with incident angle nq 43
5.4 Configuration of multipath fading channel 49
5.5 Flowchart to obtain multipath faidng channel 50
6.1 Basic configuration of quadrature modulation scheme 56
6.2 Mapping circuit function for QPSK 58
7.1 Computer simulation to calculate the BER of an OFDM system 62
7.2 Frame format of the simulation model 64
7.3 Input and Output of IFFT 65
8.1 Theoretical AWGN 69
xi
8.2 AWGN after matlab simulation 70
8.3 Comparison between AWGn theory and simulation 71
8.4 OFDM under one path Rayleigh (Theory) 72
8.5 OFDM under one path Rayleigh after simulation 73
8.6 Comparison OFDM under one path Rayleigh between theory and
simulation 74
8.7 OFDM comparison between AWGN and one path Rayleigh 75
xii
LIST OF MATLAB CODES
CODE NO. TITLE PAGE
5.1 AWGN 40
5.2 AWGN with variable noise power 41
5.3 Subfunction for fading 46
5.4 Generate delayed waves 50
5.5 Frequency selecting fading 51
6.1 QPSK modulation 59
6.2 QPSK demodulation 60
xiii
LIST OF APPENDICES
APPENDIX TITLE PAGE
A Timeline for Project 1 105
B Timeline for Project 2 106
C MATLAB Codes for OFDM under AWGN channes 108
D MATLAB Codes for OFDM under one path Rayleigh fading 109
E MATLAB Codes to plot AWGN 110
F MATLAB Codes
G MATLAB Codes for Subfunction
CHAPTER 1
INTRODUCTION
This project studies the Bit Error Rate (BER) for Orthogonal Frequency
Division Multiplexing under different channels condition.
Digital multimedia applications as they are getting common lately create an
ever increasing demand for broadband communications systems. Orthogonal
Frequency Division Multiplexing (OFDM) has grown to be the most popular
communications system in high speed communications in the last decade. In fact, it
has been said by many industry leaders that OFDM technology is the future of
wireless communications.
The prosperous progress of mobile communications has built the main road
of the history of wireless communication. The mobile wireless communications
progressed from Personal Communication Services/Network (PCS/PCN) to Global
System for Mobile Radio Channel (GSM) to General Packet Radio Service (GPRS)
to Enhanced Data for Global Evolution (EDGE) to Universal Mobile
Telecommunication Systems (UMTS) (better known as 3G) and will continue to
evolve to 4G which is under active research. The evolution is depicted in the
following figure.
2
Figure 1.1: Evolution of mobile wireless communications
A step back into the history of wireless communications will reveal how this
evolution was made possible.
1.1 History of Mobile Wireless Communications
The history of mobile communication can be categorized into 3 periods:
§ the pioneer era
§ the pre-cellular era
§ the cellular era
3
Time Significant Pioneer Era 1860s James Clark Maxwell’s electromagnetic (EM) wave postulates 1880s Proof of the existence of EM waves by Heinrich Rudolf Hertz 1890s First use of wireless and forst patent of wireless communications
by Gugliemo Marconi 1905 First transmission of speech and music via a wireless link by
Reginald Fessenden 1912 Sinkng of the Titanic highlights the importance of wireless
communication on the seaways; in the following years marine radio telegraphy is established
Precellular Era 1921 Detroit Police Department conducts field test with mobile radio 1933 In the United States, four channels in the 30-40 MHz range 1938 In the United States, rules for regular services 1940 Wireless Communication is stimulated by World War II 1946 First commercial mobile telephone system operated by the Bell
system and deployed in St Louis 1948 First commercial fully automatic mobile telephone system is
deployed in Richmond, Virgina, in the United States 1950s Microwave telephone and communication links are developed 1960s Introduction of trunked radio systems with automatic channel
allocation capabilities in the United States 1970 Commercial mobile telephone system operated in many countries
(e.g: 100 million moving vehicles on U.S highways, “B-Netz” in West Germany)
Cellular Era 1980s Deployment of analog cellular systems 1990s Digital cellular development and dual mode operation of digital
systems 2000s Future public land mobile communication systems (FPLMTSs) /
International mobile telcommunications-2000 (IMT-200 0 ) / Universal mobile telecommunication systems (UMTS) will be deployed with multimedia services
2010s Fixed point (FP) – based wireless broadband communications and software radio will be available over the Internet
2010s Radio over fiber (such as fiber optic microcells) will be available
Table 1.1: History of Mobile Communications
4
In the pioneer era, a great deal of the fundamental research and development
in the field of wireless communications took place. The postulates of
electromagnetic (EM) waves by James Clark Maxwell during the 1860s in England,
the demonstration of the existence of these waves by Heinrich Rudolf Hertz in 1880s
in Germany and the invention and first demonstration of wireless telegraphy by
Guglielmo Marconi during the 1890s in Italy were representative examples from
Europe. Moreover, in Japan, the Radio Telegraph Research Division was
established as a part of the Electro technical Laboratory at the Ministry of
Communications and started to research wireless telegraph in 1896.
From the fundamental research and the resultant developments in wireless
telegraphy, the application of wireless telegraphy to mobile communication systems
started from the 1920s. This period, which is called the pre-cellular era, began with
the first land-based mobile wireless telephone system installed in 1921 by the
Detroit Police Department to dispatch patrol cars, followed in 1932 by the New
York City Police Department. These systems were operated in the 2MHz frequency
band. Unfortunately, during World War II, the progress of radio communication
technologies was drastically stimulated.
In 1946, the first commercial mobile telephone system, operated in the
150MHz frequency band, was set up by Bell Telephone Laboratories in St. Louis.
The demonstration system was a simple analog communication system with a
manually operated telephone exchange.
Subsequently, in 1969, a mobile duplex communication system was realized
in the 450MHz frequency band. The telephone exchange of this modified system
was operated automatically. The new system, called the Improved Mobile
Telephone System (IMTS), was widely installed in the United States. However,
because of its large coverage area, the system could not manage a large number of
users or allocate the available frequency bands efficiently.
5
The cellular zone was concept was developed to overcome this problem by
using the propagation characteristics of radio waves. The cellular zone concept
divided a large coverage area into many smaller zones. A frequency channel in one
cellular zone is used in another cellular zone. However, the distance between the
cellular zones that use the same frequency channels is sufficiently long to ensure that
the probability of interference is quite low. The use of the new cellular zone concept
launched the third era, known as the cellular era.
The first generation of cellular mobile communication was developed from
1980 to 1990. In this period, research and development (R&D) centered on analog
cellular communication systems.
In the United States, an analog cellular mobile communication service called
Advanced Mobile Phone Service (AMPS) was started in October 1983 in Chicago.
In Europe, several cellular mobile communication services were started. In
Norway, Nordic Mobile Telephone (NMT) succeeded in the development of an
analog cellular mobile communication system.
In the United Kingdom, Motorola developed an analog cellular mobile
communication system called the total access communication system (TACS) based
on AMPS in the 1984-1985 periods. In 1983, NMT started a modified NMT-450
called NMT-900. Moreover, C-450, RTMS and Radiocom-2000 were, respectively,
introduced in Germany, Italy and France.
Meanwhile, in Japan, Nippon Telephone and Telegraph (NTT) developed a
cellular mobile communication system in the 800 MHz frequency band and started
service in Tokyo in December 1979. Furthermore, a modified TACS that changed
the frequency band to adjust for Japanese frequency planning and was called JTACS
was also introduced in July 1989. Subsequently, narrowbakd TACS (NTACS),
which introduced the required frequency band in half, started service in October
1991.
6
So far, the evolution of the analog cellular mobile communication system is
described. There were many problems and issues, for example, the incompatibility
of the various systems in each country or region, which precluded roaming. In
addition, analog cellular mobile communication systems were unable to ensure
sufficient capacity for the increasing number of users, and the speech quality was
not good.
To solve these problems, the R&D of cellular mobile communication
systems based on digital radio transmission schemes was initiated. These new
mobile communication systems became known as the second generation (2G) of
mobile communication systems, and the analog cellular era is regarded as the first
generation (1G) of mobile communication systems.
In Europe, the global system for mobile communication (GSM), a new
digital communication system that allowed international roaming and using 900
MHz frequency band had been introduced in 1992.
First Generation (1G) is described as the early analogue cellular phone
technologies. Actually, 1G is a hybrid of analog voice channels and digital control
channels. The analog voice channels typically used Frequency Modulation (FM)
and the digital control channels used simple Frequency Shift keying (FSK)
modulation. NMT and AMPS cellular technologies fall under this categories.
Second Generation (2G) described as the generation first digital fidely used
cellular phones systems. 2G digital systems use digital radio channels for both voice
(digital voice) and digital control channels. GSM technology is the most widely
used 2G technologies. This gives digital speech and some limited data capabilities
(circuit switched 9.6kbits/s). Other 2G technologies are IS-95 CDMA, IS-136
TDMA and PDC.
Two and Half Generation (2.5G) is an enhanced version of 2G technology.
2.5G gives higher data rate and packet data services. GSM systems enhancements
7
like GPRS and EDGE are considered to be in 2.5G technology. The so-called 2.5G
technology represent an intermediate upgrade in data rates available to mobile users.
Third Generation (3G) mobile communication systems often called with
names 3G, UMTS and WCDMA promise to boost the mobile communications to the
new speed limits. The promises of third generation mobile phones are fast Internet
surfing, advanced value-added services and video telephony. Third-generation
wireless systems will handle services up to 384 kbps in wide area applications and
up to 2 Mbps for indoor applications.
Fourth Generation (4G) is intended to provide high speed, high capacity, low
cost per bit, IP based services. The goal is to have data rates up to 20 Mbps. Most
propable the 4G network would be a network which is a combination of different
technologies, for example, current celluart networks, 3G celluar network and
wireless LAN, working together using suitable interoperability protocols.
1.2 Objectives of the project § To study a concept of Orthogonal Frequecy Division Multiplexing (OFDM)
Tranmission Technology in WLAN enviroment
§ To design and evaluate Orthogonal Frequency Division Multiplexing (OFDM)
in a Multipath Fading Channel using computer simulation (MATLAB)
§ To obtain and compare between the theoretical and simulation result for
Orthogonal Division Multiplexing (OFDM) under different communication
channel
§ To obtain and compare the Bit Error Rate (BER) Performance for different
communication channel
8
1.3 Scope of the project
In this project, I focused on designing the matlab code for two different
channel conditions that affects the BER performance for Orthogonal Frequency
Divison Multiplexing (OFDM) in WLAN environment. Both channels are:
§ AWGN Channel
§ Rayleigh Channel
Digital modulation that has been used in this project is QPSK modulation.
1.4 Motivations
OFDM is expected to be used in future broadcasting and wireless LAN
(WLAN) systems. IEEE802.11a is the technology that used OFDM concept. Since
wireless technologies become a very high demand nowadays, OFDM is chosen to be
a subject study.
By learning to design and evaluate the Orthogonal Frequecny Division
Multiplexing (OFDM) system using computer simulation, I will be able to establish
my position in the research and development of wireless communications and
further design and simulate more complex systems.
In this project, I ’ m using the MATLAB computer-simulation software,
which is produced by MathWork Inc. MATLAB, a sophisticated language for
matrix calculation, and stands for MATrix LABoratory. MATLAB is chosen as the
computer language to design the Orhtogonal Frequency Division Multiplexing
(OFDM) systems because it is one of the most popular computer simulation
languages in the world. MATLAB is used throughout this project to:
§ model and simulate the communication channel (AWGN and Rayleigh)
§ model and simulate of the transmission system for OFDM using QPSK
modulation
9
§ compute and compare the BER.
1.5 Problem statement
Mobile wireless systems operate under harsh and challenging channel
conditions. The wireless channel is distinct and much more unpredictable than the
wireline channel because of factors such as multipath and shadow fading, Doppler
spread, and delay spread or time dispersion. These factors are all related to
variability that is introduced by the mobility of the user and the wide range of
environments that may be encountered as a result.
In wireless communications, multipath is the propagation phenomenon that
results in radio signals reaching the receiving antenna by two or more paths. Causes
of mutipath include atmospheric, ducting, ionospheric reflection and refraction and
reflection from terrestrial objects such as mountains and buildings. The reflected
signals arrive at the receiver with random phase offsets, because each reflection
generally follows a different path to reach the user’s receiver. The result is random
signal fades as the reflections destructively (and constructively) superimpose on one
another, which effectively cancels part of the energy signal for brief periods of time.
The degree of cancellation or fading will depend on the delay spread of the reflected
signals, as embodied by their relative phases and their relative power.
The project studies and identifies the Orthogonal Frequency Divison
Multiplexing (OFDM) that gives the best BER performance in a multipath fading
environment using QPSK modulation system. This project will identify the best
BER performance between different types of communication channel. The outcome
from the BER vs Signal Energy per bit over noise power density ratio (Eb/No) will
be shown in the graph format.
10
1.6 Methodology and Report Structure
This is a simulation project which studied the BER performance for
Orthogonal Frequency Division Multiplexing (OFDM) under different
communication channels. This study involves four main procedures to achieve its
ob jec t ives . The procedures involved modeling and simulations o f t he
communication channel between ideal and worst case, OFDM transmission system,
QPSK transmission system and calculation and comparison of BER. The following
flowchart summarizes the procedures:
Figure 1.2 Flowchart to calculate BER performance
In Chapter 1, there is an introduction of this project, where it contained
history of mobile communication, objectives, scope, motivations and problem
statements.
The second chapter, more concentrate on the subject matter which is
Orthogonal Frequency Division Multiplexing (OFDM). Extensive research is
Step 0 Initial study & research on wireless communications
Step 1 Communication Channel Model
Ideal Channel
Worst Case Channel
Step 2 OFDM Transmission
System Model
Step 3 GPSK Transmission
System Model
Step 4 Calculate BER and compare results
Project 1
Project 2
11
carried out on the existing wireless communications system and its underlying
modulation schemes.
In Chapter 3, concept of the digital modulation scheme is discussed. In this
chapter, concentrate more on quadrature PSK since this modulation has been chosen
as a digital modulation in OFDM.
Subsequently, the next chapter, Chapter 4, we will focus on communication
channel that exists in wireless communication, how the communication channels
contribute in the BER performance of OFDM.
The fifth chapter outlines the modeling and simulation of communication
channel using MATLAB. Two channels are modeled; they are the ideal
communication channel and the worst case communication channel.
In chapter 6, outlines the modeling and simulation of quadrature PSK
(QPSK).
While in chapter 7, outline the modeling and simulation of the Orthogonal
Frequency Division Multiplexing (OFDM) under different communications
channels.
The second last and last chapter will conclude on the results from all the
simulations. Discussions and analysis on the results are included in this section.
CHAPTER 2
ORTHOGONAL FREQUENCY DIVISION MULTIPLEXING
TRANSMISSION TECHNOLOGY
Focus of this project is on Orthogonal Frequency Division Multiplexing
(OFDM) Transmission Technology. A study is carried out on OFDM and drilled
down further on concept of the parallel transmission scheme that has been used in
OFDM.
2.1 Introduction
Orthogonal Division Multiplexing (OFDM) has grown to be the most
popular communications systems in high speed communications in the last decade.
In fact, it has been said by many industry leaders that OFDM technology is the
future of wireless communications.
The root of OFDM dates back in the lter 1950s, with the technology gaining
popularity when it became the standard for digital audi broadcasting (DAB). Using
16 independent channels, each carrying a 256kbps data rat, OFDM enables
transmission to be sent and received simultenously. Terrestial digital video
briadcasting (DVB-T) in Europe was also an early OFDM application. However,
these broadcasting systems did not offer much promise for two way communications
in a typical broadcasting environment; transmitters are a rather expensive option.
13
Late 1997, Lucent and NTT submittec proposals to the IEEE for a high speed
wireless standard for local are networks (LAN). Eventually, the two companies
combined their proposals and it was accepted as a draft stanadard in 1998 and as a
standard now known as IEEE802.11a standard, in 1999.
2.2 Evolution of OFDM
The evolution of OFDM [2] can be divided into three parts. There are
consists of Frequency Division Multiplexing (FDM), Multicarrier Communication
(MC) and Orthogonal Frequency Division Multiplexing.
2.2.1 Frequency Division Multiplexing (FDM)
Frequency Division Multiplexing (FDM) has been used for a long time to
carry more than one signal over a telephone line. FDM is the concept of using
different frequency channels to carry the information of different users. Each
channel is identified by the center frequency of transmission. To ensure that the
signal of one channel did not overlap with the signal from an adjacent one, some gap
or guard band was left between different channels. Obviously, this guard band will
lead to inefficiencies which were exaggerated in the early days since the lack of
digital filtering is made it difficult to filter closely packed adjacent channels.
2.2.2 Multicarrier Communication (MC)
The concept of muticarrier (MC) communications uses a form of FDM
technologies but only between a single data source and a single data receiver. As
multicarrier communications was introduced, it enabled an increase in the overall
capacity of communications, thereby increasing the overall throughput. Referring to
14
MC as FDM, however, is somewhat misleading since the concept of multiplexing
refers to the ability to add signals together. MC is actually the concept of splitting a
signal into a number of signals, modulating each of these new signals over its own
frequency channel; multiplexing these different frequency channels together in an
FDM manner; feeding the received signal via a receiving antenna into a
demultiplexer that feeds the different frequency channels to different receivers and
combining the data output of the receivers to form the received signal.
2.2.3 Orthogonal Frequency Division Multiplexing
OFDM is the concept of MC where the different carriers are orthogonal to
each other. Orthogonal in this respect means that the signals are totally independent.
It is achieved by ensuring that the carriers are placed exactly at the nulls in the
modulation spectra of each other. Source for OFDM spectral efficiency is the fact
that the drop off of the signal at the band is primarily due to a single carrier which is
carrying a low data rate. OFDM allows for sharp rectangular shape of the spectral
power density of the signal.
2.3 Orthogonal Frequency Division Multiplexing Technology
Orthogonal Frequency Division Multiplexing (OFDM) also known as
discrete multitone modulation (DMT), is based upon the principle of requency
division multiplexing (FDM), but it utilized as a digital modulation scheme. The bit
stream that is to be transmitted is split into several parallel bit streams, typically
dozens to thousands. The available frequency spectrum is divided into sub-channels
and each low rate bit stream is transmitted over one sub channel by modulating sub-
channel by ,odulating a sub-carrier using a standard modulation scheme, for
example: PSK, QAM. The sub-carrier frequencies are chosen so that the modualted
data streams are orthogonal to each other, meaning that cross talk between the sub-
channels is eliminated.
15
Channel equalization is simplified by using many slowly modulated
narrowband signals instead of one fastly modulated wideband signal. The primary
advantage of OFDM is its ability to coop with severe channel conditions, for
example multipath and narrowband interference without complex equalization filters.
2.4 Concept of the Parallel Transmission Scheme
The multipath fading environment in which not only a direct transmission
signal but also many reflected signals arrive at the receiver at different timues in the
time domain is characterized by a channel impulse response, which includes the
information about the relative time when the delayed signal arrived at receiver, the
power of the signal and its phase as compared to the power and phase of the direct
wave. Figure 2.1 shows a typical impulse response of multipath fading in the time
and frequency domains.
From the time domain point of view, many signals with different arrival
times, signal power and phases are reveived at receiver. From the frequecny point of
view, the multipath fading environment is characterized by the enhancement of
some frequencies and the attenuation of others. If there is mobile reception the the
relative power levels and attenuations of various reception path will change with
time. A narrowband signal will vary in quality as the peaks and the frequency
response move around in the frequency domain. There will also be a noticeable
variation in the phase response which will affect all systems using the phase as a
means of signalling.
Let us consider the situation where single carrier serial high speed wireless
data is transmitted in a multipath fading environment. If digital data are transmitted
at a rate of several megabits per second, and the maximum delay time of delayed
waves caused by multipath fading is larger than 1 µs, the maximum delay time of
the delayed waves is greater than 1 symbol time. Figure 2.1 illustrates the
waveforms of a single carrier serial high speed wireless data transmission scehme in
16
the time domain and the 1 symbol time. Both the waveforms and the spectrum are
distorted and need to to equalize the distorted signal.
Figure 2.1: Typical impulse response of multipath fading:
(a) time domain
(b) frequency domain
One way to equalie the signal is by using adaptive equalization techniques
that estimate the channel impulse response at the received data signal at the receiver.
However, there are practical difficulties associated with operating this equalization
at several megabits per second with high speed, compact and low cost hardware
because if the transmitted data wanted to be recovered from the received data,
several successive symbols must to be stored in order to equalize the received data
sequentially.
17
From the frequency domain point of view, when a transmitted signal suffers
from multipath fading, some part of the signal may suffer from constructive
interference and be enhanced in level, whereas some other parts of the signal may
suffer from destructive interference and be attenuated, sometimes to the point of
extinction. In general, frequency bands that are close together will suffer from the
same variation in the signal strength, which is well correlated. The width of the
frequency bands that have high correlation value is called the coherent bandwidth.
For a narrowband signal, distortion is usually minimized if the bandwidth of the
signal is less than the coherent bandwidth. There is, however, a significant chance
that the signal will be subjected to severe attenuation in some occasions. A signal
that occupies a bandwidth greater than the coherent bandwidth will be subjected to
more distortion but will suffer from less variation in the total received power even if
it is subjected to significant levels of multipath fading.
In order to prevent the problems caused by the multipath fading environment
and achieve broadband mobile communications, it is necessary to use parallel
transmission, in which the transmitted high speed data is converted to slow parallel
data in several channels. These data are multiplexed using several multiplexing
techniques to distinguish between the subchannels.
Figure 2.1 shows the effects of the effect of the parallel transmission scheme.
For a given overall data rate, increasing the number of parallel transmission channels
reduce the data rate that each individual subchannels mus convey or in other words,
lengthen the symbol period. AS a result, the delay time of the delayed waves is
suppressed to within 1 symbol time.
In order to distinguish the subchannels, frequency division multiplexing
(FDM) and code division multiplex (CDM) are often used. Sometimes, the first
method will refer to multicarrier transmission and the second method referred to
multicode transmission. OFDM is a multicarrier transmission technology and the
most efficient one.
18
Figure 2.2 : Parallel transmission scheme : Multicode transmission scheme
Figure 2.3 : Parallel Transmission scheme : Multicarrier transmission scheme
19
2.5 Concept of OFDM Transmission Technology
In this section, focus on the development and applications of the OFDM
transmission scheme.
2.5.1 Transmitter Configuration
Figure 2.4 : OFDM transmission system : Transmitter
Figure 2.4 shows the configuration of an OFDM transmitter. In the
transmitter, the transmitted high speed data is first converted into parallel data of N
subchannels. Then, the transmitted data of each parallel subchannel is modulated by
PSK based modulation.
Consider a quadrature modulated data sequence of the N channels (d0, d1,
d2, .., dN-1) and dIn and dQn are {1,-1} in QPSK and {±1,±3} in 16-QAM. These
modulated data are fed into an inverse fast Fourier transform (IFFT) circuit and an
OFDL signal is generated. The transmitted data is given by
s(t) = ΣΣdi (k) exp (j2πfi(t-kTs))f(t-kTs)
= ΣΣ (dIi (k) + jdQi (k))(cos(2πfi(t-kTs)) + j sin (2πfi(t-kTs))) f(t-kTs)
= ΣΣ (dIi (k) cos(2πfi(t-kTs)) - dQ i (k)sin (2πfi(t-kTs))) f(t-kTs)
+j ΣΣ (dIi (k) sin(2πfi(t-kTs)) - dQ i (k)cos (2πfi(t-kTs))) f(t-kTs) (2.1)
S/P
IFFT
Binary low speed data
d1
d2
dN-1
Guard time
insertion
S’(t) S(t)
Binary high speed data
20
Where Ts is the symbol duration of the OFDM signal and fi (i=0, 1, 2, …) is
the frequency of the ith subcarrier given by
fi = f0 + i/ Ts (2.2)
Here, f(t) is the pulse waveform of each of the symbols and it is defined as
f(t) = 1 (0 t Ts )
0 (otherwise) (2.3)
Figure below shown that the waveforms of real part and an imaginary part of
an OFDM signal in each subchannel when i = 0, 1, 2, …, N-1. The OFDM signal
includes many carrier signals with their own frequencies. This OFDM signal is fed
into a guard time insertion circuit to reduce ISI.
Figure 2.5 : OFDM transmission signal in each subcarrier
21
2.5.1.1 Guard Interval
One key principle of OFDM is that since low rate modulation scheme, where
the symbols are relatively long compared to the channel time characteristics suffer
less from intersymbol interference caused by multipath. It is the advantageous to
transmit a number of low rate streams in parallel instead of a single high rate stream.
Since the duration of each symbol is long, it can be affordable to insert a guard
interval between the OFDM symbols and thus the intersymbols interference can be
eliminated. The transmitter sends s cyclic prefix during the guard interval. The guard
interval also reduces the sensitivity to time synchronization problems.
The orthogonality of subchannels in OFDM can be maintained and
individual subchannels can be completeky separated by using an FFT circuit at the
receiver when there are no ISI and intercarrier interference (ICI) introduced by
transmission channel distortion. The spectra of OFDM signal are not strictly band
limited, the distortion due to mutipath fading causes each subchannel to spread the
power into tha adjacent channel. Moreover, the delayed wave with the delay time
larger than 11 symbol time contaminates the next symbol. In order to reduce this
distortion, a simple solution is to increase the symbol duration or the number of
carriers. However, this method may be difficult to implement in terms of carrier
stability against Doppler frequency and FFT size.
Another way to eliminate ISI is to create a cyclically extended guard interval,
where each OFDM symbol is preceded by a periodic extension of the signal itself.
The total symbol duration:
Ttotal = Tg + Tn (2.4)
Where,
Tg = guard time interval
Each symbol is made of two parts. The whole signal is contained in the
active symbol, the last part of which is also repeated at the start of the symbol and is
called a guard interval. When the guard interval is longer than the channel impulse
response or the multipath delay, the effect of ISI can be eliminated. However, the
22
ICI or in band fading still exists. The ratio of the guard interval to the useful symbol
duration is application dependent. The insertion of guard interval will reduce the
data throughput; Tg is usually smaller than Ts/4.
After the insertion of a guard interval, the OFDM signal is given by
s’(t) = ΣΣdi (k) exp (j2πfi(t-kTtotal))f’(t-kTtotal) (2.5)
where f’(t) is the modified pulse waveform of each symbol defined as
f(t) = 1 ( Tg t Ts )
0 (t<-Tg, t > Ts) (2.6)
The OFDM signal is transmitted to the receiver; however, the transmitted
data, s’(t) is contaminated by multipath fading and AWGN. At the receiver, the
received signal is given by
r(t) = h(τ, t)s(t-τ)dτ + n(t) (2.7)
where h(τ, t) is the impulse response of the radio channel at time t, and n(t) is
the complex AWGN.
23
Figure 2.6: Guard Interval Insertion
2.5.2 Receiver Configuration
Figure 2.7: OFDM radio transmission system : Receiver
Guard time removal
FFT
P/S
Binary high speed data
r(t)
d’1
d’2
d’N-1
24
At the receiver, received signal r(t) is filtered by a bandpass filter, which is
assumed to have sufficiently wide passband to introduce only negligible distortion in
the signal. An orthogonal detector is then applied to the signal where the signal is
downconverted to IF band. Then, an FFT circuit is applied to the signal to obtain
Fourier coefficients of the signal in observation periods [iTTotal , iTTotal + Ts]. The
output, di’(k), of the FFT circuit of the ith OFDM subchannel is given by
di’(k) = 1/Ts r(t) exp (-j2πfi(t-kTtotal))dt (2.8)
If he characteristics of delayed wave, hi’(k) in a multipath fading
environment can be estimated, therefore the received data also can be equalized as
follows:
di’’ (k) = (hi’ * (k)) / (hi’(k)hi’ * (k) )) (di’(k)) (2.9)
where * indicates the comples conjugate.
By comparing dk and di’’ (k), the BER performance can be calculated. The
BER depends on the level of the receiver’s noise. In OFDM transmission, the
orthogonal is preserved and the BER performance depends on the modulation
scheme in each subchannel.
2.6 Advantages of OFDM
§ Can easily be adopted to severe channel conditions without complex
equalization
§ Robust to narrowband co channel interference
§ Robust to intersymbil interference and fading caused by multipath
propagation
§ High spectral efficiency
§ Efficient implementation by FFTs
25
§ Low sensitivity to time synchronization errors
§ Tuned sub channel receiver filter are not required
§ Facilitates Single Frequency Network; i.e: transmitter macrodiversity
2.7 Disadvantages of OFDM
§ Sensitive to Doppler shift
§ Sensitive to frequency synchronization problems
§ Inefficient transmitter power consumption since linear power amplifier is
required
26
CHAPTER 3
DIGITAL MODULATION SCHEMES
In this project, Quadrature PSK (QPSK) is selected to be a digital
modulation in OFDM. Hence, before proceed to design and evaluate OFDM in
computer simulation, a study on QPSK has been carried out.
3.1 Modulation
Modulation is the process of facilitating the transfer of information over a
medium. Voice cannot be sent very far by screaming. To extend the range of sound,
we need to transmit it through a medium other than air, such as a phone line or radio.
The process of converting information (voice in this case) so that it can be
successfully sent through a medium (wire or radio waves) is called modulation.
There are 2 types of modulations: Analog modulation and digital modulation.
In analog modulation, an information-bearing analog waveform is impressed on the
carrier signal for transmission whereas in digital modulation, an information-bearing
discrete-time symbol sequence (digital signal) is converted or impressed onto a
continuous-time carrier waveform for transmission. 2G wireless systems are realized
using digital modulation schemes.
27
3.2 Digital Modulation
Nowadays, digital modulation is much popular compared to analog
modulation. The move to digital modulation provides more information capacity,
compatibility with digital data services, higher data security, better quality
communications, and quicker system availability. Developers of communications
systems face these constraints:
§ available bandwidth
§ permissible power
§ inherent noise level of the system
The RF spectrum must be shared, yet every day there are more users for that
spectrum as demand for communications services increases. Digital modulation
schemes have greater capacity to convey large amounts of information than analog
modulation schemes.
3.3 Phase Shift Keying (PSK)
PSK is a modulation scheme that conveys data by changing, or modulating,
the phase of a reference signal (i.e. the phase of the carrier wave is changed to
represent the data signal). A finite number of phases are used to represent digital
data. Each of these phases is assigned a unique pattern of binary bits; usually each
phase encodes an equal number of bits. Each pattern of bits forms the symbol that is
represented by the particular phase.
There are two fundamental ways of utilizing the phase of a signal in this
way:
§ By viewing the phase itself as conveying the information, in which case the
demodulator must have a reference signal to compare the received signal's
phase against; (PSK) or
28
§ By viewing the change in the phase as conveying information - differential
schemes, some of which do not need a reference carrier (to a certain extent)
(DPSK).
A convenient way to represent PSK schemes is on a constellation diagram
(as shown in figure 2 below). This shows the points in the Argand plane where, in
this context, the real and imaginary axes are termed the in-phase and quadrature
axes respectively due to their 90° separation. Such a representation on
perpendicular axes lends itself to straightforward implementation. The amplitude of
each point along the in-phase axis is used to modulate a cosine (or sine) wave and
the amplitude along the quadrature axis to modulate a sine (or cosine) wave.
Figure 3.1 Constellation Diagram
In PSK, the constellation points chosen are usually positioned with uniform
angular spacing around a circle. This gives maximum phase-separation between
adjacent points and thus the best immunity to corruption. They are positioned on a
circle so that they can all be transmitted with the same energy. In this way, the
moduli of the complex numbers they represent will be the same and thus so will the
amplitudes needed for the cosine and sine waves. Two common examples are
binary phase-shift keying (BPSK) which uses two phases, and quadrature phase-
shift keying (QPSK) which uses four phases, although any number of phases may be
29
used. Since the data to be conveyed are usually binary, the PSK scheme is usually
designed with the number of constellation points being a power of 2.
3.4 Bit rate and symbol rate
To understand and compare different PSK modulation format efficiencies, it
is important to first understand the difference between bit rate and symbol rate. The
signal bandwidth for the communications channel needed depends on the symbol
rate, not on the bit rate.
EachSymbolmittedWithfBitsTransTheNumbero
BitRateSymbolRate = (2.1)
Bit rate is the frequency of a system bit stream. Take, for example, a radio
with an 8 bit sampler, sampling at 10 kHz for voice. The bit rate, the basic bit
stream rate in the radio, would be eight bits multiplied by 10K samples per second,
or 80 Kbits per second. (For the moment we will ignore the extra bits required for
synchronization, error correction, etc.).
Figure 3.2 Bit Rate and Symbol Rate
30
Figure above is an example of a state diagram of a Quadrature Phase Shift
Keying (QPSK) signal. The states can be mapped to zeros and ones. This is a
common mapping, but it is not the only one. Any mapping can be used. The
symbol rate is the bit rate divided by the number of bits that can be transmitted with
each symbol. If one bit is transmitted per symbol, as with BPSK, then the symbol
rate would be the same as the bit rate of 80 Kbits per second. If two bits are
transmitted per symbol, as in QPSK, then the symbol rate would be half of the bit
rate or 40 Kbits per second. Symbol rate is sometimes called baud rate. Note that
baud rate is not the same as bit rate. These terms are often confused. If more bits
can be sent with each symbol, then the same amount of data can be sent in a
narrower spectrum. This is why modulation formats that are more complex and use
a higher number of states can send the same information over a narrower piece of
the RF spectrum.
3.5 QPSK
QPSK is a multilevel modulation techniques, it uses 2 bits per symbol to
represent each phase. Compared to BPSK, it is more spectrally efficient but requires
more complex receiver.
Figure 3.3 Constellation Diagram for QPSK
31
Figure above shows the constellation diagram for QPSK with Gray coding.
Each adjacent symbol only differs by one bit. Sometimes known as quaternary or
quadriphase PSK or 4-PSK, QPSK uses four points on the constellation diagram,
equispaced around a circle. With four phases, QPSK can encode two bits per
symbol, shown in the diagram with Gray coding to minimize the BER - twice the
rate of BPSK. Figure below depicts the 4 symbols used to represent the four phases
in QPSK. Analysis shows that this may be used either to double the data rate
compared to a BPSK system while maintaining the bandwidth of the signal or to
maintain the data-rate of BPSK but halve the bandwidth needed.
Figure 3.4 Four symbols that represents the four phases in QPSK
Although QPSK can be viewed as a quaternary modulation, it is easier to see
it as two independently modulated quadrature carriers. With this interpretation, the
even (or odd) bits are used to modulate the in-phase component of the carrier, while
the odd (or even) bits are used to modulate the quadrature-phase component of the
carrier. BPSK is used on both carriers and they can be independently demodulated.
As a result, the probability of bit-error for QPSK is the same as for BPSK:
32
÷÷
ø
ö
çç
è
æ=
0
2
N
EQP b
b (3.1)
However, with two bits per symbol, the symbol error rate is increased:
2)1(1 bs PP --=
÷÷
ø
ö
çç
è
æ-÷
÷
ø
ö
çç
è
æ=
0
2
0
2N
EQ
N
EQ ss (3.2)
If the signal-to-noise ratio is high (as is necessary for practical QPSK
systems) the probability of symbol error may be approximated:
(3.3)
As with BPSK, there are phase ambiguity problems at the receiver and
differentially encoded QPSK is more normally used in practice.
33
CHAPTER 4
COMMUNICATION CHANNEL
In wireless communications, a practical communication channel is
often modeled by a random attenuation of the transmitted signal, followed by
additive noise. The attenuation captures the loss in signal power over the course of
the transmission, and the noise in the model captures external interference and/or
electronic noise in the receiver. Hence, depending on the application, the
mathematical model for the communication system includes a model for the
distortion introduced by the transmission medium, and termed the communication
channel, or channel for short. Types of communications channels:
§ 1. Simplex communication (1 way)
§ Duplex communication (2 ways)
4.1 Communication Channel
Channel, in communications (sometimes called communications channel),
refers to the medium through which information is transmitted from a sender (or
transmitter) to a receiver. In practice, this can mean many different methods of
facilitating communication, including:
1. A connection between initiating and terminating nodes of a circuit.
2. A path for conveying electrical or electromagnetic signals, usually
distinguished from other parallel paths.
34
3. The portion of a storage medium, such as a track or a band, that is
accessible to a given reading or writing station or head.
4. In a communications system, the part that connects a data source to a data
sink.
4.2 Multipath
In wireless communications, mutipath is the propagation
phenomenon that results on radio signals reaching the receiving antenna by two or
more paths. Causes of mutipath include atmospheric ducting, ionospheric refelction
and refraction and reflection from terrestrial object such as mountains and buildings.
The effects of multipath include constructive and destructive interference and
phase shifthing of the signal. This causes Rayleigh Fading named after Lord
Rayleigh. Rayleigh fading with a strong line of sight is said to have a Rician
distributuion or tobe Rician fading.
In digital radio communications such as GSM Multipath can cause errors and
affect the quality of communications. The errors are due to Intersymbol Interference
(ISI). Equalizers are often used to correct the ISI. Alternatively, techniques such as
orthogonal frequency division modulation and Rake receivers may be used.
4.3 Fading
Fading is about the phenomenon of loss of signal in telecommunications.
Fading or fading channels refers to mathematical models for the distortion that a
carrier modulated telecommunication signal experiences over certain propagation
media. Short team fading also known as mutipath induced fading is due to mutipath
propagaration. Fading results from the superposition of transmitted signals that have
35
experienced differences in attenuation, delay and phase shift while travelling from
the source to the receiver. It may be caused by attenuation of a single signal.
The most common types of fading known as “slow fading” and “fast fading”
as they apply to a mobile radio environment. Fading refers to the time variation of
the received signal power caused by changes in the transmission medium or path.
Slow fading: Shadowing or Large Scale Fading is a kind of fading caused by larger
movements of a mobile or obstructions within the peropagation environment. Fast
fading also known as Multipath fading or small scale fading is a kind of faidng
occuring with small movements of a mobile.
The best way to combat fading is to ensure that multiple versions of the same
signal are transmitted, received and coherently combined. This is usually termed
diversity and is sometimes acquired through multiple antennas. Mathematically, the
simplest model for the fading phenomenon is multiplication of the signal waveform
with a time dependent coefficient which is often modeled as a random variable,
making the received signal to noise ratio a random quantity.
Fading channel models are often used to model electromagnetic transmission
of information over wireless meida such as with cellular phones and in broadcast
communication. Small scale fading is usually divided into fading based on multipath
time delay spread and that based on Doppler spread.
There are two typer of fading based on multipath time delay spread:
§ Flat fading: the bandwidth of the signal is less than the coherence
bandwidth of the channel or the delay spread is less than the symblo
period.
§ Frequnecy selective fading: the bandwidth of the signal is greater
than the coherence bandwidth of the channel or the delay spread si
greater than the symbol period
There are two types of fading based on doppler spread:
36
§ Fast Fading: has a high doppler spread and the coherence time is less
than the symbol time and the channel variations are faster than
baseband signal variation
§ Slow Fading: has a low Doppler spread. The coherence time is
greater than the symbol period and the channel variations are slower
than the baseband signal variation
4.4 Multipath Fading
Multipath Fading is simply a term used to describe the multiple paths a radio
wave may follow between transmitter and receiver. Such propagation paths include
the ground wave, ionospheric refraction, reradiation by the ionospheric layers,
reflection from the earth’s surface or from more than one ionospheric layer, and so
on.
Multipath fading occurs when a transmitted signal divides and takes more
than one path to a receiver and some of the signals arrive out of phase, resulting in a
weak or faidng signal. Some transmission losses that effect radio wave propagation
are ionospheric absorption, ground reflection and free space losses. Electromagnetic
interference (EMI) both natural and man made, interfere with radio communications.
The maximum useable frequency (MUF) is the highest frequecy that can be used for
communications between two locations at a given angle of incidence and time of day.
The lowest usable frequency (LUF) is the lowest frequency that can be used for
communications between two locations.
4.5 Multipath Channel Characteristics
Because there are obstacles and reflectors in the wireless propagation
channel, the transmitted signal arrivals at the receiver from various directions over a
37
multiplicity of paths. Such a phenomenon is called multipath. It is an unpredictable
set of reflections and/or direct waves each with its own degree of attenuation and
delay.
Multipath is usually described by: Line-of-sight (LOS): the direct connection
between the transmitter (TX) and the receiver (RX). Non-line-of-sight (NLOS): the
path arriving after reflection from reflectors. The illustration of LOS and NLOS is
shown in Figure 4.1.
Figure 4.1 Effect of multipath on a mobile station.
Characteristics of a Multipath Channel are:
§ Delay spread – this is the interval for which a symbol remains inside
a multipath channel
§ Channel can be modeled as a FIR filter with one line of sight (LOS)
path & several multipaths, the signals from the multipaths being
delayed and attenuated version of the signal from the LOS path
Multipath will cause amplitude and phase fluctuations, and time delay in the
received signals.
38
4.6 Diversity Schemes A diversity scheme is a method that is used to develop information from
several signals transmitted over independent fading paths. This means that the
diversity method requires that a number of transmission paths be available, all
carrying the same message but having independent fading statistics. The mean
signal strengths of the paths should also be approximately the same. The basic
requirement of the independent fading is received signals are uncorrelated.
Therefore, the success of diversity schemes depends on the degree to which the
signals on the different diversity branches are uncorrelated.
Multipath fading may be minimized by practices called spaced diversity and
frequency diversity. In space diversity, two or more receiving antennas are spaced
some distance apart. Fading does not occur at both antennas. Therefore, enough
output is almost always available from one of the antennas to provide a useful signal.
In frequency diversity, two transmitter and two receivers are used, each pair tuned to
a different frequency, with the same information being transmitted simultaneously
over both frequencies. One of the two receivers will almost always produce a useful
signal.
Proper combining the multiple signals will greatly reduce severity of fading
and improve reliability of transmission. Because deep fades seldom occur
simultaneously during the same time intervals on two or more paths. The simplest
combining scheme is selection combining, which is based on the principle o f
selecting the best signal (the largest energy or SNR) among all of the signals
received from different branches.
39
CHAPTER 5
COMMUNICATION CHANNEL MODELING AND SIMULATION 5.1 Additive White Gaussian Noise (AWGN) Channel
In the study of communication systems, the classical (ideal) additive white
Gaussian noise (AWGN) channel, with statistically independent Gaussian noise
samples corrupting data samples free of intersymbol interference (ISI), is the usual
staring point for understanding basic performance relationships. An AWGN channel
adds white Gaussian noise ti the signal that passes through it.
In constructing a mathematical model for the signal at the input of the
receiver, the channel is assumed to corrupt the signal by the addition of white
Gaussian noise as shown in Figure 5.1 below, therefore the transmitted signal, white
Gaussian noise and received signal are expressed by the following equation with s(t),
n(t) and r(t) representing those signals respectively:
)()()( tntstr += (5.1)
Figure 5.1 Received signal corrupted by AWGN
+ s(t) r(t)
n(t)
40
Where n(t) is a sample function of the AWGN process with probability density
function (pdf) and power spectral density as follows:
]/[2
1)( 0 HzWNfnm =F (5.2)
Where N0 is a constant and called the noise power density.
5.1.1 Matlab Implementation
In Matlab, added white Gaussian noise is simulated by using a built- in
function randn, which generates random numbers and matrices whose elements are
normally distributed with mean 0 and variance 1.
AWGN noise is added to the digital modulated signal with in-phase channel
(I-channel) and quadrature-phase (Q-channel) data vectors, idata a n d qdata,
respectively, thus giving the output of I-channel and Q-channel as iout and qout.
)()()(
)()()(
trandntqdatatqout
trandntidatatiout
+=
+=
Matlab code 5.1: AWGN
The above code produced AWGN noise of noise power 1. For the
computation of BER performance, the noise power is varied. Noise power is
defined as a variable, npow and since idata and qdata are voltages, not powers, the
notation of npow is changed from power to voltage. This is defined as attn.
npowattn2
1= (5.3)
41
The code above is revised after it is contaminated by noise with a power of
npow become:
)()()(
)()()(
trandnattntqdatatqout
trandnattntidatatiout
´+=
´+=
Matlab code 5.2: AWGN with variable noise power
The Matlab code above is used for BER performance evaluation under the
ideal communication channel where the attn, idata and qdata are the inputs to set the
noise contaminated signal.
5.2 Rayleigh Fading Channel
Rayleigh fading is a statistical model for the effect of a propagation
environment on a radio signal such as that used by wireless devices. It assumes that
the power of a signal that has passed through such a transmission medium (also
called a communications channels will vary randomly or fade according to a
Rayleigh distributuion – the radial component of the sum of two uncorrelated
Gaussian random variables. It is reasonable model for tropospheric and ionospheric
signal propagation as well as the effect of heavily built up urban environment on
radio signals. Rayleigh fading is most applicable when there is no line of sight
between the transmitter and receiver.
42
Figure 5.2 Principle of multipath channel
As shown in the model above, the path between base station and mobile
stations of terrestrial mobile communications is characterized by various obstacles
and reflections. The radio wave transmitted from the base station radiates in all
directions. These radio waves, including reflected waves that are reflected off of
various objects, diffracted waves, scattering waves, and the direct wave from the
base station to the mobile station. Therefore the path lengths of the direct, reflected,
diffracted, and scattereing waves are different, the time each takes to reach the
mobile station is different. The phase of the incoming wave also varies because of
the reflection. As a result, the receiver receives a superposition consisting of several
waves having different phase and time of arrival. The generic name of a radio wave
in which the time of arrival is retarded in comparison with this direct wave is called
a delayed wave. Then, the reception environment characterized by a superposition
of delayed waves is called multipath propaation environment [1].
In a multipath propagation environment, the received signal is sometimes
weakened or intesified. The signal level of the received wave changes from moment
to moment. Multipath fading raises the error rate of the received data.
43
The delayed wave with incident angle nq is given by the following equation
(5.4) and corresponding to Figure 5.2, when a continuous wave of single frequency
cf (Hz) is transmitted from the base station.
)]2(exp)(Re[)( tfjtetr cnn p= (5.4)
where Re[] indicates the real part of a complex number that gives the
complexenvelope of the incoming wave from the direction of the number n.
Figure 5.3 Delayed wave with incident angle nq
Moreover, j is a complex number. )(ten is given in (5.5) by using
propagation path length from the base station of the incoming waves: )(mLn , the
speed of the mobile station, v (m/s), and the wavelength, l (m).
)()(
)cos(2(exp)()(
tjytx
vtLjtRte
nn
nnn
nn
+=
+-
-= fl
qp
(5.5)
where nR and nf are the envelope and phase of the nth incoming wave.
)(txn and )(tyn are the in-phase and quadrature phase factors of )(ten , respectively.
The incoming nth wave shifts the carrier frequency as lq nv cos (Hz) by the
Doppler effect (Hz). This is called the Doppler shift, which described as df , has a
maximum value of lv , when the incoming wave comes from the running direction
nq
Mobile station
44
of the mobile station in 1cos =nq . Then this maximum is the largest Doppler shift.
The delayed wave that comes from the rear of the mobile station also has a
frequency shift of - df (Hz).
It is shown by (5.4), since received wave )(tr received in the mobile station
is the synthesis of the above-mentioned incoming waves, when the incoming wave
number is made to be N.
å=
=N
nn trtr
1
)()(
( )( )[ ]tftytftx
tfjtftjytx
tfjte
cc
cc
c
N
nn
pp
pp
p
2sin)(2cos)(
2sin2cos)()(Re
)2(exp)(Re1
-=
++=
úû
ùêë
é÷ø
öçè
æ= å
=
(5.6)
where x(t) and y(t) are given by
å
å
=
=
=
=
N
nn
N
nn
tyty
txtx
1
1
)()(
)()(
(5.7)
and x(t) and y(t) are normalized random processes, having an average value
of 0 and dispersion of s , when N is large enough. The combination probability
density p(x,y) is then given by (5.8), where x=x(t), y=y(t)
÷÷ø
öççè
æ +=
2
22
2 2exp
2
1),(
sps
yxyxp (5.8)
In addition, it can be expressed as r(t) using the amplitude and phase of the
received wave.
))(2cos()()( ttftRtr c qp += (5.9)
45
R(t) and )(tq are given by
[ ]xyt
yxRtR1
2
tan)(
)(-==
+==
qq (5.10)
By using a transformation of variables, p(x,y) can be converted into ),( qRp
÷÷ø
öççè
æ-=
2
2
2 2exp
2),(
spsq
RRRp (5.11)
By integrating ),( qRp over q from 0 to 2, the probability density function
)(Rp is obtained (5.12).
÷÷ø
öççè
æ-=
2
2
2 2exp)(
ss
RRRp (5.12)
By integrating ),( qRp overR from 0 to ¥ , the probability density function
)(qp is obtained (5.13).
p2
1)( =Rp (5.13)
From these equations, the envelope fluctuation follows a Rayleigh
distribution, and the phase fluctuation follows a uniform distribution on the fading in
the propagation path.
An expression for simulations of this Rayleigh fading is found. Here, the
mobile station receives the radio wave as shown in Figure 5.2, the arrival angle of
the receiving incoming wave is uniformly distributed, and the wave number of the
incoming waves is N.
)()()( tyjtxtr ×+=
46
( )
å
å
=
=
þýü
îíì
÷÷ø
öççè
æ÷÷ø
öççè
æ+
úúû
ù
êêë
é
++
þýü
îíì
÷÷ø
öççè
æ÷÷ø
öççè
æ
+=
1
1
1 111
1 1111
2cos2cossin
2
2cos1
12cos2cossin
1
2
N
nd
N
ndd
tN
nf
N
n
Nj
tfN
tN
nf
N
n
N
pp
p
pp
pp
(5.14)
where 1N is an odd number and 1N is given by
÷ø
öçè
æ-= 1
22
11
NN (5.15)
In this case, the following relations are satisfied
[ ] [ ]0)]()([
2
1)()(
22
=
==
tytxE
tyEtxE
QI
QI (5.16)
5.2.1 Matlab Implementation The following Matlab code is written based on the equation (5.14):
% fade.m
% generate rayleigh fade
function [iout,qout,ramp,rcos,rsin] = fade (idata,qdata,nsamp,tstp,fd,no,counter,flat)
% Input variables
% idata : input i channel data
% qdata : input q channel data
% nsamp : number of samples to be simulated
% tstp : minimum time resolution
% fd : maximum doppler frequency
% no : number of waves in order to generate fading
47
% counter : fading counter
% flat : flat fading or not
% (1-flat (only amplitude is fluctuated), 0-normal (phase and amplitude
% are fluctuated))
% Output variables
% iout : output i channel data
% qout : output q channel data
% ramp : amplitude contaminated by fading
% rcos : cosine value contaminated by fading
% rsin : sine value contaminated by fading
if fd ~= 0.0
ac0 = sqrt(1.0 ./ (2.0.*(no + 1)));
% power normalized constant (ich)
as0 = sqrt(1.0 ./ (2.0.*(no)));
% power normalized constant (qch)
ic0 = counter;
% fading counter
pai = 3.14159265;
wm = 2.0.*pai.*fd;
n = 4.*no + 2;
ts = tstp;
wmts = wm.*ts;
paino = pai./no;
xc=zeros(1,nsamp);
xs=zeros(1,nsamp);
ic=[1:nsamp]+ic0;
for nn = 1 : no
cwn = cos( cos(2.0.*pai.*nn./n).*ic.*wmts );
xc = xc + cos(paino.*nn).*cwn;
48
xs = xs + sin(paino.*nn).*cwn;
end
cwmt = sqrt(2.0).*cos(ic.*wmts);
xc = (2.0.*xc+cwmt).*ac0;
xs = 2.0.*xs.*as0;
ramp=sqrt(xc.^2+xs.^2);
rcos=xc./ramp;
rsin=xs./ramp;
if flat == 1
iout = sqrt(xc.^2 + xs.^2).*idata(1:nsamp);
% output signal (ich)
qout = sqrt(xc.^2 + xs.^2).*qdata(1:nsamp);
% output signal (qch)
else
iout = xc.*idata(1:nsamp) - xs.*qdata(1:nsamp);
% output signal (ich)
qout = xs.*idata(1:nsamp) + xc.*qdata(1:nsamp);
% output signal (qch)
end
else
iout=idata;
qout=qdata;
end
% end of file
Matlab code 5.3: Subfunction for fading
49
Figure 5.4: Configuration of multipath fading channel
In the multipath propagation environment, the mobile station not only the
direct wave but also delayed waves caused by refelction, diffarction and scattering
that reach the time later tha the direct wave. The model of the relationship between
this direct wave and the delayed wave is shown in Figure 5.4.
It is clear that the amplitude has a Rayleigh distribution and that the phase
has a uniform distribution when the received signal is observed at the arrival time. It
is also clear that there are fixed ratios of the average electric powers of the direct and
delayed waves. Therefore, in simulating multipath fading environment, only the
relative signal level and relative delay time of the delayed waves need to be given in
comparison with the direct wave [1]. The flowchart is shown as follows:
Transmitter
Receiver
1
2
3
4 1
2
3
4
Delayed Waves
Normalized time
Direct Waves
50
Figure 5.5 Flowchart to obtain multipath fading channel
Based on the flowchart, the following Matlab codes are written for the
multipath fading. The first code in this section (Matlab code 5.3) i s the fading
subfunction to shift the input data by the specified delayed time. Matlab code 5.4
performs the entire flowchart above and calls two subfuctions – delay.m (Matlab
code 5.4) and fade.m (Matlab code 5.3) to achieve the multipath fading channel.
% delay.m
% gives delay to input signal
function [iout,qout] = delay (idata,qdata,nsamp,idel)
% Input variables
Shift of input data by delayed time
Fade for the shifted signal by subfunction
For delayed
wave #j
Start j=0
j = the number of
delayed wave
j = j + 1
end
n
y
Output Ich data : iout
Output Qch data: qout
Output data
Input Parameter
Input Ich data : idata Input Qch data : qdata Delayed time : itau Signal power of delayed waves : dlvl Time resolution : tstp Simulation time in one simulation : nsamp Fading counter : itn
51
% idata : input i channel data
% qdata : input q channel data
% nsamp : number of samples to be simulated
% idel : number of samples to be delayed
% Output variables
% iout : output i channel data
% qout : output q channel data
iout = zeros(1,nsamp);
qout = zeros(1,nsamp);
if idel ~= 0
iout(1:idel)=zeros(1,idel);
qout(1:idel)=zeros(1,idel);
end
iout(idel+1:nsamp)=idata(1:nsamp-idel);
qout(idel+1:nsamp)=qdata(1:nsamp-idel);
% end of file
Matlab code 5.4 Generate delayed waves
% sefade.m
% generates frequency selecting fading
function[iout,qout,ramp,rcos,rsin]=sefade(idata,qdata,itau,dlvl,th,n0,itn,n1,nsamp,
tstp,fd,flat)
% Input variables
% idata : input i channel data
% qdata : input q channel data
% itau : delay time for each multipath fading
52
% dlvl : attenuation level for each multipath fading
% th : initialized phase for each multipath fading
% n0 : number of waves in order to generate each multipath fading
% itn : fading counter for each multipath fading
% n1 : number of summation for direct and delayed waves
% nsamp : total number of symbols
% tstp : minimum time resolution
% fd : maximum doppler frequency
% flat : flat fading or not
% (1-flat (only amplitude is fluctuated), 0-normal (phase and amplitude
% are fluctuated))
% Output variables
% iout : output i channel data
% qout : output q channel data
% ramp : amplitude contaminated by fading
% rcos : cosine value contaminated by fading
% rsin : sine value contaminated by fading
iout=zeros(1,nsamp);
qout=zeros(1,nsamp);
total_attn=sum(10.^(-1.0.*dlvl./10.0));
for k = 1 : n1
atts = 10.^( -0.05 .* dlvl(k));
if dlvl (k) == 40.0
atts = 0.0;
end
theta = th(k) .* pi ./ 180.0;
53
[itmp,qtmp]=delay(idata,qdata,nsamp,itau(k));
[itmp3,qtmp3,ramp,rcos,rsin]=fade(itmp,qtmp,nsamp,tstp,fd,n0(k),itn(k),flat);
iout = iout + atts.*itmp3./sqrt(total_attn);
qout = qout + atts.*qtmp3./sqrt(total_attn);
end
% end of file
Matlab code 5.5 Frequency selecting fading
In the above code, the inputs are the time resolution, relative signal levels
and relative delay times of the direct and delayed waves, a complex modulating
signal formed by the transmitter and expressed in an equivalent lowpass system, and
the simulation time for one simulation loop.
The simulation time at one simulation loop and a minimum time resolution
of simulation use sm50 and sm5.0 , respectively. The three delayed waves are
assumed to have mean power of 10 dB, 20 dB and 25 dB smaller than the direct
wave, respectively, and that the relative arrival times were retarded with respect to
the direct wave by 1, 1.5 and 2 sm , respectively. Therefore, the input variable for
the multipath fading simulator is
tstp = 0.5.*10.^(-6);
itau = [0, floor(1.*10.^(-6)/tstp), floor(1.5.*10.^(-6)/tstp), floor(2.*10.^(-
6)/tstp)];
= [0, 2, 3, 4];
dlvl = [0, 10, 20, 25];
nsamp = 50.*10.^(-6)/tstp = 100;
The Frequency selecting fading code begins by delaying the input signal by
using the above input parameters. Next, Rayleigh fading is added to the delayed
signals. Only the number of delayed waves set in the parameter repeats this process.
54
All are added afterwards. As a result, the output signal taken from the multipath
Rayleigh fading is obtained.
A fading counter method is used here for generating an independently fading
delay time. The fading counter gives the start time of fading generation to a fading
generator such as fade.m. Different start times of fading generation must be set to all
direct and delayed waves to simulate an independently distributed Rayleigh fading
environment.
The initial value of the fading counter, itnd, is set during the initial set up
phase for each PSK based transmission scheme. The size of the vector of this fading
counter is equal to the size of the vector that expresses the delay time of the delayed
wave and the size os the vector that shows the relative power level of the delayed
wave.
The fading counter is then updated after each simulation loop by adding a
value, itnd0, corresponding to the simulation time to it. One hundred points are
added after each simulation loop in the case of a minimum time resolution of
sm5.0 and an observation time of sm50 . The added value is called the update time.
The update time could be adjusted to reduce the simulation time. By making the
update time larger than the observation time, the transmission performance under
Rayleigh fading can be evaluated with a small number of simulation loops.
However, the simulation result may not be precise.
CHAPTER 6
QUADRATURE PSK (QPSK) MODELING AND SIMULATION 6.1 QPSK TRANSMISSION SCHEME 6.1.1 Basic Configuration of Quadrature Modulation Scheme A QPSK signal is generated by two BPSK signal. Two orthogonal carrier
signals are used to distinguish the two signals. One is given by tf cp2cos and the
other is given by tf cp2sin . The two carrier signals remain orthogonal in the area of
a period.
02sin2cos0
=´ò tftf c
T
c
c
pp (6.1)
where cT is the period of the carrier signals and c
cT
f1
= .
By using tf cp2cos and tf cp2sin , the QPSK signals can be represented by:
)2sin()(2
1)2cos()(
2
1)( tftdtftdts cQcI pp += (6.2)
A channel in which tf cp2cos is used as a carrier signal is generally called an
in-phase channel, or Ich, and a channel in which tf cp2sin is used as a carrier signal
is generally called quadrature-phase channel, or Qch. Therefore, )(td I and )(tdQ
are the data in Ich and Qch, respectively. Modulation schemes that use Ich and Qch
56
are called quadrature modulation schemes. The basic configuration is shown in
Figure 6.1.
Figure 6.1 Basic configuration of quadrature modulation scheme
In the system shown above, the input digital data, ( )K,2,1: =kdd kk is first
converted into parallel data with two channels, Ich and Qch. The data are
represented as )(td I and )(tdQ . The conversion or data allocation is done using a
mapping circuit block. Then, the data allocated to Ich is filtered using a pulse
shaping filter in Ich. The pulse shaped signal is converted in analog signal by a D/A
converter and multiplied by a tf cp2cos carrier wave. The same process is carried
out on the data allocated to Qch but it is multiplied by a tf cp2sin carrier wave
instead. Then, the Ich and Qch signals are added and transmitted to the air.
Data
Generator
Pulse Shaping
Filter
D/A
Band Pass Filter (BPF)
å )2sin( ttc Ttf
s(t)
r(t)
tf cp2cos
Mapping
Circuit
Pulse Shaping
Filter
D/A
π/2 phase
shifter
Pulse
Compensator
Pulse Shaping
Filter
A/D
Band Pass Filter (BPF)
data
tf cp2cos
Demapping
Circuit
Pulse Shaping
Filter
A/D
π/2 phase
shifter
Pulse
Compensator
Decision Circuit
Decision Circuit
57
At the receiver, the received wave passes through a BPF to eliminate any
sprurious signals. Then, it is downconverted to the baseband by multiplying by the
RF carrier frequency. )](2cos[ 1 ttf c qp + and )](2sin[ 1 ttf c qp + are used for Ich and
Qch respectively, where )(1 tq is the phase noise of the frequency source, the
difference between the frequency sources of the transmitter and receiver. Then, in
both the Ich and Qch channels, the downcoverted signal is digitally sampled by an
A/D converters, and the digital data is fed to a DSPH. In the DSPH, the sampled
data is filtered with pulse shaping filter to eliminate ISI. The signals are then
synchronized and the transmitted digital data is recovered.
6.1.2 Basic Configuration of QPSK Transmission Scheme [1] As mentioned in the previous section, QPSK is basically a type of quadrature
modulation scheme. Its basic operations generally follow the configuration shown
in Figure 6.1 with some blocks specialized for QPSK. These blocks include the
mapping, demapping and pulse shaping functions.
For the mapping function, a simple circuit is used to allocate the data as
illustrated in the following figure. This mapping function basically allocates all
even bits to Ich and all odd bits to Qch. And demapping is just the opposite
operation.
58
Figure 6.2: Mapping circuit function for QPSK
For pulse shaping, the root Nyquist filter is used. The theoretical BER values
with AWGN and one-path Rayleigh fading are shown below:
( )obAWGNQPSK NEerfcBER2
1=- (6.3)
úú
û
ù
êê
ë
é
+-=-
0
11
11
2
1
NE
FADINGQPSK
b
BER (6.4)
In the simulation under the Rayleigh fading environment, it has been
assumed that the frequency rotation is compensated for.
6.2 Matlab Implementation MATLAB code has been written for modulation and demodulation of QPSK.
d0 d1
d2 d3
d4
d5
d(t) Input data
d6 d7 t
0 T 2T 3T 4T 5T 6T 7T 8T
t d0
d2
d4
Ich(t) Ich data
d6
0 2T 4T 6T 8T
t d1
d3 d5
Qch(t) Qch data
d7
0 2T 4T 6T 8T d(t)
Ich data
Qch data
Block Diagram
59
6.2.1 Matlab code QPSK modulation %QPSK modulation
function [iout,qout] = qpskmod(paradata,para,nd,ml)
m2=ml./2;
paradata2=paradata.*2-1;
count2=0;
for jj=1:nd
isi = zeros(para,1);
isq = zeros(para,1);
for ii= 1:m2
isi = isi + 2.^(m2 -ii).* paradata2 ((1:para),ii+count2);
isq = isq + 2.^(m2 - ii).*paradata2((1:para), m2+ii+count2);
end
iout ((1:para),jj) = isi;
qout ((1:para),jj) =isq;
count2=count2+ml;
end
Matlab code 6.1 : QPSK Modulation
60
6.2.2 Matlab code QPSK demodulation %QPSK demodulation
function [demodata] =qpskdemod (idata,qdata,para,nd,ml)
demodata=zeros(para,ml*nd);
demodata((1:para),(1:ml:ml*nd-1))=idata((1:para),(1:nd))>=0;
demodata((1:para),(2:ml:ml*nd))=qdata((1:para),(1:nd))>=0;
Matlab code 6.2 : QPSK Demodulation
CHAPTER 7
ORTHOGONAL FREQUENCY DIVISION MULTIPLEXING (OFDM)
MODELLING AND SIMULATION
7.1 OFDM Configuration using computer simulation
A block diagram of the simulation is shown in Figure 7.1.
Pilot data Serial to
parallel converter
Data generator
Channel coding
Serial to Parallel
converter
Modulation
IFFT Radio
Channel (equivalent
lowpass System)
Power Level
detection
Noise Level
Decision circuit
Gaussian Noise
Generator
Synchronization
+
B A C
para x ml x nd (bit) ml x nd x R
(bit/parallel channel)
para x ml x nd x R
(bit) nd x R
(bit/parallel channel)
62
Figure 7.1 Computer simulations to calculate the BER of an OFDM system
The parameter for the simulation has been defined as follows:
para = 128 ; % Number of parallel channel
fftlen = 128; % FFT length
noc =128; % Number of carrier
nd = 6; %Number of OFDM symbol for one loop
ml = 2; %Modulation level : QPSK
sr = 250000; % Symbol rate
br = sr.*ml; % Bit rate per carrier
gilen = 32; %Length of guard interval
ebn0 = 100; %ebn0 : Eb/No
nloop = 100; % Number of simulation loops
noe = 0; % Number of error data
nod = 0; %Number of transmitted data
As shown in Figure 7.1 and the above parameters, the OFDM system can be
stimulated with 128 subcarriers, a 4-ms symbol time (tstp = 1./sr), and a ¼ tstp
guard interval.
A
B
Fading Compensator 1
Fading Compensator 2
FFT
Demodulator Parallel to serial
converter
Channel decoding
Decision
Compensator
C
BER
ml x nd x R
(bit/parallel channel)
ml x nd x R x para (bit)
para x ml x nd
(bit)
63
After defining all the variables, QPSK is chosen to be modulation techniques
in each channel.
To start the simulation, random serial data of 0 and 1 are generated
consisting of 1-by-para*nd*ml vector. This vector is called as “seridata”.
seridata =rand(1,para*nd*ml)>0.5;
Then, the serial data vector,”seridata” was converted into a parallel data
vector, “paradata”, consistiong of a para-by-nd*ml vector to transmit the data in
parallel in order to enable parallel transmission with 128 subchannels where each
channel was using a QPSK modulation scheme.
paradata = reshape9seridata, para, nd*ml);
Next, the vector “paradata” was fed into the mapping circuit. In the circuit,
the parallel data were converted into modulated parallel data of two channels, Ich
and Qch by a predefined mapping method.
[ich,qch] = qpskmod (paradata, para,nd,ml);
The frame format of the simulation is configured as shown in Figure 7.2.
64
Figure 7.2: Frame format of the simulation model
Then, these data were incrased kmod times to normalize the data as follows:
kmod=1/sqrt(2);
ich1=ich.*kmod;
qch2=qch.*kmod;
After the mapping, these parallel data on the frequency axis were fed into the
IFFT circuit. In this circuit, the parallel data were converted into serial data on the
time axis by using OFDM.
x=ich1+qch1.*I;
y=ifft (x);
ich2 =real (y);
qch2 = imag (y);
The input and output are shown in Figure 7.3. Then ich2 and qch2, guard
interval were inserted to eliminate ISI caused by multipath fading.
Guard Interval
Nd symbols
Frequency (para chann
el)
Information data
65
Figure 7.3: Input and Output of IFFT
At this point, fftlen2 was defined as the length of symbol including the guard
interval. After that the filtered signal was transmitted to the air. The transmitted
signal will passed through the radio channel (equivalent lowpass systems) and was
transmitted to the receiver.
At the receiver, the received signal was first contaminated by AWGN. The
noise function was introduced as a function comb.m. In this simulation, the variable
“attn” will vary in accordance with given Eb/No. Here, “spow” refers to the signal
power per carrier per symbol. For the OFDM system, “spow” had to be divided by
“para” which indicates the number of parallel subcarriers.
spow = sum(ich3.^qch3./nd./para;
attn = 0.5*spow*sr/br*10.^9-ebn0/10);
attn =sqrt(attn);
By using “attn” and comb.m, the transmitted data was contaminated by
AWGN.
[ich4,qch4] = comb (ich3,qch3,length(ich3), attn);
1 2 3 60 61 IFFT 62 124 125 126 127
Frequency
domain input
Time domain
output
66
Then, the guard interval was removed from received signal ich4 and qch4.
[ich5,qch5] = girem(ich4,qch4, fftlen2, gilen,nd);
These data, “ich5” and “qch5” on the time axis were fed into the FFT circuit.
In this circuit, the serial data were converted into parallel data on the frequency axis.
rx = ich5+qch5.8i;
ry = fft (rx);
ich6 = real (ry);
qch6 =imag(ry);
The converted data were divided by “kmod” in each channel to unnormalize
the data and were fed into the demodulation function.
ich7 = ich6./kmod;
qch7 = qch6./kmod;
[demodata] =qpskdemod(ich7,qch7,para,nd,ml);
After that, the demodulated data were converted into a 1-by-para*nd*ml
vector. The data were called “demodata1”.
demodata =reshape(demodata,1,para*nd*ml);
Since, in this project, we need to obtain the BER under different
communication channels. Therefore, the number of errors should be calculated. In
this simulation, the transmitted data are referred ti as ‘seridata” and the received data
are referred to as “demodata1”. The calculation will be performed as follows:
%instantaneous number of errors and data bits
noe2 = sum(abs(seridata-demodata1);
nod2 = length(seridata);
%cumulative number of errors and data bits in noe and nod
67
noe = noe +noe2;
nod=nod+nod2;
Then, BER under different communication channel can be obtained using the
following operation:
ber = noe/nod;
Then, for BER performance under one path flat Rayleigh, we need to
determine the fading parameters and the parameters to generate fading.
%Generated data are fed into a fading simulator
[ifade,qfade]=sefade(ich3,qch3,itau,dlv1,th1,n0,itnd1,now1,
length(ich3),tstp,fd,flat);
%Update fading counter
Itnd1 =itnd1 + itnd0
All the matlab codes for OFDM under AWGN and Rayleigh fading can be
referred at the Appendix.
CHAPTER 8
RESULTS AND DISCUSSION
8.1 OFDM under AWGN channel
Under this condition, the BER performance of OFDM under AWGN
channels are simulate two times. One for theoretically and another is with matlab
code simulation.
8.1.1 OFDM under AWGN channel (theory)
OFDM has been simulated under AWGN channel which is known as the
ideal communication channel. Below is the result of the theoretical AWGN. The
BER vs Eb/No graph is plotted.
69
Figure 8.1: Theoritical AWGN 8.1.2 OFDM under AWGN channel after matlab simulation
The BER vs Eb/No graph below shown that the result of OFDM under
AWGN channel after the simulation.
70
Figure 8.2: AWGN after matlab simulation
8.1.3 Comparison OFDM under AWGN channel theory and simulation
71
Figure 8.3: Comparison between AWGN theory and simulation
Discussion:
The result shown that AWGN under simulation gives 0.9691 db shifts from
the theoretical value. This shift was caused by the cutting off of the guard interval
power from the received signal. It can be calculated as follows:
shift value(dB) = -10log 10(gilen/fftlen2)
8.2 OFDM under one path Rayleigh fading
8.2.1 OFDM under one path Rayleigh fading (Theory)
Graph below shows the result of OFDM one path Rayleigh fading
theoretically.
72
Figure 8.4: OFDM under one path Rayleigh (Theory)
8.2.2 OFDM under one path Rayleigh after simulation
After designing and running the matlab code, the BER vs Eb/No graph can
be obtained under one path Rayleigh.
73
Figure 8.5: OFDM under one path Rayleigh after simulation
8.2.3 Comparison between theory and simulation (OFDM under one
path Rayleigh)
Figure 8.6 shows the result after simulation when comparing between theory
and simulation.
74
Figure 8.6: Comparison OFDM under one path Rayleigh between theory and
simulation
Discussion:
From the BER performance under one path Rayleigh fading, it shows that if we can
compensate for the amplitude and phase fluctuations caused by fading perfectly,
0.9691 dB shifted can be obtained from the theoretical value.
8.3 Comparison OFDM under two different channels: AWGN and One Path
Rayleigh Fading
After simulating all the matlab code individually, now is the time to make
the comparison OFDM under two different channels, AWGN and One path
75
Rayleigh Fading. Figure 8.7 shows the performance for both communication
channels.
Figure 8.7: OFDM Comparison between AWGN and One Path Rayleigh
Discussion:
From the graph, it shows that AWGN communication channel gives the best
and ideal performance as compared to Rayleigh fading. In other words, Rayleigh
fading is the worst communications model in wireless communications.
76
8.4 Summary of Results
§ OFDM BER performance for AWGN simulation is differed from the
AWGN theory with 0.9691 dB shift.
§ OFDM BER performance for one path Rayleigh simulation also
gives 0.9691dB shift as compared to theoritcal value.
§ OFDM BER performance for the AWGN communication channels is
the ideal communication channel model
§ OFDM BER performance for one path Rayleigh is the worst
communication channel model in wireless communication
CHAPTER 9
CONCLUSIONS AND FURTHER WORK
This thesis has outlined all the work done on studying the BER performance
of Orthogonal Frequency Division Multiplexing (OFDM) under two different types
of communication channels in wireless communications.
In order to achieve the objectives of this thesis, first, the concept of
Orthogonal Frequency Division Multiplexing (OFDM) is studied. Then,
communication channel models for ideal (AWGN) and worst case (multipath
fading) channels were studied. AWGN is fairly simple to implement in Matlab
using its built- in function. A simplified version of the multipath fading channel is
derived from a complex theoretical mathematical model i s found. This model is
then implemented in Matlab to simulate multipath fading channel. The digital
modulations are studied and the best modulation that suite with OFDM technology
is selected.
After selecting the entire main component in OFDM, the Matlab codes are
written respectively. Once, the programs are written, they are simulated and verified
by obtaining instantaneous waveforms of the transmission scheme. The output is
compared against the theoretical models and equations. The computer simulation
programs were established to behave as expected.
78
Lastly, a comparison study is carried out to obtain the BER performance for
Orthogonal Frequency Division Multiplexing (OFDM) under different types of
communications channel. The ideal and the worst communication are defined.
9.1 Positive Conclusion All the simulation as well as the project itself runs smoothly. All the
expected results are obtained. From the results, it’s showed that the OFDM BER
performance under AWGN channel gives 0.9691 db shift. The shift of the value was
caused by guard interval power for the received signals. The OFDM BER
performance for one path Rayleigh fading also gives 0.9691dB shift. This value can
be obtained if the amplitude and phase fluctuations caused by fading can be
compensated perfectly. Lastly, from the simulations, AWGN communications
channels give the best/ ideal communication as compared to one path Rayleigh
fading.
9.2 Further improvement for this Project
I would like to simulate up to higher N-path fading channel level to identify
at which N does the BER performance is no longer lowered and what is the lowest
(i.e. the best) BER performance that it would give. Besides that, I would like to
simulate under different digital modulations to identify the best modulation scheme
that can be used in OFDM.
79
9.3 Future research
Further study on wireless LAN that using OFDM as the platform. More
research can be carried out on realizing the application of OFDM in the future
wireless communications.
9.4 Final Note In this project, I have been exposed to the wireless communications worlds.
This project has increased my understanding on OFDM and the most important
thing MATLAB software. I have learned a lot and achieved the objectives of the
project. I hope this will be my stepping stone to embark in the R&D for the wireless
technologies.
80
REFERENCES
1. Hiroshima Harada, Ramjee Prasad, Simulation and Software Radio for Mobile
Communication, Artech House, 165-226, 2002
2. Ahmad R.S Bahai, Burion R.Saltzberg, Multi-Carrier Digital Communication
Theory and Applications of OFDM, Kluwer Academic/Plenum Publishing NY,
1999
3. http://www.wi- lan.com
4. B.P.Lathi, Modern Digital and Analog Communication Systems, 3rd Edition,
New York Oxford : Oxford University Press, 1998
5. Leon W.Couch II, Digital and Analog Communication Systems, 6 th Edition,
Prentice Hall, 2001
6. http://www.ert.rwth-aachen.de/Projekte/Theo/OFDM/www_ofdm.html
7. Jakes, W.C., Microwave Mobile Communications, NewYork:IEEE Press, 1994
8. Richard Van Nee, Ramjee Prasad, OFDM for Wireless Multimedia
Communications, Norwood, MA:Artech House, 2000
9. Juha Heiskala, John Terry, OFDM Wireless LANs : A Theoretical and Practical
Guide, Sams, 2001
10. http://en.wikipedia.org/wiki/Orthogonal_frequency-division_multiplexing
11. http://www.skydsp.com/publications/4thyrthesis/index.htm
81
APPENDIX A
TIMELINE FOR PROJECT 1
Task W1 W2 W3 W4 W5 W6 W7 W8 W9 W10 W11 W12 W13 W14 W15
Project proposal
First Project
Summary
Literature review
Research on
parallel scheme
transmission
Research on
OFDM
Research on
communication
channels
Research on BER
performance
Discussion with
supervisor
Matlab installation
Learning Matlab
Presentation draft
Presentation slide
preparation
82
Presentation
Report Writing
83
APPENDIX B
TIMELINE FOR PROJECT 2
Task W1 W2 W3 W4 W5 W6 W7 W8 W9 W10 W11 W12 W13 W14 W15
Model and
Simulate OFDM
tranmission
Model and
simulate OFDM
Receiver
Model and
simulate OFDM
under AWGN
channel
Model and
simulate OFDM
under one path
Rayleigh
Simulate OFDM
under AWGN
between theory
and simulation
Simulate OFDM
under one path
Rayleigh between
theory and
simulation
84
Simulate and
comparing OFDM
under AWGN and
one path Rayleigh
Presentation slide
preparation
Presentation
Thesis Writing
85
APPENDIX C
MATLAB CODES FOR OFDM UNDER AWGN COMMUNICATION
CHANNEL
% OFDM under AWGN channels
% Simulation program to realize OFDM transmission system
%************************preparation part********************
para=128; %Number of paralle channel to transmit
fftlen = 128; %FFT length
noc=128; %Number of carrier
nd=6; %Number of information OFDM symbol for one loop
ml=2; %Modulation level:QPSK
sr=250000; %Symbol rate
br=sr.*ml; %Bit rate per carrier
gilen =32; %Length of guar interval (points)
ebn0=3; %Eb/No
%***********************main loop part*******************
nloop=100; %Number of simulation loops
noe=0; %Number of error data
nod = 0; %Number of transmitted data
eop=0; %Number of error packet
86
nop=0; %Number of transmitted packet
for iii=1:nloop
%*********************transmitter******************
%*********************data generation **************
seldata=rand(1,para*nd*ml)>0.5; %rand:built in function
%*************Serial to parallel conversion****************
paradata =reshape(seldata,para,nd*ml); %reshape: built in function
%****************QPSK Modulation ***********************
[ich,qch]=qpskmod(paradata, para, nd,ml);
kmod = 1/sqrt(2); %sqrt: built in fucntion
ich1 = ich.*kmod;
qch1 = qch.*kmod;
%*******************IFFT****************************
x = ich1 +qch1.*i;
y = ifft (x); %ifft: built in function
ich2 = real (y); %real:built in function
qch2 = imag (y); %imag:built in function
%*******************Guard Interval Insertion****************
[ich3,qch3]= giins(ich2,qch2,fftlen,gilen,nd);
fftlen2 = fftlen +gilen;
%****************Attenuation Calculation******************
87
spow = sum (ich3.^2+qch3.^2)/nd./para; %sum:built in function
attn = 0.5*spow*sr/br*10.^(-ebn0/10);
attn = sqrt(attn);
%************************Receiver**********************
%**************AWGN addition*****************************
[ich4, qch4] = comb(ich3, qch3,attn);
%********************Guard Interval Removal*************
[ich5,qch5] = girem (ich4,qch4, fftlen2, gilen, nd);
%********************FFT********************************
rx = ich5+qch5.*i;
ry = fft (rx); %fft:built in function
ich6 = real (ry); %real:built in function
qch6 = imag (ry); %imag:built in function
%*********************demodulation*******************
ich7 = ich6./kmod;
qch7 = qch6./kmod;
[demodata]=qpskdemod(ich7,qch7,para, nd,ml);
%*****************parallel to serial conversion***************
demodata1 = reshape(demodata, 1,para*nd*ml);
%*************** Bit Error Rate (BER) *******************
88
%instantaneous number of error and data
noe2=sum (abs(demodata1-seldata));
nod2 = length(seldata);
%cumulative the number of error and data in noe and nod
noe = noe+noe2;
nod = nod +nod2;
%*************Output Result******************
ber=noe/nod;
fprintf('%f\t%e\t%d\t\n',ebn0,ber,nloop);
fid = fopen('BERofdm.dat','a');
fprintf (fid,'%f\t%e\t%d\t\n',ebn0,ber,nloop);
fclose (fid);
end
89
APPENDIX D
MATLAB CODES FOR OFDM UNDER ONE PATH RAYLEIGH FADING
% Program one path Rayleigh fading
% Simulation program to realize OFDM tranmission system (under one path
% fading)
%*******************Preparation part*******************************
para =128; %Number of parallel channel to transmit
fftlen = 128; %FFT length
noc =128; %Number of carrier
nd=6; %number of information OFDM symbol for one loop
ml =2; %Modulation level:QPSK
sr=250000; %Symbol rate
br=sr.*ml; %bit rate per carrier
gilen =32; %Length of guard interval (points)
%ebn0=50; %Eb/No
%********************Fading initialization***************************
%If you use fading function "sefade", you can intialize all of the
%parameters
%Otherwise you can comment out the following intialization
90
tstp = 1/sr/(fftlen+gilen); %time resolution
%Arrival time for each multipath normalized by tstp
%If you would like to simulate under one path fading model, you have only
%to set direct wave
itau = [0];
%Mean power for each multipath normalized by direct wave
%If you would like to simulate under one path fading model, you have only
%to set direct wave
dlvl = [0];
%Number of waves to generate fading for each muiltpath
%In normal caes, more than six waves are needed to generate Rayleigh Fading
n0 =[6];
%Initial phase of delayed wave
%In this simulation one-path Rayleigh fading is considered
th1 = [0.0];
%Number of fading counter to skip
itnd0 = nd*(fftlen+gilen)*10;
%Initial value of fading counter
%In this simulation one path Rayleigh fading is considered
%Therefore one fading counter is needed
itnd1 = [1000];
91
%Number of direct wave + Number of delayed wave
%In this simulation one path Rayleigh fading is considered
now1=1;
%Maximum Doppler frequency (Hz)
%You can insert your favourite value
fd=320;
%You can decide two modes to simulate fading by changing the variable flat
%flat : flat fading or not
%(1-flat(only amplitude is fluctuated), 0-normal(phase and amplitude are
%fluctuated)
flat=1;
%*******************main loop part***************************
nloop=500; %Number of simulation loops
noe = 0; %number of error data
nod =0; %Number of transmitted data
eop = 0; %Number of error packet
nop =0; %Number of transmitted packet
for iii=1:nloop;
%*******************transmitter********************************
%******************** Data generation **************************
seldata = rand(1,para*nd*ml)>0.5; %rand:built in function
%*********************Serial to parallel conversion**************
92
paradata=reshape(seldata, para, nd*ml); %reshape:built in function
%*****************QPSK Modulation************************
[ich, qch] = qpskmod(paradata, para, nd,ml);
kmod = 1/sqrt(2); %sqrt:built in function
ich1=ich.*kmod;
qch1=qch.*kmod;
%**************IFFT***********************************
x=ich1+qch1.*i;
y=ifft(x); %IFFT:built in function
ich2 = real(y); %real:built in function
qch2 = imag(y); %imag:built in function
%************************Guard Interval Insertion***************
[ich3,qch3]=giins(ich2,qch2,fftlen, gilen, nd);
fftlen2 = fftlen +gilen;
%************************Attenuation Calculation***************
spow=sum(ich3.^2+qch3.^2)/nd./para;
attn=0.5*spow*sr/br*10.^(-ebn0/10);
attn=sqrt(attn);
%*****************Fading Channel****************************
%Generated data are fed into a fading simulator
93
[ifade,qfade]=sefade(ich3,qch3,itau,dlvl,th1,n0,itnd1,now1, length(ich3), tstp,fd,
flat);
%Update fading counter
itnd1=itnd1+itnd0;
%****************Receiver***************************
%*******************AWGN addition************************
[ich4,qch4]=comb(ifade,qfade,attn);
%*****************Guard Interval Removal************************
[ich5,qch5] =girem(ich4, qch4, fftlen2, gilen, nd);
%********************FFT*************************************
rx=ich5+qch5.*i;
ry=fft(rx); %fft:built in function
ich6=real(ry); %real:built in function
qch6=imag (ry); %imag:built in function
%************************demodulation******************************
ich7=ich6./kmod;
qch7= qch6./kmod;
[demodata] =qpskdemod(ich7,qch7, para,nd,ml);
%*******************Parallel to Serial COnversion ********************
demodata1=reshape(demodata,1,para*nd*ml);
94
%**************************Bit Error Rate****************************
%instantaneous number of error and data
noe2 = sum (abs(demodata1-seldata)); %sum:built in function
nod2 = length(seldata); %length: built in function
%cumulative the number of error and data is noe and nod
noe = noe+noe2;
nod = nod+nod2;
%***********************Output Result**************************
ber=noe/nod;
fprintf('%f\t%e\t%e\t\n', ebn0,ber,nloop);
fid =fopen('BERofdmfad.dat','a');
fprintf(fid,'%f\t%e\t%e\t\n', ebn0,ber, nloop);
fclose(fid);
end
95
APPENDIX E
MATLAB CODES TO PLOT OFDM BER PERFORMANCE UNDER AWGN
CHANNEL
%Program to plot OFDM under AWGN channel
i=1
for ebn0=0:2:20
ber(i)=ofdm_awgn(ebn0)
i=i+1
end
ebn0=[0:2:20];
semilogy(ebn0,ber,'b+-');
legend('BER');
xlabel ('E_b/N_0'); ylabel ('BER');
grid on;
96
%Program to plot OFDM under AWGN (theory and simulation) bert=zeros(1,31); for ebn0=0:10 bert(1,ebn0+1)=erfc(sqrt(10^(ebn0/10)))/2; end for ebn0=0:30 bera(1,ebn0+1)=ofdm_awgn(ebn0); ebn1(1,ebn0+1)=ebn0; end semilogy(ebn1,bert,'-k'); hold on; semilogy(ebn1,bera,'-mo'); hold on; title('BER vs E_b/N_0'); legend('AWGN THEORY', 'AWGN '); xlabel ('E_b/N_0'); ylabel ('BER'); grid on;
97
APPENDIX F
MATLAB CODE TO PLOT OFDM UNDER ONE PATH RAYLEIGH
%Program to plot OFDM under one path Rayleigh
i=1
for ebn0=0:5:50
ber(i)=ofdm_fading(ebn0)
i=i+1
end
ebn0=[0:5:50];
semilogy(ebn0,ber,'b+-');
legend('1 path Rayleigh');
Title ('BER vs E_b/N_0');
xlabel ('E_b/N_0'); ylabel ('BER');
grid on;
98
%Program to plot OFDM under one path Rayleigh theory and simulation
for ebn0=0:30
berfad1t(1,ebn0+1)=0.5*(1-(1/sqrt(1+(1/(10^(ebn0/10))))));
berfad1s(1,ebn0+1)=ofdm_fading(ebn0);
ebn1(1,ebn0+1)=ebn0;
end
semilogy(ebn1,berfad1t,'-k');
hold on;
semilogy(ebn1,berfad1s,'-go');
hold on;
legend('1 path Rayleigh theory', '1 path Rayleigh');
title ('BER vs E_b/N_0');
xlabel ('E_b/N_0 (dB)'); ylabel ('BER');
grid on;
99
APPENDIX G
MATLAB CODE FOR SUBFUNCTION
% Function to generate awgn % comb.m function [iout,qout] = comb (idata,qdata,attn) % variables % idata : input i channel data % qdata : input q channel data % iout : output i channel data % qout : output q channel data % attn : attenuation level caused by Eb/No or C/N iout = randn(1, length(idata)).*attn; qout = randn(1, length(qdata)).*attn; iout = iout + idata(1:length(idata)); qout = qout + qdata(1:length(qdata));
100
%Function to insert guard interval into transmission signal %giins.m function [iout, qout]=giins(idata,qdata,fftlen, gilen,nd); %*********************Variables******************************* %idata: Input Ich data %qdata: Input Qch data %iout: Output Ich data %qout: Output Qch data %fftlen : Length of FFT(points) %gilen : Length of guard interval(points) %*************************************************************** idata1 = reshape(idata,fftlen, nd); qdata1 = reshape(qdata,fftlen, nd); idata2 = [idata1(fftlen-gilen+1:fftlen,:); idata1]; qdata2 = [qdata1(fftlen-gilen+1:fftlen,:); qdata1]; iout = reshape (idata2,1, (fftlen+gilen)*nd); qout = reshape (qdata2,1, (fftlen+gilen)*nd);
101
%Function to remove guard interval from received signal %girem.m function [iout,qout] = girem(idata,qdata, fftlen2,gilen, nd); %**************************Variables************************** %idata : Input Ich data %qdata : Input Qch data %iout : Output Ich data %qout : Output Qch data %fftlen2 : Length of FFT (points) %gilen : Length of guard interval (points) %nd : Number of OFDM symbols %************************************************************ idata2=reshape (idata,fftlen2,nd); qdata2=reshape (qdata, fftlen2, nd); iout = idata2 (gilen+1:fftlen2,:); qout = qdata2 (gilen+1:fftlen2,:);