It can be shown that the theoretical probability of error for a digital communication system is given by
MATLAB Program to Generate and Recover Noisy Random Bits and the corresponding BER
% Generate 5000000 logical 0s and logical 1s with equal probability of occurrence
>> data = randint(5000000,1);
% Logical states converted to bipolar levels, logical 0 mapped to +1 and logical 1 mapped to -1
>> bdata = 1 - 2*data;
% Generate 5000000 of zero mean, unit variance Gaussian random numbers
>> unsnoise = randn(5000000,1);
% Empty matrix to store snrdb values
>> S = [ ];
% Empty matrix to store error rate values
>> E = [ ];
% Empty matrix to store the theoretical values of probability of error for a given snrdb value
>> Q = [ ];
% Begin for loop where values of snrdb are going to be incremented from 0 dB to 10 dB in 0.5 dB steps
>> for m = 1:21;
>> snrdb = (m - 1)/2;
% Multiplicative factor that must be applied to the Gaussian random numbers to achieve the desired snrdb
% when the data bits and the noise samples are added
>> nf = sqrt(0.5*(10^(-0.1*snrdb)));
% Amplitude scaled noise
>> noise = nf*unsnoise;
% Generation of noisy data
>> r = bdata + noise;
% Data recovery by observing the polarity (or sign) of the noisy data
>> ro = sign(r);
% Difference between recovered data and original bipolar data
>> diff = ro - bdata;
% Error determination by counting the number of differences (note that difference as a number equals 2)
>> err = 0.5*sum(abs(diff));
% Error rate determination by dividing the number of errors by the total number of bits processed
>> errrate = err/5000000;
% Theoretical result formula
>> Pe = qfunc(sqrt(2*(10^(0.1*snrdb))));
% Storage of snrdb, error rate, and Pe values
>> S = [S ; snrdb];
>> E = [E ; errrate];
>> Q = [Q ; Pe];
>> end

Note that the error rate plot and the theoretical probability of bit error are almost undistinguishable in the above diagram. Slight difference can be observed at large signal-to-noise ratio as the error rate plot loses some accuracy due to the low error rate. In order to observe many errors at high signal-to-noise ratio, a very large number of bits must be processed. This may become impractical with the somewhat limited capability of desktop computing. One way this can be overcome is by repeating several times the calculations of error rate for high signal-to-noise ratio and averaging the results.
Trades & Technology
You might also like to view...
Identifying measures, called ____, that reduce the effects of system disruptions can reduce continuity life-cycle costs.
A. preventive controls B. BC requirements C. BC exercises D. predictive controls
Trades & Technology
Engines are mounted to engine stands __________
A) Using bellhousing bolt holes B) Using holes drilled in the engine block C) Either A or B D) Neither A nor B
Trades & Technology
In the circuit in Fig. 9.43, determine i. Let vs = 60 cos(200t - 10°) V.
Trades & Technology
What supports the front end of a semi-trailer when it is uncoupled from a tractor and parked?
A. upper coupler B. dolly legs C. lift axle D. nose plate
Trades & Technology