summaryrefslogtreecommitdiff
path: root/401/CH12/EX12.3/Example12_3.sce
blob: 7ca1a690223eb2e14a3344a2efc78431d16bd6a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Example 12.3
//Program to estimate the average number of photons which must be 
//incident on the APD to register a binary one with a BER of 10^(-9) 

clear;
clc ;
close ;

//Given data
k=0.02;                //CARRIER IONIZATION RATE
M=100;                 //MULTIPLICATION FACTOR
SNR=144;               //SIGNAL TO NOISE RATIO
Bt=0.6;                //FOR RAISED COSINE PULSE SPECTRUM
n=0.8;                 //(*100) percent - QUANTUM EFFICIENCY

//Excess avalanche noise factor F(M)
F=k*M+(2-1/M)*(1-k);

//Average number of photons
z=2*Bt*ceil(F)/n*SNR;

//Displaying the Result in Command Window
printf("\n\n\t  The average number of photons which must be incident on the APD is %1.0f photons.",z);