I WANT THE CODE PLEASE, ANSWER IN CODE
Ù‡
8.2 Simulation of the Detector Performance for Binary Antipodal Signals
The purpose of this problem is to estimate and plot the probability of error when binary antipodal signals are transmitted over an additive white Gaussian noise chan nel. The model of the binary communication system employing antipodal signals is shown in Figure CP-8.2.As shown,we simulate the generation of the random vari able y.which is the input to the detector. A uniform random number generator is used to generate the binary information sequence of zeros and ones from the data source.The sequence of zeros and ones is mapped into a sequence ofwhere represents the signal energy per bit.A Gaussian noise generator is used to generate a sequence of zero-mean Gaussian numbers with variance .For equally probable zeros and ones,the detector compares the random variable y with the threshold zero. If y>0.the decision is made that the transmitted bit is a zero.If y<0.the decision is made that the transmitted bit is a l. The output of the detector is compared with the transmitted sequence of information bits, and the bit errors are counted.
Perform the simulation for the transmission of 10.000 bits at several different values of SNR,which covers the range of SNRs 0<10logio /No7.Plot the error probability as a function of the SNR.Compare the estimated error probability with the theoretical error probability given by the formula
26b No
Uniform random numbergenerator
Gaussian'random number generator
Binary data source
Output data
Detector
Compare
Error counter
Figure CP-8.2 Simulation model of the binary antipodal signal detection