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 /2414 | |
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 '2414')
186 files changed, 3043 insertions, 0 deletions
diff --git a/2414/CH1/EX1.1/Ex1_1.sce b/2414/CH1/EX1.1/Ex1_1.sce new file mode 100755 index 000000000..62a49318e --- /dev/null +++ b/2414/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,7 @@ +clc;
+//page 4
+//ex-1.1
+c=3*10^8; //in m/s
+f=1*10^6; //in Hz
+lembda=c/f;
+disp(lembda,'Wavelength (in m):');
diff --git a/2414/CH1/EX1.10/Ex1_10.sce b/2414/CH1/EX1.10/Ex1_10.sce new file mode 100755 index 000000000..33aab13c1 --- /dev/null +++ b/2414/CH1/EX1.10/Ex1_10.sce @@ -0,0 +1,38 @@ +clc;
+
+//page 14
+//ex-1.10
+function [V]=voltage(PdBm)
+ P=1*10^(-3)*(10^(PdBm/10));
+ V=(75*P)^0.5;
+endfunction
+S=10; //dBm
+G1=13; //dB
+L1=26; //dB
+G2=20; //dB
+L2=29; //dB
+disp('(a) The output levels are');
+PdBm=S;
+V=voltage(PdBm);
+disp(V,'in Volts:',PdBm,'1. Signal source in dBm:');
+PdBm=S+G1;
+V=voltage(PdBm);
+disp(V,'in Volts:',PdBm,'2. Line Amplifier in dBm:');
+PdBm=S+G1-L1;
+V=voltage(PdBm);
+disp(V,'in Volts:',PdBm,'3. Cable section A in dBm:');
+PdBm=S+G1-L1+G2;
+V=voltage(PdBm);
+disp(V,'in Volts:',PdBm,'4. Booster amplifier in dBm:');
+PdBm=S+G1-L1+G2-L2;
+V=voltage(PdBm);
+disp(V,'in Volts:',PdBm,'5. Cable section B in dBm:');
+disp('(b). The output power to get a voltage of 6V');
+V=6; //volts
+R=75; //ohm
+Po=(V^2)/R;
+disp('W',Po,);
+PodBm=10*log10(Po*1000/1);
+disp('dBm',PodBm,'power in dBm');
+GrdB=PodBm-PdBm;
+disp('dB',GrdB,'The required gain is');
diff --git a/2414/CH1/EX1.11/Ex1_11.sce b/2414/CH1/EX1.11/Ex1_11.sce new file mode 100755 index 000000000..1b84bcb36 --- /dev/null +++ b/2414/CH1/EX1.11/Ex1_11.sce @@ -0,0 +1,16 @@ +clc;
+//page 17
+//ex-1.11
+
+P=5; //In mW
+N=100*10^-6; //in mW
+S2N=P/N;
+disp(S2N,'(a) Absolute signal to noise ratio :');
+S2NdB=10*log10(S2N);
+disp('dB',S2NdB,'(b) dB signal to noise ratio is:')
+PdBm=10*log10(P/1);
+disp('dBm',PdBm,'(c) Signal Power is');
+NdBm=10*log10(N/1);
+disp('dBm',NdBm,'Noise power is');
+S2NdB=PdBm-NdBm;
+disp('dB',S2NdB,'Decinel S/N ratio is');
diff --git a/2414/CH1/EX1.2/Ex1_2.sce b/2414/CH1/EX1.2/Ex1_2.sce new file mode 100755 index 000000000..ca4b6ca79 --- /dev/null +++ b/2414/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,8 @@ +clc;
+
+//page 4
+//ex-1.2
+c=3*10^8; //in m/s
+f=100*10^6; //in Hz
+lembda=c/f;
+disp(lembda,'Wavelength (in m):');
diff --git a/2414/CH1/EX1.3/Ex1_3.sce b/2414/CH1/EX1.3/Ex1_3.sce new file mode 100755 index 000000000..cec546075 --- /dev/null +++ b/2414/CH1/EX1.3/Ex1_3.sce @@ -0,0 +1,7 @@ +clc;
+
+//page 9
+//ex-1.3
+G=175; //absolute gain
+Gdb=10*log10(175); //decibell gain
+disp('dB',Gdb,+'The decibell power gain is:');
diff --git a/2414/CH1/EX1.4/Ex1_4.sce b/2414/CH1/EX1.4/Ex1_4.sce new file mode 100755 index 000000000..56862b784 --- /dev/null +++ b/2414/CH1/EX1.4/Ex1_4.sce @@ -0,0 +1,6 @@ +clc;
+//page 9
+//ex-1.4
+Gdb=28; //decibell gain
+G=10^(Gdb/10); //Absolute power gain
+disp(G,'The absolute power gain is:');
diff --git a/2414/CH1/EX1.5/Ex1_5.sce b/2414/CH1/EX1.5/Ex1_5.sce new file mode 100755 index 000000000..ad91d8152 --- /dev/null +++ b/2414/CH1/EX1.5/Ex1_5.sce @@ -0,0 +1,8 @@ +clc;
+//page 10
+//ex-1.5
+
+Gdb=28; //decibell gain
+G=10^(Gdb/10); //Absolute power gain
+Av=G^0.5; //Voltage gain
+disp(Av,'The voltage gain is:');
diff --git a/2414/CH1/EX1.6/Ex1_6.sce b/2414/CH1/EX1.6/Ex1_6.sce new file mode 100755 index 000000000..64eb8f383 --- /dev/null +++ b/2414/CH1/EX1.6/Ex1_6.sce @@ -0,0 +1,11 @@ +clc;
+//page 10
+//ex-1.6
+
+G=0.28; //Absolute gain
+Gdb=10*log10(G);
+disp('dB',Gdb,+'Decibell gain is');
+P1=1;
+P2=.28; //28 % of input power
+Ldb=10*log10(P1/P2); //dB loss
+disp('dB',Ldb,+'Decibell loss is:');
diff --git a/2414/CH1/EX1.7/Ex1_7.sce b/2414/CH1/EX1.7/Ex1_7.sce new file mode 100755 index 000000000..5895ba218 --- /dev/null +++ b/2414/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,11 @@ +clc;
+//page 11
+//ex-1.7
+
+PmW=100; //power in mW
+PdBm=10*log10(PmW/1); //P in dBm level
+disp('dBm',PdBm,+'(a). Power in dBm level is:');
+PdBW=PdBm-30; //P in dBW level
+disp('dBW',PdBW,+'(b). Power in dBW level is:');
+PdBf=PdBm+120; //Pin dBf level
+disp('dBf',PdBf,+'(c) Power in dBf level is:');
diff --git a/2414/CH1/EX1.8/Ex1_8.sce b/2414/CH1/EX1.8/Ex1_8.sce new file mode 100755 index 000000000..f7a6563f5 --- /dev/null +++ b/2414/CH1/EX1.8/Ex1_8.sce @@ -0,0 +1,21 @@ +clc;
+
+//page 13
+//ex-1.8
+
+G1=5000;
+L=2000;
+G2=400;
+G=G1*(1/L)*G2; //Absolute gain
+disp(G,'(a) Net absolute gain is:');
+GdB=10*log10(G); //System decibell gain
+disp('dB',GdB,+'(b) System Decibel gain is:');
+G1dB=10*log10(G1);
+LdB=10*log10(L);
+G2dB=10*log10(G2);
+disp('(c) Individual stage gains are:');
+disp(G1dB,'G1dB=');
+disp(LdB,'LdB=');
+disp(G2dB,'G2dB=');
+GdB=G1dB-LdB+G2dB;
+disp('dB',GdB,+'The net dB gain is:');
diff --git a/2414/CH1/EX1.9/Ex1_9.sce b/2414/CH1/EX1.9/Ex1_9.sce new file mode 100755 index 000000000..994a4a634 --- /dev/null +++ b/2414/CH1/EX1.9/Ex1_9.sce @@ -0,0 +1,26 @@ +clc;
+//page 13
+//ex-1.9
+
+G1=5000;
+L=2000;
+G2=400;
+Ps=0.1; //in mW
+P1=G1*Ps; //in mW
+disp('mW',P1,'(a) Power level P1 is:');
+P2=P1/L; //in mW
+disp('mW',P2,'Line output power P2:');
+Po=G2*P2; //in mW
+disp('mW',Po,'System output power Po:');
+PsdBm=10*log10(Ps/1);
+G1dB=10*log10(G1);
+LdB=10*log10(L);
+G2dB=10*log10(G2);
+disp('(b) Output power power levels in dBm are');
+P1dBm=PsdBm+G1dB;
+disp('dBm',P1dBm,'P1(dBm)=');
+P2dBm=P1dBm-LdB;
+disp('dBm',P2dBm,'P2(dBm)=');
+PodBm=P2dBm+G2dB;
+disp('dBm',PodBm,'Po(dBm)=');
+
diff --git a/2414/CH10/EX10.1/Ex10_1.sce b/2414/CH10/EX10.1/Ex10_1.sce new file mode 100755 index 000000000..ffb51af26 --- /dev/null +++ b/2414/CH10/EX10.1/Ex10_1.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 350
+//prob no. 10.1
+B=4; //kHz
+C=2*B;
+mprintf('(a) C=%ikbits/s\n',C);
+C=2*B*log2(4);
+mprintf(' (b) for 4-level encoding ,C=%ikbits/s\n',C);
+C=2*B*log2(128);
+mprintf(' (c) for 128-level encoding ,C=%ikbits/s',C);
diff --git a/2414/CH10/EX10.2/Ex10_2.sce b/2414/CH10/EX10.2/Ex10_2.sce new file mode 100755 index 000000000..5ac43f846 --- /dev/null +++ b/2414/CH10/EX10.2/Ex10_2.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 351
+//prob no. 10.2
+B=4; //kHz
+SNdb=[20 30 40]; //S/N in db
+SN=10 .^(SNdb./10); //absolute S/N
+
+C=B .*log2(1+SN);
+mprintf(' S/N(db) C(kbits/s)\n');
+out=[SNdb' C'];
+disp(out);
diff --git a/2414/CH10/EX10.5/Ex10_5.sce b/2414/CH10/EX10.5/Ex10_5.sce new file mode 100755 index 000000000..5bd448419 --- /dev/null +++ b/2414/CH10/EX10.5/Ex10_5.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 352
+//prob no. 10.5
+B=20; //kHz
+C=160; //kb/s
+M=2^(C/B/2);
+mprintf('(a) Number of encoding levels ,M= %i\n',M);
+SN=2^(C/B)-1;
+SNdb=10*log10(SN) //S/N in db
+
+mprintf(' (b) S/N= %i S/N(db)=%.2f dB',SN,SNdb);
diff --git a/2414/CH10/EX10.6/Ex10_6.sce b/2414/CH10/EX10.6/Ex10_6.sce new file mode 100755 index 000000000..5189dc05b --- /dev/null +++ b/2414/CH10/EX10.6/Ex10_6.sce @@ -0,0 +1,8 @@ +clc;
+close();
+clear();
+//page no 356
+//prob no. 10.6
+R=1; //Mb/s
+Bt=R/2; //MHz
+mprintf('Bt= %i kHz',Bt*10^3);
diff --git a/2414/CH11/EX11.7/Ex11_7.sce b/2414/CH11/EX11.7/Ex11_7.sce new file mode 100755 index 000000000..92399cabb --- /dev/null +++ b/2414/CH11/EX11.7/Ex11_7.sce @@ -0,0 +1,8 @@ +clc;
+close();
+clear();
+//page no 379
+//prob no. 11.7
+
+B=800*64; //Mb/s
+mprintf('Bandwidth= %i Mb/s or %i MB/s',B,B/8);
diff --git a/2414/CH11/EX11.8/Ex11_8.sce b/2414/CH11/EX11.8/Ex11_8.sce new file mode 100755 index 000000000..83a5fa265 --- /dev/null +++ b/2414/CH11/EX11.8/Ex11_8.sce @@ -0,0 +1,8 @@ +clc;
+close();
+clear();
+//page no 379
+//prob no. 11.8
+
+B=400*64; //Mb/s
+mprintf('Memory bus bandwidth = %i Mb/s or %i MB/s',B,B/8);
diff --git a/2414/CH11/EX11.9/Ex11_9.sce b/2414/CH11/EX11.9/Ex11_9.sce new file mode 100755 index 000000000..bf5564dc0 --- /dev/null +++ b/2414/CH11/EX11.9/Ex11_9.sce @@ -0,0 +1,8 @@ +clc;
+close();
+clear();
+//page no 379
+//prob no. 11.9
+
+B=128*400; //Mb/s
+mprintf('Memory bus bandwidth = %i Mb/s or %i MB/s',B,B/8);
diff --git a/2414/CH12/EX12.1/Ex12_1.sce b/2414/CH12/EX12.1/Ex12_1.sce new file mode 100755 index 000000000..0880ddcc8 --- /dev/null +++ b/2414/CH12/EX12.1/Ex12_1.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 400
+//prob no. 12.1
+B=10^6; //Hz
+R=[1 100 10000] .*10^3 //ohm
+Vrms=(16*10^-21*B .*R)^0.5; //volts
+mprintf(' R (K-ohm) Vrms (micro-V)');
+out=[R'.*10^-3 Vrms'.*10^6];
+disp(out);
diff --git a/2414/CH12/EX12.10/Ex12_10.sce b/2414/CH12/EX12.10/Ex12_10.sce new file mode 100755 index 000000000..331007de8 --- /dev/null +++ b/2414/CH12/EX12.10/Ex12_10.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 412
+//prob no. 12.10
+Te=50; //K
+T0=290; //K
+F=1+Te/T0;
+mprintf('(a) Noise figure, F=%.3f\n',F);
+Fdb=10*log10(F);
+mprintf(' (b) Decibel value , Fdb=%.3f dB ',Fdb);
diff --git a/2414/CH12/EX12.11/Ex12_11.sce b/2414/CH12/EX12.11/Ex12_11.sce new file mode 100755 index 000000000..fbc00eb29 --- /dev/null +++ b/2414/CH12/EX12.11/Ex12_11.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 412
+//prob no. 12.11
+Fdb=5;
+T0=290; //K
+F=10^(Fdb/10);
+mprintf('Noise figure, F=%.3f\n',F);
+Te=(F-1)*T0;
+mprintf(' Noise Temperature , Te=%i K ',Te);
diff --git a/2414/CH12/EX12.12/Ex12_12.sce b/2414/CH12/EX12.12/Ex12_12.sce new file mode 100755 index 000000000..f22717e3c --- /dev/null +++ b/2414/CH12/EX12.12/Ex12_12.sce @@ -0,0 +1,31 @@ +clc;
+close();
+clear();
+//page no 413
+//prob no. 12.12
+T0=290; //K
+Fdb=9;
+F=10^(Fdb/10);
+mprintf('Absolute Noise figure, F=%.3f=8(Approx)\n',F);
+F=8; //Approximate
+Te=(F-1)*T0;
+mprintf(' Noise Temperature , Te=%i K \n',Te);
+Ti=T0;
+k=1.38*10^-23; //Boltzmann's Constant
+B=2*10^6; //Hz
+Ni=k*Ti*B; //W
+mprintf(' (a) Input source Noise ratio , Ni=%i fW\n ',Ni*10^15);
+Pi=8*10^-12; //W
+SNinput=Pi/Ni;
+mprintf('(b) Input source signal to noise ratio S:Ninput=%.0f\n',SNinput);
+mprintf(' Corresponding dB value S;Ninput(db)=%.0f dB\n',10*log10(SNinput));
+Gdb=50;
+G=10^(Gdb/10);
+Po=G*Pi; //W
+mprintf('(c) The output signal power, Po=%i nW\n',Po*10^9);
+Tsys=Ti+Te;
+No=G*k*Tsys*B; //W
+mprintf('(d) output noise power No=%.2f nw\n',No*10^9);
+SNoutput=Po/No;
+mprintf('(e) Output signal to noise ratio S:Noutput=%.0f\n',SNoutput);
+mprintf(' Corresponding dB value S;Noutput(db)=%.0f dB\n',10*log10(SNoutput));
diff --git a/2414/CH12/EX12.13/Ex12_13.sce b/2414/CH12/EX12.13/Ex12_13.sce new file mode 100755 index 000000000..6cd9ca6b0 --- /dev/null +++ b/2414/CH12/EX12.13/Ex12_13.sce @@ -0,0 +1,21 @@ +clc;
+close();
+clear();
+//page no 414
+//prob no. 12.13
+//Data from ex-12
+T0=290; //K
+Fdb=9;
+F=10^(Fdb/10);
+F=8; //Approximate
+Te=(F-1)*T0;
+Ti=T0;
+k=1.38*10^-23; //Boltzmann's Constant
+B=2*10^6; //Hz
+Ni=k*Ti*B; //W
+Pi=8*10^-12; //W
+SNinput=Pi/Ni;
+SNinputdb=10*log10(SNinput);
+//Ex13 calculation
+SNoutputdB=SNinputdb-Fdb;
+mprintf(' S:Noutput(db)=%.0f dB\n',SNoutputdB);
diff --git a/2414/CH12/EX12.14/Ex12_14.sce b/2414/CH12/EX12.14/Ex12_14.sce new file mode 100755 index 000000000..5c83bbf38 --- /dev/null +++ b/2414/CH12/EX12.14/Ex12_14.sce @@ -0,0 +1,16 @@ +clc;
+close();
+clear();
+//page no 418
+//prob no. 12.14
+//Absolute gains
+G1=20;
+G2=15;
+G3=12;
+//Temp in K
+Te1=100;
+Te2=200;
+Te3=300;
+Te=Te1+Te2/G1+Te3/G1/G2
+
+mprintf('Noise Temperature ,Te=%.0f K\n',Te);
diff --git a/2414/CH12/EX12.15/Ex12_15.sce b/2414/CH12/EX12.15/Ex12_15.sce new file mode 100755 index 000000000..bbc86d6dd --- /dev/null +++ b/2414/CH12/EX12.15/Ex12_15.sce @@ -0,0 +1,22 @@ +clc;
+close();
+clear();
+//page no 418
+//prob no. 12.15
+//Absolute gains
+G1=20;
+G2=15;
+G3=12;
+//Temp in K
+Te1=100;
+Te2=200;
+Te3=300;
+//Noise figures
+F1=1+Te1/290;
+F2=1+Te2/290;
+F3=1+Te3/290;
+F=F1+(F2-1)/G1+(F3-1)/G1/G2;
+mprintf('Noise figure ,F=%.4f\n',F);
+Te=(F-1)*290;
+
+mprintf('Noise Temperature ,Te=%.0f K\n',Te);
diff --git a/2414/CH12/EX12.16/Ex12_16.sce b/2414/CH12/EX12.16/Ex12_16.sce new file mode 100755 index 000000000..c5a22e961 --- /dev/null +++ b/2414/CH12/EX12.16/Ex12_16.sce @@ -0,0 +1,22 @@ +clc;
+close();
+clear();
+//page no 419
+//prob no. 12.16
+Ldb=6.02; //db
+L=10^(Ldb/10);
+mprintf('Absloute loss ,L=%.0f\n',L);
+Tp=290; //K
+//Noise temp (K)
+TeL=(L-1)*Tp;
+Tepre=50;
+Terec=200;
+Gpre=10^(20/10);
+Te=TeL+L*Tepre+L*Terec/Gpre;
+mprintf('Noise Temperature ,Te=%.0f K\n',Te);
+
+//Noise figures
+F=1+Te/290;
+mprintf('Noise figure ,F=%.4f\n',F);
+mprintf('Noise figure ,F(dB)=%.3f dB\n',10*log10(F));
+
diff --git a/2414/CH12/EX12.17/Ex12_17.sce b/2414/CH12/EX12.17/Ex12_17.sce new file mode 100755 index 000000000..618563440 --- /dev/null +++ b/2414/CH12/EX12.17/Ex12_17.sce @@ -0,0 +1,22 @@ +clc;
+close();
+clear();
+//page no 419
+//prob no. 12.17
+Ldb=6.02; //db
+L=10^(Ldb/10);
+mprintf('Absloute loss ,L=%.0f\n',L);
+Tp=290; //K
+//Noise temp (K)
+TeL=(L-1)*Tp;
+Tepre=50;
+Terec=200;
+Gpre=10^(20/10);
+Te=Tepre+TeL/Gpre+L*Terec/Gpre;
+mprintf(' (a) Noise Temperature ,Te=%.1f K\n',Te);
+
+//Noise figures
+F=1+Te/290;
+mprintf(' (b) Noise figure ,F=%.2f\n',F);
+mprintf('Noise figure ,F(dB)=%.3f dB\n',10*log10(F));
+
diff --git a/2414/CH12/EX12.2/Ex12_2.sce b/2414/CH12/EX12.2/Ex12_2.sce new file mode 100755 index 000000000..30cb6d576 --- /dev/null +++ b/2414/CH12/EX12.2/Ex12_2.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 401
+//prob no. 12.2
+B=10^6; //Hz
+R=10^7 ; //ohm
+Vrms=(16*10^-21*B*R)^0.5; //volts
+G=5000; //gain
+vorms=Vrms*G;
+mprintf('vorms=%.1f V',vorms);
diff --git a/2414/CH12/EX12.3/Ex12_3.sce b/2414/CH12/EX12.3/Ex12_3.sce new file mode 100755 index 000000000..d0d11c48b --- /dev/null +++ b/2414/CH12/EX12.3/Ex12_3.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 403
+//prob no. 12.3
+B=2*10^6; //Hz
+Req=6*10^6 ; //ohm
+Vrms=(16*10^-21*B*Req)^0.5; //volts
+mprintf('vrms=%.1f micro-V',Vrms*10^6);
diff --git a/2414/CH12/EX12.4/Ex12_4.sce b/2414/CH12/EX12.4/Ex12_4.sce new file mode 100755 index 000000000..c00cc64c7 --- /dev/null +++ b/2414/CH12/EX12.4/Ex12_4.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 405
+//prob no. 12.4
+B=2*10^6; //Hz
+R=50 ; //ohm
+kT0=4*10^-21;
+
+Nav=kT0*B;
+mprintf('Noise power=%.0f fW',Nav*10^15);
diff --git a/2414/CH12/EX12.5/Ex12_5.sce b/2414/CH12/EX12.5/Ex12_5.sce new file mode 100755 index 000000000..996e2f97c --- /dev/null +++ b/2414/CH12/EX12.5/Ex12_5.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 406
+//prob no. 12.5
+B=2*10^6; //Hz
+R=50 ; //ohm
+G=10^6; //gain
+kT0=4*10^-21;
+
+Nav=kT0*B;
+No=G*Nav;
+mprintf('output Noise power=%.0f nW',No*10^9);
diff --git a/2414/CH12/EX12.6/Ex12_6.sce b/2414/CH12/EX12.6/Ex12_6.sce new file mode 100755 index 000000000..4aef70e5f --- /dev/null +++ b/2414/CH12/EX12.6/Ex12_6.sce @@ -0,0 +1,16 @@ +clc;
+close();
+clear();
+//page no 406
+//prob no. 12.6
+//data from ex 12.5
+B=2*10^6; //Hz
+R=50 ; //ohm
+G=10^6; //gain
+kT0=4*10^-21;
+
+Nav=kT0*B;
+No=G*Nav;
+//ex12.6
+Vrms=(No*50)^0.5;
+mprintf('Vrms=%.1f micro-V',Vrms*10^6);
diff --git a/2414/CH12/EX12.7/Ex12_7.sce b/2414/CH12/EX12.7/Ex12_7.sce new file mode 100755 index 000000000..49a9d7433 --- /dev/null +++ b/2414/CH12/EX12.7/Ex12_7.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 408
+//prob no. 12.7
+R=50 ; //ohm
+G=10^8; //gain
+kT0=4*10^-21;
+So=G*kT0;
+mprintf('Output spectral density So(f)=%.0f fW/Hz',So*10^15);
diff --git a/2414/CH12/EX12.8/Ex12_8.sce b/2414/CH12/EX12.8/Ex12_8.sce new file mode 100755 index 000000000..fdebab5b3 --- /dev/null +++ b/2414/CH12/EX12.8/Ex12_8.sce @@ -0,0 +1,20 @@ +clc;
+close();
+clear();
+//page no 409
+//prob no. 12.8
+ns=6*10^-18; //W/Hz
+k=1.38*10^-23;
+Ts=ns/k;
+mprintf('(a) Equilant source temperature is Ts=%.0f K\n',Ts);
+Gdb=43; //gain in dB
+G=10^(Gdb/10);
+mprintf(' (b) Absolute gain G=%.3f\n',G);
+G=20*10^3; //Approximate
+Si=ns;
+So=G*Si;
+mprintf('Output spectral density So(f)=%.0f fW/Hz\n',So*10^15);
+B=12*10^6; //Hz
+no=So;
+No=no*B;
+mprintf(' (c)Total Output Noise power ,No=%.3f micro-W',No*10^6);
diff --git a/2414/CH12/EX12.9/Ex12_9.sce b/2414/CH12/EX12.9/Ex12_9.sce new file mode 100755 index 000000000..db9f5752d --- /dev/null +++ b/2414/CH12/EX12.9/Ex12_9.sce @@ -0,0 +1,15 @@ +clc;
+close();
+clear();
+//page no 409
+//prob no. 12.9
+Gdb1=10;
+Gdb2=15;
+Gdb3=25;
+Gdb=Gdb1+Gdb2+Gdb3; // net gain in dB
+G=10^(Gdb/10);
+mprintf('Absolute gain G=%i\n',G);
+B=10^4; //Hz
+ni=10^-12; //pW/Hz
+No=ni*G*B;
+mprintf(' Output Noise power ,No=%i mW',No*10^3);
diff --git a/2414/CH13/EX13.1/Ex13_1.sce b/2414/CH13/EX13.1/Ex13_1.sce new file mode 100755 index 000000000..0d223b246 --- /dev/null +++ b/2414/CH13/EX13.1/Ex13_1.sce @@ -0,0 +1,31 @@ +clc;
+close();
+clear();
+//page no 442
+//prob no. 13.1
+Gb=1;
+mprintf('(a) SSB: Gb=%i \n',Gb);
+mprintf(' GbdB=%i dB\n',10*log10(Gb));
+mprintf('(b) DSB: Gb=%i \n',Gb);
+mprintf(' GbdB=%i dB\n',10*log10(Gb));
+m=0.5;
+Gb=m^2/(2+m^2);
+mprintf('(c) AM(m=.5): Gb=%.3f \n',Gb);
+mprintf(' GbdB=%.3f dB\n',10*log10(Gb));
+m=1;
+Gb=m^2/(2+m^2);
+mprintf('(d) AM(m=1): Gb=%.3f \n',Gb);
+mprintf(' GbdB=%.3f dB\n',10*log10(Gb));
+delta_phi=5;
+Gb=delta_phi^2/2;
+mprintf('(e) FM(delta phi=5)): Gb=%.1f \n',Gb);
+mprintf(' GbdB=%.3f dB\n',10*log10(Gb));
+D=5;
+Gb=3*D^2/2;
+mprintf('(f) FM(D=5): Gb=%.1f \n',Gb);
+mprintf(' GbdB=%.3f dB\n',10*log10(Gb));
+Wf1=7.07;
+Gb=3/2*D^2*%pi/6*Wf1;
+mprintf('(g) FM(D=5, W/f1=7.07): Gb=%.1f \n',Gb);
+mprintf(' GbdB=%.2f dB\n',10*log10(Gb));
+
diff --git a/2414/CH13/EX13.2/Ex13_2.sce b/2414/CH13/EX13.2/Ex13_2.sce new file mode 100755 index 000000000..c353d8401 --- /dev/null +++ b/2414/CH13/EX13.2/Ex13_2.sce @@ -0,0 +1,32 @@ +clc;
+close();
+clear();
+//page no 443
+//prob no. 13.2
+GR=1;
+mprintf('(a) SSB: GR=%i \n',GR);
+mprintf(' GRdB=%i dB\n',10*log10(GR));
+GR=2;
+mprintf('(b) DSB: GR=%i \n',GR);
+mprintf(' GRdB=%.2f dB\n',10*log10(GR));
+m=0.5;
+GR=2*m^2/(2+m^2);
+mprintf('(c) AM(m=.5): GR=%.4f \n',GR);
+mprintf(' GRdB=%.3f dB\n',10*log10(GR));
+m=1;
+GR=2*m^2/(2+m^2);
+mprintf('(d) AM(m=1): GR=%.3f \n',GR);
+mprintf(' GRdB=%.2f dB\n',10*log10(GR));
+delta_phi=5;
+GR=(1+delta_phi)*delta_phi^2;
+mprintf('(e) FM(delta phi=5)): GR=%.1f \n',GR);
+mprintf(' GRdB=%.3f dB\n',10*log10(GR));
+D=5;
+GR=3*D^2*(1+D);
+mprintf('(f) FM(D=5): GR=%.1f \n',GR);
+mprintf(' GRdB=%.3f dB\n',10*log10(GR));
+Wf1=7.07;
+GR=3*(1+D)*D^2*%pi/6*Wf1;
+mprintf('(g) FM(D=5, W/f1=7.07): GR=%.1f \n',GR);
+mprintf(' GRdB=%.2f dB\n',10*log10(GR));
+
diff --git a/2414/CH13/EX13.3/Ex13_3.sce b/2414/CH13/EX13.3/Ex13_3.sce new file mode 100755 index 000000000..337ad9ad9 --- /dev/null +++ b/2414/CH13/EX13.3/Ex13_3.sce @@ -0,0 +1,31 @@ +clc;
+close();
+clear();
+//page no 447
+//prob no. 13.3
+k=1.38*10^-23; //Boltzmann's const
+//Temperatures in K
+Ti=150;
+Te=325;
+Tsys=Ti+Te;
+mprintf(' Tsys=%i K \n',Tsys);
+D=5;
+W=15; //kHz
+B=2*(1+D)*W;
+mprintf(' B=%i kHz\n',B);
+Nsys=k*Tsys*B*10^3; //W
+mprintf(' Nsys=%.3f fW\n',Nsys*10^15);
+PR=50*10^-12; //W
+SNsys=PR/Nsys;
+mprintf(' (S/N)sys=%i \n',SNsys);
+GR=3*(1+D)*D^2
+mprintf(' GR=%.0f \n',GR);
+SNoutput=GR*SNsys;
+mprintf(' (S/N)output=%.0f \n',SNoutput);
+mprintf(' (S/N)out,dB=%.2f dB\n',10*log10(SNoutput));
+mprintf(' (S/N)sys,dB=%.2f dB\n',10*log10(SNsys));
+GRdb=10*log10(GR);
+mprintf(' GR,dB=%.2f dB \n',GRdb);
+mprintf(' (S/N)output,dB=%.2f dB\n',10*log10(SNoutput));
+
+
diff --git a/2414/CH13/EX13.4/Ex13_4.sce b/2414/CH13/EX13.4/Ex13_4.sce new file mode 100755 index 000000000..584b404de --- /dev/null +++ b/2414/CH13/EX13.4/Ex13_4.sce @@ -0,0 +1,8 @@ +clc;
+close();
+clear();
+//page no 450
+//prob no. 13.4
+N=16; //bit
+SNoutdB=1.76+6.02*N;
+mprintf(' (S/N)output,dB=%.2f dB \n',SNoutdB);
diff --git a/2414/CH13/EX13.5/Ex13_5.sce b/2414/CH13/EX13.5/Ex13_5.sce new file mode 100755 index 000000000..d5f958e0b --- /dev/null +++ b/2414/CH13/EX13.5/Ex13_5.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 450
+//prob no. 13.5
+SNoutdB=53;
+N=(SNoutdB-1.76)/6.02;
+mprintf(' N=%.2f bits \n',N);
+N=9; //roundup
+mprintf(' N=%i bits \n',N);
+
diff --git a/2414/CH13/EX13.6/Ex13_6.sce b/2414/CH13/EX13.6/Ex13_6.sce new file mode 100755 index 000000000..9bb572c1d --- /dev/null +++ b/2414/CH13/EX13.6/Ex13_6.sce @@ -0,0 +1,39 @@ +clc;
+close();
+clear();
+//page no 453
+//prob no. 13.6
+N=6; //bits per word
+M=2^N;
+mprintf(' M=%i \n',M);
+Pr=200*10^-15; //W
+R=2*10^6; //bits/s
+Eb=Pr/R;
+mprintf(' Bit energy ,Eb=%.0f*10^-21 \n',Eb*10^21);
+k=1.38*10^-23; //Boltzmann cons
+Ti=300; //K
+Te=425; //K
+Tsys=Ti+Te;
+nsys=k*Tsys;
+mprintf(' Noise power spectral density ,nsys=%.0f*10^-20 W/Hz \n',nsys*10^20);
+rho=Eb/nsys;
+mprintf(' Bit energy , rho=%.0f \n',rho);
+rhodB=10*log10(rho);
+mprintf(' Bit energy in db, rho,dB=%.0f dB \n',rhodB);
+//part a
+Pe=4*10^-6;
+SNout=1.5*M^2/(1+4*M^2*Pe);
+mprintf(' \n(a) (S/N)output=%.0f (or %0.2f dB) \n',SNout,10*log10(SNout));
+//part b
+Pe=2.3*10^-5;
+SNout=1.5*M^2/(1+4*M^2*Pe);
+mprintf(' \n(b) (S/N)output=%.0f (or %0.2f dB) \n',SNout,10*log10(SNout));
+//part c
+Pe=8*10^-4;
+SNout=1.5*M^2/(1+4*M^2*Pe);
+mprintf(' \n(c) (S/N)output=%.1f (or %0.2f dB) \n',SNout,10*log10(SNout));
+//part d
+Pe=3.5*10^-3;
+SNout=1.5*M^2/(1+4*M^2*Pe);
+mprintf(' \n(d) (S/N)output=%.1f (or %0.2f dB) \n',SNout,10*log10(SNout));
+
diff --git a/2414/CH13/EX13.7/Ex13_7.sce b/2414/CH13/EX13.7/Ex13_7.sce new file mode 100755 index 000000000..4c6882d17 --- /dev/null +++ b/2414/CH13/EX13.7/Ex13_7.sce @@ -0,0 +1,25 @@ +clc;
+close();
+clear();
+//page no 455
+//prob no. 13.7
+//data from ex 13.6
+M=2^6;
+Pr=200*10^-15; //W
+R=8*10^6; //bits/s (changed)
+Eb=Pr/R;
+
+k=1.38*10^-23; //Boltzmann cons
+Ti=300; //K
+Te=425; //K
+Tsys=Ti+Te;
+nsys=k*Tsys;
+//mprintf(' Noise power spectral density ,nsys=%.0f*10^-20 W/Hz \n',nsys*10^20);
+rho=Eb/nsys;
+mprintf(' Bit energy , rho=%.1f \n',rho);
+rhodB=10*log10(rho);
+mprintf(' Bit energy in db, rho,dB=%.2f dB \n',rhodB);
+
+Pe=1.3*10^-2;
+SNout=1.5*M^2/(1+4*M^2*Pe);
+mprintf(' \n (S/N)output=%.2f (or %0.2f dB) \n',SNout,10*log10(SNout));
diff --git a/2414/CH13/EX13.8/Ex13_8.sce b/2414/CH13/EX13.8/Ex13_8.sce new file mode 100755 index 000000000..6c7b6cac5 --- /dev/null +++ b/2414/CH13/EX13.8/Ex13_8.sce @@ -0,0 +1,41 @@ +clc;
+close();
+clear();
+//page no 455
+//prob no. 13.8
+Pe=10^-5;
+R=1*10^6; //bits/s
+k=1.38*10^-23; //Boltzmann cons
+Ti=475; //K
+Te=250; //K
+Tsys=Ti+Te;
+nsys=k*Tsys; //W/Hz
+function Eb=E(rhodb) //function for Eb
+ rho=10^(rhodb/10);
+ Eb=nsys*rho;
+endfunction
+function Pr=P(E) //function for Pr
+ Pr=R*Eb;
+endfunction
+function display(rhodb,pt)
+ Eb=E(rhodb);
+ Pr=P(E);
+mprintf('\n(%c)Bit energy , Eb=%.2f*10^-21 J \n',pt,Eb*10^21);
+mprintf(' Required reciver carrier power , Pr=%.2f fW \n',Pr*10^15);
+
+endfunction
+//Part a
+rhodb=9.6;
+display(rhodb,'a');
+
+//Part b
+rhodb=10.3;
+display(rhodb,'b');
+
+//Part c
+rhodb=12.6;
+display(rhodb,'c');
+
+//Part d
+rhodb=13.4;
+display(rhodb,'d');
diff --git a/2414/CH13/EX13.9/Ex13_9.sce b/2414/CH13/EX13.9/Ex13_9.sce new file mode 100755 index 000000000..5e8eb4a5c --- /dev/null +++ b/2414/CH13/EX13.9/Ex13_9.sce @@ -0,0 +1,27 @@ +clc;
+close();
+clear();
+//page no 456
+//prob no. 13.9
+
+//Data form ex13.8
+Pe=10^-5;
+R=2*10^6; //bits/s (changed)
+k=1.38*10^-23; //Boltzmann cons
+Ti=475; //K
+Te=250; //K
+Tsys=Ti+Te;
+nsys=k*Tsys; //W/Hz
+function Eb=E(rhodb) //function for Eb
+ rho=10^(rhodb/10);
+ Eb=nsys*rho;
+endfunction
+function Pr=P(E) //function for Pr
+ Pr=R*Eb;
+endfunction
+
+rhodb=9.6;
+ Eb=E(rhodb);
+ Pr=P(E);
+mprintf('\nBit energy , Eb=%.2f*10^-21 J \n',Eb*10^21);
+mprintf(' Required reciver carrier power , Pr=%.2f fW \n',Pr*10^15);
diff --git a/2414/CH14/EX14.1/Ex14_1.sce b/2414/CH14/EX14.1/Ex14_1.sce new file mode 100755 index 000000000..dd77d59a4 --- /dev/null +++ b/2414/CH14/EX14.1/Ex14_1.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 471
+//prob no. 14.1
+f=1*10^6; //Hz
+lembda=3*10^8/f; //m
+mprintf('The free space wavelength is = %i m \n',lembda);
+l=.1*lembda;
+mprintf(' Length ,l= %i m',l);
diff --git a/2414/CH14/EX14.10/Ex14_10.sce b/2414/CH14/EX14.10/Ex14_10.sce new file mode 100755 index 000000000..94343a9cf --- /dev/null +++ b/2414/CH14/EX14.10/Ex14_10.sce @@ -0,0 +1,14 @@ +clc;
+close();
+clear();
+//page no 484
+//prob no. 14.10
+ZL=100; //ohm
+RL=ZL;
+R0=300; //ohm
+TauL=(RL-R0)/(RL+R0);
+
+mprintf('(a)The reflection coefficient at load is= %0.2f,',TauL);
+
+S=R0/RL;
+mprintf('\n (b) The standing wave ratio is, S = %.0f \n',S);
diff --git a/2414/CH14/EX14.11/Ex14_11.sce b/2414/CH14/EX14.11/Ex14_11.sce new file mode 100755 index 000000000..a1f9fc0bb --- /dev/null +++ b/2414/CH14/EX14.11/Ex14_11.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 485
+//prob no. 14.11
+ZL=100; //ohm
+RL=ZL;
+R0=300; //ohm
+TauL=(RL-R0)/(RL+R0);
+mismatch_loss_dB=-10*log10(1-TauL^2);
+mprintf(' The mismatch loss (dB), S = %.2f dB\n',mismatch_loss_dB);
diff --git a/2414/CH14/EX14.12/Ex14_12.sce b/2414/CH14/EX14.12/Ex14_12.sce new file mode 100755 index 000000000..add65bb29 --- /dev/null +++ b/2414/CH14/EX14.12/Ex14_12.sce @@ -0,0 +1,15 @@ +clc;
+close();
+clear();
+//page no 487
+//prob no. 14.12
+Ex=3 //V/m
+n0=377;
+Hy=Ex/n0;
+mprintf('(a) The vaulue of Hy is, Hy = %.3f * 10^-3 A/m\n',Hy*10^3);
+
+Px=Ex^2/n0;
+mprintf(' (b) The power density Px is, Px = %.3f * 10^-3 W/m^2\n',Px*10^3);
+A=10*30;
+P=Px*A;
+mprintf(' (c) The net power transmitted is, P = %.3f W \n',P);
diff --git a/2414/CH14/EX14.2/Ex14_2.sce b/2414/CH14/EX14.2/Ex14_2.sce new file mode 100755 index 000000000..823f5262e --- /dev/null +++ b/2414/CH14/EX14.2/Ex14_2.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 471
+//prob no. 14.2
+f=1*10^8; //Hz
+lembda=3*10^8/f; //m
+mprintf('The free space wavelength is = %i m \n',lembda);
+l=.1*lembda;
+mprintf(' Length ,l= %.1f m',l);
diff --git a/2414/CH14/EX14.3/Ex14_3.sce b/2414/CH14/EX14.3/Ex14_3.sce new file mode 100755 index 000000000..b3ffbe52e --- /dev/null +++ b/2414/CH14/EX14.3/Ex14_3.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 472
+//prob no. 14.3
+f=1*10^9; //Hz
+lembda=3*10^8/f; //m
+mprintf('The free space wavelength is = %i cm \n',lembda*100);
+l=.1*lembda;
+mprintf(' Length ,l= %i cm',l*100);
diff --git a/2414/CH14/EX14.4/Ex14_4.sce b/2414/CH14/EX14.4/Ex14_4.sce new file mode 100755 index 000000000..e3b778ccf --- /dev/null +++ b/2414/CH14/EX14.4/Ex14_4.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 474
+//prob no. 14.4
+L=320*10^-9; //H/m
+C=90*10^-12; //F/m
+R0=sqrt(L/C);
+mprintf('The characteristc impedance, R0 = %.2f ohm \n',R0);
diff --git a/2414/CH14/EX14.5/Ex14_5.sce b/2414/CH14/EX14.5/Ex14_5.sce new file mode 100755 index 000000000..3e766de16 --- /dev/null +++ b/2414/CH14/EX14.5/Ex14_5.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 476
+//prob no. 14.5
+L=320*10^-9; //H/m
+C=90*10^-12; //F/m
+v=1/sqrt(L*C);
+mprintf('The velocity of propagation is, v = %.3f 10^8 m/s \n',v*10^-8);
diff --git a/2414/CH14/EX14.6.1/Ex14_6_1.sce b/2414/CH14/EX14.6.1/Ex14_6_1.sce new file mode 100755 index 000000000..714fd2fd0 --- /dev/null +++ b/2414/CH14/EX14.6.1/Ex14_6_1.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 479
+//prob no. 14.6; //misprinted example no
+d=.3; //cm
+D=1.02; //cm
+Er=2.25;
+x=log(D/d); //variable
+L=2*10^-7*x;
+mprintf('(a)The inductance per unit length is, L = %.1f nH/m \n',L*10^9);
+C=55.56*10^-12*Er/x;
+mprintf(' (b)The capacitance per unit length is, C = %.2f nH/m \n',C*10^12);
+R0=60/sqrt(Er)*x;
+mprintf(' (c)The characteristic impedance is, R0 = %.3f ohm \n',R0);
+c=3*10^8;
+v=c/sqrt(Er);
+mprintf(' (d)The velocity of propagation is, v = %i*10^8 m/s \n',v*10^-8);
diff --git a/2414/CH14/EX14.6/Ex14_6.sce b/2414/CH14/EX14.6/Ex14_6.sce new file mode 100755 index 000000000..3a45ad900 --- /dev/null +++ b/2414/CH14/EX14.6/Ex14_6.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 476
+//prob no. 14.6
+L=320*10^-9; //H/m
+C=90*10^-12; //F/m
+v=1/sqrt(L*C); //from Ex14.5
+Er=(3*10^8/v)^2;
+mprintf('The dielectic constant is, Er = %.2f \n',Er);
diff --git a/2414/CH14/EX14.7/Ex14_7.sce b/2414/CH14/EX14.7/Ex14_7.sce new file mode 100755 index 000000000..7f81dcd6d --- /dev/null +++ b/2414/CH14/EX14.7/Ex14_7.sce @@ -0,0 +1,16 @@ +clc;
+close();
+clear();
+//page no 480
+//prob no. 14.7;
+Rin=50 //ohm
+Rout=50; //ohm
+Vrms=400; //V
+Zin=Rin;
+mprintf('(a)The input impedance is, Zin = %i ohm\n',Zin);
+Irms=Vrms/(Rin+Rout); //A
+mprintf(' (b)The rms current , Irms = %i A \n',Irms);
+Pin=Irms^2*Rin;
+mprintf(' (c)The input power is, Pin = %i W \n',Pin);
+Pl=Pin;
+mprintf(' (d)The load power is, Pl = %i W \n',Pl);
diff --git a/2414/CH14/EX14.8/Ex14_8.sce b/2414/CH14/EX14.8/Ex14_8.sce new file mode 100755 index 000000000..d3fc831aa --- /dev/null +++ b/2414/CH14/EX14.8/Ex14_8.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 481
+//prob no. 14.8
+Rin=50 //ohm
+Rout=50; //ohm
+Vrms=400; //V
+
+l=50; //m
+Ldb=.01*l; //dB
+L=10^(Ldb/10);
+mprintf('The abslute loss is, L = %f \n',L);
+Irms=Vrms/(Rin+Rout); //A
+Pin=Irms^2*Rin;
+
+PL=Pin/L;
+mprintf(' The actual Power reaching the load is, PL = %.1f W \n',PL);
diff --git a/2414/CH14/EX14.9/Ex14_9.sce b/2414/CH14/EX14.9/Ex14_9.sce new file mode 100755 index 000000000..30edb090f --- /dev/null +++ b/2414/CH14/EX14.9/Ex14_9.sce @@ -0,0 +1,16 @@ +clc;
+close();
+clear();
+//page no 484
+//prob no. 14.9
+ZL=complex(50,100);
+R0=50;
+TauL=(ZL-R0)/(ZL+R0);
+
+mprintf('(a)The reflection coefficient at load is,');
+disp(TauL);
+[R,theta]=polar(TauL);
+mprintf('OR , %.4f angle %i',R,theta*(180/%pi));
+
+S=(1+R)/(1-R);
+mprintf('\n (b) The standing wave ratio is, S = %.3f \n',S);
diff --git a/2414/CH15/EX15.11/Ex15_11.sce b/2414/CH15/EX15.11/Ex15_11.sce new file mode 100755 index 000000000..660853a8d --- /dev/null +++ b/2414/CH15/EX15.11/Ex15_11.sce @@ -0,0 +1,22 @@ +clc;
+close();
+clear();
+//page no 511
+//prob no. 15.1
+//misprinted example number
+c=3*10^8; //speed of light
+f=10*10^9; //frequency
+lembda=c/f; //wavelength
+mprintf('The wavelength of 2GHz is, = %.2f m\n',lembda);
+D=12; //m
+Ap=%pi*D^2/4;
+mprintf(' (a)The physical area is ,Ap= %.2f m^2 \n',Ap);
+n1=.7; //efficiency
+Ae=n1*Ap;
+mprintf(' The effective capture area is ,Ae= %.2f m^2',Ae);
+G=4*%pi*Ae/lembda^2;
+mprintf('\n (b) The gain is ,G= %i',G);
+GdB=10*log10(G);
+mprintf('\n The gain(dB) is ,GdB= %.1f dB',GdB);
+theta_3dB=70*lembda/D;
+mprintf('\n (c) The 3 dB beamwidth = %.3f degrees',theta_3dB);
diff --git a/2414/CH15/EX15.12/Ex15_12.sce b/2414/CH15/EX15.12/Ex15_12.sce new file mode 100755 index 000000000..6216d9085 --- /dev/null +++ b/2414/CH15/EX15.12/Ex15_12.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 507
+//prob no. 15.12
+//misprinted example number
+c=3*10^8; //speed of light
+f=100*10^6; //frequency
+lembda=c/f; //wavelength
+mprintf('The wavelength of 2GHz is, = %i m\n',lembda);
+Ac=0.13*lembda^2;
+mprintf('The capture area is ,Ac= %.2f m^2',Ac);
diff --git a/2414/CH15/EX15.2/Ex15_2.sce b/2414/CH15/EX15.2/Ex15_2.sce new file mode 100755 index 000000000..ba56ad98a --- /dev/null +++ b/2414/CH15/EX15.2/Ex15_2.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 500
+//prob no. 15.2
+c=3*10^8; //speed of light
+f=2*10^9; //frequency
+lembda=c/f; //wavelength
+mprintf('The wavelength of 2GHz is, = %.2f m\n',lembda);
+D=15; //m
+Rff=2*D^2/lembda;
+mprintf(' The distance to the far field is, Rff = %i m\n',Rff);
diff --git a/2414/CH15/EX15.3/Ex15_3.sce b/2414/CH15/EX15.3/Ex15_3.sce new file mode 100755 index 000000000..2a8fbbef1 --- /dev/null +++ b/2414/CH15/EX15.3/Ex15_3.sce @@ -0,0 +1,8 @@ +clc;
+close();
+clear();
+//page no 502
+//prob no. 15.3
+Gmax=10^5;
+Gmax_dB=10*log10(Gmax);
+mprintf('Gmax,dB= %i dB',Gmax_dB);
diff --git a/2414/CH15/EX15.4/Ex15_4.sce b/2414/CH15/EX15.4/Ex15_4.sce new file mode 100755 index 000000000..6c7acac19 --- /dev/null +++ b/2414/CH15/EX15.4/Ex15_4.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 504
+//prob no. 15.4
+d=10^5; //m
+Pt=100; //W
+Pd=Pt/(4*%pi*d^2);
+mprintf('The power density is ,Pd= %.1f pW/m^2',Pd*10^12);
diff --git a/2414/CH15/EX15.5/Ex15_5.sce b/2414/CH15/EX15.5/Ex15_5.sce new file mode 100755 index 000000000..e0a4c798d --- /dev/null +++ b/2414/CH15/EX15.5/Ex15_5.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 504
+//prob no. 15.5
+d=10^5; //m
+Pt=100; //W
+Gt=50;
+Pd=Gt*Pt/(4*%pi*d^2);
+mprintf('The power density is ,Pd= %.2f nW/m^2',Pd*10^9);
diff --git a/2414/CH15/EX15.6/Ex15_6.sce b/2414/CH15/EX15.6/Ex15_6.sce new file mode 100755 index 000000000..346b594fc --- /dev/null +++ b/2414/CH15/EX15.6/Ex15_6.sce @@ -0,0 +1,16 @@ +clc;
+close();
+clear();
+//page no 504
+//prob no. 15.6
+c=3*10^8; //speed of light
+f=15*10^9; //frequency
+lembda=c/f; //wavelength
+mprintf('The wavelength of 15 GHz is, = %.2f m\n',lembda);
+
+d=41*10^6; //m
+Pt=50; //W
+Gt=10^4;
+Gr=10^5
+Pr=lembda^2*Gr*Gt*Pt/((4*%pi)^2*d^2);
+mprintf('The power density is ,Pr= %.1f pW',Pr*10^12);
diff --git a/2414/CH15/EX15.7/Ex15_7.sce b/2414/CH15/EX15.7/Ex15_7.sce new file mode 100755 index 000000000..11c0129bf --- /dev/null +++ b/2414/CH15/EX15.7/Ex15_7.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 506
+//prob no. 15.7
+
+Pt=2000; //W
+Irms=5;
+Rrad=Pt/Irms^2;
+mprintf('The radiation resistance is ,Rrad= %i ohm',Rrad);
diff --git a/2414/CH16/EX16.1/Ex16_1.sce b/2414/CH16/EX16.1/Ex16_1.sce new file mode 100755 index 000000000..3129598a9 --- /dev/null +++ b/2414/CH16/EX16.1/Ex16_1.sce @@ -0,0 +1,20 @@ +clc;
+close();
+clear();
+//page no 518
+//prob no. 16.1
+c=3*10^8; //speed of light
+Pt=5 //W
+GtdB=13; //dB
+GrdB=17; //dB
+d=80*10^3; //metre
+f=3*10^9; //frequency
+lembda=c/f; //wavelength
+mprintf('The wavelength is, = %.1f m\n',lembda);
+
+Gt=10^(GtdB/10);
+Gr=10^(GrdB/10);
+mprintf(' Gt=%.2f \n',Gt);
+mprintf(' Gr=%.2f \n',Gr);
+Pr=lembda^2*Gt*Gr*Pt/((4*%pi)^2*d^2);
+mprintf(' Pr=%.1f pW \n',Pr*10^12);
diff --git a/2414/CH16/EX16.10/Ex16_10.sce b/2414/CH16/EX16.10/Ex16_10.sce new file mode 100755 index 000000000..25b05146d --- /dev/null +++ b/2414/CH16/EX16.10/Ex16_10.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 530
+//prob no. 16.10
+c=3*10^8; //speed of light in m/s
+fp=2*10^3; //Hz
+T=1/fp //s
+dmax=c*T/2 //in m
+mprintf('(a) d max=%.0f Km \n',dmax*10^-3);
+tau=6*10^-6; //s
+dmin=c*tau/2 //m
+mprintf('(b) d min=%.0f m ',dmin);
diff --git a/2414/CH16/EX16.11/Ex16_11.sce b/2414/CH16/EX16.11/Ex16_11.sce new file mode 100755 index 000000000..c731afff5 --- /dev/null +++ b/2414/CH16/EX16.11/Ex16_11.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 532
+//prob no. 16.11
+c=3*10^8; //speed of light in m/s
+fc=15*10^9; //Hz
+v=25 // speed in m/s
+fD=2*v/c*fc; //Hz
+mprintf('Doppler shift , fD=%.0f Hz \n',fD);
diff --git a/2414/CH16/EX16.12/Ex16_12.sce b/2414/CH16/EX16.12/Ex16_12.sce new file mode 100755 index 000000000..b5051352e --- /dev/null +++ b/2414/CH16/EX16.12/Ex16_12.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 532
+//prob no. 16.12
+c=186000; //speed of light in mi/s
+fc=10*10^9; //Hz
+fD=2*10^3; //frequency shift in Hz
+v=c*fD/(2*fc); //speed in mi/s
+mprintf('Speed of automobile , v=%.2f*10^-3 mi/s \n',v*10^3);
+v=3600*v;
+mprintf(' v=%.1f mi/hr \n',v);
diff --git a/2414/CH16/EX16.13/Ex16_13.sce b/2414/CH16/EX16.13/Ex16_13.sce new file mode 100755 index 000000000..6166a24ce --- /dev/null +++ b/2414/CH16/EX16.13/Ex16_13.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 535
+//prob no. 16.13
+n1=1; //refraction index of air
+E2=4 //material dielectric constant
+theta_i=50 //angle of incidence in degree (misprinted in the solution)
+n2=sqrt(E2);
+theta_r=asin(n1/n2*sin(theta_i*%pi/180));
+mprintf(' The angle of refraction is %.2f \n (using angle of incidence =50)\n',theta_r*180/%pi);
+//misprinted angle
diff --git a/2414/CH16/EX16.2/Ex16_2.sce b/2414/CH16/EX16.2/Ex16_2.sce new file mode 100755 index 000000000..64b6b095b --- /dev/null +++ b/2414/CH16/EX16.2/Ex16_2.sce @@ -0,0 +1,21 @@ +clc;
+close();
+clear();
+//page no 520
+//prob no. 16.2
+c=3*10^8; //speed of light
+Pt=5 //W
+GtdB=13; //dB
+GrdB=17; //dB
+d=80; //in km
+f=3; //frequency in GHz
+
+PtdBW=10*log10(Pt);
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //dB
+mprintf('The path loss is, alfa_1(dB) = %.2f dB\n',alfa1_dB);
+
+PrdBW=PtdBW+GtdB+GrdB-alfa1_dB; //calculation of recieved power in dB
+mprintf(' Pr(dBW)=%.2f dBW\n',PrdBW)
+
+Pr=10^(PrdBW/10); //recieved power in Watts
+mprintf(' Pr=%.1f pW ',Pr*10^12);
diff --git a/2414/CH16/EX16.3/Ex16_3.sce b/2414/CH16/EX16.3/Ex16_3.sce new file mode 100755 index 000000000..4d71fd256 --- /dev/null +++ b/2414/CH16/EX16.3/Ex16_3.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 521
+//prob no. 16.3
+d=240000*1.609; //in km
+//part a
+f=100; //frequency in MHz
+alfa1_dB=20*log10(f)+20*log10(d)+32.44; //dB
+mprintf('(a) The path loss is %.2f dB\n',alfa1_dB);
+//part b
+f=1; //frequency in GHz
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //dB
+mprintf(' (b) The path loss is %.2f dB\n',alfa1_dB);
+//part c
+f=10; //frequency in GHz
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //dB
+mprintf(' (c) The path loss is %.2f dB\n',alfa1_dB);
diff --git a/2414/CH16/EX16.4/Ex16_4.sce b/2414/CH16/EX16.4/Ex16_4.sce new file mode 100755 index 000000000..2cbf332df --- /dev/null +++ b/2414/CH16/EX16.4/Ex16_4.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 522
+//prob no. 16.4
+f=1; //in GHz
+//part a
+d=1; //in Km
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //dB
+mprintf('(a) The path loss is %.2f dB\n',alfa1_dB);
+//part b
+d=10; //in km
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //dB
+mprintf(' (b) The path loss is %.2f dB\n',alfa1_dB);
+//part c
+d=100; //in km
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //dB
+mprintf(' (c) The path loss is %.2f dB\n',alfa1_dB);
diff --git a/2414/CH16/EX16.5/Ex16_5.sce b/2414/CH16/EX16.5/Ex16_5.sce new file mode 100755 index 000000000..12faf5dff --- /dev/null +++ b/2414/CH16/EX16.5/Ex16_5.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 522
+//prob no. 16.5
+Pr=50*10^-12; //in Watts
+GtdB=3; //dB
+GrdB=4; //dB
+d=80; //kilo-metre
+f=500; //frequency in MHz
+PrdBW=10*log10(Pr); //in dB conversion
+mprintf('Pr(dBW)=%.2f dBW\n',PrdBW)
+alfa1_dB=20*log10(f)+20*log10(d)+32.44; //path loss in dB
+mprintf(' The path loss is, %.2f dB\n',alfa1_dB);
+PtdBW=PrdBW+alfa1_dB-GtdB-GrdB; //calculation of transmitted power in dB
+mprintf(' Pt(dBW)=%.2f dBW\n',PtdBW)
+Pt=10^(PtdBW/10); //transmitted power in Watts
+mprintf(' Pt=%.1f W ',Pt);
diff --git a/2414/CH16/EX16.6/Ex16_6.sce b/2414/CH16/EX16.6/Ex16_6.sce new file mode 100755 index 000000000..e94568392 --- /dev/null +++ b/2414/CH16/EX16.6/Ex16_6.sce @@ -0,0 +1,19 @@ +clc;
+close();
+clear();
+//page no 523
+//prob no. 16.6
+Pr=200; //in f-Watts
+GtdB=30; //dB
+GrdB=20; //dB
+d=40000; //kilo-metre
+f=4; //frequency in GHz
+PrdBf=10*log10(Pr); //in dBf conversion
+mprintf('Pr(dBf)=%.2f dBf\n',PrdBf)
+alfa1_dB=20*log10(f)+20*log10(d)+92.44; //path loss in dB
+mprintf(' The path loss is, %.2f dB\n',alfa1_dB);
+PtdBf=PrdBf+alfa1_dB-GtdB-GrdB; //calculation of transmitted power in dBf
+PtdBW=PtdBf-150; //calculation of transmitted power in dBW
+mprintf(' Pt(dBf)=%.2f dBf OR %.2f dBW\n',PtdBf,PtdBW)
+Pt=10^(PtdBW/10); //transmitted power in Watts
+mprintf(' Pt=%.2f W ',Pt);
diff --git a/2414/CH16/EX16.7/Ex16_7.sce b/2414/CH16/EX16.7/Ex16_7.sce new file mode 100755 index 000000000..c8edf88c7 --- /dev/null +++ b/2414/CH16/EX16.7/Ex16_7.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 525
+//prob no. 16.7
+hT=50; //m
+hR=5; //m
+d_km=sqrt(17*hT)+sqrt(17*hR); //in km
+mprintf(' d(km)=%.2f Km ',d_km);
diff --git a/2414/CH16/EX16.8/Ex16_8.sce b/2414/CH16/EX16.8/Ex16_8.sce new file mode 100755 index 000000000..b24222bfd --- /dev/null +++ b/2414/CH16/EX16.8/Ex16_8.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 528
+//prob no. 16.8
+Pt=10000; //Watts
+Gt=25; //dB
+f=3; //GHz
+d=50; //km
+sigma=20 //radar cross section in m^2
+alfa2_dB=20*log10(f)+40*log10(d)+163.43-10*log10(sigma); //alfa2(dB) calculation
+mprintf(' The two way path loss is,alfa2(dB)= %.2f dB\n',alfa2_dB);
+PtdBW=10*log10(Pt); //transmitted power in dB
+mprintf(' Pt(dBW)=%i dBW\n',PtdBW)
+PrdBW=PtdBW+2*Gt-alfa2_dB //dBW
+mprintf(' Pr(dBW)=%.2f dBW \n',PrdBW);
+Pr=10^(PrdBW/10);
+mprintf(' Pr=%.2f fW',Pr*10^15);
diff --git a/2414/CH16/EX16.9/Ex16_9.sce b/2414/CH16/EX16.9/Ex16_9.sce new file mode 100755 index 000000000..aa89a03fb --- /dev/null +++ b/2414/CH16/EX16.9/Ex16_9.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 530
+//prob no. 16.9
+c=3*10^8; //speed of light in m/s
+Td=400*10^-6 //s
+d=c*Td/2 //in m
+mprintf(' d=%.0f Km ',d*10^-3);
diff --git a/2414/CH17/EX17.1/Ex17_1.sce b/2414/CH17/EX17.1/Ex17_1.sce new file mode 100755 index 000000000..c35420791 --- /dev/null +++ b/2414/CH17/EX17.1/Ex17_1.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 547
+//prob no. 17.1
+H=10^6; //meter
+v=20*10^6/sqrt(H+6.4*10^6); //m/s
+mprintf('(a)velocity , v=%i m/s\n',v);
+R=6.4*10^6; //data rate in bits per second
+C=2*%pi*(H+R); //circumference in m
+mprintf(' (b)circumference , C=%i m\n',C); //raunded value of C shown in book solution
+T=C/v;
+mprintf(' (c)The period is , T=%.2f seconds or %.2f minutes',T,T/60);
diff --git a/2414/CH17/EX17.2/Ex17_2.sce b/2414/CH17/EX17.2/Ex17_2.sce new file mode 100755 index 000000000..19e0b3381 --- /dev/null +++ b/2414/CH17/EX17.2/Ex17_2.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 548
+//prob no. 17.2
+L=37; //latitude in degree
+R=6400; H=36000; //from the text
+del=atan(R*sin(L*%pi/180)/(H+R*(1-cos(L*%pi/180)))) //Declination angle
+mprintf('The ange is %.2f degree\n',del*180/%pi);
diff --git a/2414/CH17/EX17.3/Ex17_3.sce b/2414/CH17/EX17.3/Ex17_3.sce new file mode 100755 index 000000000..85231bb08 --- /dev/null +++ b/2414/CH17/EX17.3/Ex17_3.sce @@ -0,0 +1,17 @@ +clc;
+close();
+clear();
+//page no 552
+//prob no. 17.3
+c=3*10^8; //speed of light in m/s
+f=3.7*10^9; //Hz
+lembda=c/f; //m
+mprintf('The wave length is %.4f cm \n',lembda*100)
+theta_3dB=8; //degree
+D=70*lembda/theta_3dB //m
+mprintf('The diameter is, D= %.4f m \n',D);
+eta_1=.6; //illumination efficiency
+G=eta_1*(%pi*D/lembda)^2; //gain calculation
+mprintf('The Gain is G= %.2f \n',G)
+G_dB=10*log10(G); //dB gain
+mprintf('The Gain in dB is G(dB)= %.3f dB \n',G_dB)
diff --git a/2414/CH17/EX17.4/Ex17_4.sce b/2414/CH17/EX17.4/Ex17_4.sce new file mode 100755 index 000000000..fadd46b28 --- /dev/null +++ b/2414/CH17/EX17.4/Ex17_4.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 553
+//prob no. 17.4
+theta_3dB=1.6; // beamwidth in degree
+eta_1=.6; //illumination efficiency
+G=eta_1*48000/(theta_3dB)^2; //gain calculation
+mprintf('The Gain is G= %.0f \n',G)
+G_dB=10*log10(G); //dB gain
+mprintf('The Gain in dB is G(dB)= %.1f dB \n',G_dB)
diff --git a/2414/CH17/EX17.5/Ex17_5.sce b/2414/CH17/EX17.5/Ex17_5.sce new file mode 100755 index 000000000..01757e87d --- /dev/null +++ b/2414/CH17/EX17.5/Ex17_5.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 554
+//prob no. 17.5
+theta_3dB=.3; // minimum practical beamwidth in degree
+eta_1=.6; //illumination efficiency
+G=eta_1*48000/(theta_3dB)^2; //gain calculation
+mprintf('The Gain is G= %.0f \n',G)
+G_dB=10*log10(G); //dB gain
+mprintf('The Gain in dB is G(dB)= %.1f dB \n',G_dB)
diff --git a/2414/CH17/EX17.6/Ex17_6.sce b/2414/CH17/EX17.6/Ex17_6.sce new file mode 100755 index 000000000..0281ceb6e --- /dev/null +++ b/2414/CH17/EX17.6/Ex17_6.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 554
+//prob no. 17.6
+c=3*10^8; //speed of light in m/s
+f=5.925*10^9; //Hz
+lembda=c/f; //m
+mprintf('The wave length is %.3f cm \n',lembda*100)
+theta_3dB=1.6; // beamwidth degree
+D=70*lembda/theta_3dB //m
+mprintf('The diameter is, D= %.3f m \n',D);
diff --git a/2414/CH17/EX17.7/Ex17_7.sce b/2414/CH17/EX17.7/Ex17_7.sce new file mode 100755 index 000000000..efb04fbb4 --- /dev/null +++ b/2414/CH17/EX17.7/Ex17_7.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 556
+//prob no. 17.7
+l=127-70.2; //Difference in longitude
+L=40.5 //Latitude of New York
+d_km=35.786*10^3*sqrt(1+0.42*(1-cos(L*%pi/180)*cos(l*%pi/180)));
+mprintf('The distance is %.0f km \n',d_km)
diff --git a/2414/CH17/EX17.8/Ex17_8.sce b/2414/CH17/EX17.8/Ex17_8.sce new file mode 100755 index 000000000..bde5fff33 --- /dev/null +++ b/2414/CH17/EX17.8/Ex17_8.sce @@ -0,0 +1,33 @@ +clc;
+close();
+clear();
+//page no 556
+//prob no. 17.8
+PtdBW=20
+GtdB=55
+EIRP_dBW=PtdBW+GtdB;
+mprintf('The EIRP for uplink earth station is %.0f dBW \n',EIRP_dBW)
+l=91-70.2; //Difference in longitude
+L=40.5 //Latitude of New York
+d_km=35.786*10^3*sqrt(1+0.42*(1-cos(L*%pi/180)*cos(l*%pi/180)));
+mprintf('The distance is %.0f km \n',d_km)
+
+f=6.125 //Uplink frequency in GHz
+alfa1_dB=20*log10(f)+20*log10(d_km)+92.44; //Path loss
+mprintf('The path loss is %.2f dB \n',alfa1_dB)
+
+FdB=3; //noise figure in dB
+F=10^(FdB/10) //absolute noise figure (exact value)
+Te=(F-1)*290; //Noise temperature
+mprintf('The Noise temperature of satellite reciever is %.0f K \n',Te)
+Ti=300; //input noise temperature in K
+Tsys=Ti+Te
+mprintf('The system temperature of satellite reciever is %.0f K \n',Tsys)
+G_dB=27 //satellite reciever antwnna gain
+GT=G_dB-10*log10(Tsys); //G/T ratio in dB
+mprintf('The G/T ratio for satellite reciever is %.2f dB/K \n',GT)
+B=36*10^6 ;// Bandwidth in Hz
+L_misc=1.6 //atmospheric loss
+CN=EIRP_dBW-alfa1_dB+GT+228.6-10*log10(B)-L_misc; //C/N in dB
+mprintf('The carrier power to noise ratio at the satellite reciever is %.2f dB \n',CN)
+// Value of F is rouded to 2 in the text
diff --git a/2414/CH17/EX17.9/Ex17_9.sce b/2414/CH17/EX17.9/Ex17_9.sce new file mode 100755 index 000000000..897b37a0a --- /dev/null +++ b/2414/CH17/EX17.9/Ex17_9.sce @@ -0,0 +1,29 @@ +clc;
+close();
+clear();
+//page no 557
+//prob no. 17.9
+
+EIRP_dBW=47.8; //dBW
+l=91-90; //Difference in longitude
+L=32 //Latitude of New York
+d_km=35.786*10^3*sqrt(1+0.42*(1-cos(L*%pi/180)*cos(l*%pi/180)));
+mprintf('The distance is %.0f km \n',d_km)
+
+f=3.9 //downlink frequency in GHz
+alfa1_dB=20*log10(f)+20*log10(d_km)+92.44; //Path loss
+mprintf('The path loss is %.2f dB \n',alfa1_dB)
+
+F=1.778 //absolute noise figure
+Te=(F-1)*290; //Noise temperature
+mprintf('The Noise temperature of satellite reciever is %.2f K \n',Te)
+Ti=150; //input noise temperature in K
+Tsys=Ti+Te
+mprintf('The system temperature of satellite reciever is %.2f K \n',Tsys)
+G_dB=42 //satellite reciever antwnna gain
+GT=G_dB-10*log10(Tsys); //G/T ratio in dB
+mprintf('The G/T ratio for satellite reciever is %.2f dB/K \n',GT)
+B=36*10^6 ;// Bandwidth in Hz
+L_misc=1 //atmospheric loss
+CN=EIRP_dBW-alfa1_dB+GT+228.6-10*log10(B)-L_misc; //C/N in dB
+mprintf('The carrier power to noise ratio at the satellite reciever is %.1f dB \n',CN)
diff --git a/2414/CH19/EX19.2/Ex19_2.sce b/2414/CH19/EX19.2/Ex19_2.sce new file mode 100755 index 000000000..cf34aefb6 --- /dev/null +++ b/2414/CH19/EX19.2/Ex19_2.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 605
+//prob no. 19.2
+b=[0 23 62 8 43 16 71 47 19 61]
+for i=1:10
+ f9(i)=[b(i)+9]+2
+ if f9(i)>79 then
+ f9(i)=f9(i)-79
+ end
+ mprintf('\nFor i=%i ,b(i)=%i. Therefore.f9(%i)=[%i+9]mod(79)+2=%i',i,b(i),i,b(i),f9(i))
+end
diff --git a/2414/CH19/EX19.4/Ex19_4.sce b/2414/CH19/EX19.4/Ex19_4.sce new file mode 100755 index 000000000..58c6fef87 --- /dev/null +++ b/2414/CH19/EX19.4/Ex19_4.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 607
+//prob no. 19.4
+fd=.160; //in MHz
+Fc=2411;
+ mprintf('(a)fd=%.2f MHz. a 0 is represented by %.2f MHz\n',fd,Fc-fd)
+ mprintf('(b)A 1 is represented by %.2f MHz\n',Fc+fd)
+
diff --git a/2414/CH19/EX19.5/Ex19_5.sce b/2414/CH19/EX19.5/Ex19_5.sce new file mode 100755 index 000000000..b5dac1dbf --- /dev/null +++ b/2414/CH19/EX19.5/Ex19_5.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 607
+//prob no. 19.5
+fd1=.216; //in MHz
+fd2=.072; //in MHz
+Fc=2400+25 ; //MHz
+ mprintf('(a)fd1=%.2f MHz. a 00 is represented by %.3f MHz\n',fd1,Fc-fd1)
+ mprintf('(b)A 01 is represented by %.3f MHz\n',Fc-fd2)
+ mprintf('(c)A 10 is represented by %.3f MHz\n',Fc+fd1)
+ mprintf('(b)A 11 is represented by %.3f MHz\n',Fc+fd2)
+//answer in part a is misprinted in the text
diff --git a/2414/CH19/EX19.6/Ex19_6.sce b/2414/CH19/EX19.6/Ex19_6.sce new file mode 100755 index 000000000..b8a96525c --- /dev/null +++ b/2414/CH19/EX19.6/Ex19_6.sce @@ -0,0 +1,26 @@ +clc;
+close();
+clear();
+//page no 608
+//prob no. 19.6
+code=[0 1 0 1 1 0];
+t=[0:.01:2] //for x-axis
+a=[sin(2*%pi.*t)] //for y-axis
+y=[]
+x=[]
+for i=1:length(code)
+
+ if code(i)==1 then
+ a=-a;
+ end
+ y=[y a]
+ x=[x 2*%pi.*(t+2*(i-1))]
+end
+
+clf
+plot(x,y)
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+xtitle('DPSK used to encode 010110','Time','amplitude')
+xgrid
diff --git a/2414/CH19/EX19.7/Ex19_7.sce b/2414/CH19/EX19.7/Ex19_7.sce new file mode 100755 index 000000000..3556a61a3 --- /dev/null +++ b/2414/CH19/EX19.7/Ex19_7.sce @@ -0,0 +1,35 @@ +clc;
+close();
+clear();
+//page no 609
+//prob no. 19.7
+code=[0 0 1 1 1 0 0 0 0 0 0 1];
+t=[0:.01:2] //for x-axis
+y=[]
+x=[]
+p=0 //phase shift
+for i=1:2:length(code)
+ if code(i)==0 then
+ if code(i+1)==0 then
+ p=p+0
+ else
+ p=p+%pi/2
+ end
+ else
+ if code(i+1)==1 then
+ p=p+%pi
+ else
+ p=p+3*%pi/2
+ end
+ end
+ y=[y sin(2*%pi.*t+p)];
+ x=[x 2*%pi.*(t+(i-1))];
+end
+
+clf()
+plot(x,y);
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+xtitle('DQPSK used to encode 001110000001','Time','amplitude');
+xgrid
diff --git a/2414/CH2/EX2.1/Ex2_1.sce b/2414/CH2/EX2.1/Ex2_1.sce new file mode 100755 index 000000000..2c6ca9830 --- /dev/null +++ b/2414/CH2/EX2.1/Ex2_1.sce @@ -0,0 +1,13 @@ +clc;
+
+//page no 31
+//problem 2.1
+//v(t)=12coos(2pi*2000t)
+A=12; //in volts
+disp('V',A,'(a) The amplitude is idetified as');
+w=2*%pi*2000;
+disp('rad/s',w,'(b) The radian frequincy is');
+f=w/(2*%pi);
+disp('Hz',f,'(c) The cyclic frequency is');
+T=1/f;
+disp('s',T,'(d) The period is');
diff --git a/2414/CH2/EX2.2/Ex2_2.sce b/2414/CH2/EX2.2/Ex2_2.sce new file mode 100755 index 000000000..54a0d91d0 --- /dev/null +++ b/2414/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,14 @@ +clc;
+
+//page no 32
+//problem 2.2
+//i(t)=4cos50t + 3sin50t
+A=4;
+B=3;
+C=sqrt(A^2+B^2); //right triangle
+theta=-1*atan(3/4); //in rad
+disp('rad',theta,'(a) The current is expressed as 5cos(50t + theta),where theta is');
+phi=acot(3/4); //from figure 2.5 in radian
+disp('rad',phi,'(b) The current is expressed as 5sin(50t+phi), where phi is');
+phi=phi*180/%pi;
+disp('degree',phi,'or');
diff --git a/2414/CH2/EX2.3/Ex2_3.sce b/2414/CH2/EX2.3/Ex2_3.sce new file mode 100755 index 000000000..4aacb4b92 --- /dev/null +++ b/2414/CH2/EX2.3/Ex2_3.sce @@ -0,0 +1,11 @@ +clc;
+
+//page no 37
+//problem 2.3
+T=12.5*10^-6; //in sec
+f0=0; //dc
+f1=1/T*10^-3; //in kHz
+f2=f0+2*f1;
+f3=f0+3*f1;
+f4=f0+4*f1;
+disp('kHz',f4,f3,f2,f1,f0,'The lowest five frequencies are (in kH)');
diff --git a/2414/CH2/EX2.4/Ex2_4.sce b/2414/CH2/EX2.4/Ex2_4.sce new file mode 100755 index 000000000..49453e520 --- /dev/null +++ b/2414/CH2/EX2.4/Ex2_4.sce @@ -0,0 +1,17 @@ +clc;
+
+//page no 40
+//problem 2.4
+//all frequencies are in Hz
+f=0;
+f1=500; //fundamental freq.
+f2=1000; f3=1500; //harmonics
+disp(f3,f2,f1,f,'(a) The frequencies in signal are');
+//for plot
+fHz=[0:1600];
+Cn=[5 zeros(1:f1-1) 8 zeros(f1+1:f2-1) 6 zeros(f2+1:f3-1) 3 zeros(f3+1:1600)]
+clf
+plot2d(fHz,Cn,[3],rect=[-0.5,0,1550,10])
+xtitle('Linear amplitude spectrum','f,Hz','Cn(V)')
+xgrid
+disp('(c) The required bandwidth is 1500 Hz');
diff --git a/2414/CH2/EX2.5/Ex2_5.sce b/2414/CH2/EX2.5/Ex2_5.sce new file mode 100755 index 000000000..50ff39f40 --- /dev/null +++ b/2414/CH2/EX2.5/Ex2_5.sce @@ -0,0 +1,31 @@ +clc;
+
+//page no 43
+//problem 2.5
+//All voltages are in V
+//All power in watts
+R=5; //ohm
+C0=5; //dc value
+C1=8;
+C2=6;
+C3=3; //volts
+Vrms=sqrt(C0^2+0.5*(C1^2+C2^2+C3^2)); //rms voltage
+disp(Vrms,'(a) The rms value of voltage is');
+P=Vrms^2/R; //watts
+disp('W',P,'(b) The average power dissipated in resistor is')
+P0=C0^2/R;
+disp(P0,'(c) The dc power is ');
+P1=C1^2/(2*R);
+disp(P1,'The power in fundamental is');
+P2=C2^2/(2*R);
+P3=C3^2/(2*R);
+disp(P3,P2,'The second and third harmonics are');
+//for plot
+fHz=[0:1600];
+f1=500; //fundamental freq.
+f2=1000; f3=1500;
+Pn=[P0 zeros(1:f1-1) P1 zeros(f1+1:f2-1) P2 zeros(f2+1:f3-1) P3 zeros(f3+1:1600)]
+clf
+plot2d(fHz,Pn,[3],rect=[0,0,1600,8])
+xtitle('Power spectrum','f,Hz','Pn(W)')
+xgrid
diff --git a/2414/CH2/EX2.6/Ex2_6.sce b/2414/CH2/EX2.6/Ex2_6.sce new file mode 100755 index 000000000..bd07058f2 --- /dev/null +++ b/2414/CH2/EX2.6/Ex2_6.sce @@ -0,0 +1,12 @@ +clc;
+
+//page no 48
+//problem 2.6
+//All frequencies in Hz
+//There is no dc component
+T=4*10^-3;
+f1=1/T;
+disp(f1,'The fundmental frequency is');
+//The function have only odd numbered components
+disp(9*f1,7*f1,5*f1,3*f1,f1,'The five lowest frequencies are ');
+disp('(b) The rolloff rate is -6dB/octave');
diff --git a/2414/CH2/EX2.7/Ex2_7.sce b/2414/CH2/EX2.7/Ex2_7.sce new file mode 100755 index 000000000..764a5be4b --- /dev/null +++ b/2414/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,29 @@ +clc;
+
+//page no 51
+//problem 2.7
+//All frequencies in kHz
+//The time is in ms
+//Power in WATTS
+//All voltage in volts
+T=0.2; //ms
+f1=1/T;
+disp(f1,'The fundamental frequency is');
+//There are only odd numbered harmonics
+Ap2p=40; // peak to peak
+R=50; //ohm
+A=Ap2p/2;
+C1=4*A/%pi;
+C3=4*A/(3*%pi);
+C5=4*A/(5*%pi);
+disp('respectively',C5,C3,C1,'The magnitude of fundamental , third and fifth harmonics are ');
+function [Pn]=Power(Cn,R)
+ Pn=Cn^2/(2*R);
+endfunction
+P1=Power(C1,R);
+P3=Power(C3,R);
+P5=Power(C5,R);
+//power is calculated using the function Power defined above
+disp('Frequency Amplitude Power')
+table={f1,C1,P1;3*f1,C3,P3;5*f1,C5,P5};
+disp(table);
diff --git a/2414/CH2/EX2.8/Ex2_8.sce b/2414/CH2/EX2.8/Ex2_8.sce new file mode 100755 index 000000000..3ed483d56 --- /dev/null +++ b/2414/CH2/EX2.8/Ex2_8.sce @@ -0,0 +1,35 @@ +clc;
+
+//page no 52
+//problem 2.8
+//All frequencies in kHz
+//The time is in ms
+//Power in WATTS
+//All voltage in volts
+//following values are copied from Ex2-7
+T=0.2; //ms
+f1=1/T;
+//There are only odd numbered harmonics
+Ap2p=40; // peak to peak
+R=50; //ohm
+A=Ap2p/2;
+C1=4*A/%pi;
+C3=4*A/(3*%pi);
+C5=4*A/(5*%pi);
+function [Pn]=Power(Cn,R)
+ Pn=Cn^2/(2*R);
+endfunction
+P1=Power(C1,R);
+P3=Power(C3,R);
+P5=Power(C5,R);
+
+
+//Ex2-8
+Vrms=A;
+P=Vrms^2/R;
+disp('W',P,'Total power is');
+P135=P1+P3+P5
+disp(P135,'Power of fundamental , third and fifth harmonics is');
+prcnt=P135/P*100;
+disp(prcnt,'The percent of power is ');
+
diff --git a/2414/CH2/EX2.9/Ex2_9.sce b/2414/CH2/EX2.9/Ex2_9.sce new file mode 100755 index 000000000..b945c092e --- /dev/null +++ b/2414/CH2/EX2.9/Ex2_9.sce @@ -0,0 +1,40 @@ +clc;
+clear all;
+//page no 54
+//problem 2.9
+f0=0;
+f1=500; //fundamental freq.
+f2=1000; f3=1500; //harmonics
+
+//Values from ex 2.4
+C=[5 8 6 3]// Values in Volts
+//Values from ex 2.5
+P=[5 6.4 3.6 .9]; //poweer in watts
+clf;
+// plot two sided linear amplitude spectrum
+fHz=-1510:10^-2:1510; //x-axis matrix
+//Y-axis matrix
+Cn=[C(1)]
+for i=2:4
+ Cn=[zeros(-500+10^-2:10^-2:0-10^-2) Cn zeros(0+10^-2:10^-2:500-10^-2)]
+ Cn=[C(i)/2 Cn C(i)/2];
+end
+Cn=[zeros(-10+10^-2:10^-2:0) Cn zeros(0:10^-2:10-10^-2)]
+subplot(211)
+plot2d(fHz,Cn,[2],rect=[-2000,0,2000,6])
+xtitle('Two-sided Linear amplitude spectrum','f,Hz','Vn(V)')
+xgrid
+
+// plot two power spectrum
+fHz=-1510:10^-2:1510; //x-axis matrix
+//Y-axis matrix
+Pn=[P(1)]
+for i=2:4
+ Pn=[zeros(-500+10^-2:10^-2:0-10^-2) Pn zeros(0+10^-2:10^-2:500-10^-2)]
+ Pn=[P(i)/2 Pn P(i)/2];
+end
+Pn=[zeros(-10+10^-2:10^-2:0) Pn zeros(0:10^-2:10-10^-2)]
+subplot(212)
+plot2d(fHz,Pn,[6],rect=[-2000,0,2000,6])
+xtitle('Two-sided power] spectrum','f,Hz','Pn(W)')
+xgrid
diff --git a/2414/CH20/EX20.1/Ex20_1.sce b/2414/CH20/EX20.1/Ex20_1.sce new file mode 100755 index 000000000..57282d419 --- /dev/null +++ b/2414/CH20/EX20.1/Ex20_1.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 616
+//prob no. 20.1
+lembda=1300*10^-9; //wavwlength in m
+c=3*10^8; //speed of light in m/s
+f=c/lembda //in Hz
+mprintf('frequency of laser is ,f=%.0f THz',f*10^-12);
diff --git a/2414/CH20/EX20.2/Ex20_2.sce b/2414/CH20/EX20.2/Ex20_2.sce new file mode 100755 index 000000000..95571819a --- /dev/null +++ b/2414/CH20/EX20.2/Ex20_2.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 619
+//prob no. 20.2
+theta_i=30; //degree
+ni=1.00; //incident refraction index
+nr=1.52; //refeacted ray refraction index
+theta_r=asin(ni/nr*sin(theta_i*%pi/180)); //in radians
+mprintf('angle of refraction is %.2f degree',theta_r*180/%pi);
diff --git a/2414/CH20/EX20.3/Ex20_3.sce b/2414/CH20/EX20.3/Ex20_3.sce new file mode 100755 index 000000000..5eac89224 --- /dev/null +++ b/2414/CH20/EX20.3/Ex20_3.sce @@ -0,0 +1,12 @@ +clc;
+close();
+clear();
+//page no 620
+//prob no. 20.3
+theta_r=90; //degree
+ni=1.52; //refraction index for crown glass
+nr=1.00; //refraction index for air
+theta_i=asin(nr/ni*sin(theta_r*%pi/180)); //in radians
+mprintf('critical angle is %.2f degree',theta_i*180/%pi);
+//misprinted theta_r in the text
+//values are raunded up in the text
diff --git a/2414/CH20/EX20.4/Ex20_4.sce b/2414/CH20/EX20.4/Ex20_4.sce new file mode 100755 index 000000000..e3604c63d --- /dev/null +++ b/2414/CH20/EX20.4/Ex20_4.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 624
+//prob no. 20.4
+eta=.8; //efficiency
+lembda=850; //nm
+R=eta*lembda/1234; // A/W
+mprintf('The responsivity of diode is R= %.2f A/W',R);
diff --git a/2414/CH20/EX20.5/Ex20_5.sce b/2414/CH20/EX20.5/Ex20_5.sce new file mode 100755 index 000000000..70b3bec2a --- /dev/null +++ b/2414/CH20/EX20.5/Ex20_5.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 624
+//prob no. 20.5
+eta=.6; //efficiency
+lembda=1310; //nm
+R=eta*lembda/1234; // A/W
+mprintf('The responsivity of diode is R= %.2f A/W',R);
diff --git a/2414/CH20/EX20.6/Ex20_6.sce b/2414/CH20/EX20.6/Ex20_6.sce new file mode 100755 index 000000000..864419b2f --- /dev/null +++ b/2414/CH20/EX20.6/Ex20_6.sce @@ -0,0 +1,7 @@ +clc;
+close();
+clear();
+//page no 627
+//prob no. 20.6
+L=.4*.8; //loss in dB
+mprintf('The loss usong this cable is L= %.2f dB',L);
diff --git a/2414/CH20/EX20.7/Ex20_7.sce b/2414/CH20/EX20.7/Ex20_7.sce new file mode 100755 index 000000000..2932f70e0 --- /dev/null +++ b/2414/CH20/EX20.7/Ex20_7.sce @@ -0,0 +1,7 @@ +clc;
+close();
+clear();
+//page no 627
+//prob no. 20.7
+L=2.7*.8; //loss in dB
+mprintf('The loss usong multimode cable is L= %.2f dB',L);
diff --git a/2414/CH21/EX21.1/Ex21_1.sce b/2414/CH21/EX21.1/Ex21_1.sce new file mode 100755 index 000000000..4a99c8ed3 --- /dev/null +++ b/2414/CH21/EX21.1/Ex21_1.sce @@ -0,0 +1,17 @@ +clc;
+close();
+clear();
+//page no 637
+//prob no. 21.1
+D1=5;
+GR1=3*D1^2*(1+D1);
+mprintf('The reciever processing gain is GR1= %.0f \n',GR1);
+Bt=200*10^3; //bandwisth in Hz
+W=53*10^3; //highest modulating frequency in Hz
+D2=Bt/(2*W)-1; //deviation ratio
+mprintf('D2=%.3f\n',D2);
+GR2=3*D2^2*(1+D2);
+mprintf('The reciever processing gain for sterio FM is GR2= %.3f \n',GR2);
+mprintf('The ratio of the two gains is GR2/GR1= %.4f dB\n',GR2/GR1);
+dBdiffrence=10*log10(GR2/GR1)
+mprintf('dB diffrence= %.0f dB\n',dBdiffrence);
diff --git a/2414/CH21/EX21.2/Ex21_2.sce b/2414/CH21/EX21.2/Ex21_2.sce new file mode 100755 index 000000000..70a84a213 --- /dev/null +++ b/2414/CH21/EX21.2/Ex21_2.sce @@ -0,0 +1,6 @@ +clc;
+close();
+clear();
+//page no 644
+//prob no. 21.2
+mprintf('The percentage is %.0f ',483/525*100)
diff --git a/2414/CH21/EX21.3/Ex21_3.sce b/2414/CH21/EX21.3/Ex21_3.sce new file mode 100755 index 000000000..02525c2c2 --- /dev/null +++ b/2414/CH21/EX21.3/Ex21_3.sce @@ -0,0 +1,7 @@ +clc;
+close();
+clear();
+//page no 644
+//prob no. 21.3
+D=25/15;
+mprintf('The deviation ratio is D=%.3f ',D)
diff --git a/2414/CH21/EX21.4/Ex21_4.sce b/2414/CH21/EX21.4/Ex21_4.sce new file mode 100755 index 000000000..d65fb6d2c --- /dev/null +++ b/2414/CH21/EX21.4/Ex21_4.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 644
+//prob no. 21.4
+delta_f=25 //KHz
+W=15; //KHz
+Bt=2*(delta_f+W) //bandwidth
+mprintf('The bandwidth is Bt=%i KHz',Bt)
diff --git a/2414/CH3/EX3.1/Ex3_1.sce b/2414/CH3/EX3.1/Ex3_1.sce new file mode 100755 index 000000000..ca01c39f5 --- /dev/null +++ b/2414/CH3/EX3.1/Ex3_1.sce @@ -0,0 +1,29 @@ +clc;
+clear all;
+//chapter 3
+//page no 75
+//example 3.1
+A=1 //arbitrary value provided
+T=10 //T represents tau (arbitrary value provided)
+//plot for non periodic pulse
+t=-2*T:.001:2*T;
+vt=[zeros(-2*T:.001:-T/2) A*ones(-T/2+.001:.001:T/2-.001) zeros(T/2:.001:2*T)]
+clf
+subplot(211)
+plot2d(t,vt,[2],rect=[-2*T,0,2*T,A+1])
+xtitle('(a) Non periodic pulse','t','v(t)')
+
+//plot for amplitude spectum
+f=-4/T:.001:4/T;
+Vf=[]
+for i=1:length(f)
+ if f(i)==0 then
+ Vf=[Vf A*T]; //according to L'Hopitals rule sin(x)/x=1 at lim x->0
+ else
+ Vf=[Vf A*T*sin(%pi*f(i)*T)/(%pi*f(i)*T)]
+end
+end
+subplot(212)
+plot2d(f,Vf,[5])
+xtitle('(b) Amplitude spectrum','f','V(f)')
+xgrid
diff --git a/2414/CH3/EX3.2/Ex3_2.sce b/2414/CH3/EX3.2/Ex3_2.sce new file mode 100755 index 000000000..3cdc027e0 --- /dev/null +++ b/2414/CH3/EX3.2/Ex3_2.sce @@ -0,0 +1,28 @@ +clc;
+clear all;
+//chapter 3
+//page no 76
+//example 3.2
+//plot for impulse function
+t=-2:.001:2;
+vt=[zeros(-2:.001:0-.001) 1 zeros(0+.001:.001:2)] //impulse function matrix
+clf
+subplot(211)
+plot2d(t,vt,[2],rect=[-2,0,2,2])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+
+xtitle('(a) Unit Impulse function','t','v(t)')
+
+//plot for amplitude spectum
+f=-2:.001:2;
+Vf=[ones(-2:.001:2)]
+subplot(212)
+plot2d(f,Vf,[5])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+
+xtitle('(b) Amplitude spectrum','f','V(f)')
+xgrid
diff --git a/2414/CH3/EX3.3/Ex3_3.sce b/2414/CH3/EX3.3/Ex3_3.sce new file mode 100755 index 000000000..029625510 --- /dev/null +++ b/2414/CH3/EX3.3/Ex3_3.sce @@ -0,0 +1,29 @@ +clc;
+clear all;
+//chapter 3
+//page no 82
+//example 3.3
+A=20; //Volts
+T=1*10^-3; //second
+function Vf=Fourier_transform(f,T,A)
+ if f==0 then
+ Vf=A*T;
+ else
+ Vf=A*T*sin(%pi*f*T)/(%pi*f*T);
+
+ end
+endfunction
+mprintf('(a)Equation for fourier transform is \n V(f)=%.2f*sin(%.3f*pi*f)/(%.3f*pi*f)',A*T,T,T);
+//Part b Calculation
+f=[0 500 1000 1500];
+for i=1:4
+ Vf(i)=Fourier_transform(f(i),T,A)
+end
+//Part c calculation
+RdB=20*log10(Vf ./ .02)
+//Result Table
+mprintf('\nf(Hz) V(f)in V RdB\n')
+for i=1:4
+ mprintf('%5i %f %f \n',f(i),Vf(i),RdB(i))
+end
+//All values are precise
diff --git a/2414/CH3/EX3.4/Ex3_4.sce b/2414/CH3/EX3.4/Ex3_4.sce new file mode 100755 index 000000000..f1dfa0b8a --- /dev/null +++ b/2414/CH3/EX3.4/Ex3_4.sce @@ -0,0 +1,25 @@ +clc;
+clear all;
+//chapter 3
+//page no 85
+//example 3.4
+A=20; //Volts
+T=1*10^-3; //seconds
+f=[-3/T:3/T]; //in kHz
+Vf=[]
+for i=1:length(f)
+ if f(i)==0 then
+ Vf=[Vf A*T];
+ else
+ Vf=[Vf A*T*sin(%pi*f(i)*T)/(%pi*f(i)*T)];
+
+end
+end
+clf;
+plot2d(f,Vf,[5])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+
+xtitle('Amplitude Spectrum','f,Hz','V(f)');
+xgrid
diff --git a/2414/CH3/EX3.5/Ex3_5.sce b/2414/CH3/EX3.5/Ex3_5.sce new file mode 100755 index 000000000..bc0bfacc4 --- /dev/null +++ b/2414/CH3/EX3.5/Ex3_5.sce @@ -0,0 +1,35 @@ +clc;
+clear all;
+//chapter 3
+//page no 86
+//example 3.5
+A=20; //Volts
+T=5*10^-3; //period in seconds
+tau=1*10^-3; //pulse width in second
+d=tau/T; //duty cycle
+f1=1/T; //Fundamental frequency in Hz
+
+//for plot
+n=[-14:15]; //in Hz
+Vf=[]
+for i=1:length(n)
+ if n(i)==0 then
+ Vf(i*200)=A*d;
+ else
+ Vf(i*200)=A*d*sin(%pi*d*n(i))/(%pi*d*n(i))
+ end
+ //to get the magnitudes of components
+ if Vf(i*200)<0 then
+ Vf(i*200)=-Vf(i*200)
+ end
+
+end
+f=-3000:3000-1
+clf;
+plot2d(f,Vf,[5],rect=[-3000,0,3000,5])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+
+xtitle('Amplitude Spectrum','f,Hz','Vn');
+xgrid
diff --git a/2414/CH3/EX3.6/Ex3_6.sce b/2414/CH3/EX3.6/Ex3_6.sce new file mode 100755 index 000000000..919be2b0c --- /dev/null +++ b/2414/CH3/EX3.6/Ex3_6.sce @@ -0,0 +1,25 @@ +clc;
+clear all;
+//chapter 3
+//page no 89
+//example 3.6
+A=1 //arbitrary value provided
+Tau=10^-3 //in seconds
+fc=30*10^6; //centre frequency in Hz
+//plot for amplitude spectum
+f=-3/Tau:3/Tau;
+Vf=[]
+for i=1:length(f)
+ if f(i)==0 then
+ Vf=[Vf A*Tau]; //according to L'Hopitals rule sin(x)/x=1 at lim x->0
+ else
+ Vf=[Vf A*Tau*sin(%pi*f(i)*Tau)/(%pi*f(i)*Tau)]
+end
+end
+f=f+fc //shifting
+f=f.*10^-6 //MHz
+clf
+plot2d(f,Vf,[5])
+
+xtitle('Amplitude spectrum','f,MHz','Vrf(f)')
+xgrid
diff --git a/2414/CH3/EX3.7/Ex3_7.sce b/2414/CH3/EX3.7/Ex3_7.sce new file mode 100755 index 000000000..9a827eaa8 --- /dev/null +++ b/2414/CH3/EX3.7/Ex3_7.sce @@ -0,0 +1,30 @@ +clc;
+clear all;
+//chapter 3
+//page no 89
+//example 3.7
+A=1; //arbitrary vaule
+T=(1+4)*10^-3; //period in seconds
+tau=1*10^-3; //pulse width in second
+fc=30*10^6; //centre frequency in Hz
+d=tau/T; //duty cycle
+f1=1/T; //Fundamental frequency in Hz
+
+//for plot
+n=[-14:15]; //in Hz
+Vf=[]
+for i=1:length(n)
+ if n(i)==0 then
+ Vf(i*200)=A*d;
+ else
+ Vf(i*200)=A*d*sin(%pi*d*n(i))/(%pi*d*n(i))
+ end
+
+end
+f=-3000:3000-1
+f=f+fc; //Shifting by fc
+f=f*10^-6; //in MHz
+clf;
+plot2d(f,Vf,[5])
+xtitle('Amplitude Spectrum','f,MHz','Vn');
+xgrid
diff --git a/2414/CH3/EX3.8/Ex3_8.sce b/2414/CH3/EX3.8/Ex3_8.sce new file mode 100755 index 000000000..6858826b3 --- /dev/null +++ b/2414/CH3/EX3.8/Ex3_8.sce @@ -0,0 +1,10 @@ +clc;
+clear all;
+//chapter 3
+//page no 90
+//example 3.8
+mprintf('(a) The RF burst frequency is 500 MHz\n');
+mprintf(' (b) The pulse repetition rate is 1 MHz\n');
+f0=10*10^6; //Zero crossing frequency in Hz
+tau=1/f0; //in second
+mprintf(' (c) The pulse width is %.1f micro second\n',tau*10^6);
diff --git a/2414/CH4/EX4.5/Ex4_5.sce b/2414/CH4/EX4.5/Ex4_5.sce new file mode 100755 index 000000000..f233a1701 --- /dev/null +++ b/2414/CH4/EX4.5/Ex4_5.sce @@ -0,0 +1,12 @@ +clc;
+clear all;
+//chapter 4
+//page no 120
+//example 4.5
+f=[500 2000 10000]; //frequency in Hz
+Af=1 ./sqrt(1+(f./1000)^8); //Linear amplitude response
+AdBf=20*log10(Af);
+mprintf(' f,Hz A(f) AdB(f)\n')
+for i=1:3
+ mprintf(' %5i Hz %.5f %.3f dB\n',f(i),Af(i),AdBf(i))
+end
diff --git a/2414/CH4/EX4.6/Ex4_6.sce b/2414/CH4/EX4.6/Ex4_6.sce new file mode 100755 index 000000000..a072f32fb --- /dev/null +++ b/2414/CH4/EX4.6/Ex4_6.sce @@ -0,0 +1,15 @@ +clc;
+clear all;
+//chapter 4
+//page no 123
+//example 4.6
+L=4*10^-6; //Henry
+C=9*10^-12; //Farad
+R=20*10^3; //ohm
+
+f0=1/(2*%pi*sqrt(L*C)); //frequency in Hz
+mprintf('(a) The resonant frequency is f0=%.2f MHz\n',f0*10^-6)
+Q=R*sqrt(C/L)
+mprintf(' (b) The Q is %i\n',Q);
+B=f0/Q;
+mprintf(' (c) The 3-dB bandwidth is B=%i KHz\n',B*10^-3);
diff --git a/2414/CH4/EX4.7/Ex4_7.sce b/2414/CH4/EX4.7/Ex4_7.sce new file mode 100755 index 000000000..36e0b8a5b --- /dev/null +++ b/2414/CH4/EX4.7/Ex4_7.sce @@ -0,0 +1,12 @@ +clc;
+clear all;
+//chapter 4
+//page no 125
+//example 4.7
+//misprinted example number
+pulse_width=2*10^-6; //second
+rise_time=10*10^-9; //second
+B=.5/pulse_width; //in Hz
+mprintf('(a) The aproximate bandwidth for coarse reproduction is B=%i KHz\n',B*10^-3)
+B=.5/rise_time;
+mprintf(' (b) The aproximate bandwidth for fine reproduction is B=%i MHz\n',B*10^-6)
diff --git a/2414/CH5/EX5.1/Ex5_1.sce b/2414/CH5/EX5.1/Ex5_1.sce new file mode 100755 index 000000000..afebeb260 --- /dev/null +++ b/2414/CH5/EX5.1/Ex5_1.sce @@ -0,0 +1,20 @@ +clc;
+//page no 147
+//prob no. 5.1
+// refer fig 5.7
+//The capacitance in pF
+C1=200;
+C2=2400;
+C3=8;
+t=1/C1+1/C2+1/C3; //temperary variable
+Ceq=1/t;//pF
+Ceq=Ceq*10^-12;//In Farad
+L=2*10^-6;//In H
+f0=1/(2*%pi*sqrt(L*Ceq))*10^-6; // IN MHz
+disp('MHz',f0,'(a) The oscillation frequency is');
+f0=1/(2*%pi*sqrt(L*C3*10^-12))*10^-6; // IN MHz
+disp('MHz',f0,'(b) Assuming Ceq~C3 , the oscillation frequency is');
+B=-C1/C2; //based on eq 5.3
+disp(B,'(c) The feedback fraction is ');
+A=1/B;
+disp(A,'The gain is');
diff --git a/2414/CH5/EX5.10/Ex5_10.sce b/2414/CH5/EX5.10/Ex5_10.sce new file mode 100755 index 000000000..0488d459f --- /dev/null +++ b/2414/CH5/EX5.10/Ex5_10.sce @@ -0,0 +1,10 @@ +clc;
+//page no 167
+//prob no. 5.10
+//All frequencies in MHz
+fc=40;
+fIF=5
+fLO=fc+fIF;
+disp(fLO,'(a) The LO frequency is ');
+fImage=fLO+fIF;
+disp(fImage,'(b) The image frequency is ');
diff --git a/2414/CH5/EX5.11/Ex5_11.sce b/2414/CH5/EX5.11/Ex5_11.sce new file mode 100755 index 000000000..b9dec8e8e --- /dev/null +++ b/2414/CH5/EX5.11/Ex5_11.sce @@ -0,0 +1,10 @@ +clc;
+//page no 167
+//prob no. 5.11
+//All frequencies in MHz
+fc=40;
+fIF=5
+fLO=fc-fIF;
+disp(fLO,'(a) The LO frequency is ');
+fImage=fLO-fIF;
+disp(fImage,'(b) The image frequency is ');
diff --git a/2414/CH5/EX5.12/Ex5_12.sce b/2414/CH5/EX5.12/Ex5_12.sce new file mode 100755 index 000000000..3d78aa1cb --- /dev/null +++ b/2414/CH5/EX5.12/Ex5_12.sce @@ -0,0 +1,19 @@ +clc;
+//page no 167
+//prob no. 5.12
+//All frequencies in Hz
+B=200*10^3; //The bandwidth allocated by FCC (in Hz)
+fl=88*10^6;fh=108*10^6; //FM broadcast band low and high end freq
+Q=fl/B;
+disp(Q,'(a) At the low end of FM band ,Q required is');
+Q=fh/B;
+disp(Q,' At the high end of FM band ,Q required is');
+fIF=10.7*10^6;// IF frequwncy (in Hz)
+Q=fIF/B;
+disp(Q,'(b) At the IF frequency ,Q required is ');
+disp('(c) Signal freq = 88 to 108 MHz')
+disp(' LO freq = 98.7 to 118.7 MHz')
+disp(' Image freq = 109.4 to 129.4MHz')
+disp('(d) Signal freq = 88 to 108 MHz')
+disp(' LO freq = 77.3 to 97.3 MHz')
+disp(' Image freq = 66.6 to 86.6MHz')
diff --git a/2414/CH5/EX5.2/Ex5_2.sce b/2414/CH5/EX5.2/Ex5_2.sce new file mode 100755 index 000000000..daa26df83 --- /dev/null +++ b/2414/CH5/EX5.2/Ex5_2.sce @@ -0,0 +1,12 @@ +clc;
+//page no 148
+//prob no. 5.2
+function [f]=frequency(f0,k,T,T0)
+ f=f0+k*f0*(T-T0);
+endfunction;
+k=40*10^-6;
+f=148;
+fmax=frequency(f,k,32,20);
+fmin=frequency(f,k,-8,20);
+disp('Mhz',fmax,'The maximum possible frequency , fmax= ');
+disp('Mhz',fmin,'The maximum possible frequency , fmin= ');
diff --git a/2414/CH5/EX5.3/Ex5_3.sce b/2414/CH5/EX5.3/Ex5_3.sce new file mode 100755 index 000000000..e89749906 --- /dev/null +++ b/2414/CH5/EX5.3/Ex5_3.sce @@ -0,0 +1,14 @@ +clc;
+//page no 150
+//prob no. 5.3
+//Refer figure 5-10
+N=5;
+M=8;
+fi=4;// in MHz
+f0=M/N*fi;
+disp('MHz',f0,'(a) The output frequency is f0=');
+f1=fi/N;
+disp('MHz',f1,'(b) The frequency f1 is');
+f2=f0/M;
+disp('MHz',f2,' The frequency f2 is ');
+//The two frequencies are same as required
diff --git a/2414/CH5/EX5.5/Ex5_5.sce b/2414/CH5/EX5.5/Ex5_5.sce new file mode 100755 index 000000000..95d7bbf62 --- /dev/null +++ b/2414/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,27 @@ +clc;
+clear all;
+//page no 152
+//prob no. 5.5
+
+//for input spectrum
+f=[-20:.001:20]; //x axis
+V=[1 zeros(-20+.001:.001:20-.001) 1]; //y axis
+clf;
+subplot(211);
+plot2d(f,V,[5],rect=[-130,0,130,2])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+xtitle('Input Spectrum','f,kHz','');
+xgrid
+
+//for output spectrum
+f=[-120:.01:120]; //x axis
+V=[1 zeros(-120+.01:.01:-80-.01) 1 zeros(-80+.01:0.01:80-0.01) 1 zeros(80+.01:.01:120-.01) 1]
+subplot(212);
+plot2d(f,V,[5],rect=[-130,0,130,2])
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+xtitle('Output Spectrum','f,kHz','');
+xgrid
diff --git a/2414/CH5/EX5.6/Ex5_6.sce b/2414/CH5/EX5.6/Ex5_6.sce new file mode 100755 index 000000000..69697627f --- /dev/null +++ b/2414/CH5/EX5.6/Ex5_6.sce @@ -0,0 +1,26 @@ +clc;
+clear all;
+//page no 157
+//prob no. 5.6
+
+fLO=110; //MHz
+//for V2(f)
+f=[0:.01:231+.01]; //x axis
+function V=pulse()
+ V=[]
+ for i=1:.005:1.5
+ V=[V i]
+ end
+endfunction
+V2=[zeros(0:.01:120-fLO-.01) pulse() zeros(121-fLO+.01:.01:120+fLO-.01) pulse() 0]; //y axis
+clf;
+subplot(211);
+plot2d(f,V2,[5],rect=[0,0,240,2])
+xtitle('Spectral diagram','f,MHz','V2(f)');
+
+//for V3(f)
+f=[0:.01:11+.01]; //x axis
+V3=[zeros(0:.01:120-fLO-.01) pulse() 0]; //y axis
+subplot(212);
+plot2d(f,V3,[5],rect=[0,0,20,2])
+xtitle('Spectral Diagram','f,MHz','V3(f)');
diff --git a/2414/CH5/EX5.7/Ex5_7.sce b/2414/CH5/EX5.7/Ex5_7.sce new file mode 100755 index 000000000..8483b7118 --- /dev/null +++ b/2414/CH5/EX5.7/Ex5_7.sce @@ -0,0 +1,37 @@ +clc;
+clear all;
+//page no 158
+//prob no. 5.7
+
+fLO=40; //MHz
+//function for ascending pulse
+function V=pulse_a()
+ V=[]
+ for i=1:.005:2
+ V=[V i]
+ end
+endfunction
+//function for descending pulse
+function V=pulse_d()
+ V=[]
+ for i=2:-.005:1
+ V=[V i]
+ end
+endfunction
+
+//for V2(f)
+f=[0:.01:48+.01]; //x axis
+
+V2=[zeros(0:.01:-8+fLO-.01) pulse_d() zeros(-6+fLO+.01:.01:6+fLO-.01) pulse_a() 0]; //y axis
+clf;
+subplot(211);
+plot2d(f,V2,[5],rect=[0,0,50,2])
+xtitle('Spectral diagram','f,MHz','V2(f)');
+
+//for V3(f)
+f=[0:.01:48+.01]; //x axis
+
+V3=[zeros(0:.01:6+fLO-.01) pulse_a() 0]; //y axis
+subplot(212);
+plot2d(f,V3,[5],rect=[0,0,50,2])
+xtitle('Spectral Diagram','f,MHz','V3(f)');
diff --git a/2414/CH5/EX5.8/Ex5_8.sce b/2414/CH5/EX5.8/Ex5_8.sce new file mode 100755 index 000000000..f94fa74e2 --- /dev/null +++ b/2414/CH5/EX5.8/Ex5_8.sce @@ -0,0 +1,38 @@ +clc;
+clear all;
+//page no 159
+//prob no. 5.8
+
+//function for ascending pulse
+function V=pulse_a()
+ V=[]
+ for i=1:.005:1.5
+ V=[V i]
+ end
+endfunction
+//function for descending pulse
+function V=pulse_d()
+ V=[]
+ for i=1.5:-.005:1
+ V=[V i]
+ end
+endfunction
+fLO=200-10;
+
+//for fLO=190 MHz
+f=[0:.01:10.5+.01]; //x axis
+
+V=[zeros(0:.01:199.5-fLO-.01) pulse_a() 0]; //y axis
+clf;
+subplot(211);
+plot2d(f,V,[5],rect=[0,0,12,2])
+xtitle('Spectral diagram:for fLO=190','f,MHz','V(f)');
+
+//for fLO=210
+fLO=200+10; //MHz
+f=[0:.01:10.5+.01]; //x axis
+
+V=[zeros(0:.01:-200.5+fLO-.01) pulse_d() 0]; //y axis
+subplot(212);
+plot2d(f,V,[5],rect=[0,0,12,2])
+xtitle('Spectral Diagram:for fLO=210','f,MHz','V(f)');
diff --git a/2414/CH5/EX5.9/Ex5_9.sce b/2414/CH5/EX5.9/Ex5_9.sce new file mode 100755 index 000000000..57b70731e --- /dev/null +++ b/2414/CH5/EX5.9/Ex5_9.sce @@ -0,0 +1,52 @@ +clc;
+clear all;
+//page no 160
+//prob no. 5.9
+
+//function for ascending pulse
+function V=pulse_a()
+ V=[]
+ for i=1:.005:1.5
+ V=[V i]
+ end
+endfunction
+//function for descending pulse
+function V=pulse_d()
+ V=[]
+ for i=1.5:-.005:1
+ V=[V i]
+ end
+endfunction
+//plots of page 161
+//spectrum at point 1
+f1=[17.5-.01:.01:20.5+.01]; //x axis
+
+V1=[0 pulse_d() zeros(18.5+.01:.01:19.5-.01) pulse_a() 0]; //y axis
+clf;
+subplot(221);
+plot2d(f1,V1,[5],rect=[17,0,21,2])
+xtitle('Spectrum at Point 1','f,MHz','');
+
+//spectrum at point 2
+f2=[17.5-.01:.01:20.5+.01]; //x axis
+
+V2=[0 zeros(17.5:.01:19.5-.01) pulse_a() 0]; //y axis
+subplot(222);
+plot2d(f2,V2,[5],rect=[17,0,21,2])
+xtitle('Spectrum at Point 2','f,MHz','');
+
+//spectrum at point 3
+f3=[359.5-.01:.01:400.5+.01]; //x axis
+
+V3=[0 pulse_d() zeros(360.5+.01:.01:399.5-.01) pulse_a() 0]; //y axis
+subplot(223);
+plot2d(f3,V3,[5],rect=[359,0,401,2])
+xtitle('Spectrum at Point 3','f,MHz','');
+
+//spectrum at point 4
+f4=[359.5-.01:.01:400.5+.01]; //x axis
+
+V4=[0 zeros(359.5:.01:399.5-.01) pulse_a() 0]; //y axis
+subplot(224);
+plot2d(f4,V4,[5],rect=[359,0,401,2])
+xtitle('Spectrum at Point 4','f,MHz','');
diff --git a/2414/CH6/EX6.1/Ex6_1.sce b/2414/CH6/EX6.1/Ex6_1.sce new file mode 100755 index 000000000..2607bd457 --- /dev/null +++ b/2414/CH6/EX6.1/Ex6_1.sce @@ -0,0 +1,11 @@ +clc;
+//page no 186
+//prob no. 6.1
+//All frequencies in kHz
+fc=1*10^3; //in kHz
+W=15;
+DSBl=fc-W; //lowest freq of DSB signal
+DSBh=fc+W; //highest freq of DSB signal
+disp(DSBh,'to',DSBl,'(a) The range of freq is from ');
+BT=2*W;
+disp(BT,'(b) Transmission bandwidth is ');
diff --git a/2414/CH6/EX6.10/Ex6_10.sce b/2414/CH6/EX6.10/Ex6_10.sce new file mode 100755 index 000000000..61e11d4bd --- /dev/null +++ b/2414/CH6/EX6.10/Ex6_10.sce @@ -0,0 +1,9 @@ +clc;
+close();
+//page no 201
+//prob no. 6.10
+//All voltage in V
+Ratio=.5/2; // Ratio=Vmin/Vmax
+m=(1-Ratio)/(1+Ratio); //modulation factor
+disp(m,'The modulation factor is ');
+disp(m*100,'The %age modulation is ');
diff --git a/2414/CH6/EX6.11/Ex6_11.sce b/2414/CH6/EX6.11/Ex6_11.sce new file mode 100755 index 000000000..926d93da0 --- /dev/null +++ b/2414/CH6/EX6.11/Ex6_11.sce @@ -0,0 +1,17 @@ +clc;
+close();
+//page no 201
+//prob no. 6.11
+//All voltage in V
+function {As]=sideband_amplitude(m,A)
+ As=m*A/2; //As:sideband amplitude
+ //m:modulation factor
+ //A:carrier amplitude
+endfunction
+A=10;
+m=0;
+disp(sideband_amplitude(m,A),'(a) For m=0, sideband amplitude is ');
+m=0.5;
+disp(sideband_amplitude(m,A),'(b) For m=0.5, sideband amplitude is ');
+m=1;
+disp(sideband_amplitude(m,A),'(c) For m=1, sideband amplitude is ');
diff --git a/2414/CH6/EX6.12/Ex6_12.sce b/2414/CH6/EX6.12/Ex6_12.sce new file mode 100755 index 000000000..7432cfa9e --- /dev/null +++ b/2414/CH6/EX6.12/Ex6_12.sce @@ -0,0 +1,15 @@ +clc;
+close();
+//page no 203
+//prob no. 6.12
+fc=455; //in kHz
+Tc=(1/fc)*10^3; //in micro sec
+disp('micro s',Tc,'(a) The carrier period is');
+tau=10*Tc; //in micro sec
+disp('micro s',tau,'The time constant is selected 10Tc:');
+C=0.01*10^-6; //in F
+R=(tau*10^-6)/C; //ohm
+disp('ohm',R,'R is determined');
+W=5; //in kHz
+Tm=1/W*10^3; //micro sec
+disp('micro sec',Tm,'The shortest modulation period Tm=');
diff --git a/2414/CH6/EX6.14/Ex6_14.sce b/2414/CH6/EX6.14/Ex6_14.sce new file mode 100755 index 000000000..fc79a36de --- /dev/null +++ b/2414/CH6/EX6.14/Ex6_14.sce @@ -0,0 +1,10 @@ +clc;
+close();
+//page no 208
+//prob no. 6.14
+A=200; // in Volts
+R=50; //in ohm
+P=A^2/(4*R); //in W
+disp('W',P,'(a) The sverage power is ');
+Pp=A^2/(2*R); //in W
+disp('W',Pp,'(b) The peak envelop power is ');
diff --git a/2414/CH6/EX6.15/Ex6_15.sce b/2414/CH6/EX6.15/Ex6_15.sce new file mode 100755 index 000000000..7547dafd4 --- /dev/null +++ b/2414/CH6/EX6.15/Ex6_15.sce @@ -0,0 +1,10 @@ +clc;
+close();
+//page no 208
+//prob no. 6.15
+P=1000; //in watts
+R=50; //in ohm
+Vrms=sqrt(R*P); //in V
+Irms=sqrt(P/R); //in A
+disp('V',Vrms,'The unmodulated rms carrier voltage is ');
+disp('A',Irms,'The unmodulated rms carrier current is ');
diff --git a/2414/CH6/EX6.16/Ex6_16.sce b/2414/CH6/EX6.16/Ex6_16.sce new file mode 100755 index 000000000..f8f27162d --- /dev/null +++ b/2414/CH6/EX6.16/Ex6_16.sce @@ -0,0 +1,30 @@ +clc;
+close();
+//page no 209
+//prob no. 6.16
+//All power in Watts
+global('Pc')
+Pc=1000;
+funcprot(0) //to avoid function warnings
+function [P]=avg_P(m) //function for total average power
+ P=(1+(m^2/2))*Pc;
+endfunction
+function [Pp]=peak_P(m) //function for peak power
+ Pp=(1+m)^2*Pc;
+endfunction
+function [Psb]=SB_P(m) //function for SB power
+ Psb=avg_P(m)-Pc;
+endfunction
+function display(m) //function for displaying table
+ table=[m*100 avg_P(m) peak_P(m) SB_P(m)];
+ disp(table);
+endfunction
+
+disp('Summary for the result is displayed in the table ');
+disp('Mod^n_% Avg_Pwr Peak_Pwr SB_Pwe');
+m=0; //for m=0
+display(m);
+m=0.5; //for m=0.5
+display(m);
+m=1; //for m=1
+display(m);
diff --git a/2414/CH6/EX6.17/Ex6_17.sce b/2414/CH6/EX6.17/Ex6_17.sce new file mode 100755 index 000000000..ce0757a33 --- /dev/null +++ b/2414/CH6/EX6.17/Ex6_17.sce @@ -0,0 +1,18 @@ +clc;
+close();
+//page no 210
+//prob no. 6.17
+//All power in Watts
+//All voltage in volts
+//All current in ampere
+R=50;
+m=0.5;
+P=1125; //for m=0.5
+Vrms=sqrt(R*P);
+Irms=sqrt(P/R);
+disp('A',Irms,'V',Vrms,'(a) For m=0.5, Vrms and Irms are:');
+m=1;
+P=1500; //For m=1
+Vrms=sqrt(R*P);
+Irms=sqrt(P/R);
+disp('A',Irms,'V',Vrms,'(b) For m=1, Vrms and Irms are:');
diff --git a/2414/CH6/EX6.2/Ex6_2.sce b/2414/CH6/EX6.2/Ex6_2.sce new file mode 100755 index 000000000..4d714ef64 --- /dev/null +++ b/2414/CH6/EX6.2/Ex6_2.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 186
+//prob no. 6.2
+//All frequencies in kHz
+fi=250; //input freq
+LSB=[fi-1;fi-3;fi-5];
+USB=[fi+1;fi+3;fi+5];
+disp(LSB,'and LSB:',USB,'(a) The upper sideband and lower sideband ,USB:' );
+BT=2*5;
+disp(BT,'The net transmission bandwidth is ');
+
diff --git a/2414/CH6/EX6.3/Ex6_3.sce b/2414/CH6/EX6.3/Ex6_3.sce new file mode 100755 index 000000000..9f7309ddf --- /dev/null +++ b/2414/CH6/EX6.3/Ex6_3.sce @@ -0,0 +1,12 @@ +clc;
+//page no 190
+//prob no. 6.3
+//All frequencies in kHz
+fc=1*10^3; //in kHz
+W=15;
+LSBl=fc-W; //lowest freq of LSB
+USBh=fc+W; //highest freq of USB
+disp(fc,'to',LSBl,'(a) The range of freq(in kHz) for LSB is from ');
+disp(USBh,'to',fc,'(b) The range of freq(in kHz) for USB is from ');
+BT=W;
+disp(BT,'(b) Transmission bandwidth is ');
diff --git a/2414/CH6/EX6.4/Ex6_4.sce b/2414/CH6/EX6.4/Ex6_4.sce new file mode 100755 index 000000000..5b2fffbd4 --- /dev/null +++ b/2414/CH6/EX6.4/Ex6_4.sce @@ -0,0 +1,13 @@ +clc;
+//page no 190
+//prob no. 6.4
+//All frequencies in kHz
+fi=250; //input freq
+LSB=[fi-1 fi-3 fi-5];
+USB=[fi+1 fi+3 fi+5];
+disp(LSB,'(a) For LSB transmission freq are' );
+disp(USB,'(b) For USB transmission freq are' );
+W=5;
+BT=W;
+disp(BT,'(c) The transmission bandwidth is ');
+
diff --git a/2414/CH6/EX6.5/Ex6_5.sce b/2414/CH6/EX6.5/Ex6_5.sce new file mode 100755 index 000000000..6deb1a944 --- /dev/null +++ b/2414/CH6/EX6.5/Ex6_5.sce @@ -0,0 +1,13 @@ +clc;
+//page no 195
+//prob no. 6.5
+//All frequencies in kHz
+//refer Ex 6.4
+fi=250; //input freq
+LSB=[fi-1 fi-3 fi-5]; //from Ex 6.4
+//
+fc=250; //carrier freq
+f0sum=fc+LSB;
+f0diff=fc-LSB;
+disp(f0sum,f0diff,'(a) The output frequencies (in kHz) are ');
+disp(f0diff,'(b) At low pass filter,the actual frequencies (in kHz) are ');
diff --git a/2414/CH6/EX6.6/Ex6_6.sce b/2414/CH6/EX6.6/Ex6_6.sce new file mode 100755 index 000000000..af6628a53 --- /dev/null +++ b/2414/CH6/EX6.6/Ex6_6.sce @@ -0,0 +1,13 @@ +clc;
+//page no 195
+//prob no. 6.6
+//All frequencies in kHz
+fi=250; //input freq
+USB=[fi+1 fi+3 fi+5]; //from Ex 6.4
+//
+fc=250; //carrier freq
+f0sum=fc+USB;
+f0diff=USB-fc;
+disp(f0sum,f0diff,'(a) The output frequencies (in kHz) are ');
+disp(f0diff,'(b) At low pass filter,the actual frequencies (in kHz) are ');
+
diff --git a/2414/CH6/EX6.7/Ex6_7.sce b/2414/CH6/EX6.7/Ex6_7.sce new file mode 100755 index 000000000..051b6766b --- /dev/null +++ b/2414/CH6/EX6.7/Ex6_7.sce @@ -0,0 +1,13 @@ +clc;
+//page no 195
+//prob no. 6.7
+//All frequencies in kHz
+//refer Ex 6.4
+fi=250; //input freq
+LSB=[fi-1 fi-3 fi-5]; //from Ex 6.7
+//
+fc=250.1; //carrier freq
+f0sum=fc+LSB;
+f0diff=fc-LSB;
+disp(f0sum,f0diff,'(a) The output frequencies (in kHz) are ');
+disp(f0diff,'(b) At low pass filter,the frequencies (in kHz) are ');
diff --git a/2414/CH6/EX6.8/Ex6_8.sce b/2414/CH6/EX6.8/Ex6_8.sce new file mode 100755 index 000000000..056c00494 --- /dev/null +++ b/2414/CH6/EX6.8/Ex6_8.sce @@ -0,0 +1,12 @@ +clc;
+close();
+//page no 200
+//prob no. 6.8
+//All frequencies in kHz
+fc=250; //carrier freq
+LSB=[fc-1 fc-3 fc-5];
+USB=[fc+1 fc+3 fc+5];
+disp(fc,'carrier:',USB,'USB:',LSB,'(a) The spectrum contains following freq.LSB:' );
+W=5;
+BT=2*W;
+disp(BT,'The transmission bandwidth is ');
diff --git a/2414/CH6/EX6.9/Ex6_9.sce b/2414/CH6/EX6.9/Ex6_9.sce new file mode 100755 index 000000000..1d4f1dc4b --- /dev/null +++ b/2414/CH6/EX6.9/Ex6_9.sce @@ -0,0 +1,10 @@ +clc;
+close();
+//page no 200
+//prob no. 6.9
+//All voltage in V
+m=0.6; //modulation factor
+A=100; //peak carrier level (in V)
+Vmax=A*(1+m);
+Vmin=A*(1-m);
+disp(Vmin,'Vmin:',Vmax,'Vmax:','The maximum and minimum values of positive envelope is')
diff --git a/2414/CH7/EX7.1/Ex7_1.sce b/2414/CH7/EX7.1/Ex7_1.sce new file mode 100755 index 000000000..9b386456b --- /dev/null +++ b/2414/CH7/EX7.1/Ex7_1.sce @@ -0,0 +1,19 @@ +clc;
+close();
+//page no 227
+//prob no. 7.1
+t=linspace(0,20);
+function {theta]=theta(t) //function for instantanious phase
+ theta=3*%pi*t^2;
+endfunction
+function {fs]=frequency(t) //function for instantanious phase
+ Ws=6*%pi*t;
+ fs=Ws/(2*%pi);
+endfunction
+subplot(2,1,1)
+plot(t,theta,1);
+xtitle('Plot1:Instantanious signal phase','t','theta',1);
+fs=frequency(t);
+subplot(2,1,2)
+plot(t,fs,2);
+xtitle('Plot2:Frequency','t','fs',1);
diff --git a/2414/CH7/EX7.10/Ex7_10.sce b/2414/CH7/EX7.10/Ex7_10.sce new file mode 100755 index 000000000..e90f17699 --- /dev/null +++ b/2414/CH7/EX7.10/Ex7_10.sce @@ -0,0 +1,10 @@ +clc;
+close();
+//page no 238
+//prob no. 7.10
+delta_f=6; //kHz
+W=2; //kHz
+D=delta_f/W; //deviation ratio
+disp(D,'The deviation ratio is');
+Bt=2*(delta_f+W); //carsom's rule is applicable
+mprintf('The transmission bandwidth Bt= %i kHz ',Bt)
diff --git a/2414/CH7/EX7.11/Ex7_11.sce b/2414/CH7/EX7.11/Ex7_11.sce new file mode 100755 index 000000000..cf32fb23c --- /dev/null +++ b/2414/CH7/EX7.11/Ex7_11.sce @@ -0,0 +1,9 @@ +clc;
+clear all;
+close();
+//page no 239
+//prob no. 7.11
+W=2; //kHz (as in ex 7.10)
+delta_theta=3;
+Bt=2*(1+delta_theta)*W; //applying carsom's rule
+mprintf('The transmission bandwidth Bt= %i kHz ',Bt)
diff --git a/2414/CH7/EX7.12/Ex7_12.sce b/2414/CH7/EX7.12/Ex7_12.sce new file mode 100755 index 000000000..1ec38c228 --- /dev/null +++ b/2414/CH7/EX7.12/Ex7_12.sce @@ -0,0 +1,26 @@ +clc;
+close();
+//page no 239
+//prob no. 7.12
+delta_f=75; //kHz
+fm=[.025 .075 .75 1.5 5 10 15] //in kHz
+function B=Beta(fm,delta_f)
+B=delta_f *(1 ./fm);
+endfunction
+function Bt=Bandwidth(fm,delta_f)
+Bt(1:3) = 2 *delta_f;
+for i=4:7
+ Bt(i) = 2 *(delta_f + fm(i));
+end
+endfunction
+B=Beta(fm,delta_f);
+Bt=Bandwidth(fm,delta_f); //applying carsom's rule
+disp('Table - 7.2');
+disp('fm(kHz) Beta Bt(kHz)');
+for i=1:7
+mprintf('%4.3f ',fm(i));
+mprintf('%4.1f ',B(i));
+mprintf('%i\n',Bt(i));
+end
+plot(fm,Bt);
+xtitle('Bandwidth of FM','fm,kHz','Bt,kHz')
diff --git a/2414/CH7/EX7.13/Ex7_13.sce b/2414/CH7/EX7.13/Ex7_13.sce new file mode 100755 index 000000000..720024772 --- /dev/null +++ b/2414/CH7/EX7.13/Ex7_13.sce @@ -0,0 +1,11 @@ +clc;
+close();
+//page no 240
+//prob no. 7.13
+delta_f=75; //kHz
+fm=[.025 .075 .75 1.5 5 10 15] //in kHz (From prob-7.12)
+delta_theta=delta_f/fm(7);
+Bt=12*fm; //applying carsom's rule
+disp(delta_theta,'Delta theta=');
+plot(fm,Bt);
+xtitle('Bandwidth of PM','fm,kHz','Bt,kHz')
diff --git a/2414/CH7/EX7.14/Ex7_14.sce b/2414/CH7/EX7.14/Ex7_14.sce new file mode 100755 index 000000000..45caf1c37 --- /dev/null +++ b/2414/CH7/EX7.14/Ex7_14.sce @@ -0,0 +1,14 @@ +clc;
+close();
+//page no 242
+//prob no. 7.14
+delta_f1=2; //kHz
+fc1=100; //kHz
+W=5; //kHz
+fc2=3*fc1;
+disp(fc2,'(a) The output center frequency =');
+delta_f2=3*delta_f1;
+disp(delta_f2,'(b) The output frequency deviation=');
+D1=delta_f1/W;
+D2=3*D1;
+disp(D2,'(c) The output deviation ratio =');
diff --git a/2414/CH7/EX7.16/Ex7_16.sce b/2414/CH7/EX7.16/Ex7_16.sce new file mode 100755 index 000000000..76b979028 --- /dev/null +++ b/2414/CH7/EX7.16/Ex7_16.sce @@ -0,0 +1,16 @@ +clc;
+close();
+//page no 248
+//prob no. 7.16
+Kf=4; //kHz/V
+f0=100; //kHz
+// Part a
+vm=2; //Volts
+delta_f=Kf*vm; //kHz
+f=f0+delta_f; //kHz
+disp(f,'Corresponding frequwncy to this input is',delta_f,'(a) The change in frequency is');
+//Part b
+vm=-3; //Volts
+delta_f=Kf*vm; //kHz
+f=f0+delta_f; //kHz
+disp(f,'Corresponding frequwncy to this input is',delta_f,'(b) In this case,the change in frequency is');
diff --git a/2414/CH7/EX7.17/Ex7_17.sce b/2414/CH7/EX7.17/Ex7_17.sce new file mode 100755 index 000000000..35baec034 --- /dev/null +++ b/2414/CH7/EX7.17/Ex7_17.sce @@ -0,0 +1,49 @@ +clc;
+close();
+clear();
+//page no 248
+//prob no. 7.17
+//All frequencies in kHz
+fci=100; //basic center frequency
+fco=100000; //output center frequency
+delta_f=(3000/3072)*0.025; //maximum frequency deviation at modulator
+W=15;
+D=delta_f/W;
+Bt=2*W;
+table_row1=[fci delta_f D Bt]; //At point A
+function [table]=table(table_row,multiplier)
+ table= [table_row(1:3)*multiplier ,table_row(4)]
+
+endfunction
+table_row2=[table(table_row1,4)]; //at point B
+table_row3=[table(table_row2,4)]; //at point C
+table_row4=[table(table_row3,4)]; //at point D
+
+function [table1]=table1(table_row,multiplier)
+ table1(1:3)= [table_row(1:3)*multiplier];
+ Bt=2*(table1(2)+W); //Applying carsons rule Bt=2*(delta_f+W)
+ table1(4)= [Bt];
+
+endfunction
+table_row5=[table1(table_row4,3)]; //at point E ,carsons rule applied from here
+table_row6=[(fco/16) table_row5(2:4)]; //at point F ,center frequency after mixer
+table_row7=[table1(table_row6,4)]; //at point G
+table_row8=[table1(table_row7,4)]; //at point H
+table_row9=table_row8; //at point I
+disp('Point fc delta_f D Bt');
+function display(Point,t_row)
+ mprintf(" %c %8.0i",Point,t_row(1));
+ for i=2:4
+ mprintf(" %3.4f",t_row(i));
+end
+mprintf("\n")
+endfunction
+display('A',table_row1());
+display('B',table_row2());
+display('C',table_row3());
+display('D',table_row4());
+display('E',table_row5());
+display('F',table_row6());
+display('G',table_row7());
+display('H',table_row8());
+display('I',table_row9());
diff --git a/2414/CH7/EX7.18/Ex7_18.sce b/2414/CH7/EX7.18/Ex7_18.sce new file mode 100755 index 000000000..59de9d180 --- /dev/null +++ b/2414/CH7/EX7.18/Ex7_18.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 258
+//prob no. 7.18
+//All frequencies in kHz
+Kd=2; //V/kHz
+fc=100;
+// part a
+f=102.5;
+delta_f=f-fc;
+vd=Kd*delta_f; //V
+disp(vd,'(a) The first case result is');
+// part b
+f=98.5;
+delta_f=f-fc;
+vd=Kd*delta_f; //V
+disp(vd,'(a) The second case result is');
diff --git a/2414/CH7/EX7.19/Ex7_19.sce b/2414/CH7/EX7.19/Ex7_19.sce new file mode 100755 index 000000000..d2446049d --- /dev/null +++ b/2414/CH7/EX7.19/Ex7_19.sce @@ -0,0 +1,28 @@ +clc;
+close();
+clear();
+//page no 261
+//prob no. 7.19
+//All frequencies in Hz
+D=5; //deviation ratio
+fc=[400 560 730 960]; //Center frequency
+delta_f=0.075 .*fc; //frequency deviation
+W=delta_f ./D ; //modulating frequency
+Bt=2 .*(delta_f + W); //Bandwidth
+fl=fc - Bt/2; //Lower frequency
+fh=fc + Bt/2; //Higher frequency
+figure
+x=[301:1100];
+y=[1.5];
+y=[y zeros(302:fl(1))]
+for i=1:3
+y=[y ones(fl(i):fh(i))];
+y=[y zeros(fh(i)+1:fl(i+1))];
+end
+y=[y ones(fl(4):fh(4))];
+y=[y zeros(fh(4):1100)];
+plot(x,y);
+xtitle('Composite baseband spectrum','f,Hz');
+delta_frt=D*1046;
+Brt=2*(delta_frt+1046);
+disp('Hz',Brt,'(b) The RF transmission bandwidth is ');
diff --git a/2414/CH7/EX7.2/Ex7_2.sce b/2414/CH7/EX7.2/Ex7_2.sce new file mode 100755 index 000000000..b65001eb1 --- /dev/null +++ b/2414/CH7/EX7.2/Ex7_2.sce @@ -0,0 +1,19 @@ +clc;
+close();
+//page no 230
+//prob no. 7.2
+//v(t)=80*cos[(2*%pi*10^8*t)+20*sin(2*%pi*10^3*t)] --eq
+//v(t)=A*cos[Wc*t+Bsin(Wm*t)] --eq7-27
+//comparing the above 2 equations we get
+A=80; //volts
+fc=10^8; //Hz
+fm=10^3; //Hz
+B=20;
+disp('Hz',fc,'(a) The carrier cyclic frequency is ');
+disp('Hz',fm,'(b) The modulating frequency is ');
+disp(B,'(c) The modulation index is ');
+delta_f=B*fm;
+disp('Hz',delta_f,'(d) The frequency deviation is ');
+R=50; //ohm
+P=A^2/(2*R);
+disp('W',P,'(e) The average power is ');
diff --git a/2414/CH7/EX7.3/Ex7_3.sce b/2414/CH7/EX7.3/Ex7_3.sce new file mode 100755 index 000000000..4051e54a7 --- /dev/null +++ b/2414/CH7/EX7.3/Ex7_3.sce @@ -0,0 +1,9 @@ +clc;
+close();
+//page no 230
+//prob no. 7.3
+//from ex 7.2
+//v(t)=80*cos[(2*%pi*10^8*t)+20*sin(2*%pi*10^3*t)] --eq
+B=20;
+delta_theta=B; //for PM
+disp(delta_theta,'The maximum phase deviation for PM is ');
diff --git a/2414/CH7/EX7.4/Ex7_4.sce b/2414/CH7/EX7.4/Ex7_4.sce new file mode 100755 index 000000000..be616f471 --- /dev/null +++ b/2414/CH7/EX7.4/Ex7_4.sce @@ -0,0 +1,6 @@ +clc;
+close();
+//page no 231
+//prob no. 7.4
+disp('The equation becomes');
+disp('v(t)=80*cos[(2*%pi*10^8*t)+10*sin(4*%pi*10^3*t)]');
diff --git a/2414/CH7/EX7.5/Ex7_5.sce b/2414/CH7/EX7.5/Ex7_5.sce new file mode 100755 index 000000000..8c357757a --- /dev/null +++ b/2414/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,6 @@ +clc;
+close();
+//page no 231
+//prob no. 7.5
+disp('The equation becomes');
+disp('v(t)=80*cos[(2*%pi*10^8*t)+20*sin(4*%pi*10^3*t)]');
diff --git a/2414/CH7/EX7.6/Ex7_6.sce b/2414/CH7/EX7.6/Ex7_6.sce new file mode 100755 index 000000000..debe8bd80 --- /dev/null +++ b/2414/CH7/EX7.6/Ex7_6.sce @@ -0,0 +1,9 @@ +clc;
+close();
+//page no 231
+//prob no. 7.6
+delta_f=12; //kHz
+fm=4; //kHz
+B=delta_f/fm; //modulating index for FM
+disp('The expression is');
+mprintf('v(t)=A*cos[(2*pi*10^8*t)+%i*sin(%i*2*pi*10^3*t)]',B,fm);
diff --git a/2414/CH7/EX7.7/Ex7_7.sce b/2414/CH7/EX7.7/Ex7_7.sce new file mode 100755 index 000000000..b16964ff5 --- /dev/null +++ b/2414/CH7/EX7.7/Ex7_7.sce @@ -0,0 +1,8 @@ +clc;
+close();
+//page no 231
+//prob no. 7.7
+delta_theta=6; //kHz
+fm=5; //kHz
+disp('The expression is');
+mprintf('v(t)=A*cos[(2*pi*10^8*t)+%i*sin(%i*2*pi*10^3*t)]',delta_theta,fm);
diff --git a/2414/CH7/EX7.8/Ex7_8.sce b/2414/CH7/EX7.8/Ex7_8.sce new file mode 100755 index 000000000..c3030c30d --- /dev/null +++ b/2414/CH7/EX7.8/Ex7_8.sce @@ -0,0 +1,11 @@ +clc;
+close();
+//page no 235
+//prob no. 7.8
+delta_f=400; //Hz
+fm=2000; //Hz
+B=delta_f/fm; //
+disp(B,'The modulation index is');
+disp('(For B<=2.5 , the signal is NBFM)');
+Bt=2*fm;
+mprintf('The transmission bandwidth Bt= %i Hz ',Bt)
diff --git a/2414/CH7/EX7.9/Ex7_9.sce b/2414/CH7/EX7.9/Ex7_9.sce new file mode 100755 index 000000000..f930b8725 --- /dev/null +++ b/2414/CH7/EX7.9/Ex7_9.sce @@ -0,0 +1,11 @@ +clc;
+close();
+//page no 235
+//prob no. 7.9
+delta_f=8000; //Hz
+fm=100; //Hz
+B=delta_f/fm; //
+disp(B,'The modulation index is');
+disp('(For B>=50 , the signal is VWBFM)');
+Bt=2*delta_f;
+mprintf('The transmission bandwidth Bt= %i Hz ',Bt)
diff --git a/2414/CH8/EX8.1/Ex8_1.sce b/2414/CH8/EX8.1/Ex8_1.sce new file mode 100755 index 000000000..bfd1aa90e --- /dev/null +++ b/2414/CH8/EX8.1/Ex8_1.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 277
+//prob no. 8.1
+W=5000; //Hz
+fs=2*W;
+mprintf('(a) The minimum sampling rate is %i samples per second.\n',fs);
+T=1/fs; //second
+mprintf(' (b) Maximum interval between samples is %f seconds',T);
diff --git a/2414/CH8/EX8.2/Ex8_2.sce b/2414/CH8/EX8.2/Ex8_2.sce new file mode 100755 index 000000000..b66107c9d --- /dev/null +++ b/2414/CH8/EX8.2/Ex8_2.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 277
+//prob no. 8.2
+W=5000; //Hz
+fs=1.25*2*W;
+mprintf('(a) The sampling rate is %i Hz.\n',fs);
+T=1/fs; //second
+mprintf('(b) Maximum interval between samples is %f seconds',T);
diff --git a/2414/CH8/EX8.3/Ex8_3.sce b/2414/CH8/EX8.3/Ex8_3.sce new file mode 100755 index 000000000..4335d5865 --- /dev/null +++ b/2414/CH8/EX8.3/Ex8_3.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 277
+//prob no. 8.3
+W=5000; //Hz
+fs=1.25*2*W;
+tp=30*60; //seconds
+N=fs*tp; //samples
+mprintf('Total number of samples is %i ',N);
diff --git a/2414/CH8/EX8.5/Ex8_5.sce b/2414/CH8/EX8.5/Ex8_5.sce new file mode 100755 index 000000000..930e5af5d --- /dev/null +++ b/2414/CH8/EX8.5/Ex8_5.sce @@ -0,0 +1,18 @@ +clc;
+close();
+clear();
+//page no 281
+//prob no. 8.5
+//All frequencies in kHz
+f=1;
+T=0.1; //ms
+fs=1/T;
+mprintf('The positive frequencies below 45 kHz are \n %i\n ',f);
+for i=1:1:100
+ x=fs*i; //x is a variable
+ if((x+f) < 45)
+ mprintf('%i ,%i\n',x-f,x+f);
+ else
+ break();
+ end
+end
diff --git a/2414/CH8/EX8.6/Ex8_6.sce b/2414/CH8/EX8.6/Ex8_6.sce new file mode 100755 index 000000000..c4070aae9 --- /dev/null +++ b/2414/CH8/EX8.6/Ex8_6.sce @@ -0,0 +1,37 @@ +clc;
+close();
+clear();
+//page no 284
+//prob no. 8.6
+//All time in milli second
+//All frequencies in kHz
+fs=5;
+tau=0.04; //ms
+T=1/fs; //ms
+d=tau/T;
+// for plot
+f=[-2:.1:28-.1];
+Pn1=[ones(1,50)];
+Pn=[Pn1];
+for i=1:5
+ Pn=[Pn Pn1*(1-d*i)];
+end
+ps1=[ones(1,20)];
+for i=1:10
+ ps1=[1-i*0.1 ps1 1-i*0.1];
+end
+ps1=[ps1 zeros(1:10)];
+ps=[ps1];
+for i=1:5
+ ps=[ps ps1];
+end
+Vs=ps.*Pn;
+clf;
+plot2d(f,Vs,[5]);
+xtitle('(a) Spectrum of signal after sampling','$f,kHz$','$Vs(f)$');
+K1=0.5;
+Bt=K1/tau;
+mprintf('(b) Bandwidth required for K1=%i is %0.1f kHz\n',K1,Bt);
+K1=1;
+Bt=K1/tau;
+mprintf('Bandwidth required for K1=%i is %i kHz',K1,Bt);
diff --git a/2414/CH8/EX8.7/Ex8_7.sce b/2414/CH8/EX8.7/Ex8_7.sce new file mode 100755 index 000000000..c5d296458 --- /dev/null +++ b/2414/CH8/EX8.7/Ex8_7.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 288
+//prob no. 8.7
+//All frequencies in kHz
+k=7;
+W=1;
+Bt=k*W;
+printf('Minimum Bandwidth is %i kHz',Bt);
diff --git a/2414/CH8/EX8.8/Ex8_8.sce b/2414/CH8/EX8.8/Ex8_8.sce new file mode 100755 index 000000000..8d220c9ce --- /dev/null +++ b/2414/CH8/EX8.8/Ex8_8.sce @@ -0,0 +1,17 @@ +clc;
+close();
+clear();
+//page no 288
+//prob no. 8.8
+//All frequencies in kHz
+W=1;
+fs=1.25*2*W;
+Tf=1/fs;
+mprintf('(a) The sampling rate is %.1f kHz\n',fs);
+mprintf('The frame time is %.1f ms\n',Tf);
+tau=Tf/16; //ms
+Bt=0.5/tau;
+mprintf('The pulse width is %i micro second\n',tau*10^3);
+mprintf('The composite baseband bandwidth is %i kHz\n',Bt);
+Bt=2*Bt;
+mprintf('(b) The RF bandwidth is %i kHz\n',Bt);
diff --git a/2414/CH8/EX8.9/Ex8_9.sce b/2414/CH8/EX8.9/Ex8_9.sce new file mode 100755 index 000000000..35e05e0d7 --- /dev/null +++ b/2414/CH8/EX8.9/Ex8_9.sce @@ -0,0 +1,15 @@ +clc;
+close();
+clear();
+//page no 290
+//prob no. 8.9
+//All frequencies in kHz
+W=10;
+fs=2*W;
+Tf=1/fs;
+mprintf('(a) The minimum sampling rate is %i kHz\n',fs);
+mprintf('The frame time is %i micro second\n',Tf*10^3);
+tr=0.01*Tf //ms
+Bt=0.5/tr;
+mprintf('The maximum rise time is %.1f micro second\n',tr*10^3);
+mprintf('The approximate transmission bandwidth is %i kHz\n',Bt);
diff --git a/2414/CH9/EX9.1/Ex9_1.sce b/2414/CH9/EX9.1/Ex9_1.sce new file mode 100755 index 000000000..79ff2718e --- /dev/null +++ b/2414/CH9/EX9.1/Ex9_1.sce @@ -0,0 +1,11 @@ +clc;
+close();
+clear();
+//page no 304
+//prob no. 9.1
+bits=4;
+printf('(a) M=%i values\n',2^bits);
+bits=8;
+printf('(b) M=%i values\n',2^bits);
+bits=16;
+printf('(c) M=%i values\n',2^bits);
diff --git a/2414/CH9/EX9.10/Ex9_10.sce b/2414/CH9/EX9.10/Ex9_10.sce new file mode 100755 index 000000000..d643ccbb8 --- /dev/null +++ b/2414/CH9/EX9.10/Ex9_10.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 329
+//prob no. 9.10
+//all frequencies in kHz
+R=200; //kbits/s
+Bt=R; //kHz
+mprintf(' Bt=%ikHz',Bt);
diff --git a/2414/CH9/EX9.2/Ex9_2.sce b/2414/CH9/EX9.2/Ex9_2.sce new file mode 100755 index 000000000..455fa5f66 --- /dev/null +++ b/2414/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,7 @@ +clc;
+close();
+clear();
+//page no 304
+//prob no. 9.2
+N=log2(100);
+printf('(a) N=%.2f bits\n',N);
diff --git a/2414/CH9/EX9.3/Ex9_3.sce b/2414/CH9/EX9.3/Ex9_3.sce new file mode 100755 index 000000000..a0c9f221d --- /dev/null +++ b/2414/CH9/EX9.3/Ex9_3.sce @@ -0,0 +1,33 @@ +clc;
+close();
+clear();
+//page no 309
+//prob no. 9.3
+//input graph
+t=[0:.1:15-.1];
+y=[(1/9)*(0:.1:1)^2 (1/8)*(1.1:.1:1.9)^2.1];
+y=[y (7/8)*sin(2*%pi*t(21:150)/18.5)];
+plot(t,y);
+y=8*y;
+//quantized form
+y1=[];
+for i=1:10:150
+ for m=-7:7
+ if y(i) < m+0.5 then
+ break();
+ end
+ end
+
+ y1=[y1 m*ones(1:10)]
+end
+y1=y1./8;
+plot2d(t,y1,[5]);
+a=gca(); // Handle on axes entity
+a.x_location = "origin";
+a.y_location = "origin";
+// Some operations on entities created by plot2d ...
+a=gca();
+a.isoview='off';
+a.children // list the children of the axes
+xtitle('Analog and quantized signals','t,ms','Normalised signal level')
+xgrid()
diff --git a/2414/CH9/EX9.4/Ex9_4.sce b/2414/CH9/EX9.4/Ex9_4.sce new file mode 100755 index 000000000..36723e171 --- /dev/null +++ b/2414/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,19 @@ +clc;
+close();
+clear();
+//page no 310
+//prob no. 9.4
+N=8;
+Vfs=20; //Volts
+delta_Xu=2^-N;
+mprintf('(a) The normalised unipolar step size is %f\n ',delta_Xu);
+delta_vu=delta_Xu*Vfs;
+mprintf('(b) The actual step size is %.2f mV\n ',delta_vu*10^3);
+Xumax=1-delta_Xu;
+mprintf('(c) The normalized maximum quantized level is %f\n ',Xumax);
+vumax=Xumax*Vfs;
+mprintf('(d) The actual maximum quantized level is %f V\n ',vumax);
+Eu=delta_Xu/2;
+mprintf('(e) The normalized peak error is %f\n ',Eu);
+eu=Eu*Vfs;
+mprintf('(f) The actual peak error is %.2f mV ',eu*10^3);
diff --git a/2414/CH9/EX9.5/Ex9_5.sce b/2414/CH9/EX9.5/Ex9_5.sce new file mode 100755 index 000000000..4270ede38 --- /dev/null +++ b/2414/CH9/EX9.5/Ex9_5.sce @@ -0,0 +1,19 @@ +clc;
+close();
+clear();
+//page no 311
+//prob no. 9.5
+Vfs=10; //Volts
+N=8;
+delta_Xb=2^(-N+1);
+mprintf('(a) The normalised bipolar step size is %f\n ',delta_Xb);
+delta_vb=delta_Xb*Vfs;
+mprintf('(b) The actual step size is %.2f mV\n ',delta_vb*10^3);
+Xbmax=1-delta_Xb;
+mprintf('(c) The normalized maximum quantized level is %f\n ',Xbmax);
+vbmax=Xbmax*Vfs;
+mprintf('(d) The actual maximum quantized level is %f V\n ',vbmax);
+Eb=delta_Xb/2;
+mprintf('(e) The normalized peak error is %f\n ',Eb);
+eb=Eb*Vfs;
+mprintf('(f) The actual peak error is %.2f mV ',eb*10^3);
diff --git a/2414/CH9/EX9.6/Ex9_6.sce b/2414/CH9/EX9.6/Ex9_6.sce new file mode 100755 index 000000000..a646f280e --- /dev/null +++ b/2414/CH9/EX9.6/Ex9_6.sce @@ -0,0 +1,13 @@ +clc;
+close();
+clear();
+//page no 313
+//prob no. 9.6
+Vimax=16; //Volts
+Vomax=2; //Volts
+m=255; //meu
+vi=[2 4 8 16];
+vo=Vomax*log(1+m*vi/Vimax)/log(1+m);
+table=[vi' vo'];
+mprintf(' vi(V) vo(V)');
+disp(table);
diff --git a/2414/CH9/EX9.7/Ex9_7.sce b/2414/CH9/EX9.7/Ex9_7.sce new file mode 100755 index 000000000..e44c0e901 --- /dev/null +++ b/2414/CH9/EX9.7/Ex9_7.sce @@ -0,0 +1,20 @@ +clc;
+close();
+clear();
+//page no 319
+//prob no. 9.7
+//all time in ms
+//all frequencies in kHz
+W=5;
+N=8; //bits
+k=19+1; //word
+fs=2*W;
+mprintf('fs=%i kHz\n',fs);
+Tf=1/fs;
+mprintf(' Tf=%.1f ms\n',Tf);
+Tw=Tf/k;
+mprintf(' Tw=%i micro second\n',Tw*10^3);
+tau=Tw/N;
+mprintf(' tau=%.3f micro second\n',tau*10^3);
+Bt=0.5/tau;
+mprintf(' Bt=%ikHz',Bt);
diff --git a/2414/CH9/EX9.8/Ex9_8.sce b/2414/CH9/EX9.8/Ex9_8.sce new file mode 100755 index 000000000..c020fca1f --- /dev/null +++ b/2414/CH9/EX9.8/Ex9_8.sce @@ -0,0 +1,9 @@ +clc;
+close();
+clear();
+//page no 323
+//prob no. 9.8
+//all frequencies in kHz
+R=200; //kbits/s
+Bt=R; //kHz
+mprintf(' Bt=%ikHz',Bt);
diff --git a/2414/CH9/EX9.9/Ex9_9.sce b/2414/CH9/EX9.9/Ex9_9.sce new file mode 100755 index 000000000..094fb3fba --- /dev/null +++ b/2414/CH9/EX9.9/Ex9_9.sce @@ -0,0 +1,10 @@ +clc;
+close();
+clear();
+//page no 326
+//prob no. 9.9
+//all frequencies in kHz
+R=200; //kbits/s
+delta_f=150; //f1-f0
+Bt=delta_f+R; //kHz
+mprintf(' Bt=%ikHz',Bt);
|