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).

## Single receive antenna case

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 received symbol,

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

, 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 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**.

## Receive diversity with N receive antenna

With a general N receive antenna case, the received symbol is,

, 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 .

**E****ffective 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.

(b) Add white Gaussian noise on the received symbol on all the receive chains

(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.

Click here to download Matlab/Octave script for BER of BPSK in AWGN with receive diversity

**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.

D id you like this article? Make sure that you do not miss a new article
by subscribing to RSS feed OR subscribing to e-mail newsletter.
* Note: Subscribing via e-mail entitles you to download the free e-Book on BER of BPSK/QPSK/16QAM/16PSK in AWGN.*

{ 29 comments… read them below or add one }

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

@mazaismo:

a) FSK @

http://www.dsplog.com/2007/08/30/bit-error-rate-for-frequency-shift-keying-with-coherent-demodulation/

b) QPSK/4-QAM@

http://www.dsplog.com/2007/11/06/symbol-error-rate-for-4-qam/

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.

Thanks in advance

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

@Ahmed: The post on Maximal Ratio Combining (MRC) with h1 and h2 being Rayeligh faded discuss the effective SNR and BER.

http://www.dsplog.com/2008/09/28/maximal-ratio-combining/

Hope that helps.

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..

@arjun: Please check posts in http://www.dsplog.com/tag/ofdm/

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.

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

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.

@Aishwarya: Yes, for QPSK we need to take both real and imaginary parts. Some posts discussing QPSK can be found at

http://www.dsplog.com/2008/07/08/compare-bpsk-qpsk-4pam-16qam-16psk-64qam-32psk/

http://www.dsplog.com/2012/01/01/symbol-error-rate-16qam-64qam-256qam/

Hello Mr.Pillai

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

thank you

@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 @

http://www.dsplog.com/tag/diversity/

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…

i am waiting for your reply

@atlanta: Please refer to the post on Coherent Demodulation of DBPSK

http://www.dsplog.com/2007/09/30/coherent-demodulation-of-dbpsk/

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

@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

http://www.dsplog.com/2009/04/13/transmit-beamforming/

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

@anuradha: My replies

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.

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

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

Eb/No link

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

@Ashwini: Thanks for the link.

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.

@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).

hellow Mr krishna

can you help me to make a matlab subscrip for BER QPSK with rain attenuation

thanks

@wayan: I am not familiar with modeling rain attenuation. However, I have written a post on symbol error rate for QPSK in AWGN

http://www.dsplog.com/2007/11/06/symbol-error-rate-for-4-qam/

Hope this helps.

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

@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

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

@jimmy: Please look at the post on BER for BPSK modulation in AWGN

http://www.dsplog.com/2007/08/05/bit-error-probability-for-bpsk-modulation/ for the derivation of Pb=1/2 erfc(sqrt(NEb/N0))

Assumed that the each receive antenna presents independent thermal noise.

{ 1 trackback }