17
EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING VIJAYA CHANDRAN RAMASAMI (KUID 698659) 1

862 Fading

  • Upload
    ballmer

  • View
    18

  • Download
    3

Embed Size (px)

Citation preview

Page 1: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELSAND DIVERSITY COMBINING

VIJAYA CHANDRAN RAMASAMI (KUID 698659)

1

Page 2: 862 Fading

2 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

Contents

List of Figures 31. Overview of the Report 42. Fading in Communication Channels - A Mathematical Model 52.1. Mathematical Model 52.2. Instaneous SNR per bit 62.3. Probability of Error 63. Diversity 73.1. Selection Diversity 73.2. Equal Gain Combining (EGC) 83.3. Maximal Ratio Combining (MRC) 84. Implementation and Results 104.1. Simulation Parameters 104.2. Simulation Models 104.3. Rayleigh Fading Generation 104.4. BER Results - Fading Channel 114.5. BER Results - Diversity Combining 114.6. Conclusions 115. MATLAB Code 135.1. Apply Slow Fading 135.2. Fading Generation 145.3. AWGN Channel Model 145.4. Diversity Implementation 145.5. Diversity Combiner 16References 17

Page 3: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 3

List of Figures

1 Selection Diversity 72 Equal Gain Combining (EGC) 83 Maximal Ratio Combining (MRC) 94 System Model 105 BER Performance Degradation due to Fading - Simulation Results 116 BER Improvement due to Diversity - Simulation Results 12

Page 4: 862 Fading

4 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

1. Overview of the Report

The report is organized into the following sections:• The first section describes a mathematical model for fading and quantitatively describes the

effects of Fading on the BER of digital communications systems.• The second section describes the divesity combining techniques used to combat the destruc-

tive effects of fading and quantitatively describes the SNR gain achieved due to diversity.• The third section discusses the parameters, basic assumptions, implementation issues, results

and conclusions of the simulation.

Page 5: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 5

2. Fading in Communication Channels - A Mathematical Model

Fading is the term used to describe the rapid fluctuations in the amplitude of the received radiosignal over a short period of time. Fading is a common phenomenon in Mobile CommunicationChannels, where it is caused due to the interference between two or more versions of the transmittedsignals which arrive at the receiver at slightly different times. The resultant received signal canvary widely in amplitude and phase, depending on various factors such as the intensity, relativepropagation time of the waves, bandwidth of the transmitted signal etc.,

2.1. Mathematical Model. Consider a transmitted signal s(t) = A cos 2πfct through a fadingchannel. The received signal can be expressed as (ignoring the effects of noise):

(1) y(t) = AN∑

i=1

aicos(2πfct + θi)

Where,• ai is the attenuation of the ith multipath component.• θi is the phase-shift of the ith multipath component.

It must be noted that ai and θi are random variables. The above expression can be re-written as:

(2) y(t) = A

{(N∑

i=1

aicos(θi)

)cos(2πfct)−

(N∑

i=1

aisin(θi)

)sin(2πfct)

}We introduce two random processes X1(t) and X2(t), such that the above equation becomes:

(3) y(t) = A {X1(t)cos(2πfct)−X2(t)sin(2πfct)}If the value of N is large (i.e, a large number of scattered waves are present), invoking the Central-Limit Theorem, we get approximate X1(t) and X2(t) to be gaussian random variables with zero-mean and variance σ2. The expression 3 can be rewritted as:

(4) y(t) = AR(t)cos(2πfct + θ(t))

Where,• The amplitude of the received waveform R(t) is given by:

(5) R(t) =√

X1(t)2 + X2(t)2

Since the processes X1(t) and X2(t) are gaussian, it can be shown that R(t) has a RayleighDistribution with a probability density function (pdf) given by:

(6) fR(r) =r

2σ2e−r2

2σ2 , r > 0

• The phase of the received waveform θ(t) is given by:

(7) θ(t) = tan−1

(X2(t)X1(t)

)Since the processes X1(t) and X2(t) are gaussian, it can be shown that θ(t) has a UniformDistribution with a probability density function (pdf) given by:

(8) fθ(θ) =12π

, −π ≤ θ ≤ π

The distortion in the phase can be easily overcome if differential modulation in employed. It isthe amplitude distortion R(t) that severely degrades performance of digital communication systemsover fading channels. It is usually reasonable to assume that the fading stays essentially constantfor atleast one signalling interval.

Page 6: 862 Fading

6 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

2.2. Instaneous SNR per bit. Since it is assumed that the fading stays constant in a signallinginterval, we can represent the fading phenomenon using a random variable R. Since only amplitudedistortion is considered, the instantaneous SNR per bit γb is now a random variable given by:

(9) γb = R2 Eb

No

Since R is rayleigh distributed as given in equation (6), the pdf of γb has a chi-squared distributiongiven by:

(10) fγb(γb) =

1γ̄b

e−γb/γ̄b , γb ≥ 0

Where γb is the average SNR per bit given by:

(11) γ̄b =Eb

NoE{R2}

2.3. Probability of Error. It is a well-known fact that, for a given value of the SNR per bit γb,the probability of error (Pe) (for binary PSK ) is given by:

(12) Pe(γb) = Q(√

2γb)

So, the average probability of error given the pdf of the random variable γb can be found directlyusing:

(13) Pe =∫ ∞

0

Pe(γb)fγb(γb)dγb

The result of this integration for binary PSK is given by [2]:

(14) Pe =12

(1−

√γ̄b

1 + γ̄b

)In the case of high SNR situations, i.e γb � 1, the above expression can be simplified as:

(15) Pe ≈1

4γ̄b

The destructive effect of fading is evident from the above equation. The value of Pe decreases linearlywith increasing SNR per bit, rather than either a Q-function type or an exponential decrease. Thiswill severely degrade the power-efficiency of a digital communication system if preventive measuresare not taken to mitigate this problem.

Page 7: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 7

3. Diversity

One of the most efficient and simple techniques to overcome the destructive effects of fading isDiversity. Diversity is an efficient technique to exploit the random nature of radio propagation byfinding methods to generate and extract independent signal paths for communication. The conceptbehind diversity is relatively simple [3]: if one signal path undergoes a deep fade at a particularpoint of time, another independent path may have a strong signal. By having more than one pathto select from, both the instantaneous and average SNR can be improved in the receiver by a largeamount. There are various types of diversity used in communication systems operating over fadingchannels. They are:

• Space Diversity.• Frequency Diversity.• Time Diversity.• Polarization Diversity.• Mulipath Diversity.

Whatever be the diversity technique employed, the receiver has to process the diversity signalsobtained in a fashion that maximizes the power efficiency of the system. There are several possiblediversity reception methods employed in communication receivers. The most common techniquesare:

• Selection Diversity.• Equal Gain Combining (EGC).• Maximal Ratio Combining (MRC).

These methods are discussed in the following sections:

3.1. Selection Diversity. Selection Diversity is one of the most simplest diversity techniques. Thereceiver simply picks the signal with the largest SNR as given in fig (1). In the case of a two-folddiversity, the diversity combining strategy for selective combining is given by:

(16) Zk =

{Z1k, if |Z1k| > |Z2k|Z2k, if |Z2k| > |Z1k|

Where, Z1k and Z2k are decision variables at the first and second diversity paths and Zk is the

Select Largest

Envelope Detector

Envelope Detector

y 1 �

y L �

y

Figure 1. Selection Diversity

Page 8: 862 Fading

8 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

decision variable at the output of the diversity combiner. Let ρ be the threshold SNR that mustachieved for proper demodulation and detection of the received signal. Let there be L diversitybranches and let γk be the instantaneous SNR for the kth branch. Using the expression for the pdffor the instantaneous SNR (10) we can get an expression for the outage probability (probabilitythat the SNR falls below the threshold) for all the branches as [3]:

(17) P (γ1, . . . , γL ≤ ρ) = (1− e−ρ/γ̄c)L

Where, γ̄c is the average SNR at every diversity branch, assuming all the branches have the sameaverage SNR. It is given by:

(18) γ̄c =Eb

NoE{R2}

The improvement in the SNR due to selective combining is evident from equation (17).

3.2. Equal Gain Combining (EGC). In Equal Gain Combining (EGC), all the received signalsare co-phased at the receiver and added together without any weighting. The performance of EGCis only marginally inferior to the optimal maximal ratio combiner. In case of a two-fold diversityscheme, the combinning equation is given by:

(19) Zk = Z1k + Z2k

y 1 �

y L �

y

x

x

+

Figure 2. Equal Gain Combining (EGC)

3.3. Maximal Ratio Combining (MRC). In Maximal Ratio Combining (MRC), the signal allthe branches are co-phased and individually weighed to provide the optimal SNR at the output.It can be shown that [3] the output SNR is maximized when the signals in each of the diversitybranches are weighed by their own envelopes. In case of a two-fold diversity scheme, the combiningequation is given by:

(20) Zk = r1kZ1k + r2kZ2k

Where, r1k and r2k represent the instantaneous envelopes of the signals received at each of thediversity branches. The SNR per bit at the output of the maximal ratio combiner (γb) can bewritten as:

(21) γb =L∑

k=1

γk =Eb

No

L∑k=1

R2k

Page 9: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 9

Envelope Detector

Envelope Detector

y 1 �

y L

y

x

x

+

Figure 3. Maximal Ratio Combining (MRC)

where γk = R2(Eb/No) is the instantaneous SNR in the kth diversity branch. The pdf of the outputSNR can be written as [2]:

(22) fγb(γb) =

1(L− 1)!γL

c

γL−1b e−γb/γ̄c

Where γ̄c is the average SNR per channel given by equation (18) Now the conditional Pe for BPSKgiven by equation (12) must be averaged over all the possible values of γb to obtain the finalexpression for the probability of error, i.e,

(23) Pe =∫ ∞

0

Pe(γb)fγb(γb)dγb

A closed form expression does exist for this problem given by [2]:

(24) Pe =(

1− µ

2

)L L−1∑k=0

(L− 1 + k)!(L− 1)!k!

(1 + µ

2

)k

For large values of γ̄c, the above expression can be simplified to:

(25) Pe ≈(

14γ̄c

)L (2L− 1)!(L− 1)!L!

From the above equation it can be inferred that the Pe varies as γ̄c raised to the Lth power. Thus,with MRC, the BER decreases inversely with the Lth power of the SNR.

Page 10: 862 Fading

10 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

4. Implementation and Results

4.1. Simulation Parameters. A simulation was carried out using the following parameters:• Modulation - BPSK.• Pulse Shaping - Rectangular.• Receiver - Integrate and Dump followed by a threshold detector.• Number of Samples per Symbol = 16.• Noise - Additive White Gaussian Noise.• Fading - Rayleigh Statistics with E{R2} = 1.

In addition, the following assumptions were made about the fading characteristics:• Fading is amplitude only.• Fading is constant over a bit-interval.• Fading is independent from one bit interval to the next bit interval.

4.2. Simulation Models. The simulation models used for this simulation are given in fig(4):

Rayleigh Fading Channel

Integrate and Dump Receiver

Decision

+

n(t)

y(t)

Z k �

Path #1 r 1k

Integrate and Dump Receiver +

n 1 � (t)

y 1 � (t)

Z 1k �

Integrate and Dump Receiver +

n 2 � (t)

y 2 � (t)

Z 2k �

Path #1 r 1k

�x

0.707

0.707

x �

y(t)

Combiner

Decision

Figure 4. System Model

4.3. Rayleigh Fading Generation. Since rayleigh-fading is a multiplicative process, its simula-tion involves generating the rayleigh fading process and multiplying it with the transmitted signal.The generation part directly follows from the fact that the envelope of a complex gaussian randomprocess (with independent real and imaginary parts) has a rayleigh distribution. In cases when thefading process with a specific correlation needs to be generated, we have to use a Spectral Shapingfilter for shaping the PSD of the fading process. Once the rayleigh fading signal is generated, itcan be multiplied with the transmitted signal to simulate the rayleigh fading channel. Care mustbe taken about the following facts:

• Since the fading process is constant over a bit interval, a bit-level fade instead of a waveform-level fade is sufficient, i.e, the number of fading samples to be generated is same as thenumber of input bits.

Page 11: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 11

• The RMS value of the fading process E{R2} must be normalized to 1. In general, this canbe done finding the RMS value of the fading samples that are generated and dividing eachsample by the calculated RMS value.

4.4. BER Results - Fading Channel. Using the above mentioned parameters and assumptions,Monte-Carlo simulations were performed in both an AWGN channel and on a fading channel. Theresults are plotted in fig (5). The results obtain conform with the theoritical values for the Pe

given by equations, (12) and (14) and also illustrates through simulation, the destructive effect offading on the BER performance. For example, even for a BER of 0.02, the increase in the powerrequirement shoots up to 6.5dB and much worse for lesser BER requirements.

0 1 2 3 4 5 6 7 8 910

−5

10−4

10−3

10−2

10−1

100

SNR per Bit (γb) −−−−>

BE

R −

−−

−>

AWGN ChannelFading Channel

Figure 5. BER Performance Degradation due to Fading - Simulation Results

4.5. BER Results - Diversity Combining. The results for diversity combining are shown in fig(3). The result for MRC conforms with the theoritical result obtained in equation (24). Further,the BER plots illustrate through simulation, the effectiveness of diversity combining techniques overFading Channels. It can be clearly seen that the MRC provides the best performance, while EGCand Selective Diversity provide marginally inferior performances.

4.6. Conclusions. The following results are evident form the simulation results:• The simulation results conform with their corresponding closed form expressions.

Page 12: 862 Fading

12 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

0 1 2 3 4 5 6 7 8 910

−3

10−2

10−1

100

SNR per Bit (γb) −−−−>

BE

R −

−−

−>

Fading ChannelSelective CombiningEqual Gain Combining (EGC)Maximal Ratio Combining (MRC)

Figure 6. BER Improvement due to Diversity - Simulation Results

• There is an excessive degradation in the BER performance due to fading.• Diversity techniques can effectively combat fading. The performance improvement in the

BER is maximum for Maximal Ratio Combining (MRC), while Equal Gain Combining(EGC) and Selective Combining provide marginally inferior performances.

Page 13: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 13

5. MATLAB Code

\subsection{Fading Performance}clear;numSamplesPerSymbol = 16;

nIters = 50;LogFadeEbNo = [0 1 2 3 4 5 6 7 8 9];lenSim = length(LogFadeEbNo);

hTransmitFilter = ones(1,numSamplesPerSymbol);hReceiveFilter = hTransmitFilter;

% <-- System test begins -->

for EbNoIndex = 1:lenSimfor iters = 1:nIters

% The Transmitter firstBitStreamLength = 10000;BitStream = randn(1,BitStreamLength)>0.5;SymbolsTx = 2*BitStream - 1;WaveformTx = TransmitFilter(SymbolsTx,hTransmitFilter,numSamplesPerSymbol);

% Eb/No and Avg Fade Power Calculaions.AvgFadePower = 1;EbNo = 10^(LogFadeEbNo(EbNoIndex)/10);Eb = sum(WaveformTx.*WaveformTx)/(BitStreamLength);No = Eb/EbNo;

% Multipath-Fading...FadedWaveform = ApplySlowFading(WaveformTx,numSamplesPerSymbol,AvgFadePower);% AWGN Channel...WaveformRx = AWGNChannel(FadedWaveform,No);

% THe Receiver..SymbolsRx = ReceiveFilter(WaveformRx,hReceiveFilter,numSamplesPerSymbol);

BitStreamRx = SymbolsRx > 0;Errors = sum(BitStream~=BitStreamRx);BER(iters) = Errors/BitStreamLength;

endAvBER(EbNoIndex) = sum(BER)/nIters

end

wk1write(’faded.xls’,AvBER);semilogy(LogFadeEbNo,AvBER);

5.1. Apply Slow Fading.

function [WaveformOut, fadeSamples] = ApplySlowFading(WaveformIn, ...

Page 14: 862 Fading

14 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

numSamplesPerSymbol,AvgFadePower)

% This is being done this way, since the transmit filter% is just a all-ones filter.. otherwise,% we might have to generated a fade for each symbol% and multiply all the samples within the% symbols with that fade.

% Get the Symbols firstSymbolsIn = WaveformIn(1:numSamplesPerSymbol:end);

% Apply Fading to those symbols..[SymbolsOut, fadeSamples] = ApplySlowFade(SymbolsIn, AvgFadePower);

% Convert back the symbols to a Waveform.conversionFilter = ones(1,numSamplesPerSymbol);WaveformOut = zeros(1,length(WaveformIn));WaveformOut(1:numSamplesPerSymbol:end) = SymbolsOut;WaveformOut = filter(conversionFilter,1,WaveformOut,zeros(1,...

length(conversionFilter)-1));

5.2. Fading Generation.function [fadeEnvelope] = SlowFade(NumSamples, AvgPower)

% First generate the I and Q Gaussian Sequences.I_Gaussian = randn(1,NumSamples);Q_Gaussian = randn(1,NumSamples);

fadeEnvelope = sqrt(I_Gaussian.*I_Gaussian + Q_Gaussian.*Q_Gaussian);

rmsEnvelope = sqrt(mean(fadeEnvelope.*fadeEnvelope));fadeEnvelope = fadeEnvelope/rmsEnvelope;fadeEnvelope = fadeEnvelope*sqrt(AvgPower);

5.3. AWGN Channel Model.function [RxWaveform] = AWGNChannel(TxWaveform,No)

lenWaveform = length(TxWaveform);noiseStdDeviation = sqrt(No/2);RxWaveform = TxWaveform + noiseStdDeviation*randn(1,lenWaveform);

5.4. Diversity Implementation.clear;numSamplesPerSymbol = 16;

nIters = 50;LogFadeEbNo = [0 1 2 3 4 5 6 7 8 9];lenSim = length(LogFadeEbNo);

Page 15: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 15

hTransmitFilter = ones(1,numSamplesPerSymbol);hReceiveFilter = hTransmitFilter;

% <-- System test begins -->

for EbNoIndex = 1:lenSim,display(’EbNo Starting ..’);for iters = 1:nIters,

% The Transmitter firstBitStreamLength = 10000;BitStream = randn(1,BitStreamLength)>0.5;SymbolsTx = 2*BitStream - 1;WaveformTx = TransmitFilter(SymbolsTx,hTransmitFilter,numSamplesPerSymbol);

% Eb/No and Avg Fade Power Calculaions.AvgFadePower = 1;EbNo = 10^(LogFadeEbNo(EbNoIndex)/10);EbNoC = EbNo/2;Eb = sum(WaveformTx.*WaveformTx)/(BitStreamLength);No = Eb/EbNoC;

% Apply Diversity here.WaveformTxOne = WaveformTx/sqrt(2);WaveformTxTwo = WaveformTx/sqrt(2);

% Independent Fading Channels.

% Fading Channel #1 ...[FadedWaveformOne, fadeSamplesOne] = ApplySlowFading(WaveformTxOne,...

numSamplesPerSymbol,AvgFadePower);% AWGN Channel...WaveformRxOne = AWGNChannel(FadedWaveformOne,No/2);

% Fading Channel #2 ...[FadedWaveformTwo, fadeSamplesTwo] = ApplySlowFading(WaveformTxTwo,...

numSamplesPerSymbol,AvgFadePower);% AWGN Channel...WaveformRxTwo = AWGNChannel(FadedWaveformTwo,No/2);

% The Receiver #1..SymbolsRxOne = ReceiveFilter(WaveformRxOne,hReceiveFilter,numSamplesPerSymbol);

% The Receiver #2..SymbolsRxTwo = ReceiveFilter(WaveformRxTwo,hReceiveFilter,numSamplesPerSymbol);

% Combining techniques galore !!

fadeSamplesOne = fadeSamplesOne(1:BitStreamLength);

Page 16: 862 Fading

16 VIJAYA CHANDRAN RAMASAMI (KUID 698659)

fadeSamplesTwo = fadeSamplesTwo(1:BitStreamLength);SymbolsRx = DiversityCombiner(SymbolsRxOne, SymbolsRxTwo, ’m’,...

fadeSamplesOne, fadeSamplesTwo);

BitStreamRx = SymbolsRx > 0;Errors = sum(BitStream~=BitStreamRx);BER(iters) = Errors/BitStreamLength;

endAvBER(EbNoIndex) = sum(BER)/nIters

end

semilogy(LogFadeEbNo,AvBER);wk1write(’mrc.xls’,AvBER);

5.5. Diversity Combiner.function [SymbolsRx] = DiversityCombiner(SymbolsRxOne, SymbolsRxTwo, ...

Method, fadeSamplesOne, fadeSamplesTwo)

lenSymbols = length(SymbolsRxOne);SymbolsRx = zeros(1,lenSymbols);switch(Method)case ’s’,

for index = 1:lenSymbols,if (abs(SymbolsRxOne(index)) > abs(SymbolsRxTwo(index)))

SymbolsRx(index) = SymbolsRxOne(index);else

SymbolsRx(index) = SymbolsRxTwo(index);end

endcase ’e’,

SymbolsRx = SymbolsRxOne + SymbolsRxTwo;

case ’m’,SymbolsRx = SymbolsRxOne.*fadeSamplesOne + SymbolsRxTwo.*fadeSamplesTwo;

end

Page 17: 862 Fading

EECS 862 PROJECT - BER PERFORMANCE OVER FADING CHANNELS AND DIVERSITY COMBINING 17

References

[1] John. G. Proakis, “Digital Communications”, McGraw-Hill Series in Electrical and Computer Engineering, ThirdEd.

[2] Theodore. S. Rappaport, “Wireless Communications”, Prentice-Hall Communications Engineering and Emerging

Technologies Series.