diff options
Diffstat (limited to '1850')
125 files changed, 2515 insertions, 0 deletions
diff --git a/1850/CH1/EX1.1/exa_1_1.sce b/1850/CH1/EX1.1/exa_1_1.sce new file mode 100755 index 000000000..1dd6a3d60 --- /dev/null +++ b/1850/CH1/EX1.1/exa_1_1.sce @@ -0,0 +1,27 @@ +// Exa 1.1
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 10;// in volt
+V_EE= V_CC;
+V_BE= 0.715;// in volt
+R_c1= 2.7;// in k ohm
+R_c1= R_c1*10^3;// in ohm
+R_c2= R_c1;// in ohm
+R_E=3.9;// in k ohm
+R_E= R_E*10^3;// in ohm
+Bita_ac= 100;
+Bita_dc= Bita_ac;
+I_E= (V_EE-V_BE)/(2*R_E);// in amp
+I_C= I_E;// in amp
+V_C= V_CC-I_C*R_c1;// in volt
+V_E= 0-V_BE;// in volt
+V_CE= V_C-V_E;// in volt
+re_desh= 25*10^-3/I_E;
+A_d= R_c1/re_desh;
+disp(I_C*10^3,"Operating current in mA");
+disp(V_CE,"Operating voltage in volt");
+disp(A_d,"Voltage gain")
+
diff --git a/1850/CH1/EX1.10/exa_1_10.sce b/1850/CH1/EX1.10/exa_1_10.sce new file mode 100755 index 000000000..fa9fbca56 --- /dev/null +++ b/1850/CH1/EX1.10/exa_1_10.sce @@ -0,0 +1,28 @@ +// Exa 1.10
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 9;// in volt
+V_EE= 9;// in volt
+V_BE= 0.7;// in volt (Assuming value)
+R_C= 47;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 43;// in k ohm
+R_E= R_E*10^3;// in ohm
+Ri_1= 20;// in ohm
+Ri_2= Ri_1;// in ohm
+v_in1= 2.5;// in mv
+v_in1=v_in1*10^-3;// in volt
+Bita_1= 75;
+Bita_2= Bita_1;
+I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_1);// in amp
+I_E= I_CQ;// in amp
+V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt
+re_desh= (26*10^-3)/I_E;// in ohm
+// However, voltage gain of single-input, unbalanced-output differential amplifier is given by so
+A_d = R_C/(2*re_desh);
+v_out= A_d*v_in1;// in volt
+disp(v_out,"Output voltage in volt")
+
diff --git a/1850/CH1/EX1.11/exa_1_11.sce b/1850/CH1/EX1.11/exa_1_11.sce new file mode 100755 index 000000000..db2c14880 --- /dev/null +++ b/1850/CH1/EX1.11/exa_1_11.sce @@ -0,0 +1,30 @@ +// Exa 1.11
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+R_E_desh= 200;// in ohm
+V_CC= 10;// in volt
+V_EE= 10;// in volt
+V_BE= 0.7;// in volt
+R_C= 2.2;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 4.7;// in k ohm
+R_E= R_E*10^3;// in ohm
+Ri_1= 50;// in ohm
+Ri_2= Ri_1;// in ohm
+Bita_dc= 100;
+Bita_ac = Bita_dc;
+I_CQ = (V_EE-V_BE)/(2*R_E+ R_E_desh+Ri_1/Bita_dc);// in amp
+I_E= I_CQ;// in amp
+disp(I_CQ*10^3,"Value of I_CQ in mA");
+V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt
+disp(V_CEQ,"Value of V_CEQ in volt");
+re_desh= (26*10^-3)/I_E;// in ohm
+A_d = R_C/(re_desh+R_E_desh);
+disp(A_d,"Voltage gain");
+R_in1= 2*Bita_ac*(re_desh+R_E_desh);// in ohm
+disp(R_in1*10^-3,"Input resistance in k ohm");
+R_out1= R_C;// in ohm
+disp(R_out1*10^-3,"Output resistance in k ohm");
diff --git a/1850/CH1/EX1.12/exa_1_12.sce b/1850/CH1/EX1.12/exa_1_12.sce new file mode 100755 index 000000000..919f28f59 --- /dev/null +++ b/1850/CH1/EX1.12/exa_1_12.sce @@ -0,0 +1,34 @@ +// Exa 1.12
+clc;
+clear;
+close;
+// Given data
+V_D1=0.7;// in volt
+V_D2=V_D1;
+V_BE= 0.7;// in volt
+Bita= 100;
+R3=180;// in ohm
+V_EE= 15;// in volt
+V_CC=15;// in volt
+R_C=470;// in ohm
+V_B3= -V_EE+V_D1+V_D2;// in volt
+V_E3= V_B3-V_BE;// in volt
+I_E3= (V_E3-(-V_EE))/R3;// in amp
+
+// Part (i)
+I_CQ= I_E3/2;// in amp
+I_CQ= I_CQ*10^3;// in mA
+I_CQ= ceil(I_CQ);
+I_E=I_CQ;
+disp(I_CQ,"Quiescent current in mA")
+V_CEQ= V_CC + V_BE - I_CQ*10^-3*R_C;// in volt
+disp(V_CEQ,"Value of V_CEQ in volt");
+re_desh= 26/I_E;// in ohm
+// Part(ii)
+A_d = R_C/(re_desh);
+disp(A_d,"Differential Voltage gain");
+// part(iii)
+R_in1= 2*Bita*re_desh;// in ohm
+disp(R_in1*10^-3,"Input resistance in k ohm");
+
+
diff --git a/1850/CH1/EX1.13/exa_1_13.sce b/1850/CH1/EX1.13/exa_1_13.sce new file mode 100755 index 000000000..8af0cd658 --- /dev/null +++ b/1850/CH1/EX1.13/exa_1_13.sce @@ -0,0 +1,39 @@ +// Exa 1.13
+clc;
+clear;
+close;
+// Given data
+Bita_ac= 100;
+Bita_dc= Bita_ac;
+V_BE=0.715;// in volt
+V_D1= V_BE;
+R3=2.7*10^3;// in ohm
+R_C=4.7*10^3;// in ohm
+V_EE=10;//in volt
+V_CC= 10;// in volt
+V_Z= 6.2;// in volt
+I_ZT= 41;// in mA
+I_ZT=I_ZT*10^-3;// in amp
+V_B3= -V_EE+V_Z+V_D1;// in volt
+V_E3= V_B3-V_BE;// in volt
+I_E3= (V_E3-(-V_EE))/R3;// in amp
+// I_CQ1= I_CQ2= I_CQ= I_E3/2
+I_CQ= I_E3/2;// in amp
+I_CQ1=I_CQ;
+I_CQ2=I_CQ1;
+I_E=I_CQ;
+V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt
+
+// Part (c)
+// Thus Q_point= (I_CQ,V_CEQ)
+disp("Operating point values are : "+string(I_CQ*10^3)+" mA and "+string(V_CEQ))
+re_desh= (26*10^-3)/I_E;// in ohm
+
+// Part(a)
+A_d= R_C/re_desh;
+disp(A_d,"Voltage gain");
+
+// part(b)
+R_in= 2*Bita_ac*re_desh;// in ohm
+disp(R_in*10^-3,"Input resistance in k ohm");
+
diff --git a/1850/CH1/EX1.14/exa_1_14.sce b/1850/CH1/EX1.14/exa_1_14.sce new file mode 100755 index 000000000..3e3baec73 --- /dev/null +++ b/1850/CH1/EX1.14/exa_1_14.sce @@ -0,0 +1,12 @@ +// Exa 1.14
+clc;
+clear;
+close;
+// Given data
+V_CC=12;// in volt
+V_BE=0.7;// in volt
+R1= 25;// in k ohm
+R1=R1*10^3;// in ohm
+// I=I_REF= (V_CC-V_BE)/R1
+I= (V_CC-V_BE)/R1; // in amp
+disp(I*10^3,"Mirrored current in mA")
diff --git a/1850/CH1/EX1.15/exa_1_15.sce b/1850/CH1/EX1.15/exa_1_15.sce new file mode 100755 index 000000000..38645ada0 --- /dev/null +++ b/1850/CH1/EX1.15/exa_1_15.sce @@ -0,0 +1,15 @@ +// Exa 1.15
+clc;
+clear;
+close;
+// Given data
+V_CC=10;// in volt
+V_BE=0.7;// in volt
+R1= 15;// in k ohm
+R1=R1*10^3;// in ohm
+Bita=100;
+I_REF= (V_CC-V_BE)/R1;// in amp
+disp(I_REF*10^3,"Reference current in mA")
+I_out= I_REF*Bita/(Bita+2);// in amp
+disp(I_out*10^3,"Output current in mA")
+
diff --git a/1850/CH1/EX1.16/exa_1_16.sce b/1850/CH1/EX1.16/exa_1_16.sce new file mode 100755 index 000000000..dd3fce637 --- /dev/null +++ b/1850/CH1/EX1.16/exa_1_16.sce @@ -0,0 +1,16 @@ +// Exa 1.16
+clc;
+clear;
+close;
+// Given data
+V_CC=15;// in volt
+V_BE=0.7;// in volt
+R_REF= 2.2;// in k ohm
+R_REF= R_REF*10^3;// in ohm
+Bita=220;
+I_REF= (V_CC-V_BE)/R_REF;// in amp
+I= I_REF*Bita/(Bita+2);// in amp
+disp(I*10^3,"Current in mA")
+
+
+
diff --git a/1850/CH1/EX1.17/exa_1_17.sce b/1850/CH1/EX1.17/exa_1_17.sce new file mode 100755 index 000000000..5554a290a --- /dev/null +++ b/1850/CH1/EX1.17/exa_1_17.sce @@ -0,0 +1,14 @@ +// Exa 1.17
+clc;
+clear;
+close;
+// Given data
+V_BE=0.7;// in volt
+V_Z= 1.8;// in volt
+R_E=1;// in k ohm
+Bita=180;
+//V_Z-V_BE-V_B=0
+V_B= V_Z-V_BE;// in volt
+I_E= V_B/R_E;// in mA
+I= Bita/(Bita+1)*I_E;// in mA
+disp(I,"Current in mA")
diff --git a/1850/CH1/EX1.18/exa_1_18.sce b/1850/CH1/EX1.18/exa_1_18.sce new file mode 100755 index 000000000..9a21df1a6 --- /dev/null +++ b/1850/CH1/EX1.18/exa_1_18.sce @@ -0,0 +1,27 @@ +// Exa 1.18
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_BE=0.7;// in volt
+V_CC=9;// in volt
+R1=12;// in k ohm
+R1=R1*10^3;// in ohm
+Bita=100;
+Bita_1= Bita;
+Bita_2=Bita;
+Bita_3=Bita;
+I_REF= (V_CC-2*V_BE)/R1;// in amp
+disp(I_REF*10^3,"Reference current in mA");
+I_out= I_REF/(1+2/(Bita*(1+Bita_3)));// in amp
+disp(I_out*10^3,"Output current in mA");
+I_C2=I_out;// in amp
+disp(I_C2*10^3,"Collector current in mA");
+I_C1= I_C2;
+I_B3= I_REF-I_C1;// in amp
+disp(I_B3*10^6,"Base current of transistor in micro amphere");
+I_E3= I_B3*(1+Bita_3);// in amp
+disp(I_E3*10^6,"Emitter current of transistor in micro amphere");
+I_B1= I_E3/2;// in amp
+disp(I_B1*10^6,"Base current in micro amphere");
diff --git a/1850/CH1/EX1.19/exa_1_19.sce b/1850/CH1/EX1.19/exa_1_19.sce new file mode 100755 index 000000000..0093d2391 --- /dev/null +++ b/1850/CH1/EX1.19/exa_1_19.sce @@ -0,0 +1,21 @@ +// Exa 1.19
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_BE=0.715;// in volt
+V_CC=9;// in volt
+Bita_dc=100;
+Bita_ac= Bita_dc;
+V_EE= 10;// in volt
+R=5.6;// in k ohm
+R= R*10^3;// in ohm
+I_REF= (V_EE-V_BE)/R;// in amp
+// From 2*I_B + I_C1 -I_REF =0
+I_C1= I_REF*Bita_dc/(2+Bita_dc);// in amp
+// By symmetry
+I_C2= I_C1;
+I_C3= I_C2;
+I=3*I_C1;// current through R_C in amp
+disp(I*10^3,"Current through R_C in mA");
diff --git a/1850/CH1/EX1.2/exa_1_2.sce b/1850/CH1/EX1.2/exa_1_2.sce new file mode 100755 index 000000000..10ed4af22 --- /dev/null +++ b/1850/CH1/EX1.2/exa_1_2.sce @@ -0,0 +1,20 @@ +// Exa 1.2
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 10;// in volt
+V_EE= 10;// in volt
+V_BE=0.7// in volt
+I_C=0.5;// in mA
+I_C=I_C*10^-3;// in amp
+R_C= 10;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 9.3;// in k ohm
+R_E= R_E*10^3;// in ohm
+I_E= (V_EE-V_BE)/(2*R_E);// in amp
+I_CQ= I_E;// in amp
+disp(I_CQ*10^3,"Quiescent collector current in mA");
+V_CEQ= V_CC+V_BE-I_C*R_C;// in volt
+disp(V_CEQ,"Quiescent collector emitter voltage in volt");
diff --git a/1850/CH1/EX1.20/exa_1_20.sce b/1850/CH1/EX1.20/exa_1_20.sce new file mode 100755 index 000000000..e8ba56c91 --- /dev/null +++ b/1850/CH1/EX1.20/exa_1_20.sce @@ -0,0 +1,21 @@ +// Exa 1.20
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_BE=0.7;// in volt
+V_CC=5;// in volt
+V_EE=-5;// in volt
+Bita=100;
+R=18.6;// in k ohm
+R= R*10^3;// in ohm
+I2= (V_CC-V_BE-V_EE)/R;// in amp
+I_C3=I2;
+I_E= I_C3/2;// in amp
+re_desh= (26*10^-3)/I_E;// in ohm
+re1_desh=re_desh;
+re2_desh=re1_desh;
+R_in1= 2*Bita*re_desh;// in ohm
+R_in2= R_in1
+disp(R_in1*10^-3,"Differential input resistance in k ohm")
diff --git a/1850/CH1/EX1.21/exa_1_21.sce b/1850/CH1/EX1.21/exa_1_21.sce new file mode 100755 index 000000000..26d8eebed --- /dev/null +++ b/1850/CH1/EX1.21/exa_1_21.sce @@ -0,0 +1,19 @@ +// Exa 1.21
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_BE=0.7;// in volt
+V_CC=18;// in volt
+R_E=1.1;// in k ohm
+R_C=1.8;// in k ohm
+R_C=R_C*10^3;// in ohm
+R1=4.7;// in k ohm
+R2=5.6;// in k ohm
+R3=6.8;// in k ohm
+I_E1= (V_CC*R1/(R1+R2+R3)-V_BE)/R_E;// in mA
+re_desh= 26/I_E1;// in ohm
+re2_desh=re_desh
+Av= -R_C/re2_desh;
+disp(Av,"Voltage gain of the cascode amplifier is : ")
diff --git a/1850/CH1/EX1.3/exa_1_3.sce b/1850/CH1/EX1.3/exa_1_3.sce new file mode 100755 index 000000000..25fffe634 --- /dev/null +++ b/1850/CH1/EX1.3/exa_1_3.sce @@ -0,0 +1,77 @@ +// Exa 1.3
+clc;
+clear;
+close;
+// Given data
+format('v',9)
+V_CC= 12;// in volt
+V_EE= 12;// in volt
+V_BE= 0.7;// in volt
+R_C= 10;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 10;// in k ohm
+R_E= R_E*10^3;// in ohm
+R_B= 20;// in k ohm
+R_B= R_B*10^3;// in ohm
+Bita_dc= 75;
+// Part (i)
+//Ignoring V_BE
+I_T= V_EE/R_E//in amp
+I_E= I_T/2;// in amp
+I_C=I_E;
+V_out= V_CC-I_C*R_C// in volt
+disp(V_out,"Output Voltage in volt (Ignoring V_BE)");
+//Considering V_BE
+I_T= (V_EE-V_BE)/R_E//in amp
+I_E= I_T/2;// in amp
+I_C=I_E;
+V_out= V_CC-I_C*R_C// in volt
+disp(V_out,"Output Voltage in volt (Condidering V_BE)");
+I_T= (V_EE-V_BE)/(R_E+R_B/(2*Bita_dc));// in amp
+I_E= I_T/2;// in amp
+I_C=I_E;
+V_out= V_CC-I_C*R_C// in volt
+disp(V_out,"Output Voltage in volt (With Bita_dc)");
+
+// Part(ii)
+I_C= 0.6;// in mA
+I_C=I_C*10^-3;
+I_B= I_C/Bita_dc;// in amp
+disp(I_B*10^6,"Base current in micro amphere");
+V_B= -I_B*R_B;// in volt
+disp(V_B,"Base Voltage in volt")
+
+// Part (iii)
+Bita_dc= 60;
+I_B1= I_C/Bita_dc;// in amp
+disp(I_B1*10^6,"Base current for transistor Q1 in micro amphere");
+V_B1= -I_B1*R_B;// in volt
+disp(V_B1,"Base Voltage for transistor Q1 in volt")
+Bita_dc= 80;
+I_B2= I_C/Bita_dc;// in amp
+disp(I_B2*10^6,"Base current for transistor Q2 in micro amphere");
+V_B2= -I_B2*R_B;// in volt
+disp(V_B2,"Base Voltage for transistor Q2 in volt")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/1850/CH1/EX1.4/exa_1_4.sce b/1850/CH1/EX1.4/exa_1_4.sce new file mode 100755 index 000000000..1e207b10d --- /dev/null +++ b/1850/CH1/EX1.4/exa_1_4.sce @@ -0,0 +1,41 @@ +// Exa 1.4
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 10;// in volt
+V_EE= 10;// in volt
+V_BE= 0.7;// in volt
+R_C= 2.2;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 4.7;// in k ohm
+R_E= R_E*10^3;// in ohm
+Ri_1= 50;// in ohm
+Ri_2= Ri_1;// in ohm
+Bita_dc= 100;
+Bita_ac = Bita_dc;
+// Part (a)
+I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_dc);// in amp
+I_E= I_CQ;// in amp
+disp(I_CQ*10^3,"Value of I_CQ in mA");
+V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt
+disp(V_CEQ,"Value of V_CEQ in volt");
+
+// Part(b)
+re_desh= (26*10^-3)/I_E;// in ohm
+// A_d= V_out/V_ind = R_C/re_desh
+A_d = R_C/re_desh;
+disp(A_d,"Voltage gain ");
+
+// Part(c)
+// R_in1= R_in2= 2*Bita_ac*re_desh
+R_in1= 2*Bita_ac*re_desh;// in ohm
+disp(R_in1*10^-3,"Input resistance in k ohm");
+
+// Part(d)
+// R_out1= R_out2= R_C
+R_out1= R_C;// in ohm
+disp(R_out1*10^-3,"Output resistance in k ohm");
+
+
diff --git a/1850/CH1/EX1.5/exa_1_5.sce b/1850/CH1/EX1.5/exa_1_5.sce new file mode 100755 index 000000000..36ff00d5e --- /dev/null +++ b/1850/CH1/EX1.5/exa_1_5.sce @@ -0,0 +1,37 @@ +// Exa 1.5
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 15;// in volt
+V_EE= 15;// in volt
+V_BE= 0.7;// in volt
+R_C= 1;// in M ohm
+R_C= R_C*10^6;// in ohm
+R_E= R_C;// in ohm
+
+Bita_ac= 100;
+I_E = (V_EE-V_BE)/(2*R_E);// in amp
+re_desh= (26*10^-3)/I_E;// in ohm
+A_d = R_C/re_desh;
+disp(A_d,"Voltage gain ");
+Z_in= 2*Bita_ac*re_desh;// in ohm
+disp(Z_in*10^-6,"Input impedence in M ohm");
+Z_out= R_C;// in ohm
+disp(Z_out*10^-6,"Output impedence in M ohm");
+A_cm= R_C/(2*R_E+re_desh);
+CMRR= A_d/A_cm;
+disp(CMRR,"Common-mode rejection ratio");
+disp("When v_in is zero, the ac output voltage is zero. So total output voltage at the quiescent value in volt")
+I_C=I_E;
+V_out= V_CC-I_C*R_C;// in volt
+disp(V_out);
+// when v_in = 1
+v_in= 1;// in mV
+v_in= v_in*10^-3;// in volt
+disp("When v_in = 1 mv, the ac output voltage in volt");
+v_out= A_d*v_in;
+disp(v_out);
+
+// Note : Answer of CMRR in the book is wrong due to wrong calculation of A_cm
diff --git a/1850/CH1/EX1.6/exa_1_6.sce b/1850/CH1/EX1.6/exa_1_6.sce new file mode 100755 index 000000000..b4017e38a --- /dev/null +++ b/1850/CH1/EX1.6/exa_1_6.sce @@ -0,0 +1,17 @@ +// Exa 1.6
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_EE= 5;// in volt
+R_C= 2;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 4.3;// in k ohm
+R_E= R_E*10^3;// in ohm
+V_BE=0.7;// in volt (Assuming)
+V_T= 26*10^-3;// in volt
+I_E = (V_EE-V_BE)/(2*R_E);// in amp
+re_desh= V_T/I_E;// in ohm
+A_d = R_C/(2*re_desh);
+disp(A_d,"Voltage gain ");
diff --git a/1850/CH1/EX1.7/exa_1_7.sce b/1850/CH1/EX1.7/exa_1_7.sce new file mode 100755 index 000000000..2894fcad3 --- /dev/null +++ b/1850/CH1/EX1.7/exa_1_7.sce @@ -0,0 +1,21 @@ +// Exa 1.7
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_EE= 5;// in volt
+R_C= 2;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 4.3;// in k ohm
+R_E= R_E*10^3;// in ohm
+V_BE=0.7;// in volt (Assuming)
+V_T= 26*10^-3;// in volt
+I_E = (V_EE-V_BE)/(2*R_E);// in amp
+re_desh= V_T/I_E;// in ohm
+A_d = R_C/(2*re_desh);
+A_cm= R_C/(2*R_E+re_desh);
+disp(A_cm,"Common mode gain");
+CMRR= A_d/A_cm;
+disp(CMRR,"Common mode rejection ratio")
+
diff --git a/1850/CH1/EX1.8/exa_1_8.sce b/1850/CH1/EX1.8/exa_1_8.sce new file mode 100755 index 000000000..8d4915bf7 --- /dev/null +++ b/1850/CH1/EX1.8/exa_1_8.sce @@ -0,0 +1,26 @@ +// Exa 1.8
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 9;// in volt
+V_EE= 9;// in volt
+V_BE= 0.7;// in volt (Assuming value)
+R_C= 47;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 43;// in k ohm
+R_E= R_E*10^3;// in ohm
+Ri_1= 20;// in ohm
+Ri_2= Ri_1;// in ohm
+v_in1= 2.5;// in mv
+v_in1=v_in1*10^-3;// in volt
+Bita_1= 75;
+Bita_2= Bita_1;
+I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_1);// in amp
+I_E= I_CQ;// in amp
+V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt
+re_desh= (26*10^-3)/I_E;// in ohm
+A_d = R_C/re_desh;
+v_out= A_d*v_in1;// in volt
+disp(v_out,"Output voltage in volt")
diff --git a/1850/CH1/EX1.9/exa_1_9.sce b/1850/CH1/EX1.9/exa_1_9.sce new file mode 100755 index 000000000..12313f5de --- /dev/null +++ b/1850/CH1/EX1.9/exa_1_9.sce @@ -0,0 +1,38 @@ +// Exa 1.9
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V_CC= 10;// in volt
+V_EE= 10;// in volt
+V_BE= 0.7;// in volt
+R_C= 2.2;// in k ohm
+R_C= R_C*10^3;// in ohm
+R_E= 4.7;// in k ohm
+R_E= R_E*10^3;// in ohm
+Ri_1= 50;// in ohm
+Ri_2= Ri_1;// in ohm
+Bita_dc= 100;
+Bita_ac = Bita_dc;
+I_CQ = (V_EE-V_BE)/(2*R_E+Ri_1/Bita_dc);// in amp
+I_E= I_CQ;// in amp
+V_CEQ= V_CC + V_BE - I_CQ*R_C;// in volt
+re_desh= (26*10^-3)/I_E;// in ohm
+A_d = R_C/re_desh;
+R_in1= 2*Bita_ac*re_desh;// in ohm
+R_out1= R_C;// in ohm
+disp(I_CQ*10^3,"Quiescent collector current in mA");
+disp(V_CEQ,"Quiescent collector-emitter voltage in volt");
+disp(R_in1*10^-3,"Input resistance in k ohm");
+disp(R_out1*10^-3,"Output resistance in k ohm");
+// However, the voltage gain of dual input , unbalaned output differential amplifier is half the gain of the dual input, balanced output differential amplifier as
+disp(A_d/2,"Voltage gain")
+
+// (ii)
+disp("Because of same component values and same biasing arrangement the values of I_CQ,V_CEQ,R_in,R_out and A_d are the same as those for dual input balanced output configuration. Thus");
+disp(I_CQ*10^3,"Quiescent collector current in mA");
+disp(V_CEQ,"Quiescent collector-emitter voltage in volt");
+disp(R_in1*10^-3,"Input resistance in k ohm");
+disp(R_out1*10^-3,"Output resistance in k ohm");
+disp(A_d,"Voltage gain")
diff --git a/1850/CH10/EX10.1/exa_10_1.sce b/1850/CH10/EX10.1/exa_10_1.sce new file mode 100755 index 000000000..fc1ff63e4 --- /dev/null +++ b/1850/CH10/EX10.1/exa_10_1.sce @@ -0,0 +1,24 @@ +// Exa 10.1
+clc;
+clear;
+close;
+//given data
+V_pos= 12;// in volt
+V_Neg= -12;// in volt
+V=V_pos-V_Neg;
+R1=15;// in k ohm
+R1=R1*10^3;// in ohm
+C1=0.01;// in micro F
+C1=C1*10^-6;// in F
+C2=10;// in micro F
+C2=C2*10^-6;// in F
+// (i)
+f_out= 1.2/(4*R1*C1);// in Hz
+disp(f_out*10^-3,"Free running frequency in kHz");
+// (ii)
+f_L= (8*f_out)/V;// in Hz
+disp(f_L*10^-3,"Lock range in k Hz");
+f_C= sqrt(f_L/(2*%pi*3.6*10^3*C2));// in Hz
+disp(f_C,"Capture range in Hz")
+
+
diff --git a/1850/CH11/EX11.1/exa_11_1.sce b/1850/CH11/EX11.1/exa_11_1.sce new file mode 100755 index 000000000..b38e33037 --- /dev/null +++ b/1850/CH11/EX11.1/exa_11_1.sce @@ -0,0 +1,14 @@ +// Exa 11.1
+clc;
+clear;
+close;
+//given data
+I_dc=300;// in mA
+C=200;// in micro F
+V_max= 24;// in volt
+V_r_rms= 2.4*I_dc/C;// in volt
+V_r_peak= sqrt(3)*V_r_rms;// in volt
+V_dc= V_max-V_r_peak;// in volt
+V_in_low= V_max-V_r_peak;// in volt
+disp(V_in_low,"Minimum input voltage in volt")
+
diff --git a/1850/CH11/EX11.2/exa_11_2.sce b/1850/CH11/EX11.2/exa_11_2.sce new file mode 100755 index 000000000..e7e33190c --- /dev/null +++ b/1850/CH11/EX11.2/exa_11_2.sce @@ -0,0 +1,15 @@ +// Exa 11.2
+clc;
+clear;
+close;
+//given data
+I_L= 0.5;// in amp
+R_L=25;// in ohm
+V_R=12;// in volt (since using 7812 voltage regulator)
+V_L= I_L*R_L;
+R=V_R/I_L;// in ohm
+disp(R,"Resistance required in ohm");
+V_out= V_R+V_L;// in volt
+disp(V_out,"Output voltage in volt");
+V_in= V_out+2;// in volt
+disp(V_in,"Input voltage in volt");
diff --git a/1850/CH11/EX11.3/exa_11_3.sce b/1850/CH11/EX11.3/exa_11_3.sce new file mode 100755 index 000000000..dd6fce506 --- /dev/null +++ b/1850/CH11/EX11.3/exa_11_3.sce @@ -0,0 +1,10 @@ +// Exa 11.3
+clc;
+clear;
+close;
+//given data
+R1= 240;// in ohm
+R2= 1.2;// in kohm
+R2=R2*10^3;// in ohm
+V_out= 1.25*(1+R2/R1);// in volt
+disp(V_out,"Regulated output voltage in volt")
diff --git a/1850/CH11/EX11.4/exa_11_4.sce b/1850/CH11/EX11.4/exa_11_4.sce new file mode 100755 index 000000000..42ca3b7b7 --- /dev/null +++ b/1850/CH11/EX11.4/exa_11_4.sce @@ -0,0 +1,17 @@ +// Exa 11.4
+clc;
+clear;
+close;
+//given data
+R1= 40;// in ohm
+I_Q= 10;// in mA
+I_Q=I_Q*10^-3;// in amp
+V_REF= 15;// in volt
+// When R2 is set at minimum i.e.
+R2= 0;// in ohm
+V_out= (1+R2/R1)*V_REF + I_Q*R2;// in volt
+disp(V_out,"Minimum output voltage in volt")
+// When R2 is set at maximum i.e.
+R2= 200;// in ohm
+V_out= (1+R2/R1)*V_REF + I_Q*R2;// in volt
+disp(V_out,"Minimum output voltage in volt")
diff --git a/1850/CH11/EX11.5/exa_11_5.sce b/1850/CH11/EX11.5/exa_11_5.sce new file mode 100755 index 000000000..138c722e3 --- /dev/null +++ b/1850/CH11/EX11.5/exa_11_5.sce @@ -0,0 +1,14 @@ +// Exa 11.5
+clc;
+clear;
+close;
+//given data
+R1= 2.5;// in kohm
+R1= R1*10^3;// in ohm
+R2= 1;// in kohm
+R2= R2*10^3;// in ohm
+V_REF= 1.25;// in volt
+I= V_REF/R2;// in amp
+// This current also flows through R1. So the output voltage
+V_out= I*(R1+R2);// in volt
+disp(V_out,"Output voltage in volt")
diff --git a/1850/CH11/EX11.6/exa_11_6.sce b/1850/CH11/EX11.6/exa_11_6.sce new file mode 100755 index 000000000..8a1b9d19f --- /dev/null +++ b/1850/CH11/EX11.6/exa_11_6.sce @@ -0,0 +1,14 @@ +// Exa 11.6
+clc;
+clear;
+close;
+//given data
+R1= 3;// in kohm
+R1= R1*10^3;// in ohm
+R2= 1;// in kohm
+R2= R2*10^3;// in ohm
+V_REF= 1.25;// in volt
+V_in=20;// in volt
+V_out= V_REF*(R1+R2)/R2;// in volt
+D=V_out/V_in*100;// in percent
+disp(D,"Duty cycle in percent")
diff --git a/1850/CH2/EX2.10/exa_2_10.sce b/1850/CH2/EX2.10/exa_2_10.sce new file mode 100755 index 000000000..aa80135a2 --- /dev/null +++ b/1850/CH2/EX2.10/exa_2_10.sce @@ -0,0 +1,11 @@ +// Exa 2.10
+clc;
+clear;
+close;
+// Given data
+format('v',9)
+Vd=25;// in micro volt
+Vd= Vd*10^-6;// in volt
+A=200000;
+V_out= Vd*A;
+disp(V_out,"Output voltage in volt");
diff --git a/1850/CH2/EX2.11/exa_2_11.sce b/1850/CH2/EX2.11/exa_2_11.sce new file mode 100755 index 000000000..60b4d70fe --- /dev/null +++ b/1850/CH2/EX2.11/exa_2_11.sce @@ -0,0 +1,11 @@ +// Exa 2.11
+clc;
+clear;
+close;
+// Given data
+format('v',9)
+dV_out=20;// in volt
+dt= 4;// in micro seconds
+SR= dV_out/dt;// in V/micro sec
+disp(SR,"Slew rate in V/micro sec");
+
diff --git a/1850/CH2/EX2.12/exa_2_12.sce b/1850/CH2/EX2.12/exa_2_12.sce new file mode 100755 index 000000000..e0a8d6f3d --- /dev/null +++ b/1850/CH2/EX2.12/exa_2_12.sce @@ -0,0 +1,14 @@ +// Exa 2.12
+clc;
+clear;
+close;
+// Given data
+format('v',9)
+IB1= 10;// in mA
+IB2= 7.5;// in mA
+I_in_bias= (IB1+IB2)/2;// in mA
+disp(I_in_bias,"Input bias current in mA")
+I_in_offset= IB1-IB2 ;// in mA
+disp(I_in_offset,"Input offset current in mA")
+
+// Note: Units in Answer in the book is wrong
diff --git a/1850/CH2/EX2.13/exa_2_13.sce b/1850/CH2/EX2.13/exa_2_13.sce new file mode 100755 index 000000000..e6a0ab436 --- /dev/null +++ b/1850/CH2/EX2.13/exa_2_13.sce @@ -0,0 +1,16 @@ +// Exa 2.13
+clc;
+clear;
+close;
+// Given data
+format('v',9)
+SR= 6;// in V/micro S
+SR=SR*10^6;// in V/s
+// (i)
+V_max= 1;// in volt
+f_max= SR/(2*%pi*V_max);
+disp(f_max*10^-6,"Frequency for V_max=1V in MHz")
+// (ii)
+V_max= 10;// in volt
+f_max= SR/(2*%pi*V_max);
+disp(f_max*10^-3,"Frequency for V_max=10V in kHz")
diff --git a/1850/CH2/EX2.14/exa_2_14.sce b/1850/CH2/EX2.14/exa_2_14.sce new file mode 100755 index 000000000..4cf82a68c --- /dev/null +++ b/1850/CH2/EX2.14/exa_2_14.sce @@ -0,0 +1,12 @@ +// Exa 2.14
+clc;
+clear;
+close;
+// Given data
+format('v',9)
+V_PP= 3;// in volt
+delta_t= 4;// in micro sec
+// delta_V= 90% of V_PP - 10% of V_PP = (90%-10%)*V_PP
+delta_V= 0.8*V_PP;
+SR= delta_V/delta_t;// in V/micro sec
+disp(SR,"Required slew rate in V/micro second")
diff --git a/1850/CH2/EX2.2/exa_2_2.sce b/1850/CH2/EX2.2/exa_2_2.sce new file mode 100755 index 000000000..eaf8404df --- /dev/null +++ b/1850/CH2/EX2.2/exa_2_2.sce @@ -0,0 +1,23 @@ +// Exa 2.2
+clc;
+clear;
+close;
+// Part (i)
+// Given data
+V_in1= 5;// in micro volt
+V_in1=V_in1*10^-6;// in volt
+V_in2= -7;// in micro volt
+V_in2=V_in2*10^-6;// in volt
+Av=2*10^5;
+V_out= (V_in1-V_in2)*Av;// in volt
+disp(V_out,"(i) Output voltage in first case in volt");
+
+// Part(ii)
+V_in1= 10;// in mV
+V_in1=V_in1*10^-3;// in volt
+V_in2= 20;// in mV
+V_in2=V_in2*10^-3;// in volt
+V= Av*(V_in1*sqrt(2)-V_in2*sqrt(2));// V = V_out/sin(omega*t) in volts
+V=ceil(V);
+disp("(ii) Output voltage in second case : "+string(V)+"*sin(omega*t) volts")
+
diff --git a/1850/CH2/EX2.4/exa_2_4.sce b/1850/CH2/EX2.4/exa_2_4.sce new file mode 100755 index 000000000..9d56b2a1b --- /dev/null +++ b/1850/CH2/EX2.4/exa_2_4.sce @@ -0,0 +1,28 @@ +// Exa 2.4
+clc;
+clear;
+close;
+// Given data
+Rs= 2;// in k ohm
+Rs=Rs*10^3;// in ohm
+RL= 5;// in k ohm
+RL=RL*10^3;// in ohm
+Rin= 100;// in k ohm
+Rin=Rin*10^3;// in ohm
+Rout= 50;// in ohm
+A=10^5;
+Vout= 10;// in volt
+// V1= Vs*Rin/(Rin+Rs) = Vs*100/102 (i)
+// V2/(5 kohm)+ V2/(100 kohm) + (V2-10^5*(V1-V2))/50 = 0
+// or 20*V2 + V2 + 2*10^3*V2 = 2*10^8*(V1-V2)
+// or V2*(20+1+2*10^3+2*10^8)= 2*10^8*V1
+// or V1=V2 (approx)
+// For
+V_out= 10;// in volt
+V1=10;// in volt
+V2=V1;
+Vs= (Rin+Rs)/Rin*V1;// in volts
+V_out_BY_Vs= V_out/Vs;//in volts
+disp(Vs,"Value of Vs in volts");
+disp(V_out_BY_Vs,"Value of V_out/Vs ")
+disp(Rin*10^-3,"Input resistance of circuit in kohm")
diff --git a/1850/CH2/EX2.5/exa_2_5.sce b/1850/CH2/EX2.5/exa_2_5.sce new file mode 100755 index 000000000..12ad290db --- /dev/null +++ b/1850/CH2/EX2.5/exa_2_5.sce @@ -0,0 +1,18 @@ +// Exa 2.5
+clc;
+clear;
+close;
+// Given data
+R1= 1;// in kΩ
+R2= 2;// in kΩ
+R3= 4;// in kΩ
+R4= 8;// in kΩ
+R5= 1;// in kΩ
+R6= 3 ;// in kΩ
+Vc= -1;// in V
+// V_A= Vout*R5/(R5+R6) (i)
+// Applying Kirchhoff's law at node B and A
+// V_B*(1/R3+1/R2) -Vc/R3 = Vout*R5/(R2*(R5+R6))
+// V_B/R2 +1= 3*Vout*R5/(R2*(R5+R6)) (ii)
+Vout= (R2+R6)/(3*R6/R3+Vc/R2);// in volts
+disp(Vout,"The output voltage in volts is 20/7 volts or ")
diff --git a/1850/CH2/EX2.6/exa_2_6.sce b/1850/CH2/EX2.6/exa_2_6.sce new file mode 100755 index 000000000..46cc2354c --- /dev/null +++ b/1850/CH2/EX2.6/exa_2_6.sce @@ -0,0 +1,10 @@ +// Exa 2.6
+clc;
+clear;
+close;
+// Given data
+Ad= 100;
+Acm= 0.01;
+CMRR= Ad/Acm;
+CMRR_desh= 20*log10(CMRR);// in dB
+disp(CMRR_desh,"CMRR in dB")
diff --git a/1850/CH2/EX2.7/exa_2_7.sce b/1850/CH2/EX2.7/exa_2_7.sce new file mode 100755 index 000000000..0dbcdd4d8 --- /dev/null +++ b/1850/CH2/EX2.7/exa_2_7.sce @@ -0,0 +1,9 @@ +// Exa 2.7
+clc;
+clear;
+close;
+// Given data
+Ad= 10^5;
+CMRR= 10^5;
+Acm= Ad/CMRR;
+disp(Acm,"Common mode gain");
diff --git a/1850/CH2/EX2.8/exa_2_8.sce b/1850/CH2/EX2.8/exa_2_8.sce new file mode 100755 index 000000000..c6ffb173a --- /dev/null +++ b/1850/CH2/EX2.8/exa_2_8.sce @@ -0,0 +1,19 @@ +// Exa 2.8
+clc;
+clear;
+close;
+// Given data
+format('v',6)
+V1=10;// in mV
+V2=9;// in mV
+Vd= V1-V2;// in mV
+Vcm= (V1+V2)/2;// in mV
+Ad= 60;// in dB
+Ad= 10^(Ad/20);
+CMRR= 80;// in dB
+CMRR= 10^(CMRR/20);
+V_out= Ad*Vd*10^-3*(1+1/CMRR*Vcm/Vd);// in volt
+errorVoltage= V_out-Ad*Vd*10^-3;// in volt
+disp(errorVoltage*10^3,"Error Voltage in mV");
+PercentError= errorVoltage/V_out*100;// in %
+disp(PercentError,"Percentage error is")
diff --git a/1850/CH2/EX2.9/exa_2_9.sce b/1850/CH2/EX2.9/exa_2_9.sce new file mode 100755 index 000000000..28712777c --- /dev/null +++ b/1850/CH2/EX2.9/exa_2_9.sce @@ -0,0 +1,18 @@ +// Exa 2.9
+clc;
+clear;
+close;
+// Given data
+format('v',7)
+V1=745;// in micro volt
+V2=740;// in micro volt
+Vd= V1-V2;// in micro volt
+Vcm= (V1+V2)/2;// in micro volt
+Ad= 5*10^5;
+CMRR= 80;// in dB
+CMRR= 10^(CMRR/20);
+V_out= Ad*Vd*10^-6*(1+1/CMRR*Vcm/Vd);// in volt
+disp(V_out,"Output voltage in volt")
+errorVoltage= V_out-Ad*Vd*10^-6;// in volt
+PercentError= errorVoltage/V_out*100;// in %
+disp(PercentError,"Percentage error is")
diff --git a/1850/CH3/EX3.10/exa_3_10.sce b/1850/CH3/EX3.10/exa_3_10.sce new file mode 100755 index 000000000..064754120 --- /dev/null +++ b/1850/CH3/EX3.10/exa_3_10.sce @@ -0,0 +1,16 @@ +// Exa 3.10
+clc;
+clear;
+close;
+// (i) Given amplifier is an inverting amplifier, where
+// V_out= -R_f/R_in*V_in = 1Mohm/1Mohm*V_in = -V_in, So
+// Av= V_out/V_in
+Av=-1;
+disp(Av,"Input impedence :");
+// (ii) Because it is a unity gain inverter, So I_in= I_out
+// A_in = I_out/I_in
+A_in = 1;
+disp(A_in,"Voltage gain :");
+// (iii) Power gain of op-amp circuit
+A_p=abs(Av*A_in);
+disp(A_p,"Power gain :");
diff --git a/1850/CH3/EX3.11/exa_3_11.sce b/1850/CH3/EX3.11/exa_3_11.sce new file mode 100755 index 000000000..5f3b118de --- /dev/null +++ b/1850/CH3/EX3.11/exa_3_11.sce @@ -0,0 +1,14 @@ +// Exa 3.11
+clc;
+clear;
+close;
+// Given data
+Av=-30;
+disp("Voltage gain, Vo/Vi= -R_f/R1 = -30");
+disp("Or R_f= 30*R1");
+disp("Obviously R_f will be larger resistance , being 30 times of R1 and largest resistance value is limited to 1 M ohm, So")
+R_f=1;// in M ohm
+disp(R_f,"Value of R_f in M ohm :");
+R_f= R_f*10^6;// in ohm
+R1=R_f/30;// in ohm
+disp(R1*10^-3,"Value of R1 in k ohm :");
diff --git a/1850/CH3/EX3.12/exa_3_12.sce b/1850/CH3/EX3.12/exa_3_12.sce new file mode 100755 index 000000000..0755d45ce --- /dev/null +++ b/1850/CH3/EX3.12/exa_3_12.sce @@ -0,0 +1,15 @@ +// Exa 3.12
+clc;
+clear;
+close;
+// Given data
+Av=-8;// voltage gain
+I1=15;// in micro A
+I1=I1*10^-6;// in amp
+Vi=-1;// in volt
+R1=abs(Vi)/I1;/// in ohm
+disp("Resistace R1 is : "+string(R1*10^-3)+" in k ohm (Use 68 k ohm standard value)")
+R1=68;// in k ohm (standard value)
+R_f= -Av*R1;// in ohm
+disp("Resistance R_f is : "+string(R_f)+" k ohm (Use 560 k ohm standard value)")
+
diff --git a/1850/CH3/EX3.15/exa_3_15.sce b/1850/CH3/EX3.15/exa_3_15.sce new file mode 100755 index 000000000..6d9853e53 --- /dev/null +++ b/1850/CH3/EX3.15/exa_3_15.sce @@ -0,0 +1,19 @@ +// Exa 3.15
+clc;
+clear;
+close;
+// Given data
+R_f=20;// in k ohm
+R1=10;// in k ohm
+
+// Part (i) When switch S is off
+A_off_non_inv= 1+R_f/R1;
+A_off_inv= -R_f/R1;
+A_off = A_off_non_inv + A_off_inv;
+disp(A_off,"Gain of amplifier circuit when switch S is off");
+
+// Part (ii) When switch S is on
+A_on= -R_f/R1;
+disp(A_on,"Gain of amplifier circuit when switch S is on");
+
+
diff --git a/1850/CH3/EX3.16/Exa3_16.sce b/1850/CH3/EX3.16/Exa3_16.sce new file mode 100755 index 000000000..54600aced --- /dev/null +++ b/1850/CH3/EX3.16/Exa3_16.sce @@ -0,0 +1,14 @@ +// Exa 3.16
+clear;
+clc;
+close;
+//Part (a) is a derivation not a numerical problem
+//Part (b) is a plot, and can be plotteed with any assumed value of R
+R=5;//in ohm(assumed)
+V=0:12;//in volt
+I=-V/R//in Ampere
+disp("V-I characteristics is shown in figure.")
+plot(V,I);
+title("V-I characteristics");
+xlabel("V(volt)");
+ylabel("I(Ampere)");
diff --git a/1850/CH3/EX3.18/exa_3_18.sce b/1850/CH3/EX3.18/exa_3_18.sce new file mode 100755 index 000000000..bd20ae97c --- /dev/null +++ b/1850/CH3/EX3.18/exa_3_18.sce @@ -0,0 +1,17 @@ +// Exa 3.18
+clc;
+clear;
+close;
+// Given data
+R_f=10;// in k ohm
+R1=1;// in k ohm
+V_d= 5;// in mV
+v_cm= 2;// in mV
+A_d= -R_f/R1;
+Vout= A_d*V_d;// in mV
+disp(abs(Vout),"Output voltage in mV : ")
+CMRR_dB= 90;// in dB
+CMRR= 10^(CMRR_dB/20);
+A_cm= abs(A_d)/CMRR
+Mag= A_cm*v_cm;// magnitude of the induced 60 Hz noise at the output in mV
+disp(Mag*10^3," magnitude of the induced 60 Hz noise at the output in micro volt :")
diff --git a/1850/CH3/EX3.19/exa_3_19.sce b/1850/CH3/EX3.19/exa_3_19.sce new file mode 100755 index 000000000..26bfa9cf7 --- /dev/null +++ b/1850/CH3/EX3.19/exa_3_19.sce @@ -0,0 +1,22 @@ +// Exa 3.19
+clc;
+clear;
+close;
+// Given data
+R1=540;// in ohm
+R3=R1;
+R_f=5.4;// in k ohm
+R_f=R_f*10^3;// in ohm
+R2=R_f;// in ohm
+v_in1= -2.5;// in volt
+v_in2= -3.5;// in volt
+R_in=2;// in M ohm
+R_in= R_in*10^6;// in ohm
+A=2*10^5;
+A_d= (1+R_f/R1);
+disp(A_d,"Voltage gain : ");
+v_out=A_d*(v_in1-v_in2);// in volt
+disp(v_out,"Output voltage in volt");
+R_inf1= R_in*(1+A*R1/(R1+R_f));
+R_inf2= R_in*(1+A*R2/(R2+R3));
+disp("Internal resistance : "+string(R_inf1)+" ohm and "+string(R_inf2)+" ohm ");
diff --git a/1850/CH3/EX3.2/exa_3_2.sce b/1850/CH3/EX3.2/exa_3_2.sce new file mode 100755 index 000000000..aaad9d514 --- /dev/null +++ b/1850/CH3/EX3.2/exa_3_2.sce @@ -0,0 +1,13 @@ +// Exa 3.2
+clc;
+clear;
+close;
+//given data
+R1=2;// in k ohm
+R_f_min=0;
+R_f_max=100; // in k ohm
+A_f_max = 1+R_f_max/R1;
+disp(A_f_max,"Maximum closed loop")
+A_f_min = 1+R_f_min/R1;
+disp(A_f_min,"Minimum closed loop")
+
diff --git a/1850/CH3/EX3.20/exa_3_20.sce b/1850/CH3/EX3.20/exa_3_20.sce new file mode 100755 index 000000000..83405d77f --- /dev/null +++ b/1850/CH3/EX3.20/exa_3_20.sce @@ -0,0 +1,15 @@ +// Exa 3.20
+clc;
+clear;
+close;
+// Given data
+v_in= 100;// in mili volt
+v_in=v_in*10^-3;// in volt
+v_out= 4.25;// in volt
+// Taking
+R1=100;// in ohm
+// Formula v_out = (1+2*R_f/R1)*v_in
+R_f= R1/2*(v_out/v_in-1);// in ohm
+R_f=R_f*10^-3;// in k ohm
+disp(R_f,"Gain of the circuit in k ohm");
+disp("Use 2.2 k ohm standard value");
diff --git a/1850/CH3/EX3.21/exa_3_21.sce b/1850/CH3/EX3.21/exa_3_21.sce new file mode 100755 index 000000000..25e354eac --- /dev/null +++ b/1850/CH3/EX3.21/exa_3_21.sce @@ -0,0 +1,30 @@ +// Exa 3.21
+clc;
+clear;
+close;
+// Given data
+R1=3.3;// in k ohm
+R1=R1*10^3;// in ohm
+R2=R1;
+R_p= 2.5;// in k ohm
+R_p =R_p*10^3;// in ohm
+R3=1.2;// in k ohm
+R3=R3*10^3;// in ohm
+R4=R3;
+R_f= 3.9;// in k ohm
+R_f =R_f*10^3;// in ohm
+R5=R_f;
+R_in= 2;// in M ohm
+R_in= R_in*10^6;// in ohm
+R_out= 75;// in ohm
+A=2*10^5;
+f_o= 5;// in Hz
+A_d= -1*(1+2*R1/R_p)*R_f/R3;
+disp(A_d,"Voltage gain ");
+A_d=abs(A_d);
+R_inf= R_in*(1+(R1+R_p)/(2*R1+R_p)*A);// in ohm
+disp(R_inf*10^-9,"Input resistance in G ohm")
+R_outf= R_out/(1+A/A_d);// in ohm
+disp(R_outf,"Output voltage in ohm")
+f_f= A*f_o/A_d;// in Hz
+disp(f_f*10^-3,"Bandwidth in kHz");
diff --git a/1850/CH3/EX3.3/exa_3_3.sce b/1850/CH3/EX3.3/exa_3_3.sce new file mode 100755 index 000000000..9e0a83a9f --- /dev/null +++ b/1850/CH3/EX3.3/exa_3_3.sce @@ -0,0 +1,23 @@ +// Exa 3.3
+clc;
+clear;
+close;
+//given data
+R1=100;// in ohm
+R_f=100;// in k ohm
+R_f=R_f*10^3;// in ohm
+A=2*10^5;
+R_in= 2;// in M ohm
+R_in=R_in*10^6;// in ohm
+R_out= 75;// in ohm
+f_o= 5;// in Hz
+B= R1/(R1+R_f);
+FeedbackFactor= A*B;
+A_f = 1+R_f/R1;
+disp(A_f,"Voltage gain")
+R_inf= R_in*(1+A*B);
+disp(R_inf*10^-6,"Input Resistance in M ohm")
+R_outf= R_out/(1+A*B);// in ohm
+disp(R_outf,"Output Resistance in ohm");
+f_f= f_o*(1+A*B);// in Hz
+disp(f_f,"Bandwidth in Hz");
diff --git a/1850/CH3/EX3.4/exa_3_4.sce b/1850/CH3/EX3.4/exa_3_4.sce new file mode 100755 index 000000000..95cb54381 --- /dev/null +++ b/1850/CH3/EX3.4/exa_3_4.sce @@ -0,0 +1,22 @@ +// Exa 3.4
+clc;
+clear;
+close;
+//given data
+R1=1;// in k ohm
+R1=R1*10^3;// in ohm
+R_f=10;// in k ohm
+R_f=R_f*10^3;// in ohm
+A=200000;
+OutputVoltageSwing= 13;// in volt
+SupplyVoltage=15;// in volt
+Ri= 2;// in M ohm
+Ri=Ri*10^6;// in ohm
+Ro= 75;// in ohm
+fo= 5;// in Hz
+B= R1/(R1+R_f);
+AB = A*B;
+R_outf= Ro/(1+A*B);// in ohm
+disp(R_outf*10^3,"Output Resistance in m ohm");
+V_ooT= OutputVoltageSwing/(1+A*B);// in volt
+disp(V_ooT*10^3,"Output offset voltage in mV");
diff --git a/1850/CH3/EX3.5/exa_3_5.sce b/1850/CH3/EX3.5/exa_3_5.sce new file mode 100755 index 000000000..27c268c5b --- /dev/null +++ b/1850/CH3/EX3.5/exa_3_5.sce @@ -0,0 +1,22 @@ +// Exa 3.5
+clc;
+clear;
+close;
+//given data
+R_in= 2;// in M ohm
+R_in=R_in*10^6;// in ohm
+R_out=75;// in ohm
+A=2*10^5;
+f_o=5;// in Hz
+// For voltage follower
+B=1; // since R_f=0
+A_f=1;
+disp(A_f,"Voltage gain :");
+R_inf= A*R_in;// in ohm
+R_inf=R_inf*10^-9;// in G ohm
+disp(R_inf,"Input resistance in G ohm");
+R_outf= R_out/A;// in ohm
+disp(R_outf,"Output resistance in ohm");
+f_f= A*f_o;// in Hz
+disp(f_f*10^-6,"Bandwidth in MHz");
+
diff --git a/1850/CH3/EX3.6/exa_3_6.sce b/1850/CH3/EX3.6/exa_3_6.sce new file mode 100755 index 000000000..f19443028 --- /dev/null +++ b/1850/CH3/EX3.6/exa_3_6.sce @@ -0,0 +1,25 @@ +// Exa 3.6
+clc;
+clear;
+close;
+//given data
+R1=330;// in ohm
+R_f=3.3;// in k ohm
+R_f=R_f*10^3;// in ohm
+R_in= 2;// in M ohm
+R_in=R_in*10^6;// in ohm
+R_out=75;// in ohm
+A=2*10^5;
+f_o=5;// in Hz
+B= R1/(R1+R_f);
+AB= A*B;
+A_f = -R_f/R1;
+disp(A_f,"Voltage gain")
+R_inf= R1;
+disp(R_inf,"Input Resistance in ohm")
+R_outf= R_out/(1+A*B);// in ohm
+disp(R_outf,"Output Resistance in ohm");
+f_f= f_o*(1+A*B);// in Hz
+disp(f_f*10^-3,"Bandwidth in kHz");
+
+
diff --git a/1850/CH3/EX3.7/exa_3_7.sce b/1850/CH3/EX3.7/exa_3_7.sce new file mode 100755 index 000000000..3b64cef2c --- /dev/null +++ b/1850/CH3/EX3.7/exa_3_7.sce @@ -0,0 +1,23 @@ +// Exa 3.7
+clc;
+clear;
+close;
+//given data
+R_in= 2;// in M ohm
+R_in=R_in*10^6;// in ohm
+R_out=75;// in ohm
+A=2*10^5;
+f_o=5;// in Hz
+R1=330;// in ohm (assuming)
+R_f=R1;
+B= R1/(R1+R_f);
+A_f = -1;
+disp(A_f,"Voltage gain")
+R_inf= R1;
+disp(R_inf,"Input Resistance in ohm")
+R_outf= R_out/(A/2);// in ohm
+disp(R_outf,"Output Resistance in ohm");
+f_f= f_o*A/2;// in Hz
+disp(f_f*10^-6,"Bandwidth in MHz");
+
+
diff --git a/1850/CH3/EX3.8/exa_3_9.sce b/1850/CH3/EX3.8/exa_3_9.sce new file mode 100755 index 000000000..0d67cdf69 --- /dev/null +++ b/1850/CH3/EX3.8/exa_3_9.sce @@ -0,0 +1,23 @@ +// Exa 3.9
+clc;
+clear;
+close;
+//given data
+R1=5;// in k ohm
+R1=R1*10^3;// in ohm
+R_f=500;// in k ohm
+R_f=R_f*10^3;// in ohm
+V_in= 0.1;// in volt
+A_f = -R_f/R1;
+OutPutResOfopamp=0;// in ohm
+disp(A_f,"Voltage gain")
+R_in= R1;// in ohm
+disp(R_in*10^-3,"Input Resistance in k ohm")
+R_out=OutPutResOfopamp;// in ohm
+disp(R_out,"Output Resistance in ohm");
+V_out= A_f*V_in;// in volt
+disp(V_out,"Output voltage in volt");
+I_in= V_in/R1;// in amp
+disp(I_in*10^3,"Input Current in mA");
+
+
diff --git a/1850/CH3/EX3.9/exa_3_9.sce b/1850/CH3/EX3.9/exa_3_9.sce new file mode 100755 index 000000000..0d67cdf69 --- /dev/null +++ b/1850/CH3/EX3.9/exa_3_9.sce @@ -0,0 +1,23 @@ +// Exa 3.9
+clc;
+clear;
+close;
+//given data
+R1=5;// in k ohm
+R1=R1*10^3;// in ohm
+R_f=500;// in k ohm
+R_f=R_f*10^3;// in ohm
+V_in= 0.1;// in volt
+A_f = -R_f/R1;
+OutPutResOfopamp=0;// in ohm
+disp(A_f,"Voltage gain")
+R_in= R1;// in ohm
+disp(R_in*10^-3,"Input Resistance in k ohm")
+R_out=OutPutResOfopamp;// in ohm
+disp(R_out,"Output Resistance in ohm");
+V_out= A_f*V_in;// in volt
+disp(V_out,"Output voltage in volt");
+I_in= V_in/R1;// in amp
+disp(I_in*10^3,"Input Current in mA");
+
+
diff --git a/1850/CH4/EX4.1/exa_4_1.sce b/1850/CH4/EX4.1/exa_4_1.sce new file mode 100755 index 000000000..682d6b49a --- /dev/null +++ b/1850/CH4/EX4.1/exa_4_1.sce @@ -0,0 +1,20 @@ +// Exa 4.1
+clc;
+clear;
+close;
+// Given data
+Vin= 0.5;// in V
+Av= 10;
+I_B_max= 1.5;// in micro amp
+I_B_max=I_B_max*10^-6;// in A
+// Let
+I1=100*I_B_max;// in A
+R1= Vin/I1;// in ohm
+Rf= Av*R1;// in ohm
+// R2= R1 || Rf = R1 (approx.)
+R2= R1;// in ohm
+disp(I1*10^6,"Value of I1 in micro amp");
+disp(R1*10^-3,"Value of R1 in kohm");
+disp(R2*10^-3,"Value of R2 in kohm");
+disp(Rf*10^-3,"Value of Rf in kohm");
+
diff --git a/1850/CH4/EX4.2/exa_4_2.sce b/1850/CH4/EX4.2/exa_4_2.sce new file mode 100755 index 000000000..4101d83c6 --- /dev/null +++ b/1850/CH4/EX4.2/exa_4_2.sce @@ -0,0 +1,29 @@ +// Exa 4.2
+clc;
+clear;
+close;
+// Given data
+Vin= 50;// in mV
+Vin = Vin*10^-3;// in V
+I_B_max= 200;// in nA
+I_B_max=I_B_max*10^-9;// in A
+I1=100*I_B_max;// in A(assumed)
+Av=100;
+R1= Vin/I1;// in Ω
+disp(R1*10^-3,"The value of R1 in kΩ is : ")
+disp("Standard value of R1 in kΩ is ")
+disp("2.2")
+R1= 2.2;// kohm (standard value)
+Rf= Av*R1;// in kohm
+disp(Rf,"The value of Rf in kΩ is : ")
+// R2 = R1 || Rf = R1 (approx)
+R2= R1;// in kohm
+disp(R2,"The value of R2 in kΩ is : ")
+Av= 20*log10(Av);// in dB
+C1= 100;// in pF
+R1= 1.5;// in kΩ
+C2= 3;// in pF
+disp(Av,"Voltage gain in dB is : ");
+disp(C1,"Value of C1 in pF is : ");
+disp(C2,"Value of C2 in pF is : ");
+disp(R1,"Value of R1 in kΩ is :")
diff --git a/1850/CH4/EX4.3/exa_4_3.sce b/1850/CH4/EX4.3/exa_4_3.sce new file mode 100755 index 000000000..58acb06a4 --- /dev/null +++ b/1850/CH4/EX4.3/exa_4_3.sce @@ -0,0 +1,13 @@ +// Exa 4.3
+clc;
+clear;
+close;
+// Given data
+A_VD= 200;// in V/mV
+A_VD=A_VD*10^3;// in V/V
+B1=1;// in MHz
+B1=B1*10^6;// in Hz
+f1=B1;
+f0= f1/A_VD;// in Hz
+disp(f0,"Cut-off frequency in Hz")
+
diff --git a/1850/CH4/EX4.4/exa_4_4.sce b/1850/CH4/EX4.4/exa_4_4.sce new file mode 100755 index 000000000..1605de6d7 --- /dev/null +++ b/1850/CH4/EX4.4/exa_4_4.sce @@ -0,0 +1,12 @@ +// Exa 4.4
+clc;
+clear;
+close;
+// Given data
+Vin= 15;// in volt
+SR= 0.8;// in V/micro sec
+SR=SR*10^6;// in V/sec
+omega= SR/Vin;
+f= omega/(2*%pi);// in Hz
+disp(f*10^-3,"Full power bandwidth in kHz")
+disp(f*10^-3,"It means that a 741 op-amp with a sinusoidal output of 15 V amplitude will begin to show slew limiting distortion if the frequency exceeds (in KHz)")
diff --git a/1850/CH4/EX4.5/exa_4_5.sce b/1850/CH4/EX4.5/exa_4_5.sce new file mode 100755 index 000000000..ca83b5698 --- /dev/null +++ b/1850/CH4/EX4.5/exa_4_5.sce @@ -0,0 +1,13 @@ +// Exa 4.5
+clc;
+clear;
+close;
+// Given data
+SR= 2;// in V/micro sec
+del_v_in= 0.5;// in volt
+del_t=10;//in micro sec
+del_v_inBYdel_t= del_v_in/del_t;// in V/micro sec
+// v_out= A_CL*v_in
+A_CL= SR/del_v_inBYdel_t;
+disp(A_CL,"Closed-loop gain ")
+disp(A_CL,"Any closed loop voltage gain of magnitude exceeding 40 would drive the output at a rate greater than the SR allows, so the maximum closed loop gain is")
diff --git a/1850/CH4/EX4.6/exa_4_6.sce b/1850/CH4/EX4.6/exa_4_6.sce new file mode 100755 index 000000000..46e52ccc7 --- /dev/null +++ b/1850/CH4/EX4.6/exa_4_6.sce @@ -0,0 +1,21 @@ +// Exa 4.6
+clc;
+clear;
+close;
+// Given data
+V_PP= 3;// in volt
+del_t= 4;// in micro sec
+// del_V= 90% of V_PP - 10% of V_PP = 0.8*V_PP
+del_V= 0.8*V_PP;
+SR_required= del_V/del_t;// in V/micro sec
+disp("The required op-amp must have an SR equal or more than "+string(SR_required)+" V/micro sec");
+
+// (i)
+disp("The 741 op-amp has an SR of 0.5 V/micro sec. It is too slow and cannot be used");
+
+// (ii)
+SR= 50;// in V/micro sec
+SR= SR*10^6;// in V/sec
+del_t= del_V/SR;// in sec
+del_t= del_t*10^9;// in ns
+disp(del_t,"The 318 op-amp has an SR of 50 V/micro sec. It is fast enough and can be used. The rese time using a 318 op-amp will be (in ns)")
diff --git a/1850/CH4/EX4.7/exa_4_7.sce b/1850/CH4/EX4.7/exa_4_7.sce new file mode 100755 index 000000000..46d77b42b --- /dev/null +++ b/1850/CH4/EX4.7/exa_4_7.sce @@ -0,0 +1,27 @@ +// Exa 4.7
+clc;
+clear;
+close;
+// Given data
+Vout= 6 ;// times Vrms
+Vin= 20*10^-3;// times Vrms
+f_max= 15;// in kHz
+f_max=f_max*10^3;// in Hz
+A_CL= Vout/Vin;// at 15 kHz
+V_out_peak= 6*1.414;
+// Formula f_max= SRmax/(2*%pi*V_out_peak)
+SRmax= f_max*2*%pi*V_out_peak*10^-6; // in V/µs
+disp("(i) The 741 has an SR of 0.5 V/µs. It is too slow and would distort the sine wave output")
+disp("(ii) The 318 has an SR of 50 V/µs. It is fast enough to develop 6 Vrms sine wave output at 15kHz")
+f1percent= f_max;// in Hz
+// f1percent= fH/7= GBW/A_CL/7= GBW/(7*A_CL)
+GBW= 7*A_CL*f1percent;// in Hz
+GBW= GBW*10^-6;// in MHz
+disp(GBW,"Gain bandwidth in MHz ")
+disp("The GBW for 318 op-amp is only 15 MHz. So even though the 318 op-amp satisfies the SR requirement");
+disp(" but it does not have a large enough gain bandwidth to provide a gain of 300 (±1%) at 15 kHz")
+GBW10= 7*10*f_max;// Gain of 10 in Hz
+GBW30= 7*30*f_max;// Gain of 30 in Hz
+disp(GBW10*10^-6,"Gain of 10 in MHz");
+disp(GBW30*10^-6,"Gain of 30 in MHz");
+disp("The 318 op-amp has a large enough gain bandwidth to operate both amplifiers.")
diff --git a/1850/CH5/EX5.1/exa_5_1.sce b/1850/CH5/EX5.1/exa_5_1.sce new file mode 100755 index 000000000..5fc37c4e7 --- /dev/null +++ b/1850/CH5/EX5.1/exa_5_1.sce @@ -0,0 +1,30 @@ +// Exa 5.1
+clc;
+clear;
+close;
+// Given data
+fo= 15;// in kHz
+fo= fo*10^3;// in Hz
+C=0.01;// in micro F
+C=C*10^-6;// in F
+L= 1/(4*%pi^2*fo^2*C);// in H
+L=ceil(L*10^3);// in mH
+// Let L be of 12 mH and internal resistance 30 ohm
+R=30;// internal resistance in ohm
+XL= 2*%pi*L*10^-3*fo;
+Q= XL/R;
+R_P= Q^2*R;// in ohm
+// If
+R1=100;// in ohm
+// Formula L= R_f*R_P/(R1*(R_f+R_P));
+R_f= R1*L*R_P/(R_P-R1*L);// in ohm
+R_f=R_f*10^3;// in kohm
+R_f= 1.2;// in k ohm (Standard value)
+disp("The values of component chosen are:-");
+disp(L,"Value of L in mH")
+disp(C*10^6,"Value of C in micro F")
+disp(R_f,"Value of L in k ohm")
+disp(R1,"Value of L in ohm")
+
+
+
diff --git a/1850/CH5/EX5.10/exa_5_10.sce b/1850/CH5/EX5.10/exa_5_10.sce new file mode 100755 index 000000000..6f418eee4 --- /dev/null +++ b/1850/CH5/EX5.10/exa_5_10.sce @@ -0,0 +1,18 @@ +// Exa 5.10
+clc;
+clear;
+close;
+// Given data
+Vin= 10;// in volt
+R=2.2;// in k ohm
+R=R*10^3;//in ohm
+Ad=10^5;// voltage gain
+T= 1;// in ms
+T=T*10^-3;// in second
+C=1;// in micro F
+C=C*10^-6;// in F
+I= Vin/R;// in volt
+V= I*T/C;// in V
+disp(V,"The output voltage at the end of the pulse in volt");
+RC_desh= R*C*Ad;
+disp(RC_desh,"The closed-loop time constant in second is");
diff --git a/1850/CH5/EX5.11/exa_5_11.sce b/1850/CH5/EX5.11/exa_5_11.sce new file mode 100755 index 000000000..f4c1e7a29 --- /dev/null +++ b/1850/CH5/EX5.11/exa_5_11.sce @@ -0,0 +1,20 @@ +// Exa 5.11
+clc;
+clear;
+close;
+// Given data
+C=0.01;// in micro F
+C=C*10^-6;// in F
+omega= 10000;// in rad/second
+// Vout/V1= (Rf/R1)/(1+s*C*Rf)
+// substituting s= j*omega we have
+// Vout/V1 = (Rf/R1)/sqrt((omega*C*Rf)^2+1)
+// At omega=0
+// Vout/V1= Rf/R1
+// Formula omega= 1/(C*Rf)
+Rf= 1/(C*omega);// in ohm
+Rf= Rf*10^-3;// in k ohm
+// 20*log10(Rf/R1) = 20
+R1= Rf/10;// in k ohm
+disp(Rf,"Value of Rf in k ohm");
+disp(R1,"Value of R1 in k ohm");
diff --git a/1850/CH5/EX5.12/exa_5_12.sce b/1850/CH5/EX5.12/exa_5_12.sce new file mode 100755 index 000000000..a08f45a4a --- /dev/null +++ b/1850/CH5/EX5.12/exa_5_12.sce @@ -0,0 +1,19 @@ +// Exa 5.12
+clear;
+clc;
+close;
+//Given Data :
+R=40*1000;//in ohm(assumed)
+C=0.2*10^-6;//IN FARAD
+Vout=3;//in Volt
+V1=Vout;//in Volt
+V2=Vout;//in Volt
+t1=0.0001:50;//in msec
+t1=t1*10^-3;//in sec
+vout=-1/R/C*integrate('2','t',0,t1)+Vout;
+t1=0.0001:50;//in msec
+plot(t1,vout);
+title("Output Voltage");
+xlabel("Time in MilliSecond");
+ylabel("Output Voltage in Volts");
+disp("Assuming Ideal op-amp, sketch for Vout is shown in figure.");
diff --git a/1850/CH5/EX5.13/exa_5_13.sce b/1850/CH5/EX5.13/exa_5_13.sce new file mode 100755 index 000000000..027a77c99 --- /dev/null +++ b/1850/CH5/EX5.13/exa_5_13.sce @@ -0,0 +1,18 @@ +// Exa 5.13
+clc;
+clear;
+close;
+// Given data
+R=50;// in k ohm
+R=R*10^3;// in ohm
+C=2;// in micro F
+C=C*10^-6;// in F
+f=2;// in kHz
+f=f*10^3;// in Hz
+Vmax= 10;// in micro volt
+CR= C*R;
+v_in= 'Vmax*sind(2*%pi*f*t)'
+v_in= '10*sind(4000*%pi*t)';// in micro volt
+// v_out= -CR*diff(v_in) = -0.1*10*diff(sind(4000*%pi*t))// in micro volt
+disp("Output Voltage")
+disp("12.56 cos(4000*pi*t)")
diff --git a/1850/CH5/EX5.14/exa_5_14.sce b/1850/CH5/EX5.14/exa_5_14.sce new file mode 100755 index 000000000..f8e281110 --- /dev/null +++ b/1850/CH5/EX5.14/exa_5_14.sce @@ -0,0 +1,32 @@ +// Exa 5.14
+clc;
+clear;
+close;
+// Given data
+fa= 1;// in kHz
+fa=fa*10^3;// in Hz
+Vp=1.5;// in volt
+f= 200;// in Hz
+C=0.1;// in micro F
+C=C*10^-6;// in F
+R= 1/(2*%pi*fa*C);// in ohm
+R=R*10^-3;// in k ohm
+R=floor(R*10)/10;// in k ohm
+fb= 20*fa;// in Hz
+R_desh= 1/(2*%pi*fb*C);// in ohm
+// Let
+R_desh= 82;// in ohm
+R_OM= R;// in k ohm
+disp(R_OM,"Value of R_OM in k ohm")
+CR= C*R;
+// Vin= Vp*sin(omega*t)= 1.5*sin(400*t)
+// v_out= -CR*diff(v_in) = -0.2827 Cos(400*%pi*t)// in micro volt
+disp("Output Voltage")
+disp("-0.2827 Cos(400*%pi*t)");
+t=-1/800:0.00001:1/200;//
+v_out=-0.2827*cos(400*%pi*t)// in micro volt
+plot(t,v_out);
+title("Output Voltage Waveform");
+xlabel("Time in ms");
+ylabel("Vout in Volts");
+disp("Output Voltage waveform is shown in figure.")
diff --git a/1850/CH5/EX5.15/exa_5_15.sce b/1850/CH5/EX5.15/exa_5_15.sce new file mode 100755 index 000000000..c61fb05eb --- /dev/null +++ b/1850/CH5/EX5.15/exa_5_15.sce @@ -0,0 +1,31 @@ +// Exa 5.15
+clc;
+clear;
+close;
+// Given data
+fa= 1;// in kHz
+fa=fa*10^3;// in Hz
+Vp=1.5;// in volt
+C=0.1;// in micro F
+C=C*10^-6;// in F
+// Part (a)
+R= 1/(2*%pi*fa*C);// in ohm
+R=R*10^-3;// in k ohm
+R=floor(R*10)/10;// in k ohm
+fb= 20*fa;// in Hz
+R_desh= 1/(2*%pi*fb*C);// in ohm
+// Let
+R_desh= 82;// in ohm
+R_OM= R;// in k ohm
+disp(R_OM,"Value of R_OM in k ohm")
+
+// Part(b)
+// given data
+Vp=1.5;// in volt
+f= 200;// in Hz
+// v_in= Vp*sin(omega*t) = sin(2*%pi*f*t) = sin(2000*omega*t)
+// v_out= -CR*diff(v_in) = -0.942 Cos(2000*%pi*t)// in micro volt
+disp("Output Voltage")
+disp("-0.942 Cos(2000*%pi*t)")
+
+
diff --git a/1850/CH5/EX5.2/exa_5_2.sce b/1850/CH5/EX5.2/exa_5_2.sce new file mode 100755 index 000000000..348bbb48c --- /dev/null +++ b/1850/CH5/EX5.2/exa_5_2.sce @@ -0,0 +1,14 @@ +// Exa 5.2
+clc;
+clear;
+close;
+// Given data
+Rf= 12;// in k ohm
+Rs1= 12;// in k ohm
+Rs2= 2;// in k ohm
+Rs3= 3;// in k ohm
+Vi1= 9;// in volt
+Vi2= -3;// in volt
+Vi3= -1;// in volt
+Vout= -Rf*[Vi1/Rs1+Vi2/Rs2+Vi3/Rs3];// in volt
+disp(Vout,"Output voltage in volt");
diff --git a/1850/CH5/EX5.3/exa_5_3.sce b/1850/CH5/EX5.3/exa_5_3.sce new file mode 100755 index 000000000..2287c0fcf --- /dev/null +++ b/1850/CH5/EX5.3/exa_5_3.sce @@ -0,0 +1,19 @@ +// Exa 5.3
+clc;
+clear;
+close;
+// Given expression Vout= -2*V1+3*V2+4*V3
+// For an operational amplifier
+// Vout= -Rf*[V1/R1+V2/R2+V3/R3]
+// Compare the above expression with the given expression for the output
+r_1=2;// value of Rf/R1
+r_2=3;// value of Rf/R2
+r_3=4;// value of Rf/R3
+// Resistance R3 will be minimum value of 10 k ohm
+R3=10;// in k ohm
+Rf= r_3*R3;// in k ohm
+R2= Rf/r_2;// in k ohm
+R1= Rf/r_1;// in k ohm
+disp(Rf,"Value of Rf in k ohm");
+disp(R2,"Value of R2 in k ohm");
+disp(R1,"Value of R1 in k ohm");
diff --git a/1850/CH5/EX5.4/exa_5_4.sce b/1850/CH5/EX5.4/exa_5_4.sce new file mode 100755 index 000000000..18a27f27e --- /dev/null +++ b/1850/CH5/EX5.4/exa_5_4.sce @@ -0,0 +1,17 @@ +// Exa 5.4
+clc;
+clear;
+close;
+// Given data
+V1= 2;// in volt
+V2= -1;// in volt
+// Let R1= (R||R)/(R+(R||R))= (R/2)/(R+R/2) = 1/3
+R1=1/3;
+Vs1= V1*R1;// in volt
+// Let R2= (1+Rf/R)= (1+2*R/R)= 3
+R2= 3;
+Vo_desh= Vs1*R2;// in volt
+Vs2= V2*R1;// in volt
+Vo_doubleDesh= Vs2*R2;// in volt
+V_out= Vo_desh+Vo_doubleDesh;// in volt
+disp(V_out,"Output voltage in volt")
diff --git a/1850/CH5/EX5.5/exa_5_5.sce b/1850/CH5/EX5.5/exa_5_5.sce new file mode 100755 index 000000000..bbcd58398 --- /dev/null +++ b/1850/CH5/EX5.5/exa_5_5.sce @@ -0,0 +1,12 @@ +// Exa 5.5
+clc;
+clear;
+close;
+// Given expression Vout= 10*(V2-V1)
+// For a differential amplifier circuit
+// Vout= Rf/R*(V2-V1)
+// Compare the above expression with the given expression for the output, we have
+RfbyR= 10;
+R=10;// minimum value of resistancce to be used in kohm
+Rf= RfbyR * R;// in k ohm
+disp(Rf,"Value of Rf in k ohm");
diff --git a/1850/CH5/EX5.6/exa_5_6.sce b/1850/CH5/EX5.6/exa_5_6.sce new file mode 100755 index 000000000..a8a2dc352 --- /dev/null +++ b/1850/CH5/EX5.6/exa_5_6.sce @@ -0,0 +1,12 @@ +// Exa 5.6
+clc;
+clear;
+close;
+// Given data
+R= 10;// in k ohm
+Rp= 1;// in k ohm
+// Let R1= (1+2*R/Rp)
+R1= (1+2*R/Rp);
+// output voltage, V5= R1*(V2-V1)
+disp("Output voltage in volt is : "+string(R1)+"*(V2-V1)");
+
diff --git a/1850/CH5/EX5.7/exa_5_7.sce b/1850/CH5/EX5.7/exa_5_7.sce new file mode 100755 index 000000000..5cbaa7b1c --- /dev/null +++ b/1850/CH5/EX5.7/exa_5_7.sce @@ -0,0 +1,31 @@ +// Exa 5.7
+clc;
+clear;
+close;
+// Given data
+R1= 50;// in kohm
+// Let us choose
+R3= 15;// in k ohm
+R4= R3;
+// Ad= 1+2*R2/R1 (i)
+// Ad= ((1+2*R2/R1)*(V2-V1))/(V2-V1)= 1+2*R2/R1
+// For minimum differential voltage gain
+Ad_min=5;
+Ad= Ad_min;
+R1_max= R1;// since Ad will be minimum only when R1 will be maximum
+// Putting values of Ad and R1 in eq(i)
+R2= (Ad-1)*R1/2;// in k ohm
+// For maximum differential voltage gain
+Ad_max=200;
+Ad= Ad_min;
+// Putting values of Ad and R2 in eq(i)
+R1= 2*R2/(Ad-1);// in k ohm
+R1=floor(R1);
+// For maximum value of Ad, R1 will have minimum value , therefore
+R1_min= 1;// in kohm
+disp("Value of R1_min is : "+string(R1_min)+" k ohm");
+disp("Value of R1 is : "+string(R1)+"-50 k ohm");
+disp("Value of R2 is : "+string(R2)+" k ohm");
+disp("Value of R3 is : "+string(R3)+" k ohm");
+disp("Value of R4 is : "+string(R4)+" k ohm");
+
diff --git a/1850/CH5/EX5.9/exa_5_9.sce b/1850/CH5/EX5.9/exa_5_9.sce new file mode 100755 index 000000000..ea641d88c --- /dev/null +++ b/1850/CH5/EX5.9/exa_5_9.sce @@ -0,0 +1,17 @@ +// Exa 5.9
+clc;
+clear;
+close;
+// Given data
+R=50;// in k ohm
+R=R*10^3;// in ohm
+C=2;// in micro F
+C=C*10^-6;// in F
+f=2;// in kHz
+f=f*10^3;// in Hz
+Vrms= 10;// in mV
+RC= R*C;
+// v_out= -1/(RC)*integrate('sqrt(2)*10*sind(4000*%pi*t)','t',0,t)= 0.0113*(cosd(4000*t)-1) in mV
+disp("Output voltage in mV is : 0.0113*(cosd(4000*t)-1)")
+
+
diff --git a/1850/CH6/EX6.1/exa_6_1.sce b/1850/CH6/EX6.1/exa_6_1.sce new file mode 100755 index 000000000..d2def07a8 --- /dev/null +++ b/1850/CH6/EX6.1/exa_6_1.sce @@ -0,0 +1,24 @@ +// Exa 6.1
+clc;
+clear;
+close;
+// Given Data
+f_H= 2;// in kHz
+f_H= f_H*10^3;// in Hz
+C=0.01;// in micro F
+C=C*10^-6;// in F
+R= 1/(2*%pi*f_H*C);// in ohm
+R=R*10^-3;// in kohm
+// R may be taken a pot of 10 k ohm
+R=10;// in k ohm
+// Since the passbond gain is 2.5, so
+// 1+Rf/R1= 2.5 or Rf= 1.5*R1
+// Since Rf||R1
+R1= R*2.5/1.5;// in k ohm
+Rf= R1*1.5;// in k ohm
+disp("Value of R1 is : "+string(R1)+" k ohm")
+disp("Value of Rf is : "+string(Rf)+" k ohm")
+
+
+
+
diff --git a/1850/CH6/EX6.11/exa_6_11.sce b/1850/CH6/EX6.11/exa_6_11.sce new file mode 100755 index 000000000..9271618f3 --- /dev/null +++ b/1850/CH6/EX6.11/exa_6_11.sce @@ -0,0 +1,11 @@ +// Exa 6.11
+clc;
+clear;
+close;
+// Given Data
+fL= 200;// in Hz
+fH= 1;// in kHz
+fH=fH*10^3;// in Hz
+fc= sqrt(fL*fH);// in Hz
+Q= fc/(fH-fL);
+disp(Q,"The value of Q for filter")
diff --git a/1850/CH6/EX6.12/exa_6_12.sce b/1850/CH6/EX6.12/exa_6_12.sce new file mode 100755 index 000000000..17887b328 --- /dev/null +++ b/1850/CH6/EX6.12/exa_6_12.sce @@ -0,0 +1,20 @@ +// Exa 6.12
+clc;
+clear;
+close;
+// Given Data
+format('v',5)
+fH= 200;// in Hz
+fL= 2;// in kHz
+fL=fL*10^3;// in Hz
+C= 0.05;// in micro F
+C=C*10^-6;// in F
+R_desh= 1/(2*%pi*fH*C);// in ohm
+R_desh=R_desh*10^-3;// in kohm
+R= 1/(2*%pi*fL*C);// in ohm
+R=R*10^-3;// in kohm
+disp(R_desh,"Value of R_desh in kohm");
+disp("Or 18 kohm (Standard value)")
+disp(R,"Value of R in kohm");
+disp("Or 1.8 kohm (Standard value)")
+
diff --git a/1850/CH6/EX6.13/exa_6_13.sce b/1850/CH6/EX6.13/exa_6_13.sce new file mode 100755 index 000000000..8bf8300c4 --- /dev/null +++ b/1850/CH6/EX6.13/exa_6_13.sce @@ -0,0 +1,14 @@ +// Exa 6.13
+clc;
+clear;
+close;
+// Given Data
+format('v',7)
+fN= 50;// in Hz
+C= 0.068;// in micro F
+C=C*10^-6;// in F
+R= 1/(2*%pi*fN*C);// in ohm
+R=R*10^-3;// in kohm
+R=ceil(R)
+disp(R,"Value of R in kohm");
+disp("For R/2, two "+string(R)+" kohm resistors connected in parallel may be used and for 2C component, two parallel connected 0.068 micro F capacitors may be used")
diff --git a/1850/CH6/EX6.14/exa_6_14.sce b/1850/CH6/EX6.14/exa_6_14.sce new file mode 100755 index 000000000..91d754654 --- /dev/null +++ b/1850/CH6/EX6.14/exa_6_14.sce @@ -0,0 +1,15 @@ +// Exa 6.14
+clc;
+clear;
+close;
+// Given Data
+format('v',7)
+fN= 60;// in Hz
+// Let
+C= 0.06;// in micro F
+C=C*10^-6;// in F
+R= 1/(2*%pi*fN*C);// in ohm
+R=R*10^-3;// in kohm
+disp(R,"Value of R in kohm");
+disp("Or 47 kohm (Standard value)")
+disp("For R/2, two 47 kohm resistors connected in parallel may be used and for 2C component, two parallel connected 0.06 micro F capacitors may be used")
diff --git a/1850/CH6/EX6.15/exa_6_15.sce b/1850/CH6/EX6.15/exa_6_15.sce new file mode 100755 index 000000000..b1c07501e --- /dev/null +++ b/1850/CH6/EX6.15/exa_6_15.sce @@ -0,0 +1,16 @@ +// Exa 6.15
+clc;
+clear;
+close;
+// Given Data
+format('v',7)
+f= 2;// in kHz
+f=f*10^3;// in Hz
+C= 0.01;// in micro F
+C=C*10^-6;// in F
+R= 15;// in kohm
+R=R*10^3;// in ohm
+fie= -2*atand(2*%pi*f*R*C);
+fie= ceil(fie);
+disp(fie,"Phase shift in °");
+disp("i.e. "+string(abs(fie))+"° (lagging)")
diff --git a/1850/CH6/EX6.2/exa_6_2.sce b/1850/CH6/EX6.2/exa_6_2.sce new file mode 100755 index 000000000..6f2d2e4da --- /dev/null +++ b/1850/CH6/EX6.2/exa_6_2.sce @@ -0,0 +1,20 @@ +// Exa 6.2
+clc;
+clear;
+close;
+// Given Data
+f_H= 2;// in kHz
+f_H= f_H*10^3;// in Hz
+C=0.033;// in micor F
+C=C*10^-6;// in F
+C_desh= C;
+R= 1/(2*%pi*f_H*C);// in ohm
+R=R*10^-3;// in kohm
+R=2.7;// k ohm (Standard value)
+R_desh= R;
+// So 2*R= Rf*R1/(Rf+R1) = 0.586*R1^2/(1.586*R1)
+R1= 2*R*1.586/(0.586);// in k ohm
+R1= 15;// k ohm (Standard value)
+Rf= 0.586*R1;// in k ohm
+Rf= 10;// k ohm (Standard value)
+disp("Rf may be taken as a pot of : "+string(Rf)+" k ohm")
diff --git a/1850/CH6/EX6.3/exa_6_3.sce b/1850/CH6/EX6.3/exa_6_3.sce new file mode 100755 index 000000000..cf71350e9 --- /dev/null +++ b/1850/CH6/EX6.3/exa_6_3.sce @@ -0,0 +1,21 @@ +// Exa 6.3
+clc;
+clear;
+close;
+// Given Data
+f_H= 1;// in kHz
+f_H= f_H*10^3;// in Hz
+C=0.0047;// in micro F
+C=C*10^-6;// in F
+C_desh= C;
+R= 1/(2*%pi*f_H*C);// in ohm
+R=R*10^-3;// in kohm
+R=floor(R);
+R_desh= R;
+R1=R ;// in k ohm
+Rf= 0.586*R1;// in k ohm
+Rf= ceil(Rf);// in k ohm
+disp(R,"Value of R in k ohm");
+disp(C*10^6,"Value of R in micro F");
+disp(R1,"Value of R1 in k ohm");
+disp(Rf,"Value of Rf in k ohm");
diff --git a/1850/CH6/EX6.4/exa_6_4.sce b/1850/CH6/EX6.4/exa_6_4.sce new file mode 100755 index 000000000..0fd77ec75 --- /dev/null +++ b/1850/CH6/EX6.4/exa_6_4.sce @@ -0,0 +1,18 @@ +// Exa 6.4
+clc;
+clear;
+close;
+// Given Data
+f= 1;// in kHz
+f= f*10^3;// in Hz
+// Vout/Vin= 10
+R1= 100;// in k ohm
+R1=R1*10^3;// in ohm
+R2= 1000;// in k ohm
+R2=R2*10^3;// in ohm
+omega= 2*%pi*f;
+// Vout/Vin at a 3 dB frequency of 1 kHz = 1/sqrt(2) = omega*R2*C/sqrt(1+omega^2*R1^2*C2)
+C= sqrt(1/(omega^2*(2*R2^2-R1^2)));// in F
+disp(R1*10^-3,"Value of R1 in k ohm");
+disp(R2*10^-6,"Value of R2 in k ohm");
+disp(C,"Value of C in k ohm");
diff --git a/1850/CH6/EX6.5/exa_6_5.sce b/1850/CH6/EX6.5/exa_6_5.sce new file mode 100755 index 000000000..fde03a624 --- /dev/null +++ b/1850/CH6/EX6.5/exa_6_5.sce @@ -0,0 +1,15 @@ +// Exa 6.5
+clc;
+clear;
+close;
+// Given Data
+R= 2.1;// in k ohm
+R=R*10^3;// in ohm
+R1= 20;// in k ohm
+R1=R1*10^3;// in ohm
+Rf= 60;// in k ohm
+Rf=Rf*10^3;// in ohm
+C=0.05;// in micro F
+C=C*10^-6;// in F
+fL= 1/(2*%pi*R*C);// in Hz
+disp(fL*10^-3,"Low cut-off frequency in kHz")
diff --git a/1850/CH6/EX6.6/exa_6_6.sce b/1850/CH6/EX6.6/exa_6_6.sce new file mode 100755 index 000000000..e206993a3 --- /dev/null +++ b/1850/CH6/EX6.6/exa_6_6.sce @@ -0,0 +1,18 @@ +// Exa 6.6
+clc;
+clear;
+close;
+// Given Data
+R= 10;// in k ohm
+R=R*10^3;// in ohm
+R_desh= R;// in ohm
+C=0.1;// in micro F
+C=C*10^-6;// in F
+C_desh=0.0025;// in micro F
+C_desh=C_desh*10^-6;// in F
+fH= 1/(2*%pi*R_desh*C_desh);// in Hz
+disp(fH*10^-3,"Higher cut-off frequency in kHz")
+fL= 1/(2*%pi*R*C);// in Hz
+disp(fL,"Lower cut-off frequency in Hz")
+BW= fH-fL;
+disp(BW*10^-3,"Bandwidth in kHz")
diff --git a/1850/CH6/EX6.7/exa_6_7.sce b/1850/CH6/EX6.7/exa_6_7.sce new file mode 100755 index 000000000..09d2299b3 --- /dev/null +++ b/1850/CH6/EX6.7/exa_6_7.sce @@ -0,0 +1,30 @@ +// Exa 6.7
+clc;
+clear;
+close;
+// Given Data
+fc= 1;// in kHz
+fc=fc*10^3;// in Hz
+Q=5;
+Af=8;
+// Let C=C1=C2=0.01 // in micro F
+C1= 0.01;// in micro F
+C1=C1*10^-6;// in F
+C2=C1;// in F
+C=C2;// in F
+R1= Q/(2*%pi*fc*C*Af);// in ohm
+R1=R1*10^-3;// in kohm
+R1=ceil(R1);
+R2= Q/(2*%pi*fc*C*(2*Q^2-Af));// in ohm
+R2=R2*10^-3;// in kohm
+R2=ceil(R2);
+R3= Q/(%pi*fc*C);// in ohm
+R3=R3*10^-3;// in kohm
+R3=ceil(R3);
+// The value of R2_desh required to change the centre frequency from 1 kHz to 2 kHz is
+f_desh_c= 2000;// in Hz
+R2_desh= R2*(fc/f_desh_c)^2;// in kohm
+disp(R1,"Value of R1 in kohm");
+disp(R2,"Value of R2 in kohm");
+disp(R3,"Value of R3 in kohm");
+disp(R2_desh,"Value of R2_desh in kohm");
diff --git a/1850/CH6/EX6.8/exa_6_8.sce b/1850/CH6/EX6.8/exa_6_8.sce new file mode 100755 index 000000000..2941e9aa5 --- /dev/null +++ b/1850/CH6/EX6.8/exa_6_8.sce @@ -0,0 +1,26 @@ +// Exa 6.8
+clc;
+clear;
+close;
+// Given Data
+C= 0.1;// in micro F
+C=C*10^-6;// in F
+R1= 2;// in kohm
+R1=R1*10^3;// in ohm
+R2= 2/3;// in kohm
+R2=R2*10^3;// in ohm
+R3= 200;// in kohm
+R3=R3*10^3;// in ohm
+// R1= Q/(2*%pi*fc*C*Af) (i)
+// R2= Q/(2*%pi*fc*C*(2*Q^2-Af)) (ii)
+// R3= Q/(%pi*fc*C) (iii)
+// From (i) and (iii)
+Af= R3/(2*R1);
+// From (ii) and (iii)
+Q= sqrt(1/2*(R3/(2*R2)+Af));
+// From (iii)
+fc= Q/(R3*%pi*C);// in Hz
+omega_o= 2*%pi*fc;// in radians/second
+disp(Af,"Gain");
+disp(Q,"Value of Q");
+disp(omega_o,"Centre frequency in radians/second")
diff --git a/1850/CH6/EX6.9/exa_6_9.sce b/1850/CH6/EX6.9/exa_6_9.sce new file mode 100755 index 000000000..67d2158a2 --- /dev/null +++ b/1850/CH6/EX6.9/exa_6_9.sce @@ -0,0 +1,23 @@ +// Exa 6.9
+clc;
+clear;
+close;
+// Given Data
+fL= 200;// in Hz
+fH= 1;// in kHz
+fH=fH*10^3;// in Hz
+//Let the capacitor C_desh be of 0.01 micro F
+C_desh= 0.01*10^-6;// in F
+R_desh= 1/(2*%pi*fH*C_desh);// in ohm
+R_desh=R_desh*10^-3;// in kohm
+R_desh= 18;// in kohm
+// Let
+C=0.05*10^-6;// in F
+R= 1/(2*%pi*fL*C);// in ohm
+R=R*10^-3;// in kohm
+R= 18;// in k ohm
+Rf= 10;// in kohm
+disp(Rf,"Value of Rf, Rf_desh, R1 and R1_desh in kohm");
+disp(R,"Value of R and R_desh in kohm");
+disp(C_desh*10^6,"Value of C_desh in micro F")
+disp(C*10^6,"Value of C in micro F")
diff --git a/1850/CH7/EX7.1/exa_7_1.sce b/1850/CH7/EX7.1/exa_7_1.sce new file mode 100755 index 000000000..4856eecce --- /dev/null +++ b/1850/CH7/EX7.1/exa_7_1.sce @@ -0,0 +1,20 @@ +// Exa 7.1
+clc;
+clear;
+close;
+//given data
+f=200;// in Hz
+// Let us take
+C=0.1;// in micro F
+C=C*10^-6;// in F
+R=1/(2*%pi*f*C*sqrt(6));// in ohm
+R=R*10^-3;// in k ohm
+// R1>=10*R, Let
+R1=10*R;// in kohm
+R_f= 29*R1;// in k ohm
+R_f=R_f*10^-3; // in M ohm
+R_f=ceil(R_f);
+disp(R_f,"Resistor of phase-shift oscillator in Mohm")
+
+
+
diff --git a/1850/CH7/EX7.11/exa_7_11.sce b/1850/CH7/EX7.11/exa_7_11.sce new file mode 100755 index 000000000..9d1acbd97 --- /dev/null +++ b/1850/CH7/EX7.11/exa_7_11.sce @@ -0,0 +1,21 @@ +// Exa 7.11
+clc;
+clear;
+close;
+//given data
+C1= 0.01;// in microF
+C1=C1*10^-6;// in F
+R1=120;// in kohm
+R1=R1*10^3;// in ohm
+R2=1.2;// in kohm
+R2=R2*10^3;// in ohm
+R3=6.8;// in kohm
+R3=R3*10^3;// in ohm
+V_sat= 15;// in volt
+// Part(a)
+Vp_p= 2*(R2/R3)*V_sat;//in volt
+disp(Vp_p,"Peak to peak amplitude of triangular wave in volt")
+
+// Part(b)
+fo= R3/(4*R1*C1*R2);//in Hz
+disp(fo*10^-3,"Frequency of triangular wave in kHz");
diff --git a/1850/CH7/EX7.12/exa_7_12.sce b/1850/CH7/EX7.12/exa_7_12.sce new file mode 100755 index 000000000..19d26429a --- /dev/null +++ b/1850/CH7/EX7.12/exa_7_12.sce @@ -0,0 +1,18 @@ +// Exa 7.12
+clc;
+clear;
+close;
+//given data
+T= 100;// in micro sec
+T=T*10^-6;//in se
+V_sat= 12;// in volt
+V1= 0.7;// in volt
+V= 0.7;// in volt
+V_D1= V;
+V_D2=V_D1;
+C1= 0.1;// in microF
+C1=C1*10^-6;// in F
+Bita1= 0.1;
+// Formula T= R3*C1*log((1+V1/V_sat)/(1-Bita1))
+R3= T/(C1*log((1+V1/V_sat)/(1-Bita1)));// in ohm
+disp(R3*10^-3,"Value of R3 in kohm")
diff --git a/1850/CH7/EX7.2/exa_7_2.sce b/1850/CH7/EX7.2/exa_7_2.sce new file mode 100755 index 000000000..e29ff2af3 --- /dev/null +++ b/1850/CH7/EX7.2/exa_7_2.sce @@ -0,0 +1,33 @@ +// Exa 7.2
+clc;
+clear;
+close;
+//given data
+f=1;// in kHz
+f=f*10^3;// in Hz
+V_CC= 10;// in volt
+I_B_max= 500;// in nA (for 741 IC op-amp)
+I_B_max= I_B_max*10^-9;// in A
+I1= 100*I_B_max;// in A
+V_out= (V_CC-1);// in volt
+V_in= V_out/29;
+R1= V_in/I1;// in ohm
+R1=R1*10^-3;//in k ohm
+// 5.6 k ohm resistor may be used for R1, being standard value resistor
+R1=5.6;// in k ohm (standard value)
+A=29;
+R_f= A*R1;
+// 180 k ohm resistor may be used to provide A > 29
+R_f=180;// in k ohm (standard value)
+R_comp= R_f;
+R=R1;// in k ohm
+R=R*10^3;// in ohm
+C=1/(2*%pi*f*R*sqrt(6));// in F
+C=C*10^6;// in micro F
+disp(R_comp,"Value of R_comp and R_f in kohm");
+disp(R*10^-3,"Value of R and R1 in kohm");
+disp(C,"Used capacitor in micro F")
+
+
+
+
diff --git a/1850/CH7/EX7.3/exa_7_3.sce b/1850/CH7/EX7.3/exa_7_3.sce new file mode 100755 index 000000000..9895b5acb --- /dev/null +++ b/1850/CH7/EX7.3/exa_7_3.sce @@ -0,0 +1,28 @@ +// Exa 7.3
+clc;
+clear;
+close;
+//given data
+f=10;// in kHz
+f=f*10^3;// in Hz
+I_Bmax= 500;// in nA
+I_Bmax= I_Bmax*10^-9;// in amphere
+// Let current through resistor R1 be equal to 100 times I_Bmax, so
+I_1= 100*I_Bmax;// in amp
+Vcc= 10;// in volt
+Vout= Vcc-1;// in volt
+Addition_RfR1= Vout/(500*10^-6);// value of Rf+R1 in ohm
+Addition_RfR1=Addition_RfR1*10^-3;// in kohm
+// Rf= 2*R1, So
+R1= Addition_RfR1/3;// (used 5.6 kohm Standard value resistor)
+R1= 5.6;// in kohm
+Rf= 2*R1;// in kohm// (used 12 kohm standard value resistor)
+Rf=ceil(Rf);
+R=R1;// in kohm
+C= 1/(2*%pi*f*R);// in F (Used 2700pF standard value)
+C=2700;// in pF
+disp(R1,"Value of R1 in kohm")
+disp(Rf,"Value of Rf in kohm")
+disp(R,"Value of R in kohm")
+disp(C,"Value of C in pF")
+
diff --git a/1850/CH7/EX7.4/exa_7_4.sce b/1850/CH7/EX7.4/exa_7_4.sce new file mode 100755 index 000000000..2b9eb3603 --- /dev/null +++ b/1850/CH7/EX7.4/exa_7_4.sce @@ -0,0 +1,12 @@ +// Exa 7.4
+clc;
+clear;
+close;
+//given data
+R= 1;// in kohm
+R=R*10^3;// in ohm
+C= 4.7;// in micro F
+C=C*10^-6;// in F
+omega=1/(R*C);// in radians/second
+f=omega/(2*%pi);// in Hz
+disp(f,"Frequency of the oscillation of the circuit in Hz")
diff --git a/1850/CH7/EX7.6/exa_7_6.sce b/1850/CH7/EX7.6/exa_7_6.sce new file mode 100755 index 000000000..0aa2c76d9 --- /dev/null +++ b/1850/CH7/EX7.6/exa_7_6.sce @@ -0,0 +1,11 @@ +// Exa 7.6
+clc;
+clear;
+close;
+//given data
+R= 10;// in kohm
+R=R*10^3;// in ohm
+C= 100;// in pF
+C=C*10^-12;// in F
+f=1/(2*%pi*R*C);// in Hz
+disp(f*10^-3,"Frequency of the oscillation of the circuit in kHz")
diff --git a/1850/CH7/EX7.7/exa_7_7.sce b/1850/CH7/EX7.7/exa_7_7.sce new file mode 100755 index 000000000..ea0c1f66e --- /dev/null +++ b/1850/CH7/EX7.7/exa_7_7.sce @@ -0,0 +1,13 @@ +// Exa 7.7
+clc;
+clear;
+close;
+//given data
+fo= 318;// in Hz
+C= 0.015;// in microF
+C=C*10^-6;// in F
+R=0.159/(fo*C);// in ohm
+R=R*10^-3;// in kohm
+R=floor(R);
+disp(C*10^6,"Value of C1, C2 and C3 in micro F");
+disp(R,"Value of R1, R2 and R3 in kohm")
diff --git a/1850/CH7/EX7.8/exa_7_8.sce b/1850/CH7/EX7.8/exa_7_8.sce new file mode 100755 index 000000000..ade7cc038 --- /dev/null +++ b/1850/CH7/EX7.8/exa_7_8.sce @@ -0,0 +1,15 @@ +// Exa 7.8
+clc;
+clear;
+close;
+//given data
+fo= 1.5;// in kHz
+fo=fo*10^3;// in Hz
+
+C= 0.01;// in microF
+C=C*10^-6;// in F
+R=0.159/(fo*C);// in ohm
+R=R*10^-3;// in kohm
+R=floor(R);
+disp(C*10^6,"Value of C1, C2 and C3 in micro F");
+disp(R,"Value of R1, R2 and R3 in kohm")
diff --git a/1850/CH7/EX7.9/exa_7_9.sce b/1850/CH7/EX7.9/exa_7_9.sce new file mode 100755 index 000000000..74d640cae --- /dev/null +++ b/1850/CH7/EX7.9/exa_7_9.sce @@ -0,0 +1,25 @@ +// Exa 7.9
+clc;
+clear;
+close;
+//given data
+C= 0.1;// in microF
+C=C*10^-6;// in F
+R=12;// in kohm
+R=R*10^3;// in ohm
+R1=120;// in kohm
+R1=R1*10^3;// in ohm
+Rf=1;// in Mohm
+Rf=Rf*10^6;// in ohm
+V_sat= 10;// in volt
+// Part(i)
+f=Rf/(4*R1*R*C);//in Hz
+disp(f*10^-3,"Signal Frequency in kHz")
+
+// Part(ii)
+Vp_p= 2*R1*V_sat/Rf;// in Vp_p
+disp(Vp_p,"Amplitude of the triangular wave in Vp_p")
+
+// Part(iii)
+Vp_p= (V_sat)-(-V_sat);
+disp(Vp_p,"Amplitude of the square wave in Vp_p")
diff --git a/1850/CH8/EX8.10/exa_8_10.sce b/1850/CH8/EX8.10/exa_8_10.sce new file mode 100755 index 000000000..db9f82ebc --- /dev/null +++ b/1850/CH8/EX8.10/exa_8_10.sce @@ -0,0 +1,12 @@ +// Exa 8.10
+clc;
+clear;
+close;
+//given data
+V_REF= -5;// in V
+V_B= 0;// in volt
+V_A= -5;// in volt
+V_C=V_A;
+V_D=V_C;
+Vout= -1*(V_A+V_B/2+V_C/4+V_D/8);// in volt
+disp(Vout,"Output voltage in volt")
diff --git a/1850/CH8/EX8.11/exa_8_11.sce b/1850/CH8/EX8.11/exa_8_11.sce new file mode 100755 index 000000000..97b9645e9 --- /dev/null +++ b/1850/CH8/EX8.11/exa_8_11.sce @@ -0,0 +1,33 @@ +// Exa 8.11
+clc;
+clear;
+close;
+//given data
+Dn=16;// in volt
+MSB1= Dn/2;// in volt
+disp(MSB1,"The first MSB output in volt")
+MSB2= Dn/4;// in volt
+disp(MSB2,"The second MSB output in volt")
+MSB3= Dn/8;// in volt
+disp(MSB3,"The third MSB output in volt")
+MSB4= Dn/16;// in volt
+disp(MSB4,"The forth MSB output in volt")
+MSB5= Dn/32;// in volt
+disp(MSB5,"The fifth MSB output in volt")
+MSB6= Dn/64;// in volt
+disp(MSB6,"The sixth MSB (LSB) output in volt")
+resolution= MSB6;// in volt
+disp(resolution,"The resolution in volt")
+fullScaleOutput= MSB1+MSB2+MSB3+MSB4+MSB5+MSB6;
+disp(fullScaleOutput,"Full scale output occurs for digital input of 111111 in volt");
+// For digital input 101011
+D0=16;
+D1=16;
+D2=0;
+D3=16;
+D4=0;
+D5=16;
+
+Vout= (D0*2^0 + D1*2^1 + D2*2^2 + D3*2^3 + D4*2^4 + D5*2^5)/2^6;// in volt
+disp(Vout,"The voltage output for a digital input of 101011 in volt")
+
diff --git a/1850/CH8/EX8.12/exa_8_12.sce b/1850/CH8/EX8.12/exa_8_12.sce new file mode 100755 index 000000000..abbf475b1 --- /dev/null +++ b/1850/CH8/EX8.12/exa_8_12.sce @@ -0,0 +1,38 @@ +// Exa 8.12
+clc;
+clear;
+close;
+//given data
+// For the word 100100
+N=6;// Number of bits
+a5= 1;// Value of bits
+a4= 0;// Value of bits
+a3= 0;// Value of bits
+a2= 1;// Value of bits
+a1= 0;// Value of bits
+a0= 0;// Value of bits
+Vo= 3.6;// in volt
+// Formula Vo= (2^(N-1)*a5 + 2^(N-2)*a4 + 2^(N-3)*a3 + 2^(N-4)*a2 + 2^(N-5)*a1 + 2^(N-6)*a0 ) * K
+K= Vo/(2^(N-1)*a5 + 2^(N-2)*a4 + 2^(N-3)*a3 + 2^(N-4)*a2 + 2^(N-5)*a1 + 2^(N-6)*a0 );
+// For the word 110011
+N=6;// Number of bits
+a5= 1;// Value of bits
+a4= 1;// Value of bits
+a3= 0;// Value of bits
+a2= 0;// Value of bits
+a1= 1;// Value of bits
+a0= 1;// Value of bits
+Vo= (2^(N-1)*a5 + 2^(N-2)*a4 + 2^(N-3)*a3 + 2^(N-4)*a2 + 2^(N-5)*a1 + 2^(N-6)*a0 ) * K;// in volt
+disp(Vo,"The value of Vo for the word 110011 in volt")
+
+// Part(ii)
+// For the word 1010
+N=4;// Number of bits
+a3= 1;// Value of bits
+a2= 0;// Value of bits
+a1= 1;// Value of bits
+a0= 0;// Value of bits
+VR= 6;// in volt
+Vo= VR/2^N*( 2^(N-1)*a3 + 2^(N-2)*a2 + 2^(N-3)*a1 + 2^(N-4)*a0 );
+disp(Vo,"Value of output voltage in volt")
+
diff --git a/1850/CH8/EX8.13/exa_8_13.sce b/1850/CH8/EX8.13/exa_8_13.sce new file mode 100755 index 000000000..53891f245 --- /dev/null +++ b/1850/CH8/EX8.13/exa_8_13.sce @@ -0,0 +1,14 @@ +// Exa 8.13
+clc;
+clear;
+close;
+//given data
+R=100;// in kohm
+R=R*10^3;// in ohm
+C= 1;// in micro F
+C=C*10^-6;// in F
+V_REF= 5;// in volt
+t=0.2;// time taken to read an unknown voltage in second
+T=R*C;// in second
+Vx= T/t*V_REF;// in volt
+disp(Vx,"Unknown voltage in volt")
diff --git a/1850/CH8/EX8.14/exa_8_14.sce b/1850/CH8/EX8.14/exa_8_14.sce new file mode 100755 index 000000000..e1ecb2471 --- /dev/null +++ b/1850/CH8/EX8.14/exa_8_14.sce @@ -0,0 +1,25 @@ +// Exa 8.14
+clc;
+clear;
+close;
+//given data
+f=75;// in MHz
+f=f*10^6;// in Hz
+// For an 8-bit converter reference voltage
+V_REF= 100;// in volt
+// For setting D7=1
+Vo_7= V_REF*2^7/2^8;//in volt
+// For setting D6=1
+Vo_6= V_REF*2^6/2^8;//in volt
+// For setting D7=1 and D6=1
+Vo_76= Vo_7+Vo_6;//in volt
+// For setting D5=1 D6=1 and D7=1
+Vo_5= V_REF*2^5/2^8+Vo_7+Vo_6;//in volt
+disp(Vo_7,"For setting D7=1 output voltage in volt is :")
+disp(Vo_6,"For setting D6=1 output voltage in volt is :")
+disp(Vo_76,"For setting D7=1 and D6=1 output voltage in volt is :")
+disp(Vo_5,"For setting D5=1, D6=1 and D7=1 output voltage in volt is :")
+disp("All other digits will be set to zero or 1. Output will be accordingly indicated as a resul of successive approximation. The converted 8-bit digital form will be 1110010")
+T=1/f;// in sec
+disp(T*10^9,"Conversion time in ns")
+
diff --git a/1850/CH8/EX8.15/exa_8_15.sce b/1850/CH8/EX8.15/exa_8_15.sce new file mode 100755 index 000000000..f02fb4b51 --- /dev/null +++ b/1850/CH8/EX8.15/exa_8_15.sce @@ -0,0 +1,12 @@ +// Exa 8.15
+clc;
+clear;
+close;
+//given data
+f=1;// in MHz
+f=f*10^6;// in Hz
+T=1/f;// conversion time in sec
+N=8;// number of bits
+tc= N*T;// in sec
+disp(tc*10^6,"Time of Conversion in micro sec : ");
+
diff --git a/1850/CH8/EX8.16/exa_8_16.sce b/1850/CH8/EX8.16/exa_8_16.sce new file mode 100755 index 000000000..98d31d492 --- /dev/null +++ b/1850/CH8/EX8.16/exa_8_16.sce @@ -0,0 +1,15 @@ +// Exa 8.16
+clc;
+clear;
+close;
+//given data
+Vin= 2;//in volt
+Vout= 10;//in volt
+R=100;// in kohm
+R=R*10^3;//in ohm
+C=0.1;// in micro F
+C=C*10^-6;//in F
+// Formula Vout = -1/(R*C)*integrate('Vin','t',0,t) = -Vin*t/(R*C)
+t= Vout*R*C/Vin;// in sec
+disp(t,"The maximum time upto which the reference voltage can be integrated in second")
+disp(t*10^3,"Or in mili seconds ")
diff --git a/1850/CH8/EX8.17/exa_8_17.sce b/1850/CH8/EX8.17/exa_8_17.sce new file mode 100755 index 000000000..525b063f7 --- /dev/null +++ b/1850/CH8/EX8.17/exa_8_17.sce @@ -0,0 +1,17 @@ +// Exa 8.17
+clc;
+clear;
+close;
+//given data
+C=0.1;// in nF
+C=C*10^-9;//in F
+V=5;//in V
+t=1;// in micro S
+t=t*10^-6;// in sec
+// v= V*(1-%e^(-t/(R*C)))
+// Since hold value does not drop by more than 0.5% or by 0.005 V, hold value is 0.995 V, Thus
+// 0.995*V= V*(1-%e^(-t/(R*C)))
+// or %e^(-t/(R*C))= 1-0.995 = 0.005
+R= t/(C*log(1/0.005));// in ohm
+I= V/R*(1-%e^(-t/(R*C)));// Maximum currnet through R in amphere
+disp(I*10^3,"Maximum permissible leakage current through the hold capacitor in mA")
diff --git a/1850/CH8/EX8.2/exa_8_2.sce b/1850/CH8/EX8.2/exa_8_2.sce new file mode 100755 index 000000000..f5e885507 --- /dev/null +++ b/1850/CH8/EX8.2/exa_8_2.sce @@ -0,0 +1,12 @@ +// Exa 8.2
+clc;
+clear;
+close;
+//given data
+A= 92;// in dB
+A= 10^(92/20);
+V_CC= 15;// in volt
+Vout= 30;// in volt
+InputOffsetVoltage= 0;// in V
+InputVoltage= Vout/A;// in V
+disp(InputVoltage*10^3,"Input Voltage in mV")
diff --git a/1850/CH8/EX8.3/exa_8_3.sce b/1850/CH8/EX8.3/exa_8_3.sce new file mode 100755 index 000000000..d7a9d304c --- /dev/null +++ b/1850/CH8/EX8.3/exa_8_3.sce @@ -0,0 +1,13 @@ +// Exa 8.3
+clc;
+clear;
+close;
+//given data
+R1= 2;// in kohm
+Rf= 390;// in kohm
+V_sat= 12;// in V
+Bita= R1/(R1+Rf);
+UTP= Bita*V_sat;// in volt
+LTP= -Bita*V_sat;// in volt
+disp(UTP*10^3,"Value of UTP in mv")
+disp(LTP*10^3,"Value of LTP in mv")
diff --git a/1850/CH8/EX8.5/exa_8_5.sce b/1850/CH8/EX8.5/exa_8_5.sce new file mode 100755 index 000000000..bf86c0b4f --- /dev/null +++ b/1850/CH8/EX8.5/exa_8_5.sce @@ -0,0 +1,18 @@ +// Exa 8.5
+clc;
+clear;
+close;
+//given data
+t=0;
+Vc=0;
+Vo=5;//in volt
+// V1= 2*R/(2*R+3*R)= 2/5*Vo
+// Vco= 1/5*VR +4/5*Vo = 1/5*(VR+4*Vo)
+// Req= R||4*R= 4/5*R
+// Vct= Vco*(1-%e^(-t/(Req*C)))= 1/5*(VR+4*Vo)*(1-%e^(-t/(4*R*C/5)))= 1/5*(VR+4*Vo)*(1-%e^(-1.25*t/(R*C)))
+// T= 2*Rf*C*log(1+2*R3/R2)= 2*R*C*log(7/3)= 1.7*R*C
+// t= T/2= .85*R*C, Hence
+Vct=2;//in volt
+// Vct= 1/5*(VR+4*Vo)*(1-%e^1.0625)
+VR= Vct*5/(1-%e^-1.0625)-4*Vo;
+disp(VR,"Value of VR in volt")
diff --git a/1850/CH8/EX8.6/exa_8_6.sce b/1850/CH8/EX8.6/exa_8_6.sce new file mode 100755 index 000000000..edbcb4ff1 --- /dev/null +++ b/1850/CH8/EX8.6/exa_8_6.sce @@ -0,0 +1,18 @@ +// Exa 8.6
+clc;
+clear;
+close;
+//given data
+omega= 200*%pi;// in radians/seconds
+f=omega/(2*%pi);// in Hz
+T=1/f;// in sec
+T=T*10^3;//in ms
+Vin= 7;//in volt
+t1= 1/omega*asin(6/Vin);// in sec
+t1=t1*10^3;// in ms
+// The output of the schmitt trigger is at -10 volt
+t1= T/2+t1;// in ms
+// The output of the schmitt trigger is at +10 volt
+t2= 10-t1;// in ms
+disp(t1,"The output of the schmitt trigger is at -10 volt in ms")
+disp(t2,"The output of the schmitt trigger is at +10 volt in ms")
diff --git a/1850/CH8/EX8.7/exa_8_7.sce b/1850/CH8/EX8.7/exa_8_7.sce new file mode 100755 index 000000000..dd3d3b07e --- /dev/null +++ b/1850/CH8/EX8.7/exa_8_7.sce @@ -0,0 +1,18 @@ +// Exa 8.7
+clc;
+clear;
+close;
+//given data
+R1= 150;// in ohm
+R2= 68;// in kohm
+R2=R2*10^3;// in ohm
+Vin= 500;// in mv
+V_sat= 14;//in volt
+V_pos= R1/(R1+R2)*V_sat;// in volt
+V_UT= V_pos;//in volt
+// In the same way when output is -14 volts and starts increasing in negative direcition
+V_sat=-14;//in volt
+V_pos= R1*V_sat/(R1+R2);// in volt
+V_LT= abs(V_pos);//in volt
+disp(V_UT,"Value of V_UT in volts")
+disp(V_LT,"Value of V_LT in volts")
diff --git a/1850/CH8/EX8.8/exa_8_8.sce b/1850/CH8/EX8.8/exa_8_8.sce new file mode 100755 index 000000000..3414eab9b --- /dev/null +++ b/1850/CH8/EX8.8/exa_8_8.sce @@ -0,0 +1,13 @@ +// Exa 8.8
+clc;
+clear;
+close;
+//given data
+V_UT= 5;// in V
+V_LT= -5;// in V
+V_sat= 10;// in V (Assume)
+// V_UT= (R1/(R1+R2))*V_sat = 5
+// V_LT= (-R1/(R1+R2))*V_sat = -5
+// 10*R1/(R+R2)= 5
+V_hy= V_UT-V_LT;// in volt
+disp(V_hy,"Hysteresis voltage in volt")
diff --git a/1850/CH8/EX8.9/exa_8_9.sce b/1850/CH8/EX8.9/exa_8_9.sce new file mode 100755 index 000000000..c18c36718 --- /dev/null +++ b/1850/CH8/EX8.9/exa_8_9.sce @@ -0,0 +1,18 @@ +// Exa 8.9
+clc;
+clear;
+close;
+//given data
+V_REF= 10;// in V
+MSB2= V_REF/2;// in volt
+disp(MSB2,"The second MSB weight in volt")
+MSB3= V_REF/4;// in volt
+disp(MSB3,"The third MSB weight in volt")
+MSB4= V_REF/8;// in volt
+disp(MSB4,"The forth MSB (or LSB) weight in volt")
+DAC= MSB4;
+disp(DAC,"The resolution of the DAC in volt")
+FullScaleOutput= V_REF+MSB2+MSB3+MSB4;//in volt
+disp(FullScaleOutput,"Full scale output in volt");
+disp("If Rf is reduced to one-forth, each input will be 4 times smaller than the values above. Thus the full scale output will be reduced")
+disp(" in the same ratio and becomes "+string(FullScaleOutput/4)+" volt")
diff --git a/1850/CH9/EX9.1/exa_9_1.sce b/1850/CH9/EX9.1/exa_9_1.sce new file mode 100755 index 000000000..56b9ebb48 --- /dev/null +++ b/1850/CH9/EX9.1/exa_9_1.sce @@ -0,0 +1,18 @@ +// Exa 9.1
+clc;
+clear;
+close;
+//given data
+C=.01;// in micro F
+C=C*10^-6;// in F
+R_A= 2;// in kohm
+R_A=R_A*10^3;// in ohm
+R_B= 100;// in kohm
+R_B=R_B*10^3;// in ohm
+T_High= 0.693*(R_A+R_B)*C;// in seconds
+T_Low= 0.693*R_B*C;// in seconds
+T=T_High+T_Low;// in seconds
+f=1/T;// in Hz
+disp(f,"Frequency of oscillations in Hz");
+DutyCycle= T_High/T*100;// in percent
+disp(DutyCycle,"Duty cycle in percentage");
diff --git a/1850/CH9/EX9.2/exa_9_2.sce b/1850/CH9/EX9.2/exa_9_2.sce new file mode 100755 index 000000000..e0dfa5f77 --- /dev/null +++ b/1850/CH9/EX9.2/exa_9_2.sce @@ -0,0 +1,23 @@ +// Exa 9.2
+clc;
+clear;
+close;
+//given data
+C=1;// in micro F
+C=C*10^-6;// in F
+C1=0.01;// in micro F
+C1=C1*10^-6;// in F
+R_A=4.7;// in kohm
+R_B=1;// in kohm
+R_A=R_A*10^3;// in ohm
+R_B=R_B*10^3;// in ohm
+T_on= 0.693*(R_A+R_B)*C;// in seconds
+T_on=T_on*10^3;// in ms
+disp(T_on,"Positive pulse width in mili seconds")
+T_off= 0.693*R_B*C;// in seconds
+T_off=T_off*10^3;// in ms
+disp(T_off,"Negative pulse width in mili seconds")
+f=1.4/((R_A+2*R_B)*C);// in Hz
+disp(f,"Free running Frequency in Hz");
+DutyCycle= (R_A+R_B)/(R_A+2*R_B)*100// in percent
+disp(DutyCycle,"Duty cycle in percentage");
diff --git a/1850/CH9/EX9.3/exa_9_3.sce b/1850/CH9/EX9.3/exa_9_3.sce new file mode 100755 index 000000000..96aaf29a2 --- /dev/null +++ b/1850/CH9/EX9.3/exa_9_3.sce @@ -0,0 +1,17 @@ +// Exa 9.3
+clc;
+clear;
+close;
+//given data
+C=0.01;// in micro F
+C=C*10^-6;// in F
+f=1;// in kHz
+f=f*10^3;// in Hz
+// R_A= R_B
+// T_on = T_off = T/2
+// Frequency is given by equation f= 1.44/((R_A+R_B)*C)
+R_A= 1.44/(2*f*C);// in ohm
+R_A=R_A*10^-3;// in k ohm
+R_B= R_A;
+
+disp("Resistors required : "+string(R_A)+" k ohm (68 ohm standart value)");
diff --git a/1850/CH9/EX9.4/exa_9_4.sce b/1850/CH9/EX9.4/exa_9_4.sce new file mode 100755 index 000000000..a568fa03a --- /dev/null +++ b/1850/CH9/EX9.4/exa_9_4.sce @@ -0,0 +1,16 @@ +// Exa 9.4
+clc;
+clear;
+close;
+//given data
+f=700;// in Hz
+// R_A= R_B
+// T_on = T_off = T/2
+// Frequency is given by equation f= 1.44/((R_A+R_B)*C)
+C=0.01;// in micro F (assumed value)
+C=C*10^-6;// in F
+R_A= 1.44/(2*f*C);// in ohm
+R_A=R_A*10^-3;// in k ohm
+R_A=ceil(R_A);
+R_B= R_A;
+disp("Resistors required : "+string(R_A)+" k ohm (100 ohm standart value)");
diff --git a/1850/CH9/EX9.5/exa_9_5.sce b/1850/CH9/EX9.5/exa_9_5.sce new file mode 100755 index 000000000..bada6d7c9 --- /dev/null +++ b/1850/CH9/EX9.5/exa_9_5.sce @@ -0,0 +1,17 @@ +// Exa 9.5
+clc;
+clear;
+close;
+//given data
+f=800;// in Hz
+D=60;// in percent
+// Formula D= (R_A+R_B)/(R_A+2*R_B)*100 = 60
+// R_A + R_B = 0.6*R_A + 1.2*R_B
+// R_B= 2*R_A
+C=0.01;// in micro F (assumed value)
+C=C*10^-6;// in F
+// Frequency is given by equation f= 1.44/((R_A+R_B)*C)
+R_A= 1.44/(5*C*f);// in ohm
+R_A=R_A*10^-3;// in kohm
+R_B=2*R_A;// in kohm
+disp("Resistors required : "+string(R_A)+" k ohm and "+string(R_B)+" k ohm");
diff --git a/1850/CH9/EX9.6/exa_9_6.sce b/1850/CH9/EX9.6/exa_9_6.sce new file mode 100755 index 000000000..dcd3611f9 --- /dev/null +++ b/1850/CH9/EX9.6/exa_9_6.sce @@ -0,0 +1,16 @@ +// Exa 9.6
+clc;
+clear;
+close;
+//given data
+C=.05;// in micro F
+C=C*10^-6;// in F
+R= 12;// in kohm
+R=R*10^3;// in ohm
+V_CC= 5;// in volt
+V_BE= 0.7;// in volt
+V_D1= V_BE;// in volt
+I_C= (V_CC-V_BE)/R;// in A
+f_o= (3*I_C)/(V_CC*C);// in Hz
+f_o=f_o*10^-3;// in kHz
+disp(f_o,"Frequency of free running ramp generator circuit in kHz");
diff --git a/1850/CH9/EX9.7/exa_9_7.sce b/1850/CH9/EX9.7/exa_9_7.sce new file mode 100755 index 000000000..34de08f2e --- /dev/null +++ b/1850/CH9/EX9.7/exa_9_7.sce @@ -0,0 +1,11 @@ +// Exa 9.7
+clc;
+clear;
+close;
+//given data
+C=.1;// in micro F
+C=C*10^-6;// in F
+R_A= 20;// in kohm
+R_A=R_A*10^3;// in ohm
+PulseWidth= 1.1*R_A*C;// in seconds
+disp(PulseWidth*10^3,"The output pulse width in mili seconds");
diff --git a/1850/CH9/EX9.9/exa_9_9.sce b/1850/CH9/EX9.9/exa_9_9.sce new file mode 100755 index 000000000..6518ee1c8 --- /dev/null +++ b/1850/CH9/EX9.9/exa_9_9.sce @@ -0,0 +1,16 @@ +// Exa 9.9
+clc;
+clear;
+close;
+//given data
+C=.02;// in micro F
+C=C*10^-6;// in F
+f=2;// frequency of the outpur trigger in kHz
+f=f*10^3;// in Hz
+T=1/f;// in seconds
+// In a divide-by-5 circuit , n=5, so the pulse width, t_p= [0.2 + (n-1)]*T = [0.2 + (5-1)]*T = 4.2*T
+t_p=4.2*T;// in soconds
+// Formula t_p = 1.1*R_A*C
+R_A= t_p/(1.1*C);// in ohm
+R_A=R_A*10^-3;// in kohm
+disp(R_A,"The value of R_A in k ohm");
|