diff options
Diffstat (limited to '2621')
96 files changed, 2123 insertions, 0 deletions
diff --git a/2621/CH1/EX1.1/Ex1_1.sce b/2621/CH1/EX1.1/Ex1_1.sce new file mode 100644 index 000000000..1791af198 --- /dev/null +++ b/2621/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,24 @@ +// Example 1.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VCC= 9;//in V
+VEE= -9;// in V
+RC= 3.9;//in kΩ
+RE= 3.3;// in kΩ
+VBE= 0.7;// in V
+IE= (abs(VEE)-VBE)/(2*RE);// emitter current in mA
+IC= IE;// collector current in mA
+// Collector voltage,
+VC= VCC-IC*RC;// in V
+disp(VC,"The collector voltage in volts is : ");
+// Emitter voltage,
+VE= 0-VBE;// in V
+disp(VE,"The emitter voltage in volts is : ");
+// Collecctor-emitter voltage,
+VCE= VC-VE;// in V
+disp(VCE,"The collector-emitter voltage in volts is : ");
+
+// Note : There is some difference between coding output and the answer of the book because in the book the value of IE is used as 1.25mA while the calculated value of IE is 1.258
diff --git a/2621/CH1/EX1.10/Ex1_10.sce b/2621/CH1/EX1.10/Ex1_10.sce new file mode 100644 index 000000000..f7dd339fd --- /dev/null +++ b/2621/CH1/EX1.10/Ex1_10.sce @@ -0,0 +1,24 @@ +// Example 1.10
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+VEE= 9;//in V
+VCC= 9;//in V
+RC= 47*10^3;// collector resistance in Ω
+RE= 43*10^3;// emitter resistance in Ω
+vin1= 2.5*10^-3;// in V
+Ri1= 20*10^3;// in Ω
+Ri2= Ri1;// in Ω
+VBE= 0.7;// in V
+VT= 26*10^-3;// in V
+beta1= 75;
+beta2= 75;
+IE= (VEE-VBE)/(2*RE+Ri1/beta1);//emitter current in A
+ICQ= IE;// quiescent current in A
+VCEQ= VCC+VBE-ICQ*RC;// quiescent collector voltage in V
+re_desh= VT/IE;//AC emitter resistance in Ω
+Ad= RC/(2*re_desh);// voltage gain
+vout= Ad*vin1;// output voltage in V
+disp(vout,"The output voltage in volts is : ");
diff --git a/2621/CH1/EX1.11/Ex1_11.sce b/2621/CH1/EX1.11/Ex1_11.sce new file mode 100644 index 000000000..ed5cc534a --- /dev/null +++ b/2621/CH1/EX1.11/Ex1_11.sce @@ -0,0 +1,35 @@ +// Example 1.11
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VEE= 15;//in V
+VD1= 0.7;// in V
+VD2= 0.7;// in V
+VBE= 0.7;// in V
+Beta= 100;
+VT= 26;// in mV
+R3= 180;//in Ω
+RC= 470;// in Ω
+VB3= -VEE+VD1+VD2;//in V
+VE3= VB3-VBE;//voltage at emitter terminal of transistor Q3 in V
+IE3= (VE3-(-VEE))/R3;//emitter current through transistor Q3 in A
+
+//Part (i)
+ICQ= IE3/2;//quiescent current in A
+ICQ= round(ICQ*10^3);//in mA
+IE= ICQ;//emitter current in mA
+disp(ICQ,"(i) : Quiescent current in mA is : ")
+VCEQ= VEE+VBE-ICQ*10^-3*RC;//quiescent collector-emitter voltage in V
+disp(VCEQ,"The quiescent collector-emitter voltage in volts is : ")
+re_desh= VT/IE;//AC emitter resistance in Ω
+
+// Part (ii)
+Ad= RC/re_desh;// differential voltage gain
+disp(Ad,"(ii) : Differential voltage gain is : ")
+
+// Part (iii)
+Rin1= 2*Beta*re_desh;// in Ω
+Rin1= Rin1*10^-3;// in kΩ
+disp(Rin1,"(iii) : The input resistance in kΩ is : ")
diff --git a/2621/CH1/EX1.12/Ex1_12.sce b/2621/CH1/EX1.12/Ex1_12.sce new file mode 100644 index 000000000..fd4252015 --- /dev/null +++ b/2621/CH1/EX1.12/Ex1_12.sce @@ -0,0 +1,31 @@ +// Example 1.12
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VEE= 10;//in V
+VCC=10;// in V
+VD1= 0.715;// in V
+Vz= 6.2// in V
+VBE= VD1;// in V
+Izt= 41;// in mA
+R3= 2.7;// in kΩ
+RC= 4.7;// in kΩ
+VT= 26;// in mV
+beta_ac= 100;
+beta_dc= 100;
+VB3= -VEE+Vz+VD1;//voltage at the base of transistor Q3 in V
+VE3= VB3-VBE;// voltage at the emitter of transistor Q3 in V
+IE3= (VE3-(-VEE))/R3;//emitter current through transistor Q3 in mA
+ICQ= IE3/2;//quiescent current in mA
+VCEQ= VCC+VBE-ICQ*RC;// in V
+disp("Part (a) : The Q-point values : ");
+disp(ICQ,"The value of ICQ in mA is : ");
+disp(VCEQ,"The value of VCEQ in volts is : ")
+re_desh= VT/ICQ;//dynamic emitter resistance in Ω
+Ad= RC*10^3/re_desh;// voltage gain
+disp(Ad,"Part (b) : The voltage gain is : ")
+Rin= 2*beta_ac*re_desh;// differential input resistance in Ω
+Rin=Rin*10^-3;// in kΩ
+disp(Rin,"Part (c) : The differential input resistance in kΩ is : ")
diff --git a/2621/CH1/EX1.13/Ex1_13.sce b/2621/CH1/EX1.13/Ex1_13.sce new file mode 100644 index 000000000..6619b01c6 --- /dev/null +++ b/2621/CH1/EX1.13/Ex1_13.sce @@ -0,0 +1,16 @@ +// Example 1.13
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VCC= 12;// in V
+VBE= 0.7;// in V
+R1= 25;// in kΩ
+// I= I_REF= (VCC-VBE)/R1
+I= (VCC-VBE)/R1;// mirrored current in mA
+disp(I,"The mirrored current in mA is : ");
+
+
+
+
diff --git a/2621/CH1/EX1.14/Ex1_14.sce b/2621/CH1/EX1.14/Ex1_14.sce new file mode 100644 index 000000000..2db8076ae --- /dev/null +++ b/2621/CH1/EX1.14/Ex1_14.sce @@ -0,0 +1,15 @@ +// Example 1.14
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VCC= 10;// in V
+VBE= 0.7;// in V
+R1= 15;// in kΩ
+Beta= 100;
+I_REF= (VCC-VBE)/R1;//reference current in mA
+disp(I_REF,"The reference current in mA is : ")
+Iout= I_REF*Beta/(Beta+2);// output current in mA
+disp(Iout,"The output current in mA is : ")
+
diff --git a/2621/CH1/EX1.15/Ex1_15.sce b/2621/CH1/EX1.15/Ex1_15.sce new file mode 100644 index 000000000..d74f92dca --- /dev/null +++ b/2621/CH1/EX1.15/Ex1_15.sce @@ -0,0 +1,15 @@ +// Example 1.15
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+VCC= 15;// in V
+VBE= 0.7;// in V
+R1= 2.2;// in kΩ
+Beta= 220;
+I_REF= (VCC-VBE)/R1;//reference current in mA
+// Formula : I= IC= I_REF*(Beta/(Beta+2))
+IC= I_REF*Beta/(Beta+2);// in mA
+disp(IC,"The value of current in mA is : ")
+
diff --git a/2621/CH1/EX1.16/Ex1_16.sce b/2621/CH1/EX1.16/Ex1_16.sce new file mode 100644 index 000000000..f475a3840 --- /dev/null +++ b/2621/CH1/EX1.16/Ex1_16.sce @@ -0,0 +1,16 @@ +// Example 1.16
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Vz= 1.8;// in V
+VBE= 0.7;// in V
+RE= 1;// in kΩ
+Beta= 180;
+VB= Vz-VBE;// in V
+IE= VB/RE;//emitter current in mA
+// Formula : I= IC= IE*(Beta/(Beta+1))
+IC= IE*Beta/(Beta+1);// in mA
+disp(IC,"The value of current in mA is : ")
+
diff --git a/2621/CH1/EX1.17/Ex1_17.sce b/2621/CH1/EX1.17/Ex1_17.sce new file mode 100644 index 000000000..241c58c63 --- /dev/null +++ b/2621/CH1/EX1.17/Ex1_17.sce @@ -0,0 +1,28 @@ +// Example 1.17
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+VCC= 9;// in V
+R1= 12;// in kΩ
+VBE= 0.7;// in V
+Beta= 100;
+I_REF= (VCC-2*VBE)/R1;//reference current in mA
+disp(I_REF,"The reference current in mA is : ")
+Iout= I_REF/(1+2/(Beta*(1+Beta)));//output current in mA
+disp(Iout,"The output current in mA is : ")
+IC2= Iout;//collector current in mA
+disp(IC2,"The collector current in mA is : ")
+// IB3= I_REF-IC1= I_REF-IC2 (since IC1= IC2)
+IB3= I_REF-IC2;//base current of transistor Q3 in mA
+IB3= IB3*10^3;// in µA
+disp(IB3,"The base current of transistor Q3 in µA is : ")
+IB3= 0.1;// in µA
+IE3= (1+Beta)*IB3;// emitter current of transistor Q3 in µA
+disp(IE3,"The emitter current of transistor Q3 in µA is : ")
+IB1= IE3/2;//base current in µA
+IB2= IB1;// in µA
+disp(IB1,"The base current in µA is : ")
+
+
diff --git a/2621/CH1/EX1.18/Ex1_18.sce b/2621/CH1/EX1.18/Ex1_18.sce new file mode 100644 index 000000000..573da6245 --- /dev/null +++ b/2621/CH1/EX1.18/Ex1_18.sce @@ -0,0 +1,18 @@ +// Example 1.18
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+VEE= 10;// in V
+VBE= 0.715;// in V
+beta_ac= 100;
+beta_dc= 100;
+R= 5.6;// in kΩ
+I_REF= (VEE-VBE)/R;// in mA
+IC1= I_REF*beta_ac/(2+beta_ac);// in mA
+// IC1= IC2= IC3 (by symmetry)
+IC2= IC1;// in mA
+IC3= IC2;// in mA
+I_RC= IC1+IC2+IC3;// current through RC in mA
+disp(I_RC,"The current through RC in mA is : ");
diff --git a/2621/CH1/EX1.19/Ex1_19.sce b/2621/CH1/EX1.19/Ex1_19.sce new file mode 100644 index 000000000..076f4af1a --- /dev/null +++ b/2621/CH1/EX1.19/Ex1_19.sce @@ -0,0 +1,20 @@ +// Example 1.19
+clc;
+clear;
+close;
+// Given data
+format('v',8);
+VCC= 5;// in V
+VBE= 0.7;// in V
+VEE= -5;// in V
+VT= 26;// in mV
+R= 18.6;// in kΩ
+Beta= 100;
+I2= (VCC-VBE-VEE)/R;// in mA
+IC3= I2;// in mA (due to current mirror action)
+IE= IC3/2;// emitter current of transistor Q1 and Q2
+re_desh= VT/IE;//AC emitter resistance of transistor in Ω
+Rin1= 2*Beta*re_desh;// in Ω
+Rin1= Rin1*10^-3;// in kΩ
+disp(Rin1,"The differential input resistance in kΩ is : ")
+
diff --git a/2621/CH1/EX1.2/Ex1_2.sce b/2621/CH1/EX1.2/Ex1_2.sce new file mode 100644 index 000000000..c4563c7b6 --- /dev/null +++ b/2621/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,17 @@ +// Example 1.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VCC= 10;//in V
+VEE= -10;// in V
+RC= 10;//in kΩ
+RE= 9.3;// in kΩ
+VBE= 0.7;// in V
+IE= (abs(VEE)-VBE)/(2*RE);// emitter current in mA
+ICQ= IE;//quiescent collector current in mA
+disp(ICQ,"The quiescent collector current in mA");
+// Quiescent Collector-emitter voltage,
+VCEQ= VCC+VBE-ICQ*RC;// in V
+disp(VCEQ,"The quiescent collector-emitter voltage in volts is : ");
diff --git a/2621/CH1/EX1.20/Ex1_20.sce b/2621/CH1/EX1.20/Ex1_20.sce new file mode 100644 index 000000000..3ab0d5ffe --- /dev/null +++ b/2621/CH1/EX1.20/Ex1_20.sce @@ -0,0 +1,22 @@ +// Example 1.20
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VCC= 18;// in V
+R1= 4.7;// in kΩ
+R2= 5.6;// in kΩ
+R3= 6.8;// in kΩ
+RE= 1.1;// in kΩ
+VBE= 0.7;// in V
+VT= 26;// in mV
+RC= 1.8*10^3;// in Ω
+IE1= (VCC*R1/(R1+R2+R3)-VBE)/RE;// in mA
+re_desh= VT/IE1;//dynamic resistance of each transistor in Ω
+Av= -RC/re_desh;// voltage gain of the cascode amplifier
+disp(Av,"The voltage gain of the cascode amplifier is : ")
+
+
+
+
diff --git a/2621/CH1/EX1.3/Ex1_3.sce b/2621/CH1/EX1.3/Ex1_3.sce new file mode 100644 index 000000000..a5f2aedbb --- /dev/null +++ b/2621/CH1/EX1.3/Ex1_3.sce @@ -0,0 +1,64 @@ +// Example 1.3
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VCC= 12;//in V
+VEE= -12;// in V
+RC= 10;//in kΩ
+RE= 10;// in kΩ
+RB= 20;// in kΩ
+VBE= 0.7;// in V
+// Part (a)
+beta_dc= 75;
+// Tail current, IT= 2*IE= VEE/RE (ignoring VBE), hence
+IT= abs(VEE)/RE;// in mA
+IC= IT/2;//collector current in mA
+// output voltage,
+Vout1= VCC-IC*RC;// in V
+IT= (abs(VEE)-VBE)/RE;// tail current in mA (on considering VBE)
+IC= IT/2;//collector current in mA
+Vout2= VCC-IC*RC;// in V
+// Tail current,
+IT= (abs(VEE)-VBE)/(RE+RB/(2*beta_dc));// in mA
+IC= IT/2;//collector current in mA
+// output voltage,
+Vout3= VCC-IC*RC;// in V
+disp("Part (a) : There are three different values of output voltage in volts");
+disp(Vout1);
+disp(Vout2);
+disp(Vout3);
+
+// Part (b)
+IT= abs(VEE)/RE;// in mA
+IC= IT/2;//collector current in mA
+IB= IC/(beta_dc);// base current in mA
+IB= IB*10^3;// in µA
+VB= -IB*RB;//base voltage in mV
+VB= VB*10^-3;// in V
+disp("Part (b) : ");
+disp(IB,"The value of base current in µA is : ");
+disp(VB,"The value of base voltage in volts is : ");
+
+// Part (c)
+beta_dc1= 60;
+beta_dc2= 80;
+IB1= IC/beta_dc1;//base current for transistor Q1, in mA
+IB1= IB1*10^3;// in µA
+disp("Part (c)")
+disp(IB1,"The value of base current for transistor Q1 in µA is : ");
+VB1= -IB1*RB;// in mV
+VB1= VB1*10^-3;// in V
+disp(VB1,"The value of base voltage for transistor Q1 in volts is : ");
+IB2= IC/beta_dc2;//base current for transistor Q2, in mA
+IB2= IB2*10^3;// in µA
+disp(IB2,"The value of base current for transistor Q2 in µA is : ");
+VB2= -IB2*RB;// in mV
+VB2= VB2*10^-3;// in V
+disp(VB2,"The value of base voltage for transistor Q2 in volts is : ");
+
+// Note : In the part (c), the unit of base current for transistor Q2 in the book is wrong it will be µA
+
+
+
diff --git a/2621/CH1/EX1.4/Ex1_4.sce b/2621/CH1/EX1.4/Ex1_4.sce new file mode 100644 index 000000000..9d5c7f1a9 --- /dev/null +++ b/2621/CH1/EX1.4/Ex1_4.sce @@ -0,0 +1,48 @@ +// Example 1.4
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+RC= 2.2;//in kΩ
+RE= 4.7;// in kΩ
+RE= RE*10^3;// in Ω
+Ri1= 50;// in Ω
+Ri2= 50;// in Ω
+VCC= 10;//in V
+VEE= 10;// in V
+VBE= 0.7;// in V
+beta_dc= 100;
+beta_ac= 100;
+
+// Part (a)
+// Formula Used : ICQ= IE= (VEE-VBE)/(2*RE+Ri/beta_dc)
+ICQ= (VEE-VBE)/(2*RE+Ri1/beta_dc);//quiescent collector current in A
+ICQ= ICQ*10^3;// in mA
+IE= ICQ;// in mA
+disp("Part (a)")
+disp(ICQ,"The value of ICQ in mA is : ");
+// Quiescent collector-emitter voltage,
+VCEQ= VCC+VBE-ICQ*RC;// in V
+disp(VCEQ,"The value of VCEQ in volts is : ");
+
+// Part (b)
+re_desh= 26/IE;// AC emitter resistance in Ω
+// Formula Used : Ad= Vout/Vind= RC/re_desh
+Ad= RC*10^3/re_desh;// voltage gain
+disp("Part (b)")
+disp(Ad,"The voltage gain is : ");
+
+// Part (c)
+Rin1= 2*beta_ac*re_desh;// input resistance in Ω
+Rin1= Rin1*10^-3;//in kΩ
+Rin2= Rin1;// in kΩ
+disp("Part (c)");
+disp(Rin1,"The input resistance in kΩ is : ");
+
+// Part (d)
+Rout1= RC;// in kΩ
+disp("Part (d)");
+disp(Rout1,"The output resistance in kΩ is : ");
+
+
diff --git a/2621/CH1/EX1.5/Ex1_5.sce b/2621/CH1/EX1.5/Ex1_5.sce new file mode 100644 index 000000000..204a678e3 --- /dev/null +++ b/2621/CH1/EX1.5/Ex1_5.sce @@ -0,0 +1,37 @@ +// Example 1.5
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+VCC= 15;//in V
+VEE= 15;// in V
+RC= 1;//in MΩ
+RE= RC;// in MΩ
+beta_ac= 100;
+VBE= 0.7;// in V
+IE= (VEE-VBE)/(2*RE);//emitter current in µA
+IC= IE;// in collector current in µA
+re_desh= 26/IE;// ac resistance of each emitter diode in kΩ
+Ad= RC*10^3/re_desh;// Voltage gain
+disp(Ad,"The voltage gain is : ");
+Zin= 2*beta_ac*re_desh;// input impedance in kΩ
+Zin= Zin*10^-3;// in MΩ
+disp(Zin,"The input impedance in MΩ is : ");
+Zout= RC;//output impedance in MΩ
+disp(Zout,"The output impedance in MΩ is : ");
+Acm= (RC*10^3)/(2*RE*10^3+re_desh);// common-mode gain
+CMRR= Ad/Acm;// common-mode rejection ratio
+disp(CMRR,"The common-mode rejection ratio is : ");
+// When v_in is zero
+Vout= VCC- IC*RC;// in V
+disp(Vout,"When v_in is zero then the total output voltage at the quiescent value in volts is : ");
+// When v_in= 1mV,
+v_in= 1*10^-3;// in V
+Vout= Ad*v_in;// in V
+disp(Vout,"When v_in is -1mV then the ac output voltage in volts is : ");
+
+// Note : The value of CMRR in the book is wrong because the correct value of Acm is "0.4991" and in the book it is taken as "0.4225"
+
+
+
diff --git a/2621/CH1/EX1.6/Ex1_6.sce b/2621/CH1/EX1.6/Ex1_6.sce new file mode 100644 index 000000000..2f8ee7f26 --- /dev/null +++ b/2621/CH1/EX1.6/Ex1_6.sce @@ -0,0 +1,16 @@ +// Example 1.6
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VEE= 5;// supply voltage in V
+RC= 2*10^3;// collector resistance in Ω
+RE= 4.3;// emitter resistance in kΩ
+VBE= 0.7;// in V
+VT= 26;// in mV
+IE= (VEE-VBE)/(2*RE);//emitter current in mA
+re_desh= VT/IE;//dynamic emitter resistance in Ω
+Ad= RC/(2*re_desh);// differential mode gain
+disp(Ad,"The differential mode gain is : ");
+
diff --git a/2621/CH1/EX1.7/Ex1_7.sce b/2621/CH1/EX1.7/Ex1_7.sce new file mode 100644 index 000000000..6cb1e7622 --- /dev/null +++ b/2621/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,22 @@ +// Example 1.7
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VEE= 5;// supply voltage in V
+RC= 2*10^3;// collector resistance in Ω
+RE= 4.3;// emitter resistance in kΩ
+VBE= 0.7;// in V
+VT= 26;// in mV
+IE= (VEE-VBE)/(2*RE);//emitter current in mA
+re_desh= VT/IE;//dynamic emitter resistance in Ω
+Ad= RC/(2*re_desh);// differential mode gain
+Acm= RC/(2*RE*10^3+re_desh);// common mode gain
+disp(Acm,"The common mode gain is : ");
+CMRR= Ad/Acm;// common mode rejection ratio
+disp(CMRR,"The CMRR is : ");
+
+
+
+
diff --git a/2621/CH1/EX1.8/Ex1_8.sce b/2621/CH1/EX1.8/Ex1_8.sce new file mode 100644 index 000000000..f7971fd7f --- /dev/null +++ b/2621/CH1/EX1.8/Ex1_8.sce @@ -0,0 +1,24 @@ +// Example 1.8
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VEE= 9;//in V
+VCC= 9;//in V
+RC= 47*10^3;// collector resistance in Ω
+RE= 43*10^3;// emitter resistance in Ω
+vin1= 2.5*10^-3;// in V
+Ri1= 20*10^3;// in Ω
+Ri2= Ri1;// in Ω
+VBE= 0.7;// in V
+VT= 26*10^-3;// in V
+beta1= 75;
+beta2= 75;
+IE= (VEE-VBE)/(2*RE+Ri1/beta1);//emitter current in A
+ICQ= IE;// quiescent current in A
+VCEQ= VCC+VBE-ICQ*RC;// quiescent collector voltage in V
+re_desh= VT/IE;//AC emitter resistance in Ω
+Ad= RC/re_desh;// voltage gain
+vout= Ad*vin1;// output voltage in V
+disp(vout,"The output voltage in volts is : ");
diff --git a/2621/CH1/EX1.9/Ex1_9.sce b/2621/CH1/EX1.9/Ex1_9.sce new file mode 100644 index 000000000..5ffea5d25 --- /dev/null +++ b/2621/CH1/EX1.9/Ex1_9.sce @@ -0,0 +1,49 @@ +// Example 1.9
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+RC= 2.2;//in kΩ
+RE= 4.7;// in kΩ
+Ri1= 50*10^-3;// in kΩ
+Ri2= 50*10^-3;// in kΩ
+VCC= 10;//in V
+VEE= 10;// in V
+VBE= 0.7;// in V
+beta_dc= 100;
+beta_ac= 100;
+
+// Part (i)
+// Formula Used : ICQ= IE= (VEE-VBE)/(2*RE+Ri/beta_dc)
+ICQ= (VEE-VBE)/(2*RE+Ri1/beta_dc);//quiescent collector current in mA
+IE= ICQ;// in mA
+disp("Part (i) : Dual-input, unbalanced output")
+disp(ICQ,"The value of ICQ in mA is : ");
+// Quiescent collector-emitter voltage,
+VCEQ= VCC+VBE-ICQ*RC;// in V
+disp(VCEQ,"The value of VCEQ in volts is : ");
+re_desh= 26/IE;// AC emitter resistance in Ω
+Rin1= 2*beta_ac*re_desh;// input resistance in Ω
+Rin1= Rin1*10^-3;//in kΩ
+Rin2= Rin1;// in kΩ
+disp(Rin1,"The value of Rin1 in kΩ is : ");
+Rout= RC;// in kΩ
+disp(Rout,"The value of Rout in kΩ is : ");
+disp(RC,"The value of RC in kΩ is : ")
+// Formula Used : Ad= Vout/Vind= RC/re_desh
+Ad= RC*10^3/(re_desh*2);// voltage gain of dual input, unbalanced output
+disp(Ad,"The value of Ad is : ");
+
+// Part (ii)
+disp("Part (ii) : Single-output, balanced output");
+disp(ICQ,"The value of ICQ in mA is : ");
+disp(VCEQ,"The value of VCEQ in volts is : ");
+disp(Rin1,"The value of Rin1 in kΩ is : ");
+disp(Rout,"The value of Rout in kΩ is : ");
+disp(RC,"The value of RC in kΩ is : ")
+// Formula Used : Ad= Vout/Vind= RC/re_desh
+Ad= RC*10^3/(re_desh);// voltage gain of dual input, unbalanced output
+disp(Ad,"The value of Ad is : ");
+
+
diff --git a/2621/CH10/EX10.1/Ex10_1.sce b/2621/CH10/EX10.1/Ex10_1.sce new file mode 100644 index 000000000..64cbfa63e --- /dev/null +++ b/2621/CH10/EX10.1/Ex10_1.sce @@ -0,0 +1,17 @@ +// Example 10.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Idc= 300;// in mA
+C= 200;// in µF
+Vmax= 24;// in V
+Vrms= 2.4*Idc/C;//in V
+Vr_peak= sqrt(3)*Vrms;// in V
+Vdc= Vmax-Vr_peak;// in V
+disp(Vdc,"The minimum input voltage in volts is : ")
+
+
+
+
diff --git a/2621/CH10/EX10.2/Ex10_2.sce b/2621/CH10/EX10.2/Ex10_2.sce new file mode 100644 index 000000000..17b1fa97d --- /dev/null +++ b/2621/CH10/EX10.2/Ex10_2.sce @@ -0,0 +1,20 @@ +// Example 10.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+VR= 12;// in V
+IL= 0.5;// in A
+RL= 25;// in Ω
+// Resistanc required,
+R= VR/IL;// in Ω
+VL= IL*RL;// in V
+Vout= VR+VL;//output voltage in V
+Vin= Vout+2;// input voltage in V
+disp(Vin,"The input voltage in volts is : ")
+
+
+
+
+
diff --git a/2621/CH10/EX10.3/Ex10_3.sce b/2621/CH10/EX10.3/Ex10_3.sce new file mode 100644 index 000000000..66cd05f53 --- /dev/null +++ b/2621/CH10/EX10.3/Ex10_3.sce @@ -0,0 +1,16 @@ +// Example 10.3
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 240;// in Ω
+R2= 1.2*10^3;// in Ω
+// Regulated output voltage in the circuit,
+Vout= 1.25*(1+R2/R1);// in V
+disp(Vout,"The regulated output voltage in volts is : ");
+
+
+
+
+
diff --git a/2621/CH10/EX10.4/Ex10_4.sce b/2621/CH10/EX10.4/Ex10_4.sce new file mode 100644 index 000000000..a05780b5d --- /dev/null +++ b/2621/CH10/EX10.4/Ex10_4.sce @@ -0,0 +1,17 @@ +// Example 10.4
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+V_REG= 15;// in V
+I_Q= 10*10^-3;// in A
+R1= 40;// in Ω
+// When potentiometer R2=0 Ω (minimum)
+R2= 0;// in Ω
+Vout= (1+R2/R1)*V_REG+I_Q*R2;
+disp(Vout,"The minimum output voltage in volts is : ");
+// When potentiometer R2=200 Ω (maximum)
+R2= 200;// in Ω
+Vout= (1+R2/R1)*V_REG+I_Q*R2;
+disp(Vout,"The minimum output voltage in volts is : ");
diff --git a/2621/CH10/EX10.5/Ex10_5.sce b/2621/CH10/EX10.5/Ex10_5.sce new file mode 100644 index 000000000..b3e07a68f --- /dev/null +++ b/2621/CH10/EX10.5/Ex10_5.sce @@ -0,0 +1,14 @@ +// Example 10.5
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+V_REF= 1.25;// in V
+R1= 2.5*10^3;// in Ω
+R2= 1*10^3;// in Ω
+I= V_REF/R2;// in A
+// The output voltage,
+Vout= I*(R1+R2);// in V
+disp(Vout,"The regulated output voltage in volts is : ")
+
diff --git a/2621/CH10/EX10.6/Ex10_6.sce b/2621/CH10/EX10.6/Ex10_6.sce new file mode 100644 index 000000000..aebe3121e --- /dev/null +++ b/2621/CH10/EX10.6/Ex10_6.sce @@ -0,0 +1,15 @@ +// Example 10.6
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+V_REF= 1.25;// in V
+R1= 3*10^3;// in Ω
+R2= 1*10^3;// in Ω
+Vin= 20;// in V
+Vout= V_REF*(R1+R2)/R2;// output voltage in volts
+// Duty cycle,
+D= Vout/Vin*100;// in %
+disp("The duty cycle is "+string(D)+" %")
+
diff --git a/2621/CH2/EX2.10/Ex2_10.sce b/2621/CH2/EX2.10/Ex2_10.sce new file mode 100644 index 000000000..c60a818ca --- /dev/null +++ b/2621/CH2/EX2.10/Ex2_10.sce @@ -0,0 +1,15 @@ +// Example 2.10
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+Vd= 25;//differential input voltage in µV
+Vd= Vd*10^-6;// in V
+A= 200000;// open loop gain
+// Output voltage,
+Vout= A*Vd;// in V
+disp("The output voltage is : ± "+string(Vout)+ "V")
+
+
+
diff --git a/2621/CH2/EX2.11/Ex2_11.sce b/2621/CH2/EX2.11/Ex2_11.sce new file mode 100644 index 000000000..5cc88e587 --- /dev/null +++ b/2621/CH2/EX2.11/Ex2_11.sce @@ -0,0 +1,14 @@ +// Example 2.11
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+dVout= 20;// change in output voltage in V
+dt= 4;// change in time in µs
+SR= dVout/dt;// slew rate in V/µs
+disp(SR,"The slew rate in V/µs is : ")
+
+
+
+
diff --git a/2621/CH2/EX2.12/Ex2_12.sce b/2621/CH2/EX2.12/Ex2_12.sce new file mode 100644 index 000000000..260e03676 --- /dev/null +++ b/2621/CH2/EX2.12/Ex2_12.sce @@ -0,0 +1,17 @@ +// Example 2.12
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+IB1= 10;// in µA
+IB2= 7.5;// in µA
+// Input bias current,
+I_in_bias= (IB1+IB2)/2;// in µA
+// Input offset current,
+I_in_offset= IB1-IB2;// in µA
+disp(I_in_bias,"The input bias current in µA is : ")
+disp(I_in_offset,"The input offset current in µA is : ")
+
+
+
diff --git a/2621/CH2/EX2.13/Ex2_13.sce b/2621/CH2/EX2.13/Ex2_13.sce new file mode 100644 index 000000000..2a4fa0579 --- /dev/null +++ b/2621/CH2/EX2.13/Ex2_13.sce @@ -0,0 +1,23 @@ +// Example 2.13
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+SR= 6;// slew rate in V/µs
+SR= 6*10^6;// in V/s
+
+// Part (i) For Vmax= 1V
+Vmax= 1;// in V
+fmax= SR/(2*%pi*Vmax);// limiting frequency in Hz
+fmax= fmax*10^-6;// in MHz
+disp(fmax,"Part (i) : The limiting frequency for maximum voltage of 1V in MHz is : ");
+
+// Part (ii) For Vmax= 10V
+Vmax= 10;// in V
+fmax= SR/(2*%pi*Vmax);// limiting frequency in Hz
+fmax= fmax*10^-3;// in kHz
+disp(fmax,"Part (ii) : The limiting frequency for maximum voltage of 10V in kHz is : ");
+
+
+
diff --git a/2621/CH2/EX2.14/Ex2_14.sce b/2621/CH2/EX2.14/Ex2_14.sce new file mode 100644 index 000000000..cf2932b7b --- /dev/null +++ b/2621/CH2/EX2.14/Ex2_14.sce @@ -0,0 +1,17 @@ +// Example 2.14
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Vpp= 3;// output voltage in V
+del_t= 4;// in µs
+del_V= 90*Vpp/100-10*Vpp/100;// in V
+// Required slew rate,
+SR= del_V/del_t;// in V/µs
+disp(SR,"The required slew rate in V/µs is : ");
+
+
+
+
+
diff --git a/2621/CH2/EX2.2/Ex2_2.sce b/2621/CH2/EX2.2/Ex2_2.sce new file mode 100644 index 000000000..ebf092b13 --- /dev/null +++ b/2621/CH2/EX2.2/Ex2_2.sce @@ -0,0 +1,17 @@ +// Example 2.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+// Part (i)
+Vin1= 5;// in µV
+Vin1= Vin1*10^-6;// in V
+Vin2= -7;//in µV
+Vin2= Vin2*10^-6;// in V
+Av= 2*10^5;// unit less
+Rin= 2;// in MΩ
+Vout= (Vin1-Vin2)*Av;// in V
+disp(Vout,"The output voltage in volts is : ")
+
+
diff --git a/2621/CH2/EX2.4/Ex2_4.sce b/2621/CH2/EX2.4/Ex2_4.sce new file mode 100644 index 000000000..bff2ce235 --- /dev/null +++ b/2621/CH2/EX2.4/Ex2_4.sce @@ -0,0 +1,24 @@ +// Example 2.4
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+Rs= 2;// in kΩ
+RL= 5;// in kΩ
+A= 10^5;// unit less
+Rin= 100;//in kΩ
+Rout= 50;// in Ω
+Vout= 10;// in V
+// For Vout = 10 V, V1= V2 = Vout
+V1= Vout;// in V
+V2= V1;// in V
+// From equation V1= Vs*Rin/(Rin+Rs)
+Vs= V1*(Rin+Rs)/Rin;// in V
+Vout_by_Vs= Vout/Vs;// value of Vout/Vs
+disp(Vs,"The value of Vs in volts is : ");
+disp(Vout_by_Vs,"The value of Vout/Vs is : ");
+disp(Rin,"The input resistance of the circuit in kΩ is : ");
+
+
+
diff --git a/2621/CH2/EX2.6/Ex2_6.sce b/2621/CH2/EX2.6/Ex2_6.sce new file mode 100644 index 000000000..853f0116c --- /dev/null +++ b/2621/CH2/EX2.6/Ex2_6.sce @@ -0,0 +1,14 @@ +// Example 2.6
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+Ad= 100;// differential mode gain
+Acm= 0.01;// common mode gain
+CMRR= Ad/Acm;
+CMRR_desh= 20*log10(CMRR);// CMRR in dB
+disp(CMRR_desh,"CMRR in dB is : ");
+
+
+
diff --git a/2621/CH2/EX2.7/Ex2_7.sce b/2621/CH2/EX2.7/Ex2_7.sce new file mode 100644 index 000000000..79bc1c0ae --- /dev/null +++ b/2621/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,14 @@ +// Example 2.7
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+Ad= 10^5;// differential mode gain
+CMRR= 10^5;
+// Common-mode gain,
+Acm= Ad/CMRR;
+disp(Acm,"The common-mode gain is : ");
+
+
+
diff --git a/2621/CH2/EX2.8/Ex2_8.sce b/2621/CH2/EX2.8/Ex2_8.sce new file mode 100644 index 000000000..45285c69c --- /dev/null +++ b/2621/CH2/EX2.8/Ex2_8.sce @@ -0,0 +1,24 @@ +// Example 2.8
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+V1= 10;// in mV
+V2= 9;// in mV
+Ad= 60;// differential voltage gain in dB
+Ad= 10^(Ad/20);
+CMRR= 80;// in dB
+CMRR= 10^(CMRR/20);
+Vd= V1-V2;// difference signal in mV
+Vcm= (V1+V2)/2;// common-mode signal in mV
+// Output voltage,
+Vout= Ad*Vd*(1+1/CMRR*Vcm/Vd);// in mV
+AdVd= Ad*Vd;// in mV
+// Error voltage
+Verror= Vout-AdVd;// in mV
+Per_error= Verror/Vout*100;// percentage error
+disp(Verror,"The error voltage in mV is : ")
+disp(Per_error,"The percentage error in the output voltage is : ")
+
+
diff --git a/2621/CH2/EX2.9/Ex2_9.sce b/2621/CH2/EX2.9/Ex2_9.sce new file mode 100644 index 000000000..38d78f6fb --- /dev/null +++ b/2621/CH2/EX2.9/Ex2_9.sce @@ -0,0 +1,25 @@ +// Example 2.9
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+V1= 745;// in µV
+V2= 740;// in µV
+Ad= 5*10^5;// differential voltage gain
+CMRR= 80;// in dB
+CMRR= 10^(CMRR/20);
+Vd= V1-V2;// difference signal in µV
+Vcm= (V1+V2)/2;// common-mode signal in µV
+// Output voltage,
+Vout= Ad*Vd*(1+1/CMRR*Vcm/Vd);// in µV
+AdVd= Ad*Vd;// in µV
+// Error voltage
+Verror= Vout-AdVd;// in µV
+Vout= Vout*10^-6;// in V
+Verror= Verror*10^-6;// in V
+Per_error= Verror/Vout*100;// percentage error
+disp(Vout,"The output voltage in volts is : ")
+disp(Per_error,"The percentage error in the output voltage is : ")
+
+
diff --git a/2621/CH3/EX3.1/Ex3_1.sce b/2621/CH3/EX3.1/Ex3_1.sce new file mode 100644 index 000000000..1ee1bd0ab --- /dev/null +++ b/2621/CH3/EX3.1/Ex3_1.sce @@ -0,0 +1,13 @@ +// Example 3.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Af= 10;// voltage gain
+R1= 3;// in Ω
+Rf= (Af-1)*R1;// From Af= 1+Rf/R1
+disp(R1,"The value of R1 in Ω is : ");
+disp(Rf,"The value of Rf in Ω is : ");
+
+
diff --git a/2621/CH3/EX3.10/Ex3_10.sce b/2621/CH3/EX3.10/Ex3_10.sce new file mode 100644 index 000000000..62497235c --- /dev/null +++ b/2621/CH3/EX3.10/Ex3_10.sce @@ -0,0 +1,15 @@ +// Example 3.10
+clc;
+clear;
+close;
+// Given data
+format('v',4);
+Av= -30;// voltage gain
+Rf= 1*10^6;// in Ω
+//Since, Av= Vo/Vi=-Rf/R1, so
+R1= -Rf/Av;// in Ω
+R1= R1*10^-3;// in kΩ
+Rf= Rf*10^-6;// in MΩ
+disp(Rf,"The value of Rf in MΩ is : ")
+disp(R1,"The value of R1 in kΩ is : ");
+
diff --git a/2621/CH3/EX3.11/Ex3_11.sce b/2621/CH3/EX3.11/Ex3_11.sce new file mode 100644 index 000000000..078403365 --- /dev/null +++ b/2621/CH3/EX3.11/Ex3_11.sce @@ -0,0 +1,19 @@ +// Example 3.11
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Av= -8;// voltage gain
+Vi= 1;// input voltage in V
+I1= 15;//maximum current in µA
+I1= I1*10^-6;// in A
+R1= Vi/I1;// in Ω
+R1= R1*10^-3;// in kΩ
+disp(R1,"The value of R1 in kΩ is : ");
+disp("The standard value of R1 is 68 kΩ");
+R1= 68;// in kΩ
+Rf= -Av*R1;// in kΩ
+disp(Rf,"The value of Rf in kΩ is : ");
+
+// Note : The calculated value of Rf in the book is wrong [-(-8)*68 is not equal to 384], it will be 544 kΩ
diff --git a/2621/CH3/EX3.14/Ex3_14.sce b/2621/CH3/EX3.14/Ex3_14.sce new file mode 100644 index 000000000..a6f17477c --- /dev/null +++ b/2621/CH3/EX3.14/Ex3_14.sce @@ -0,0 +1,19 @@ +// Example 3.14
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Rf= 20*10^3;// in Ω
+R1= 10*10^3;// in Ω
+
+//Part (i) When switch S is off,
+Aoff_non_inv= 1+Rf/R1;// non-inverting amplifier circuit gain
+ Aoff_inv= -Rf/R1;// inverting amplifier gain
+ Aoff= Aoff_non_inv+Aoff_inv;// amplifier circuit gain
+ disp(Aoff,"Part (i) : When switch S is off, the gain of the amplifier circuit is : ");
+
+// Part (ii) When switch S is on,
+Aon= -Rf/R1;// amplifier circuit gain
+disp(Aon,"Part (ii) : When switch S is on, the gain of the amplifer circuit is : ");
+
diff --git a/2621/CH3/EX3.17/Ex3_17.sce b/2621/CH3/EX3.17/Ex3_17.sce new file mode 100644 index 000000000..8a17bbc95 --- /dev/null +++ b/2621/CH3/EX3.17/Ex3_17.sce @@ -0,0 +1,25 @@ +// Example 3.17
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 1*10^3;// in Ω
+R2= 1*10^3;// in Ω
+Rf= 10*10^3;// in Ω
+R3= 10*10^3;// in Ω
+Vd= 5;// in mV
+Vcm= 2;// in mV
+CMRR_dB= 90;// in dB
+CMRR= 10^(CMRR_dB/20);
+Ad= Rf/R1;// differential voltage gain
+// Part (i)
+Vout= Ad*Vd;// output voltage in mV
+disp(Vout,"Part (i) : The output voltage in mV is : ");
+// Part (ii)
+Acm= Ad/CMRR;// common mode gain
+AcmVcm= Acm*Vcm;// magnitude of the induced 60Hz noise at the output in mV
+AcmVcm= AcmVcm*10^3;// in µV
+disp(AcmVcm,"The magnitude of the induced 60Hz noise at the output in µV is : ")
+
+
diff --git a/2621/CH3/EX3.18/Ex3_18.sce b/2621/CH3/EX3.18/Ex3_18.sce new file mode 100644 index 000000000..230d99ba7 --- /dev/null +++ b/2621/CH3/EX3.18/Ex3_18.sce @@ -0,0 +1,26 @@ +// Example 3.18
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 540;// in Ω
+R3= 540;// in Ω
+R2= 5.4*10^3;// in Ω
+Rf= 5.4*10^3;// in Ω
+Vin1= -2.5;// in V
+Vin2= -3.5;//in V
+Rin= 2*10^6;//input impedance in Ω
+A= 2*10^5;// open loop voltage gain
+Ad= (1+Rf/R1);// voltage gain
+disp(Ad,"The voltage gain is : ");
+Vout=Ad*(Vin1-Vin2);// output voltage in V
+disp(Vout,"The output voltage in volts is : ");
+Rin_f1= Rin*(1+A*R1/(R1+Rf));// in Ω
+Rin_f2= Rin*(1+A*R2/(R1+Rf));// in Ω
+format('e',10);
+disp(Rin_f1,"The value of Rin_f1 in Ω is : ")
+disp(Rin_f2,"The value of Rin_f2 in Ω is : ")
+
+
+
diff --git a/2621/CH3/EX3.19/Ex3_19.sce b/2621/CH3/EX3.19/Ex3_19.sce new file mode 100644 index 000000000..3d3c69d1c --- /dev/null +++ b/2621/CH3/EX3.19/Ex3_19.sce @@ -0,0 +1,17 @@ +// Example 3.19
+clc;
+clear;
+close;
+// Given data
+format('v',4);
+Vin= 100*10^-3;// in V
+Vout= 4.25;// in V
+R1= 100;// in Ω
+// Formula Used : Vout= (1+2*Rf/Rf)*Vin
+Rf= (Vout/Vin-1)*R1/2;// in Ω
+Rf= Rf*10^-3;// in kΩ
+disp(R1,"The value of R1 in Ω is : ")
+disp(Rf,"The value of Rf in kΩ is : ")
+disp("(Standard value of Rf is 2.2 kΩ)")
+
+
diff --git a/2621/CH3/EX3.2/Ex3_2.sce b/2621/CH3/EX3.2/Ex3_2.sce new file mode 100644 index 000000000..5d401db0f --- /dev/null +++ b/2621/CH3/EX3.2/Ex3_2.sce @@ -0,0 +1,16 @@ +// Example 3.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 2;// in kΩ
+Rf_min= 0;
+Rf_max= 100;// in kΩ
+// Formula Used : Af= 1+Rf/R1
+Af_max= 1+Rf_max/R1;// maximum closed loop voltage gain
+Af_min= 1+Rf_min/R1;// minimum closed loop voltage gain
+disp(Af_max,"The maximum closed loop voltage gain is : ");
+disp(Af_min,"The minimum closed loop voltage gain is : ");
+
+
diff --git a/2621/CH3/EX3.20/Ex3_20.sce b/2621/CH3/EX3.20/Ex3_20.sce new file mode 100644 index 000000000..f133302e1 --- /dev/null +++ b/2621/CH3/EX3.20/Ex3_20.sce @@ -0,0 +1,30 @@ +// Example 3.20
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+R1= 3.3;// in kΩ
+R2= 3.3;// in kΩ
+R3= 1.2;// in kΩ
+R4= 1.2;// in kΩ
+Rf= 3.9;// in kΩ
+R5= 3.9;// in kΩ
+Rp= 2.5;// in kΩ
+A= 2*10^5;// unit less
+f0= 5;// in Hz
+Rin= 2*10^6;// in Ω
+Rout= 75;// in Ω
+Ad= -(1+2*R1/Rp)*Rf/R3;// voltage gain
+disp(Ad,"The voltage gain is : ");
+Rinf= Rin*(1+A*(R1+Rp)/(2*R1+Rp));//input resistance in Ω
+Rinf= Rinf*10^-9;// in GΩ
+disp(Rinf,"The input resistance in GΩ is : ");
+Routf= Rout/(1+A/Ad);// output resistance in Ω
+disp(Routf,"The output resistance in Ω is : ");
+f_f= A*f0/abs(Ad);// bandwidth in Hz
+f_f= f_f*10^-3;// in kHz
+disp(f_f,"The bandwidth in kHz is : ");
+
+
+
diff --git a/2621/CH3/EX3.3/Ex3_3.sce b/2621/CH3/EX3.3/Ex3_3.sce new file mode 100644 index 000000000..283aa4ab9 --- /dev/null +++ b/2621/CH3/EX3.3/Ex3_3.sce @@ -0,0 +1,25 @@ +// Example 3.3
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 100;// in Ω
+Rf= 100*10^3;// in Ω
+A= 2*10^5;//unit less
+Rin= 2*10^6;// in Ω
+Rout= 75;// in Ω
+f0= 5;// in Hz
+B= R1/(R1+Rf);// feedback fraction
+AB= A*B;// feedback factor
+Af= 1+Rf/R1;// voltage gain
+Rin_f= Rin*(1+AB);// input resistance in Ω
+Rout_f= Rout/(1+AB);// output resistance in Ω
+f_f= f0*(1+AB);// bandwidth in Hz
+Rin_f= Rin_f*10^-6;// in MΩ
+disp(Af,"The voltage gain is : ");
+disp(Rin_f,"The input resistance in MΩ is : ");
+disp(Rout_f,"The output resistance in Ω is : ")
+disp(f_f,"The bandwidth in Hz is : ");
+
+
diff --git a/2621/CH3/EX3.4/Ex3_4.sce b/2621/CH3/EX3.4/Ex3_4.sce new file mode 100644 index 000000000..ef10a78ec --- /dev/null +++ b/2621/CH3/EX3.4/Ex3_4.sce @@ -0,0 +1,24 @@ +// Example 3.4
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+Rin= 2*10^6;// in Ω
+Rout= 75;// in Ω
+f0= 5;// in Hz
+A= 2*10^5;//unit less
+B=1;// for voltage follower
+Rf= 0;
+Af= 1;// voltage gain (since Rf=0)
+Rin_f= A*Rin;// input resistance in Ω
+Rin_f= Rin_f*10^-9;// in GΩ
+Rout_f= Rout/A;//output resistance in Ω
+f_f= f0*A;// bandwidth in Hz
+f_f= f_f*10^-6;// in MHz
+disp(Af,"The voltage gain is : ");
+disp(Rin_f,"The input resistance in GΩ is : ");
+disp(Rout_f,"The output resistance in Ω is : ")
+disp(f_f,"The bandwidth in MHz is : ");
+
+
diff --git a/2621/CH3/EX3.5/Ex3_5.sce b/2621/CH3/EX3.5/Ex3_5.sce new file mode 100644 index 000000000..3451f05ea --- /dev/null +++ b/2621/CH3/EX3.5/Ex3_5.sce @@ -0,0 +1,26 @@ +// Example 3.5
+clc;
+clear;
+close;
+// Given data
+format('v',8);
+Rin= 2*10^6;// in Ω
+Rout= 75;// in Ω
+f0= 5;// in Hz
+R1= 330;//in Ω
+Rf= 3.3*10^3;// in Ω
+A= 2*10^5;//unit less
+B= R1/(R1+Rf);// feedback fraction
+AB= A*B;// feedback factor
+Af= -Rf/R1;// colsed-loop voltage gain
+Rin_f= R1;// input resistance with feedback in Ω
+Rout_f=Rout/(1+AB);// output resistance with feedback in Ω
+f_f= f0*(1+AB);// closed-loop bandwidth in Hz
+f_f= f_f*10^-3;// in kHz
+disp(Af,"The closed-loop voltage gain is : ");
+disp(Rin_f,"The input resistance in Ω is : ");
+disp(Rout_f,"The output resistance in Ω is : ");
+disp(f_f,"The bandwidth in kHz is : ");
+
+
+
diff --git a/2621/CH3/EX3.6/Ex3_6.sce b/2621/CH3/EX3.6/Ex3_6.sce new file mode 100644 index 000000000..0a2c3cbe2 --- /dev/null +++ b/2621/CH3/EX3.6/Ex3_6.sce @@ -0,0 +1,22 @@ +// Example 3.6
+clc;
+clear;
+close;
+// Given data
+format('v',8);
+Rin= 2*10^6;// in Ω
+Rout= 75;// in Ω
+f0= 5;// in Hz
+A= 2*10^5;//unit less
+B= 1/2;// feedback fraction (since R1=Rf)
+Af= -1;// voltage gain
+R1= 330;//in Ω (assume)
+Rin_f= R1;// input resistance with feedback in Ω
+Rout_f= Rout/(A/2);// output resistance in Ω
+f_f= A/2*f0;// in Hz
+f_f= f_f*10^-6;// in MHz
+disp(Af,"The closed-loop voltage gain is : ");
+disp(Rin_f,"The input resistance in Ω is : ");
+disp(Rout_f,"The output resistance in Ω is : ");
+disp(f_f,"The bandwidth in kHz is : ");
+
diff --git a/2621/CH3/EX3.7/Ex3_7.sce b/2621/CH3/EX3.7/Ex3_7.sce new file mode 100644 index 000000000..fe0171812 --- /dev/null +++ b/2621/CH3/EX3.7/Ex3_7.sce @@ -0,0 +1,51 @@ +// Example 3.7
+clc;
+clear;
+close;
+// Given data
+format('v',8);
+Rin= 2*10^6;// in Ω
+Rout= 75;// in Ω
+f0= 5;// in Hz
+A= 200000;//unit less
+VCC= 15;// in V
+VEE= -15;// in V
+Vout_swing= 13;// in V
+// Part (i) : Non-inverting Amplifier
+R1= 1*10^3;// in Ω
+Rf= 10*10^3;//in Ω
+B= R1/(R1+Rf);// feedback fraction
+AB= A*B;// feedback factor
+Af= 1+Rf/R1;// voltage gain
+Rin_f= Rin*(1+AB);// input resistance in Ω
+Rin_f=Rin_f*10^-9;// in GΩ
+Rout_f= Rout/(1+AB);// output resistance in Ω
+f_f= f0*(1+AB);// bandwidth in Hz
+f_f=f_f*10^-3;// in kHz
+VooT= Vout_swing/(1+AB);//in V
+VooT= VooT*10^3;// in mV
+disp("Part (i) : Non-inverting Amplifier :- ");
+disp(Af,"The closed-loop voltage gain is : ");
+disp(Rin_f,"The input resistance in GΩ is : ");
+disp(Rout_f,"The output resistance in Ω is : ");
+disp(f_f,"The bandwidth in kHz is : ");
+disp("The output offset voltage with feedback is : ± "+string(VooT)+" mV")
+
+// Part (ii) : Inverting Amplifier
+R1= 470;// in Ω
+Rf= 4.7*10^3;//in Ω
+B= R1/(R1+Rf);// feedback fraction
+AB= A*B;// feedback factor
+Af= -Rf/R1;// voltage gain
+Rin_f= R1;// input resistance in Ω
+Rout_f= Rout/(1+AB);// output resistance in Ω
+f_f= f0*(1+AB);// bandwidth in Hz
+f_f=f_f*10^-3;// in kHz
+VooT= Vout_swing/(1+AB);//in V
+VooT= VooT*10^3;// in mV
+disp("Part (ii) : Inverting Amplifier :- ");
+disp(Af,"The closed-loop voltage gain is : ");
+disp(Rin_f,"The input resistance in GΩ is : ");
+disp(Rout_f,"The output resistance in Ω is : ");
+disp(f_f,"The bandwidth in kHz is : ");
+disp("The output offset voltage with feedback is : ± "+string(VooT)+" mV")
diff --git a/2621/CH3/EX3.8/Ex3_8.sce b/2621/CH3/EX3.8/Ex3_8.sce new file mode 100644 index 000000000..3a9ee3ba3 --- /dev/null +++ b/2621/CH3/EX3.8/Ex3_8.sce @@ -0,0 +1,22 @@ +// Example 3.8
+clc;
+clear;
+close;
+// Given data
+format('v',8);
+Rf= 500*10^3;// in Ω
+R1= 5*10^3;//in Ω
+Vin= 0.1;// input voltage in V
+Af= -Rf/R1;// voltage gain
+Rin= R1;// input resistance in Ω
+Rin= Rin*10^-3;// in kΩ
+Rout= 0;// in Ω
+Vout= Af*Vin;// output voltage in V
+I_in= Vin/R1;// input current in A
+I_in= I_in*10^3;// in mA
+disp(Af,"The amplifier circuit voltage gain is : ");
+disp(Rin,"The amplifier circuit input resistance in kΩ is : ");
+disp(Rout,"The amplifier circuit output resistance in Ω is : ");
+disp(Vout,"The output voltage in volts is : ");
+disp(I_in,"The input current in mA is : ");
+
diff --git a/2621/CH3/EX3.9/Ex3_9.sce b/2621/CH3/EX3.9/Ex3_9.sce new file mode 100644 index 000000000..a13f2e3df --- /dev/null +++ b/2621/CH3/EX3.9/Ex3_9.sce @@ -0,0 +1,18 @@ +// Example 3.9
+clc;
+clear;
+close;
+// Given data
+format('v',8);
+Rf= 1*10^6;// in Ω
+Rin= 1*10^6;// in Ω
+Vout_by_Vin= -Rf/Rin;// (since Vout= -Rf/Rin*Vin)
+Av= Vout_by_Vin;// voltage gain
+disp(Av,"The voltage gain is : ");
+// I_in= Iout (As it is a unity gain inverter)
+Ain= 1;//input impedance (since I_in= Iout)
+disp(Ain,"The input impedance is : ");
+Ap= abs(Av*Ain);// power gain
+disp(Ap,"The power gain is : ");
+
+
diff --git a/2621/CH4/EX4.1/Ex4_1.sce b/2621/CH4/EX4.1/Ex4_1.sce new file mode 100644 index 000000000..dbea550b8 --- /dev/null +++ b/2621/CH4/EX4.1/Ex4_1.sce @@ -0,0 +1,20 @@ +// Example 4.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Vout= '-(V1+10*V2+100*V3)';//given expression
+Rf= 100;// in kΩ
+// Vout= -Rf*(V1/R1+V2/R2+V3/R3)= -(Rf/R1*V1+Rf/R2*V2+Rf/R3*V3) (i)
+// Compare equation(i) with given expression
+R1= Rf/1;//in kΩ
+R2= Rf/10;// in kΩ
+R3= Rf/100;// in kΩ
+disp(Rf,"The value of Rf in kΩ is : ");
+disp(R1,"The value of R1 in kΩ is : ");
+disp(R2,"The value of R2 in kΩ is : ");
+disp(R3,"The value of R3 in kΩ is : ");
+
+
+
diff --git a/2621/CH4/EX4.10/Ex4_10.sce b/2621/CH4/EX4.10/Ex4_10.sce new file mode 100644 index 000000000..c55dd57e9 --- /dev/null +++ b/2621/CH4/EX4.10/Ex4_10.sce @@ -0,0 +1,22 @@ +// Example 4.10
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+R= 500;// in kΩ
+R= R*10^3;// in Ω
+C= 10;// in µF
+C= C*10^-6;// in F
+vout= 12;// in V
+v= -0.5;// in V
+vout_by_t= -1/(R*C)*integrate('-t','t',0,1);//in V/sec
+// Time required for saturation of output voltage
+t= vout/vout_by_t;// in sec
+disp(t,"The time duration required for saturation of output voltage in seconds is : ")
+
+
+
+
+
+
diff --git a/2621/CH4/EX4.12/Ex4_12.sce b/2621/CH4/EX4.12/Ex4_12.sce new file mode 100644 index 000000000..9dcfe9cd7 --- /dev/null +++ b/2621/CH4/EX4.12/Ex4_12.sce @@ -0,0 +1,34 @@ +// Example 4.12
+clc;
+clear;
+close;
+format('v',7);
+// Given data
+fa= 1;// in kHz
+fa= fa*10^3;// in Hz
+Vp= 1.5;// in V
+f= 200;// in Hz
+C= 0.1*10^-6;// in F
+t= poly(0,'t');
+R= 1/(2*%pi*fa*C);// in Ω
+R= 1.5;// in kΩ (standard value)
+fb= 20*fa;// in Hz
+R_desh= 1/(2*%pi*fb*C);// in Ω
+R_desh= 82;// in Ω (standard value), so
+R_OM= R;// in kΩ
+// Vin= Vp*sin(omega*t)= Vp*sin(2*%pi*f)*t
+disp("The input votage : Vin = "+string(Vp)+ " sin(400*%pi*t)")
+RC= R*10^3*C;// in ΩF
+V= -RC*Vp*400*%pi;
+//Vout= -RC*dVin/dt= -RC*Vp*400*%pi*cos(400*%pi*t)
+disp("The output voltage : Vout = "+string(V)+" cos(400*%pi*t)")
+x=[0:0.1:5*%pi/2];
+plot(V*cos(x))
+title("output Waveform");
+xlabel("---- Time ---->");
+ylabel("---- output voltage ---->");
+disp("output Waveform is shown in figure.")
+
+
+
+
diff --git a/2621/CH4/EX4.13/Ex4_13.sce b/2621/CH4/EX4.13/Ex4_13.sce new file mode 100644 index 000000000..936dc82f9 --- /dev/null +++ b/2621/CH4/EX4.13/Ex4_13.sce @@ -0,0 +1,26 @@ +// Example 4.13
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+Vp= 1;// in V
+f= 1000;// in Hz
+R= 1.5*10^3;// in Ω
+C= 0.1*10^-6;// in F
+// Vin= Vp*sin(omega*t)= Vp*sin(2*%pi*f)*t
+disp("The input votage : Vin = sin(2000*%pi*t)")
+RC= R*C;// in ΩF
+V= -RC*2000*%pi;
+//Vout= -RC*dVin/dt= -RC*Vp*2000*%pi*cos(2000*%pi*t)
+disp("The output voltage : Vout = "+string(V)+" cos(2000*%pi*t)")
+x=[0:0.1:4*%pi];
+plot(-1.88*cos(x))
+title("Output Waveform");
+xlabel("---- Time ---->");
+ylabel("---- output voltage ---->");
+disp("Waveform is shown in figure.")
+
+
+
+
diff --git a/2621/CH4/EX4.15/Ex4_15.sce b/2621/CH4/EX4.15/Ex4_15.sce new file mode 100644 index 000000000..f24046b39 --- /dev/null +++ b/2621/CH4/EX4.15/Ex4_15.sce @@ -0,0 +1,24 @@ +// Example 4.15
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+R1= 50;// in kΩ
+R3=15;// in kΩ
+R4=R3;// in kΩ
+// For minimum differential voltage gain,
+Ad_min= 5;// and
+Ad= Ad_min;
+// From Ad= 1+2*R2/R1
+R2= (Ad-1)*R1/2;// in kΩ
+// For maximum differential voltage gain,
+Ad_max= 200;// and
+Ad= Ad_max;
+// From Ad= 1+2*R2/R1
+R1_min= round(2*R2/(Ad-1));// in kΩ
+disp("The value of R1 : "+string(R1_min)+" kΩ - "+string(R1)+" kΩ")
+disp(R2,"The value of R2 in kΩ is : ")
+disp(R3,"The value of R3 and R4 in kΩ is : ")
+
+
diff --git a/2621/CH4/EX4.2/Ex4_2.sce b/2621/CH4/EX4.2/Ex4_2.sce new file mode 100644 index 000000000..6053f4208 --- /dev/null +++ b/2621/CH4/EX4.2/Ex4_2.sce @@ -0,0 +1,18 @@ +// Example 4.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Rf= 12;// in kΩ
+R1= 12;// in kΩ
+R2= 2;// in kΩ
+R3= 3;// in kΩ
+V1= 9;// in V
+V2= -3;// in V
+V3= -1;// in V
+Vout= -Rf*(V1/R1+V2/R2+V3/R3);// output voltage in V
+disp(Vout,"The output voltage in volts is : ");
+
+
+
diff --git a/2621/CH4/EX4.3/Ex4_3.sce b/2621/CH4/EX4.3/Ex4_3.sce new file mode 100644 index 000000000..cc2e09f65 --- /dev/null +++ b/2621/CH4/EX4.3/Ex4_3.sce @@ -0,0 +1,20 @@ +// Example 4.3
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Vout= '(-V1+2*V2-3*V3)';//given expression
+Rf= 6;// in kΩ
+// Vout= -(Rf/R1*V1+Rf/R2*V2+Rf/R3*V3) (i)
+// Compare equation(i) with given expression
+R1= Rf/1;//in kΩ
+R2= Rf/2;// in kΩ
+R3= Rf/3;// in kΩ
+disp(Rf,"The value of Rf in kΩ is : ");
+disp(R1,"The value of R1 in kΩ is : ");
+disp(R2,"The value of R2 in kΩ is : ");
+disp(R3,"The value of R3 in kΩ is : ");
+
+
+
diff --git a/2621/CH4/EX4.4/Ex4_4.sce b/2621/CH4/EX4.4/Ex4_4.sce new file mode 100644 index 000000000..8c5951e2a --- /dev/null +++ b/2621/CH4/EX4.4/Ex4_4.sce @@ -0,0 +1,19 @@ +// Example 4.4
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+Vout= '(-2*V1+3*V2+4*V3)';//given expression
+R3= 10;// in kΩ
+// Vout= -(Rf/R1*V1+Rf/R2*V2+Rf/R3*V3) (i)
+// Compare equation(i) with given expression
+Rf= 4*R3;//in kΩ
+R2= Rf/3;// in kΩ
+R1= Rf/2;// in kΩ
+disp(Rf,"The value of Rf in kΩ is : ");
+disp(R2,"The value of R2 in kΩ is : ");
+disp(R1,"The value of R1 in kΩ is : ");
+
+
+
diff --git a/2621/CH4/EX4.5/Ex4_5.sce b/2621/CH4/EX4.5/Ex4_5.sce new file mode 100644 index 000000000..cee965489 --- /dev/null +++ b/2621/CH4/EX4.5/Ex4_5.sce @@ -0,0 +1,20 @@ +// Example 4.5
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+V1= 2;// in V
+V2= -1;// in V
+R=100;// in Ω (assumed)
+Vs1= V1*(R/2)/(R+R/2);// in V
+Rf= 2*R;// in Ω
+Vo_1= Vs1*(1+Rf/R);// in V
+Vs2= V2*(R/2)/(R+R/2);// in V
+Vo_2= Vs2*(1+Rf/R);// in V
+Vout= Vo_1+Vo_2;//output voltage in V
+disp(Vout,"The output voltage in volts is : ");
+
+
+
+
diff --git a/2621/CH4/EX4.7/Ex4_7.sce b/2621/CH4/EX4.7/Ex4_7.sce new file mode 100644 index 000000000..266f32096 --- /dev/null +++ b/2621/CH4/EX4.7/Ex4_7.sce @@ -0,0 +1,24 @@ +// Example 4.7
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+Vin= 10;// in V
+R= 2.2;// in kΩ
+R= R*10^3;// in kΩ
+Ad= 10^5;// differential voltage gain
+C=1;// in µF
+C= C*10^-6;// in F
+T= 1;// in ms
+T= T*10^-3;// in s
+I= Vin/R;// in mA
+V= I*T/C;// output voltage at the end of pulse in mV
+V= V*10^-3;// in V
+disp(V,"The output voltage at the end of the pulse in volts is : ")
+RC_desh= R*C*Ad;// closed-loop time constant in sec.
+disp(RC_desh,"The closed-loop time constant in seconds : ")
+
+
+
+
diff --git a/2621/CH4/EX4.8/Ex4_8.sce b/2621/CH4/EX4.8/Ex4_8.sce new file mode 100644 index 000000000..b6480d250 --- /dev/null +++ b/2621/CH4/EX4.8/Ex4_8.sce @@ -0,0 +1,21 @@ +// Example 4.8
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+A_dB= 20;// peak gain in dB
+A= 10^(A_dB/20);// peak gain
+omega= 10000;// in rad/second
+C= 0.01;// in µF
+C= C*10^-6;// in F
+Rf= 10;// in kΩ
+// Vout/V1= Rf/R1= A
+R1= Rf/A;// in kΩ
+disp(Rf,"The value of Rf in kΩ is : ");
+disp(R1,"The value of R1 in kΩ is : ");
+
+
+
+
+
diff --git a/2621/CH4/EX4.9/Ex4_9.sce b/2621/CH4/EX4.9/Ex4_9.sce new file mode 100644 index 000000000..35ecdb9a3 --- /dev/null +++ b/2621/CH4/EX4.9/Ex4_9.sce @@ -0,0 +1,26 @@ +// Example 4.9
+clc;
+clear;
+close;
+format('v',6);
+// Given data
+R= 40;// in kΩ
+R= R*10^3;// in Ω
+C= 0.2;// in µF
+C= C*10^-6;// in F
+Vin= 5;// in V
+V1= 3;// in V
+t= 50;// in ms
+Vout= 3;// in V
+t=[0:0.1:50];
+vout= -1/(R*C)*integrate('(Vin-V1)','t',0,t)*10^-3+Vout;//in V
+plot(t,vout);
+title("Sketch of output voltage");
+xlabel("Time in milliseconds");
+ylabel("Output voltage in volts")
+disp("Plot for output voltage shown in figure");
+
+
+
+
+
diff --git a/2621/CH5/EX5.1/Ex5_1.sce b/2621/CH5/EX5.1/Ex5_1.sce new file mode 100644 index 000000000..a269b2fba --- /dev/null +++ b/2621/CH5/EX5.1/Ex5_1.sce @@ -0,0 +1,21 @@ +// Example 5.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+C= 0.01;// in µF
+C=C*10^-6;// in F
+R_A= 2;// in kΩ
+R_A=R_A*10^3;// in Ω
+R_B= 100;// in kΩ
+R_B=R_B*10^3;// in Ω
+T_HIGH= 0.693*(R_A+R_B)*C;//charging period in second
+T_LOW= 0.693*R_B*C;// discharging period in second
+T= T_HIGH+T_LOW;// overall period of oscillations in second
+f= 1/T;// frequency of oscillations in Hz
+D= T_HIGH/T*100;// duty cycle in %
+disp(f,"The frequency of oscillations in Hz is : ")
+disp(D,"Duty cycle in % is : ")
+
+
diff --git a/2621/CH5/EX5.10/Ex5_10.sce b/2621/CH5/EX5.10/Ex5_10.sce new file mode 100644 index 000000000..8a1dea92b --- /dev/null +++ b/2621/CH5/EX5.10/Ex5_10.sce @@ -0,0 +1,24 @@ +// Example 5.10
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+I_Bmax= 500;// in nA
+I_Bmax= I_Bmax*10^-9;// in A
+VCC= 10;// in V
+f= 10*10^3;// in Hz
+I1= 500*10^-6;// current through R1 in A (assume)
+Vout= (VCC-1);//output voltage in V
+// Rf+R1= Vout/I1 and Rf= 2*R1, so
+R1= Vout/(3*I1);// in Ω
+R1= R1*10^-3;// in kΩ
+disp("The value of R1 is : "+string(R1)+" kΩ (standard value 5.6 kΩ)");
+R1= 5.6;// in kΩ (standard value)
+Rf= 2*R1;// in kΩ
+disp("The value of Rf is : "+string(Rf)+" kΩ (standard value 12 kΩ)");
+R= R1;// in kΩ
+R= R*10^3;// in Ω
+C= 1/(2*%pi*f*R);// in F
+C= C*10^12;// in pF
+disp("The value of C is : "+string(C)+" pF");
diff --git a/2621/CH5/EX5.11/Ex5_11.sce b/2621/CH5/EX5.11/Ex5_11.sce new file mode 100644 index 000000000..cbb817a00 --- /dev/null +++ b/2621/CH5/EX5.11/Ex5_11.sce @@ -0,0 +1,13 @@ +// Example 5.11
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R= 1*10^3;// in Ω
+C= 4.7*10^-6;// in F
+omega= 1/(R*C);// radians/second
+f= omega/(2*%pi);// in Hz
+disp(f,"The frequency of oscillation in Hz is : ")
+
+
diff --git a/2621/CH5/EX5.2/Ex5_2.sce b/2621/CH5/EX5.2/Ex5_2.sce new file mode 100644 index 000000000..1bac646e4 --- /dev/null +++ b/2621/CH5/EX5.2/Ex5_2.sce @@ -0,0 +1,24 @@ +// Example 5.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+C= 1;// in µF
+C=C*10^-6;// in F
+R_A= 4.7;// in kΩ
+R_A=R_A*10^3;// in Ω
+R_B= 1;// in kΩ
+R_B=R_B*10^3;// in Ω
+T_on= 0.693*(R_A+R_B)*C;//positive pulse width in second
+T_on= T_on*10^3;// in ms
+T_off= 0.693*R_B*C;// pulse width in second
+T_off= T_off*10^3;// in ms
+f= 1.4/((R_A+2*R_B)*C);// free running frequency in Hz
+D= round((R_A+R_B)/(R_A+2*R_B)*100);// in %
+disp(T_on,"The positive pulse width in ms")
+disp(T_off,"The negative pulse width in ms")
+disp(f,"The frequency of oscillations in Hz is : ")
+disp(D,"Duty cycle in % is : ")
+
+
diff --git a/2621/CH5/EX5.3/Ex5_3.sce b/2621/CH5/EX5.3/Ex5_3.sce new file mode 100644 index 000000000..bc7a43631 --- /dev/null +++ b/2621/CH5/EX5.3/Ex5_3.sce @@ -0,0 +1,17 @@ +// Example 5.3
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+C= 0.01;// in µF
+C= C*10^-6;// in F
+f= 1;// in kHz
+f= f*10^3;// in Hz
+// For 50% duty cycle, Ton= Toff = T/2 and R_A= R_B
+// From equation, f= 1.44/((R_A+R_B)*C)= 1.44/(2*R_A*C)
+R_A= 1.44/(2*f*C);// in Ω
+R_A= R_A*10^-3;// in kΩ
+R_B= R_A;// in kΩ
+disp(R_A,"The value of R_A and R_B in kΩ : ")
+disp("(Standard value 68 kΩ)")
diff --git a/2621/CH5/EX5.4/Ex5_4.sce b/2621/CH5/EX5.4/Ex5_4.sce new file mode 100644 index 000000000..718fd8520 --- /dev/null +++ b/2621/CH5/EX5.4/Ex5_4.sce @@ -0,0 +1,18 @@ +// Example 5.4
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+f= 700;// in Hz
+C= 0.01;// in µF (assumed)
+C= C*10^-6;// in F
+// For 50% duty cycle, Ton= Toff = T/2 and R_A= R_B
+// From equation, f= 1.44/((R_A+R_B)*C)= 1.44/(2*R_A*C)
+R_A= 1.44/(2*f*C);// in Ω
+R_A= R_A*10^-3;// in kΩ
+R_B= R_A;// in kΩ
+C= C*10^6;// in µF
+disp(R_A,"The value of R_A and R_B in kΩ : ")
+disp("(Standard value 100 kΩ)")
+disp(C,"The value of C in µF is : ")
diff --git a/2621/CH5/EX5.5/Ex5_5.sce b/2621/CH5/EX5.5/Ex5_5.sce new file mode 100644 index 000000000..5015449ec --- /dev/null +++ b/2621/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,20 @@ +// Example 5.5
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+f= 800;// in Hz
+C= 0.01;// in µF (assumed)
+C= C*10^-6;// in F
+D= 60;// in duty cycle in %
+// D= (R_A+R_B)/(R_A+2*R_B)*100= 60 or
+// R_B= 2*R_A
+R_A= 1.44/(f*5*C);// in Ω (From f=1.44/((R_A+2*R_B)*C))
+R_A= R_A*10^-3;//in kΩ
+R_B= 2*R_A;// in kΩ
+C= C*10^6;//in F
+disp(R_A,"The value of R_A in kΩ is : ");
+disp(R_B,"The value of R_B in kΩ is : ");
+disp(C,"The value of C in µF is : ")
+
diff --git a/2621/CH5/EX5.6/Ex5_6.sce b/2621/CH5/EX5.6/Ex5_6.sce new file mode 100644 index 000000000..4bbc6c4f4 --- /dev/null +++ b/2621/CH5/EX5.6/Ex5_6.sce @@ -0,0 +1,18 @@ +// Example 5.6
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+Rs= 5*10^3;//series resistance in Ω
+Ls= 0.8;// seried inductance in H
+Cs= 0.08*10^-12;//series capacitance in F
+Cp= 1.0*10^-12;// parallel capacitance in F
+fs= 1/(2*%pi*sqrt(Ls*Cs));// series resonant frequency in Hz
+fs= fs*10^-3;// in kHz
+fp= 1/(2*%pi)*sqrt((1+Cs/Cp)/(Ls*Cs));// parallel resonant frequency in Hz
+fp= fp*10^-3;// in kHz
+disp(fs,"The series resonant frequency in kHz is : ")
+disp(fp,"The parallel resonant frequency in kHz is : ")
+
+
diff --git a/2621/CH5/EX5.7/Ex5_7.sce b/2621/CH5/EX5.7/Ex5_7.sce new file mode 100644 index 000000000..e8bc3a6e6 --- /dev/null +++ b/2621/CH5/EX5.7/Ex5_7.sce @@ -0,0 +1,25 @@ +// Example 5.7
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+C1= 1000*10^-12;// in F
+C2= 100*10^-12;// in F
+f= 1*10^6;// in Hz
+R1= 1*10^6;// in Ω (assume)
+R2= 10*10^3;// in Ω (assume)
+Rs= 800;// in Ω
+VDD= 5;// in V
+C_T= C1*C2/(C1+C2);//total capacitance in F
+// At resonance, X_L= X_CT or 2*%pi*f*L= 1/(2*%pi*f*C_T), So
+L= 1/((2*%pi*f)^2*C_T);// in H
+L= L*10^3;// in mH
+disp(L,"The value of inductance in mH is : ")
+i_p= VDD/(R1+R2+Rs);//current through crystal in A
+// Power dissipated in the crystal,
+P_D= (0.707*i_p)^2*Rs;// in W
+P_D= P_D*10^9;//in nW
+disp(P_D,"The power dissipated in the crystal in nW is : ")
+
+
diff --git a/2621/CH5/EX5.8/Ex5_8.sce b/2621/CH5/EX5.8/Ex5_8.sce new file mode 100644 index 000000000..b76cbd94f --- /dev/null +++ b/2621/CH5/EX5.8/Ex5_8.sce @@ -0,0 +1,22 @@ +// Example 5.8
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R= 12*10^3;// in Ω
+R1= 120*10^3;// in Ω
+Rf= 1*10^6;// in Ω
+C= 0.1*10^-6;// in F
+Vsupply= 12;// in V
+Vsat= 10;//in V
+//Part (i) : Signal frequency,
+f= Rf/(4*R1*R*C);// in Hz
+f= f*10^-3;// in kHz
+disp("Part (i) : The signal frequency : "+string(f)+" kHz")
+// Part (ii) : Amplitude of triangular wave,
+Vpp= 2*R1/Rf*Vsat;// Vp-p
+disp("Part (ii) : Amplitude of the triangular wave is : "+string(Vpp)+" Vp-p")
+// Amplitude of square wave,
+Vpp= Vsat-(-Vsat);//Vp-p
+disp("Amplitude of the square wave is : "+string(Vpp)+" Vp-p")
diff --git a/2621/CH6/EX6.1/Ex6_1.sce b/2621/CH6/EX6.1/Ex6_1.sce new file mode 100644 index 000000000..ede6371e5 --- /dev/null +++ b/2621/CH6/EX6.1/Ex6_1.sce @@ -0,0 +1,20 @@ +// Example 6.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 15*10^3;// in Ω
+C1= 0.01*10^-6;// in F
+C2= 10*10^-6;// in F
+R2= 3.6*10^3;// in Ω
+Vpos= 12;// in V
+Vneg= -12;// in V
+f_out= 1.2/(4*R1*C1);// free running frequency in Hz
+f_out= f_out*10^-3;// in kHz
+disp("The free running frequency is : "+string(f_out)+" kHz");
+f_L= 8*f_out/(Vpos-(Vneg));//Lock-range in kHz
+disp("Lock-range of the circuit is : ± "+string(f_L)+" kHz");
+f_L= f_L*10^3;// in Hz
+f_C= sqrt(f_L/(2*%pi*R2*C2));// Hz
+disp("Capture-range of the circuit is : ± "+string(f_C)+" Hz");
diff --git a/2621/CH6/EX6.2/Ex6_2.sce b/2621/CH6/EX6.2/Ex6_2.sce new file mode 100644 index 000000000..94b73f1ae --- /dev/null +++ b/2621/CH6/EX6.2/Ex6_2.sce @@ -0,0 +1,15 @@ +// Example 6.2
+clc;
+clear;
+close;
+// Given data
+format('v',12);
+f_out_max= 200;// in kHz
+f_lowest= 1;// in Hz
+// Frequency of reference oscillator,
+f_ref_os= 2.2*f_out_max;// in kHz
+disp("The frequency of reference oscillator is : "+string(f_ref_os)+" kHz")
+// Formula used : f_lowest= f_ref_os/2^n
+n= round(log(f_ref_os*10^3/f_lowest)/log(2));// number of bits required
+disp("The number of bits required is : "+string(n))
+
diff --git a/2621/CH7/EX7.1/Ex7_1.sce b/2621/CH7/EX7.1/Ex7_1.sce new file mode 100644 index 000000000..f365ee762 --- /dev/null +++ b/2621/CH7/EX7.1/Ex7_1.sce @@ -0,0 +1,21 @@ +// Example 7.1
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+f_H= 2*10^3;//cut-off frequency in Hz
+C= 0.01*10^-6;// in F
+passband_gain= 2.5;
+R= 1/(2*%pi*f_H*C);// in Ω
+R= 8.2;// in kΩ (standard value)
+// 1+Rf/R1= passband_gain or Rf should be equal to 1.5*R1 since Rf||R1= R
+R1= passband_gain/1.5*R;// in kΩ
+disp("The value of R1 is : "+string(R1)+" kΩ");
+disp("(Standard value 15 kΩ)");
+Rf= floor(1.5*R1);// in kΩ
+disp("The value of Rf is : "+string(Rf)+" kΩ");
+
+
+
+
diff --git a/2621/CH7/EX7.10/Ex7_10.sce b/2621/CH7/EX7.10/Ex7_10.sce new file mode 100644 index 000000000..a37c5bd64 --- /dev/null +++ b/2621/CH7/EX7.10/Ex7_10.sce @@ -0,0 +1,27 @@ +// Example 7.10
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+f_L= 2*10^3;// in Hz
+f_H= 2.5*10^3;// in Hz
+Af= -5;
+f_C= sqrt(f_L*f_H);// centre frequency in Hz
+del_f= f_H-f_L;//bandwidth in Hz
+Q= f_C/del_f;// selectivity
+// Assume C1= C2= C= 0.01µF
+C= 0.01*10^-6;// in F
+R3= 1/(%pi*del_f*C);// in Ω
+R3= R3*10^-3;// in kΩ
+disp("The value of R3 is : "+string(R3)+" kΩ (standard value 64 kΩ)");
+R3= 64;// in kΩ
+R3= R3*10^3;// in Ω
+R1= -R3/(2*Af);//in Ω
+R2= R1/(4*%pi^2*f_C^2*R1*R3*C^2-.1)
+R1= R1*10^-3;// in kΩ
+C=C*10^6;// in µF
+disp("The value of R1 is : "+string(R1)+" kΩ ");
+disp("The value of R2 is : "+string(R2)+" kΩ (standard value 800Ω)");
+disp("The value of C is : "+string(C)+" µF ");
+
diff --git a/2621/CH7/EX7.11/Ex7_11.sce b/2621/CH7/EX7.11/Ex7_11.sce new file mode 100644 index 000000000..7aab5acec --- /dev/null +++ b/2621/CH7/EX7.11/Ex7_11.sce @@ -0,0 +1,24 @@ +// Example 7.11
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+f_C= 1*10^3;//centre frequency in Hz
+f_C_desh= 2*10^3;//new centre frequency in Hz
+Q= 5;// selectivity
+Af= -8;
+C= 0.01*10^-6;// in F (assume)
+R3= Q/(%pi*f_C*C);//in Ω
+R3= R3*10^-3;// in kΩ
+disp("The value of R3 is : "+string(R3)+" kΩ (160 kΩ (approx))");
+R1= round(-R3/(2*Af));// in kΩ
+disp("The value of R1 is : "+string(R1)+" kΩ");
+R2= R1*10^3/(4*%pi^2*f_C^2*R1*10^3*R3*10^3*C^2-1);// in Ω
+R2= R2*10^-3;// in kΩ
+disp("The value of R2 is : "+string(R2)+" kΩ (2 kΩ (approx))");
+R2= 2;// in kΩ (approx)
+R2_desh= R2*(f_C/f_C_desh)^2;// in kΩ
+R2_desh= R2_desh*10^3;// in Ω
+disp("The value of R2'' is : "+string(R2_desh)+" Ω")
+
diff --git a/2621/CH7/EX7.12/Ex7_12.sce b/2621/CH7/EX7.12/Ex7_12.sce new file mode 100644 index 000000000..1e0d8f35a --- /dev/null +++ b/2621/CH7/EX7.12/Ex7_12.sce @@ -0,0 +1,16 @@ +// Example 7.12
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R= 10*10^3;// in Ω
+C1= 0.1*10^-6;// in F
+C2= 0.0025*10^-6;// in F
+f_H= 1/(2*%pi*R*C2);//higher cut-off frequency in Hz
+f_H= f_H*10^-3;// in kHz
+f_L= 1/(2*%pi*R*C1);//lower cut-off frequency in Hz
+BW= f_H-f_L*10^-3;// bandwidth in kHz
+disp(f_H,"The higher cut-off frequency in kHz is : ")
+disp(f_L,"The lower cut-off frequency in Hz is : ")
+disp(BW,"The bandwidth in kHz is : ")
diff --git a/2621/CH7/EX7.13/Ex7_13.sce b/2621/CH7/EX7.13/Ex7_13.sce new file mode 100644 index 000000000..80bfd63ca --- /dev/null +++ b/2621/CH7/EX7.13/Ex7_13.sce @@ -0,0 +1,30 @@ +// Example 7.13
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+f_L= 200;// in Hz
+f_H= 1*10^3;// in Hz
+alpha=4;// passband gain
+C_desh= 0.01*10^-6;// in F (assume)
+R_desh= 1/(2*%pi*f_H*C_desh);// in Ω
+R_desh= R_desh*10^-3;// in kΩ
+disp("The value of R'' is : "+string(R_desh)+" kΩ (Approx. 20 kΩ)")
+R_desh= 20;// in kΩ (standard value)
+// First Order High-Pass Filter
+C= 0.05*10^-6;// in F (assume)
+R= 1/(2*%pi*f_L*C);// in Ω
+R= R*10^-3;// in kΩ
+R1= 10;// in kΩ
+Rf= R1;// in kΩ
+C_desh= C_desh*10^6;// in µF
+C= C*10^6;// in µF
+disp("The value of R is : "+string(R)+" kΩ (Approx. 20 kΩ)")
+R= 20;// in kΩ (standard value)
+disp("The value of R1 and Rf is : "+string(R1)+" kΩ")
+disp("The value of C'' is : "+string(C_desh)+" µF")
+disp("The value of C is : "+string(C)+" µF")
+
+
+
diff --git a/2621/CH7/EX7.14/Ex7_14.sce b/2621/CH7/EX7.14/Ex7_14.sce new file mode 100644 index 000000000..2776b23e0 --- /dev/null +++ b/2621/CH7/EX7.14/Ex7_14.sce @@ -0,0 +1,18 @@ +// Example 7.14
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+f_H= 200;// in Hz
+f_L= 2*10^3;// in Hz
+C= 0.05*10^-6;// in F
+// For low-pass filter,
+R_desh= 1/(2*%pi*f_H*C);// in Ω
+R_desh= R_desh*10^-3;// in kΩ
+disp("The value of R'' is : "+string(R_desh)+" kΩ ( Approx. 20 kΩ)")
+// For high-pass filter,
+R= 1/(2*%pi*f_L*C);// in Ω
+R= R*10^-3;// in kΩ
+disp("The value of R is : "+string(R)+" kΩ ( Approx. 2 kΩ)")
+
diff --git a/2621/CH7/EX7.15/Ex7_15.sce b/2621/CH7/EX7.15/Ex7_15.sce new file mode 100644 index 000000000..6eafa47d7 --- /dev/null +++ b/2621/CH7/EX7.15/Ex7_15.sce @@ -0,0 +1,12 @@ +// Example 7.15
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+C= 0.068*10^-6;// in F
+f_N= 50;// in Hz
+R= 1/(2*%pi*f_N*C);// in Ω
+R= R*10^-3;// in kΩ
+disp("The value of R is : "+string(R)+" kΩ ( Approx. 50 kΩ)")
+
diff --git a/2621/CH7/EX7.16/Ex7_16.sce b/2621/CH7/EX7.16/Ex7_16.sce new file mode 100644 index 000000000..a6fe85fe3 --- /dev/null +++ b/2621/CH7/EX7.16/Ex7_16.sce @@ -0,0 +1,13 @@ +// Example 7.16
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+R= 15*10^3;// in Ω
+C= 0.01*10^-6;// in F
+f= 2*10^3;// in Hz
+PhaseShift= -2*atand(2*%pi*f*R*C);// in °
+disp("The phase shift is : "+string(PhaseShift)+"° i.e. "+string(abs(PhaseShift))+"° (lagging)")
+
+
diff --git a/2621/CH7/EX7.18/Ex7_18.sce b/2621/CH7/EX7.18/Ex7_18.sce new file mode 100644 index 000000000..447985545 --- /dev/null +++ b/2621/CH7/EX7.18/Ex7_18.sce @@ -0,0 +1,46 @@ +// Example 7.18
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R_A= 2.2*10^3;// in Ω
+R_B= 1.2*10^3;// in Ω
+Rf= 4.7*10^3;// in Ω
+C= 0.01*10^-6;// in F
+k_lp= 1.238;
+k_hp= 1/k_lp;
+// Part (i)
+alpha= 3*R_B/(R_A+R_B);
+disp(alpha,"Part (i) : The value of alpha is : ");
+disp("Given filter is 1db peak Chebyshev");
+
+// Part (ii)
+f_0= 1/(2*%pi*Rf*C);//critical frequency in Hz
+f_0= f_0*10^-3;// in kHz
+f_low_pass= f_0*k_lp;// in kHz
+disp(f_low_pass,"Part (ii) : The low-pass frequency in kHz is : ")
+f_high_pass= f_0*k_hp;// in kHz
+disp(f_high_pass,"The high-pass frequency in kHz is : ")
+
+// Part (iii)
+fc= f_0;// bandpass centre frequency in kHz
+disp(fc,"Part (iii) : The bandpass centre frequency in kHz is : ")
+
+// Part (iv)
+// Formula used : delta_f= fc/Q= fc/(1/alpha)
+delta_f= fc/(1/alpha);// in kHz
+disp(delta_f,"Part (iv) : The bandpass width in kHz is : ")
+
+// Part (v)
+A0= 1/alpha;// bandpass gain at centre frequency
+disp(A0,"Part (v) : The bandpass gain at centre frequency is : ")
+
+
+
+
+
+
+
+
+
diff --git a/2621/CH7/EX7.2/Ex7_2.sce b/2621/CH7/EX7.2/Ex7_2.sce new file mode 100644 index 000000000..168b0e55b --- /dev/null +++ b/2621/CH7/EX7.2/Ex7_2.sce @@ -0,0 +1,23 @@ +// Example 7.2
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+f_H= 2*10^3;//cut-off frequency in Hz
+C= 0.033*10^-6;// in F
+R= 1/(2*%pi*f_H*C);// in Ω
+// 2*R= Rf*R1/(Rf+R1)= 0.586*R1^2/(1.586*R1) since Rf= 0.586*R1
+R1= 2*R*1.586/0.586;// in Ω
+R1= round(R1*10^-3);// in kΩ
+disp("The value of R1 is : "+string(R1)+" kΩ");
+disp("(The value of R1 may be taken of 15 kΩ)");
+R1= 15;// in kΩ
+Rf= R1*0.586;// in kΩ
+//Rf= floor(1.5*R1);// in kΩ
+disp("The value of Rf is : "+string(Rf)+" kΩ");
+disp("(The value of Rf may be taken as a pot of 10 kΩ)");
+
+
+
+
diff --git a/2621/CH7/EX7.3/Ex7_3.sce b/2621/CH7/EX7.3/Ex7_3.sce new file mode 100644 index 000000000..77c6b9cb8 --- /dev/null +++ b/2621/CH7/EX7.3/Ex7_3.sce @@ -0,0 +1,21 @@ +// Example 7.3
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+f_H= 1*10^3;//cut-off frequency in Hz
+C= 0.0047*10^-6;// in F
+R= 1/(2*%pi*f_H*C);// in Ω
+R= (R*10^-3);// in kΩ
+R1= 30;// in kΩ (assume)
+Rf= 0.586*R1;// in kΩ
+C= C*10^6;// in µF
+disp("The value of R''= R= "+string(R)+" kΩ (standard value 33 kΩ)");
+disp("The value of C''= C= "+string(C)+" µF ");
+disp("The value of R1= "+string(R1)+" kΩ ");
+disp("The value of Rf= "+string(Rf)+" kΩ (standard value 20 kΩ pot) ");
+
+
+
+
diff --git a/2621/CH7/EX7.4/Ex7_4.sce b/2621/CH7/EX7.4/Ex7_4.sce new file mode 100644 index 000000000..6d40a2d49 --- /dev/null +++ b/2621/CH7/EX7.4/Ex7_4.sce @@ -0,0 +1,19 @@ +// Example 7.4
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+fc= 1*10^3;// in Hz
+alpha= 1.414;
+C= 0.1*10^-6;// in F (assume)
+C_desh= C*alpha^2/4;// in F
+C_desh= C_desh*10^6;// in µF
+disp("The value of C'' is : "+string(C_desh)+" µF");
+C_desh= C_desh*10^-6;// in F
+R_desh= 1/(2*%pi*fc*sqrt(C*C_desh));// in Ω
+R_desh= R_desh*10^-3;// in kΩ
+disp("The value of R'' is : "+string(R_desh)+" kΩ (standard value 2.2 kΩ)")
+
+
+
diff --git a/2621/CH7/EX7.5/Ex7_5.sce b/2621/CH7/EX7.5/Ex7_5.sce new file mode 100644 index 000000000..7953a5cb9 --- /dev/null +++ b/2621/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,24 @@ +// Example 7.5
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+alpha= 1.414;// passband
+C= 0.01*10^-6;// in F (assume)
+fc= 1*10^3;// in Hz
+dc_gain= 6;
+R= 1/(2*%pi*C*fc);// in Ω
+R= R*10^-3;// in kΩ
+disp("The value of R is : "+string(R)+" kΩ (standard value 15 kΩ)");
+R= 15;// in kΩ
+Af= 3-alpha;// and Af= 1+Rf/R1 or
+// Rf= (Af-1)*R1 (i)
+// 2*R= Rf || R1, hence from (i)
+R1= 2*R*Af/(Af-1);// in kΩ
+disp("The value of R1 is : "+string(R1)+" kΩ (standard value 82 kΩ)");
+R1= 82;// in kΩ
+Rf= (Af-1)*R1;// in kΩ
+disp("The value of Rf is : "+string(Rf)+" kΩ (standard value 47 kΩ)");
+Aamp= dc_gain/Af;
+disp("The value of Aamp is : "+string(Aamp));
diff --git a/2621/CH7/EX7.7/Ex7_7.sce b/2621/CH7/EX7.7/Ex7_7.sce new file mode 100644 index 000000000..c019899eb --- /dev/null +++ b/2621/CH7/EX7.7/Ex7_7.sce @@ -0,0 +1,17 @@ +// Example 7.7
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R= 2.1*10^3;// in kΩ
+C= 0.05*10^-6;// in F
+R1= 20*10^3;// in Ω
+Rf= 60*10^3;// in Ω
+// Low cut-off frequency,
+f_L= 1/(2*%pi*R*C);// in Hz
+f_L= f_L*10^-3;// in kHz
+disp(f_L,"The cut-off frequency in kHz is : ")
+
+
+
diff --git a/2621/CH7/EX7.8/Ex7_8.sce b/2621/CH7/EX7.8/Ex7_8.sce new file mode 100644 index 000000000..6bb35bd41 --- /dev/null +++ b/2621/CH7/EX7.8/Ex7_8.sce @@ -0,0 +1,23 @@ +// Example 7.8
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+R1= 2*10^3;// in Ω
+R2= 2/3*10^3;// in Ω
+R3= 200*10^3;// in Ω
+C= 0.1*10^-6;// in F
+Af= R3/(2*R1);// gain
+disp(Af,"The value of Af is : ")
+// R1= Q/(2*%pi*f_C*C*Af) (i)
+// R2= Q/(2*%pi*f_C*C*(2*Q^2-Af)) (ii)
+// R3= Q/(%pi*f_C*C) (iii)
+Q= sqrt((R3/(2*R2)+Af)/2);// from (ii) and (iii)
+disp(Q,"The value of Q is : ");
+f_C= Q/(R3*%pi*C);// in Hz (from (iii))
+disp(f_C,"The value of f_C in Hz is : ");
+omega_0= 2*%pi*f_C;// in radians/second
+disp(omega_0,"The value of omega_0 in radians/seconds is : ")
+
+
diff --git a/2621/CH8/EX8.10/Ex8_10.sce b/2621/CH8/EX8.10/Ex8_10.sce new file mode 100644 index 000000000..9649bd98d --- /dev/null +++ b/2621/CH8/EX8.10/Ex8_10.sce @@ -0,0 +1,15 @@ +// Example 8.10
+clc;
+clear;
+close;
+// Given data
+format('v',9);
+V_UT= 5;// in V
+V_LT= -5;// in V
+// Hysteresis voltage,
+Vhy= V_UT-V_LT;// in V
+disp(Vhy,"The hysteresis voltage in volts is : ")
+
+
+
+
diff --git a/2621/CH8/EX8.2/Ex8_2.sce b/2621/CH8/EX8.2/Ex8_2.sce new file mode 100644 index 000000000..d9b2ca02c --- /dev/null +++ b/2621/CH8/EX8.2/Ex8_2.sce @@ -0,0 +1,13 @@ +// Example 8.2
+clc;
+clear;
+close;
+// Given data
+format('v',5);
+R1= 5;// in kΩ
+R2= 10;// in kΩ
+V_peak= R1*R2/(R1+R2);// in V
+Vav= V_peak/%pi;// in V
+disp("Peak value of V1 is : "+string(V_peak)+" V")
+disp("Average value of Vo is : "+string(Vav)+" V")
+
diff --git a/2621/CH8/EX8.7/Ex8_7.sce b/2621/CH8/EX8.7/Ex8_7.sce new file mode 100644 index 000000000..b52c9c566 --- /dev/null +++ b/2621/CH8/EX8.7/Ex8_7.sce @@ -0,0 +1,22 @@ +// Example 8.7
+clc;
+clear;
+close;
+// Given data
+format('v',6);
+t= 0;
+Vc= 0;// in volts
+Vo= 5;// in volts
+R= 10;// in 2 Ω (assume)
+RC= 1;// (assume)
+R3= 2*R;// in Ω
+R2= 3*R;// in Ω
+// From equation : T= 2*Rf*C*log[1+2*R3/R2]
+T= 2*RC*log(1+2*R3/R2);
+Vc_t= 2;// in volts
+t= T/2;
+//Voltage across capacitor,
+// Vc_t= Vco*[1-%e^(-t/ReqC)]= 1/5*(VR+4*Vo)*[1-%e^(-t/4*RC/5)]
+VR= Vc_t*5/[1-%e^(-t/(4*RC/5))]-4*Vo;
+disp("The value of VR is : "+string(VR)+" volts")
+
diff --git a/2621/CH8/EX8.9/Ex8_9.sce b/2621/CH8/EX8.9/Ex8_9.sce new file mode 100644 index 000000000..4a5e4b934 --- /dev/null +++ b/2621/CH8/EX8.9/Ex8_9.sce @@ -0,0 +1,16 @@ +// Example 8.9
+clc;
+clear;
+close;
+// Given data
+format('v',7);
+// Part (c)
+R1= 150;// in Ω
+R2= 68*10^3;// in Ω
+Vin= 50*10^-3;// in V
+Vsat= 14;// in V
+Vpositive= Vsat*(R1/(R1+R2));// in V
+V_UT= Vpositive;// in V
+V_LT= Vpositive;// in V
+disp(V_UT,"The value of V_UT in volts is : ")
+disp(V_LT,"The value of V_LT in volts is : ")
|