 Some among you will be aware that in a wireless link having multiple antenna’s at the receiver (aka receive diversity) improves the bit error rate (BER) performance. In this post, let us try to understand the BER improvement with receive diversity. And, since we are just getting started, let us limit ourselves to additive white Gaussian noise (AWGN) channel (i.e assume that the channel gains are unity).

Let us begin with the discussion with one transmit antenna, sending signals with energy and one receive antenna. Since we are considering only BPSK modulation, the signals which are sent out are either or . Let there be a single receive antenna having a thermal noise (aka AWGN) with mean and variance .

The probability density function of noise is,

.

The received signal is of the form,

, where

is the transmitted symbol (taking values ‘s and‘s) and
is the Additive White Gaussian Noise (AWGN).

From our discussion on BER for BPSK modulation in AWGN, we know that probability of bit error is,

.

## Receive diversity with two antennas

Now consider the case where we have two receive antennas each having thermal noise (aka AWGN) with mean and variance . As the noise on each antenna is independent from each other, in signal processing parlance, we can say that noise on each antennas are i.i.d i.e independent and identically distributed. The transmitter is still sending symbols with energy .

The received signal is of the form,

, where

is the transmitted symbol (taking values ‘s and‘s) and
,is the Additive White Gaussian Noise (AWGN) on receive antenna 1, 2 respectively.

For simplicity, let us assume that the signal was transmitted. At the receiver, we now have

and

To decode, the simplistic (and the optimal in this scenario) is to take the mean of ,and perform hard decision decoding, i.e

and if implies the transmitted bit is 1 and implies transmitted bit is 0.

Now let us find out if there is any receive diversity gain by performing this averaging. Splitting into signal term and noise term

.

The first term in the above equation is the signal term – which still transmit symbols with energy . The second term is mean of two Gaussian noise terms.

(a) From the discussion on sum of Gaussian random variables,

if is a Gaussian random variable with mean , variance and is another independent Gaussian random variable with , variance , then is another Gaussian random variable with , variance .

(b) Furher, from the discussion on functions of Gaussian random variables,

if is a Gaussian random variable with mean , variance , then is another Gaussian random variable with mean , variance .

Using the above two equations, the noise term is another Gaussian random variable with mean and variance .

When compared with the single antenna case, we can see the variance of the noise term is scaled by a factor of 2. This implies that the effective bit energy to noise ratio in a two receive antenna case is twice the bit energy to noise ratio for single antenna case.

.

So the bit error probability for two receive antenna case is,

.

Expressing in decibels, with two receive antennas, we need only lower bit energy ! No wonder people like receive diversity. 🙂

, where

, ,… are the received symbols from receive antenna 1, 2 respectively,
is the transmitted symbol (taking values ‘s and‘s) and
,,… is the Additive White Gaussian Noise (AWGN) on receive antenna 1, 2,… N respectively.

For demodulation, we compute which is the mean of all the N received symbols, and if implies the transmitted bit is 1 and implies transmitted bit is 0.

The variance of the noise term  is .

Effective bit energy to noise ratio in a N receive antenna case is N times the bit energy to noise ratio for single antenna case.

.

So the bit error probability for N receive antenna case is,

.

## Simulation Model

Simple Matlab/Octave example simulating a BPSK transmission and reception in AWGN only scenario with multiple receive antennas. The script performs the following

(a) Generate random binary sequence of +1’s and -1’s.

(c) For each symbol, compute the mean of the received symbol over all the receive chains

(d) Perform hard decision decoding and count the bit errors

(e) Repeat for receive chains = 1, 2, 3, 4 for multiple values of

(f) Plot the simulation and theoretical results. Figure: BER for BPSK in AWGN with receive diversity (number of receive antennas = 1, 2, 3, 4)

## Observations

1. As desired, the simulation results show good agreement with theory.

2. With an N receive antenna system, the gain compared to single receive antenna case is around . For example in the above figure, for bit error rate of ,

• with two receive antennas the required is 3dB lower,
• with three receive antennas, the required is 4.7dB lower and
• with four three receive antennas, the required is 6dB lower.

Hope this helped you get started with receive diversity. If not, please do drop in a comment. Happy learning.

## 30 thoughts on “Receive diversity in AWGN”

1. mazaismo says:

what is the MATLAB code of BER performance of coherent FSK,PSK and QPSK

1. Krishna Sankar says:
2. Ahmed says:

Hi Krishna
I wonder if we consider Rayleigh fading channel, and suppose the received signals are
y1=h1*s+n1 and y2=h1*s+n1
How can you show the diversity order.
Or suppose we combine the signals with MRC y = w1*h1*s+w1*n1 + w2*h2*s+w2*n2
One more question, I don’t understand why we take the expectations of y1 and y1.

1. Ahmed says:

Sorry y1=h1*s+n1, y2=h2*s+n2

3. arjun says:

sir can you please provide me with a valid code for the receiver in Ofdm.. it is very urgent and your help is needed..
thank you for the entire information that you have shared till now..

4. Aishwarya says:

can we use receiver Hard Decision Decoding if we have QPSK signal for same case. for e.g
ip = (2*(rand(1,N)>0.5)-1) + j*(2*(rand(1,N)>0.5)-1);
s = (1/sqrt(2))*ip;
If yes, please give the matlab equation (for ipHat) for all other condition being same as above. please try to reply as soon as posible.

Thank you.

1. Krishna Sankar says:

@Aishwarya: it should be straightforward for you to extend this to QPSK case

1. Aishwarya says:

But in case if Qpsk it has imaginary part also in ip. and if we find real(yHat), then the error in the imaginary part will not be counted. so it may not find all the errors. Isn’t it?
can you give the equation how can we perform hard decision decoding with both real and imaginary part taking into consideration.

5. Sujith says:

Hello Mr.Pillai

How to do equalisation if you are working on same program using rayleigh channel.

thank you

1. Krishna Sankar says:

@Sujith: There are couple of different ways. We can do Equal gain combining, Selection Diversity, and Maximal Ratio Combining (MRC). The MRC is optimal. Have discussed about each scheme @
https://dsplog.com/tag/diversity/

6. atlanta says:

hello sir,
i am trying to write a matlab code to calculate the BER of a DPSK modulation scheme for a rayleigh/ AWGN. So i need your help.
thank you sir…

7. mahsa says:

hi
im trying to write a matlab code which i have 2 Tx and 1 Rx with fading channel, and AWGN noise and QPSK, i already wrote 1Tx and 1 Rx the BER for one Tx and 1Rx is correct acording to figures , but in the diversity form i should get less BER that i dont get, the problem is that i think my SNR has some problems , the one that i wrote is 1-10*log10(m)-10*log10(frame_pulse)) 1 is my snr, m is the length of time multiply by bandwidth i dont know what should i add more, thanx if you can help me
mahsa

1. Krishna Sankar says:

@mahsa: Unless you do some ‘special’ processing at the transmitter, sending the same information from both the 2 transmit antennas does not result in diversity gain. Please refer to the post on transmit beamforming
https://dsplog.com/2009/04/13/transmit-beamforming/

8. anuradha says:

hi
i wanted to know few things……. about

Script for computing the BER for BPSK modulation in AWGN channel with receive diversity
what is the hard decision decoding and why it is used whether there is any alternative for that,,,,

second why that linewidth is used explanation for the same

graph is not proper for diff snr range as i tried
pls ans fast

1. Krishna Pillai says:

1/ Well, we need to use soft decision, if we are passing the output of demodulation to some other block (like a Viterbi decoder and so on). Otherwise, hard-decision is optimal.
2/ Did you mean the linewidth option used in plot() function. This is just for controlling the width of the line used in the plot 😉 Type help plot for further details.
3/ As you may be aware, your question is vague to say the least…
4/ Sorry, I was traveling. Hence the 3-4 days of delay in my response.

9. Khan Baba says:

I hope that u r fine and doing well. can u plz tell me how SNR = Eb/N0.

1. Ashwini says:

Check this link, Eb/No is explained in detail and most sufficient explanation till date, also some post on wirelesscafe.wordpress.com regarding SNR

http://sss-mag.com/ebn0.html

1. Krishna Pillai says:

In WirelessCafe, you (and your team) have posted nice contents. I have bookmarked for future read. Keep up the good work. Hopefully, we can figure out of some ways to network and reach a wider audience in future.

2. Krishna Pillai says:

@Khan Baba: Well, SNR need not be equal to Eb/N0… 🙂 For bit more details, you may refer to the link http://sss-mag.com/ebn0.html
(thanks to Ashwini).

10. wayan says:

hellow Mr krishna
can you help me to make a matlab subscrip for BER QPSK with rain attenuation
thanks

11. azhu says:

but your SNR is for a signal branch, in practice, total SNR should be considered, if that, no improvement for diversity. am i right?

1. Krishna Pillai says:

@azhu: Hmm… no. Given that the transmit power is the same, as we add more receive antennas, we get improvement in SNR too. May I know why you think otherwise.

Note: In the above example, as its BPSK Eb/N0 = SNR

12. jimmy says:

Hi, is there any reference text that shows this Pb=1/2 erfc(sqrt(NEb/N0)) that I can find?

As we can reduce the ber significantly just by adding a few more antennas, may I know what are the assumptions make for this ber prove?

Thank you