0% found this document useful (0 votes)
409 views

007 - Bit Error Rate

BER results obtained using Matlab / Octave simulation scripts show good agreement with the derived theoretical results. With Binary Phase Shift Keying (BPSK), the binary digits 1 and 0 maybe represented by the analog levels. The transmitted waveform gets corrupted by noise Gaussian Noise (AWGN)

Uploaded by

Kos Gayo
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
409 views

007 - Bit Error Rate

BER results obtained using Matlab / Octave simulation scripts show good agreement with the derived theoretical results. With Binary Phase Shift Keying (BPSK), the binary digits 1 and 0 maybe represented by the analog levels. The transmitted waveform gets corrupted by noise Gaussian Noise (AWGN)

Uploaded by

Kos Gayo
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Bit Error Rate (BER) for BPSK modulation

by Krishna Sankar on August 5, 2007 ShareThis In this post, we will derive the theoretical equation for bit error rate (BER) with Binary Phase Shift Keying (BPSK) modulation scheme in Additive White Gaussian Noise (AWGN) channel. The BER results obtained using Matlab/Octave simulation scripts show good agreement with the derived theoretical results. With Binary Phase Shift Keying (BPSK), the binary digits 1 and 0 maybe represented by the analog levels and respectively. The system model is as shown in the Figure below.

Figure: Simplified block diagram with BPSK transmitter-receiver

Channel Model
The transmitted waveform gets corrupted by noise Gaussian Noise (AWGN). , typically referred to as Additive White

Additive : As the noise gets added (and not multiplied) to the received signal White : The spectrum of the noise if flat for all frequencies. Gaussian : The values of the noise with follows the Gaussian probability distribution function, and .
1

Computing the probability of error


Using the derivation provided in Section 5.2.1 of [COMM-PROAKIS] as reference: The received signal, when bit 1 is transmitted and when bit 0 is transmitted. The conditional probability distribution function (PDF) of for the two cases are:

Figure: Conditional probability density function with BPSK modulation Assuming that and decision boundary. are equally probable i.e. , the threshold 0 forms the optimal

if the received signal is transmitted. if the received signal is transmitted.

is greater than 0, then the receiver assumes

was

is less than or equal to 0, then the receiver assumes

was

i.e. and .

Probability of error given

was transmitted
is transmitted is (the area in blue region):

With this threshold, the probability of error given , where,

is the complementary error function.

Probability of error given

was transmitted
is transmitted is (the area in green region):

Similarly the probability of error given .

Total probability of bit error


. Given that we assumed that error probability is, and are equally probable i.e. , the bit

.
3

Simulation model
Matlab/Octave source code for computing the bit error rate with BPSK modulation from theory and simulation. The code performs the following: (a) Generation of random BPSK modulated symbols +1s and -1s (b) Passing them through Additive White Gaussian Noise channel (c) Demodulation of the received symbol based on the location in the constellation (d) Counting the number of errors (e) Repeating the same for multiple Eb/No value. Click here to download Matlab/Octave script for simulating BER for BPSK modulation in AWGN chnanel.

Figure: Bit error rate (BER) curve for BPSK modulation theory, simulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Creative Commons

% % % % % % % % % % % % % % % % % % % % % % % % %

Attribution-Noncommercial 2.5 India You are free: to Share to copy, distribute and transmit the work to Remix to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial. You may not use this work for commercial purposes. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights. http://creativecommons.org/licenses/by-nc/2.5/in/ Script for simulating binary phase shift keyed transmission and reception and compare the simulated and theoretical bit error probability Checked for proper operation with Octave Version 3.0.0 Author : Krishna Email : [email protected] Version : 1.0 Date : 5 August 2007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear N = 10^6 % number of bits or symbols rand('state',100); % initializing the rand() function randn('state',200); % initializing the randn() function % Transmitter ip = rand(1,N)>0.5; % generating 0,1 with equal probability s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 0 n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance Eb_N0_dB = [-3:10]; % multiple Eb/N0 values for ii = 1:length(Eb_N0_dB) % Noise addition y = s + 10^(-Eb_N0_dB(ii)/20)*n; % additive white gaussian noise % receiver - hard decision decoding ipHat = real(y)>0; % counting the errors nErr(ii) = size(find([ip- ipHat]),2); end simBer = nErr/N; % simulated ber

theoryBer = 0.5*erfc(sqrt(10.^(Eb_N0_dB/10))); % theoretical ber % plot close all figure semilogy(Eb_N0_dB,theoryBer,'b.-'); hold on semilogy(Eb_N0_dB,simBer,'mx-'); axis([-3 10 10^-5 0.5]) grid on legend('theory', 'simulation'); xlabel('Eb/No, dB'); ylabel('Bit Error Rate'); title('Bit error probability curve for BPSK modulation');

BER for BPSK in Rayleigh channel


by Krishna Sankar on August 10, 2008 ShareThis Long back in time we discussed the BER (bit error rate) for BPSK modulation in a simple AWGN channel (time stamps states August 2007). Almost an year back! It high time we discuss the BER for BPSK in a Rayleigh multipath channel. In a brief discussion on Rayleigh channel, wherein we stated that a circularly symmetric complex Gaussian random variable is of the form, , where real and imaginary parts are zero mean independent and identically distributed (iid) Gaussian random variables with mean 0 and variance . The magnitude which has a probability density,

is called a Rayleigh random variable. This model, called Rayleigh fading channel model, is reasonable for an environment where there are large number of reflectors.

System model
The received signal in Rayleigh fading channel is of the form, , where is the received symbol, is complex scaling factor corresponding to Rayleigh multipath channel is the transmitted symbol (taking values +1s and -1s) and is the Additive White Gaussian Noise (AWGN) Assumptions 1. The channel is flat fading In simple terms, it means that the multipath channel has only one tap. So, the convolution operation reduces to a simple multiplication. For a more rigorous
7

discussion on flat fading and frequency selective fading, may I urge you to review Chapter 15.3 Signal Time-Spreading from [DIGITAL COMMUNICATIONS: SKLAR] 2. The channel is randomly varying in time meaning each transmitted symbol gets multiplied by a randomly varying complex number . Since is modeling a Rayleigh channel, the real and imaginary parts are Gaussian distributed having mean 0 and variance 1/2. 3. The noise has the Gaussian probability density function with

with

and

4. The channel is known at the receiver. Equalization is performed at the receiver by dividing the received symbol by the apriori known i.e.

where is the additive noise scaled by the channel coefficient.

Bit Error Rate


The equations listed below refers Chapter 14.3 in [DIGITAL COMMUNICATION: PROAKIS] If you recall, in the post on BER computation in AWGN, the probability of error for transmission of either +1 or -1 is computed by integrating the tail of the Gaussian probability density function for a given value of bit energy to noise ratio . The bit error rate is,

However in the presence of channel , the effective bit energy to noise ratio is bit error probability for a given value of is,

. So the

where

To find the error probability over all random values of , one must evaluate the conditional probability density function over the probability density function of . Probability density function of From our discussion on chi-square random variable, we know that if is a Rayleigh distributed is chi is,

random variable, then is chi-square distributed with two degrees of freedom. since square distributed, is also chi square distributed. The probability density function of

. Error probability So the error probability is,

. Somehow, this equation reduces to

. Note: 1. I have not yet figured out the math to reduce the above integral to the answer. If some one knows, kindly drop in a comment. 2. Another way for finding the bit error rate might be to find the pdf of . However, I do not know how to find pdf following the division of two random variables.

Simulation Model
It will be useful to provide a simple Matlab/Octave example simulating a BPSK transmission and reception in Rayleigh channel. The script performs the following
9

(a) Generate random binary sequence of +1s and -1s. (b) Multiply the symbols with the channel and then add white Gaussian noise. (c) At the receiver, equalize (divide) the received symbols with the known channel (d) Perform hard decision decoding and count the bit errors

(e) Repeat for multiple values of

and plot the simulation and theoretical results.

Click here to download Matlab/Octave script for BER computation of BPSK in Rayleigh fading channel

Figure: BER plot of BPSK in Rayleigh fading channel When compared to the AWGN case, around 25dB degradation due to the multipath channel (at the point). This is both good and bad: bad because we need to spend so much energy to get a reliable wireless link up (in this era of global warming), and good because we signal processing engineers are trying to figure out ways for improving the performance.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % All rights reserved by Krishna Pillai, http://www.dsplog.com % The file may not be re-distributed without explicit authorization % from Krishna Pillai.

10

% % % % % %

Checked for proper operation with Octave Version 3.0.0 Author : Krishna Pillai Email : [email protected] Version : 1.0 Date : 8 August 2008 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Script for computing the BER for BPSK modulation in a % Rayleigh fading channel clear N = 10^6 % number of bits or symbols % Transmitter ip = rand(1,N)>0.5; % generating 0,1 with equal probability s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 0 Eb_N0_dB = [-3:35]; % multiple Eb/N0 values for ii = 1:length(Eb_N0_dB) n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % Rayleigh channel % Channel and noise Noise addition y = h.*s + 10^(-Eb_N0_dB(ii)/20)*n; % equalization yHat = y./h; % receiver - hard decision decoding ipHat = real(yHat)>0; % counting the errors nErr(ii) = size(find([ip- ipHat]),2); end simBer = nErr/N; % simulated ber theoryBerAWGN = 0.5*erfc(sqrt(10.^(Eb_N0_dB/10))); % theoretical ber EbN0Lin = 10.^(Eb_N0_dB/10); theoryBer = 0.5.*(1-sqrt(EbN0Lin./(EbN0Lin+1))); % plot close all figure semilogy(Eb_N0_dB,theoryBerAWGN,'cd-','LineWidth',2); hold on semilogy(Eb_N0_dB,theoryBer,'bp-','LineWidth',2); semilogy(Eb_N0_dB,simBer,'mx-','LineWidth',2); axis([-3 35 10^-5 0.5])

11

grid on legend('AWGN-Theory','Rayleigh-Theory', 'Rayleigh-Simulation'); xlabel('Eb/No, dB'); ylabel('Bit Error Rate'); title('BER for BPSK modulation in Rayleigh channel');

Derivation of BPSK BER in Rayleigh channel


by Krishna Sankar on January 22, 2009 This is a guest post by Jose Antonio Urigen who is an Electrical and Electronic Engineer currently studying an MSc in Communications and Signal Processing at Imperial College in London. This guest post has been created due to his own curiosity when reviewing some concepts of BER for BPSK in Rayleigh channnel published in the dsplog.com From the post on BER for BPSK in Rayleigh channnel, it was shown that, in the presence of channel , the effective bit energy to noise ratio is is, .

The bit error probability for a given value of

, where

. The resulting BER in a communications sytem in the presence of a channel , for any random

values of , must be calculated evaluating the conditional probability density function over the probability density function of .

12

where, the probability density function of is

and

First, we are going to derive the result for the definite integral using a different notation, and then we will apply the result to the concrete expression obtained for the BER. Using the definitions for the erfc and erf functions, we can directly compute the first derivative:

And also the definite integral, simply calculating it by parts:

In the following steps we will use the next also straightforward results:

In total, we want to derive the following integral, which can be solved by parts:

13

Lets find the last term applying the previous result for the erf function, and doing a change of variable:

. Finally, we conclude the expected result:

With the above demonstration, we can easily derive the BER for a Rayleigh channel using BPSK modulation:

.
This forms the proof for BER for BPSK modulation in Rayleigh channel.

Deriving PDF of Rayleigh random variable


14

by Krishna Sankar on July 17, 2008 ShareThis In the post on Rayleigh channel model, we stated that a circularly symmetric random variable is of the form , where real and imaginary parts are zero mean independent and identically distributed (iid) Gaussian random variables. The magnitude which has the probability density,

is called a Rayleigh random variable. Further, the phase is uniformly distributed from . In this post we will try to derive the expression for probability density function (PDF) for and . The text provided in Section 5.4.5 of [ELECTRONIC-COMMUNICATION:PRADIP] is used as reference.

Joint probability
The probability density function of is

. Similarly probability density function of is

. As and are independent random variables, the joint probability is the product of the individual probability, i.e,

. The joint probability that the random variable variable lies between and is, lies between and and the random

.
15

Conversion to polar co-ordinate


Given that ordinate is in the Cartesian co-ordinate form, we can convert that into the polar cowhere, and .

Figure: Cartesian co-ordinate to polar co-ordinate The area form. is Cartesian co-ordinate form is equal to the area in the polar co-ordinate

. Simplifying, . Summarizing the joint probability density function,

16

Since and are independent, the individual probability density functions are,

Simulation Model
Simple Matlab/Octave simulation model is provided for plotting the probability density of and . The script performs the following: (a) Generate two independent zero mean, unit variance Gaussian random variables (b) Using the hist() function compute the simulated probability density for both and

(c) Using the knowledge of the equation (which we just derived), compute the theoretical probability density function (PDF) (d) Plot the simulated and theoretical probability density functions (PDF) and show that they are in good agreement. Click here to download Matlab/Octave script for simulating the probability density function (PDF) of Rayleigh random variable

17

Figure: Simulated/theoretical PDF of Rayleigh random variable

Figure: Simulated/theoretical PDF of uniformly distributed theta random variable

18

Rayleigh multipath channel model


by Krishna Sankar on July 14, 2008 ShareThis The article gives a quick overview of a simple statistical multipath channel model called Rayleigh fading channel model.

Multipath environment
In a multipath environment, it is reasonably intuitive to visualize that an impulse transmitted from transmitter will reach the receiver as a train of impulses.

Figure: Impulse response of a multipath channel Let the transmit bandpass signal be, , where is the baseband signal, is the carrier frequency and is the time. As shown above, the transmit signal reaches the receiver through multiple paths where the path has an attenuation and delay . The received signal is,

. Plugging in the equation for transmit baseband signal from the above equation,
19

. The baseband equivalent of the received signal is,

, where The impulse response is, is the phase of the path.

Rayleigh fading model


The phase of each path can change by radian when the delay changes by . If is large, relative small motions in the medium can cause change of radians. Since the distance between the devices are much larger than the wavelength of the carrier frequency, it is reasonable to assume that the phase is uniformly distributed between 0 and radians and the phases of each path are independent (Sec 2.4.2 [WIRELESS-COMMUNICATION: TSE, VISWANATH]). When there are large number of paths, applying Central Limit Theorem, each path can be modelled as circularly symmetric complex Gaussian random variable with time as the variable. This model is called Rayleigh fading channel model. A circularly symmetric complex Gaussian random variable is of the form, , where real and imaginary parts are zero mean independent and identically distributed (iid) Gaussian random variables. For a circularly symmetric complex random variable , .

20

The statistics of a circularly symmetric complex Gaussian random variable is completely specified by the variance, . The magnitude which has a probability density,

is called a Rayleigh random variable. This model, called Rayleigh fading channel model, is reasonable for an environment where there are large number of reflectors.

21

You might also like