diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2183/CH8 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2183/CH8')
26 files changed, 421 insertions, 0 deletions
diff --git a/2183/CH8/EX8.1/Ex_8_1.sce b/2183/CH8/EX8.1/Ex_8_1.sce new file mode 100755 index 000000000..69481a0e5 --- /dev/null +++ b/2183/CH8/EX8.1/Ex_8_1.sce @@ -0,0 +1,36 @@ +
+// Example 8.1 //compare shot noise and thermal current
+clc;
+clear;
+close;
+T=293;//Temperature in Kelvin
+K=1.38*10^-23;//boltzman constt
+C=3*10^8;//Speed of light in meter per second
+e=1.6*10^-19;//elecronic charge
+ht=6.62*10^-34;//plank constt.
+Id=3;//dark current in nano ampere
+n=0.60;//efficiency
+Rl=4;//load resistance in kilo-ohms
+h=0.9;//wavelength in micro meter
+Po=200;// ouput power in nano Watt
+B=5;// bandwidth in mega hertz
+Ip= ((n*h*10^-6*Po*10^-9*e)/(ht*C))*10^9;//Photo current in Ampere
+its=(2*e*B*10^6*(Id+Ip)*10^-9);//total shot noise
+itsr=sqrt(its);//RMS shot noise
+disp(itsr,"RMS shot noise current in Ampere is")
+T=293;//Temperature in Kelvin
+K=1.38*10^-23;//boltzman constt
+C=3*10^8;//Speed of light in meter per second
+e=1.6*10^-19;//elecronic charge
+ht=6.62*10^-34;//plank constt.
+Id=3;//dark current in nano ampere
+n=0.60;//efficiency
+Rl=4;//load resistance in killo ohms
+h=0.9;//wavelength in micro meter
+Po=200;// ouput power in nano wat
+B=5;// bandwidth in mega hertz
+it=(((4*K*T*B*10^6)/(Rl*10^3)));//thermal noise
+itr=sqrt(it);//rms thermal noise
+disp(itr,"RMS thermal noise current in Ampere is")
+
+
diff --git a/2183/CH8/EX8.10/Ex_8_10.sce b/2183/CH8/EX8.10/Ex_8_10.sce new file mode 100755 index 000000000..2754dcc9e --- /dev/null +++ b/2183/CH8/EX8.10/Ex_8_10.sce @@ -0,0 +1,19 @@ +// Example 8.10 //optical power budget +clc; +clear; +close; +mip=-10;//dBm +mop=-41;//dBm +tsm=mip-mop;//dB +disp(tsm,"total system margin in dB is") +l=7;//km +fcl=2.6;//dB +lfc=l*fcl;//fiber cable loss in dB +sl=0.5;//dBm +slc=sl*(l-1);//dB +cl=1.5;//dB +sm=6;//dB +tsm1=lfc+slc+cl+sm;//dB +disp(tsm1,"total system margin in dB is") +epm=tsm-tsm1;//dB +disp(epm,"excess power margin in dB is") diff --git a/2183/CH8/EX8.12/Ex_8_12.sce b/2183/CH8/EX8.12/Ex_8_12.sce new file mode 100755 index 000000000..678050bd8 --- /dev/null +++ b/2183/CH8/EX8.12/Ex_8_12.sce @@ -0,0 +1,24 @@ +// Example 8.12 //optical power +clc; +clear; +close; +e=1.6*10^-19;//electron charge +sndb=55;//signal to noise ration in dB +sn=(10^(sndb/10));// +bw=5;//Mhz +r=0.5;//responsivity +cs=0.7;//signal attenuation +k=1.38*10^-23;//bolzman constant +tc=20;//degree celsius +tk=tc+273;//Kelvin +fdb=1.5;// +f=10^(fdb/10);// +rl=1;//mega ohms +x=((sn*4*k*tk*bw*10^6*f)/(rl*10^6));// +y=((2*sn*e*bw*10^6*r));// +ma=9/8;// +z=(2*ma*r^2*cs^2);// +s=poly(0,"s");// +p=-x-y*s+z*s^2;// +m=roots(p);// +disp(m(1,1)*10^6,"average incident power in micro Watts is") diff --git a/2183/CH8/EX8.13/Ex_8_13.sce b/2183/CH8/EX8.13/Ex_8_13.sce new file mode 100755 index 000000000..b6e7acdfb --- /dev/null +++ b/2183/CH8/EX8.13/Ex_8_13.sce @@ -0,0 +1,20 @@ +// Example 8.13 //optical power +clc; +clear; +close; +fdb=6;// +f=10^(fdb/10);// +e=1.6*10^-19;//electron charge +sndb=45;//signal to noise ration in dB +sn=(10^(sndb/10));// +h=6.63*10^-34;//planck constant +c=3*10^8;//m/s +e=1.6*10^-19;// +n=0.6;//efficneicny +ma=0.5*10^-3;// +k=1.38*10^-23;//boltzman constant +tk=300;//degree celcius +bw=8;//MHz +rl=50;//kilo ohms +po=((h*c)/(e*n*ma^2))*sqrt((8*k*tk*bw*10^6*f)/(rl*10^3))*sqrt(sn);// +disp(po*10^6,"average power incident in micro Watts is") diff --git a/2183/CH8/EX8.14.a/Ex_8_14_a.sce b/2183/CH8/EX8.14.a/Ex_8_14_a.sce new file mode 100755 index 000000000..2715dc19f --- /dev/null +++ b/2183/CH8/EX8.14.a/Ex_8_14_a.sce @@ -0,0 +1,19 @@ +// Example 8.14.a //optical power budget +clc; +clear; +close; +mip=-10;//dBm +mop=-25;//dBm +tsm=mip-mop;//dB +disp(tsm,"total system margin in dB is") +l=2;//km +fcl=3.2;//dB +lfc=l*fcl;//fiber cable loss in dB +sl=0.8;//dBm +slc=sl*l;//dB +cl=1.6;//dB +sm=4;//dB +tsm1=lfc+slc+cl+sm;//dB +disp(tsm1,"total system margin in dB is") +epm=tsm-tsm1;//dB +disp(epm,"excess power margin in dB is") diff --git a/2183/CH8/EX8.14.b/Ex_8_14_b.sce b/2183/CH8/EX8.14.b/Ex_8_14_b.sce new file mode 100755 index 000000000..2d421afae --- /dev/null +++ b/2183/CH8/EX8.14.b/Ex_8_14_b.sce @@ -0,0 +1,22 @@ +// Example 8.14.b //possible increase in link length +clc; +clear; +close; +mip=-10;//dBm +mop=-25;//dBm +tsm=mip-mop;//dB +disp(tsm,"total system margin in dB is") +l=2;//km +fcl=3.2;//dB +lfc=l*fcl;//fiber cable loss in dB +sl=0.8;//dBm +slc=sl*l;//dB +cl=1.6;//dB +sm=4;//dB +tsm1=lfc+slc+cl+sm;//dB +disp(tsm1,"total system margin in dB is") +epm=tsm-tsm1;//dB +ma=8;//dB +l1=((-mop-cl-ma)/(fcl+sl));//km +eil=l1-l;// +disp(eil,"possible increase in length in km") diff --git a/2183/CH8/EX8.15/Ex_8_15.sce b/2183/CH8/EX8.15/Ex_8_15.sce new file mode 100755 index 000000000..0e86d3b7a --- /dev/null +++ b/2183/CH8/EX8.15/Ex_8_15.sce @@ -0,0 +1,18 @@ +//Example 8.15 // +clc; +clear; +close; +//given data : +B=5*10^6;// in Hz +Ts=10;// in ns +Td=4;// in ns +a=9;// in ns/km +b=2;// in ns/km +l=6;// in km +Tn=a*l;// in ns +Tc=b*l;// in ns +Ts_max=(0.35/B)*10^9; +disp(Ts_max,"T system_maxmum,(ns) = ") +Tsys=1.1*sqrt(Ts^2+Tn^2+Tc^2+Td^2); +disp(Tsys,"T system,(ns) = ") +//answer is wrong in the textbook diff --git a/2183/CH8/EX8.16.b/Ex_8_16_b.sce b/2183/CH8/EX8.16.b/Ex_8_16_b.sce new file mode 100755 index 000000000..8c1f952cb --- /dev/null +++ b/2183/CH8/EX8.16.b/Ex_8_16_b.sce @@ -0,0 +1,11 @@ +// Example 8.16.b //SNR improvement and bandwidth +clc; +clear; +close; +fd=400;//KHz +ba=4;//kHz +df1=fd/ba;// +snri=(1.76+20*log10(df1));//dB +disp(snri,"SNR improvement in dB is") +bm=2*ba*(df1+1);//kHz +disp(bm,"bandwidth in kHz is") diff --git a/2183/CH8/EX8.17/Ex_8_17.sce b/2183/CH8/EX8.17/Ex_8_17.sce new file mode 100755 index 000000000..61102e90a --- /dev/null +++ b/2183/CH8/EX8.17/Ex_8_17.sce @@ -0,0 +1,15 @@ +// Example 8.17;//ration of SNR +clc; +clear; +close; +fa=1;// +pa=1;// +r=1;// +po=1;// +ac=1;// +ba=1;// +no=1;// +snr1=((3*fa^3*po*(r*po)^2*((ac^2)/2))/(2*ba^3*no));//SNR output FM +snr2=((fa^3*po*(r*po)^2*((ac^2)/2))/(2*ba^3*no));//SNR output FM +rt=snr1/snr2;// +disp(rt,"ratio of output SNR (in dB) in two system is") diff --git a/2183/CH8/EX8.18/Ex_8_18.sce b/2183/CH8/EX8.18/Ex_8_18.sce new file mode 100755 index 000000000..a432131cc --- /dev/null +++ b/2183/CH8/EX8.18/Ex_8_18.sce @@ -0,0 +1,17 @@ +//Example 8.18 // Optimum receiver bandwidth and peak to peak signal power to noise ratio +clc; +clear; +close; +//given data : +Tr=12*10^-9;// in sec +f0=20*10^6;// in Hz +fD=5*10^6;// in Hz +Mr=80;// multiplication factor +Pp=.75*10^-7; +B=5*10^6;// in Hz +i2N=10^-17;// in A^2 +fr=(1/Tr)*10^-6; +disp(fr," Optimum receiver bandwidth,fr(MHz) = ") +T0=1/f0; +SbyN=10*log10((3*(T0*fD*Mr*Pp)^2)/((2*%pi*Tr*B)^2*i2N)); +disp(SbyN,"signal power to noise ratio,(dB) = ") diff --git a/2183/CH8/EX8.19/ex_8_19.sce b/2183/CH8/EX8.19/ex_8_19.sce new file mode 100755 index 000000000..ad3cc6beb --- /dev/null +++ b/2183/CH8/EX8.19/ex_8_19.sce @@ -0,0 +1,16 @@ +// Example 8.19:compare +clc; +clear; +close; +cl=1;//dB +actr=10;//dB +acl=1;//dB +fcl=4.5;//dB/km +sl=2.5;//dB +cel=2;//dB +dl=100;//m +x=cel*cl-fcl*dl*10^-3+(cel*cl+cl)*-(cel+cl)+(cel*cl+actr)+sl+cl;// +x1=(fcl*dl*10^-3)+(cel*cl+cl);// +disp("total loss for bus distribution system is "+string(x1)+"N + "+string(x)+"") +x3=(cel*2*cl)+cel+(fcl*dl*10^-3);// +disp("total loss for star distribution system is "+string(x3)+"+ 10log10(N)") diff --git a/2183/CH8/EX8.2.a/Ex_8_2_a.sce b/2183/CH8/EX8.2.a/Ex_8_2_a.sce new file mode 100755 index 000000000..56b90a13b --- /dev/null +++ b/2183/CH8/EX8.2.a/Ex_8_2_a.sce @@ -0,0 +1,7 @@ +// Example 8.2.a //threshold quantum limit
+clc;
+clear;
+close;
+en=10^-9;//
+n=-log(en);//
+disp(round(n),"quantum limit is (photons per pulse required )")
diff --git a/2183/CH8/EX8.2.b/Ex_8_2_b.sce b/2183/CH8/EX8.2.b/Ex_8_2_b.sce new file mode 100755 index 000000000..7749940ee --- /dev/null +++ b/2183/CH8/EX8.2.b/Ex_8_2_b.sce @@ -0,0 +1,16 @@ +// Example 8.2.b //minumum incident optical power +clc; +clear; +close; +en=10^-9; +n=-log(en);// +c=3*10^8;//m/s +ht=6.62*10^-34;//plank constt. +B=10^7;//NO. OF BITS +h=0.85*10^-6;//wavelength in meter +Po=((20.7*ht*B*c)/(2*h));//pulse energy in pico Watt +Podb=10*(log10(Po));//pulse energy in dB when refrence level is one Watt +Podb1=10*(log10(Po*10^3));//pulse energy in dB when refrence level is one mili Watt +disp(Po, "minimum incident optical power in Watts is") +disp(Podb1 , "pulse energy in dB when refrence level is one miiliwatt in dBm") + diff --git a/2183/CH8/EX8.20/Ex_8_20.sce b/2183/CH8/EX8.20/Ex_8_20.sce new file mode 100755 index 000000000..62908f204 --- /dev/null +++ b/2183/CH8/EX8.20/Ex_8_20.sce @@ -0,0 +1,17 @@ +// Example 8.20;//maximum length of the system +clc; +clear; +close; +af=0.20;//dB/km +ac1=0.05;//dB/km +k=4;// +b=1.2;//G bit/s +c=3*10^8;//m/s +h=1.55;//micro meter +sndb=17 +sn=10^(sndb/10);// +l=100;//km +hc=6.63*10^-34;// +lt=((10^-3*h*10^-6*(10^-((af+ac1)*(l/10)))*l*10^3)/(k*hc*c*b*10^12*sn));// +disp(lt,"maximum length of the system in km is") +//answer is wrong in the textbook diff --git a/2183/CH8/EX8.3.a/Ex_8_3_a.sce b/2183/CH8/EX8.3.a/Ex_8_3_a.sce new file mode 100755 index 000000000..a685518fd --- /dev/null +++ b/2183/CH8/EX8.3.a/Ex_8_3_a.sce @@ -0,0 +1,10 @@ +// Example 8.3.a;//bit rate for the system +clc; +clear; +close; +wd=8;//bit wide +ts=32;//time slots +nb=ts*wd;//no. of bits in a frame +nf=8*10^3;//no. of frames +tr=nf*nb;//transmission rate +disp(tr*10^-6,"transmission rate for the system in M-bits-s^-1") diff --git a/2183/CH8/EX8.3.b/Ex_8_3_b.sce b/2183/CH8/EX8.3.b/Ex_8_3_b.sce new file mode 100755 index 000000000..55bbdb025 --- /dev/null +++ b/2183/CH8/EX8.3.b/Ex_8_3_b.sce @@ -0,0 +1,12 @@ +// Example 8.3.b //duration of time slot +clc; +clear; +close; +wd=8;//bit wide +ts=32;//time slots +nb=ts*wd;//no. of bits in a frame +nf=8*10^3;//no. of frames +tr=nf*nb;//transmission rate +bdr1=1/tr;//bit duration +bdr=bdr1*wd;// +disp(bdr*10^6,"duration of time slot in micro seconds") diff --git a/2183/CH8/EX8.3.c/Ex_8_3_c.sce b/2183/CH8/EX8.3.c/Ex_8_3_c.sce new file mode 100755 index 000000000..1d5c65582 --- /dev/null +++ b/2183/CH8/EX8.3.c/Ex_8_3_c.sce @@ -0,0 +1,15 @@ +// Example 8.3.c //duration of a frame and multiframe +clc; +clear; +close; +wd=8;//bit wide +ts=32;//time slots +nb=ts*wd;//no. of bits in a frame +nf=8*10^3;//no. of frames +tr=nf*nb;//transmission rate +bdr1=1/tr;//bit duration +bdr=bdr1*wd;// +df=bdr*10^6*ts;//duration of frame +dmf=df*(ts/2);//ms +disp(df,"duration of frame in micro seconds") +disp(dmf*10^-3,"duration of multiframe in milli seconds") diff --git a/2183/CH8/EX8.4/Ex_8_4.sce b/2183/CH8/EX8.4/Ex_8_4.sce new file mode 100755 index 000000000..4d92ca666 --- /dev/null +++ b/2183/CH8/EX8.4/Ex_8_4.sce @@ -0,0 +1,15 @@ +//Example 8.4 // Average nummber of photon +clc; +clear; +close; +//given data : +format('v',5) +M=80;// multiplication factor +K=0.02;// carrier ionization rates +eta=85/100;// quntum efficiency +Bt=0.6;// assuming a raised cosine signal spectrum +SbyN=144; +FM=(K*M)+(2-(1/M))*(1-K); +eta_max=(2*Bt*FM*SbyN)/(eta); +disp(eta_max,"The average number of photon,(photon) = ") +// answer is wrong in a textbook diff --git a/2183/CH8/EX8.5/Ex_8_5.sce b/2183/CH8/EX8.5/Ex_8_5.sce new file mode 100755 index 000000000..e3d70c069 --- /dev/null +++ b/2183/CH8/EX8.5/Ex_8_5.sce @@ -0,0 +1,20 @@ +// Example 8.5;//minumum incident optical power +clc; +clear; +close; +nmax=732;// +c=3*10^8;//m/s +ht=6.62*10^-34;//plank constt. +B=10^7;//NO. OF BITS +h=1*10^-6;//wavelength in meter +Po=((nmax*ht*B*c)/(2*h))*10^12;//pulse energy in pico Watt +Podb=10*(log10(Po));//pulse energy in dB when refrence level is one Watt +Podb1=10*(log10(Po*10^-9));//pulse energy in dB when refrence level is one mili Watt +disp(Podb1 , "pulse energy at bit rate of 10 M bit s^-1 in dBm") +B1=14*10^7;//NO. OF BITS +Po1=((nmax*ht*B1*c)/(2*h))*10^12;//pulse energy in pico Watt +Podb1=10*(log10(Po1));//pulse energy in dB when refrence level is one Watt +Podb2=10*(log10(Po1*10^-9));//pulse energy in dB when refrence level is one mili Watt +disp(Podb2 , "pulse energy at bit rate of 140 M bit s^-1 in dBm") +//at 10 M bit s^-1 power is calc ulated wrong in the book + diff --git a/2183/CH8/EX8.6/Ex_8_6.sce b/2183/CH8/EX8.6/Ex_8_6.sce new file mode 100755 index 000000000..9276eb498 --- /dev/null +++ b/2183/CH8/EX8.6/Ex_8_6.sce @@ -0,0 +1,11 @@ +// Example 8.6;//total channel loss +clc; +clear; +close; +afc=5;//attenuation in dB/km +aj=2;//splice loss in dB/km +l=5;//length in km +ac=3;//dB +ac1=4.5;//dB +cl=(afc+aj)*l+ac+ac1;//dB +disp(cl,"tota channel loss in dB is") diff --git a/2183/CH8/EX8.7.a/Ex_8_7_a.sce b/2183/CH8/EX8.7.a/Ex_8_7_a.sce new file mode 100755 index 000000000..c90b9b002 --- /dev/null +++ b/2183/CH8/EX8.7.a/Ex_8_7_a.sce @@ -0,0 +1,14 @@ +// Example 8.7.a //dispersion equalization penalty +clc; +clear; +close; +sg=0.65;// ns km^-1 +l=8;//km +st=sg*l;//ns +bt=20;//M bit s^-1 +dlw=2*(2*st*10^-9*bt*10^6*sqrt(2))^4;//dB +st1=sg*sqrt(l);//ns +dlw1=2*(2*st1*10^-9*bt*10^6*sqrt(2))^4;//dB +disp(dlw,"dispersion equalization penalty in dB without mode coupling at bit rate of 20 M bit s^-1") +disp(dlw1,"dispersion equalization penalty in dB with mode coupling at bit rate of 20 M bit s^-1") +//penalty with mode coupling is calculated wrong in the book diff --git a/2183/CH8/EX8.7.b/Ex_8_7_b.sce b/2183/CH8/EX8.7.b/Ex_8_7_b.sce new file mode 100755 index 000000000..95eb1d982 --- /dev/null +++ b/2183/CH8/EX8.7.b/Ex_8_7_b.sce @@ -0,0 +1,14 @@ +// Example 8.7.b;//dispersion equalization penalty +clc; +clear; +close; +sg=0.65;// ns km^-1 +l=8;//km +st=sg*l;//ns +bt=140;//M bit s^-1 +dlw=2*(2*st*10^-9*bt*10^6*sqrt(2))^4;//dB +st1=sg*sqrt(l);//ns +dlw1=2*(2*st1*10^-9*bt*10^6*sqrt(2))^4;//dB +disp(dlw,"dispersion equalization penalty in dB without mode coupling at bit rate of 20 M bit s^-1") +disp(dlw1,"dispersion equalization penalty in dB with mode coupling at bit rate of 20 M bit s^-1") +//answer is calculated wrong in the book diff --git a/2183/CH8/EX8.8/Ex_8_8.sce b/2183/CH8/EX8.8/Ex_8_8.sce new file mode 100755 index 000000000..9256c65de --- /dev/null +++ b/2183/CH8/EX8.8/Ex_8_8.sce @@ -0,0 +1,16 @@ + +// Example 8.8 //bit rate +clc; +clear; +close; +ts=8;//ns +l=8;//km +tn=4;//ns +tn1=tn*l;//ns +tc=1;// +tc1=tc*l;//ns +td=5;//ns +tsys=1.1*sqrt(ts^2+tn1^2+tc1^2+td^2);//ns +btmax=(0.7/(tsys*10^-9))*10^-6;//M bit/s +bt=btmax/2;// +disp(bt,"maximum bit rate for NRZ format in MHz") diff --git a/2183/CH8/EX8.9.a/Ex_8_9_a.sce b/2183/CH8/EX8.9.a/Ex_8_9_a.sce new file mode 100755 index 000000000..3e67f5df5 --- /dev/null +++ b/2183/CH8/EX8.9.a/Ex_8_9_a.sce @@ -0,0 +1,12 @@ +// Example 8.9.a //Link length +clc; +clear; +close; +pi=-3;//dBm +po=-56;//dBm +ac=2;//dBm +ma=8;//dBm +afc=0.4;//dBm +aj=0.1;//dBm +l=((pi-po-ac-ma)/(afc+aj));//km +disp(l,"link length when operating at 50 M bit/s in km is") diff --git a/2183/CH8/EX8.9.b/Ex_8_9_b.sce b/2183/CH8/EX8.9.b/Ex_8_9_b.sce new file mode 100755 index 000000000..663ba9c8b --- /dev/null +++ b/2183/CH8/EX8.9.b/Ex_8_9_b.sce @@ -0,0 +1,12 @@ +// Example 8.9.b;//Link length +clc; +clear; +close; +pi=-3;//dBm +po=-42;//dBm +ac=2;//dBm +ma=8;//dBm +afc=0.4;//dBm +aj=0.1;//dBm +l=((pi-po-ac-ma)/(afc+aj));//km +disp(l,"link length when operating at 500 M bit/s in km is") diff --git a/2183/CH8/EX8.9.c/Ex_8_9_c.sce b/2183/CH8/EX8.9.c/Ex_8_9_c.sce new file mode 100755 index 000000000..0644ec5e8 --- /dev/null +++ b/2183/CH8/EX8.9.c/Ex_8_9_c.sce @@ -0,0 +1,13 @@ +// Example 8.9.c;//Link length +clc; +clear; +close; +pi=-3;//dBm +po=-42;//dBm +ac=2;//dBm +ma=8;//dBm +afc=0.4;//dBm +aj=0.1;//dBm +dl=1.5;//dbm +l=((pi-po-ac-ma-dl)/(afc+aj));//km +disp(l,"link length when dispersion equalisation penalty is included in km is") |