bit and packet error rates in rayleigh channel with...

121
B IT AND PACKET ERROR RATES IN R AYLEIGH CHANNEL WITH AND WITHOUT DIVERSITY Aalborg University Institute of Electronic Systems Department of Communication Technology Mobile Communications Project Group 896 The 8 th Semester

Upload: trinhliem

Post on 22-Mar-2019

232 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

BIT AND PACKET ERROR RATESIN RAYLEIGH CHANNEL WITH AND WITHOUT DIVERSITY

Aalborg UniversityInstitute of Electronic Systems

Department of Communication Technology

Mobile Communications Project Group 896The 8th Semester

Page 2: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 3: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

AALBORG UNIVERSITYINSTITUTE OF ELECTRONIC SYSTEMSDEPARTMENT OF COMMUNICATION TECHNOLOGY

Fredrik Bajersvej 7 DK-9220 Aalborg East Phone 96 35 80 80

Title: Bit and packet error rates in Rayleigh fading channels withand without diversity

Project period: The 8th Semester, February 2003 to June 2003Project group: Mobile Communcations Group 896

Participant:Huan, Nguyen CongTung, Nguyen ThanhDuc, Nguyen Tien

Supervisors:Shyam S. ChakrabortyPersefoni Kyritsi

AbstractIn this project, we simulate the Binary Phase ShiftKeying (BPSK) modulation scheme operating underboth Additive White Gaussian Noise (AWGN) andRayleigh at fading channel. We also simulate diver-sity techniques, namely Selection Combining (SC),Equal Gain Combining (EGC) and Maximal RatioCombining (MRC), which are widely-used to mitigatethe fading eect of the channel. The analysis isperformed by means of the Bit Error Rate (BER)and Packet Error Rate (PER) obtained during oursimulation.

The objectives of the project are (a) to study theeects of the Rayleigh at fading channel to systemperformance, (b) to understand the benets of theusage of various diversity techniques in combatingfading, and (c) to investigate the inuence of thepacket length on the performance of packet-basedcommunication system.

Publications: 8Number of pages: 93Finished: the 2nd of June 2003

This report must not be published or reproduced without permission from the project groupCopyright c© 2003, Project group Mob896, Aalborg University

Page 4: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 5: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

PrefaceThis report is written during the project period of the 8th semester at the Departmentof Communication Technology, Institute of Electronic Systems, Aalborg University.

Report Structure

The report documents the analysis, implementation, results and conclusions of ourproject. Its content is, therefore, divided into 4 parts:

• Chapter 1: Introduction

• Chapter 2: Project analysis

• Chapter 3: Implementation and results analysis

• Chapter 4: Conclusions and further work

Acknowledgements

We would like to express our special thanks to our supervisors, Shyam S. Chakrabortyand Persefoni Kyritsi, for their thorough assistance and guidance during this project.We would also like to thank members of Group 895 for sharing their knowledge andconstructive comments during this semester.

Nguyen Cong Huan Nguyen Tien Duc

Nguyen Thanh Tung

i

Page 6: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 7: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Contents

1 Introduction 11.1 Background of the project . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Additive White Gaussian Noise channel . . . . . . . . . . . . . . . 11.1.2 Rayleigh at fading channel . . . . . . . . . . . . . . . . . . . . . 31.1.3 Combating technique: Diversity . . . . . . . . . . . . . . . . . . . 131.1.4 Modulation scheme . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.2 Scope and objectives of the project . . . . . . . . . . . . . . . . . . . . . 201.2.1 Scope of project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201.2.2 Objectives of project . . . . . . . . . . . . . . . . . . . . . . . . . 21

2 Project analysis 232.1 Simulation block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2 Data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.3 Packetizing and depacketizing modules . . . . . . . . . . . . . . . . . . . 272.4 The discrete-time baseband BPSK modulator . . . . . . . . . . . . . . . 28

2.4.1 Baseband representation of BPSK signal . . . . . . . . . . . . . . 282.4.2 Discrete-time baseband BPSK signal . . . . . . . . . . . . . . . . 30

2.5 The discrete-time baseband AWGN channel . . . . . . . . . . . . . . . . 312.5.1 Baseband model of AWGN channel . . . . . . . . . . . . . . . . . 312.5.2 Discrete-time baseband AWGN channel . . . . . . . . . . . . . . . 32

2.6 The discrete-time Rayleigh at fading simulator . . . . . . . . . . . . . . 342.6.1 The Fourier Transform Method Simulator . . . . . . . . . . . . . 352.6.2 The Markov Process Method Simulator . . . . . . . . . . . . . . . 37

2.7 BPSK Demodulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392.7.1 Development of MAP decision rule . . . . . . . . . . . . . . . . . 412.7.2 Demodulation in the Rayleigh at fading channel . . . . . . . . . 432.7.3 Probability of bit error for AWGN and Rayleigh channels . . . . . 442.7.4 Probability of packet error for AWGN channel . . . . . . . . . . . 46

2.8 Diversity module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472.8.1 Selection Combining Module . . . . . . . . . . . . . . . . . . . . . 482.8.2 Equal Gain Combining Module . . . . . . . . . . . . . . . . . . . 492.8.3 Maximal Ratio Combining Module . . . . . . . . . . . . . . . . . 49

2.9 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

iii

Page 8: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

iv CONTENTS

3 Implementation and result analysis 533.1 Implementation of project . . . . . . . . . . . . . . . . . . . . . . . . . . 53

3.1.1 Simulation parameters . . . . . . . . . . . . . . . . . . . . . . . . 553.1.2 Verication of Rayleigh at fading simulators . . . . . . . . . . . 57

3.2 Analysis of simulation results . . . . . . . . . . . . . . . . . . . . . . . . 623.2.1 AWGN vs. Rayleigh channel . . . . . . . . . . . . . . . . . . . . . 623.2.2 Benets of diversity techniques . . . . . . . . . . . . . . . . . . . 643.2.3 The eects of packet length . . . . . . . . . . . . . . . . . . . . . 673.2.4 Eects of the mobile receiver velocity . . . . . . . . . . . . . . . . 703.2.5 Comparison of selection schemes . . . . . . . . . . . . . . . . . . . 73

3.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

4 Conclusions and future work 774.1 Summary of project work . . . . . . . . . . . . . . . . . . . . . . . . . . 774.2 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784.3 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Bibliography 80

A List of symbols 83

B List of acronyms 87

C Baseband & passband representation of signal & system 89C.1 Baseband and passband translation of signal . . . . . . . . . . . . . . . . 89C.2 Baseband and passband representation of system . . . . . . . . . . . . . 92

D Flowcharts of simulation functions 93

Page 9: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

List of Figures

1.1 Passband representation of AWGN channel . . . . . . . . . . . . . . . . . 21.2 The wideband white noise: (a) The PSD, and (b) The ACF . . . . . . . 21.3 The ACF & PSD functions of the passband noise [17]. . . . . . . . . . . . 31.4 Types of small-scale fading channels [12]. . . . . . . . . . . . . . . . . . . 41.5 A typical plane wave incident on a MS receiver [6] . . . . . . . . . . . . . 61.6 The equivalent baseband representation of the Clarke model of the

Rayleigh at fading channel . . . . . . . . . . . . . . . . . . . . . . . . . 81.7 The ACF of the complex gain of the radio channel . . . . . . . . . . . . . 101.8 An example of Doppler power spectrum . . . . . . . . . . . . . . . . . . . 101.9 The PDF of the envelope of the complex gain of radio channel . . . . . . 111.10 An example of time evolution of the envelope of the complex gain . . . . 121.11 Diversity combining methods: (a) Selection combining, (b) maximal ratio

combining (ak = sk/No), and (c) equal gain combining [10] . . . . . . . . 161.12 An example of BPSK signal . . . . . . . . . . . . . . . . . . . . . . . . . 181.13 BPSK modulation scheme [5] . . . . . . . . . . . . . . . . . . . . . . . . 191.14 BPSK demodulation scheme [5] . . . . . . . . . . . . . . . . . . . . . . . 20

2.1 Schematic representation of the implementation of the MC procedure [8] 232.2 Block diagram for simulation . . . . . . . . . . . . . . . . . . . . . . . . . 242.3 An example format of a packet . . . . . . . . . . . . . . . . . . . . . . . 272.4 The representation of baseband BPSK signal in complex plane . . . . . . 292.5 The ACF & PSD functions of the baseband noise [17] . . . . . . . . . . . 322.6 The ACF & PSD functions of discrete-time complex noise [17] . . . . . . 332.7 The discrete-time baseband equivalent of the AWGN channel . . . . . . . 342.8 The Rayleigh at fading channel simulator with shaping lter [15] . . . . 352.9 Received signal in complex plane . . . . . . . . . . . . . . . . . . . . . . 392.10 Block diagram of the BPSK demodulator . . . . . . . . . . . . . . . . . . 402.11 The eect of the phase of the complex gain on received signal . . . . . . 432.12 Probability density function of decision variable ξ under H0 and H1 . . . 452.13 The probability of error in Binary Symmetric Channel . . . . . . . . . . 462.14 BPSK demodulator with diversity techniques . . . . . . . . . . . . . . . . 47

3.1 The owchart for simulation . . . . . . . . . . . . . . . . . . . . . . . . . 543.2 The envelopes of the complex gains . . . . . . . . . . . . . . . . . . . . . 593.3 The PDFs and CDFs of the envelopes of the complex gains . . . . . . . . 593.4 The PDFs and CDFs of the phases of the complex gains . . . . . . . . . . 60

v

Page 10: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

vi LIST OF FIGURES

3.5 The PSDs of the complex gains . . . . . . . . . . . . . . . . . . . . . . . 603.6 The ACFs of the complex gains . . . . . . . . . . . . . . . . . . . . . . . 613.7 The CCF of two complex gains generated by FTM . . . . . . . . . . . . 613.8 The BER plot for AWGN and Rayleigh channels . . . . . . . . . . . . . . 633.9 The PER plot for AWGN and Rayleigh channels . . . . . . . . . . . . . . 643.10 The BER plot for diversity techniques (Nb = 2) . . . . . . . . . . . . . . 653.11 The PER plot for diversity techniques (Nb = 2) . . . . . . . . . . . . . . 653.12 The BER plot for diversity techniques (Nb = 3) . . . . . . . . . . . . . . 663.13 The eect of packet length on AWGN and Rayleigh channel . . . . . . . 673.14 The eect of packet length on SC diversity technique . . . . . . . . . . . 683.15 The eect of packet length on MRC diversity technique . . . . . . . . . . 693.16 The eect of packet length on the PER of SC, EGC and MRC . . . . . . 703.17 The eect of velocity on the Rayleigh channel . . . . . . . . . . . . . . . 713.18 The eect of velocity on the SC diversity technique . . . . . . . . . . . . 713.19 The eect of velocity on the EGC diversity technique . . . . . . . . . . . 723.20 The eect of velocity on the MRC diversity technique . . . . . . . . . . . 723.21 The eect of selection schemes on the SC diversity technique . . . . . . . 743.22 The eect of selection schemes on the MRC diversity technique . . . . . . 74

C.1 Dierent denition of signal bandwidth [3] . . . . . . . . . . . . . . . . . 90C.2 Transformation between baseband and passband presentation of signal [3] 91

D.1 The m-sequence generator . . . . . . . . . . . . . . . . . . . . . . . . . . 94D.2 The BPSK modulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95D.3 The AWGN channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96D.4 The Rayleigh simulator using MPM . . . . . . . . . . . . . . . . . . . . 97D.5 The Rayleigh simulator using MPM (cont.) . . . . . . . . . . . . . . . . . 98D.6 The Rayleigh simulator using FTM . . . . . . . . . . . . . . . . . . . . . 99D.7 The Rayleigh simulator using FTM (cont.) . . . . . . . . . . . . . . . . . 100D.8 The implementation of linear interpolation method . . . . . . . . . . . . 101D.9 The implementation of FFT-interpolation method . . . . . . . . . . . . . 102D.10 The SC diversity module . . . . . . . . . . . . . . . . . . . . . . . . . . . 103D.11 The SC diversity module (cont.) . . . . . . . . . . . . . . . . . . . . . . . 104D.12 The EGC diversity module . . . . . . . . . . . . . . . . . . . . . . . . . . 105D.13 The MRC diversity module . . . . . . . . . . . . . . . . . . . . . . . . . 106D.14 The MRC diversity module (cont.) . . . . . . . . . . . . . . . . . . . . . 107D.15 The BPSK demodulator . . . . . . . . . . . . . . . . . . . . . . . . . . . 108D.16 The PER module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Page 11: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

List of Tables

3.1 Simulation parameters and their values . . . . . . . . . . . . . . . . . . . 573.2 Parameters for testing Rayleigh simulators . . . . . . . . . . . . . . . . . 583.3 Times associated with Rayleigh simulation methods . . . . . . . . . . . . 62

vii

Page 12: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 13: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Chapter

1Introduction

1.1 Background of the project

In order to design a robust and highly-eective mobile communication system, engineersmust understand the characteristics of the radio channel in which their system is going tooperate. Such knowledge enables them to create a system running at high speed, usingless bandwidth while minimizing error rate. Unfortunately, the mobile radio channelis the most chaotic media to work with. In reality, it is very dicult to predict thebehavior of the channel. Lots of eorts are, and continue to be, made to developaccurate and reliable models for dierent types of radio channels. The simplest, yetcommonly used, types of radio channel models are: Additive White Gaussian Noise(AWGN) and Rayleigh at fading. Understanding the behavior of the channel modelsand the performance of mobile communication system under these channels is the aim ofthis project. In the following sections, we are going to discuss about the characteristics,advantages and disadvantages of these channel models.

1.1.1 Additive White Gaussian Noise channel

The simplest and most classical model of a channel is the Additive White Gaussian Noise(AWGN) channel. The AWGN channel model is useful for comparing the performance ofwireless communications systems: It approximates the performance of wireline channeland serves as the lower bound for the degradation by the radio channel. The disavantageof AWGN channel is that it does not adequately model real-life mobile radio channelphenomena, such as frequency selective, multipath fading and Doppler shift.As depicted in gure 1.1, in an AWGN channel, the transmitted signal r(t) is additivelycorrupted by a white Gaussian noise source n(t), and the received signal s(t) is givenby:

s(t) = r(t) + n(t) (1.1)

The white noise n(t) is a real-valued zero-mean Wide Sense Stationary (WSS) randomprocess with Gaussian Probability Density Function (PDF). The term 'white' is use inthe sense that the Power Spectral Density (PSD) function of the noise is constant over

1

Page 14: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2 Introduction

Figure 1.1: Passband representation of AWGN channel

Figure 1.2: The wideband white noise: (a) The PSD, and (b) The ACF

the whole frequency-domain, and its Auto-Correlation Function (ACF) is a direct pulseat zero delay as illustrated in gure 1.2.However, in a mobile communications system, where Band Pass Filter (BPF) is usedat the front-end of the receiver, the above-mentioned wideband noise is usually lteredand becomes narrowband noise. The narrowband noise n(t) (from now on, we use n(t)

notation to refer to narrowband noise) still has constant PSD function over frequencyof interest and can be dened as:

Sn(f) =

N0/2 | f ± fc |≤ B/2

0 elsewhere (1.2)

where N0 is noise power spectral density [Watts/Hz] of the noise, fc is the carrier fre-quency of the signal and B is the bandwidth of interest. As a result, all signal frequencieswithin the bandwidth B are equally degraded by AWGN channel. Since the autocorre-lation function is the inverse Fourier transform of the PSD, it follows that:

Rnn(τ) =

∫ +∞

−∞Sn(f) exp(j2πfτ)df

= N0Bsinc(Bτ) cos(2πfcτ) (1.3)

The PSD and ACF of noise n(t) are illustrated in gure 1.3. The variance of the noiseσ2

n is equal to:σ2

n = Rnn(0) = N0B (1.4)

Page 15: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 3

−5 −4 −3 −2 −1 0 1 2 3 4 5−1

−0.5

0

0.5

1Autocorrelation Function of AWGN

τ/B

Rnn

(τ)/

(NoB

)

−1.5 −1 −0.5 0 0.5 1 1.5

0

0.2

0.4

0.6

0.8

1Power Spectral Density of AWGN

f/fc

Sn(f

)/N

o

−fc−B −fc+B fc+Bfc−B

Figure 1.3: The ACF & PSD functions of the passband noise [17].

In our project, the AWGN channel acts as a reference model for the analysis of theperformance of mobile system under the Rayleigh at fading channel.

1.1.2 Rayleigh at fading channel

In general, the behavior of any radio channel between a transmitter and a receiver canbe decomposed into the following phenomena:

(a) Path loss: Real-life signals, radiated in a radio environment, are subject to at-tenuation (or path-loss) due to various reasons, such as free-space loss, absorptionof the transmission medium (i.e. the atmosphere) and scattering of signals them-selves when they are obstructed. This path loss is usually degrading with square/ 4th power of the distance between transmitter and receiver.

(b) Shadow fading (or shadowing): This is the phenomenon that the received sig-nal power uctuates due to large objects obstructing the propagation path betweentransmitter and receiver. As a mobile receiver moves through an environment,where it is shadowed from direct waves and / or collections of reected waves, thereceived signal level uctuates. Unlike the fast fading phenomenon described later,the changes of received signal amplitude due to shadow fading are quite slow. The

Page 16: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

4 Introduction

reason is that large objects may have considerable physical dimensions (hundredsof meters), it may take some time for the receiver to move out of a shadowedregion [16]. The shadowing eect is characterized by log-normal distribution.

(c) Small-scale fading (or simply fading): Small-scale fading component is therapid uctuation of the amplitude of a radio signal over a short period of timeor travelled distance. This fading is caused by interference between two or moreversions of the transmitted signal which arrive at the receiver at slightly dierenttimes. These waves, called multipath waves, combine at the receiver antenna togive a resultant signal which can vary widely in amplitude and phase. The small-scale fading has a Rayleigh or Ricean distribution depending on the absence orpresence of the strong (possibly line of sight) signal between the transmitter andreceiver [12].

The small-scale fading phenomenon is of our interest and, therefore, is discussed morehere. There are dierent types of small-scale fading, which are listed in gure 1.4.

Fast fading Slow fading

(Based on Doppler spread)

Small−Scale Fading

Small−Scale Fading(Based on multipath time delay spread)

2. Delay spread < Symbol period

1. BW of signal < BW of channel

Flat fading

2. Delay spread > Symbol period

1. BW of signal > BW of channel

Frequency Selective Fading

1. High Doppler spread

2. Coherence time < Symbol period

3. Channel variations faster than

baseband signal variations

1. Low Doppler spread

2. Coherence time > Symbol period

3. Channel variations slower than

baseband signal variations

Figure 1.4: Types of small-scale fading channels [12].

(a) Flat fading vs. Frequency selective fading: The mobile radio channel has aconstant gain and linear phase response over its coherence bandwidth (Bc), andif this bandwidth is larger than the bandwidth of the signal, then received signalwill undergo at fading [14]. The term 'at' indicates that all frequencies of the

Page 17: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 5

transmitted signal experience the same level of channel gain (or attenuation). Thetransmitted spectrum is preserved at receiver. The channel gain is uctuating withtime, and so is the received signal strength. Because the symbol period (Tb) isreciprocal of signal bandwidth, it follows that it must be much larger than the rmsdelay spread of the channel (στ ), which is inversely proportional to the channelcoherence bandwidth (Bc). This type of fading channel is sometimes referred toas a 'narrow-band' channel.On the other hand, if the bandwidth of the transmitted signal is much larger thanthe channel coherence bandwidth, frequency selective fading occurs. In this case,the channel gain is not only uctuating in time, but is also dierent for dierentfrequency components of the transmitted signal. This type of fading channel ismore severe than at fading channel, as it induces Intersymbol Interference (ISI).

(b) Fast fading vs. Slow fading: Depending on how rapidly the transmitted signalchanges compared to the rate of change of the channel, a channel may be classiedeither as fast fading or slow fading [14]. In the fast fading channel, the channelcharacteristics are changing rapidly within the symbol duration. It means thatthe channel coherence time (Tc) is smaller than the symbol period (Tb). As thechannel coherence time is inversely proportional to the Doppler spread (BD), thefast fading channel often has high Doppler spread. In practice, fast fading onlyoccurs for very low data rate transmission [12].In constrast, if the channel impulse response changes at a rate much slower thanthe symbol rate, the channel is said to be 'slow fading'. Such channel is assumed tobe static over one or several symbol periods (Tb). In frequency domain, this impliesthat the Doppler spread (BD) of the channel is much less than the bandwidth ofthe transmitted baseband signal [12].

The small-scale at fading channel is often used to explain the statistically time-varyingnature of the received envelope in a mobile channel. There are dierent statistical modelsfor at fading channel, such as those are suggested by Ossana, Clarke and Jakes... Inour project, the Clarke 2D model is used to study the performance of mobile systemunder narrowband at fading conditions.

Clarke 2D model for Rayleigh at fading channel

The multipath fading channel model developed by Clarke was derived from the scatter-ing phenomenon [12]. The model assumes a xed transmitter is communicating with amobile receiver, both of which have vertically polarized antennas. In order to reducecomplexity, Clarke's 2D model assumes that the distance between the transmitter andthe receiver is suciently large, so that the radio propagation environment can be mod-eled in two dimensions, i.e. all incoming waves travel in the azimuthal plane. This

Page 18: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

6 Introduction

assumption has been proved to be practical, because many measurements observed inreality show similar Doppler spectrum shape as one predicted by Clarke [10]. Based onthe above-mentioned assumption, the incident waves at the mobile receiver can also beseen as plane waves.

thn incoming wave

θn

Mobile x

y

v

Figure 1.5: A typical plane wave incident on a MS receiver [6]

Figure 1.5 depicts a mobile receiver moves along the x-axis with velocity v. At any timethere are a number of incoming waves arriving at the receiver, with dierent Angle ofArrival (AoA). Let's take a look at the nth incoming wave, which arrives at angle θn.The Doppler shift, or frequency shift, fD,n associated with that incoming wave can becalculated as follows:

fD,n = fm cos θn [Hz] (1.5)where fm = v

λis the maximum Doppler frequency, which occures when θn = 0o, and λ

is the wavelength of the incident waves.As discussed in Appendix C, the passband representation r(t) of the transmitted signalcan be expressed as:

r(t) = Re[r(t) exp(j2πfct)] (1.6)where Re[.] is the real part of the complex signal, r(t) is the complex envelope (orbaseband representation) of the transmitted signal, and fc is the carrier frequency.At the receiver, the received signal associated with the nth incoming path is attenu-ated, delayed in time, and shifted in frequency due to Doppler phenomenon. Fromequations (1.5) and (1.6), such a signal is given as:

sn(t) = ReCn exp[j2π(fc + fD,n)(t− τn)]r(t− τn)

(1.7)

where Cn is the amplitude and τn is time delay associated with the nth propagationpath.

Page 19: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 7

The received signal is the sum of dierent scattering paths, each possessing independentamplitude Cn, Doppler shift frequency fD,n and time delay τn. Assuming that there is anite number M of scattering paths, the passband representation of received signal canbe expressed as [15]:

s(t) =M∑

n=1

sn(t) = Re M∑

n=1

Cn exp[j2π(fc + fD,n)(t− τn)]r(t− τn)

= Re M∑

n=1

Cn exp−j2π[(fc + fD,n)τn − fD,nt]r(t− τn) exp(j2πfct)(1.8)

From equation (1.8), we can derive the baseband representation of the received signal:

s(t) =M∑

n=1

Cn exp[−jφn(t)]r(t− τn) (1.9)

in which:φn(t) = 2π[(fc + fD,n)τn − fD,nt] (1.10)

is the phase associated with the nth incoming path.Let's assume that the dierential path delays (∆τ = τi − τj, i 6= j) are very smallcompared to the duration of a modulated symbol (narrowband assumption), then theτn's in equation (1.9) are all approximately equal to τc, which represents the excess delayfor all scattering paths from the transmitter to the receiver. We re-write equation (1.9)as follows:

s(t) =M∑

n=1

Cn exp[−jφn(t)]r(t− τc)

= r(t− τc)M∑

n=1

Cn exp[−jφn(t)]

= r(t− τc)g(t) (1.11)

where g(t) =∑M

n=1Cn exp[−jφn(t)] is the complex gain of the radio channel [15]. With-out loss of generality, we assume the excess delay τc is zero, or there is no delay occurredbetween the transmitter and receiver. This assumption is based on the fact that thereare dierent synchronization techniques between transmitter and receiver, so that thereceiver can compensate for that excess delay. Furthermore, the eect of thermal noiseand interference of the channel is modelled by adding baseband AWGN channel n(t) tothe received signal in equation (1.11). Thus, the baseband representation of the receivedsignal of Rayleigh at fading channel is given as:

s(t) = g(t)r(t) + n(t) (1.12)

Page 20: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

8 Introduction

Figure 1.6: The equivalent baseband representation of the Clarke model of the Rayleigh at fading channel

The equivalent baseband representations of the Rayleigh at fading channel is illustratedin gure 1.6.The complex gain of the Rayleigh at fading channel is of our interest, because it reectsthe behavior of the channel. The complex gain is often expressed in terms of its realand quadrature components:

g(t) = gI(t) + jgQ(t) (1.13)

in which:

gI(t) =M∑

n=1

Cn cos[φn(t)] (1.14)

is the in-phase part of the channel gain, and:

gQ(t) =M∑

n=1

Cn sin[φn(t)] (1.15)

is the quadrature part.For suciently large M (theoretically innite but in practice greater than 6 [10]), thecentral limit theorem can be invoked and gI(t) and gQ(t) can be treated as indepen-dent Gaussian random processes which are completely characterised by their means andvariances. The in-phase and quadrature parts of the complex gain of the channel havezero-mean and the following variances:

σ2gI

= σ2gQ

=E0

2(1.16)

where E0 is called the total received envelope power [15], and is given as:

E0 =M∑

n=1

C2n (1.17)

Page 21: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 9

To understand the characteristics of the complex gain, it is very important to obtainits ACF and PSD. However, evaluation of these functions requires the distribution ofthe incident power on the receiver antenna, p(θ), and the receiver antenna gain G(θ)

as a function of AoA, θ. The Clarke's 2-D isotropic scattering model assumes that Mscattering paths arrive at the mobile station from all directions with equal probability,i.e. p(θ) = 1/2π, θ ∈ [−π, π], and an isotropic antenna with gain G(θ) = 1 is used.Using these assumption, we can obtain the ACF of the in-phase part, and the Cross-Correlation Function (CCF) of the in-phase and the quadrature parts of g(t) as [15]:

RgIgI(τ) = RgQgQ

(τ) =E0

2J0(2πfmτ) (1.18)

RgIgQ(τ) = RgQgI

(−τ) = 0 (1.19)

where RgIgI(τ) is the ACF of in-phase part, and RgIgQ

(τ) is the CCF of the in-phaseand quadrature parts of g(t), and J0(.) is the zero-order Bessel function of the rst kind.The fact that the CCF of in-phase and quadrature parts of g(t) is zero means they areuncorrelated, since they are independent random processes.Assuming that the channel is WSS, the ACF of the complex gain can be expressed as:

Rgg(τ) = E[g(t)g∗(t+ τ)

]

= 2RgIgI(τ) + 2jRgIgQ

(τ)

= E0J0(2πfmτ) (1.20)

Figure 1.7 is an example of the ACF of the complex gain g(t). Using the Fourier trans-form, we can nd the power spectral density of the complex gain (sometimes referredto as Doppler power spectrum) of the Clarke 2D model [15]:

Sg(f) =

E0

2πfm

1√1−(f/fm)2

| f |≤ fm

0 elsewhere(1.21)

The Doppler power spectrum for Clarke's 2D model is represented by the famous bath-tub shape in gure 1.8.On the other hand, the channel complex gain can be equivalently expressed in terms ofits time-varying envelope Ω(t) and phase α(t):

g(t) = Ω(t)ejα(t) (1.22)

where:Ω(t) =

√g2

I (t) + g2Q(t) (1.23)

α(t) = arctan

[gQ(t)

gI(t)

](1.24)

Page 22: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

10 Introduction

0 0.5 1 1.5 2 2.5 3 3.5 4−0.5

0

0.5

1

τ/Tc

Aut

ocor

rela

tion,

Rg Ig I(τ

)The autocorrelation function of the envelope

Figure 1.7: The ACF of the complex gain of the radio channel

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−40

−30

−20

−10

0

10

20

Normalized frequency (f−fc)/f

m

Pow

er s

pect

rum

, Sgg

(f)

(dB

)

The power spectral density of the complex gain

Figure 1.8: An example of Doppler power spectrum

Page 23: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 11

Since the in-phase and quadrature parts of the complex gain g(t) are two independentidentical Gaussian distribution, it follows that the envelope Ω(t) of the complex gain ofthe channel has Rayleigh distribution:

fΩ(x) =x

σ2Ω

exp

(− x2

2σ2Ω

)(1.25)

where σ2Ω = E0/2 is the mean power, and Ω is the short-term value of the envelop [10].

The rms value of the envelope Ω(t) is given as [12]:

Ωmean =√E[Ω2(t)] = σΩ

√2 (1.26)

The Rayleigh distribution of the envelope is illustrated in gure 1.9, together with itsmean power and the mean value.

Short−term value of the envelope

f Ω(Ω

)

σ Ωmean Ω

The probability density function of the envelope

0

Figure 1.9: The PDF of the envelope of the complex gain of radio channel

Eects of Rayleigh fading channel

In a small-scale fading channel, the received signal is the sum of multiple scatteringpaths with random amplitudes and phases. The interaction between these paths causes

Page 24: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

12 Introduction

the channel gain to vary in time and deep fades to happen (gure 1.10). The fadingis most severe in heavily built-up areas such as city centers, and less severe as thedegree of urbanization decreases [10]. The reason is that in the city centers, due tohigher density of buildings and other obstacles, the scattering phenomenon is muchmore intensive. The rate at which the gain of the channel varies is proportional tothe speed of the mobile device and the frequency of transmission. A vehicle drivingthrough at fading environment at speed up to 120km/h can experience random signaluctuations occuring at rates of 100-1000Hz, depending on the wavelength of the carriertransmission frequency.

Because of the varying channel gain, the performance of a mobile communication systemover a Rayleigh fading channel is degraded. For the same mobile system and at the sameaveraged Signal to Noise Ratio (SNR) level, the probability of error for a Rayleigh fadingchannel is much higher than for an AWGN channel.

0 100 200 300 400 500 600 700 800 900 1000−25

−20

−15

−10

−5

0

5

The envelopes of the complex gains, fm

Tb = 0.01

Time, t/Tb

Env

elop

e le

vel [

dB]

Deep fades

Figure 1.10: An example of time evolution of the envelope of the complex gain

Besides, typical at fading channels sometimes experience deep fades of up to 40dBbelow the average level, and thus may require 40dB more transmitter power to achievelow bit error rates during times of deep fades as compared to systems operating overnon-fading channel. These deep fades might causes burst errors, or even interruptionsin transmission (dropped calls), and are the worst type of degradation in at fadingchannels.

Page 25: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 13

1.1.3 Combating technique: Diversity

As discussed in section 1.1.2, a Rayleigh fading channel has a great impact on the qualityof the received signal, since fading increases the probability of error in the communicationchannel. To combat this negative eect, diversity techniques are introduced.The fundamental idea behind diversity techniques is that the probability of M inde-pendent samples of a random process all being simultaneously below a certain level ispM , where p is the probability that a single sample is below this level. Therefore, it isdesirable to obtain multiple versions of the received signal, which have low, or ideallyzero, cross-correlation, somehow combine them and the resultant signal will have fadingproperties much less severe than those of any individual version alone [10]. As a result,diversity provides reliability, robustness and improvement of bit error rate for mobiletransmission over the fading channels.There are dierent types of diversity techniques, which are classied by the methodsfrom which multiple versions of received signals are created:

(a) Space diversity is a method in which two or more antennas physically sepa-rated from each other are used to obtain independent versions of the receivedsignal. These antennas can be located at the receiver (receiver diversity), at thetransmitter (transmitter diversity) or at both. The distance between antennas isimportant, because the level of cross-correlation between signals received by thoseantennas depends on that distance. Ideally, antenna separation of half of wave-length (λ/2) should be sucient [6]. Space diversity is the most attractive andconvenient method of diversity for mobile radio. It is relatively simple to imple-ment, and does not require additional frequency spectrum, which is a preciousresource in mobile communications.

(b) In time diversity, the transmitted signal is repeated several times at dierenttime frames. Thus, the receiver will receive more than one version of the trans-mitted messages. The only requirement for time diversity technique is that thetime separation between two repetitions be greater than the channel coherencetime Tc, so as to ensure that the received signals are uncorrelated. If Nb diversitybranches are needed, the reception delay is always Nb times the repetition interval.As a result, time diversity system would observe high delay, especially when thenumber of branches Nb increases. Furthermore, since the channel coherence timeis inversely proportional to the maximum Doppler shift frequency fm, it can beshown that if the Mobile Station (MS) does not move at all (or its velocity is zero),time diversity is essentially useless [6].

(c) Another method to obtain multiple versions of the incoming signal at the receiveris frequency diversity. This method utilizes two or more frequency bands to

Page 26: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

14 Introduction

transmit the same message. The receiver will listen to these frequency bands toget Nb diversity branches. The requirement for frequency diversity is that thosefrequency bands must be separated enough so that the fading associated with thedierent frequency bands is uncorrelated. The channel coherence bandwidth (Bc)is a convenient quantity to use in describing the degree of correlation existing be-tween dierent frequencies: For frequency separation of more than several timesthe coherence bandwidth, the signal fading would be essentially uncorrelated. Forexample, if the channel coherence bandwidth is 500kHz for a certain mobile en-vironment, the frequency separation should be at least 1-2MHz. In mobile radio,where frequency is a precious resource, this diversity technique is not always se-lected. The frequency diversity also requires separate transmitter chains for eachof the branches.

(d) It has been shown that signals transmitted on two orthogonal polarizations in themobile radio environment exhibit, under certain propagation conditions, uncor-related fading statistics. Polarization diversity technique uses two orthogonalpolarized antennas for diversity reception. One might consider this technique asa special case of space diversity, because two antennas are needed. However, themaximum number of branches in polarization diversity is two, as there are onlytwo orthogonal polarizations. Furthermore, there is 3-dB loss in signal, since thetransmitted power is split between the two transmitting antennas [6].

(e) Instead of using polarized antennas, directional antennas can also be used to cre-ate angle diversity. It has been observed that the transmitted signal is oftenscattered and reaches the receiver from all directions, and those incoming signalsassociated with dierent directions are uncorrelated. Using an array of directionalantennas, which tunes to Nb dierent directions, Nb diversity branches of trans-mitted signal could be obtained. This diversity technique could also be consideredas a special case of space diversity.

Having obtained the necessary versions of the incoming signal by space, frequency, time,polarization or angle diversity, we must process them to gain the 'best' result. Thereare dierent methods for combining the signals, and which method is the 'best' dependsnot only on how much improvement it can provide, but also on how complex it is andwhat the costs associated with the method are. In general, linear combining methodsare used to combine the incoming signals: These signals will be weighted individuallyand then added together. If addition takes place after detection, the system is calleda post-detection combiner ; if it takes place before detection, the system is called a pre-detection combiner. In the pre-detection combiner, it is necessary to provide a methodof cophasing the signals before addition [10]. Assuming that the cophasing has been

Page 27: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 15

already done, the output of a linear combiner with Nb branches can be expressed as:

s(t) = a1s1(t) + a2s2(t) + · · ·+ aNbsNb

(t) (1.27)where si(t), (i = 1, 2 . . . Nb), is the envelope of incoming signal at the ith branch, andai is the weight factor associated with that branch. The analysis of the combiners isusually carried out in terms of SNR, with the following assumptions [10]:

(a) The noise in each branch is independent of the signal and is additive.

(b) The signals are locally coherent, implying that although their amplitudes changedue to fading, the fading rate is much slower than the lowest modulation frequencypresent in the signal.

(c) The noise components are locally incoherent and have zero means, with a constantlocal mean square (constant noise power).

(d) The local mean square values of the signals are statistically independent.

There are dierent methods to choose the weight factors ai, which lead to dierenttypes of combiners, namely: Selection Combiner, Equal Gain Combiner and MaximalRatio Combiner. These combiners are illustrated in gure 1.11, and can be explainedas follows:

(a) The principle of Selection Combining (SC) method is to deliver to the detectorthe branch which yields the highest SNR. In another words, the SC system willmonitor the SNR of all branches, and select the kth branch with the best SNR value.The weight factor ak associated with that branch will be 1, and all other weightfactors ai (i = 1, 2, . . . Nb, i 6= k) are zero. In practice, it is dicult to measureSNR of diversity branches. Therefore, the signal plus noise value is usually usedinstead of SNR, with the assumption that the noise power (No) is constant for allbranches.For radio systems that use continuous transmission, SC is impractical because itrequires continuous monitoring of all diversity branches to obtain time-varyingSNR. If such monitoring is performed, then it is probably better to use MRCmethod, since the implementation is not that much more complicated and theperformance is better (we will discuss about MRC in the next section). However,in some systems that use Time Division Multiple Access (TDMA), a form of SC cansometimes be implemented where the diversity branch is selected at the beginningof a TDMA burst. The selected branch is then used for the duration of theentire burst. Clearly, this approach is only useful if the channel does not changesignicantly over one burst duration, or the burst duration must be much smallerthan the channel's coherence time (Tc).

Page 28: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

16 Introduction

Figure 1.11: Diversity combining methods: (a) Selection combining, (b) maximal ratio combining (ak = sk/No),

and (c) equal gain combining [10]

Page 29: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 17

(b) The output of EGC system is actually the sum of all Nb diversity branches (ai = 1,i = 1, 2, . . . Nb). This means all branches contribute equally to the output signal.In practice, such a scheme is useful for modulation techniques having equal energysymbols, e.g. M-PSK. For signals of unequal energy, it might be better to use theMRC technique [15].

(c) The Maximal Ratio Combining (MRC) method is relatively more complexthan the previous two. The diversity branches are weighted in proportion to theirown signal voltage / noise power ratio before summing:

ai = si/No (i = 0, 1, . . . Nb) (1.28)

where No is the noise power of each individual diversity branch, and it is assumedthat all diversity branches have the same noise power.It is proven that if the weight factors ai are chosen as in equation (1.28), the SNRof the output of MRC system is maximized [6]. Therefore, the probability of errorfor MRC reception is minimized.This technique gives the best performance, provided that all the above-mentionedassumptions are true. The performance of a MRC system deteriorates in the caseof correlated fading, especially if the correlation coecient exceeds 0.3. MRCcontinues to show the best performance; EGC approaches MRC as the correlationcoeccient increases. However, some improvement is still apparent even withcorrelation coecients as high as 0.8 [10].

In conclusion, diversity is an invaluable tool to overcome the negative eects of Rayleighfading. It is useful in removing the very deep fades which cause the greatest systemdegradation. Because of more than one incoming signal, the probability that all ofthem will be suering a deep fade at the same time is very low. The choice of diversitytechniques depends not only on how much it can improve, but also on the time andcosts required by the technique.

1.1.4 Modulation scheme

The purpose of a mobile system, like any other communication system, is to delivera message signal from an information source to a user destination. To do this, thetransmitter modies the message signal into a form suitable for transmission over thechannel. This modication is achieved by means of a process known as modulation.The receiver has to re-construct the original message signal from an attenuated versionof the transmitted signal after propagation through the channel. This re-contructionis accomplished by using a process known as demodulation, which is the reverse of themodulation process used in the transmitter [5]. However, because of unavoidable noise

Page 30: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

18 Introduction

and distortion in the received signal, the receiver can not re-create the original messagesignal exactly. The resulting degradation in overall system performance is inuenced bythe type of modulation scheme used.The Binary Phase Shift Keying (BPSK) is a modulation technique widely used formobile communications systems. In BPSK modulation, the phase is used to representtransmitted symbols, and the amplitude is always constant. In general, BPSK is simpleto implement, has good immunity to noise and high bandwidth eciency.

BPSK modulator

Assuming we have a binary sequence, m(t), contains two symbols, '1' and '-1', that arestatisticaly equally. Every symbol lasts for a duration Tb. In BPSK, the signal m(t) ismodulated by varying the phase of a carrier wave 180o to obtain the transmitted signal:

r(t) = A cos2π fct+π

2[1−m(t)] (1.29)

where:r(t) : BPSK transmitted signalA : Constant amplitude of the signalfc : Carrier frequencym(t) : Binary sequence, represented in Non-Return Zero

(NRZ) format (i.e. having [-1, 1] values).An example of BPSK transmitted signal r(t) is illustrated in gure 1.12. To ensurethat each transmitted bit contains an integral number of cycles of the carrier wave, thecarrier frequency fc is chosen as a multiple of 1

Tb[5].

Figure 1.12: An example of BPSK signal

The equation ( 1.29) can be re-written as:

r(t) =

A cos(2πfct) for m(t) = 1

−A cos(2πfct) for m(t) = −1

= m(t)A cos(2πfct) (1.30)

Page 31: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.1 Background of the project 19

We observe from equation (1.30) that the BPSK modulation can be seen as a special formof amplitude modulation, and we can implement BPSK modulator by just multiplyingthe binary sequence m(t) with the carrier wave. The modulation process can be seen ingure 1.13.

c cπA cos ( 2 f t )

Carrier wave

Message

signal

m(t)

signal

Transmitted

r(t)

Figure 1.13: BPSK modulation scheme [5]

The power of the bandpass BPSK signal is expressed in terms of its amplitude as [17]:

Pr = limτ→∞

1

τ

∫ τ/2

−τ/2

r2(t)dt =A2

2(1.31)

The transmitted signal energy per bit of the passband BPSK signal, Er, is given as [17]:

Er =A2Tb

2(1.32)

where A is the amplitude of carrier wave, and Tb is the symbol (or bit) duration.

BPSK demodulator

In case of the AWGN channel, the received signal is expressed in equation (1.1). At thereceiver, the demodulation process is discribed in gure 1.14: the received signal s(t) ismultiplied by a carrier cos(2πfct) and then the product is integrated over the symbolinterval 0 ≤ t ≤ Tb, to obtain:

yT =

∫ Tb

0

s(t) cos(2πfct)dt

=

∫ Tb

0

[r(t) + n(t)] cos(2πfct)dt

=

+A

2+ wT for symbol 1

−A2

+ wT for symbol -1 (1.33)

Page 32: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

20 Introduction

Figure 1.14: BPSK demodulation scheme [5]

where yT is the decision variable, and wT =∫ Tb

0n(t) cos(2πfct)dt is contribution of the

correlator output due to the channel noise n(t).To reconstruct the original binary signal m(t), the decision variable yT is comparedagainst a threshold of zero at the decision-making device, based on the following rule: Ifthe output yT is greater than zero, the receiver outputs symbol '1'; otherwise, it outputssymbol '-1' [5].For a Rayleigh at fading channel, the modulation scheme becomes more complicated.The baseband representation of received signal under Rayleigh at fading channel isgiven in equation (1.12). The transmitted signal is multiplied with the channel's complexgain g(t), which causes its phase and amplitude to change randomly. The random phaseα(t) of the complex gain of the channel, therefore, must be known prior to demodulation.There are dierent methods which can be used to estimate the time-varying channelgain at the receiver. Once the estimation of the complex gain, g(t), is obtained, we canmultiply the received signal with its conjugate g∗(t) to remove the phase changes, andcontinue the demodulation process as described for AWGN channel.

1.2 Scope and objectives of the project

1.2.1 Scope of project

Under the title, "Bit and packet error rates in Rayleigh fading channels withand without diversity", our project aims at (a) studying the performance of a mobilecommunication system under Rayleigh at fading channel, (b) analysing the benets ofthe use of dierent diversity techniques to combat fading, and (c) investigating the inu-ence of the choice of packet length on the performance of packet-based communicationsystems.We choose to implement the BPSK modulation scheme in this project. The modelof the Rayleigh at fading channel is Clarke 2D scattering model, which is commonly-used to simulate the at fading channel. Our choices of diversity techniques are SelectionCombining (SC), Equal Gain Combining (EGC) and Maximal Ratio Combining (MRC).They are well-known for their ability to mitigate the negative eects of the fading

Page 33: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

1.2 Scope and objectives of the project 21

channel. The analysis of these diversity techniques will give us better understanding ofthe advantages and disavantages of these diversity techniques.

The system performance is often analysed by means of the Bit Error Rate (BER) andPacket Error Rate (PER). For years, the Bit Error Rate (BER) has become a commonly-used measure to assess the performance of all communication systems. The BER is anapproximation of the probability of bit error during transmission. It depends on themodulation scheme used, the instantaneous SNR level, and the type of fading channelaecting the transmitted signal.

Many mobile communication system today are sending and receiving information interms of packets. The probability of packet error depends on the probability of biterror, the packet length and the channel coherence time. i.e. the time over which thechannel stays approximately constant. Therefore, the PER is also important parameterindicating the performance of the system with a given packet length.

In this project, we are going to use the BER and PER as functions of SNR levels toinvestigate the performance of system under various settings.

1.2.2 Objectives of project

By simulation on Matlab, we measure the BER and PER of the simulated system withvarious setups. Using the observed results, the objectives of the project are to investigatethe following problems:

(a) The AWGN vs. Rayleigh at fading channel: The Rayleigh at fading channelgreatly degrades the system performance compared to the AWGN channel. Thisproject aims at evaluating this degradation of the at fading channel.

(b) The benets of the diversity techniques: We wish to study the eectiveness ofthree dierent diversity techniques, namely: SC, EGC and MRC, in mitigatingthe fading of the channel. We are going to compare the performance betweentwo-branch and three-branch diversity.

(c) The eects of packet length: We are going to evaluate the inuences of packetlength on the performance of packet-based systems.

(d) The eects of mobile receiver velocity: The rate of change of the Rayleigh atfading channel is directly related to the velocity of the mobile receiver. In thisproject, we are interested in analysing the eects of dierent velocities on theperformance of the wireless communication system.

Page 34: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

22 Introduction

(e) Comparison of selection schemes: There are several choices for implementing SCand MRC diversity techniques, which we will mention in details later. One of theobjectives of the project is to identify the advantages and disadvantages of thosechoices.

In the next chapter, we are going to present the foundation for our simulation, byintroducing the block diagram of the simulation system and developing the discrete-time models for each block.

Page 35: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Chapter

2Project analysis

2.1 Simulation block diagram

To estimate the BER and PER in our project, we use the Monte Carlo (MC) methodfor simulation [8]. The core idea in a MC simulation is that random processes, signalsand noises, evolve in time bearing whatever statistical properties are ascribed to them.In relation to the BER estimation problem, MC simulation is merely an experimentwhere we make a number of trials (sending out a number of bits), count the numberof successes (received errors in this context) and divide by the number of trials. Theresult is an estimation of the average relative number of errors, or simply what wecall the BER. The method itself requires no assumptions about the system properties.The schematic representation of the implementation of the MC procedure is given ingure 2.1 [11].

Digital SourceSequence

The Entire System

and decision device)(except for source

Decision Device(Decoder)

Delay Comparison

Error Sequence

SequenceEstimated

Monte CarloEstimationProcedure

Simulated System

Figure 2.1: Schematic representation of the implementation of the MC procedure [8]

We extend the principal MC procedure into the block diagram for our simulation, whichis introduced in gure 2.2.In the gure 2.2, the Data source plays the role of generating a data sequence, whichserves as the input data for the system. This data sequence goes through the Packetizingmodule, where it is transformed into packets. Then, these packets are combined to makea bit stream and sent to the Modulator module. The function of the Modulator is to

23

Page 36: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

24 Project analysis

ChannelChannel

Data source

Packetizing

Modulator

Demodulator

Depacketizing

BER module

PER module

Diversity

Data sequence

Bit stream

Received bit stream

sequenceEstimated

Figure 2.2: Block diagram for simulation

Page 37: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.2 Data source 25

alter the bit stream to an analog-like signal, which can be transmitted over the radiochannel.Next is the Channel module(s), which can either be an AWGN or a Rayleigh at fad-ing channel, depending on the dierent simulation setups. If diversity technique is tobe tested, the transmitted signal at the output of the Modulator is manipulated inde-pendently via a number of independent Channel modules, so that multiple versions ofreceived signals can be obtained.The rst module of the receiver of the system is Diversity. This module is not presentif the modulator without diversity techniques is simulated. Otherwise, the Diversitymodule accepts multiple versions of received signals as inputs, and outputs the 'best'received signal for demodulation, depending on the type of diversity technique used.This received signal then passes through the Demodulator module, which has the inversefunction of the Modulator module. The output of the Demulator module, receivedbit stream, is the estimation of the transmitted bit stream. It is then depacketizedby the Depacketizing module. The resulted estimated sequence is the nal output ofsystem. In our simulation, the BER module compares the estimated sequence withthe transmitted data sequence to compute BER values. Likewise, the PER modulecompares the transmitted packet stream, generated from the Packetizing module, withthe received packet stream, resulted from the Depacketizing module, to obtain the PERvalues.Realization of such a communication system requires the realization of an individualdiscrete-time model for all functional blocks in the system. Therefore, the next sectionis devoted to develop discrete-time models of dierent modules in the above-mentionedblock diagram.

2.2 Data source

The purpose of having a data source in our simulation is to generate a data sequence,which resembles the user messages in the mobile communication system. This datasequence is to be packetized, sent over the channel and recovered at the other end. Inorder to closely approximate real-life data, we need to generate a data sequence withthe following characteristics in our simulation:

(a) It is a binary sequence, in the NRZ form (i.e. having [-1, 1] values).

(b) It is random in nature, i.e. the total numbers of '1' and '-1' appeared in thesequence are statistically equal.

Such characteristics can be found in the binary Maximal-length sequence (m-sequence).This sequence has been used for BER testing for a long time. The m-sequence is random

Page 38: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

26 Project analysis

in nature with various bit patterns, which makes it resemble real data or speech signals.It is relatively easy to generate the same m-sequence at both the transmitter and receiverfor comparison using Linear Feedback Shift Register (LFSR). If msr is the number ofshift registers in LFSR generator, the output m-sequence has length of Ns = 2msr−1 [2].The periodicity of m-sequence makes the synchronization task at receiver much easier.

It is also quite simple to generate m-sequence in software. A primitive polynomial h(x)of degree msr is needed:

h(x) = h0xmsr + h1x

msr−1 + · · ·+ hmsr−1x+ hmsr (2.1)

where h0 = h1 = 1 and h2, h3,... hmsr are coecients of the polinomial specied inGalois Field GF(2). The following algorithm (Galois method) is used to generate thebinary m-sequence in software [2]:

Step 1 Specify msr, the desired degree of primitive polynomial h(x)

Step 2 Select a primitive polynomial h(x) of degree msr from primitive poly-nomial table.

Step 3 Specify initial values of the m-sequence: a0, a1, . . . amsr

Step 4 Calculate the length of the m-sequence: Ns = 2msr − 1

Step 5 Calculate the remaining values (amsr , amsr+1, . . . aNs) of the desiredm-sequence based on its initial values and the primitive polynomial h(x):

ak = −h1ak−1 − h2ak−2 − · · · − hmsrak−msr (mod2) (2.2)

where ak is the kth bit in the m-sequence, and h1, h2, . . . hmrs are coecientsof polynomial h(x) in GF(2). Please note that all calculations in this stepare made in GF(2).

Another advantage of using the m-sequence is its repeatability. We can re-generate thesequence with the same length and bit patterns over and over, provided that we usethe same primitive polynomial h(x) and initial values a0, a1, . . . amsr . As a result,we can run the same data sequence for dierent simulation arrangements (for example,Rayleigh channel with or without diversity techniques). This consistency removes anydierence in the obtained results that would have been due to the fact that dierentdata sequences are sent.

Page 39: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.3 Packetizing and depacketizing modules 27

2.3 Packetizing and depacketizing modules

In any packet-based communication systems, the packetizing and depacketizing areneeded for generating packets from the information source and reassembling them laterat the destination. These modules often represent the operations of higher layers (i.e.not physical layer) in Open System Interconnection (OSI) model.

The data sequence, which is to be delivered from an information source to a user desti-nation, is packetized by Packetizing module before modulated and sent into the channel.Normally, the functions of Packetizing module are:

(a) To divide incoming data sequence into blocks of bits, which do not necessarilyhave equal length.

(b) To divide these blocks further into smaller sub-blocks and scramble them together.The process is often referred as to interleaving. This is to ensure that the bursterrors, which often occur in Rayleigh channel, do not completely destroy the wholepacket.

(c) To insert the control information section, which is referred to as 'header' if it isat the beginning of the block, or 'tailer' if it is at the end, to each block. Thissection is to help the receiver to recognize where the beginning and the end of thepacket are, which part of the data sequence it belongs to, and/or where it shouldbe delivered to. The control information section might also contain Frame CheckSequence (FCS) and/or signaling information. The FCS is designed to detectand, if possible, correct the bit errors occurred during transmission. Signalinginformation is the extra information designed to help the transmitter and thereceiver work in harmony. An example of signaling information is congestion andow control bits, which can be seen in many packet-based transmission systems(e.g. Frame Relay).

FCS

Header

PayloadFlag

Signaling information

Figure 2.3: An example format of a packet

At the receiver, the Depacketizing module inverts the action of the Packetizing module,and recovers the transmitted data sequence. Its functions might include:

Page 40: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

28 Project analysis

(a) To extract the signaling information, and to deliver them to control modules,where necessary actions are taken.

(b) To detect and, if possible, to correct the bit errors occurred during transmissionusing the FCS. It must decide whether the packet is ok or not. If not, it mightdiscard and request retransmission of the packet in error.

(c) To remove the 'header' (or 'tailer' ) from the packets. The remaining blocks ofbits are de-interleaved, if necessary. Then, the information has to be put in blocksof bits in the correct order to retrieve the transmitted data sequence.

In our simulation, to reduce complexity, the interleaving, FCS and signaling functionsare not implemented. All packets have the same length. We also assume that there is aperfect packet synchronization scheme between transmitter and receiver, and, therefore,it is not necessary to include the delimiter to help identify the start and stop of thepacket. The receiver are always able to recognize packets from the received bit stream,provided that the start of the bit stream and the packet size are known. As a result,it is not necessary to attach a header or a tailer to the packet. In other words, thePacketizing and Depacketizing modules are included only for the sake of understandingthe system. They do not alter the data sequence at all.

2.4 The discrete-time baseband BPSK modulator

In this section, our target is to develop the discrete-time baseband representation ofBPSK modulator. We also formulate the equation for the discrete-time transmittedsignal energy per bit (Erk), which is needed later to calculate the symbol energy-to-noise ratio (γs).

2.4.1 Baseband representation of BPSK signal

The passband representation of BPSK transmitted signal r(t) is given in equation (1.29).To convert it into baseband equivalent form, r(t), we apply the equation (C.3) (seeAppendix C) and obtain:

r(t) = 2B

∫ +∞

−∞r(ξ)e−j2πfctsincB[t− ξ]dξ

= 2B

∫ +∞

−∞A cos2πfcξ +

π

2[1−m(ξ)]e−j2πfcξsincB[t− ξ]dξ

= 2BA

∫ +∞

−∞cos2πfcξ +

π

2[1−m(ξ)]e−j2πfcξsincB[t− ξ]dξ (2.3)

Page 41: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.4 The discrete-time baseband BPSK modulator 29

where sinc(.) is the sinc function sin(π x)π x

, and B is the bandwidth of the BPSK signal.Using Euler relation for cos(.) function, it is possible to re-write the integral as:

r(t) = 2BA

∫ +∞

−∞

⟨ej π

2[1−m(ξ)] + e−j4π fcξ−j π

2[1−m(ξ)]

⟩sinB[t− ξ]dξ

2Bπ[t− ξ]

= A

∫ +∞

−∞

⟨ Low−frequency︷ ︸︸ ︷ej π

2[1−m(ξ)] +

High−frequency︷ ︸︸ ︷e−j4π fcξ−j π

2[1−m(ξ)]

⟩sinB[t− ξ]dξ

π [t− ξ](2.4)

which may be evaluated by inspection. The left term inside the braces is a low-frequencycomponent which passes through the integration unchanged. The right term inside thebraces is a high-frequency component which evaluates to zero upon integration. Thus,

r(t) = A exp

2[1−m(t)]

=

A for m(t) = 1

−A for m(t) = −1(2.5)

is the baseband expression of BPSK signal. The signal forms two points in the complexplane, as described in gure 2.4.

Figure 2.4: The representation of baseband BPSK signal in complex plane

Page 42: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

30 Project analysis

2.4.2 Discrete-time baseband BPSK signal

This baseband BPSK signal is sampled at a rate of fs. In order to obtain integralnumber of samples in each bit interval, the sampling frequency fs is equal to ms

Tb, where

ms is an integer denoting number of samples per bit duration. The outcome, rk, is indiscrete-time form:

rk = r(kTs) = A exp

2[1−m(kTs)]

(k = 0,±1,±2, · · · ) (2.6)

where Ts is sampling period, which is equal to 1fs. If we dene mk as the discrete-time

sampled version of the binary sequence m(t), we can rewrite the equation (2.6) as:

rk = A exp

2[1−mk)]

=

A for mk = 1

−A for mk = −1(2.7)

The average power of the discrete-time signal, Prk, is dened as the power of the envelopeof the baseband BPSK signal from which it is sampled [17]:

Prk = limL→∞

1

2L+ 1

L∑

k=−L

rkr∗k

= limL→∞

1

2L+ 1

L∑

k=−L

A2

= A2 (2.8)

The average power of the discrete-time baseband signal is double that of the passbandequivalent in equation (1.31). The transmitted signal energy per bit of the discrete-timebaseband signal, Erk, is dened to be equal to:

Erk =ms∑

k=1

rkr∗k = A2ms (2.9)

Note that Erk depends not only on the amplitude of transmitted signal (A), but alsoon the number of samples per bit interval (ms) [17]. We use this equation later on forcalculating the expected symbol energy-to-noise ratio (γs) of the radio channel.

Page 43: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.5 The discrete-time baseband AWGN channel 31

2.5 The discrete-time baseband AWGN channel

In section 1.1.1, we have discussed the passband representation of the AWGN channel.This section develops the desired discrete-time baseband representation of the AWGNchannel. We also discuss briey about how to implement the discrete-time AWGNchannel in our simulation. The equation for equivalent symbol energy-to-noise ratio(γs) for the discrete-time baseband AWGN model is also derived, so that the noise canbe calibrated to give the expected performance.

2.5.1 Baseband model of AWGN channel

If B ¿ fc, then the noise source n(t) is a narrowband signal, and can be represented incanonical form [5]:

n(t) = nI(t) cos(2πfct)− nQ(t) sin(2πfct) (2.10)

where nI(t) is the in-phase component, and nQ(t) is the quadrature component of n(t).Both nI(t) and nQ(t) are real-valued low-pass signals, with zero-mean and Gaussiandistribution. Based on [5], the ACF of nI(t) and nQ(t) are given as:

RnInI(τ) = RnQnQ

(τ) = N0Bsinc(Bτ) (2.11)

Therefore, we can evaluate the variance of nI(t) and nQ(t):

σ2nI

= σ2nQ

= N0B (2.12)

From the equation (2.10), we are able to construct the baseband representation of thepassband noise n(t) as follows:

n(t) = nI(t) + jnQ(t) (2.13)

where n(t) is the complex noise, or baseband representation of the passband noise n(t).It can be shown [17] that the PSD and ACF of the complex envelope are, respectively:

Sn(f) =

2N0 | f |≤ B/2

0 elsewhere (2.14)

andRnn(τ) = 2RnInI

(τ) = 2N0Bsinc(Bτ) (2.15)The PSD and ACF of the baseband noise n(t) are illustrated in gure 2.5. If we denotethe noise power spectral density value of the complex envelope as N0c, then [17]

N0c = 2N0 (2.16)

Equation (2.16) indicates that the noise power spectral density value of baseband noiseis double that of its passband equivalent.

Page 44: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

32 Project analysis

−2 −1.5 −1 −0.5 0 0.5 1 1.5 20

1

2

3

4Power Spectral Density of baseband AWGN

f/fc

Sn(f

)/N

o

−5 −4 −3 −2 −1 0 1 2 3 4 5−0.5

0

0.5

1

1.5

2

2.5Autocorrelation Function of baseband AWGN

τ/B

Rnn

(τ)/

(NoB

)

Figure 2.5: The ACF & PSD functions of the baseband noise [17]

2.5.2 Discrete-time baseband AWGN channel

Let us consider the case when the baseband equivalent of the AWGN channel is sampledwith sampling frequency fs. The discrete form of baseband AWGN channel nk is asfollows:

nk = n(kTs) = nIk + jnQk (k = 0,±1,±2, · · · ) (2.17)

where Ts is the sampling period, which is equal to 1fs, and nIk and nQk are samples of

nI(t) and nQ(t) at multiple Ts instants, respectively, such that:

nIk ≡ nI(kTs) (k = 0,±1,±2, · · · ) (2.18)nQk ≡ nQ(kTs) (k = 0,±1,±2, · · · ) (2.19)

The ACF and PSD functions of the discrete-time noise are shown in gure 2.6, andgiven in the following equations [17]:

Rnknk(k) =

σ2

nkk = 0

0 elsewhere (2.20)

andSnk

(f) =+∞∑

k=−∞Rnknk

(k)e−j2πfkts = Rnknk(0) = σ2

nk(2.21)

Page 45: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.5 The discrete-time baseband AWGN channel 33

−3 −2 −1 0 1 2 3

Autocorrelation Sequence of nk

k

Rn kn k(k

)

2NoB

NoB

−3.5 −2.5 −1.5 −0.5 0 0.5 1.5 2.5 3.5

Power Spectral Density of nk

f

Sn k(f

)

N0d

=2NoB

NoB

0

0

Figure 2.6: The ACF & PSD functions of discrete-time complex noise [17]

where σ2nk

is the variance of the discrete-time complex noise nk. Let N0d represent thediscrete-time complex noise spectral density value. We have [17]:

N0d = σ2nk

(2.22)

Since nIk and nQk are mutually independent and identically distributed, it can be shownthat:

σ2nk

= Rnknk(0) = E[nkn

∗k] = E[n2

Ik + n2Qk]

= σ2nIk

+ σ2nQk

= 2σ2nIk

= 2NoB (2.23)

Within the frequency band | f |≤ B/2, this discrete-noise nk can represent the basebandnoise n(t) [17]. Therefore, we are now able to construct the discrete-time basebandrepresentation of the AWGN channel, which is illustrated in gure 2.7. The channel isrepresented by adding complex noise nk to the discrete-time signal:

sk = rk + nk (2.24)

The complex noise nk is generated using two discrete-time Gaussian sequences, nIk andnQk, which are mutually independent and identically distributed with zero mean andvariances given as:

σ2nIk

= σ2nQk

= N0d/2 (2.25)

Page 46: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

34 Project analysis

Figure 2.7: The discrete-time baseband equivalent of the AWGN channel

The eect of noise in radio channel is often characterized by the symbol energy-to-noiseratio, which is dened as [15]:

γs =Es

No

(2.26)

where Es is the transmitted signal energy per symbol and No is noise spectral density.Using equations (2.9), (2.25) and (2.26), we can nd the relationship between the symbolenergy-to-noise ratio, the amplitude of the complex transmitted signal and the varianceof the baseband noise:

γs =Erd

N0d

=A2ms

2σ2nIk

(2.27)

or, equivalently:σ2

nIk=A2ms

2γs

(2.28)

Equation (2.28) is very important for calibrating the noise variance of nIk and nQk toobtain the expected symbol energy-to-noise ratio in our simulation.

2.6 The discrete-time Rayleigh at fading simulator

In section 1.1.2, we have discussed the Clarke's 2D isotropic scaterring model for aRayleigh at fading channel. We observe that the fundamental characteristics of theRayleigh complex gain are: Its envelope is Rayleigh distributed, and its PSD has the fa-mous 'bath-tub' shape. The objective of our Rayleigh simulator is to generate a discrete-time channel gain, gk, which has the above-mentioned properties. There are severalmethods to implement a Rayleigh fading simulator, however, the most straightforward

Page 47: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.6 The discrete-time Rayleigh at fading simulator 35

Gaussian process

Gernerator

Doppler Spectrum

Shaping Filter

Doppler Spectrum

Shaping FilterGaussian process

Gernerator

Ikg

Qk

~g = g + jk

gIk

gQk

Discrete Complex Gain

Figure 2.8: The Rayleigh at fading channel simulator with shaping lter [15]

one is to lter two independent white Gaussian processes with shaping lters, as shownin gure 2.8.In this mechanism, two independent Gaussian processes, Xk and Yk, are used to producethe in-phase and quadrature branches of the discrete-time complex gain gk. The twoprocesses must have identical distribution, with means zero and the variances σ2

Xk= σ2

Yk.

As a result, the amplitude of the discrete-time complex gain has Rayleigh distribution,and its phase is uniformly distributed in [−π, π].To obtain the bath-tub spectrum at the output, the two branches have to pass througha shaping lter with impluse response hsf (n). There are two methods to implement thislter:

2.6.1 The Fourier Transform Method Simulator

In the Fourier transform method (FTM), we need to calculate the frequency responseof the shaping lter, Hsf (f). The reason is that the signals at the output of the shapinglter have the following forms:

gIk = Xk ⊕ hsf (n) (2.29)gQk = Yk ⊕ hsf (n) (2.30)

where ⊕ denotes the convolution operation. Since convolution in the time-domain isequivalent to multiplication in the frequency-domain, these equations can be re-writtenas:

gIk = F−1

F

Xk

Hsf (f)

(2.31)

gQk = F−1

F

Yk

Hsf (f)

(2.32)

where F. and F−1. are the Fourier and inverse Fourier transform functions, respec-tively; and Hsf (f) is the frequency response of the shaping lter. It means that we can

Page 48: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

36 Project analysis

implement the shaping lter by multiplying the Fourier transform of the processes withthe frequency response of the shaping lter, and then do an inverse Fourier transformto obtain the in-phase and quadrature branches.Assume that a white Gaussian process Xk passes through a linear lter Hsf (f), the PSDof the output signal gIk is [15]:

SgIk(f) = SXk

(f) | Hsf (f) |2= σ2Xk| Hsf (f) |2 (2.33)

The PSD of the in-phase component gIk, for the Clarke 2D model, can be obtained fromequation (1.18) by Fourier transformation [15]:

SgIk(f) = F

RgIgI

(τ) =

E0

4πfm

1√1−(f/fm)2

| f |≤ fm

0 elsewhere(2.34)

Although the spectrum of a Gaussian process is aected by ltering, the PDF is not,so the process at the output of the shaping lter remains Gaussian [10]. Therefore,the white Gaussian process Xk and the output of the shaping lter gIk has identicalstatistical characteristics: mean zero and the same variance. From equation (1.16), wecan write the variances with respect to the total received envelope power E0:

σ2Xk

= σ2gIk

= E0/2 (2.35)

Combining equations (2.33), (2.34) and (2.35), we obtain the frequency response of theshaping lter, which is used later to implement our Rayleigh simulator:

Hsf (f) =

√SgIk

(f)

σ2Xk

=

√1

2πfm

1√1−(f/fm)2

| f |≤ fm

0 elsewhere(2.36)

The main limitation of this approach is that only rational forms of the Doppler spectrumcan be produced, whereas the Doppler spectrum is typically non-rational [15]. Due tothe characteristics of Fast Fourier Transform (FFT), two consecutive samples of theenvelope resulted from FTM simulator are separated by ∆t, which is equal to:

∆t =1

fm

(2.37)

This time dierence is approximately equal to the coherence time of the radio channel,during which the channel's gain remains a constant. In our project, the discrete-timetransmitted signal is sampled at sampling period Ts = 1/fs, which is often much smallerthan ∆t. Therefore, interpolation techniques are required to obtain the envelope sampledat the same period as the transmitted signal:

Page 49: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.6 The discrete-time Rayleigh at fading simulator 37

(a) Linear-interpolation is the method to predict unknown values from any two par-ticular values, with the assumption that the rate of change is constant. In thismethod, the interpolated values are taken from the straight line that connectsthe two known values. The advantage of this method is simple to implement.However, it should not be used for signals with fast changing rates.

(b) Similar to linear-interpolation, the nearest neighbour-interpolation assumes thatthe interpolated signal does not change signicantly during any two samples. Thismethod assigns the value of the nearest neighbour sample to the interpolated sam-ples. Again, there is a risk of signal distortion, if the above-mentioned assumptionis not true. However, this method is simple, and often very fast, to implement.

(c) On the other hand, the FFT-interpolation technique converts the signal to thefrequency domain using FFT technique, appends zeros in the middle of the result,and does an inverse FFT to obtain the interpolated signal. The major advantageof FFT-interpolation is its ability to interpolate periodic functions well. And itdoes not have to assume that the signal has constant rate of change. However,it is relatively more complicated to implement than linear-interpolation. In thistechnique, there is a tendency for the higher frequency components to becomemore dominant, causing distortions [7].

In our simulation, the nearest neighbour interpolation technique is selected, becausewe assume that the channel gain does not vary during channel coherence time (Tc).Furthermore, this technique is relatively faster than other interpolation techniques.

2.6.2 The Markov Process Method Simulator

Another way of implementing the shaping lter is to use a digital Low Pass Filter (LPF).The simplest solution is the rst-order low-pass digital lter, which basically models thefading process as a Markov process:Let gIk ≡ gI(kTs) and gQk ≡ gQ(kTs) represent the in-phase and quadrature branchesof the complex gain at epoch k, where Ts is the sampling period. Then gIk and gQk areGaussian random variables with the state equation:

(gI,k+1, gQ,k+1) = ψ(gIk, gQk) + (1− ψ)(w1,k, w2,k) (2.38)

where w1,k and w2,k are independent zero-mean Gaussian random variables, with vari-ances σ2

w1= σ2

w2= σ2

w. It can be shown that the discrete correlation functions of gIk

and gQk are:

RgIkgIk(n) = RgQkgQk

(n) = E[gIkgI,k+n] =1− ψ

1 + ψσ2

wψ|n| (2.39)

Page 50: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

38 Project analysis

RgIkgQk(n) = RgQkgIk

(n) = 0 (2.40)

With the Clarke 2D model, the desired auto-correlation in discrete-form is, from equa-tion (1.18):

RgIkgIk(n) =

E0

2J0(2πfmnTs) (2.41)

We need to specify σ2w and ψ so that equations (2.39) and (2.41) give the same Doppler

spectrum. Taking the discrete-time Fourier transform of equation (2.39), the PSD isequal to:

SgIk(f) =

(1− ψ)2σ2w

1 + ψ2 − 2ψ cos 2πfTs

(2.42)

One possibility is to arbitrarily set the 3dB point of SgIkgIk(f) to fm/4. Solving the

resulting quadratic for ψ given:

ψ = 2− cos(2πfmTs)−√

(2− cos 2πfmTs)2 − 1 (2.43)

To normalize the mean square envelope to E0, the value of σ2w is chosen as:

σ2w =

E0(1 + ψ)

2(1− ψ)(2.44)

In the Markov process method (MPM), the slow roll-o of the rst-order LPF leavessome high frequency components in the Doppler spectrum, which are apparent in thefaded envelope [15]. We can improve by using a higher-order lter, but it would increasethe complexity of the simulator and the simulation time.In conclusion, we have discussed two methods to implement the shaping lter for ourRayleigh at fading simulator. In this simulator, the two Gaussian noise sources areused to pass through the shaping lter to form the in-phase and quadrature branches ofthe complex gain. The two branches, gIk and gQk, are then combined to produce gk:

gk = gIk + jgQk (2.45)

The advantage of the simulator using ltered white Gaussian noise is the ease by whichmultiple uncorrelated fading waveforms can be generated. What we need is to usedierent uncorrelated noise sources [15].We also need to develop the equation for calculating the symbol energy-to-noise ratiofor our Rayleigh simulator. Similar to equation (1.11), we express our model of thediscrete-time Rayleigh at fading channel as:

sk = gkrk + nk = Ωkrk exp(jαk) + nk (2.46)

Page 51: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.7 BPSK Demodulator 39

where Ωk is the envelope and αk is the phase of the discrete-time complex gain, and nk

is the discrete-time white Gaussian noise source with power spectral density N0d. Theinstantaneous symbol energy-to-noise ratio of the channel is given by [12]:

γs =Ω2

kErd

N0d

(2.47)

where Erd is the transmitted signal energy per bit. The averaged symbol energy-to-noiseratio Γs is then equal to:

Γs = E[γs] =E[Ω2

k]Erd

N0d

=E0Erd

N0d

(2.48)

The averaged symbol energy-to-noise ratio is used later for evaluating the probability oferror in a Rayleigh at fading channel.

2.7 BPSK Demodulator

The task of the receiver is to recover the original binary sequence m(t) from the receivedsignal sk. In case of the AWGN channel, the received signal is corrupted with complexnoise as expressed in equation (2.24). The relationship between the received signal,transmitted signal and noise can be best described by gure 2.9.

Figure 2.9: Received signal in complex plane

Here we can derive the demodulation strategy: In the complex plane, we dene tworegions z1 and z2. If the observed signal sk is in z1, we can conclude that '1' was

Page 52: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

40 Project analysis

transmitted. On the other hand, if sk falls into z2, we assume that '-1' was transmitted.Since the noise of an AWGN channel has zero-mean, averaging the received signal sk inone bit period Tb would reduce the eect of noise. As a result, the gure 2.10 illustratesour demodulation scheme:

Re ( . ) DecisionΣξ m ’

kS S

Ik

Figure 2.10: Block diagram of the BPSK demodulator

The decision variable, ξ, is given by:

ξ =ms∑

k=1

Resk

=ms∑

k=1

Rerk

+

ms∑

k=1

nIk (2.49)

As we explained in section 2.4, the discrete-time baseband transmitted signal rk is aconstant (either A or -A) during one bit period Tb (in equation (2.7). Thus:

ξ = ±msA+ms∑

k=1

nIk (2.50)

The in-phase noise nIk is discrete-time Gaussian noise with mean zero and varianceσ2

nIk. Let us consider the sum of noise variables, X =

∑ms

k=1 nIk. As we know, the sumof Gaussian variables is also a Gaussian. Therefore, X is Gaussian distributed withzero-mean and its variance is given as:

σ2X = E

ms∑

k=1

n2Ik

=

ms∑

k=1

E

n2

Ik

= msσ

2nIk

(2.51)

From equation (2.28), we re-write the variance of X in equation (2.51) as:

σ2X =

m2sA

2

2γs

(2.52)

Since X is a Gaussian variable with zero-mean, its PDF is given as:

fX(x) =1√

2πσX

exp

− x2

2σ2X

(2.53)

Page 53: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.7 BPSK Demodulator 41

2.7.1 Development of MAP decision rule

To dene clearly the regions z1 and z2, our task is to determine γMAP , the Maximuma posteriori (MAP) decision threshold, for our BPSK demodulator. We need to denetwo hypotheses:

H0 : 1 is transmitted (Null hypothesis)H1 : -1 is transmitted (Alternate hypothesis)

The MAP decision rule, which minimizes the probability of error Pe, is of the form [4]:

P [H1 | ξ]H1

><H0

P [H0 | ξ] (2.54)

where P [Hi | ξ], i = 0, 1, is the a posteriori probability of Hi when ξ is observed.Using Bayes rule, the a posteriori probability P [Hi | ξ] can be obtained as:

P [Hi | ξ] =fξ(ξ | Hi)P [Hi]

fξ(ξ)(2.55)

where:fξ(ξ | Hi) : Conditional PDF of ξ given Hi.P [Hi] : Probability of event Hi

fξ(ξ) : PDF of ξThus, the equation (2.54) becomes:

fξ(ξ | H1)P [H1]

H1

><H0

fξ(ξ | H0)P [H0] (2.56)

or equivalently:

L(ξ) ≡ fξ(ξ | H1)

fξ(ξ | H0)

H1

><H0

P [H0]

P [H1](2.57)

where function L(ξ) is called the likelihood ratio. It is more convenient to use thelog-likelihood ratio [4]:

l(ξ) = ln

fξ(ξ | H1)

fξ(ξ | H0)

H1

><H0

ln

(P [H0]

P [H1]

)(2.58)

Page 54: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

42 Project analysis

The conditional PDF of ξ, in the case of hypothesis H0 (i.e. rk = A was transmitted),is:

fξ(ξ | H0) = fX(X) |X=ξ−mA

=1√

2πσX

exp

− 1

2σ2X

(ξ −mA)2

(2.59)

Similarly, the conditional PDF of the decision variable, in the case of the hypothesis H1,is:

fξ(ξ | H1) =1√

2πσX

exp

− 1

2σ2X

(ξ +mA)2

(2.60)

Based on equations (2.58), (2.59) and (2.60), we can calculate the log-likelihood ratiofor BPSK modulator as:

l(ξ) =1

2σ2X

(ξ +msA)2 − (ξ −msA)2

=2msAξ

σ2X

(2.61)

Therefore, our MAP decision rule will be:

l(ξ) =2mAξ

σX

H1

><H0

ln

P [H0]

P [H1]

(2.62)

or equivalently:

ξ

H1

><H0

σ2X

2mAln

P [H0]

P [H1]

≡ γMAP (2.63)

In our simulation, we are sending a random bit sequence with the same probability of-1 and 1, i.e:

P [H0] = P [H1] =1

2(2.64)

As a result, the decision threshold must be:

γMAP =σ2

X

2msAln

P [H0]

P [H1]

= 0 (2.65)

This means if the observable decision variable ξ is greater than 0, the symbol 1 wastransmitted, and if it is less than 0, the symbol -1 was sent. That is how the decisionregions z1 and z2 are dened in our project.

Page 55: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.7 BPSK Demodulator 43

2.7.2 Demodulation in the Rayleigh at fading channel

In the previous section, we have discussed about how to demodulate the received signalin the presence of AWGN. This section extends the demodulator to work with theRayleigh fading channel.As we have mentioned earlier, the received signal in a Rayleigh fading channel is distortedand expressed in equation (2.46). From equation (2.46), we have:

sk = Ωkrk exp(jαk) + nk (2.66)

where Ωk ≡ Ω(kTs) and αk ≡ α(kTs) are the discrete-time envelope and the phase,respectively, of the complex gain at the epoch k, and Ts is sampling period.Figure 2.11 shows the eect of the phase of the complex gain on received signal. In orderto demodulate the received signal, we must have knowledge of the phase and reverse itseect by multiplying the received signal with the conjugate.

Figure 2.11: The eect of the phase of the complex gain on received signal

In practice, there are dierent approaches to estimate this random time-varying phase.However, to reduce complexity, we assume that the phase has already been accountedfor, and the received signal is only eected by the time-varying envelope of the complexgain. Thus, the equation (2.66) reduces to:

sk = Ωkrk + nk (2.67)

The decision variable in equation (2.49) becomes:

ξ =ms∑

k=1

Resk

=

ms∑

k=1

ReΩkrk + nk

(2.68)

Page 56: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

44 Project analysis

Due to the fact that the complex gain remains constant during the channel coherencetime Tc, we can safely assume that its envelope is constant during one bit period Tb.From equations (2.50) and (2.68), we obtain:

ξ = ±msΩA+ms∑

k=1

nIk (2.69)

where Ω is a Rayleigh-distributed random variable representing the channel gain. Thischannel gain aects the received signal strength, and makes the signal to noise ratiovarying (because the envelope of the complex gain itself varies in time). However, we canshow that the channel gain does not aect the decision threshold, and the demodulationscheme used for the AWGN channel can still be used to demodulate the received signalin a Rayleigh at fading channel.

2.7.3 Probability of bit error for AWGN and Rayleigh channels

In this section, we evaluate the probability of error for our detection scheme. In general,this probability is equal to [4]:

Pe = p10P [H0] + p01P [H1] (2.70)

where p10 is the conditional probability of demodulator deciding in favor of symbol -1,given that symbol 1 was transmitted. On the other hand, p01 is the probability ofmaking the error decision that 1 is transmitted, but in fact -1 was transmitted.For the AWGN channel, from gure 2.12, the conditional probability p10 can be obtainedby:

p10 =

∫ γMAP

−∞fξ(x | H0)dx

=

∫ 0

−∞

1√2πσX

exp

− 1

2σ2X

(x−msA)2

dx (2.71)

If we dene a new variable, u = x−msA, and change the variable of integration fromx to u, the equation (2.71) can be re-write as:

p10 =

∫ −msA

−∞

1√2πσX

exp

(− 1

2σ2X

u2

)du (2.72)

Replacing σ2X from equation (2.52) to equation (2.72), we obtain:

p10 =

∫ −msA

−∞

√γs

msA√π

exp

(− γs

m2sA

2u2

)du (2.73)

Page 57: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.7 BPSK Demodulator 45

Figure 2.12: Probability density function of decision variable ξ under H0 and H1

Now we can dene another variable, v = −u√

γs

msA, and again change the variable of

integration from u to v to get:

p10 =1√π

∫ ∞

√γs

exp(−v2)dv

=1

2erfc(

√γs) (2.74)

where erfc(.) is the complementary error function.Similarly, we obtain the conditional probability of the demodulator deciding in favor ofsymbol 1, given that -1 was transmitted:

p01 =1

2erfc(

√γs) (2.75)

From equation (2.64), (2.70), (2.74) and (2.75), the probability of bit error for BPSKdemodulation scheme under AWGN channel is given as:

PeA =1

2erfc(

√γs) =

1

2erfc

(√Erk

N0

)(2.76)

To evaluate the probability of error of the BPSK modulation scheme in the Rayleighchannel, we have to average the probability of error of the scheme in AWGN channelover the possible range of signal strength due to fading:

PeR =

∫ ∞

0

PeW (γs)fγs(γs)dγs (2.77)

where PeR is the probability of error in the Rayleigh at fading channel, PeW (γs) is theprobability of error for BPSK modulation in an AWGN channel, at a specic value ofsignal to noise ratio γs, which is given in equation (2.76). The fγs(γs) is the probability

Page 58: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

46 Project analysis

density function of γs due to the fading channel. For Rayleigh fading channel, the gk

has a Rayleigh distribution, so g2k and consequently γs have a chi-square distribution

with two degrees of freedom [12]:

fγs(x) =1

Γs

exp

(− x

Γs

)x ≥ 0 (2.78)

where Γs is the averaged symbol energy-to-noise ratio, shown in equation (2.48).Thus, for coherent BPSK demodulation, the probability of error is evaluated as fol-lows [12]:

PeR =1

2

[1−

√Γs

1 + Γs

](2.79)

2.7.4 Probability of packet error for AWGN channel

We can also evaluate the probability of packet error for BPSK demodulation schemeunder AWGN channel. The AWGN channel is also known as a Binary SymmetricChannel (BSC), which satises the following conditions:

(a) Each time a bit is transmitted, a bit is arrived at the receiver but it may arrivecorrupted.

(b) There is a probability Pe that a transmitted bit '-1' is received as '1', and the sameprobability Pe that a transmitted '1' is received as '-1'.

(c) The probability of error for any bit during transmission is statistically independent(or errors occur independently).

Pe

Pe

Pe( 1 − )

Pe( 1 − )+1

−1−1

+1

Figure 2.13: The probability of error in Binary Symmetric Channel

For any transmitted packet with length L, it is considered 'errored' if one or more of itsbit(s) corrupted during transmission. The probability Qe of errored packet in BSC isequal to:

Qe = 1− Qe (2.80)

Page 59: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.8 Diversity module 47

where Qe is the probability of there is no bit error in the packet. Due to the thirdcharacteristic of the BSC, the probability Qe is actually multiplication of the probabilityof no error for every L bits in the packet, or:

Qe = 1− (1− Pe)L (2.81)

Later, we are going to compare our simulation results against the theoretical probabilityof packet error in equation (2.81).

2.8 Diversity module

In section 2.6, we have learnt that the Rayleigh simulator is capable of generating Nb

uncorrelated Rayleigh envelopes, provided that dierent uncorrelated noise sources areused. Assuming that this has been done, we can obtain Nb diversity branches at thereceiver. The signal at the ith diversity branch, sk,i, is given as:

sk,i = gk,irk + nk,i (2.82)

where gk,i and nk,i are the complex gain and the noise associated with the ith branch (i =

1, 2, . . . Nb). The BPSK demodulator, which is discussed in the section 2.7, only needsthe in-phase component of the received signal, and therefore removing the quadraturecomponent does not aect the demodulation process. As a result, our diversity modulesfor SC, EGC, and MRC work only with the in-phase components, sIk,i (i = 1, 2, . . . Nb),of the received signals, as illustrated in gure 2.14.

sIk,i = Re

sk,i

(i = 1, 2, . . . Nb) (2.83)

DecisionΣξ m ’S

Ik

D i

v e

r s

i t y

. .

.

Re ( . )S

Re ( . )

k2S

Re ( . )S

k1

kN b

Figure 2.14: BPSK demodulator with diversity techniques

Page 60: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

48 Project analysis

2.8.1 Selection Combining Module

As we have discussed in section 1.1.3, a SC diversity module chooses among the incomingdiversity branches the signal with the highest SNR and delivers it to the demodulator.

sSC = max(SNR)

sIk,1, sIk,2, . . . sIk,Nb

(2.84)

where sSC is the output of the SC diversity module, and max(SNR) denotes the maximiz-ing function with respect to SNR. Assuming that the noise powers are constant at allbranches, the branch with the highest SNR also has the highest signal-plus-noise power.We need to dene the signal-plus-noise power of the ith branch as:

PsIi=

Nm∑j=1

s2Ij,i (i = 1, 2, . . . Nb) (2.85)

where Nm is the number of samples during which the power is calculated. In a SCscheme, we monitor the signal-plus-noise powers of all incoming branches, and selectthe branch with the highest power level. The monitoring and selection can be done ona bit-by-bit basis (referred as to 'bit-by-bit selection scheme'), where Nm is setup to beequal to number of samples per bit ms. Alternately, we can do it on a packet-by-packetbasis (referred as to 'packet-by-packet selection scheme'), and Nm is chosen to be thenumber of samples per packet. Since the channel gain may vary in one packet duration,the packet-by-packet selection scheme depends greatly on the packet lenghts. Studyingthe eects of packet lengths on a SC diversity technique using packet-by-packet selectionscheme is one of our goals in this project.With ideal SC, the branch with the largest symbol energy-to-noise ratio is always se-lected. Therefore, the PDF of the instantaneous symbol energy-to-noise ratio, γSC

s , atthe output of the selective combiner is [15]:

fγSCs

(x) =Nb

Γs

[1− exp(−x/Γs)

]Nb−1

exp(−x/Γs) (2.86)

where Γs is the average symbol energy-to-noise ratio. The probability of bit error ofBPSK with SC diversity is obtained by averaging the probability of bit error for BPSKin AWGN channel over the PDF of γSC

s [9]:

PeSC =

∫ ∞

0

Pe(x)fγSCs

(x)dx

=Nb

2Γs

∫ ∞

0

erfc(√x)

[1− exp(−x/Γs)

]Nb−1

exp(−x/Γs)dx

=1

2− Nb

2

Nb−1∑

k=0

(−1)k

1 + k

(Nb − 1)!

(Nb − 1− k)!k!

√Γs

Γs + k + 1(2.87)

(2.88)

Page 61: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.8 Diversity module 49

2.8.2 Equal Gain Combining Module

The output of the EGC diversity module is the sum of all incoming diversity branches:

sEGC =

Nb∑i=1

sIk,i (2.89)

where sEGC is the output of the EGC diversity module.Unlike the SC and the MRC scheme which will be discussed later, the EGC is notaected by the packet length.The PDF for the symbol energy-to-noise ratio of the output of EGC diversity module,γMRC

s , does not exist in closed form for Nb > 2. However, for Nb = 2, the PDF is equalto [15]:

fγEGCs

(x) =1

Γs

e−2x/Γs +√πe−x/Γs

(1

2√xΓs

− 1

Γs

√x

Γs

)(1 + 2Q(

√2x

Γs

)

)(2.90)

where Q(.) is the Q-function [12]. The theoretical probability of error for coherent BPSKdemodulation with EGC diversity is given as [15]:

PeEGC =1

2

(1−

√1− µ2

)(2.91)

where µ = 11+Γs

.

2.8.3 Maximal Ratio Combining Module

The output of the MRC diversity module is the combination of all incoming diversitybranches weighted proportionately to their signal voltage to noise power ratios:

sMRC =

Nb∑i=1

aisIk,i (2.92)

where sMRC is the output of the MRC diversity module, and ai is the weight factorassociated with the ith branch. From equation (1.28), we choose to calculate the discrete-time weight factors as follows:

ai =

∑Nm

j=0 | sIj,i |NmNo

(i = 0, 1, . . . Nb) (2.93)

where Nm is the number of samples in which ai is observed, and | . | denotes the absolutevalue operation. Again, here we can update the weight factors on either a bit-by-bit ora packet-by-packet basis. In our simulation, both of the schemes are used, so that wecan observe their eects on the results.

Page 62: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

50 Project analysis

If all the diversity branches are balanced (which is a reasonable assumption with antennadiversity) and uncorrelated, then the instantaneous symbol energy-to-noise ratio of theoutput of MRC diversity module, γMRC

s , has a chi-square distribution with 2Nb degreesof freedom [15]:

fγMRCs

(x) =1

(Nb − 1)!ΓNbs

xNb−1 exp(−x/Γs) (2.94)

Thus, the theoretical probability of error for BPSK with MRC diversity is given as [15]:

PeMRC =

(1− µ

2

)Nb Nb−1∑

k=0

(Nb − 1 + k)!

(Nb − 1)!k!

(1 + µ

2

)k

(2.95)

where µ =√

Γs

1+Γs

2.9 Conclusions

Based on the MC simulation principle, we develop the block diagram for our simulationand present it in this chapter. We discuss the functions of every block, and build up thediscrete-time models for them.We select the m-sequence as the data source of our simulation, because it is randomin nature, very simple to generate, and we can use the same sequence for dierentsimulation arrangements. This enables us to run dierent simulations under the sameconditions, i.e. all of them receive identical data input.To reduce complexity, we choose not to implement interleaving and FCS in our packe-tizing / depacketizing modules. Instead, the data stream is left unmodied and goes tothe modulator. At the receiver, we estimate the packet error rate based on the positionof bit errors and the packet lengths.We develop the discrete-time models for both the AWGN and the Rayleigh channel.The channels are represented by their instantaneous and average symbol energy-to-noise ratio, and the equations for calibration of these parameters of the simulators arealso introduced. Two dierent methods for simulating Rayleigh channel are discussed:the Fourier transform method (FTM) and the Markov process method (MPM). We willanalyse their performance in details in the next chapter.The discrete-time models for BPSK modulator and modulator are developed. We deneclearly the method with which signals are modulated and demodulated for our simula-tion. The theoretical probabilities of bit error for our modulation scheme are derivedand presented for both of the AWGN and the Rayleigh at fading channels.In addition, we discuss about how to implement the diversity combining techniques,namely Selection Combining (SC), Equal Gain Combining (EGC) and Maximal Ratio

Page 63: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

2.9 Conclusions 51

Combining (MRC) in our simulation. The theoretical probabilities of bit error for eachdiversity scheme are given, so that we can compare the simulated results against them.In the next chapter, we combine the individual blocks discussed in this chapter to forma simulation system, and consider the practical aspects of the implementation of thesimulation. The choices of simulation parameters are explained. We also present theobtained results, along with our analysis.

Page 64: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 65: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Chapter

3Implementation and result analysis

3.1 Implementation of project

In the previous chapter, we built up the foundation for the simulation by analysing thefunctions of each simulation block and developing the mathematical models for them.In this section, we discuss how to form a simulation system from those individual blocks,and share some of our observations during the execution.

Figure 3.1 is the owchart of our simulation. First, all the parameters, which are dis-cussed into details later, are initialized. Second, the data source generates a binarym-sequence in NRZ format, and delivers it to the modulator. The sequence is alsostored for later use by the BER test module.

Passing through the channel module, the transmitted signal at the output of the mod-ulator is distorted by AWGN or Rayleigh narrowband at fading channel. To obtainuncorrelated diversity branches, Nb independent channel modules are employed. Subse-quently, these branches are merged at the diversity combining module to construct the'best' signal for demodulation. The diversity module can be the SC, EGC or MRC mod-ule. Next, the demodulator recovers the data sequence from the output of the diversitymodule.

Finally, the recovered and original data sequences are compared at the BER test moduleto nd out how many bits were in error. The positions of errored bits are kept, so thatthe PER test module can decide how many packet errors have occurred for a givenpacket length. Here our analysis is based on the assumptions mentioned in section 2.3that a perfect packet synchronization scheme exists between the transmitter and thereceiver. Therefore, the receiver can always extract packets with a given length fromthe bit stream, provided that the beginning of the bit stream is known.

The detailed owcharts for each module are given in Appendix D. We also include theMatlab codes for these modules in the CD-ROM that accompanies this report.

53

Page 66: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

54 Implementation and result analysis

START

END

Parameters setup

Modulator

Data source

Channel Channel

Diversity Combiner

Demodulator

BER test

PER test

Figure 3.1: The owchart for simulation

Page 67: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.1 Implementation of project 55

3.1.1 Simulation parameters

An important part of our simulation is to identify the simulation parameters and selecttheir values. We choose to investigate the 900MHz frequency band, which is currentlyallocated to Global System for Mobile communication (GSM) services. Therefore, oursimulated system operates with the carrier frequency fc of 900MHz. The Rayleigh atfading condition requires that the bit period Tb, which is reciprocal of signal bandwidth,be much greater than the rms delay spread στ of the channel. Assuming that we simulatethe typical urban environment, where the rms delay spread is around 1.0µs [15], thenthe bit period should be at least 100µs. This is equivalent to the bit rate fb of 10kbit/s.Spectral eciency is not the major concern in this project. We assume that there is noconstrain in the bandwidth of the transmitted signal, i.e. the transmitter can use thewhole frequency spectrum for transmission. Therefore, the baseband signal is sent inits original NRZ format, and none of the pulse shaping lters, such as Nyquist, RaiseCosine or Root Raised Cosine, is used. To represent the pulse, the baseband transmittedsignal is sampled at the rate of fs = 2 ∗ 104, i.e. two samples per bit (ms = 2).The maximum Doppler frequency fm, which is directly related to the velocity of themobile receiver, has a strong impact on the Rayleigh at fading channel. We expectthat the faster the speed, the faster the rate of change of the channel. To facilitate ourinvestigation, the Rayleigh at fading channel is simulated at three dierent velocities V :5km/h for pedestrians, 60km/h and 120km/h for high-speed vehicles in city areas andon high-way, respectively. At a carrier frequency 900MHz, the corresponding maximumDoppler frequencies fm are 4.17, 50 and 100Hz.The choice of velocities also has an inuence on the selection of the packet sizes inour simulation. The channel coherence time Tc, during which the characteristics of thechannel remains relatively constant, is inversely proportional to the maximum Dopplerfrequency fm. In our case, the channel coherence times Tc are 0.24, 0.02 and 0.01s,respectively. These coherence times are accordingly equivalent to the period of packetswith length 2400, 200 and 100bits. In our project, the packet sizes are chosen 1000, 200and 100bits. We expect all of them to work ne in Rayleigh channel with velocity of5km/h, but only some of them work at higher velocities. These length are shown to bepractical. In reality, a packet should be of sucient length, so that it can accomodateboth the header and the payload information. It should not be too long, either. Largepackets tend to experience more errors than smaller ones. Moreover, if an uncorrectableerror occurs in the packet during transmission, the whole packet must be resent. Theshorter the packet, the fewer bits have to be re-transmitted, and therefore the moreecient the transmission link is. For example, in GSM standard, a burst of bits (orpacket) is 148 bits long with 114 data bits.The validity and the accuracy of the MC simulation results depends on the correctnessof the modeling and estimation techniques, and generally, on the length of simulation.

Page 68: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

56 Implementation and result analysis

The longer we run the simulation, the closer the observation tends to the true value.There is a tradeo between the run time and the accuracy of the measurement. Inpractice, it is shown that a number of bits in the range of 10/p to 100/p, where p is thetrue BER, will result in a reasonable uncertainty in the estimation [8]. The values ofthe numerator in above fractions (i.e. 10 or 100) are called Monte Carlo (MC) factors.In our simulation, the MC factors are dierent for dierent types of simulation setups(see table 3.1). These values are selected via several trials of our simulation, they giveacceptable results and do not take months to nish.

Having the MC factor, we need the true BER, p, to nd out how many bits we shouldsend in each simulation. Fortunately, for the BPSK modulation, the AWGN, Rayleighand diversity techniques do have theoretical BER curves, from which we could obtainthe 'true BER' at any SNR level. If it is not the case, we can not obtain the number oftest bits straightforward, but via a trial-and-error method (i.e. reaching a satisfactoryvalue for the number of test bits by trying out various values, from low to high, untilthe dierence in corresponding results is suciently reduced or eliminated, even if thenumber of test bits continues to increase). The latter is very time-consuming, and shouldonly be done when there is no other option. Based on the MC factor and the theoreticalBER, we are able to calculate the required number of test bits per SNR level. The timeassociated with a particular simulation setup, therefore, can also be estimated.

The SNR range for the AWGN channel simulation is chosen from 0 to 10dB, with a2dB step. The reason for selecting this range is that we are interrested only in thesystem performance at SNR greater than 0dB, i.e. the signal energy is greater than thenoise power. Ideally, we should investigate the SNR levels from 0 to 20 or 30dB, whichis the working range for many wireless systems. However, because the BER virtuallyexponentially decreases with SNR level, the number of bits, and hence the simulationtime, required to test higher SNR level also increases exponentially. Our calculationshows that, if the simulation time for SNR range from 0 to 10dB is 18 hours, the timerequired for SNR range from 0 to 12dB is 7548 hours or aprroximately one year. Due tothis fact, we restricted ourselves to the simulation of an AWGN channel for the 0-10dBSNR range. The same reasons are applied to the selection of SNR ranges for othersimulation setups.

For three dierent types of diversity techniques, we choose to investigate the dierencebetween two and three diversity branches. Moreover, in the case of SC and MRC,three dierent selection schemes are tested: on a bit-by-bit basis, on a packet-by-packetbasis and on packet-by-packet with short monitoring duration basis. The rst andthe second are discussed in section 2.8. The third scheme means that we monitor thepowers of all the diversity branches for only short period of time at the beginning ofthe packet, and apply the monitoring result for entire packet. This scheme is often usedin practice, because it greatly reduces the processing load at the receiver with some

Page 69: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.1 Implementation of project 57

trade-o in performance. Our goal is to analyse the dierence in performance for thesethree selection schemes.The list of parameters in our simulation is presented in table 3.1.

Descriptions Notations and valuesType of channel models AWGN and RayleighType of diversity techniques SC, EGC and MRCCarrier frequency [Hz] fc = 900 ∗ 106

Wavelength of the carrier [m] λc = 3.108/fc = 0.3333

Bit period [s] Tb = 10−4

Rate of data sequence [bit/s] fb = 1/Tb = 104

Transmitted signal amplitude A = 1

Number of samples per bit ms = 2

Sampling frequency [Hz] fs = ms ∗ fb = 2 ∗ 104

Velocity of the mobile receiver [km/h] V = [5, 60, 120]

The maximum Doppler frequency [Hz] fm = V/λc = [4.17, 50, 100]

Packet size [bit] L = [100, 200, 1000]

MC factor for AWGN simulation AMCF = 103

MC factor for Rayleigh simulation RMCF = 4 ∗ 104

MC factor for diversity simulation DMCF = 3 ∗ 103

SNR range for AWGN simulation [dB] γsA = 0 : 2 : 10

SNR range for Rayleigh simulation [dB] γsR = 0 : 2 : 26

SNR range for diversity simulation [dB] γsD = 0 : 2 : 16

Number of diversity branches Nb = [2, 3]

Table 3.1: Simulation parameters and their values

3.1.2 Verication of Rayleigh at fading simulators

In section 2.6, we have mentioned two methods to generate the discrete-time complexgain gk of the Rayleigh at fading channel: The Fourier transform method (FTM)and the Markov process method (MPM). We implement both of them, and verify theirperformance using the parameters listed in table 3.2.The envelopes of the complex gains obtained by the two dierent methods are plottedin gure 3.2. In the gure, we can see that both of the envelopes change randomly intime. Their mean levels of the envelopes are around 0dB. The typical fading level ofthe envelope is from 5-10dB, and sometimes deep fades of 10-20dB also occur. However,due to the slow roll-o of the rst-order LPF, the fade envelope of MPM contains manyhigh-frequency components, and therefore it changes very fast [15]. On the other hand,the FTM envelope changes at much slower rate: Its samples are separated by ∆t = 1/fm,

Page 70: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

58 Implementation and result analysis

Name of parameters ValuesCarrier frequency [Hz] fc = 900 ∗ 106

Velocity of mobile receiver [km/h] velocity = 120

Maximum Doppler shift frequency [Hz] fm = 100

Channel coherence time [s] Tc = 1/fm = 0.01

Rate of data sequence [bit/s] fb = 104

Number of samples per bit m = 2

Sampling frequency [Hz] fs = mfb = 2 ∗ 104

Sampling period [s] Ts = 1/fs = 0.05 ∗ 10−3

Number of samples of the complex gain N = 215

Table 3.2: Parameters for testing Rayleigh simulators

which is much larger than the sample period Ts of the transmitted signal. As a result,we have to interpolate the FTM envelope before applying it to the transmitted signal.Figures 3.3 and 3.4 show the PDFs and the Cumulative Distribution Function (CDF)sof the envelopes and phases of the two complex gains. They are plotted against thetheoretical curves. We can observe that both of the simulated complex gains haveRayleigh-distributed envelopes and uniformly-distributed phases. This agrees with thestatistical characteristics of the complex gain of Clarke's 2D model.In gure 3.5 and 3.6, the PSD and ACF of the complex gains are analysed, respectively.Clearly, there are dierences between the simulated curves and the theoretical curves.In order to obtain a ner Doppler spectrum for the simulated complex gain, the shapinglter of higher-order is required. The high-order lter has a long impulse response, andthus will signicantly increase the run-time for our simulation.Using the FTM, we generate two separate complex gains to verify its decorrelationproperty. In gure 3.7, the CCF of the two separate complex gains is approximatelyzero. It shows that two (or more) independent complex gains are uncorrelated. Thisis an advantage of FTM, and we are able to generate multiple uncorrelated diversitybranches for simulation of diversity techniques.It is also important to consider the time required for each simulation. Since we need togenerate a large number of Rayleigh envelope samples, the selected simulation methodmust not take too long to complete. Running on the same workstation and with thesame input parameters, the two methods need quite dierent amounts of time to nish(see Table 3.3). The simulation time for MPM is about 60 times that of FTM for 215

samples of the complex gain, and the time dierence is even greater for larger numberof samples.In conclusion, both the MPM and FTM are able to generate the complex gain of Rayleighat fading channel. They are nearly equal in terms of performance. However, the MPMis too slow to implement. The FTM is a more suitable solution for our simulation:

Page 71: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.1 Implementation of project 59

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000−25

−20

−15

−10

−5

0

5

10

The envelopes of the complex gains, fm

Tb = 0.01

Time, t/Tb

Env

elop

e le

vel [

dB]

MPMFTM

Figure 3.2: The envelopes of the complex gains

0 0.5 1 1.5 2 2.50

0.2

0.4

0.6

0.8

1The PDFs of the envelopes of the complex gains

Envelope level

PD

F

MPMFTMTheoretical

0 0.5 1 1.5 2 2.50

0.2

0.4

0.6

0.8

1The CDFs of the envelopes of the complex gains

Envelope level

CD

F

MPMFTMTheoretical

Figure 3.3: The PDFs and CDFs of the envelopes of the complex gains

Page 72: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

60 Implementation and result analysis

−3 −2 −1 0 1 2 3

0

0.2

0.4

0.6

0.8

1The PDFs of the phases of the complex gains

Phase value [rad]

PD

F

MPMFTMTheoretical

−3 −2 −1 0 1 2 3

0

0.2

0.4

0.6

0.8

1The CDFs of the phases of the complex gains

Phase value [rad]

CD

F

MPMFTMTheoretical

Figure 3.4: The PDFs and CDFs of the phases of the complex gains

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−60

−50

−40

−30

−20

−10

0

The PSDs of the complex gains

Normalized frequency (f−fc)/f

m

Nor

mal

ized

PS

D [d

B]

MPMFTMTheoretical

Figure 3.5: The PSDs of the complex gains

Page 73: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.1 Implementation of project 61

−10 −8 −6 −4 −2 0 2 4 6 8 10−0.5

0

0.5

1The ACFs of the complex gains

Delay τ/Tc

Nor

mal

ized

AC

F

MPMFTMTheoretical

Figure 3.6: The ACFs of the complex gains

−100 −80 −60 −40 −20 0 20 40 60 80 100

0

0.2

0.4

0.6

0.8

1

Delay τ/Tc

CC

F

The CCF of the two simulated complex gains using FTM

Figure 3.7: The CCF of two complex gains generated by FTM

Page 74: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

62 Implementation and result analysis

Method Simulation timeMarkov Process Method 0 minute 57.65 secondsFourier Transform Method 0 minute 0.54 seconds

Table 3.3: Times associated with Rayleigh simulation methods

It provides acceptable performance, while it runs much faster than the MPM. Its onlydisavantage is that we need to interpolate the envelope before applying it to transmittedsignal. The interpolation introduces distortion to the resulted complex gain. We choosethe nearest neighbour-interpolation method for our simulation, because it is very fast.The fact that the complex gain does not change much within channel coherence time(Tc) makes the nearest neighbour-interpolation possible.

3.2 Analysis of simulation results

3.2.1 AWGN vs. Rayleigh channel

The BER curves

Figure 3.8 is the BER plot for both AWGN and Rayleigh channels. The simulated BERcurves are drawn against the theoretical curves for comparison. The Rayleigh channelis generated for a mobile receiver moving at a velocity of 60km/h.

We can see clearly from the gure that the system performance in a Rayleigh channelis much worse than that of AWGN channel. The BER curve, which is exponentiallydecreasing in the case of a AWGN channel, has turned into an inverse-linear function ofSNR for Rayleigh at fading channel [13]. This is due to the fact that the time-varyingenvelope of the Rayleigh at fading channel decreases the instantaneous SNR of thesystem. The probability of error caused by the fading can be reduced by increasingtransmitted power, but the cost associated with this method often does not allow usto do so. Therefore, it is dicult to achieve reliable transmission in Rayleigh at fad-ing channel, unless some techniques to combat the fading are introduced to bring theprobability of error down.

We can also observe that the simulated BER curves t the theoretical ones, except forthe Rayleigh curve at some high SNR values. We can improve the result by running thesimulation for longer time. The main point is that this plot conrms our discrete-timemodels of the transmitter, the channels and the receiver are working correctly. We canconveniently use them to simulate and analyse the rest of our project.

Page 75: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.2 Analysis of simulation results 63

0 5 10 15 20 2510

−6

10−5

10−4

10−3

10−2

10−1

The BER of AWGN and Rayleigh flat fading channel, fm

Tb = 0.005

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighSimulated AWGNSimulated Rayleigh

Figure 3.8: The BER plot for AWGN and Rayleigh channels

The PER curves

In gure 3.9, the theoretical and simulated PER curves for AWGN and Rayleigh channelsare given. We use the packet length of 100 bits for simulation. Assuming that theRayleigh channel is BSC, we use equation (2.81) to plot its corressponding theoreticalPER curve, which is denoted as 'Theoretical Rayleigh (BSC)' in the gure. This curveserves as a useful reference for our later discussion.From the gure 3.9, it is obvious that, while the AWGN channel is a BSC, the Rayleighat fading channel is not. The simulated PER curve for AWGN matches with thetheoretical one for BSC with the same packet length. On the other hand, the PERcurve for Rayleigh seems to be better than that of the equivalent BSC. The reason isthat, for Rayleigh at fading channel, the bit errors are not evenly distributed amongthe packets. Instead, burst errors often occur, i.e. a number of consecutive bits arein error. This causes some packets to experience more bit errors, while some othersto be error-free. Packets transmitted during times of deep fades are subject to higherprobability of packet error. As a result, the PER of Rayleigh fading channel is lower thanthat of equivalent BSC, but the chance for a long-burst error to happen in a packet ishigher. This situation prevents error control coding techniques from eectively detectingand correcting errorsin the packet. For the packet-based mobile communication systemworking under Rayleigh at fading condition, interleaving schemes are often employed.The principle of interleaving schemes is to divide a packet into several small blocksof bits and send them separately, so that the long-burst error can be separated into

Page 76: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

64 Implementation and result analysis

0 5 10 15 20 25

10−3

10−2

10−1

100

The PER of AWGN and Rayleigh flat fading channelfm

Tb = 0.005 and Packet size = 100bits

Pac

ket e

rror

rat

e

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical Rayleigh (BSC)Simulated AWGNSimulated Rayleigh

Figure 3.9: The PER plot for AWGN and Rayleigh channels

single random or short-burst error as much as possible. It prevents a block of data frombeing completely corrupted, and enables error control coding techniques to work moreeciently.

3.2.2 Benets of diversity techniques

Two diversity branches

Figure 3.10 shows the results from simulations of three dierent diversity techniques,namely SC, EGC and MRC. They are plotted in comparison with the theoretical curvesderived in section 2.8. The number of diversity branches used here is 2. We use thepacket-by-packet selection scheme during these simulations. The Rayleigh at fadingchannel is simulated for a mobile receiver at a velocity of 60km/h.It is clear that, with only two branches, diversity techniques have eciently reducedthe BER on Rayleigh at fading channel. The most ecient technique, in terms ofperformance, is the MRC. The EGC, ranked second, is comparable to the MRC, andthe worst is SC technique. However, we notice that the ranking order is reversed, ifwe are interested in how simple their implementations are. The SC is the easiest toimplement, while EGC and MRC are relatively more complicated, because they requirethe diversity branches to be co-phased before summing (see section 1.1.3). As a result,the SC technique is often a preferred option for diversity implementation in practice.

Page 77: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.2 Analysis of simulation results 65

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

Diversity techniques and the improvement of BERfm

Tb = 0.005, Packet size = 100bits and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical SCTheoretical EGCTheoretical MRCSimulated SCSimulated EGCSimulated MRC

Figure 3.10: The BER plot for diversity techniques (Nb = 2)

0 2 4 6 8 10 12 14 16 1810

−3

10−2

10−1

100

Diversity techniques and improvement of PER fm

Tb = 0.005, Packet size = 100bits and N

b = 2

Pac

ket e

rror

rat

e

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNSimulated RayleighSimulated SCSimulated EGCSimulated MRC

Figure 3.11: The PER plot for diversity techniques (Nb = 2)

Page 78: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

66 Implementation and result analysis

Figure 3.11 shows the corresponding PER curves for simulations of diversity techniques.The packet size used here is 100 bits. There is no doubt that, by reducing the BER level,diversity techniques also bring down the PER on Rayleigh at fading channel. This isdue to the fact that the PER depends on the level of BER and the packet length.

Three diversity branches

In gure 3.12 is the BER results of diversity simulations with 3 branches. The theoreticalBER curve for 2-branch diversity with MRC, which is the lowest theoretical BER curvefor 2-branch diversity, is plotted in this gure for comparison. Since the theoreticalexpression for BER of EGC with more than 2 branches does not exist in closed form,only theoretical curves for SC and MRC at 3-branches are drawn here. Unfortunately,because the time required for simulations of 3-branch diversity is nearly as much as forthe AWGN channel, the range of SNR for this simulation is limited to 8dB.

0 2 4 6 8 10 12 14 1610

−5

10−4

10−3

10−2

10−1

Diversity techniques and the improvement of BERfm

Tb = 0.005, Packet size = 100bits and N

b = 3

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical MRC (N

b=2)

Theoretical SC (Nb=3)

Theoretical MRC (Nb=3)

Simulated SCSimulated EGCSimulated MRC

Figure 3.12: The BER plot for diversity techniques (Nb = 3)

In gure 3.12, we can see a similar trend in 3-branch diversity as in 2-branch diversity:The MRC continues to provide the best peformance. Next is the EGC, the performanceof which is only a little poorer than the MRC. According to [6], the dierence betweenthe SNR gains of the EGC and MRC is only 1.05dB in the limit of an innite numberof branches. The SC is still the worst. However, by adding one more diversity branch,3-branch diversity outperformed the 2-branch one. Even the worst case, the BER of3-branch simulation (SC) is still better than the BER given by any 2-branch diversity

Page 79: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.2 Analysis of simulation results 67

schemes. We can conclude that increasing number of diversity branches is an eectiveway to boost the performance of the system. Nevertheless, the greatest improvement isfrom going from 1-branch to 2-branch. The improvement becomes less and less if we gofrom 2-branch to 3-branch or higher. Moreover, this method is not always applicable.For example, in polarization diversity, the number of diversity branches can not begreater than 2 (see section 1.1.3). In space diversity, especially at compact MSs, thereis often no space for putting more diversity antennas.We also notice that diversity techniques can bring system performance over what is seenas 'upper bound' of mobile communications. For 3-branch MRC, the system performanceis even better than that of AWGN for the SNR range below 6-7dB.

3.2.3 The eects of packet length

The eects on AWGN and Rayleigh at fading channels

One of the main goals in our project is to investigate the eects of the packet lengthon the performance of any packet-based communication system. Figure 3.13 shows thePER plot for the AWGN and Rayleigh channel, with dierent packet sizes: 100, 200and 1000 bits. The velocity used in Rayleigh channel simulation is still 60km/h.

0 5 10 15 20 25

10−3

10−2

10−1

100

The effect of packet length (L [bit]) on AWGN and Rayleigh channels f

mT

b = 0.005

Pac

ket e

rror

rat

e

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGN, L = 100Theoretical AWGN, L = 200Theoretical AWGN, L = 1000Simulated AWGN, L = 100Simulated AWGN, L = 200Simulated AWGN, L = 1000Simulated Rayleigh, L = 100Simulated Rayleigh, L = 200Simulated Rayleigh, L = 1000

Figure 3.13: The eect of packet length on AWGN and Rayleigh channel

From gure 3.13, we can verify the validity of equation (2.81): The PER of a BSC isinuenced by the BER level and the packet size. It is not only true for a BSC like

Page 80: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

68 Implementation and result analysis

AWGN, but also for a Rayleigh channel. The simulation is shown that for packet lengthof 1000 bits, the PER is much higher than for 100 bit packet.

The eect of diversity techniques

As previously discussed in section 2.8, unlike the EGC diversity technique, the SC andMRC using packet-by-packet selection scheme are aected by the length of packets. Inthis section, we are going to investigate the inuence of packet length on both the SCand MRC schemes.Figures 3.14 and 3.15 show the simulated BER curves with dierent packet lengths forthe SC and MRC, respectively. The same Rayleigh channel, with velocity 60km/h, isused for both simulations. Here we use the 'packet-by-packet selection scheme', wherediversity branches are monitored during the entire packet duration, and they are com-bined with the information gathered by the monitoring process.

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of packet length (L [bit]) on SC diversity technique f

mT

b = 0.005 and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical SC (N

b = 2)

Simulated SC, L = 100Simulated SC, L = 200Simulated SC, L = 1000

Figure 3.14: The eect of packet length on SC diversity technique

For the SC diversity, we observe great dierence between the BER curve of packetsize of 1000 bits and those of smaller sizes, 100 and 200bits. The curve also osetsaway from the theoretical SC BER curve. This is due to that fact that, for a 900MHzmobile receiver moving at speed of 60km/h, the channel coherence time Tc is 20ms. Thedurations for packets of 100, 200 and 1000 bits in size are 10, 20 and 100ms, respectively,at the bit rate of 10kbit/s. This indicates during the period of 100- and 200-bit packets,

Page 81: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.2 Analysis of simulation results 69

0 2 4 6 8 10 12 14 16

10−4

10−3

10−2

10−1

The effect of packet length (L [bit]) on MRC diversity technique f

mT

b = 0.005 and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical MRC (N

b = 2)

Simulated MRC, L = 100Simulated MRC, L = 200Simulated MRC, L = 1000

Figure 3.15: The eect of packet length on MRC diversity technique

the radio channel remains relatively constant, and therefore, the receiver could usepacket-by-packet selection scheme and produce the correct results. However, for 1000-bit on packets, the channel gain has changed several times, which makes the selectionof diversity branch yielding the highest SNR at the output based on packet-by-packetselection scheme no longer accurate. This observation suggests that we should be verycareful when choosing the duration for monitoring and selecting diversity branches inthe SC scheme, if we wish to take full advantage of this diversity technique.On the other hand, there is only a slight dierence between the BER curve of 1000-bitpacket and those of 100- and 200-bit packet in the MRC BER plot. The small-sizepackets, with duration less than or equal to the channel coherence time Tc, continue togive the best performance, and their BER curves are very close to the theory. However,packet with duration greater than the channel coherence time also shows good perfor-mance. The reason is that, unlike the SC which discards the better SNR branch dueto mis-calculation, the MRC scheme still use it to produce the output. In the MRCdiversity, the packet length has less inuence compared to the SC.Figure 3.16 illustrates the eect of dierent packet lengths on the PER performance ofthe SC, EGC and MRC techniques. The theoretical PER curves for the AWGN channelare plotted for comparison. The signicance of gure 3.16 is the relation of the PERon the level of BER and packet sizes. The larger the packet length, the higher theprobability of packet error is. In a similar manner, if the BER level increases, the PERalso increases.

Page 82: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

70 Implementation and result analysis

0 2 4 6 8 10 12 14 16

10−2

10−1

100

The effect of packet length (L [bit]) on the PER performance of SC, EGC and MRC f

mT

b = 0.005 and N

b = 2

Pac

ket e

rror

rat

e

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGN, L = 100Theoretical AWGN, L = 200Theoretical AWGN, L = 1000Simulated SC, L = 100Simulated SC, L = 200Simulated SC, L = 1000Simulated EGC, L = 100Simulated EGC, L = 200Simulated EGC, L = 1000Simulated MRC, L = 100Simulated MRC, L = 200Simulated MRC, L = 1000

Figure 3.16: The eect of packet length on the PER of SC, EGC and MRC

3.2.4 Eects of the mobile receiver velocity

The rate of change of the Rayleigh at fading channel is directly related to the velocityof the mobile receiver. In this project, we are interrested in analysing the eects of thespeed of the mobile receiver on the performance of the communications system.Figures 3.17 to 3.20 show the BER plots for the simulations of Rayleigh channel withoutand with SC, EGC and MRC diversity techniques, respectively. The number of diversitybranches are 2 for all diversity techniques. For the SC and MRC, the packet-by-packetselection technique is used, with packet length of 200 bits.From gure 3.17, we can see that the BER curves of the Rayleigh at fading channelapparently does not change with dierent velocities. This conrms the fact that, if thePSD of the channel complex gain changes (due to the change of mobile receiver speed, ordue to ltering like in our Rayleigh channel implementation), its PDF does not change.Therefore, three simulated Rayleigh channels at three dierent velocities experience thesame probability of fading level, only at dierent rates. We notice that the BER atvelocity 5km/h is not as close to the theory as the other two. If the simulation timeis extended, we expect to see it approaching the theoretical BER curve. The sameargument is also true for the EGC diversity technique. The system performance withthis technique is not aected by the velocity of the mobile receiver.Things are slightly dierent for the SC and MRC diversity techniques. Figures 3.18 and3.20 show that they are aected by the speeds of the mobile receiver, especially the case

Page 83: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.2 Analysis of simulation results 71

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of velocity (V [km/h]) on Rayleigh channel

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighSimulated Rayleigh, V = 5Simulated Rayleigh, V = 60Simulated Rayleigh, V = 120

Figure 3.17: The eect of velocity on the Rayleigh channel

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of velocity (V [km/h]) on SC diversity technique Packet length L = 200bits and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical SC (N

b = 2)

Simulated SC, V = 5Simulated SC, V = 60Simulated SC, V = 120

Figure 3.18: The eect of velocity on the SC diversity technique

Page 84: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

72 Implementation and result analysis

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of velocity (V [km/h]) on EGC diversity technique (Nb = 2)

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical EGC (N

b = 2)

Simulated EGC, V = 5Simulated EGC, V = 60Simulated EGC, V = 120

Figure 3.19: The eect of velocity on the EGC diversity technique

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of velocity (V [km/h]) on MRC diversity technique Packet length L = 200bits and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical EGC (N

b = 2)

Simulated MRC, V = 5Simulated MRC, V = 60Simulated MRC, V = 120

Figure 3.20: The eect of velocity on the MRC diversity technique

Page 85: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.2 Analysis of simulation results 73

of the SC technique. The reason for that has been discussed earlier in section 3.2.3.The xed packet length of 200 bits provides the best performance at a velocity up to60km/h, where the packet duration is below the channel coherence time. At higherspeed of mobile receiver, the benet of using the SC diversity technique with a packet-by-packet selection scheme becomes minimal. However, in the case of the MRC diversitytechnique, the degradation in performance is negligible.

3.2.5 Comparison of selection schemes

We have mentioned in section 2.8 that there are two methods to implement the SCand MRC diversity techniques, namely the 'bit-by-bit selection scheme' and 'packet-by-packet selection scheme'. The former, which is referred to as 'scheme A' from now,means that the diversity module monitors all diversity branches during the bit duration,and necessary actions (i.e. selecting the branch that yields the highest SNR in the caseof SC, or calculating the weight factors in the case of MRC) are taken according tothe result of monitoring process. The latter, which is now referred to as 'scheme B', isessentially the same, except that the monitoring duration is now extended from bit- topacket-period. We can see that scheme A requires more processing power at the mobilereceiver, because branches are switched (for SC) or weight factors are updated (for MRC)very frequently. It is not necessary, because the channel gain is aprroximately constantduring several bit periods on the Rayleigh at fading channel. The scheme B aims atreducing the workload, since the above-mentioned actions happen less frequently. Inpractice, the third method (or 'scheme C') is often used: All diversity branches aremonitored only for a short period of time, which is much less than packet duration, andthe information of the branches obtained during this monitoring phase is applied for thewhole packet. In our simulation, the monitoring duration is chosen as one tenth of thepacket duration.In this section, we investigate the advantages and the disadvantages of the three selectionschemes. Figure 3.21 and 3.22 are the BER curves resulted from simulations of SC andMRC with three dierent selection schemes, respectively. The velocity of the mobilereceiver is 60km/h. The selected packet length is 200 bits, it is well below the channelcoherence time. Here we use 2-branch diversity for all simulations.For SC technique, there is clear distinction between the three selection schemes: Thebit-by-bit selection scheme (scheme A) shows the best result, its BER curve ts the theo-retical curve. The second is packet-by-packet selection scheme (scheme B), which is justlittle poorer in performance, compared to scheme A. Since the channel characteristicsdo not change during the channel coherence time, the scheme B can oer satisfactoryresult, provided that the packet duration is less than the coherence time of the channel.The worst case is in scheme C, even though the packet length is still the same and lessthan the channel coherence time. The reason is that the monitoring time in scheme C

Page 86: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

74 Implementation and result analysis

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of selection schemes on SC diversity technique Velocity = 60km/h, Packet length = 200bits and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical SC (N

b = 2)

Simulated SC, method ASimulated SC, method BSimulated SC, method C

Figure 3.21: The eect of selection schemes on the SC diversity technique

0 2 4 6 8 10 12 14 1610

−4

10−3

10−2

10−1

The effect of selection schemes on MRC diversity technique Velocity = 60km/h, Packet length = 200bits and N

b = 2

Bit

erro

r ra

te (

Pe)

Averaged signal to noise ratio (γs) [dB]

Theoretical AWGNTheoretical RayleighTheoretical MRC (N

b = 2)

Simulated MRC, method ASimulated MRC, method BSimulated MRC, method C

Figure 3.22: The eect of selection schemes on the MRC diversity technique

Page 87: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

3.3 Conclusions 75

is too short, it is not enough to make sure that the selected diversity branch is indeedthe optimum branch. As a result, if this scheme is to be applied in practice, care mustbe taken to ensure that the monitoring time is long enough to make correct decisionsabout the diversity branches.Unlike in the SC technique, it is hard to determine which scheme is better in the case ofMRC. Their BER curves are very close to each other. This indicates that, for the MRCdiversity technique, the scheme C is the best choice. It helps to reduce the processingtime at the mobile receiver, while giving approximately the same results as the otherschemes.

3.3 Conclusions

In this chapter, we have discussed about the development of a complete simulationsystem, based on the groundwork done in Chapter 2. We have also justied our choicesof parameters for the simulation. Understanding of these parameters enables us toexplain the simulation results and conclude what actually happens in our simulation.We have tested the complex gains of the Rayleigh at fading channel obtained from theFTM and MPM. The FTM is selected for our simulation, due to the fact that it is muchfaster and still able to provide good estimation of the real Rayleigh at fading channel.The major part of the chapter is devoted to the analysis the of simulation results. Theanalysis has focused on making clear the following matters:

(a) The degradation of system performance in Rayleigh at fading channel with re-spect to AWGN chanel.

(b) The benets of the use of three diversity techniques: theSC, EGC and MRC.

(c) The eects of packet length on the system performance.

(d) The eects of mobile receiver velocity on the system performance.

(e) The advantages and disadvantages of dierent selection schemes on the SC andMRC diversity techniques.

In the next chapter, we are going to summarise our works and present interrestingconclusions that we observed during this project. Future enhancements of the projectare also suggested.

Page 88: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 89: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Chapter

4Conclusions and future work

4.1 Summary of project work

Our project, 'Bit and packet error rates in Rayleigh at fading channel withand without diversity', is carried out at the 8th semester at the Aalborg University.Under the project, our objectives are (a) to study the eects of the Rayleigh at fadingchannel on system performance, (b) to understand the benets of the use of variousdiversity techniques in combating fading, and (c) to investigate the inuence of thepacket length on the performance of packet-based communication system.The method used for simulation in this project is Monte Carlo (MC), where the platformfor the simulation is MATLAB. We have developed the block digram for the simulationsystem based on MC principles, and gradually constructed the models for all the modulesin the diagram.In our project, the Maximal-length sequence (m-sequence) is used to simulate the datasource. This sequence possesses many characteristics that make it suitable for the job:(a) It is random in nature with various bit patterns; (b) It is simple to implement,both in terms of hardware and software; and (c) We can generate and use the samesequence for dierent simulation setups, and this consistency will remove any dierencein the nal results that would have been due to the fact that completely dierent datasequences are used at the input.To reduce complexity, we choose not to implement the error control coding and interleav-ing techniques in this project. Assuming that there is a perfect packet synchronizationscheme between the transmitter and the receiver, we are always able to extract packetsat the receiver, provided that the packet length and the beginning of the bit stream areknown. Therefore, there is no need to include the delimiter to indentify the beginningand the end of a packet. In other words, the Packetizing and Depacketizing modulesleave the data stream unchanged, and thus they are not needed in our simulation.The discrete-time models for the AWGN and Rayleigh at fading channels are developedin this project. The model for Rayleigh channel is built on the Clarke 2D model, which iscommonly-used to explain the characteristics of the channel. We mention two dierentapproaches to simulate the Clarke model, which is the Fourier transform method (FTM)and the Markov process method (MPM). The FTM, which is much faster and capable

77

Page 90: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

78 Conclusions and future work

of providing good approximation of the real-life channel envelope, is selected for oursimulation.We also build up the discrete-time baseband BPSK modulator / demodulator to usethroughout the project. From the mathematical models of the modem, the theoreticalprobability of error for AWGN and Rayleigh channels, and the diversity techniques arederived. They serve as references to validate our project works later on.We also dene clearly how diversity techniques, namely Selection Combining (SC), EqualGain Combining (EGC) and Maximal Ratio Combining (MRC), are implemented. Inour simulation, various approaches are tested and compared together, so that theiradvantages and disadvantages can be evaluated.Based on these discrete-time models, we are able to program our simulation. Thedetailed owcharts are given in Appendix D, and the soft codes are included in theCD-ROM attached with this report.

4.2 Conclusions

Based on our simulation, we have several interesting observations. First, the Clarke 2Dmodel is an excellent tool for simulating the Rayleigh at fading channel. It is relativelysimple to implement, while runs fast and gives excellent performance. Another advan-tage of the Clarke 2D model is its ability to generate innite number of uncorrelateddiversity branches. All we need is to use uncorrelated Gaussian processes as inputs.However, if we want to simulate the situation where diversity branches have certaincross-correlation property, Jakes model appears to be a better choice. The Jakes modelcan generate two diversity branches with a given cross-correlation level. However, it isvery dicult to generate more than two branches with Jakes model [10].Second, the eects of the Rayleigh at fading channel is extremely severe, compared tothe AWGN channel. The BER curve, which is exponentially decreasing in the case ofthe AWGN channel, is converted into an inverse-linear function of SNR for the Rayleighchannel. It is dicult to achieve low probability of error in a Rayleigh channel, unlesssome techniques are employed to combat the fading.Third, diversity techniques, such as SC, EGC and MRC, are very eective in mitigatingthe negative eects of the Rayleigh fading channel. They can help to improve theinstantaneous SNR level of the received signal, and thus reduce the BER of the system.The most ecient diversity technique, in terms of performance, is the MRC. The EGCis ranked second, but its performance is comparable to the MRC technique. The SC islast. However, the SC is the most simple method to implement, and next are the EGCand MRC. This is why the SC techniques is often selected to implement in practice.Fourth, we conclude that increasing the number of diversity branches can boost thesystem performance remarkably. The 2-branch diversity gives much improvement in

Page 91: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

4.3 Future work 79

BER over no diversity. Going to 3-branch diversity gives improvement compared tothe 2-branch diversity, but adding diversity branches is a process of diminishing return.It means that, reaching certain number of diversity branches, the system performanceimprove insignicantly even if more branches are added [10]. Furthermore, adding morebranches is not always applicable (e.g. there is often no space in a compact MS to putmore diversity antennas).Fifth, we can choose among three dierent selection schemes when implementing theSC and MRC diversity techniques: On bit-by-bit basis, on packet-by-packet basis andon packet-by-packet with short monitoring duration basis. If the bit-by-bit selectionscheme is used, the techniques yield the best performance and packet length is not anissue here. However, this scheme puts more processing load onto the receiver comparedto the other schemes, which the MSs are not always able to accept. If the packet-by-packet selection scheme is implemented, the SC and MRC techniques are aected bythe choice of packet length. Care must be taken to ensure that the packet duration iswell below the channel coherence time, especially in the case of of the SC. In order tofurther reduce the processing load, the third selection scheme is often implemented inTDMA systems. However, this scheme gives the worst performance out of three, andthe monitoring duration must be long enough so that the diversity module can obtainthe correct information about the diversity branches.Sixth, for Rayleigh at fading channel, the velocity of the mobile receiver does not aectthe BER of the mobile communication. Changing the velocity would change the PSDof the complex gain of the channel, but its PDF remains unchanged. This indicatesthat the mobile receiver would experience the same probability of fading level, but ata dierent rate of change, due to the speed. In practice, the BER level in a diversitysystem does increase at higher velocity, due to the fact that the complex gain of thechannel is changing so fast that the mobile receiver is not able to adapt. As discussedearlier, the SC diversity technique using packet-by-packet selection scheme is sensitiveto the velocity. To design system using this technique, it is important to ensure thatthe packet duration does not exceed the shortest channel coherence time, so that it canoperate well at the highest velocity.In conclusion, various aspects of the Rayleigh at fading channel and diversity tech-niques are analysed during this project. It enables us to gain better knowledge of thenarrowband at fading channel, as well as understand the advantages and disadvantagesof these techniques in mitigating the fading.

4.3 Future work

In this project, we have built up a complete system for simulation of packet-basedBPSK modulation under the Rayleigh at fading channel, including the transmitter,

Page 92: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

80 Conclusions and future work

the channel and the receiver models. This can serve as a foundation for doing researchat a higher level, e.g. the data link layer in the OSI model.One possible direction to continue this project in future is to study the Automatic RepeatRequest (ARQ) techniques. The ARQ is often used along with error control coding torequest the transmitter to re-send a packet if an error is detected. There are severalARQ methods: Stop-and-Wait (SW), Go-back-N (GBN) and Selective Repeat (SR).In the future, we desire to continue our work in this project with the study of thethroughput of three above-mentioned ARQ protocols as a function of the fading param-eters, such as the averaged SNR, maximum Doppler frequency, the number of diversitybranches, the time-out period and the round-trip delay [1].

Page 93: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Bibliography[1] Justin C.I. Chuang. Comparison of two arq protocols in rayleigh fading channel.

IEEE Transaction on Vehicular Technology, 39(4):367, November 1990.

[2] Pingzhi Fan & Michael Darnell. Sequence Design for Communications Applications.Research Studies Press Ltd, August 1996.

[3] Gregory D. Durgin. Theory of stochastic local area channel modeling for wirelesscommunications. PhD thesis, Virginia Polytechnic Institute and State University,2000.

[4] Professor Bernard Fleury. Signal Detection. Digital Communications Division,Aalborg University.

[5] Simon Haykin. Communication systems. Wiley Publisher.

[6] William C. Jakes. Microwave mobile communications. IEEE Press, 1974.

[7] Jonathan Merritt. Using fourier interpolation to nd c∞ approximation of sam-pled function and its derivatives. www.warpax.com/articles/fourier-interpolation/fourier-interpolation.pdf, August 2002.

[8] Philip Balaban Michel C. Jeruchim and K. Sam Shanmugan. Simulation of Com-munication Systems - Modeling, methodology and techniques. Kluwer Academic /Plenum Publishers, 2000.

[9] Elisabeth A. Neasmith. New results on selection diversity. IEEE Transaction onCommunication, 46(5):695, May 1998.

[10] J. D. Parsons. The Mobile Radio Propagation Channel. John Wiley & Sons Ltd.,2000.

[11] Jr. Peyton Z. Peebles. Probability, random variables, and random signal principles.McGraw-Hill, Inc., 1993.

[12] Theodore S. Rappaport. Wireless communications: Principles and Practice. Pren-tice Hall PTR.

[13] Bernard Sklar. Rayleigh fading channels in mobile digital communication systems- part i: Characterization. IEEE Communications Magazine, page 136, September1997.

81

Page 94: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

82 BIBLIOGRAPHY

[14] Bernard Sklar. Rayleigh fading channels in mobile digital communication systems- part ii: Mitigation. IEEE Communications Magazine, page 148, September 1997.

[15] Gordon L. Stüber. Principles of mobile communication. Kluwer Academic Publish-ers, 2001.

[16] Lars Ahlin & Jens Zander. Principles of Wireless Communications. Studentlitter-atur, 1998.

[17] Weimin Zhang and Michael J. Miller. Baseband equivalents in digital communi-cations system simulation. IEEE Transaction on Education, 35(4):376, November1992.

Page 95: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Appendix

AList of symbols

A : Amplitude of transmitted signalB : Bandwidth of the Binary Phase Shift Keying signalCn : Amplitude of the received signal associated with the nth coming

waveerfc(.) : The complementary error functionE0 : Total received envelope powerEr : The signal energy per bit of the passband BPSK transmitted signalErk : The signal energy per bit of the discrete-time passband BPSK trans-

mitted signalfc : Carrier frequencyfD,n : Doppler frequency shiftfs : Sampling frequencyfX(.) : Probability Density Function of the variable XF. : Fourier transform functionF−1. : Inverse Fourier transform functiong(t) : Complex gain of the radio channelgI(t) : Real part of g(t)gQ(t) : Imaginnary part of g(t)gk : Disrete-time complex gaingIk : Real part of gk

gQk : Imaginary part of gk

hsf (n) : Impulse response of the shaping lterHsf (f) : Frequency response of the shaping lterJ0(.) : Zero-order Bessel function of the rst kindl(ξ) : Log-likelihood ratioL(ξ) : Likelihood ratioms : Number of samples per bit intervalm(t) : Transmitted data sequence, represented in NRZ formatm′(t) : The estimate of the transmitted data sequence at the receivern(t) : The passband additive white Gaussian noisen(t) : The baseband additive white Gaussian noisenI(t) : In-phase component of the complex noise n(t)

83

Page 96: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

84 List of symbols

nQ(t) : Quadrature component of the complex noise n(t)

nk : Discrete-time baseband white Gaussian noisenIk : In-phase component of the discrete-time complex noise nk

nQk : Quadrature component of the discrete-time complex noise nk

N0 : Noise power spectral density value of the noise n(t)

N0c : Noise power spectral density value of the complex noise n(t)

N0d : Noise power spectral density value of the discrete-time complexnoise nk

Nb : Number of diversity branchesNm : Number of samples during which the power is calculated for the SC

and MRC techniquesPe : Probability of bit errorPeA : Probability of bit error in AWGN channelPeR : Probability of bit error in Rayleigh fading channelPeSC : Probability of bit error for BPSK with SC diversityPeEGC : Probability of bit error for BPSK with EGC diversityPeMRC : Probability of bit error for BPSK with MRC diversityPrk : Average power of discrete-time baseband signalQe : Probability of packet errorQ(.) : The Q-functionRe. : Operation to return the real part of the complex signalr(t) : Transmitted BPSK signal in passbandr(t) : Transmitted BPSK signal in basebandRgg : Auto-Correlation Function of g(t)RgIgI

(τ) : Auto-Correlation Function of gI(t)

RgIgQ(τ) : Cross-Correlation Function of real and imaginary part of g(t)

Rnn(τ) : Auto-Correlation Function of noise source n(t)

RnInI(τ) : Auto-Correlation Function of nI(t)

RnQnQ(τ) : Auto-Correlation Function of nQ(t)

Rnn(τ) : Auto-Correlation Function of the complex noise n(t)

Rnknk(k) : Auto-Correlation Function of the discrete-time complex noise nk

s(t) : Received Binary Phase Shift Keying signal in passbands(t) : Received Binary Phase Shift Keying signal in basebandsk : Discrete form of received Binary Phase Shift Keying signal in base-

bandsn(t) : Received sinal associated with the nth coming waveSn(f) : Power Spectral Density of n(t)

Sgg(f) : Power Spectral Density of the complex gainSgIk

(f) : Power Spectral Density of in-phase branch of the complex gainSnk

(f) : Power Spectral Density of the discrete-time complex noise nk

Page 97: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

85

Sn(f) : Power Spectral Density of the complex noise n(t)

Tb : Bit durationTc : Channel coherence timeTs : Sampling periodX : Gaussian processw1,k, w2,k : Gaussian processesyT : Dicision variable in passband BPSK modulation scheme∆τ : Dierential path delayσ2

gI: Variance of gI(t)

σ2gQ

: Variance of gQ(t)

σ2gIk

: Variance of gIk(t)

σ2gQk

: Variance of gQk(t)

σ2Xk

: Variance of gaussian process Xk

σ2nI

: Variance of nI(t)

σ2nQ

: Variance of nQ(t)

σ2nIk

: Variance of nIk

σ2nQk

: Variance of nQk

σ2nk

: Variance of the discrete-time complex noise nk

θn : AoA of the nth incoming waveτc : Excess delayτn : Time delay of signal associated with the nth coming waveφn(t) : Phase associated with the nth incoming pathΓs : Average symbol energy-to-noise ratioγs : Simbol energy to noise ratioγSC

s : The Energy-to-noise ratio of the output of SC diversity modulγEGC

s : The Energy-to-noise ratio of the output of EGC diversity modulγMRC

s : The Energy-to-noise ratio of the output of MRC diversity moduleΩk : Discrete-time envelope of the discrete complex gain gk

Ωmean : Root mean square value of the envelopeαk : The phase of the discete complex gain gk

ξ : Dicision variable in baseband BPSK modulation scheme

Page 98: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained
Page 99: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Appendix

BList of acronyms

ACF Auto-Correlation Function

AM Amplitude Modulation

ARQ Automatic Repeat Request

AoA Angle of Arrival

AWGN Additive White Gaussian Noise

BER Bit Error Rate

BPF Band Pass Filter

BPSK Binary Phase Shift Keying

BS Base Station

BSC Binary Symmetric Channel

CCF Cross-Correlation Function

CDF Cumulative Distribution Function

CDMA Code Division Multiple Access

EGC Equal Gain Combining

FCS Frame Check Sequence

FFT Fast Fourier Transform

FM Frequency Modulation

FTM Fourier transform method

ISI Intersymbol Interference

GBN Go-back-N

87

Page 100: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

88 List of acronyms

GF Galois Field

GSM Global System for Mobile communication

HPF High Pass Filter

LFSR Linear Feedback Shift Register

LOS Light of Sight

LPF Low Pass Filter

NRZ Non-Return Zero

m-sequence Maximal-length sequence

MAP Maximum a posteriori

MC Monte Carlo

MRC Maximal Ratio Combining

MPM Markov process method

MS Mobile Station

OSI Open System Interconnection

PDF Probability Density Function

PSD Power Spectral Density

PER Packet Error Rate

PM Phase Modulation

PSK Phase Shift Keying

rms root mean square

SC Selection Combining

SNR Signal to Noise Ratio

SR Selective Repeat

SW Stop-and-Wait

TDMA Time Division Multiple Access

WSS Wide Sense Stationary

Page 101: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Appendix

CBaseband & passband representation of signal &system

Development of a baseband representation for modulated functions is a cornerstoneof channel modeling and analysis. A baseband representation essentially removes thedependence of a passband radio channel from its carrier frequency, which both general-izes and simplies channel modeling. This Appendix discusses the mathematics behindswitching between passband and baseband representations of radio signals and channels.

C.1 Baseband and passband translation of signal

The main objective of modulating a signal is to change its frequency into a suitableform in order to transmit it through the channel. This is the fundamental operationin radio communications, which helps to translate a baseband signal into a passbandsignal. Throughout the section, we use symbolic M. as the modulation operator, andx(t) as the baseband form of signal and x(t) as the passband form:

x(t) = Mx(t) (C.1)

In the frequency domain, the Fourier transform of passband signal, X(f), is simply acopy of the spectrum X(f) shifted to a center frequency f = +fc and a mirror copy ofX(f) shifted to a center frequency f = −fc [3]. The operation of modulation, therefore,could be described directly in time domain:

x(t) = Mx(t)= Re︸︷︷︸

mirror−image

x(t) exp(j2πfct)︸ ︷︷ ︸frequency−shift

(C.2)

where Re. denotes the operation of taking real part of complex signal, and fc is thecarrier frequency. The complex exponential in equation (C.2) shifts the baseband signalx(t) up to a carrier frequency of fc and the Re. operator produces the conjugatemirror-image spectrum at −fc.

89

Page 102: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

90 Baseband & passband representation of signal & system

Figure C.1: Dierent denition of signal bandwidth [3]

At this point, we need to dene the bandwidth B of baseband signal. There are manyways to dene it, as illustrated in gure C.1. In this section, let us assume that thelargest-value denition of bandwidth, non-zero bandwidth, is used.The inverse operation of modulation - converting the passband signal x(t) back to base-band signal x(t) - also has a time-domain denition:

x(t) = M−1x(t)= [x(t) exp(−j2πfct)]

⊗[2Bsinc(Bt)]

= 2B

∫ +∞

−∞x(ξ) exp(−j2πfcξ)sincB[t− ξ]dξ (C.3)

where⊗

denotes convolution and sinc(.) is the sinc function, sinc(x) = sin(π x)(π x)

. Theinverse operation carries out a frequency shift and then low-pass ltering the passbandsignal to obtain the baseband signal. Figure C.2 illustrates the conversion betweenbaseband and passband signal:If the modulated signal, x(t), is to represent as a physically realizable transmission, thenit must be a real-valued function. No such restriction is placed on the baseband signal,as any complex-valued function that modulates a carrier according to equation (C.2)will produce a real-valued function. This dierence between baseband and passbandrepresentations stems from the conjugate mirror image in the passband spectrum, X(f).Thus, X(f) has twice as much non-zero bandwidth as the baseband signal. A complexfunction, which is actually two real-valued functions (one for the real component and onefor the imaginary component), is the easiest way to accommodate this extra information

Page 103: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

C.1 Baseband and passband translation of signal 91

Figure C.2: Transformation between baseband and passband presentation of signal [3]

so that nothing is lost in the baseband representation of a modulated signal. Considerthe following example:

Problem: Passband signals are commonly written in the form:

x(t) = V (t) cos[2π fct+ Φ(t)] (C.4)

where V (t) is real amplitude and φ(t) is a real phase, both of which are band-limitedfunctions. Find an expression for the baseband representation of this signal.

Solution:We have to plug the above-mentioned expression for x(t) into equation (C.3)to obtain:

x(t) = 2B

∫ +∞

−∞V (ξ) cos[2π fcξ + Φ(ξ)] exp(−j2πfcξ)sincB[t− ξ]dξ (C.5)

Using the Euler relation for cos(.), we can rewrite the equation (C.5) as:

x(t) =

∫ +∞

−∞ V (ξ) exp[jΦ(t)]︸ ︷︷ ︸Low-freq component

+V (ξ) exp[−j4π fcξ + Φ(t)]︸ ︷︷ ︸High-freq component

sinc(B[t− ξ]dξ (C.6)

Page 104: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

92 Baseband & passband representation of signal & system

The left term inside the braces is a low-frequency component which passes through theintegration unchanged. The right term inside the braces is a high-frequency componentwhich evaluates to zero upon integration. Thus,

x(t) = V (t) exp[jΦ(t)] (C.7)

which is the complex baseband representation of the real-valued signal x(t).

C.2 Baseband and passband representation of system

Assume that x(t) is the input signal of a linear system with impluse response h(t). Theoutput is related to the input by the following expression:

y(t) = x(t)⊗

h(t) (C.8)

where⊗

denotes convolution.It is proved that if x(t), y(t), and h(t) are respectively baseband equivalent expressionof x(t), y(t) and h(t), or:

x(t) = M−1x(t) (C.9)h(t) = M−1h(t) (C.10)y(t) = M−1y(t) (C.11)

Then the following relationship also holds true [5]:

y(t) = x(t)⊗

h(t) (C.12)

The equation (C.12) allows us to ignore any linear frequency translations encountered inthe modulation of a signal for purposes of matching its spectral content to the frequencyallocation of a particular channel [5]. Analysis of mobile radio channels and systemsbased on its passband or baseband representation would give the same results. However,while the equation (C.12) captures all of the behavior of the passband channel, it is aconvenient representation but not a physical process. In order to implement the systemin real-life, wireless engineers should always refer to passband representation to getactual functions of transmitter, receiver and radio channel.

Page 105: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

Appendix

DFlowcharts of simulation functions

In this appendix, the owcharts, which illustrates our methods of implementation ofsimulation functions, are presented. To reduce complexity, we use Matlab matrix no-tations and some basic functions in the owchart. Therefore, general understanding ofMatlab is required to understand this section. The Matlab codes for these modules arealso included with this report.

93

Page 106: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

94 Flowcharts of simulation functions

START

r_new = mod ( - h(2)*r(m) - h(3)*r(m-1) … - h(m+1)*r(1) , 2 )

N = 2^m - 1

mseq (i) = r (m)

Input m

Input h(x) degree m: h (1:m+1)

Input initial register values r (1:m)

Output data sequence mseq (1:N)

i = 1

i = i +1

i > N

END

YES

NO

r (1) = r_new

r (2:m) = r (1:m-1)

Figure D.1: The m-sequence generator

Page 107: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

95

START

r(i) = A * exp ( j / (2*pi) * (1 - dseq(k) ) )

m = ceil ( f S / f b )

k = ceil ( i / m )

Input data sequence dseq (1:N)

Input amplitude A

Input data rate f b

Input sampling rate f S

Output transmitted signal r (1:N*m)

i = 1

i = i +1

i > N*m

END

YES

NO

Figure D.2: The BPSK modulator

Page 108: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

96 Flowcharts of simulation functions

START

sigma XY

= sqrt ( m * A^2 / (2*gamma S ) )

m = ceil ( f S / f

b )

x = randn (1,N) .* sigma XY

y = randn (1,N) .* sigma XY

c n = x + j * y

Input transmitted signal r (1:N b , 1:N)

Input amplitude A

Input desired SNR gamma S

Input data rate f b

Input sampling rate f S

Output received signal s

i = 1

s (i,:) = r (i,:) + c n

i = i +1

i > N b

END

YES

NO

Figure D.3: The AWGN channel

Page 109: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

97

START

xi = 2 - cos ( 2 * pi * f m / f S ) - sqrt ( (2 - cos ( 2 * pi * f m / f S ) ) ^2 - 1)

sigma = sqrt ( (1+xi) / (1-xi) * 0.5 )

w1 = randn (1,N) .* sigma w2 = randn (1,N) .* sigma

1

Input transmitted signal r (1:N b , 1:N)

Input amplitude A

Input desired SNR gamma S

Input data rate f b

Input sampling rate f S

Input maximum Doppler shift f m

Figure D.4: The Rayleigh simulator using MPM

Page 110: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

98 Flowcharts of simulation functions

1

Env = abs ( G )

j = 1

s (j,:) = r (1,:) .* Env ( (j-1)*N+1 : j*N )

j = j +1

j > N b

s = awgn_channel ( s,A,f b ,f S , gamma S , N b )

Output received signals s ( 1:N b , 1:N )

END

YES

NO

G i (1) = 0.5

G q (1) = 0.5

i = 2

G i (i) = xi .* G

i (i-1) + (1-xi) .* w(i)

G q (i) = xi .* G

q (i-1) + (1-xi) .* w(i)

i = i +1

i > N

YES

NO

G = G i + j G

q

Figure D.5: The Rayleigh simulator using MPM (cont.)

Page 111: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

99

START

The total received power E 0 = 1

sigma XY

= sqrt (E 0 / 2)

m = ceil ( f S / f

b )

k = ceil ( (1 / f m ) / (1 / f S ) )

M = 2^10

f = linspace ( - f m , f m , M )

1

Input transmitted signal r (1:N b , 1:N)

Input amplitude A

Input desired SNR gamma S

Input data rate f b

Input sampling rate f S

Input maximum Doppler shift f m

Figure D.6: The Rayleigh simulator using FTM

Page 112: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

100 Flowcharts of simulation functions

N i = fft ( randn (1,M) ) N

q = fft ( randn (1,M) )

G i = ifft ( N i .* H f ) G

q = ifft ( N

q .* H

f )

1

Env = abs ( G )

Env = fft_interpolate ( Env , k )

i = 1

s (i,:) = r (1,:) .* Env ( (i-1)*N+1 : i*N )

i = i +1

i > N b

s = awgn_channel (s,A,f b ,f S , gamma S , N b )

Output received signals s ( 1:N b , 1:N )

END

H f = 1 ./ ( pi *m* sqrt (1 - ( f(2:M-1) / f

m ).^2)

H f = sqrt ( [ H

f (1) , H

f , H

f (M-2) ] )

YES

NO

G = G i + j G q

Figure D.7: The Rayleigh simulator using FTM (cont.)

Page 113: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

101

START

Xi = zeros (k*N , 1)

Input interpolation factor k

i = 0

Xi ( k*(N−1)+1 : k*N ) = x (N)

END

Output interpolated signal Xi(1:n*k)

YES

NO

i = i + 1

i > N − 2

Input the original signal X(1:N)

Xi (k*i+1 : k*(i+1)+1)

= linspace ( x(i+1), x(i+2), k+1 )

Figure D.8: The implementation of linear interpolation method

Page 114: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

102 Flowcharts of simulation functions

START

Input interpolation factor k

END

Output interpolated signal Xi(1:N*k)

M = round (N / 2)

X = fft (X)fft

Input the original signal X(1:N)

= [ X (1:M) , zeros(1, N*(k−1)) , X (M+1:L) ]fftfft

fftX

Xi = Xi . / max(Xi) .* max(X)

Xi = ifft (X )fft

Figure D.9: The implementation of FFT-interpolation method

Page 115: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

103

START

L = ceil ( N / k )

Input received signals s (1:N b ; 1:N)

Input sampling rate f S

Input Dwell_Time

Input Monitor_Time

k = round ( Dwell_Time * f S

)

v = round ( Monitor_Time * f S )

s = real ( [ s , zeros ( N b , L*k - N) ] )

1

Figure D.10: The SC diversity module

Page 116: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

104 Flowcharts of simulation functions

Output s SC ( 1 : N )

j = 1

END

YES

NO

1

i = 1

Power (i) = sum ( s ( j , (i-1)*k+1 : (i-1)*k+v ) .^2 )

j = j +1

j > N b

j = 1

Power max

= max ( Power (1:N b ) )

s SC ( (i-1)*k+1 : i*k ) = s ( j , (i-1)*k+1 : i*k )

j = j +1

Power(j)=Power max

i = i +1

i > L

s SC

= s S C

( 1 : N )

YES

NO

NO

YES

j > N b

YES

NO

Figure D.11: The SC diversity module (cont.)

Page 117: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

105

START

END

Input received signals S(1:N , 1:N)

= real ( sum(S,1) )SEGC

b

Output SEGC (1:N)

Figure D.12: The EGC diversity module

Page 118: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

106 Flowcharts of simulation functions

START

L = ceil ( N / k )

Input received signals s (1:N b ; 1:N)

Input data rate f b

Input sampling rate f S

m = ceil ( f S / f

b )

N 0 = A^2 * m / ( 2*gamma

S )

Input Dwell_Time

Input Monitor_Time

Input SNR gamma S

Input amplitude A

k = round ( Dwell_Time * f S

)

v = round ( Monitor_Time * f S

)

s = real ( [ s , zeros ( N b , L*k - N) ] )

1

Figure D.13: The MRC diversity module

Page 119: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

107

Output s MRC

( 1 : N )

j = 1

END

YES

NO

1

i = 1

a(j) = sqrt ( sum ( s ( j , (i-1)*k+1 : (i-1)*k+v ) .^2 ) ) ./ v ./ N 0

j = j +1

j > N b

j = 1

s MRC

( (i-1)*k+1 : i*k ) = 0

s MRC

( (i-1)*k+1 : i*k ) = s MRC ( (i-1)*k+1 : i*k ) + a(j) .* s ( (i-1)*k+1 : i*k )

j = j +1

j > N b

i = i +1

i > L

s MRC

= s MRC

( 1 : N )

YES

NO

NO

YES

Figure D.14: The MRC diversity module (cont.)

Page 120: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

108 Flowcharts of simulation functions

START

Xi = sum ( real ( s ( (i-1)*m+1 : i*m ) )))

m = ceil ( f S / f

b )

dseq (i) = 1

Input received signal s (1:N)

Input data rate f b

Input sampling rate f S

Output dseq

i = 1

i = i +1

i > L

END

YES

NO

L = N / m

dseq = [ ]

Xi > 0

Xi = 0

dseq(i) = -1

dseq (i) = round (round (rand(1)) - 0.5)

YES YES

NO

NO

Figure D.15: The BPSK demodulator

Page 121: Bit and packet error rates in Rayleigh channel with …kom.aau.dk/~hcn/publications/semester8.report.pdfperformed by means of the Bit Error Rate (BER) and Packet Error Rate (PER) obtained

109

START

PE = 0

error = s (1:N) - r (1:N)

M = floor ( N / L )

Input transmitted sequence r (1:N)

Input received sequence s (1:N)

Input packet size L

Output packet errors PE

i = i +1

i > M

END

YES

NO

PE = PE + any ( error ( (i-1)*L+1 : i*L) )

i = 1

Figure D.16: The PER module