diff options
Diffstat (limited to '3515')
127 files changed, 3263 insertions, 0 deletions
diff --git a/3515/CH1/EX1.1/Ex_1_1.sce b/3515/CH1/EX1.1/Ex_1_1.sce new file mode 100644 index 000000000..6c8686b83 --- /dev/null +++ b/3515/CH1/EX1.1/Ex_1_1.sce @@ -0,0 +1,13 @@ +// Exa 1.1
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+G= -100;
+R1= 2.2;// in kohm
+R1=R1*10^3;// in ohm
+// Formula G=-Rf/R1
+Rf= -G*R1;
+Rf= Rf*10^-3;// in kohm
+disp(Rf,"The value of Rf in kohm is ")
diff --git a/3515/CH1/EX1.10/Ex_1_10.sce b/3515/CH1/EX1.10/Ex_1_10.sce new file mode 100644 index 000000000..3efe4a459 --- /dev/null +++ b/3515/CH1/EX1.10/Ex_1_10.sce @@ -0,0 +1,18 @@ +// Exa 1.10
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V1=2;// in V
+V2=3;// in V
+Rf=3;// in kohm
+R1=1;// in kohm
+disp("Output voltage when only 2V voltage source is acting in volt")
+Vo1= (1+Rf/R1)*V1;
+disp(Vo1);
+disp("Output voltage due to 3V voltage source in volt")
+Vo2= (1+Rf/R1)*V2;
+disp(Vo2);
+Vo= Vo1+Vo2;// in volts
+disp(Vo,"Total output voltage in volts")
diff --git a/3515/CH1/EX1.11/Ex_1_11.sce b/3515/CH1/EX1.11/Ex_1_11.sce new file mode 100644 index 000000000..4ea50164c --- /dev/null +++ b/3515/CH1/EX1.11/Ex_1_11.sce @@ -0,0 +1,19 @@ +// Exa 1.11
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf=500;// in kohm
+min_vvs= 0;// minimum value of variable resistor in ohm
+max_vvs= 10;// maximum value of variable resistor in ohm
+Ri_min= 10+min_vvs;// in kohm
+Ri_max= 10+max_vvs;//in kohm
+// Av= Vo/Vi= -Rf/Ri
+disp("Closed loop voltage gain corresponding to Ri(min) is ")
+Av=-Rf/Ri_min;
+disp(Av)
+disp("and closed loop voltage gain corresponding to Ri(max) is ")
+Av=-Rf/Ri_max;
+disp(Av)
+disp("Thus the closed loop gain of the circuit can be adjusted at any value between -25 to -50 with the help of variable resistor.")
diff --git a/3515/CH1/EX1.12/Ex_1_12.sce b/3515/CH1/EX1.12/Ex_1_12.sce new file mode 100644 index 000000000..0157d930b --- /dev/null +++ b/3515/CH1/EX1.12/Ex_1_12.sce @@ -0,0 +1,16 @@ +// Exa 1.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf=200;// in kohm
+R1= 20;// in kohm
+// Av= Vo/Vi= -Rf/Ri
+Av= -Rf/R1;
+Vi_min= 0.1;// in V
+Vi_max= 0.5;// in V
+// Vo= Av*Vi
+Vo_min= Av*Vi_min;// in V
+Vo_max= Av*Vi_max;// in V
+disp("Output voltage ranges from "+string(Vo_min)+"V to "+string(Vo_max)+"V")
diff --git a/3515/CH1/EX1.13/Ex_1_13.sce b/3515/CH1/EX1.13/Ex_1_13.sce new file mode 100644 index 000000000..1ac290929 --- /dev/null +++ b/3515/CH1/EX1.13/Ex_1_13.sce @@ -0,0 +1,19 @@ +// Exa 1.13
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf= 250;// in kohm
+// Output voltage expression, Vo= -5*Va+3*Vb
+// and we know that for a difference amplifier circuit,
+// Vo= -Rf/R1*Va + [R2/(R1+R2)]*[1+Rf/R1]*Vb
+// Comparing both the expression, we get
+// -Rf/R1*Va= -5*Va, or
+R1= Rf/5;// in kohm
+disp(R1,"The value of R1 in kohm")
+// and
+R2= 3*R1^2/(R1+Rf-3*R1)
+disp(R2,"The value of R2 in kohm")
+
+// Note : Answer in the book is wrong
diff --git a/3515/CH1/EX1.14/Ex_1_14.sce b/3515/CH1/EX1.14/Ex_1_14.sce new file mode 100644 index 000000000..1c09565ab --- /dev/null +++ b/3515/CH1/EX1.14/Ex_1_14.sce @@ -0,0 +1,27 @@ +// Exa 1.14
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Vi_1= 150;// in µV
+Vi_2= 140;// in µV
+Vd= Vi_1-Vi_2;// in µV
+Vd=Vd*10^-6;// in V
+Vc= (Vi_1+Vi_2)/2;// in µV
+Vc=Vc*10^-6;// in V
+// Vo= Ad*Vd*(1+Vc/(CMRR*Vd))
+
+// (i) For Ad=4000 and CMRR= 100
+Ad=4000;
+CMRR= 100;
+Vo= Ad*Vd*(1+Vc/(CMRR*Vd));// in volt
+Vo= Vo*10^3;// in mV
+disp(Vo,"(i) Output voltage in mV")
+
+// (ii) For Ad=4000 and CMRR= 10^5
+Ad=4000;
+CMRR= 10^5;
+Vo= Ad*Vd*(1+Vc/(CMRR*Vd));// in volt
+Vo= Vo*10^3;// in mV
+disp(Vo,"(ii) Output voltage in mV")
diff --git a/3515/CH1/EX1.15/Ex_1_15.sce b/3515/CH1/EX1.15/Ex_1_15.sce new file mode 100644 index 000000000..f55817a60 --- /dev/null +++ b/3515/CH1/EX1.15/Ex_1_15.sce @@ -0,0 +1,18 @@ +// Exa 1.15
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf=470;// in kohm
+R1=4.3;// in kohm
+R2=33;// in kohm
+R3=33;// in kohm
+Vi= 80;// in µV
+Vi=Vi*10^-6;// in volt
+A1= 1+Rf/R1;
+A2=-Rf/R2;
+A3= -Rf/R3;
+A=A1*A2*A3;
+Vo= A*Vi;// in volt
+disp(Vo,"Output voltage in volts is : ")
diff --git a/3515/CH1/EX1.16/Ex_1_16.sce b/3515/CH1/EX1.16/Ex_1_16.sce new file mode 100644 index 000000000..f1e846a56 --- /dev/null +++ b/3515/CH1/EX1.16/Ex_1_16.sce @@ -0,0 +1,16 @@ +// Exa 1.16
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 33;// in kΩ
+R2= 10;// in kΩ
+R3= 330;// in kΩ
+V1= '50mV sin(1000 t)';
+V2= '10mV sin(3000 t)';
+Vo1= R3/R1*50*10^-3;
+Vo2= R3/R2*10*10^-3;
+// Vo= -Vo1-Vo2;
+disp("Output voltage is "+string(-Vo1)+" sin (1000 t)"+string(-Vo2)+" sin(3000 t)")
+
diff --git a/3515/CH1/EX1.17/Ex_1_17.sce b/3515/CH1/EX1.17/Ex_1_17.sce new file mode 100644 index 000000000..b67488fde --- /dev/null +++ b/3515/CH1/EX1.17/Ex_1_17.sce @@ -0,0 +1,14 @@ +// Exa 1.17
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1=10;// in kohm
+R2=150;// in kohm
+R3=10;// in kohm
+R4=300;// in kohm
+V1= 1;// in V
+V2= 2;// in V
+Vo= [(1+R4/R2)*(R3*V1/(R1+R3))-(R4/R2)*V2];
+disp(Vo,"Output voltage in volts is : ")
diff --git a/3515/CH1/EX1.18/Ex_1_18.sce b/3515/CH1/EX1.18/Ex_1_18.sce new file mode 100644 index 000000000..62fdc32a1 --- /dev/null +++ b/3515/CH1/EX1.18/Ex_1_18.sce @@ -0,0 +1,18 @@ +// Exa 1.18
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+R1=12;// in kohm
+Rf=360;// in kohm
+V1= -0.3;// in V
+Vo= (1+Rf/R1)*V1;// in V
+disp(Vo,"Output voltage result in volts is : ")
+
+// Part(b)
+Vo= 2.4;// in V
+// We know, Vo= (1+Rf/R1)*V1
+V1= Vo/(1+Rf/R1);
+V1= V1*10^3;// in mV
+disp(V1,"Input voltage in mV to result in an output of 2.4 Volt is")
diff --git a/3515/CH1/EX1.19/Ex_1_19.sce b/3515/CH1/EX1.19/Ex_1_19.sce new file mode 100644 index 000000000..a07edbc56 --- /dev/null +++ b/3515/CH1/EX1.19/Ex_1_19.sce @@ -0,0 +1,15 @@ +// Exa 1.19
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf=68;// in kohm
+R1=33;// in kohm
+R2=22;// in kohm
+R3=12;// in kohm
+V1= 0.2;// in V
+V2=-0.5;// in V
+V3= 0.8;// in V
+Vo= -Rf/R1*V1 + (-Rf/R2)*V2 + (-Rf/R3)*V3;// in volts
+disp(Vo,"Output voltage in volts is : ")
diff --git a/3515/CH1/EX1.2/Ex_1_2.sce b/3515/CH1/EX1.2/Ex_1_2.sce new file mode 100644 index 000000000..2c074e871 --- /dev/null +++ b/3515/CH1/EX1.2/Ex_1_2.sce @@ -0,0 +1,13 @@ +// Exa 1.2
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf= 200;// in kohm
+R1= 2;// in kohm
+vin=2.5;// in mV
+vin=vin*10^-3;// in volt
+G= -Rf/R1;
+vo= G*vin;// in V
+disp(vo,"The output voltage in volt is : ")
diff --git a/3515/CH1/EX1.20/Ex_1_20.sce b/3515/CH1/EX1.20/Ex_1_20.sce new file mode 100644 index 000000000..0ece2f5db --- /dev/null +++ b/3515/CH1/EX1.20/Ex_1_20.sce @@ -0,0 +1,12 @@ +// Exa 1.20
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf=100;// in kohm
+R1=20;// in kohm
+V1= 1.5;// in V
+Vo1= V1;
+Vo= -Rf/R1*Vo1;// in volts
+disp(Vo,"Output voltage in volts is : ")
diff --git a/3515/CH1/EX1.22/Ex_1_22.sce b/3515/CH1/EX1.22/Ex_1_22.sce new file mode 100644 index 000000000..92f043274 --- /dev/null +++ b/3515/CH1/EX1.22/Ex_1_22.sce @@ -0,0 +1,22 @@ +// Exa 1.22
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+vo= -10;// in V
+i_f= 1;// in mA
+i_f= i_f*10^-3;//in A
+// Formula vo= -i_f*Rf
+Rf= -vo/i_f;// in Ω
+// The output voltage, vo= -(v1+5*v2) (i)
+// vo= -Rf/R1*v1 - Rf/R2*v2; (ii)
+// Comparing equations (i) and (2)
+R1= Rf/1;// in Ω
+R2= Rf/5;// in Ω
+Rf= Rf*10^-3;// in kΩ
+R1= R1*10^-3;// in kΩ
+R2= R2*10^-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 : ")
diff --git a/3515/CH1/EX1.24/Ex_1_24.sce b/3515/CH1/EX1.24/Ex_1_24.sce new file mode 100644 index 000000000..81b82b97c --- /dev/null +++ b/3515/CH1/EX1.24/Ex_1_24.sce @@ -0,0 +1,24 @@ +// Exa 1.24
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 9;// in kΩ
+R2= 1;// in kΩ
+R3= 2;// in kΩ
+R4= 3;// in kΩ
+// The output voltage, vo1= (1+R1/R2)*va
+vo1BYva= (1+R1/R2);// (i)
+// Voltage at node va= R4*v1/(R3+R4)
+vaBYv1= R4/(R3+R4);// (ii)
+// From (i) and (ii)
+vo1BYv1= vo1BYva*vaBYv1;// (iii)
+// The output voltage, vo2= (1+R1/R2)*va
+vo2BYva= (1+R1/R2);// (iv)
+// Voltage at node va= R3*v2/(R3+R4)
+vaBYv2= R3/(R3+R4);// (v)
+// From (i) and (ii)
+vo2BYv2= vo2BYva*vaBYv2;// (iii)
+// Total output vo= vo1 + vo2
+disp("Total voltage is "+string(vo1BYv1)+" v1 + "+string(vo2BYv2)+" v2")
diff --git a/3515/CH1/EX1.25/Ex_1_25.sce b/3515/CH1/EX1.25/Ex_1_25.sce new file mode 100644 index 000000000..4a347f258 --- /dev/null +++ b/3515/CH1/EX1.25/Ex_1_25.sce @@ -0,0 +1,27 @@ +// Exa 1.25
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 9;// in kΩ
+R2= 1;// in kΩ
+R3= 2;// in kΩ
+R4= 3;// in kΩ
+// The output voltage, vo1= (1+R1/R2)*va
+vo1BYva= (1+R1/R2);// (i)
+// Voltage at node va= R4*v1/(R3+R4)
+vaBYv1= R4/(R3+R4);// (ii)
+// From (i) and (ii)
+vo1BYv1= vo1BYva*vaBYv1;// (iii)
+// The output voltage, vo2= (1+R1/R2)*va
+vo2BYva= (1+R1/R2);// (iv)
+// Voltage at node va= R3*v2/(R3+R4)
+vaBYv2= R3/(R3+R4);// (v)
+// From (i) and (ii)
+vo2BYv2= vo2BYva*vaBYv2;// (iii)
+// The output voltage, vo3= (-R1/R2)*v3
+vo3BYv3= (-R1/R2);// (i)
+
+// Total output vo= vo1 + vo2 + vo3
+disp("Total voltage is "+string(vo1BYv1)+" v1 + "+string(vo2BYv2)+" v2 "+string(vo3BYv3)+" v3")
diff --git a/3515/CH1/EX1.26/Ex_1_26.sce b/3515/CH1/EX1.26/Ex_1_26.sce new file mode 100644 index 000000000..bc111402e --- /dev/null +++ b/3515/CH1/EX1.26/Ex_1_26.sce @@ -0,0 +1,34 @@ +// Exa 1.26
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+// omega_t= Ao*omega_b
+// 2*%pi*f_t = Ao*2*%pi*f_b
+// f_t= Ao*f_b
+// Part (i)
+Ao1= 10^5;
+f_b1= 10^2;// in Hz
+f_t1= Ao1*f_b1;// in Hz
+// Part (ii)
+Ao2= 10^6;
+f_t2= 10^6;// in Hz
+f_b2= f_t2/Ao2;// in Hz
+// Part (iii)
+f_b3= 10^3;// in Hz
+f_t3= 10^8;// in Hz
+Ao3= f_t3/f_b3;
+// Part (iv)
+f_b4= 10^-1;// in Hz
+f_t4= 10^6;// in Hz
+Ao4= f_t4/f_b4;
+// Part (v)
+Ao5= 2*10^5;
+f_b5= 10;// in Hz
+f_t5= Ao5*f_b5;// in Hz
+disp(f_t1,"The value of f_t1 in Hz is : ")
+disp(f_b2,"The value of f_b2 in Hz is : ")
+disp(Ao3,"The value of Ao3 is : ")
+disp(Ao4,"The value of Ao4 is : ")
+disp(f_t5,"The value of f_t5 in Hz is : ")
diff --git a/3515/CH1/EX1.27/Ex_1_27.sce b/3515/CH1/EX1.27/Ex_1_27.sce new file mode 100644 index 000000000..5ce4edd8b --- /dev/null +++ b/3515/CH1/EX1.27/Ex_1_27.sce @@ -0,0 +1,20 @@ +// Exa 1.27
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Ao= 86;// in dB
+A= 40;// in dB
+f=100;// in kHz
+f=f*10^3;// in Hz
+// From 20*log(S) = 20*log(Ao/A), where S, stands for sqrt(1+(f/fb)^2)
+S= 10^((Ao-A)/20);
+// S= sqrt(1+(f/fb)^2)
+fb= f/sqrt(S^2-1);// in Hz
+Ao= 10^(Ao/20);
+ft= Ao*fb;// in Hz
+ft= round(ft*10^-6);// in MHz
+disp(Ao,"The value of Ao is : ")
+disp(fb,"The value of fb in Hz is : ")
+disp(ft,"The value of ft in MHz is : ")
diff --git a/3515/CH1/EX1.28/Ex_1_28.sce b/3515/CH1/EX1.28/Ex_1_28.sce new file mode 100644 index 000000000..a757f7b7f --- /dev/null +++ b/3515/CH1/EX1.28/Ex_1_28.sce @@ -0,0 +1,21 @@ +// Exa 1.28
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+Ao= 10^4;// in V/V
+f_t= 10^6;// in Hz
+R2byR1= 20;
+omega_t= 2*%pi*f_t;
+omega_3dB= omega_t/(1+R2byR1);
+f3dB= omega_3dB/(2*%pi);// in Hz
+f3dB= f3dB*10^-3;// in kHz
+disp(f3dB,"3-dB frequency of the closed loop amplifier in kHz is : ")
+f3dB= 0.1*f3dB;// in Hz
+voBYvi= -R2byR1/sqrt(1+(2*%pi*f3dB/omega_3dB)^2);
+voBYvi= abs(voBYvi);// in v/v
+disp(voBYvi,"Gain in v/v is : ")
+
+
+
diff --git a/3515/CH1/EX1.3/Ex_1_3.sce b/3515/CH1/EX1.3/Ex_1_3.sce new file mode 100644 index 000000000..f7e9944e7 --- /dev/null +++ b/3515/CH1/EX1.3/Ex_1_3.sce @@ -0,0 +1,16 @@ +// Exa 1.3
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+G=-10;
+Ri= 100;// in kohm
+R1= Ri;// in kohm
+R1=R1*10^3;// in ohm
+// Formula G=-R2/R1
+R2= R1*abs(G);// ohm
+R1= R1*10^-3;// in kohm
+R2= R2*10^-6;// in Mohm
+disp(R1,"Value of R1 in kohm is : ")
+disp(R2,"and value of R2 in Mohm is : ")
diff --git a/3515/CH1/EX1.4/Ex_1_4.sce b/3515/CH1/EX1.4/Ex_1_4.sce new file mode 100644 index 000000000..915f50a16 --- /dev/null +++ b/3515/CH1/EX1.4/Ex_1_4.sce @@ -0,0 +1,11 @@ +// Exa 1.4
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 100;// in kohm
+R2= 500;// in kohm
+V1= 2;// in volt
+Vo= (1+R2/R1)*V1;// in volt
+disp(Vo,"Output voltage for noninverting amplifier in volt")
diff --git a/3515/CH1/EX1.5/Ex_1_5.sce b/3515/CH1/EX1.5/Ex_1_5.sce new file mode 100644 index 000000000..c07130df5 --- /dev/null +++ b/3515/CH1/EX1.5/Ex_1_5.sce @@ -0,0 +1,34 @@ +// Exa 1.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Rf= 1;// in Mohm
+Rf=Rf*10^6;//in ohm
+
+// Part(a)
+V1=1;//in volt
+V2=2;//in volt
+V3=3;//in volt
+R1= 500;// in kohm
+R1=R1*10^3;//in ohm
+R2= 1;// in Mohm
+R2=R2*10^6;//in ohm
+R3= 1;// in Mohm
+R3=R3*10^6;//in ohm
+Vo= -Rf*(V1/R1+V2/R2+V3/R3);// in volt
+disp(Vo,"(a) Output voltage in volt is : ")
+
+// Part(b)
+V1=-2;//in volt
+V2=3;//in volt
+V3=1;//in volt
+R1= 200;// in kohm
+R1=R1*10^3;//in ohm
+R2= 500;// in kohm
+R2=R2*10^3;//in ohm
+R3= 1;// in Mohm
+R3=R3*10^6;//in ohm
+Vo= -Rf*(V1/R1+V2/R2+V3/R3);// in volt
+disp(Vo,"(b) Output voltage in volt is : ")
diff --git a/3515/CH1/EX1.6/Ex_1_6.sce b/3515/CH1/EX1.6/Ex_1_6.sce new file mode 100644 index 000000000..22dc681b3 --- /dev/null +++ b/3515/CH1/EX1.6/Ex_1_6.sce @@ -0,0 +1,18 @@ +// Exa 1.6
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+disp("Minimum closed loop voltage gain for R2=0 and R1= 2 kohm")
+R2=0;
+R1=2;// in kohm
+R1=R1*10^3;// in ohm
+Av_min= (1+R2/R1)
+disp(Av_min)
+
+disp("Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm")
+R2=100;// in kohm
+R1=2;// in kohm
+Av_max= (1+R2/R1)
+disp(Av_max)
diff --git a/3515/CH1/EX1.7/Ex_1_7.sce b/3515/CH1/EX1.7/Ex_1_7.sce new file mode 100644 index 000000000..36bf0cb8b --- /dev/null +++ b/3515/CH1/EX1.7/Ex_1_7.sce @@ -0,0 +1,21 @@ +// Exa 1.7
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V1= 745;// in µV
+V2= 740;// in µV
+V1=V1*10^-6;// in volt
+V2=V2*10^-6;// in volt
+CMRR=80;// in dB
+Av=5*10^5;
+// (i)
+// CMRR in dB= 20*log(Ad/Ac)
+Ad=Av;
+Ac= Ad/10^(CMRR/20);
+// (ii)
+Vo= Ad*(V1-V2)+Ac*(V1+V2)/2;
+disp(Vo,"Output voltage in volt is : ")
+
+// Note:- In the book, there is calculation error to evaluate the value of Ac, so the value of Ac is wrong ans to evaluate the output voltage there is also calculation error
diff --git a/3515/CH1/EX1.8/Ex_1_8.sce b/3515/CH1/EX1.8/Ex_1_8.sce new file mode 100644 index 000000000..f21271a16 --- /dev/null +++ b/3515/CH1/EX1.8/Ex_1_8.sce @@ -0,0 +1,11 @@ +// Exa 1.8
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 1;// in Mohm
+Ri=R1;// in Mohm
+Rf=1;// in Mohm
+A_VF= -Rf/R1;
+disp(A_VF,"Voltage gain is : ")
diff --git a/3515/CH2/EX2.1/Ex_2_1.sce b/3515/CH2/EX2.1/Ex_2_1.sce new file mode 100644 index 000000000..55063165c --- /dev/null +++ b/3515/CH2/EX2.1/Ex_2_1.sce @@ -0,0 +1,50 @@ +// Exa 2.1
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_S= 0;// As source is connected to ground
+V_G= 1.5;// in V
+V_D= 0.5;// in V
+Vt= 0.7;// in V
+// Part(a) V_D= 0.5;// in V
+V_D= 0.5;// in V
+V_DS= V_D-V_S;// in V
+V_GS= V_G-V_S;// in V
+if V_GS < Vt then
+ disp("At V_D = 0.5 , the device is in cut off region")
+elseif V_DS<= (V_GS-Vt) then
+ disp("At V_D = 0.5 , the device is in triode region");
+else
+ disp("At V_D = 0.5 , the device is in saturation region");
+
+end
+
+// Part(b) V_D= 0.9;// in V
+V_D= 0.9;// in V
+V_DS= V_D-V_S;// in V
+V_GS= V_G-V_S;// in V
+if V_GS < Vt then
+ disp("At V_D = 0.9 , the device is in cut off region")
+elseif V_DS<= (V_GS-Vt) then
+ disp("At V_D = 0.9 , the device is in triode region");
+else
+ disp("At V_D = 0.9 , the device is in saturation region");
+
+end
+
+// Part(c) V_D= 3;// in V
+V_D= 3;// in V
+V_DS= V_D-V_S;// in V
+V_GS= V_G-V_S;// in V
+if V_GS < Vt then
+ disp("At V_D = 3 , the device is in cut off region")
+elseif V_DS<= (V_GS-Vt) then
+ disp("At V_D = 3 , the device is in triode region");
+else
+ disp("At V_D = 3 , the device is in saturation region");
+
+end
+
+
diff --git a/3515/CH2/EX2.10/Ex_2_10.sce b/3515/CH2/EX2.10/Ex_2_10.sce new file mode 100644 index 000000000..978b8ff48 --- /dev/null +++ b/3515/CH2/EX2.10/Ex_2_10.sce @@ -0,0 +1,34 @@ +// Exa 2.10
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_DD= 15;// in V
+Vt= 1;// in V
+V_D= 10;// in V
+V_S= 5;// in V
+KnWbyL= 1;// in mA/V^2
+KnWbyL=KnWbyL*10^-3;// in A/V^2
+R_G1= 8;// in MΩ
+R_G1= R_G1*10^6;// in Ω
+I_D= 0.5;// in mA
+I_D=I_D*10^-3;//in A
+R_D= (V_DD-V_D)/I_D;// in Ω
+R_S= V_S/I_D;// in Ω
+// Formul I_D= 1/2*KnWbyL*(V_OV)^2
+V_OV= sqrt(2*I_D/KnWbyL);// in V
+// Formula V_OV= V_GS-Vt
+V_GS= V_OV+Vt;// in V
+V_G= V_GS+V_S;// in V
+// Formul V_G= R_G2*V_DD/(R_G1+R_G2)
+R_G2= R_G1*V_G/(V_DD-V_G);//in Ω
+R_D= R_D*10^-3;// in kΩ
+R_S= R_S*10^-3;// in kΩ
+R_G2= R_G2*10^-6;// in MΩ
+disp(R_D,"The value of R_D in kΩ is : ")
+disp(R_S,"The value of R_S in kΩ is : ")
+disp(V_OV,"The value of V_OV in volts is : ")
+disp(V_GS,"The value of V_GS in volts is : ")
+disp(R_G2,"The value of R_G2 in MΩ is : ")
+
diff --git a/3515/CH2/EX2.11/Ex_2_11.sce b/3515/CH2/EX2.11/Ex_2_11.sce new file mode 100644 index 000000000..ccb8f6e54 --- /dev/null +++ b/3515/CH2/EX2.11/Ex_2_11.sce @@ -0,0 +1,43 @@ +// Exa 2.11
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+V_DD= 15;// in V
+KnWbyL= 0.25;// in mA/V^2
+KnWbyL=KnWbyL*10^-3;// in A/V^2
+Vt= 1.5;// in V
+V_A= 50;// in V
+R_D= 10;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_L= 10;// in kΩ
+R_L= R_L*10^3;// in Ω
+R_G= 10;// in MΩ
+R_G= R_G*10^6;// in Ω
+// I_D= 1/2*KnWbyL*(V_D-Vt)^2 , (V_GS= V_D, as dc gate current is zero) (i)
+// V_D= V_DD- I_D*R_D (ii)
+I_D= 1.06;// in mA
+I_D = I_D*10^-3;// in A
+V_D= V_DD- I_D*R_D;// in V
+V_GS=V_D;// in V
+// The coordinates of operating point
+V_GSQ= V_D;// in V
+I_DQ= I_D*10^3;// in mA
+disp("The coordinates of operating points are V_GSQ = "+string(V_GSQ)+" V and I_DQ= "+string(I_DQ)+" mA")
+gm= KnWbyL*(V_GS-Vt);// in A/V
+r_o= V_A/I_D;//in Ω
+// The gain is : Av= vo/vi = -gm*(R_D||R_L||r_o)
+Av= -gm*[R_D*R_L*r_o/(R_D*R_L+R_D*r_o+R_L*r_o)];// in V/V
+// i_i= (vi-vo)/R_G
+// i_i= vi/R_G*(1-vo/vi) and Rin= vi/i_i = R_G/(1-Av)
+Rin= R_G/(1-Av);// in Ω
+Rin= Rin*10^-6;// in MΩ
+disp(Rin,"The input resistance in MΩ is : ")
+disp("The largest allowable input signal vi is determined by the need to keep the MOSFET in saturation at all times")
+disp(" V_DS >= V_GS- vt")
+disp("By enforcing this condition with equality at the point V_GS is maximum and V_DS is correspondingly minimum")
+disp(" V_DSmin= V_GSmax -Vt")
+disp(" V_DS-|Av| vi = V_GS + vi -Vt")
+disp(" 4.4 - 3.3 vi = 4.4 + vi -1.5")
+disp("which results in vi= 0.34V")
diff --git a/3515/CH2/EX2.12/Ex_2_12.sce b/3515/CH2/EX2.12/Ex_2_12.sce new file mode 100644 index 000000000..fed6af751 --- /dev/null +++ b/3515/CH2/EX2.12/Ex_2_12.sce @@ -0,0 +1,22 @@ +// Exa 2.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I_D= 0.5;// in mA
+I_D= I_D*10^-3;// in mA
+V_D= 3;// in V
+Vt= -1;// in V
+KpWbyL= 1;// in mA/V^2
+KpWbyL=KpWbyL*10^-3;// in A/V^2
+// Formul I_D= 1/2*KpWbyL*(V_OV)^2
+V_OV= sqrt(2*I_D/KpWbyL);// in V
+// For PMOS
+V_OV= -V_OV;// in V
+V_GS= V_OV+Vt;// in V
+R_D= V_D/I_D;// in Ω
+V_Dmax= V_D+abs(Vt);// in V
+R_D= V_Dmax/I_D;// in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The largest value that R_D can have while maintaining saturation-region operation in kΩ is : ")
diff --git a/3515/CH2/EX2.14/Ex_2_14.sce b/3515/CH2/EX2.14/Ex_2_14.sce new file mode 100644 index 000000000..09845639e --- /dev/null +++ b/3515/CH2/EX2.14/Ex_2_14.sce @@ -0,0 +1,24 @@ +// Exa 2.14
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_GS1= 1.5;// in V
+Vt= 1;// in V
+r_DS1= 1;// in kΩ
+r_DS1= r_DS1*10^3;// in Ω
+r_DS2= 200;// in kΩ
+// r_DS1= 1/(KnWbyL*(V_GS1-Vt)) (i)
+// r_DS2= 1/(KnWbyL*(V_GS2-Vt)) (i)
+// dividing equation (i) by (ii)
+V_GS2= (r_DS1/r_DS2)*(V_GS1-Vt)+Vt;// in V
+disp(V_GS2,"To Optain rDS= 200, The value of V_GS should be (in volt)")
+// For V_GS= 1.5 ;// V
+// W2= 2*W1;
+// r_DS1/r_DS2= 2
+r_DS2= r_DS1/2;// in Ω
+disp(r_DS2,"For V_GS= 1.5 V , the value of r_DS2 in Ω is : ")
+// For V_GS= 3.5 V
+r_DS2= 200/2;// in Ω
+disp(r_DS2,"For V_GS= 3.5 V , the value of r_DS2 in Ω is : ")
diff --git a/3515/CH2/EX2.15/Ex_2_15.sce b/3515/CH2/EX2.15/Ex_2_15.sce new file mode 100644 index 000000000..d8e6cfdcd --- /dev/null +++ b/3515/CH2/EX2.15/Ex_2_15.sce @@ -0,0 +1,22 @@ +// Exa 2.15
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I_D= 0.2;// in mA
+I_D= I_D*10^-3;// in mA
+Vt= 1;// in V
+KpWbyL= 0.1;// in mA/V^2
+KpWbyL=KpWbyL*10^-3;// in A/V^2
+// Formul I_D= 1/2*KpWbyL*(V_GS-VT)^2
+V_GS= sqrt(2*I_D/KpWbyL)+Vt;// in V
+V_DSmin= V_GS-Vt;// in V
+disp(V_GS,"Required V_GS in volts is : ")
+disp(V_DSmin,"The minimum required V_DS in volts is : ")
+// For I_D= 0.8 mA
+I_D = 0.8*10^-3;// in A
+V_GS= sqrt(2*I_D/KpWbyL)+Vt;// in V
+V_DSmin= V_GS-Vt;// in V
+disp(V_GS,"Required V_GS in volts is : ")
+disp(V_DSmin,"The minimum required V_DS in volts is : ")
diff --git a/3515/CH2/EX2.16/Ex_2_16.sce b/3515/CH2/EX2.16/Ex_2_16.sce new file mode 100644 index 000000000..62168d2c9 --- /dev/null +++ b/3515/CH2/EX2.16/Ex_2_16.sce @@ -0,0 +1,28 @@ +// Exa 2.16
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_SS= -5;// in V
+unCox= 60;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+Vt= 1;// in V
+W= 100;// in µm
+L= 3;// in µm
+V_G=0;// in V
+V_DD= 5;// in V
+V_D=0;//in V
+I_D= 1*10^-3;// in A
+// I_D= (V_DD-V_D)/R_D
+R_D= (V_DD-V_D)/I_D;// in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The value of R_D in kΩ is : ")
+// Formul I_D= 1/2*unCox*W/L*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D*L/(unCox*W))+Vt;// in V
+V_S= V_G-V_GS;// in V
+R_S= (V_S-V_SS)/I_D;// in Ω
+R_S= R_S*10^-3;// in kΩ
+disp(R_S,"The resistance in kΩ is ");
+
+
diff --git a/3515/CH2/EX2.17/Ex_2_17.sce b/3515/CH2/EX2.17/Ex_2_17.sce new file mode 100644 index 000000000..2e11262be --- /dev/null +++ b/3515/CH2/EX2.17/Ex_2_17.sce @@ -0,0 +1,21 @@ +// Exa 2.17
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_D= 3.5;// in V
+I_D= 115*10^-6;//in A
+upCox= 60;// in µA/V^2
+upCox= upCox*10^-6;// in A/V^2
+L= 0.8;//in µm
+V_GS= -1.5;// in V
+Vt= 0.7;// in V
+R= V_D/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"The value required for R in kΩ is : ")
+// Formul I_D= 1/2*upCox*W/L*(V_GS-Vt)^2
+W= 2*I_D*L/(upCox*(V_GS-Vt)^2)
+disp(W,"The value required for W in µm is : ")
+
+// Note: Calculation of evaluating the value of W in the book is wrong , so the Answer of the book is wrong
diff --git a/3515/CH2/EX2.18/Ex_2_18.sce b/3515/CH2/EX2.18/Ex_2_18.sce new file mode 100644 index 000000000..055b49fed --- /dev/null +++ b/3515/CH2/EX2.18/Ex_2_18.sce @@ -0,0 +1,28 @@ +// Exa 2.18
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Vt= 1;// in V
+unCox= 120;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L1=1;// in µm
+L2=L1;// in µm
+I_D= 120;//in µA
+I_D= I_D*10^-6;//in A
+V_GS1= 1.5;//in V
+V_G2= 3.5;// in V
+V_S2= 1.5;// in V
+V_DD= 5;// in V
+V_D2= 3.5;// in V
+// Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)^2
+W1= 2*I_D*L1/(unCox*(V_GS1-Vt)^2);// in µm
+disp(W1,"The value of W1 in µm is : ")
+V_GS2= V_G2-V_S2;//in V
+// Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)^2
+W2= 2*I_D*L2/(unCox*(V_GS2-Vt)^2);// in µm
+disp(W2,"The value of W2 in µm is : ")
+R= (V_DD-V_D2)/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"Resistance in kΩ");
diff --git a/3515/CH2/EX2.19/Ex_2_19.sce b/3515/CH2/EX2.19/Ex_2_19.sce new file mode 100644 index 000000000..4de42ea80 --- /dev/null +++ b/3515/CH2/EX2.19/Ex_2_19.sce @@ -0,0 +1,44 @@ +// Exa 2.19
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+Vt= 2;// in V
+K1WbyL= 1;// in mA/V^2
+K1WbyL= K1WbyL*10^-3;//in mA/V^2
+I_D= 10;//in µA
+I_D= I_D*10^-6;//in A
+V_DD= 10;// in V
+R_D= 4;// in kΩ
+R_D= R_D*10^3;// in Ω
+
+// Formul I_D= 1/2*K1WbyL*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V1= -V_GS;// in V
+// Part (b)
+I_D= 2;// in mA
+I_D= I_D*10^-3;// in A
+V2= V_DD-I_D*R_D;//in V
+// Formul I_D= 1/2*K1WbyL*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V3= -V_GS;// in V
+// Part (c)
+I_D= 1;// in mA
+I_D= I_D*10^-3;// in A
+// Formul I_D= 1/2*K1WbyL*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V4= V_GS;// in V
+// Part (d)
+I_D= 2;// in mA
+R_D= 2.5;// in kΩ
+R_D= R_D*10^3;// in Ω
+V_SS= 10;// in V
+I_D= I_D*10^-3;// in A
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V5= -V_SS+I_D*R_D;// in V
+disp(V1,"The value of V1 in volts is : ")
+disp(V2,"The value of V2 in volts is : ")
+disp(V3,"The value of V3 in volts is : ")
+disp(V4,"The value of V4 in volts is : ")
+disp(V5,"The value of V5 in volts is : ")
diff --git a/3515/CH2/EX2.2/Ex_2_2.sce b/3515/CH2/EX2.2/Ex_2_2.sce new file mode 100644 index 000000000..340898a06 --- /dev/null +++ b/3515/CH2/EX2.2/Ex_2_2.sce @@ -0,0 +1,40 @@ +// Exa 2.2
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+unCox= 100;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L= 1;//in µm
+L= L*10^-6;// in m
+W=10;// in µm
+W=W*10^-6;// in m
+V_GS= 1.5;// in V
+Vt= 0.7;// in V
+// For V_DS= 0.5 V
+V_DS= 0.5;// in V
+if V_DS<= (V_GS-Vt) then
+ I_D= unCox*W/L*[(V_GS-Vt)*V_DS-V_DS^2/2];
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in triode region. SO the drain current in the triode region in µA is : ")
+else
+ I_D= unCox*W/(2*L)*(V_GS-VT)^2;
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in saturation region. SO the drain current in the saturation region in µA is : ")
+end
+// For V_DS= 0.9 V
+V_DS= 0.9;// in V
+if V_DS<= (V_GS-Vt) then
+ I_D= unCox*W/L*[(V_GS-Vt)*V_DS-V_DS^2/2];
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in triode region. So the drain current in the triode region in µA is : ")
+else
+ I_D= unCox*W/(2*L)*(V_GS-Vt)^2
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in saturation region. So drain current in the saturation region in µA is : ")
+end
+
+
+
+
diff --git a/3515/CH2/EX2.20/Ex_2_20.sce b/3515/CH2/EX2.20/Ex_2_20.sce new file mode 100644 index 000000000..4aff13a79 --- /dev/null +++ b/3515/CH2/EX2.20/Ex_2_20.sce @@ -0,0 +1,28 @@ +// Exa 2.20
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+unCox= 20*10^-6;//in A/V^2
+upCox= unCox/2.5;// in A/V^2
+V_DD= 3;//in V
+Vt= 1;// in V
+W= 30;// in µm
+L= 10;// in µm
+// V_GS1= V_GS2
+// Formula V_DD= V_GS1+V_GS2
+V_GS1= V_DD/2;//in V
+V_GS2= V_GS1;// in V
+V2= V_GS1;// inV
+I1= 1/2*unCox*W/L*(V_GS1-Vt)^2;// in A
+// Both transistor have V_D = V_G and therefore they are operating in saturation
+//1/2*unCox*W/L*(V4-Vt)^2 = 1/2*upCox*W/L*(V_DD-V4-Vt)
+V4= (V_DD-Vt+sqrt(unCox/upCox))/(1+sqrt(unCox/upCox));
+I3= 1/2*unCox*W/L*(1.39-Vt)^2
+disp(V2,"The value of V2 in volt is : ")
+I1= I1*10^6;// in µA
+disp(I1,"The value of I1 in µAis : ")
+disp(V4,"The value of V4 in volt is : ")
+I3= I3*10^6;// in µA
+disp(I3,"The value of I3 in µAis : ")
diff --git a/3515/CH2/EX2.22/Ex_2_22.sce b/3515/CH2/EX2.22/Ex_2_22.sce new file mode 100644 index 000000000..6c0a51a49 --- /dev/null +++ b/3515/CH2/EX2.22/Ex_2_22.sce @@ -0,0 +1,57 @@ +// Exa 2.22
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+Vt= 0.9;// in V
+V_A= 50;// in V
+V_D= 2;// in V
+R_L= 10;// in MΩ
+R_L= R_L*10^3;// in Ω
+R_G= 10;// in MΩ
+R_G= R_G*10^6;// in Ω
+I_D= 500;// in µA
+I_D= I_D*10^-6;// in A
+V_GS= V_D;// in V
+ro= V_A/I_D;// in Ω
+gm= 2*I_D/(V_GS-Vt);// in A/V
+// vo= -gm*vi*(ro || R_L)
+vo_by_vi = -gm*(ro*R_L/(ro+R_L));// in V/V
+disp(vo_by_vi ,"The voltage gain in V/V is : ")
+// For I= 1 mA or twice the current
+I_D1= I_D;// in A
+I_D2= 2*I_D1;// in A
+gm1= gm;// in A/V
+// Effect on V_D
+// I_D1/I_D2 = (V_GS1-Vt)^2/(V_GS2-Vt)^2
+V_GS1= V_GS;
+V_GS2= Vt+sqrt(2)*(V_GS1-Vt);// in V
+disp(V_GS2,"The new value of V_GS in volts is : ")
+// Effect on gm
+// gm1/gm2= sqrt(I_D1/I_D2)
+gm2= sqrt(I_D2/I_D1)*gm1;// in A/V
+gm2= gm2*10^3;// in mA/V
+disp(gm2,"The new value of gm2 in mA/V is : ")
+// Effect on ro
+// ro1/ro2= I_D2/I_D1
+ro1= ro;// in Ω
+ro2= I_D1*ro1/I_D2;// in Ω
+ro2= ro2*10^-3;// in kΩ
+disp(ro2,"The new value of ro in kΩ/V is : ")
+ro2= ro2*10^3;// in Ω
+// Effect on gain
+// Av= -gm*(ro2 || R_L)
+Av= -gm*(ro2*R_L/(ro2+R_L));// in V/V
+disp(Av,"The new value of voltage gain in V/V is : ")
+
+// Note: There is some difference between the new value of voltage gain in book and coding. The reason behind this is that ,
+// the accurate value of new value of gm is 1.2856487 and in the book 1.3 has taken at place of 1.2856487.
+// If we take this value of new value of gm 1.3 at place of 1.2856487 then our new voltage gain value will be same as in the book
+
+
+
+
+
+
+
diff --git a/3515/CH2/EX2.23/Ex_2_23.sce b/3515/CH2/EX2.23/Ex_2_23.sce new file mode 100644 index 000000000..de2f2b396 --- /dev/null +++ b/3515/CH2/EX2.23/Ex_2_23.sce @@ -0,0 +1,21 @@ +// Exa 2.23
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+I_D= 1;// in mA
+I_D= I_D*10^-3;// in A
+gm= 1;//in mA/V
+gm= gm*10^-3;//in A/V
+f_L= 10;// in Hz
+R_S= 6;// in kΩ
+R_S= R_S*10^3;// in Ω
+R_D= 10;// in kΩ
+R_D= R_D*10^3;// in Ω
+vo_by_vi= -gm*R_D/(1+gm*R_S);// in V/V
+disp(vo_by_vi,"Mid band gain in V/V is : ");
+// Formula f_L= 1/(2*%pi*(1/gm || R_S)) * CS
+CS= 1/(2*%pi*(1/gm*R_S/(1/gm+R_S))*f_L) ;//in F
+CS= CS*10^6;// in µF
+disp(CS,"The value of Cs in µF is : ")
diff --git a/3515/CH2/EX2.24/Ex_2_24.sce b/3515/CH2/EX2.24/Ex_2_24.sce new file mode 100644 index 000000000..b462e93a3 --- /dev/null +++ b/3515/CH2/EX2.24/Ex_2_24.sce @@ -0,0 +1,31 @@ +// Exa 2.24
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+Rsig= 100;// in kΩ
+Rsig= Rsig*10^3;// in Ω
+R_G= 4.7;// in MΩ
+R_G= R_G*10^6;// in Ω
+R_D= 15;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_L= R_D;// in Ω
+gm= 1;//in mA/V
+gm= gm*10^-3;//in A/V
+ro=150;// in kΩ
+ro=ro*10^3;// in Ω
+Cgs= 1;// in pF
+Cgs=Cgs*10^-12;//in F
+Cgd= 0.4;// in pF
+Cgd=Cgd*10^-12;//in F
+vgsBYvsig= R_G/(Rsig+R_G);
+Rdesh_L= R_D*R_L/(R_D+R_L);// in Ω
+voBYvgs= -gm*Rdesh_L;
+Av= voBYvgs/vgsBYvsig;// in V/V
+disp(Av,"The Mid-band gain in V/V is :")
+CM= Cgd*(1+gm*Rdesh_L);// in F
+// f_H= 1/(2*%pi*(Rsig || R_G)*(Cgs*CM))
+f_H= 1/(2*%pi*(Rsig * R_G/(Rsig + R_G))*(Cgs+CM));// in Hz
+f_H= f_H*10^-3;// in kHz
+disp(f_H,"Frequency in kHz is : ")
diff --git a/3515/CH2/EX2.3/Ex_2_3.sce b/3515/CH2/EX2.3/Ex_2_3.sce new file mode 100644 index 000000000..c19db7204 --- /dev/null +++ b/3515/CH2/EX2.3/Ex_2_3.sce @@ -0,0 +1,25 @@ +// Exa 2.3
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+Vt= 0.7;// in V
+I_D= 100;// in µA
+I_D=I_D*10^-6;// in A
+// When
+V_GS= 1.2;// in V
+V_DS= V_GS;// in V
+// At this condition, device is in saturation region, so I_D= unCox*W/(2*L)*(V_GS-VT)^2
+unCoxWby2L= I_D/(V_GS-Vt)^2;
+// For
+V_DS= 3;// in V
+V_GS= 1.5;// in V
+// In this condition, device is in saturation region, so
+I_D= unCoxWby2L*(V_GS-Vt)^2;// in A
+I_D= I_D*10^6;// in µA
+disp(I_D,"For V_DS= 3V and V_GS= 1.5 V, The value of I_D in µA is : ")
+// For
+V_GS= 3.2;// in V
+r_DS= 1/(2*unCoxWby2L*(V_GS-Vt));// in Ω
+disp(r_DS,"For V_GS = 3.2 V, Drain to source resistance in Ω is : ")
diff --git a/3515/CH2/EX2.4/Ex_2_4.sce b/3515/CH2/EX2.4/Ex_2_4.sce new file mode 100644 index 000000000..f53ef6ee6 --- /dev/null +++ b/3515/CH2/EX2.4/Ex_2_4.sce @@ -0,0 +1,30 @@ +// Exa 2.4
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I_D= 0.4;// in mA
+I_D=I_D*10^-3;// in A
+Vt= 0.7;// in V
+V_SS= -2.5;// in V
+V_DD= 2.5;// in V
+unCox= 100;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+W= 32;// in m
+L= 1;// in m
+// V_GS-Vt= V_OV
+// I_D= unCox*W/(2*L)*(V_OV)^2
+V_OV= sqrt(I_D/(unCox*W/(2*L)));// in V
+V_GS= V_OV+Vt;// in V
+disp(V_GS,"The value of V_GS in volt is : ")
+V_G= 0;
+// Formula V_GS= V_G-V_S
+V_S= V_G-V_GS;// in V
+R_S= (V_S-V_SS)/I_D// in Ω
+R_S= R_S*10^-3;// in kΩ
+disp(R_S,"The value of R_S in kΩ is : ")
+V_D= 0.5;// in V
+R_D= (V_DD-V_D)/I_D;//in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The value of R_D in kΩ is : ")
diff --git a/3515/CH2/EX2.5/Ex_2_5.sce b/3515/CH2/EX2.5/Ex_2_5.sce new file mode 100644 index 000000000..19e512b5e --- /dev/null +++ b/3515/CH2/EX2.5/Ex_2_5.sce @@ -0,0 +1,25 @@ +// Exa 2.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_DD= 3;// in V
+I_D= 80;// in µA
+I_D=I_D*10^-6;// in A
+Vt= 0.6;// in V
+unCox= 200;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L= 0.8;//in µm
+L= L*10^-6;// in m
+W=4;// in µm
+W=W*10^-6;// in m
+// V_GS-Vt= V_OV
+// I_D= unCox*W/(2*L)*(V_OV)^2
+V_OV= sqrt(I_D/(unCox*W/(2*L)));// in V
+V_GS= V_OV+Vt;// in V
+V_D= 1;// in V
+V_G= V_D;// in V
+R= (V_DD-V_D)/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"The value of R in kΩ is : ")
diff --git a/3515/CH2/EX2.6/Ex_2_6.sce b/3515/CH2/EX2.6/Ex_2_6.sce new file mode 100644 index 000000000..49c817e05 --- /dev/null +++ b/3515/CH2/EX2.6/Ex_2_6.sce @@ -0,0 +1,24 @@ +// Exa 2.6
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_DD= 10;// in V
+I_D= 0.4;// in mA
+I_D=I_D*10^-3;// in A
+Vt= 2;// in V
+unCox= 20;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L= 10;//in µm
+L= L*10^-6;// in m
+W=100;// in µm
+W=W*10^-6;// in m
+V_S= 0;// in V as source is connected to ground
+// I_D= unCox*W/(2*L)*(V_OV)^2
+V_OV= sqrt(I_D/(unCox*W/(2*L)));// in V
+V_GS= V_OV+Vt;// in V
+V_D= V_GS;// in V
+R= (V_DD-V_D)/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"The value of R in kΩ is : ")
diff --git a/3515/CH2/EX2.7/Ex_2_7.sce b/3515/CH2/EX2.7/Ex_2_7.sce new file mode 100644 index 000000000..28681c05e --- /dev/null +++ b/3515/CH2/EX2.7/Ex_2_7.sce @@ -0,0 +1,18 @@ +// Exa 2.7
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+KnWbyL= 1;// in mA
+KnWbyL=KnWbyL*10^-3;// in A
+Vt= 1;// in V
+V_DS= 0.1;// in V
+V_D= V_DS;// in V
+V_GS= 5;// in V
+V_DD= V_GS;// in V
+// Formula I_D= K'nW/L*[(V_GS-Vt)*V_DS-V_DS^2/2]
+I_D= KnWbyL*[(V_GS-Vt)*V_DS-V_DS^2/2];// in A
+R_D= (V_DD-V_D)/I_D;//in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The required value of R_D in kΩ is : ")
diff --git a/3515/CH2/EX2.8/Ex_2_8.sce b/3515/CH2/EX2.8/Ex_2_8.sce new file mode 100644 index 000000000..c33d9420c --- /dev/null +++ b/3515/CH2/EX2.8/Ex_2_8.sce @@ -0,0 +1,37 @@ +// Exa 2.8
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+KnWbyL= 1;// in mA/V^2
+KnWbyL=KnWbyL*10^-3;// in A/V^2
+Vt= 1;// in V
+V_DD= 10;// in V
+R_D= 6;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_S= 6;// in kΩ
+R_S= R_S*10^3;// in Ω
+R_G1= 10;// in MΩ
+R_G1= R_G1*10^6;// in Ω
+R_G2= 10;// in MΩ
+R_G2= R_G2*10^6;// in Ω
+V_G= V_DD*R_G2/(R_G1+R_G2);// in V
+// V_S= R_S*I_D
+// V_GS= V_G-V_S= V_G-R_S*I_D
+// Formula I_D= K'nW/2*L*(V_GS-Vt)^2, Putting the value of V_GS, We get
+// 18*I_D^2 -25*I_D +8= 0
+// I_D= 0.89 mA or I_D= 0.5
+I_D= 0.5;// in mA
+I_D=I_D*10^-3;// in A
+V_S= R_S*I_D;// in V
+V_GS= V_G-V_S;// in V
+V_D= V_DD-I_D*R_D;// in V
+I_D= I_D*10^3;// in mA
+disp(I_D,"The value of I_D in mA is : ")
+disp(V_S,"The value of V_S in volt is : ")
+disp(V_GS,"The value of V_GS in volt is : ")
+disp(V_D,"The value of V_D in volt is : ")
+disp("Since V_D > V_G - Vt , the transistor is operating in saturation , as initially assumed")
+
+
diff --git a/3515/CH2/EX2.9/Ex_2_9.sce b/3515/CH2/EX2.9/Ex_2_9.sce new file mode 100644 index 000000000..17c757cd4 --- /dev/null +++ b/3515/CH2/EX2.9/Ex_2_9.sce @@ -0,0 +1,27 @@ +// Exa 2.9
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R_D= 20;// in kΩ
+R_D= R_D*10^3;// in Ω
+R1= 30;// in kΩ
+R1= R1*10^3;// in Ω
+R2= 20;// in kΩ
+R2= R2*10^3;// in Ω
+V_DD= 5;// in V
+Vtn= 1;// in V
+Kn= 0.1;// in mA/V^2
+Kn=Kn*10^-3;// in A/V^2
+V_GS= R2*V_DD/(R1+R2);// in V
+// I_D= 1/2*µnCox*W/L*(V_GS-Vtm)^2
+I_D = Kn*(V_GS-Vtn)^2 ;// in mA (As Kn= 1/2*µnCox*W/L)
+V_DS= V_DD-I_D*R_D;// in V
+I_D= I_D*10^3;// in mA
+disp(V_GS,"The value of V_GS in volt is : ")
+disp(I_D,"The value of I_D in mA is : ")
+disp(V_DS,"The value of V_DS in volt is : ")
+disp("Since V_DS = 3V > V_DS(sat) = V_GS-Vtn = 2 - 1V, the transistor is indeed biased in the saturation region")
+
+
diff --git a/3515/CH3/EX3.1/Ex_3_1.sce b/3515/CH3/EX3.1/Ex_3_1.sce new file mode 100644 index 000000000..e963bf825 --- /dev/null +++ b/3515/CH3/EX3.1/Ex_3_1.sce @@ -0,0 +1,23 @@ +// Exa 3.1
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_E= -0.7;// in V
+Bita=50;
+RC= 5;// in kΩ
+RE= 10;// in kΩ
+RE= RE*10^3;// in Ω
+RC= RC*10^3;// in Ω
+V_CC= 10;// in V
+V_BE= -10;// in volt
+I_E= (V_E-V_BE)/RE;// in A
+disp(I_E*10^3,"Emitter current in mA is : ")
+// I_E= I_B+I_C and I_C= Bita*I_B, so
+I_B= I_E/(1+Bita);// in A
+disp(I_B*10^6,"Base current in µA is : ")
+I_C= I_E-I_B;//in A
+disp(I_C*10^3,"Collector current in mA is : ")
+V_C= V_CC-I_C*RC;// in V
+disp(V_C,"The value of V_C in volts is :")
diff --git a/3515/CH3/EX3.10/Ex_3_10.sce b/3515/CH3/EX3.10/Ex_3_10.sce new file mode 100644 index 000000000..094798ea3 --- /dev/null +++ b/3515/CH3/EX3.10/Ex_3_10.sce @@ -0,0 +1,26 @@ +// Exa 3.10
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC= 10;// in V
+V_BB= 3;// in V
+V_BE= 0.7;// in V
+V_T= 25*10^-3;// in V
+bita=100;
+RC= 3;// in kΩ
+RC=RC*10^3;// in Ω
+RB= 100;// in kΩ
+RB=RB*10^3;// in Ω
+I_B= (V_BB-V_BE)/RB;// in V
+I_C= bita*I_B;// in A
+V_C= V_CC-I_C*RC;// in V
+gm= I_C/V_T;// in A/V
+r_pi= bita/gm;// in Ω
+// v_be= r_pi/(RB+r_pi)*v_i
+v_be_by_v_i= r_pi/(RB+r_pi);
+// v_o= -gm*v_be*RC
+v_o_by_v_i= -gm*v_be_by_v_i*RC;// in V/V
+Av= v_o_by_v_i;// in V/V
+disp(round(Av),"Voltage gain in V/V is : ")
diff --git a/3515/CH3/EX3.11/Ex_3_11.sce b/3515/CH3/EX3.11/Ex_3_11.sce new file mode 100644 index 000000000..ec0bdc811 --- /dev/null +++ b/3515/CH3/EX3.11/Ex_3_11.sce @@ -0,0 +1,23 @@ +// Exa 3.11
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_B= 4;// in V
+V_BE= 0.7;// in V
+V_CC= 10;// in V
+V_E= V_B-V_BE;// in V
+R_E= 3.3;// in kΩ
+R_E=R_E*10^3;// in Ω
+RC= 4.7;// in kΩ
+RC=RC*10^3;// in Ω
+I_E= V_E/R_E;// in A
+bita=100;
+alpha= bita/(1+bita);
+I_C= alpha*I_E;//in A
+disp(I_C*10^3,"The value of I_C in mA is : ")
+V_C= V_CC-I_C*RC;// in V
+disp(V_C,"The value of V_C in volts is : ")
+I_B= I_E/(1+bita);// in A
+disp(I_B*10^3,"The value of I_B in mA is : ")
diff --git a/3515/CH3/EX3.12/Ex_3_12.sce b/3515/CH3/EX3.12/Ex_3_12.sce new file mode 100644 index 000000000..4107689b7 --- /dev/null +++ b/3515/CH3/EX3.12/Ex_3_12.sce @@ -0,0 +1,22 @@ +// Exa 3.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_B= 5;// in V
+V_BE= 0.7;// in V
+V_CC= 10;// in V
+bita=100;
+R_B= 100;// in kΩ
+R_C= 2;// in kΩ
+R_B=R_B*10^3;// in Ω
+R_C=R_C*10^3;// in Ω
+I_B= (V_B-V_BE)/R_B;// in A
+I_C= bita*I_B;//in A
+V_C= V_CC-I_C*R_C;// in V
+I_E= I_C;// in A (approx)
+disp(I_B*10^3,"The value of I_B in mA is : ")
+disp(I_C*10^3,"The value of I_C in mA is : ")
+disp(V_C,"The value of V_C in volts is : ")
+disp(I_E*10^3,"The value of I_E in mAis : ")
diff --git a/3515/CH3/EX3.13/Ex_3_13.sce b/3515/CH3/EX3.13/Ex_3_13.sce new file mode 100644 index 000000000..4c0788031 --- /dev/null +++ b/3515/CH3/EX3.13/Ex_3_13.sce @@ -0,0 +1,34 @@ +// Exa 3.13
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_B= 0;// in V
+V_EB= 0.7;// in V
+bita=100;
+V_EC= 0.2;// in V
+V_E= V_EB+V_B;// in V
+V_CC= 5;// in V
+R_C= 1;// in kΩ
+R_C=R_C*10^3;// in Ω
+R_B= 10;// in kΩ
+R_B= R_B*10^3;// in Ω
+// V_E= V_B+V_EB (i)
+// V_C= V_E-V_EC= V_B+V_EB-V_EC (ii)
+// I_E= (V_CC-V_E)/R_C= (V_CC-V_B-V_EB)/R_C (iii)
+// I_B= V_B/R_B (iv)
+// I_C= (V_C+V_CC)/R_C= (V_B+V_EB-V_EC+V_CC)/R_B (v)
+// By using relationship, I_E= I_B+I_C
+V_B= (9*V_CC-11*V_EB+V_EC)/12;// in V
+V_E= V_B+V_EB;// in V
+V_C= V_B+V_EB-V_EC;// in V
+I_E= (V_CC-V_B-V_EB)/R_C// in amp
+I_C= (V_B+V_EB-V_EC+V_CC)/R_B;// in amp
+I_B= V_B/R_B;// in amp
+disp(V_B,"The value of V_B in volts is : ")
+disp(V_E,"The value of V_E in volts is : ")
+disp(V_C,"The value of V_C in volts is : ")
+disp(I_E*10^3,"The value of I_E in mA is : ")
+disp(I_C*10^3,"The value of I_C in mA is : ")
+disp(I_B*10^3,"The value of I_B in mA is : ")
diff --git a/3515/CH3/EX3.14/Ex_3_14.sce b/3515/CH3/EX3.14/Ex_3_14.sce new file mode 100644 index 000000000..1c9e32013 --- /dev/null +++ b/3515/CH3/EX3.14/Ex_3_14.sce @@ -0,0 +1,24 @@ +// Exa 3.14
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+bita=100;
+hFE= 100;
+VCEsat= 0.2;// in V
+VBEsat= 0.8;// in V
+VBEactive= 0.7;// in V
+VBB= 5;// in V
+VCC= 10;// in V
+R_C= 3;// in kΩ
+R_C=R_C*10^3;// in Ω
+R_B= 50;// in kΩ
+R_B=R_B*10^3;// in Ω
+// Formula VCC= ICsat*R_C+VCEsat
+ICsat= (VCC-VCEsat)/R_C;//A
+disp(ICsat*10^3,"The value of IC(sat) in mA is : ")
+IBmin= ICsat/bita;// in A
+// Apply KVL to input circuit, VBB= IB*R_B+VBEsat
+IB= (VBB-VBEsat)/R_B;// in A
+disp(IB*10^6,"Actual base current in µA is : ")
diff --git a/3515/CH3/EX3.16/Ex_3_16.sce b/3515/CH3/EX3.16/Ex_3_16.sce new file mode 100644 index 000000000..28c47d296 --- /dev/null +++ b/3515/CH3/EX3.16/Ex_3_16.sce @@ -0,0 +1,19 @@ +// Exa 3.16
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+// bita= alpha/(1-alpha)
+// At alpha= 0.5
+alpha= 0.5;
+bita= alpha/(1-alpha);
+disp(bita,"At alpha=0.5, the value of bita is : ")
+// At alpha= 0.9
+alpha= 0.9;
+bita = alpha/(1-alpha);
+disp(bita,"At alpha=0.9, the value of bita is : ")
+// At alpha= 0.5
+alpha= 0.999;
+bita= alpha/(1-alpha);
+disp(bita,"At alpha=0.999, the value of bita is : ")
diff --git a/3515/CH3/EX3.17/Ex_3_17.sce b/3515/CH3/EX3.17/Ex_3_17.sce new file mode 100644 index 000000000..0dd9100c4 --- /dev/null +++ b/3515/CH3/EX3.17/Ex_3_17.sce @@ -0,0 +1,23 @@ +// Exa 3.17
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+// alpha= bita/(1-bita)
+// At bita= 1
+bita=1;
+ alpha= bita/(1+bita);
+ disp(alpha,"At bita=1, the value of alpha is : ")
+ // At bita= 2
+bita=2;
+ alpha= bita/(1+bita);
+ disp(alpha,"At bita=2, the value of alpha is : ")
+// At bita= 100
+bita=100;
+ alpha= bita/(1+bita);
+ disp(alpha,"At bita=100, the value of alpha is : ")
+// At bita= 200
+bita=200;
+ alpha= bita/(1+bita);
+ disp(alpha,"At bita=200, the value of alpha is : ")
diff --git a/3515/CH3/EX3.18/Ex_3_18.sce b/3515/CH3/EX3.18/Ex_3_18.sce new file mode 100644 index 000000000..d2f0f2f13 --- /dev/null +++ b/3515/CH3/EX3.18/Ex_3_18.sce @@ -0,0 +1,22 @@ + // Exa 3.18
+format('v',9);
+clc;
+clear;
+close;
+// Given data
+VBE= 0.76;// in V
+VT= 0.025;// in V
+I_C= 10*10^-3;// in A
+// Formula I_C= I_S*%e^(VBE/VT)
+I_S= I_C/(%e^(VBE/VT));// in A
+disp(I_S,"The value of I_S in amp is : ")
+// Part(a) for VBE = 0.7 V
+VBE= 0.7;// in V
+I_C= I_S*%e^(VBE/VT)
+disp(I_C*10^3,"For VBE = 0.7 V , The value of I_C in mA is : ")
+
+// Part (b) for I_C= 10 µA
+I_C= 10*10^-6;// in A
+// Formula I_C= I_S*%e^(VBE/VT)
+VBE= VT*log(I_C/I_S);
+disp(VBE,"For I_C = 10 µA, The value of VBE in V is : ")
diff --git a/3515/CH3/EX3.19/Ex_3_19.sce b/3515/CH3/EX3.19/Ex_3_19.sce new file mode 100644 index 000000000..056c13466 --- /dev/null +++ b/3515/CH3/EX3.19/Ex_3_19.sce @@ -0,0 +1,21 @@ +// Exa 3.19
+format('v',9);
+clc;
+clear;
+close;
+// Given data
+VBE= 0.7;// in V
+VT= 0.025;// in V
+I_B= 100;// in µA
+I_B=I_B*10^-6;// in A
+I_C= 10*10^-3;// in A
+// Formula I_C= I_S*%e^(VBE/VT)
+I_S= I_C/(%e^(VBE/VT));// in A
+alpha= I_C/(I_C+I_B);
+bita= I_C/I_B;
+IS_by_alpha= I_S/alpha;// in A
+IS_by_bita= I_S/bita;// in A
+disp(alpha,"The value of alpha is : ");
+disp(bita,"The value of bita is : ");
+disp(IS_by_alpha,"The value of Is/alpha in A is :");
+disp(IS_by_bita,"The value of Is/bita in A is : ");
diff --git a/3515/CH3/EX3.2/Ex_3_2.sce b/3515/CH3/EX3.2/Ex_3_2.sce new file mode 100644 index 000000000..a7cf305b3 --- /dev/null +++ b/3515/CH3/EX3.2/Ex_3_2.sce @@ -0,0 +1,27 @@ +// Exa 3.2
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+V_E= 1.7;// in V
+V_B= 1;// in V
+RC= 5;// in kΩ
+RE= 5;// in kΩ
+RE= RE*10^3;// in Ω
+RC= RC*10^3;// in Ω
+RB= 100;//in kΩ\
+RB= RB*10^3;// in Ω
+V_CC= 10;// in V
+V_BE= -10;// in volt
+I_E= (V_CC-V_E)/RE;// in A
+I_B= V_B/RB;// in V
+// Formula I_B= (1-alpha)*I_E
+alpha= 1-I_B/I_E;
+disp(alpha,"Value of alpha is : ")
+bita= alpha/(1-alpha);
+disp(bita,"Value of bita is : ")
+V_C= (I_E-I_B)*RC-V_CC;// in volt
+disp(V_C,"Collector voltage in volts is : ")
+
+
diff --git a/3515/CH3/EX3.20/Ex_3_20.sce b/3515/CH3/EX3.20/Ex_3_20.sce new file mode 100644 index 000000000..8e895f397 --- /dev/null +++ b/3515/CH3/EX3.20/Ex_3_20.sce @@ -0,0 +1,50 @@ +// Exa 3.20
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+VBE= 0.7;// in V
+VCC= 10.7;// in V
+R_C= 10;//in kΩ
+R_C=R_C*10^3;// in Ω
+R_B= 10;//in kΩ
+R_B=R_B*10^3;// in Ω
+I1= (VCC-VBE)/R_C;// in A
+disp(I1*10^3,"The value of I1 in mA is : ")
+// Part (b)
+VC= -4;//in V
+VB= -10;// in V
+R_C= 5.6;//in kΩ
+R_C=R_C*10^3;// in Ω
+R_B= 2.4;//in kΩ
+R_B=R_B*10^3;// in Ω
+VCC=12;// V
+I_C= (VC-VB)/R_B;// in A
+V2= VCC- (R_C*I_C);
+disp(V2,"The value of V2 in volt is : ");
+// Part (c)
+VCC= 0;
+VCE= -10;// in V
+R_C= 10;//in kΩ
+R_C=R_C*10^3;// in Ω
+I_C= (VCC-VCE)/R_C;// in A
+V4= 1;// in V
+I3= I_C;// in A (approx)
+disp(V4,"The value of V4 in volt is : ");
+disp(I3*10^3,"The value of I3 in mA is : ")
+// Part (d)
+VBE= -10;// in V
+VCC= 10;// in V
+R_B= 5;//in kΩ
+R_B=R_B*10^3;// in Ω
+R_C= 15;//in kΩ
+R_C=R_C*10^3;// in Ω
+// I5= I_C and
+// I5= (V6-0.7-VBE)/R_B and I_C= (VCC-V6)/R_C
+V6= (VCC*R_B+R_C*(0.7+VBE))/(R_C+R_B);
+disp(V6,"The value of V6 in volt is : ")
+I5= (V6-0.7-VBE)/R_B;// in A
+disp(I5*10^3,"The value of I5 in mA is : ")
+
+
diff --git a/3515/CH3/EX3.21/Ex_3_21.sce b/3515/CH3/EX3.21/Ex_3_21.sce new file mode 100644 index 000000000..a11bf34c4 --- /dev/null +++ b/3515/CH3/EX3.21/Ex_3_21.sce @@ -0,0 +1,60 @@ +// Exa 3.21
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+// Part (a)
+V_C= 2;// in V
+R_C= 1;// in kΩ
+R_C=R_C*10^3;// in Ω
+V_B= 4.3;// in V
+R_B= 200;// in kΩ
+R_B=R_B*10^3;// in Ω
+I_C= V_C/R_C;// in A
+I_B= V_B/R_B;// in A
+Beta= I_C/I_B;
+disp("Part (a)")
+disp(I_C*10^3,"Collector current in mA is : ")
+disp(I_B*10^6,"Base current in µA is : ")
+disp(Beta,"The value of Beta is : ")
+
+// Part (b)
+V_C= 2.3;// in V
+R_C= 230;// in kΩ
+R_C=R_C*10^3;// in Ω
+V_B= 4.3;// in V
+R_B= 20;// in kΩ
+R_B=R_B*10^3;// in Ω
+I= V_C/R_C;// current through 230Ω resistro i.e. I_C + I_B in A
+I_B= (V_B-V_C)/R_B;// in A
+I_C= I-I_B;// in A
+Beta= abs(I_C/I_B);
+disp("Part (b)")
+disp(I_C*10^3,"Collector current in mA is : ")
+disp(I_B*10^3,"Base current in mA is : ")
+disp(Beta,"The value of Beta is : ")
+
+// Part (c)
+V_E= 10;// in V
+R_E= 1;// in kΩ
+R_E=R_E*10^3;// in Ω
+V_1= 7;// in V
+R_C= 1;// in kΩ
+R_C=R_C*10^3;// in Ω
+V_B= 6.3;// in V
+R_B= 100;// in kΩ
+R_B=R_B*10^3;// in Ω
+I_E= (V_E-V_1)/R_C;//in A
+I_C=I_E;// in A (approx)
+V_C= I_C*R_C;// in V
+I_B= (V_B-V_C)/R_B;// in A
+Beta= I_E/I_B-1;
+disp("Part (c)")
+disp(I_E*10^3,"Emitter current in mA is : ")
+disp(I_B*10^6,"Base current in µA is : ")
+disp(V_C,"Collector voltage in volts is : ")
+disp(Beta,"The value of Beta is : ")
+
+// Note : In the book the value of base current in the first part is wrong due to calculation error.
+// In the part (b) the values of collector current and Beta are wrong due to calculation error in the first line of part (b)
diff --git a/3515/CH3/EX3.22/Ex_3_22.sce b/3515/CH3/EX3.22/Ex_3_22.sce new file mode 100644 index 000000000..77a69287c --- /dev/null +++ b/3515/CH3/EX3.22/Ex_3_22.sce @@ -0,0 +1,47 @@ + // Exa 3.22
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+// Part (a)
+bita= 30;
+R_C= 2.2;// in kΩ
+R_C=R_C*10^3;// in Ω
+R_B= 2.2;// in kΩ
+R_B=R_B*10^3;// in Ω
+VCC= 3;// in V
+VCE= -3;// in V
+VBE= 0.7;// in V
+V_B= 0;// in V
+V_E= V_B-VBE;// in V
+I_E= (V_E-VCE)/R_B;// in A
+I_C= I_E;// in A
+V_C= VCC-I_E*R_C;// in V
+I_B= I_C/bita;// in A
+disp("Part (a)")
+disp(V_B,"The value of V_B in V is : ")
+disp(V_E,"The value of V_E in V is : ")
+disp(I_E*10^3,"The value of I_E in mA is : ")
+disp(V_C,"The value of V_C in V is : ")
+disp(I_B*10^3,"The value of I_B in mA is : ")
+// Part (b)
+R_C= 560;// in Ω
+R_B= 1.1;// in kΩ
+R_B=R_B*10^3;// in Ω
+VCC= 9;// in V
+VCE= 3;// in V
+V_B= 3;// in V
+V_E= V_B+VBE;// in V
+I_E= (VCC-V_E)/R_B;// in A
+alpha= bita/(1+bita);
+I_C= I_E*alpha;// in A
+V_C= I_C*R_C;// in V
+I_B= I_C/bita;// in A
+disp("Part (b)")
+disp(V_B,"The value of V_B in V is : ")
+disp(V_E,"The value of V_E in V is : ")
+disp(I_C*10^3,"The value of I_E in mA is : ")
+disp(V_C,"The value of V_C in V is : ")
+disp(I_B*10^3,"The value of I_B in mA is : ")
+
diff --git a/3515/CH3/EX3.23/Ex_3_23.sce b/3515/CH3/EX3.23/Ex_3_23.sce new file mode 100644 index 000000000..14accfa3f --- /dev/null +++ b/3515/CH3/EX3.23/Ex_3_23.sce @@ -0,0 +1,33 @@ +// Exa 3.23
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+VBE= 0.7;// in V
+VCC= 9;// in V
+VCE= -9;// in V
+V_B= -1.5;// in V
+R_C= 10;// in kΩ
+R_C=R_C*10^3;// in Ω
+R_B= 10;// in kΩ
+R_B=R_B*10^3;// in Ω
+I_B= abs(V_B)/R_B;// in A
+V_E= V_B-VBE;// in V
+disp(V_E,"The value of V_E in volt is : ")
+I_E= (V_E-VCE)/R_B;// in A
+Beta= I_E/I_B-1;
+alpha= Beta/(1+Beta);
+disp(alpha,"The value of alpha in volt is : ")
+disp(Beta,"The value of Beta in volt is : ")
+V_C= VCC-I_E*alpha*R_C;// in V
+disp(V_C,"The value of V_C in volt is : ")
+// When Beta = infinite then
+alpha= 1 ;// As infinite/(1+infinite) = 1
+I_B= 0;
+V_B=0;
+V_C= VCC-I_E*R_C;// in volt
+disp("When Beta = infinite then :-")
+disp(V_B,"The value of V_B in volt is : ")
+disp(V_E,"The value of V_E in volt is : ")
+disp(V_C,"The value of V_C in volt is : ")
diff --git a/3515/CH3/EX3.24/Ex_3_24.sce b/3515/CH3/EX3.24/Ex_3_24.sce new file mode 100644 index 000000000..bbf4bc526 --- /dev/null +++ b/3515/CH3/EX3.24/Ex_3_24.sce @@ -0,0 +1,16 @@ +// Exa 3.24
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+VBE_1= 0.7;// in V
+VBE_2= 0.5;// in V
+V_T= 0.025;// in V
+I_C1= 10;// in mV
+I_C1= I_C1*10^-3;// in A
+// I_C1= I_S*%e^(VBE_1/V_T) (i)
+// I_C2= I_S*%e^(VBE_2/V_T) (ii)
+// Devide equation (ii) by (i)
+I_C2= I_C1*%e^((VBE_2-VBE_1)/V_T);// in A
+disp(I_C2*10^6,"The value of I_C2 in µA is : ")
diff --git a/3515/CH3/EX3.25/Ex_3_25.sce b/3515/CH3/EX3.25/Ex_3_25.sce new file mode 100644 index 000000000..4d403c246 --- /dev/null +++ b/3515/CH3/EX3.25/Ex_3_25.sce @@ -0,0 +1,20 @@ +// Exa 3.25
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 10;// in kΩ
+R1=R1*10^3;// in Ω
+R2= 10;// in kΩ
+R2=R2*10^3;// in Ω
+I_C=.5;// mA
+V_T= 0.025;//in V
+I_C= I_C*10^-3;// in A
+V= 10;// in V
+Vth= V*R1/(R1+R2);// in V
+Rth= R1*R2/(R1+R2);//in Ω
+vo= I_C*Rth;// in V
+vi=V_T;// in V
+vo_by_vi= vo/vi;//in V/V
+disp(vo_by_vi,"The value of vo/vi in V/V is : ")
diff --git a/3515/CH3/EX3.27/Ex_3_27.sce b/3515/CH3/EX3.27/Ex_3_27.sce new file mode 100644 index 000000000..7d8361d57 --- /dev/null +++ b/3515/CH3/EX3.27/Ex_3_27.sce @@ -0,0 +1,27 @@ +// Exa 3.27
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_B= 2;// in V
+V_CC=5;// in V
+V_BE= 0.7;// in V
+R_E= 1*10^3;// in Ω
+R_C= 1*10^3;// in Ω
+V_E= V_B-V_BE;// in V
+I_E= V_E/R_E;// in A
+I_C= I_E;// in A
+V_C= V_CC-I_C*R_C;//in V
+disp("At V_B= +2 V")
+disp(V_E,"The value of V_E in volts is : ")
+disp(V_C,"The value of V_C in volts is : ")
+
+// Part (b)
+V_B= 0;//in V
+V_E= 0;// in V
+I_E= 0;// in A
+V_C= 5;// in V
+disp("At V_B= 0 V")
+disp(V_E,"The value of V_E in volts is : ")
+disp(V_C,"The value of V_C in volts is : ")
diff --git a/3515/CH3/EX3.28/Ex_3_28.sce b/3515/CH3/EX3.28/Ex_3_28.sce new file mode 100644 index 000000000..8b9c51c3e --- /dev/null +++ b/3515/CH3/EX3.28/Ex_3_28.sce @@ -0,0 +1,35 @@ +// Exa 3.28
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_B= 0;// in V
+R_E=1*10^3;//in Ω
+R_C=1*10^3;//in Ω
+V_CC=5;// in V
+V_BE= 0.7;// in V
+V_E= V_B-V_BE;// in V
+I_E= (1+V_E)/R_E;// in A
+I_C= I_E;// (approx) in A
+V_C= V_CC-I_C*R_C;//in V
+disp("Part (i)")
+disp(V_E,"The value of V_E in volt is : ");
+disp(V_C,"The value of V_C in volt is : ");
+// For saturation
+V_CE=0.2 ;// V
+V_CB= -0.5;// in V
+// I_C= 5-V_C/R_C and V_C= V_E-VCE, So
+// I_C= (5.2-V_E)/R_C
+// I_E= (V_E+1)/R_E and at the edge of saturation I_C=I_E,
+V_E= 4.2/2;/// in V
+V_B= V_E+0.7;// in V
+V_C= V_E+0.2;// in V
+disp("Part (ii) ")
+disp(V_E,"The value of V_E in volts is : ");
+disp(V_B,"The value of V_B in volts is : ");
+disp(V_C,"The value of V_C in volts is : ");
+
+// Note: In the book , there is a miss print in the last line of this question because V_E+0.2= 2.1+0.2 = 2.3 (not 2.8) , so answer in the book is wrong
+
+
diff --git a/3515/CH3/EX3.29/Ex_3_29.sce b/3515/CH3/EX3.29/Ex_3_29.sce new file mode 100644 index 000000000..d206a565f --- /dev/null +++ b/3515/CH3/EX3.29/Ex_3_29.sce @@ -0,0 +1,27 @@ +// Exa 3.29
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC=5;// in V
+V_E= 1;// in V
+V_BE= 0.7;// in V
+R_E=5*10^3;//in Ω
+R_C=5*10^3;//in Ω
+R_B= 20*10^3;// in Ω
+I_E= (V_CC-V_E)/R_E;// in A
+// For pnp transistor V_BE= V_E-V_B
+V_B= V_E-V_BE;// in V
+I_B= V_B/R_B;// in A
+I_C= I_E-I_B;// in A
+V_C= I_C*R_C-V_CC;// in V
+bita= I_C/I_B;
+alpha= I_C/I_E;
+disp(V_B,"The value of V_B in volts is : ");
+disp(I_B*10^3,"The value of I_B in mA is : ");
+disp(I_E*10^3,"The value of I_E in mA is : ");
+disp(I_C*10^3,"The value of I_C in mA is : ");
+disp(V_C,"The value of V_C in volts is : ");
+disp(bita,"The value of bita is : ");
+disp(alpha,"The value of alpha is : ");
diff --git a/3515/CH3/EX3.3/Ex_3_3.sce b/3515/CH3/EX3.3/Ex_3_3.sce new file mode 100644 index 000000000..0e5f4f530 --- /dev/null +++ b/3515/CH3/EX3.3/Ex_3_3.sce @@ -0,0 +1,47 @@ +// Exa 3.3
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+V_CC= 10;// in V
+V_CE= 3.2;// in V
+RC= 6.8;// in kΩ
+RC= RC*10^3;// in Ω
+I_S= 1*10^-15;// in A
+V_T= 25*10^-3;// in V
+I_C1= (V_CC-V_CE)/RC;// in A
+// Formula I_C= I_S*%e^(V_BE1/V_T)
+V_BE1= V_T*log(I_C1/I_S);// in volt
+disp(I_C1*10^3,"Collector current in mA is : ")
+disp(V_BE1,"Value of V_BE in volts is : ")
+
+// Part (b)
+v_in= 5*10^-3;// in V
+Av= -(V_CC-V_CE)/V_T;// in V/V
+disp(Av,"Voltage gain in V/V is : ")
+v_o= abs(Av )*v_in;// in V
+disp(v_o,"Change in output voltage in volts is : ")
+
+// Part (c) for V_CE= 0.3 V
+V_CE= 0.3;// in V
+I_C2= (V_CC-V_CE)/RC;// in A
+// I_C1= I_S*%e^(V_BE1/V_T) (i)
+// I_C2= I_S*%e^(V_BE2/V_T) (ii)
+// divide the equation (ii) by (i)
+delta_V_BE= V_T*log(I_C2/I_C1);// in volt ( where delta_V_BE = V_BE2-V_BE1 )
+disp(delta_V_BE*10^3 ,"The positive increament in V_BE in mV is : ")
+
+// Part (d)
+v_o= 0.99*V_CC;// in V
+I_C3= (V_CC-v_o)/RC;// in A
+delta_V_BE= V_T*log(I_C3/I_C1);// in V
+disp(delta_V_BE*10^3 ,"The negative increament in V_BE in mV is : ")
+
+
+
+
+
+
+
+
diff --git a/3515/CH3/EX3.30/Ex_3_30.sce b/3515/CH3/EX3.30/Ex_3_30.sce new file mode 100644 index 000000000..faaedacd0 --- /dev/null +++ b/3515/CH3/EX3.30/Ex_3_30.sce @@ -0,0 +1,20 @@ +// Exa 3.30
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC=5;// in V
+V_T= 0.025;// in V
+R_C=7.5*10^3;//in Ω
+I_C= 0.5;// in mA
+I_C= I_C*10^-3;// in A
+I_E=I_C;// (approx) in A
+V_C= V_CC-I_C*R_C;// in V
+disp(V_C,"dc voltage at the collector in volt is : ")
+gm= I_C/V_T;// in A/V
+disp(gm*10^3,"The value of gm in mA/V is : ")
+// v_be= -v_i
+// v_c= -gm*v_be*R_C
+vcbyvi= gm*R_C;// in V/V
+disp(vcbyvi,"The value of vc/vi in V/V is : ")
diff --git a/3515/CH3/EX3.31/Ex_3_31.sce b/3515/CH3/EX3.31/Ex_3_31.sce new file mode 100644 index 000000000..4fde1010b --- /dev/null +++ b/3515/CH3/EX3.31/Ex_3_31.sce @@ -0,0 +1,18 @@ +// Exa 3.31
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_T= 0.025;// in V
+I_E= 0.5;// in mA
+I_E= I_E*10^-3;// in mA
+Rsig= 50;// in Ω
+R_C= 5*10^3;// in Ω
+re= V_T/I_E;// in ohm
+Rin= Rsig+re;// in ohm
+disp(Rin,"Input resistance in Ω is : ")
+// Part(b)
+// vo= -0.99*ie*R_C and ie= -v_sig/Rin
+vo_by_v_sig= 0.99*R_C/Rin;// in V/V
+disp(vo_by_v_sig,"The value of vo/vsig in V/V is : ")
diff --git a/3515/CH3/EX3.32/Ex_3_32.sce b/3515/CH3/EX3.32/Ex_3_32.sce new file mode 100644 index 000000000..96784c08f --- /dev/null +++ b/3515/CH3/EX3.32/Ex_3_32.sce @@ -0,0 +1,44 @@ +// Exa 3.32
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+bita= 200;
+alpha= bita/(1+bita);
+R_C= 100;// in Ω
+R_B= 10;// in kΩ
+Rsig= 1;// in kΩ
+Rsig= Rsig*10^3;// in Ω
+R_B= R_B*10^3;// in Ω
+V_T= 25*10^-3;
+V=1.5;// in V
+I_E= 10;// in mA
+I_E= I_E*10^-3;// in A
+I_C= alpha*I_E;// in A
+V_C= I_C*R_C;// in V
+I_B= I_C/bita;// in A
+V_B= V-(R_B*I_B)
+gm= I_C/V_T;// in A/V
+rpi= bita/gm;// in Ω
+Rib= rpi;// in Ω
+disp(Rib,"The value of Rib in Ω is : ")
+Rin= R_B*rpi/(R_B+rpi);// in Ω
+disp(Rin,"The value of Rin in Ω is : ")
+// vbe= v_sig*Rin/(Rsig+Rin);
+vbe_by_vsig= Rin/(Rsig+Rin);
+// vo= -gm*vbe*R_C and = -gm*v_sig*Rin/(Rsig+Rin)
+vo_by_vsig= -gm*R_C*vbe_by_vsig;// in V/V
+disp(vo_by_vsig,"Overall voltage gain in V/V is : ")
+// if
+vo= 0.4;//(±) in V
+vs= vo/abs(vo_by_vsig);// in V
+vbe= vbe_by_vsig*vs;// in V
+disp(vs*10^3,"The value of v_sig in mV is : ")
+disp(vbe*10^3,"The value of v_be in mV is : ")
+
+// Note: There is some difference between in this coding and book solution. But Coding is correct.
+
+
+
+
diff --git a/3515/CH3/EX3.33/Ex_3_33.sce b/3515/CH3/EX3.33/Ex_3_33.sce new file mode 100644 index 000000000..b371e39fa --- /dev/null +++ b/3515/CH3/EX3.33/Ex_3_33.sce @@ -0,0 +1,100 @@ +// Exa 3.33
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_T= 0.025;// in V
+// Part(a)
+disp("Part (a)")
+V_BE= 690;// in mV
+V_BE=V_BE*10^-3;// in V
+I_C= 1;// in mA
+I_B= 50;// in µA
+I_C=I_C*10^-3;// in A
+I_B=I_B*10^-6;// in A
+bita= I_C/I_B;
+alpha= bita/(1+bita);
+I_E= I_C/alpha;// in A
+// I_C= I_S*%e^(V_BE/V_T)
+I_S= I_C/(%e^(V_BE/V_T));
+disp(bita,"The value of bita is : ")
+disp(alpha,"The value of alpha is : ")
+disp(I_E*10^3,"The value of I_E in mA is : ")
+disp(I_S,"The value of I_S in amp is : ")
+
+// Part(b)
+disp("Part (b)")
+V_BE= 690;// in mV
+V_BE=V_BE*10^-3;// in V
+I_C= 1;// in mA
+I_C=I_C*10^-3;// in A
+I_E= 1.070;// in mA
+I_E=I_E*10^-3;// in A
+bita= I_C/I_B;
+alpha= I_C/I_E;
+bita= alpha/(1-alpha);
+I_B= I_C/bita;// in A
+// I_C= I_S*%e^(V_BE/V_T)
+I_S= I_C/(%e^(V_BE/V_T));
+disp(bita,"The value of bita is : ")
+disp(alpha,"The value of alpha is : ")
+disp(I_B*10^6,"The value of I_B in µA is : ")
+disp(I_S,"The value of I_S in amp is : ")
+
+// Part(c)
+disp("Part (C)")
+V_BE= 580;// in mV
+V_BE=V_BE*10^-3;// in V
+I_E= 0.137;// in mA
+I_B= 7;// in µA
+I_E=I_E*10^-3;// in A
+I_B=I_B*10^-6;// in A
+// I_C= alpha*I_E = bita*I_B
+bita= I_E/I_B-1;
+alpha= bita/(1+bita);
+I_C= bita*I_B;// in A
+// I_C= I_S*%e^(V_BE/V_T)
+I_S= I_C/(%e^(V_BE/V_T));
+disp(bita,"The value of bita is : ")
+disp(alpha,"The value of alpha is : ")
+disp(I_C*10^3,"The value of I_C in mA is : ")
+disp(I_S,"The value of I_S in amp is : ")
+
+// Part(d)
+disp("Part (d)")
+V_BE= 780;// in mV
+V_BE=V_BE*10^-3;// in V
+I_C= 10.10;// in mA
+I_B= 120;// in µA
+I_C=I_C*10^-3;// in A
+I_B=I_B*10^-6;// in A
+bita= I_C/I_B;
+alpha= bita/(1+bita);
+I_E= I_C/alpha;// in A
+// I_C= I_S*%e^(V_BE/V_T)
+I_S= I_C/(%e^(V_BE/V_T));
+disp(bita,"The value of bita is : ")
+disp(alpha,"The value of alpha is : ")
+disp(I_E*10^3,"The value of I_E in mA is : ")
+disp(I_S,"The value of I_S in amp is : ")
+
+// Part(e)
+disp("Part (e)")
+V_BE= 820;// in mV
+V_BE=V_BE*10^-3;// in V
+I_E= 75;// in mA
+I_B= 1050;// in µA
+I_E=I_E*10^-3;// in A
+I_B=I_B*10^-6;// in A
+// I_C= alpha*I_E = bita*I_B
+bita= I_E/I_B-1;
+alpha= bita/(1+bita);
+I_C= bita*I_B;// in A
+// I_C= I_S*%e^(V_BE/V_T)
+I_S= I_C/(%e^(V_BE/V_T));
+disp(bita,"The value of bita is : ")
+disp(alpha,"The value of alpha is : ")
+disp(I_C*10^3,"The value of I_C in mA is : ")
+disp(I_S,"The value of I_S in amp is : ")
+
diff --git a/3515/CH3/EX3.4/Ex_3_4.sce b/3515/CH3/EX3.4/Ex_3_4.sce new file mode 100644 index 000000000..67898da65 --- /dev/null +++ b/3515/CH3/EX3.4/Ex_3_4.sce @@ -0,0 +1,22 @@ +// Exa 3.4
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC= 10;// in V
+V_CE= 5;// in V
+V_BE= 0.7;// in V
+I_C= 5*10^-3;// in mA
+bita= 100;
+R_C= (V_CC-V_CE)/I_C;// in Ω
+I_B= I_C/bita;// in A
+R_B= (V_CC-V_BE)/I_B;// in Ω
+disp(R_C*10^-3,"The value of R_C in kΩ is : ")
+disp(I_B*10^6,"The value of I_B in µA is : ")
+disp(R_B*10^-3,"The value of R_B in kΩ is : ")
+
+// Note: The value of base current in the book is wrong
+
+
+
diff --git a/3515/CH3/EX3.5/Ex_3_5.sce b/3515/CH3/EX3.5/Ex_3_5.sce new file mode 100644 index 000000000..9448bdbe7 --- /dev/null +++ b/3515/CH3/EX3.5/Ex_3_5.sce @@ -0,0 +1,30 @@ +// Exa 3.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC= 6;// in V
+bita= 100;
+R_C= 2;// in kΩ
+R_C= R_C*10^3;// in Ω
+R_B= 530;// in kΩ
+R_B= R_B*10^3;// in Ω
+// when I_C=0
+I_C=0;
+V_CE= V_CC-I_C*R_C;// in volt
+V_CE= 0:0.1:6;// in Volt
+I_C= (V_CC-V_CE)/R_C*1000;// in mA
+plot(V_CE,I_C);
+title("DC load line")
+xlabel("V_CE in volts")
+ylabel("I_C in mA")
+disp("DC load line shown in figure")
+// When V_CE= 0
+I_C= V_CC/R_C;//in A
+// Operating point for silicon transistor
+V_BE= 0.7;// in V
+I_B= (V_CC-V_BE)/R_B;//in A
+I_CQ= bita*I_B;// in A
+V_CEQ= V_CC-I_CQ*R_C;// in volt
+disp("Operating point is "+string(V_CEQ)+" V and "+string(I_CQ*10^3)+" mA")
diff --git a/3515/CH3/EX3.6/Ex_3_6.sce b/3515/CH3/EX3.6/Ex_3_6.sce new file mode 100644 index 000000000..4a0b97d56 --- /dev/null +++ b/3515/CH3/EX3.6/Ex_3_6.sce @@ -0,0 +1,25 @@ +// Exa 3.6
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC= 12;// in V
+V_BE= 0.7;// in V
+bita= 100;
+R_C= 10;// in kΩ
+R_C= R_C*10^3;// in Ω
+R_B= 100;// in kΩ
+R_B= R_B*10^3;// in Ω
+I_BQ= (V_CC-V_BE)/((1+bita)*R_C+R_B);// in A
+I_CQ= bita*I_BQ;// in A
+V_CEQ= V_CC-(I_CQ+I_BQ)*R_C;// in volt
+// For dc load line
+// When
+I_C=0;
+V_CE= V_CC-(I_C+I_BQ)*R_C;// in volt
+// When
+V_CE= 0;
+I_C= (V_CC-I_BQ*R_C)/R_C;//in A
+disp("Q- point values for circuit is "+string(V_CEQ)+" V and "+string(I_CQ*10^3)+" mA")
+
diff --git a/3515/CH3/EX3.7/Ex_3_7.sce b/3515/CH3/EX3.7/Ex_3_7.sce new file mode 100644 index 000000000..46bb6592e --- /dev/null +++ b/3515/CH3/EX3.7/Ex_3_7.sce @@ -0,0 +1,21 @@ +// Exa 3.7
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+V_CC= 15;// in V
+V_BE= 0.7;// in V
+V_CE= 5;// in V
+I_C= 5;// in mA
+I_C=I_C*10^-3;// in A
+bita= 100;
+I_B= I_C/bita;// in A
+disp(I_B*10^6,"Base current in µA is : ")
+//Apply KVL to collector circuit , V_CC= (I_C+I_B)*R_C+V_CE
+R_C= (V_CC-V_CE)/(I_C+I_B);// in Ω
+disp(R_C*10^-3,"The value of R_C in kΩ is : ")
+//Apply KVL to base or input circuit, V_CC= (I_C+I_B)*R_C+V_CE + I_B*R_B
+R_B= (V_CC-V_BE-(I_C+I_B)*R_C)/I_B;// in ohm
+disp(R_B*10^-3,"The value of R_B in kΩ is : ")
+
diff --git a/3515/CH3/EX3.8/Ex_3_8.sce b/3515/CH3/EX3.8/Ex_3_8.sce new file mode 100644 index 000000000..6c2f19dd5 --- /dev/null +++ b/3515/CH3/EX3.8/Ex_3_8.sce @@ -0,0 +1,15 @@ +// Exa 3.8
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_BE= 0.7;// in V
+V_CE= 3;// in V
+I_C= 1;// in mA
+I_C=I_C*10^-3;// in A
+bita= 100;
+I_B= I_C/bita;// in A
+// V_CE= V_BE+V_CB and V_CB= I_B*R_B
+R_B= (V_CE-V_BE)/I_B;// in Ω
+disp(R_B*10^-3,"The value of R_B in kΩ is : ")
diff --git a/3515/CH3/EX3.9/Ex_3_9.sce b/3515/CH3/EX3.9/Ex_3_9.sce new file mode 100644 index 000000000..0a48bd0ce --- /dev/null +++ b/3515/CH3/EX3.9/Ex_3_9.sce @@ -0,0 +1,35 @@ +// Exa 3.9
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 10;// in kΩ
+R1=R1*10^3;// in Ω
+R2= 5;// in kΩ
+R2=R2*10^3;// in Ω
+RC= 1;// in kΩ
+RC=RC*10^3;// in Ω
+RE= 2;// in kΩ
+RE=RE*10^3;// in Ω
+V_CC= 15;// in V
+V_BE= 0.7;// in V
+// When
+I_C=0;
+V_CE= V_CC-I_C*(RC+RE);// in V
+// When V_CE= 0
+I_C= V_CC/(RC+RE);// in A
+V_B= V_CC*R2/(R1+R2);// in V
+I_E= (V_B-V_BE)/RE;// in A
+I_C= I_E;// in A (approx)
+I_CQ= I_C;// in A
+V_CE= V_CC-I_C*(RC+RE);// in V
+V_CEQ= V_CE;// in V
+V_CE= 0:0.1:15;// in Volt
+I_C= (V_CC-V_CE)/(RC+RE)*1000;// in mA
+plot(V_CE,I_C);
+title("DC load line")
+xlabel("V_CE in volts")
+ylabel("I_C in mA")
+disp("DC load line shown in figure")
+disp("Operating point is "+string(V_CEQ)+" V and "+string(I_CQ*10^3)+" mA")
diff --git a/3515/CH4/EX4.1/Ex_4_1.sce b/3515/CH4/EX4.1/Ex_4_1.sce new file mode 100644 index 000000000..a0f0811f8 --- /dev/null +++ b/3515/CH4/EX4.1/Ex_4_1.sce @@ -0,0 +1,38 @@ +// Exa 4.1
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CC= 10;// in volt
+V_EE= -10;// in volt
+I= 1;// in mA
+I=I*10^-3;// in A
+R_C= 10;// in kohm
+R_C=R_C*10^3;// in kohm
+V_BE=0.7;// in volt
+
+i_C1= I/2;// in A
+i_C2= i_C1;// in A
+disp(i_C1*10^3,"Value of i_C1 in mA is : ")
+
+V_C1= V_CC-i_C1*R_C;// in V
+// For V_cm=0 volt
+V_E= -0.7;// in volt
+V_CE1= V_C1-V_E;// in volt
+disp(V_CE1,"For V_cm =0 , The alue of V_CE1 in volt is ")
+
+// For V_cm= -5 volt
+V_cm= -5;// in V
+V_B= V_cm;// in V
+// From V_BE= V_B-V_E
+V_E= V_B-V_BE;// in volt
+V_CE1= V_C1-V_E;// in volt
+disp(V_CE1,"For V_cm =-5V , The alue of V_CE1 in volt is ")
+
+// For V_cm= 5 volt
+V_cm= 5;// in V
+V_B= V_cm;// in V
+V_E= V_B-V_BE;// in volt
+V_CE1= V_C1-V_E;// in volt
+disp(V_CE1,"For V_cm =5V , The alue of V_CE1 in volt is ")
diff --git a/3515/CH4/EX4.10/Ex_4_10.sce b/3515/CH4/EX4.10/Ex_4_10.sce new file mode 100644 index 000000000..b22c0dfc0 --- /dev/null +++ b/3515/CH4/EX4.10/Ex_4_10.sce @@ -0,0 +1,33 @@ +// Exa 4.10
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+delta_RDbyRD= 2/100;
+delta_WLbyWL= 2/100;
+delta_Vt= 2;//in mV
+delta_Vt= delta_Vt*10^-3;// in V
+//(From Exa 4.4)
+V_A= 20;// in V
+R_D= 5;// in kΩ
+R_D= R_D*10^3;// in Ω
+I= 0.8;// in mA
+I=I*10^-3;// in A
+i_D= I/2;// in A
+unCox= 0.2;// mA/V^2
+unCox= unCox*10^-3;// in A/V^2
+WbyL= 100;
+// Formula i_D= 1/2*unCox*WbyL*V_OV^2
+V_OV= sqrt(2*i_D/(unCox*WbyL));// in V
+V_OS1= V_OV/2*delta_RDbyRD;// in V
+
+// V_OS due to W/L ratio
+V_OS2= V_OV/2*delta_WLbyWL;// in V
+
+// V_OS due to threshold voltage
+V_OS3= delta_Vt;// in V
+// Total offset voltage
+V_OS= sqrt(V_OS1^2+V_OS2^2+V_OS3^2);// in V
+V_OS= V_OS*10^3;// in mV
+disp(V_OS,"Total offset voltage in mV is : ")
diff --git a/3515/CH4/EX4.11/Ex_4_11.sce b/3515/CH4/EX4.11/Ex_4_11.sce new file mode 100644 index 000000000..fd3554937 --- /dev/null +++ b/3515/CH4/EX4.11/Ex_4_11.sce @@ -0,0 +1,36 @@ +// Exa 4.11
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+WLn= 100;
+WLp= 200;
+unCox= 0.2;// mA/V^2
+unCox=unCox*10^-3;//in A/V^2
+RSS= 25;// in kΩ
+RSS= RSS*10^3;// in Ω
+I=0.8;// in mA
+I=I*10^-3;//in A
+V_A= 20;// in V
+i_D= I/2;// in A
+// Formula i_D= 1/2*unCox*WLn*V_OV^2
+V_OV= sqrt(2*i_D/(unCox*WLn));// in V
+gm= I/V_OV;// in A/V
+disp(gm*10^3,"Value of Gm in mA/V is : ")
+ro2= V_A/(I/2);// in ohm
+ro4= ro2;// in ohm
+Ro= ro2*ro4/(ro2+ro4);// in ohm
+disp(Ro*10^-3,"Value of Ro in kΩ is : ")
+Ad= gm*Ro;// in V/V
+disp(Ad,"Value of Ad in V/V is :")
+// Finding the value of gm3
+upCox= 0.1;// mA/V^2
+upCox=upCox*10^-3;//in A/V^2
+// Formula i_D= 1/2*upCox*WLp*V_OV^2
+V_OV= sqrt(2*i_D/(upCox*WLp));// in V
+gm3= I/V_OV;// in A/V
+Acm= 1/(2*gm3*RSS);//in V/V
+disp(abs(Acm),"Value of |Acm| in V/V is : ")
+CMRRindB= 20*log10(abs(Ad)/abs(Acm));//in dB
+disp(round(CMRRindB),"CMRR in dB is :")
diff --git a/3515/CH4/EX4.12/Ex_4_12.sce b/3515/CH4/EX4.12/Ex_4_12.sce new file mode 100644 index 000000000..bf04d1d43 --- /dev/null +++ b/3515/CH4/EX4.12/Ex_4_12.sce @@ -0,0 +1,25 @@ +// Exa 4.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I=0.8;// in mA
+I=I*10^-3;//in A
+V_A= 100;// in V
+Bita=160;
+VT=25;// in mV
+VT= VT*10^-3;//in V
+gm= (I/2)/VT;// in A/V
+Gm= gm;// Short circuit trnsconductance in mA/V
+disp(Gm*10^3,"The value of Gm in mA/V")
+ro2= V_A/(I/2);// in ohm
+ro4= ro2;// in ohm
+Ro= ro2*ro4/(ro2+ro4);// in ohm
+disp(Ro*10^-3,"The value of Ro in kΩ is :")
+Ad= Gm*Ro;// in V/V
+disp(Ad,"Value of Ad in V/V is :")
+r_pi= Bita/gm;//in Ω
+Rid= 2*r_pi;// in Ω
+disp(Rid*10^-3,"The value of Rid in kΩ is :")
+
diff --git a/3515/CH4/EX4.13/Ex_4_13.sce b/3515/CH4/EX4.13/Ex_4_13.sce new file mode 100644 index 000000000..021a65536 --- /dev/null +++ b/3515/CH4/EX4.13/Ex_4_13.sce @@ -0,0 +1,37 @@ +// Exa 4.13
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+Vtp= -0.8;// in V
+KpWL= 3.5;// in mA/V^2
+I=0.7;// in mA
+I=I*10^-3;// in A
+R_D= 2;// in kΩ
+R_D=R_D*10^3;// in Ω
+KpWL=KpWL*10^-3;//in A/V^2
+v_G1= 0;// in V
+v_G2=v_G1;// in V
+VSS= 2.5;// in V
+VDD=VSS;// in V
+VCS= 0.5;// in V
+// Part (a)
+V_OV= -sqrt(I/KpWL);// in V
+disp(V_OV,"The value of V_OV in volts is : ")
+V_GS= V_OV+Vtp;// in V
+disp(V_GS,"The value of V_GS in volts is : ")
+V_G= 0;// as gate is connected ground
+v_S1= V_G-V_GS;// in V
+v_S2= v_S1;// in V
+disp(v_S1,"The value of V_S in volts is : ")
+v_D1= I/2*R_D-VDD;// in V
+v_D2=v_D1;// in V
+disp(v_D1,"The value of v_D1 in V is : ")
+disp(v_D2,"The value of v_D2 in V is : ")
+
+// Part (b)
+V_CMmin= I*R_D/2-VDD+Vtp;// in V
+V_CMmax= VSS-VCS+Vtp+V_OV;// in V
+disp(V_CMmin,"The value of V_CMmin in volt is : ")
+disp(V_CMmax,"The value of V_CMmax in volt is : ")
diff --git a/3515/CH4/EX4.14/Ex_4_14.sce b/3515/CH4/EX4.14/Ex_4_14.sce new file mode 100644 index 000000000..a35a06e95 --- /dev/null +++ b/3515/CH4/EX4.14/Ex_4_14.sce @@ -0,0 +1,19 @@ +// Exa 4.14
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_OV= 0.2;// in V
+gm=1;// in mA/V
+gm=gm*10^-3;// in A/V
+Vt=0.8;// in V
+unCox= 90;// in µA/V^2
+unCox=unCox*10^-6;// in A/V^2
+// gm= I/V_OV
+I= gm*V_OV;// in A
+disp(I*10^3,"Bias current in mA is : ")
+I_D= I/2;// in A
+// Formula I_D= 1/2*unCox*WLn*V_OV^2
+WbyL= 2*I_D/(unCox*V_OV^2);
+disp(WbyL,"W/L ratio is : ")
diff --git a/3515/CH4/EX4.15/Ex_4_15.sce b/3515/CH4/EX4.15/Ex_4_15.sce new file mode 100644 index 000000000..7e38d4ed3 --- /dev/null +++ b/3515/CH4/EX4.15/Ex_4_15.sce @@ -0,0 +1,23 @@ +// Exa 4.15
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+I=0.5;// in mA
+I=I*10^-3;// in A
+WbyL= 50;
+unCox= 250;// in µA/V^2
+unCox=unCox*10^-6;// in A/V^2
+V_A= 10;// in V
+R_D= 4;//in kΩ
+R_D= R_D*10^3;//in Ω
+V_OV= sqrt(I/(WbyL*unCox));//in V
+disp(V_OV,"The value of V_OV in V is : ")
+gm= I/V_OV;// in A/V
+disp(gm*10^3,"The value of gm in mA/V is ")
+I_D=I/2;// in A
+ro= V_A/I_D;// in Ω
+disp(ro*10^-3,"The value of ro in kΩ is : ")
+Ad= gm*(R_D*ro/(R_D+ro));// in V/V
+disp(Ad,"The value of Ad in V/V is : ")
diff --git a/3515/CH4/EX4.16/Ex_4_16.sce b/3515/CH4/EX4.16/Ex_4_16.sce new file mode 100644 index 000000000..d05e58d69 --- /dev/null +++ b/3515/CH4/EX4.16/Ex_4_16.sce @@ -0,0 +1,25 @@ +// Exa 4.16
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I=1;// in mA
+I=I*10^-3;// in A
+i_C=1;// in mA
+i_C=i_C*10^-3;// in A
+V_CC= 5;// in V
+V_CM= -2;// in V
+V_BE= 0.7;// in V
+R_C= 3;// in kΩ
+R_C= R_C*10^3;// in Ω
+Alpha=1;
+Bita=100;
+V_B= 1;// in V
+i_C1= Alpha*I;// in A
+i_C2=0;
+v_E= V_B-V_BE;// in V
+disp(v_E,"Emitters voltage in volts is : ")
+v_C1= V_CC-i_C1*R_C;// in V
+v_C2= V_CC-i_C2*R_C;// in V
+disp("Output voltage is "+string(v_C1)+" V and "+string(v_C2)+" V")
diff --git a/3515/CH4/EX4.2/Ex_4_2.sce b/3515/CH4/EX4.2/Ex_4_2.sce new file mode 100644 index 000000000..325d66bd0 --- /dev/null +++ b/3515/CH4/EX4.2/Ex_4_2.sce @@ -0,0 +1,66 @@ +// Exa 4.2
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_DD= 1.5;// in V
+V_SS= V_DD;// in V
+KnWL= 4;// in mA/V^2
+KnWL=KnWL*10^-3;// in A/V^2
+Vt= 0.5;// in V
+I=0.4;// in mA
+I=I*10^-3;//in A
+R_D= 2.5;// in kΩ
+R_D= R_D*10^3;// in Ω
+
+// Part (a)
+disp("Part (a)")
+V_OV= sqrt(I/KnWL);// in V
+V_GS= V_OV+Vt;// in V
+disp(V_OV,"Value of V_OV in volt is : ")
+disp(V_GS,"Value of V_GS in volt is : ")
+
+// Part (b)
+disp("Part (b)")
+V_CM= 0;// in volt
+V_S= -V_GS;// in volt
+disp(V_S,"Value of V_S in volt is :")
+I=0.4;// in mA
+i_D1= I/2;// in mA
+disp(i_D1,"Value of i_D1 in mA is :")
+i_D1=i_D1*10^-3;// in A
+V_D1= V_DD-i_D1*R_D;// in V
+V_D2=V_D1;// in V
+disp(V_D1,"Value of V_D1 in volt is ")
+disp(V_D2,"Value of V_D2 in volt is ")
+
+
+// Part (c)
+disp("Part (c)")
+V_CM=1;// in V
+V_GS= 0.82;// in V
+V_G= 1;// in V
+V_S= V_G-V_GS;// in V
+disp(V_S,"Value of V_S in volt is :")
+i_D1= I/2;// in mA
+disp(i_D1,"Value of i_D1 in mA is :")
+i_D1=i_D1*10^-3;// in A
+V_D1= V_DD-i_D1*R_D;// in V
+V_D2=V_D1;// in V
+disp(V_D1,"Value of V_D1 in volt is ")
+disp(V_D2,"Value of V_D2 in volt is ")
+
+// Part (d)
+disp("Part (d)")
+V_CM_max= Vt+V_DD-i_D1*R_D
+disp(V_CM_max,"Highest value of V_CM in volt is :")
+
+// Part (e)
+V_S= 0.4;// in V
+disp("Part (e)")
+V_CM_min= -V_SS+V_S+Vt+V_OV;// in V
+disp(V_CM_min,"Lowest value of V_CM in volt is")
+V_Smin= V_CM_min-V_GS;// in volt
+disp(V_Smin,"Lowest value of V_S in volt is")
+
diff --git a/3515/CH4/EX4.3/Ex_4_3.sce b/3515/CH4/EX4.3/Ex_4_3.sce new file mode 100644 index 000000000..6cc6305e7 --- /dev/null +++ b/3515/CH4/EX4.3/Ex_4_3.sce @@ -0,0 +1,22 @@ +// Exa 4.3
+format('v',7);
+clc;
+clear;
+close;
+format('v',5)
+// Given data
+I= 0.4;// in mA
+unCox= 0.2;// in mA/V^2
+i_D= I/2;// in mA
+V_OV1= 0.2;// in V
+V_OV2= 0.3;// in V
+V_OV3= 0.4;// in V
+WbyL1= 2*i_D/(unCox*V_OV1^2);
+gm1= I/V_OV1;// in mA/V
+WbyL2= 2*i_D/(unCox*V_OV2^2);
+gm2= I/V_OV2;// in mA/V
+WbyL3= 2*i_D/(unCox*V_OV3^2);
+gm3= I/V_OV3;// in mA/V
+disp("Vov (in V) "+string(V_OV1)+" "+string(V_OV2)+" "+string(V_OV3))
+disp("W/L "+string(WbyL1)+" "+string(WbyL2)+" "+string(WbyL3))
+disp("gm(in mA/V) "+string(gm1)+" "+string(gm2)+" "+string(gm3))
diff --git a/3515/CH4/EX4.4/Ex_4_4.sce b/3515/CH4/EX4.4/Ex_4_4.sce new file mode 100644 index 000000000..b15a1cd7c --- /dev/null +++ b/3515/CH4/EX4.4/Ex_4_4.sce @@ -0,0 +1,28 @@ +// Exa 4.4
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+format('v',11)
+V_A= 20;// in V
+R_D= 5;// in kΩ
+R_D= R_D*10^3;// in Ω
+I= 0.8;// in mA
+I=I*10^-3;// in A
+i_D= I/2;// in A
+unCox= 0.2;// mA/V^2
+unCox= unCox*10^-3;// in A/V^2
+WbyL= 100;
+// Formula i_D= 1/2*unCox*WbyL*V_OV^2
+V_OV= sqrt(2*i_D/(unCox*WbyL));// in V
+disp(V_OV,"The value of V_OV in volts is : ")
+gm= I/V_OV;// in A/V;
+disp(gm*10^3,"The value of gm in mA/V is : ")
+r_o= V_A/i_D;// in Ω
+disp(r_o*10^-3,"The value of r_o in kΩ is : ")
+// Ad= v_o/v_id = gm*(R_D || r_o)
+Ad= gm*(R_D*r_o/(R_D+r_o)) ;// in V/V
+disp(Ad,"Differential gain in V/V is : ")
+
+
diff --git a/3515/CH4/EX4.5/Ex_4_5.sce b/3515/CH4/EX4.5/Ex_4_5.sce new file mode 100644 index 000000000..66a7d231f --- /dev/null +++ b/3515/CH4/EX4.5/Ex_4_5.sce @@ -0,0 +1,56 @@ +// Exa 4.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R_D= 5;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_SS= 25;// in kΩ
+R_SS= R_SS*10^3;// in Ω
+I= 0.8;// in mA
+I=I*10^-3;// in A
+i_D= I/2;// in A
+unCox= 0.2;// mA/V^2
+unCox= unCox*10^-3;// in A/V^2
+WbyL= 100;
+// Formula i_D= 1/2*unCox*WbyL*V_OV^2
+V_OV= sqrt(2*i_D/(unCox*WbyL));// in V
+gm= i_D/V_OV;// in A/V;
+
+// Part (a)
+Ad= 1/2*gm*R_D;// in V/V
+disp(Ad,"Differential gain in V/V is : ")
+Acm= -R_D/(2*R_SS);// in V/V
+disp(Acm,"Common mode gain in V/V is ")
+CMRR= abs(Ad)/abs(Acm);
+CMRRindB= round(20*log10(CMRR));// in dB
+disp(CMRRindB,"Common mode rejection ratio in dB is : ")
+
+
+// Part (b)
+disp("Part (b) when output is taken differentially")
+Ad= gm*R_D;// in V/V
+disp(Ad,"Differential gain in V/V is : ")
+Acm= 0;
+disp(Acm,"Common mode gain in V/V is ")
+// CMRRindB= 20*log10(Ad/Acm) = infinite ;// in dB
+disp("Common mode rejection ratio in dB is : ")
+disp("infinite");
+
+// Part (c)
+disp("Part (c) when output is taken differentially but the drain resistance have a 1% mismatch.")
+Ad= gm*R_D;// in V/V
+disp(Ad,"Differential gain in V/V is : ")
+// delta_R_D= 1% of R_D
+delta_R_D= R_D*1/100;// in Ω
+Acm= R_D/(2*R_SS)*delta_R_D/R_D;// in V/V
+disp(Acm,"Common mode gain in V/V is ")
+CMRRindB= 20*log10(abs(Ad)/abs(Acm));// in dB
+disp(CMRRindB,"Common mode rejection ratio in dB is : ")
+
+// Note: In the book, there is putting wrong value of Ad (20 at place of 10) to evaluate the value of CMRR in dB in part(c) , So the answer of CMRR in dB of Part (c) is wrong
+
+
+
+
diff --git a/3515/CH4/EX4.6/Ex_4_6.sce b/3515/CH4/EX4.6/Ex_4_6.sce new file mode 100644 index 000000000..deb8412b9 --- /dev/null +++ b/3515/CH4/EX4.6/Ex_4_6.sce @@ -0,0 +1,26 @@ +// Exa 4.6
+format('v',7);
+clc;
+clear;
+close;
+// Given data (From Exa 4.4)
+R_D= 5;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_SS= 25;// in kΩ
+R_SS= R_SS*10^3;// in Ω
+I= 0.8;// in mA
+I=I*10^-3;// in A
+i_D= I/2;// in A
+unCox= 0.2;// mA/V^2
+unCox= unCox*10^-3;// in A/V^2
+WbyL= 100;
+// Formula i_D= 1/2*unCox*WbyL*V_OV^2
+V_OV= sqrt(2*i_D/(unCox*WbyL));// in V
+gm= i_D/V_OV;// in A/V;
+// gm mismatch have a negligible effect on Ad
+Ad= gm*R_D;// in V/V(approx)
+// delta_gm= 1% of gm
+delta_gm = gm*1/100;// in A/V
+Acm= R_D/(2*R_SS)*delta_gm/gm;
+CMRRindB= 20*log10(Ad/Acm);
+disp(CMRRindB,"CMRR in dB is : ")
diff --git a/3515/CH4/EX4.7/Ex_4_7.sce b/3515/CH4/EX4.7/Ex_4_7.sce new file mode 100644 index 000000000..9a7de15af --- /dev/null +++ b/3515/CH4/EX4.7/Ex_4_7.sce @@ -0,0 +1,19 @@ +// Exa 4.7
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_CM= 0;
+V_BE= -0.7;// in volt
+v_E= V_CM-V_BE;// in volt
+disp(v_E,"Value of v_E in volts is : ")
+
+I_E= (5-0.7)/10^3;// in A
+v_B1= 0.5;// in V
+v_B2= 0;// in V
+// Due to Q1 is off; therefore
+v_C1= -5;// in V
+v_C2= I_E*10^3-5;// in V
+disp(v_C1,"Value of v_C1 in volts is : ")
+disp(v_C2,"Value of v_C2 in volts is : ")
diff --git a/3515/CH4/EX4.8/Ex_4_8.sce b/3515/CH4/EX4.8/Ex_4_8.sce new file mode 100644 index 000000000..51645764b --- /dev/null +++ b/3515/CH4/EX4.8/Ex_4_8.sce @@ -0,0 +1,12 @@ +// Exa 4.8
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+iE1_by_I= 0.99; // as it is given that iE1= 0.99 *I
+VT= 0.025;// in volt
+// Formula iE1= I/(1+%e^(-vid/VT))
+// %e^(-vid/VT)= 1/iE1_by_I-1
+vid= log( 1/iE1_by_I-1)*(-VT);// in volt
+disp(round(vid*10^3),"Input differential signal in mVis : ")
diff --git a/3515/CH4/EX4.9/Ex_4_9.sce b/3515/CH4/EX4.9/Ex_4_9.sce new file mode 100644 index 000000000..48f180905 --- /dev/null +++ b/3515/CH4/EX4.9/Ex_4_9.sce @@ -0,0 +1,49 @@ +// Exa 4.9
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+Beta= 100;
+
+// Part (a)
+RE= 150;// in Ω
+VT= 25;// in mV
+VT= VT*10^-3;// in V
+IE= 0.5;// in mA
+IE=IE*10^-3;// in A
+re1= VT/IE;//in Ω
+R_id= 2*(Beta+1)*(re1+RE);// in Ω
+R_id= round(R_id*10^-3);// in kΩ
+disp(R_id,"The input differential resistance in kΩ is :")
+
+// Part (b)
+RC=10;//in kΩ
+RC=RC*10^3;//in Ω
+Rsig= 5+5;// in kΩ
+VoltageGain1= R_id/(Rsig+R_id);//voltage gain from the signal source to the base of Q1 and Q2 in V/V
+VoltageGain2= 2*RC/(2*(re1+RE));// voltage gain from the bases to the output in V/V
+Ad= VoltageGain1*VoltageGain2;//in V/V
+disp(Ad,"The overall differential voltage gain in V/V is ");
+
+// Part (c)
+format('e',9)
+delta_RC= 0.02*RC;
+R_EE= 200;//in kΩ
+R_EE=R_EE*10^3;//in Ω
+Acm= RC/(2*R_EE)*delta_RC/RC;//in V/V
+disp(Acm,"Common mode gain in V/V is :")
+
+// Part (d)
+format('v',4);
+CMRRindB= 20*log10(Ad/Acm);// in dB
+disp(CMRRindB,"CMRR in dB is : ")
+
+// Part (e)
+V_A= 100;// in V
+r_o= V_A/(IE);// in Ω
+// Ricm= (Beta+1)*(R_EE || r_o/2)
+Ricm= (Beta+1)*(R_EE*(r_o/2)/(R_EE+(r_o/2)));
+disp(Ricm*10^-6,"Input common mode resistance in MΩ is : ")
+
+
diff --git a/3515/CH5/EX5.1/Ex_5_1.sce b/3515/CH5/EX5.1/Ex_5_1.sce new file mode 100644 index 000000000..8bb18b1fd --- /dev/null +++ b/3515/CH5/EX5.1/Ex_5_1.sce @@ -0,0 +1,11 @@ +// Exa 5.1
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+A= 800;// unit less
+Af= 50;// unit less
+// Formula Af= A/(1+Bita*A)
+Bita= 1/Af-1/A;
+disp(Bita*100,"Percentage of output which is feedback to the input in % is ")
diff --git a/3515/CH5/EX5.10/Ex_5_10.sce b/3515/CH5/EX5.10/Ex_5_10.sce new file mode 100644 index 000000000..c2710724a --- /dev/null +++ b/3515/CH5/EX5.10/Ex_5_10.sce @@ -0,0 +1,31 @@ +// Exa 5.10
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+gm=50;
+R_E= 100;// in ohm
+R_S= 1;// in kohm
+R_S=R_S*10^3;// in ohm
+r_pi= 1100;// in ohm
+h_ie= r_pi;
+// Formula Av= Vo/Vs, But Vo= gm*vpi*R_E and Vs= Ib*(Ri+rpi), so
+Av= gm*R_E/(R_S+h_ie)
+// As Vo=Vf, so
+Bita=1;
+D= 1+Bita*Av;
+Avf= Av/D;
+Ri= R_S+r_pi;// in ohm
+Ri= Ri*10^-3;// in kohm
+R_if= Ri*D;// in kohm
+// Ro= infinite, so
+// Rof= infinite
+disp(Av,"Value of Av is : ")
+disp(Bita,"Value of Bita is : ")
+disp(D,"The value of D is : ")
+disp(Avf,"Value of Avf is : ")
+disp(Ri,"Value of Ri in kohm")
+disp(R_if,"Value of R_if in kohm is : ")
+disp("Value of Ro and Rof is : ")
+disp("infinite")
diff --git a/3515/CH5/EX5.11/Ex_5_11.sce b/3515/CH5/EX5.11/Ex_5_11.sce new file mode 100644 index 000000000..3ff58199d --- /dev/null +++ b/3515/CH5/EX5.11/Ex_5_11.sce @@ -0,0 +1,25 @@ +// Exa 5.11
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+gm=2;// in mA/V
+gm=gm*10^-3;// in A/V
+r_d= 40;// in kohm
+r_d= r_d*10^3;// in ohm
+Rs= 3;// in kohm
+Rs= Rs*10^3;// in ohm
+miu= gm*r_d;
+Bita=1;
+Av= miu*Rs/(r_d+Rs);
+D= 1+Bita*Av;
+Avf= Av/D;
+// Ri=infinite, so R_if = Ri*D = infinite
+Rof= r_d/D;// in ohm
+disp(Av,"Value of Av is : ")
+disp(D,"Value of D is ")
+disp(Avf,"Value of Avf is : ")
+disp("Value of R_if is ")
+disp("infinite")
+disp(Rof,"Value of Rof in ohm is : ")
diff --git a/3515/CH5/EX5.12/Ex_5_12.sce b/3515/CH5/EX5.12/Ex_5_12.sce new file mode 100644 index 000000000..87af61c7a --- /dev/null +++ b/3515/CH5/EX5.12/Ex_5_12.sce @@ -0,0 +1,33 @@ +// Exa 5.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+gm=75;// in A/V
+Rs= 1;// in kohm
+Rs= Rs*10^3;// in ohm
+R_E= 1;// in kohm
+R_E= R_E*10^3;// in ohm
+rpi= 1;// in kohm
+rpi= rpi*10^3;// in ohm
+hie=rpi;
+
+Io= -gm;
+Vi= Rs+R_E+rpi;
+Gm= Io/Vi;
+disp(Gm,"Value of Gm is : ")
+Bita=-R_E;
+disp(Bita,"Value of Bita is : ")
+D= 1+Bita*Gm;
+disp(D,"Value of D is : ")
+Gmf= Gm/D;
+disp(Gmf,"Value of Gmf is : ")
+Ri= Rs+R_E+hie;// in ohm
+Rif= Ri*D;// in ohm
+Rif=Rif*10^-3;// in kohm
+disp(Rif,"Value of Rif in kohm is : ")
+// Ro=infinite, so R_of = Ro*D = infinite
+disp("Value of R_of is ")
+disp("infinite")
+
diff --git a/3515/CH5/EX5.19/Ex_5_19.sce b/3515/CH5/EX5.19/Ex_5_19.sce new file mode 100644 index 000000000..51bf4c083 --- /dev/null +++ b/3515/CH5/EX5.19/Ex_5_19.sce @@ -0,0 +1,18 @@ +// Exa 5.19
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+A= 10^5;
+Af= 100;
+// Formula Af= A/(1+A*Bita)
+Bita= 1/Af-1/A;
+
+//when A= 10^3
+A=10^3;
+Af_desh= A/(1+A*Bita);
+
+delta_Af= Af_desh-Af;
+Perc_Change_inAf= delta_Af/Af*100;// in %
+disp(Perc_Change_inAf,"Percentage change in Af is : ")
diff --git a/3515/CH5/EX5.2/Ex_5_2.sce b/3515/CH5/EX5.2/Ex_5_2.sce new file mode 100644 index 000000000..241d99ff9 --- /dev/null +++ b/3515/CH5/EX5.2/Ex_5_2.sce @@ -0,0 +1,18 @@ +// Exa 5.2
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Af= 100;// unit less
+Vi= 50;// in mV
+Vi= Vi*10^-3;// in V
+Vs= 0.5;// in V
+// Formula Af= Vo/Vs
+Vo= Af*Vs;// in V
+A= Vo/Vi;
+disp(A,"Value of A is : ")
+// Formula Af= A/(1+B*A)
+B= 1/Af-1/A;
+B=B*100;// in %
+disp(B,"Value of B is in percent : ")
diff --git a/3515/CH5/EX5.20/Ex_5_20.sce b/3515/CH5/EX5.20/Ex_5_20.sce new file mode 100644 index 000000000..3cd2c2b73 --- /dev/null +++ b/3515/CH5/EX5.20/Ex_5_20.sce @@ -0,0 +1,23 @@ +// Exa 5.20
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+A= 100;
+Vs=1;// in volt
+Bita=1;// as in the voltage follower, the output voltage is same as input
+Af= A/(1+Bita*A);
+CLG= 1+A*Bita;// closed loop gain
+disp(CLG,"Closed loop gain is : ")
+CLG_dB= 20*log10(CLG);
+disp(CLG_dB,"Closed loop gain in dB is : ")
+Vo= Af*Vs;// in V
+disp(Vo,"Value of Vo in volt is : ")
+Vi= Vs-Vo;// in V
+disp(round(Vi*10^3),"Value of Vi in mV is : ")
+// If A decrease 10%,i.e.
+A=90;
+Af_desh= A/(1+Bita*A);
+Per_gain_reduction= (Af_desh-Af)/Af*100;// in %
+disp(Per_gain_reduction,"Percentage of gain reduction in %")
diff --git a/3515/CH5/EX5.21/Ex_5_21.sce b/3515/CH5/EX5.21/Ex_5_21.sce new file mode 100644 index 000000000..5f1684c5e --- /dev/null +++ b/3515/CH5/EX5.21/Ex_5_21.sce @@ -0,0 +1,23 @@ +// Exa 5.21
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+// Part (a)
+PerError= 1;// in %
+A= 10^5;// (Assumed value)
+ABita= 1/PerError*100;
+Bita= 1/(PerError*A);
+disp("% error A Aß 1+Aß")
+disp(string(PerError)+" "+string(A)+" "+string(ABita)+" "+string(1+ABita))
+// Part (b)
+PerError= 5;// in %
+ABita= 1/PerError*100;
+Bita= 1/(PerError*A);
+disp(string(PerError)+" "+string(A)+" "+string(ABita)+" "+string(1+ABita))
+// Part (c)
+PerError= 50;// in %
+ABita= 1/PerError*100;
+Bita= 1/(PerError*A);
+disp(string(PerError)+" "+string(A)+" "+string(ABita)+" "+string(1+ABita))
diff --git a/3515/CH5/EX5.22/Ex_5_22.sce b/3515/CH5/EX5.22/Ex_5_22.sce new file mode 100644 index 000000000..8b84ae57a --- /dev/null +++ b/3515/CH5/EX5.22/Ex_5_22.sce @@ -0,0 +1,18 @@ +// Exa 5.22
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+S= -20;// sensitivity of closed to open loop gain in dB
+// sensitivity of closed to open loop gain = 1/(1+AB) = S
+// or (1+AB) = -S
+AB= 10^(-S/20) - 1;
+disp(AB,"The loop gain AB for which the sensitivity of closed loop gain to open loop gain is -20 dB, is : ")
+
+// Part (b) when
+S= 1/2;// sensitivity of closed to open loop gain in dB
+//S= 1/(1+AB)
+AB= 1/S-1;
+disp(AB,"The loop gain AB for which the sensitivity of closed loop gain to open loop gain is 1/2 ,is : ")
+
diff --git a/3515/CH5/EX5.23/Ex_5_23.sce b/3515/CH5/EX5.23/Ex_5_23.sce new file mode 100644 index 000000000..9a9847309 --- /dev/null +++ b/3515/CH5/EX5.23/Ex_5_23.sce @@ -0,0 +1,33 @@ +// Exa 5.23
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+A=10^5;
+Af= 10^3;
+// Af= A/(1+A*Bita)
+Bita= 1/Af-1/A;
+GDF= 1+A*Bita;// gain densitivity factor
+disp(GDF,"Gain densitivity factor is : ")
+// Part (a) when A drops 10 %
+A_desh= A-A*10/100;
+Af_desh= A_desh/(1+A_desh*Bita);
+CorresPer= (Af-Af_desh)/Af*100;// corresponding percentage in %
+disp(CorresPer,"When A drops by 10 % then corresponding percentage is ")
+// Part (b) when A drops 30 %
+A_desh= A-A*30/100;
+Af_desh= A_desh/(1+A_desh*Bita);
+CorresPer= (Af-Af_desh)/Af*100;// corresponding percentage in %
+disp(CorresPer,"When A drops by 30 % then corresponding percentage is ")
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3515/CH5/EX5.24/Ex_5_24.sce b/3515/CH5/EX5.24/Ex_5_24.sce new file mode 100644 index 000000000..b6702bb9b --- /dev/null +++ b/3515/CH5/EX5.24/Ex_5_24.sce @@ -0,0 +1,18 @@ +// Exa 5.24
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+A=100;
+Af= 10;
+f_L= 100;// in Hz
+f_H= 10;// in kHz
+// Af= A/(1+A*Bita)
+Bita= 1/Af-1/A;
+f_desh_L= f_L/(1+A*Bita);// in Hz
+f_desh_H= f_H/(1+A*Bita);// in kHz
+disp(f_desh_L,"Low frequency in Hz is : ")
+disp(f_desh_H,"High frequency in kHz is : ")
+
+// Note: In the book Calculation to find the value of high frequency i.e. f_desh_H is wrong so the answer in the book is wrong
diff --git a/3515/CH5/EX5.25/Ex_5_25.sce b/3515/CH5/EX5.25/Ex_5_25.sce new file mode 100644 index 000000000..591f1d47c --- /dev/null +++ b/3515/CH5/EX5.25/Ex_5_25.sce @@ -0,0 +1,17 @@ +// Exa 5.25
+format('v',7);clc;
+clear;
+close;
+// Given data
+Vs= 100;// in mV
+Vf= 95;// in mV
+Vs= Vs*10^-3;// in V
+Vf= Vf*10^-3;// in V
+Vo=10;// in V
+Vi= Vs-Vf;// in V
+Av= Vo/Vi;// in V/V
+disp(Av,"Value of A in V/V is : ")
+Bita= Vf/Vo;// in V/V
+disp(Bita,"Value of Bita in V/V is : ")
+
+// Note: In the book Calculation to find the value of Bita is wrong so the asnwer in the book is wrong
diff --git a/3515/CH5/EX5.26/Ex_5_26.sce b/3515/CH5/EX5.26/Ex_5_26.sce new file mode 100644 index 000000000..156ee1183 --- /dev/null +++ b/3515/CH5/EX5.26/Ex_5_26.sce @@ -0,0 +1,18 @@ +// Exa 5.26
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Is= 100;// in µA
+Is= Is*10^-6;// in A
+If= 95;// in µA
+If= If*10^-6;// in A
+Io= 10;// in mA
+Io= Io*10^-3;// in A
+A= Io/(Is-If);// n A/A
+Bita= If/Io;// A/A
+disp(A,"Value of A in A/A is : ")
+disp(Bita,"Value of Bita in A/A is : ")
+
+// Note: In the book , to evaluating the value of Bita, they putted wrong value of If (95 at place of 90)
diff --git a/3515/CH5/EX5.28/Ex_5_28.sce b/3515/CH5/EX5.28/Ex_5_28.sce new file mode 100644 index 000000000..ecfd716b9 --- /dev/null +++ b/3515/CH5/EX5.28/Ex_5_28.sce @@ -0,0 +1,22 @@ +// Exa 5.28
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+A=2000;//V/V
+Bita= 0.1;// inV/V
+Ri= 1;// in kohm
+Ri= Ri*10^3;// in ohm
+Ro= 1;// in kohm
+Ro= Ro*10^3;// in ohm
+Af= A/(1+A*Bita);
+disp(Af,"The gain Af in volt is : ")
+Rif= Ri*(1+A*Bita);// in ohm
+disp(Rif*10^-3,"The input resistance in kohm is : ")
+Rof= Ro/(1+A*Bita);// in ohm
+disp(Rof*10^-3,"The output resistance in kohm is : ")
+
+
+// Note: In the book, to finding the value of Af, Rif and Rof there is missprinting to putting the value of Bita but value of Af and Rif is correct because to calculating Af and Rif , the value of Bita is taken .1 (not .01)
+// but to evaluating the value of Rof calculation is also wrong so the answer in the book is wrong
diff --git a/3515/CH5/EX5.29/Ex_5_29.sce b/3515/CH5/EX5.29/Ex_5_29.sce new file mode 100644 index 000000000..f02b7d373 --- /dev/null +++ b/3515/CH5/EX5.29/Ex_5_29.sce @@ -0,0 +1,22 @@ +// Exa 5.29
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+
+// Part (b)
+Af= 10;
+A= 10^4;
+// Af= A/(1+A*Bita);
+Bita= 1/Af-1/A;
+// Bita= R1/(R1+R2)
+R2_by_R1= 1/Bita-1;
+disp(R2_by_R1,"Value of R2/R1 is : ")
+
+// Part (c)
+Vs= 1;// in V
+Vo= (1+R2_by_R1)*Vs;
+disp(Vo,"Value of Vo in volt is : ")
+Vf= Vo/(1+R2_by_R1)
+disp(Vf,"Value of Vf in volt is : ")
diff --git a/3515/CH5/EX5.3/Ex_5_3.sce b/3515/CH5/EX5.3/Ex_5_3.sce new file mode 100644 index 000000000..f08740257 --- /dev/null +++ b/3515/CH5/EX5.3/Ex_5_3.sce @@ -0,0 +1,15 @@ +// Exa 5.3
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+Bita= 5/100;
+f_H= 50;// in kHz
+f_H= f_H*10^3;// in Hz
+f_L= 50;// in kHz
+Amid= 1000;
+f_LF= f_L/(1+Bita*Amid);// in Hz
+f_HF= f_H*(1+Bita*Amid);// in Hz
+disp(f_LF,"Value of f_LF in Hz is : ")
+disp(f_HF*10^-6,"Value of f_LF in MHz is : ")
diff --git a/3515/CH5/EX5.4/Ex_5_4.sce b/3515/CH5/EX5.4/Ex_5_4.sce new file mode 100644 index 000000000..7733b24cf --- /dev/null +++ b/3515/CH5/EX5.4/Ex_5_4.sce @@ -0,0 +1,14 @@ +// Exa 5.4
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+dAf_by_Af= 0.2/100;
+dA_by_A= 150/2000;
+A=2000;
+// Formula dAf_by_Af = 1/(1+Bita*A) * dA_by_A
+Bita= dA_by_A/(A*dAf_by_Af )-1/A;
+Af= A/(1+Bita*A);
+disp(Bita*100,"Value of Bita in percent is ")
+disp(Af,"Value of Af is : ")
diff --git a/3515/CH5/EX5.5/Ex_5_5.sce b/3515/CH5/EX5.5/Ex_5_5.sce new file mode 100644 index 000000000..f4cf0d3d0 --- /dev/null +++ b/3515/CH5/EX5.5/Ex_5_5.sce @@ -0,0 +1,11 @@ +// Exa 5.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Av= 140;
+Avf= 17.5;
+// Formula Avf= Av/(1+Av*Bita)
+Bita= 1/Avf-1/Av;
+disp(Bita,"Fraction of the output is ")
diff --git a/3515/CH5/EX5.6/Ex_5_6.sce b/3515/CH5/EX5.6/Ex_5_6.sce new file mode 100644 index 000000000..85c409173 --- /dev/null +++ b/3515/CH5/EX5.6/Ex_5_6.sce @@ -0,0 +1,17 @@ +// Exa 5.6
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Av= 100;
+Avf= 50;
+// Formula Avf= Av/(1+Av*Bita)
+Bita= 1/Avf-1/Av;
+disp(Bita,"The vlaue of bita is ")
+
+// Part(ii)
+Avf= 75;
+// Formula Avf= Av/(1+Av*Bita)
+Av= Avf/(1-Bita*Avf)
+disp(Av,"Value of amplifier gain is : ")
diff --git a/3515/CH5/EX5.7/Ex_5_7.sce b/3515/CH5/EX5.7/Ex_5_7.sce new file mode 100644 index 000000000..7aa131784 --- /dev/null +++ b/3515/CH5/EX5.7/Ex_5_7.sce @@ -0,0 +1,23 @@ +// Exa 5.7
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+Av= 50;
+Avf= 25;
+// Formula Avf= Av/(1+Av*Bita)
+Bita= 1/Avf-1/Av;
+// Part(i)
+Av=50;
+Avf= 40;
+Perc_reduction= (Av-Avf)/Av*100;// Percentage of reduction in stage gain in %
+disp(Perc_reduction,"Without feedback, percentage of reduction in stage gain in % is : ")
+
+// Part(ii)
+Av= 40;
+Avf= 25;
+gain_with_neg_feed= Av/(1+Bita*Av);
+Perc_reduction= (Avf-gain_with_neg_feed)/Avf*100;// in %
+disp(Perc_reduction,"With feedback, percentage reduction in stage gain in % is : ")
+
diff --git a/3515/CH5/EX5.8/Ex_5_8.sce b/3515/CH5/EX5.8/Ex_5_8.sce new file mode 100644 index 000000000..cb42fb13b --- /dev/null +++ b/3515/CH5/EX5.8/Ex_5_8.sce @@ -0,0 +1,16 @@ +// Exa 5.8
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Ao= 10^4;
+Afo= 50;
+omega_H= 2*%pi*100;// in rad/s
+// Formula Afo= Ao/(1+Ao*Bita)
+Bita= 1/Afo-1/Ao;
+omega_f_H= omega_H*(1+Ao*Bita);
+disp("Closed loop bandwidth in rad/s is : ")
+disp(string(omega_f_H)+" or 2*%pi*20*10^3");
+disp("So the bandwidth increase form 100 Hz to 20 kHz on the gain decreases form 104 to 50")
+
diff --git a/3515/CH6/EX6.1/Ex_6_1.sce b/3515/CH6/EX6.1/Ex_6_1.sce new file mode 100644 index 000000000..4d7ae872e --- /dev/null +++ b/3515/CH6/EX6.1/Ex_6_1.sce @@ -0,0 +1,12 @@ +// Exa 6.1
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Vf= 0.0125;// in volt
+Vo= 0.5;// in volt
+Bita= Vf/Vo;
+// For oscillator A*Bita= 1
+A= 1/Bita;
+disp("Amplifier Should have a minimum gain of "+string(A)+" to provide oscillation")
diff --git a/3515/CH6/EX6.10/Ex_6_10.sce b/3515/CH6/EX6.10/Ex_6_10.sce new file mode 100644 index 000000000..c3fbb4381 --- /dev/null +++ b/3515/CH6/EX6.10/Ex_6_10.sce @@ -0,0 +1,14 @@ +// Exa 6.10
+format('v',8);
+clc;
+clear;
+close;
+// Given data
+R1= 220;// in kohm
+R1=R1*10^3;// in ohm
+R2=R1;// in ohm
+C1= 250;// in pF
+C1= C1*10^-12;// in F
+C2=C1;// in F
+f= 1/(2*%pi*R1*C1);
+disp(f,"Frequency of oscilltions in Hz is : ")
diff --git a/3515/CH6/EX6.11/Ex_6_11.sce b/3515/CH6/EX6.11/Ex_6_11.sce new file mode 100644 index 000000000..34c88775a --- /dev/null +++ b/3515/CH6/EX6.11/Ex_6_11.sce @@ -0,0 +1,17 @@ +// Exa 6.11
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R= 10;// in kohm
+R=R*10^3;// in ohm
+f=1000;
+fie= 60;// in °
+// The impedence of given circuit , Z= R+j*1/(omega*C)
+// the phase shift, tan(fie)= imaginary part/ Real part
+// tand(fie) = 1/(omega*R*C)
+C= 1/(2*%pi*R*tand(fie));
+disp(C*10^12,"The value of C in pF is : ")
+
+// Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong
diff --git a/3515/CH6/EX6.12/Ex_6_12.sce b/3515/CH6/EX6.12/Ex_6_12.sce new file mode 100644 index 000000000..f24a80c2d --- /dev/null +++ b/3515/CH6/EX6.12/Ex_6_12.sce @@ -0,0 +1,21 @@ +// Exa 6.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+L= 50;// in µH
+L= L*10^-6;// in H
+C1= 300;// in pF
+C1= C1*10^-12;// in F
+C2= 100;// in pF
+C2= C2*10^-12;// in F
+C_eq= C1*C2/(C1+C2);// in F
+f= 1/(2*%pi*sqrt(L*C_eq));// in Hz
+disp(f*10^-6,"Frequency of oscillations in MHz is : ")
+Bita= C2/C1;
+// (iii)
+// A*Bita >=1, so A*Bita= 1 (for sustained oscillations)
+Amin= 1/Bita;
+disp(Amin,"Minimum gain to substain oscillations is : ")
+
diff --git a/3515/CH6/EX6.14/Ex_6_14.sce b/3515/CH6/EX6.14/Ex_6_14.sce new file mode 100644 index 000000000..6ce27709d --- /dev/null +++ b/3515/CH6/EX6.14/Ex_6_14.sce @@ -0,0 +1,21 @@ +// Exa 6.14
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+L1= 2;// in mH
+L1= L1*10^-3;// in H
+L2= 1.5;// in mH
+L2= L2*10^-3;// in H
+// Formula f= 1/(2*%pi*sqrt((L1+L2)*C)
+// For f= 1000 kHz, C will be maximum
+f=1000;// in kHz
+f=f*10^3;// in Hz
+Cmax= 1/((2*%pi*f)^2*(L1+L2));// in F
+// For f= 2000 kHz, C will be maximum
+f=2000;// in kHz
+f=f*10^3;// in Hz
+Cmin= 1/((2*%pi*f)^2*(L1+L2));// in F
+disp(Cmin*10^12,"Minimum Capacitance in pF is : ")
+disp(Cmax*10^12,"Maximum Capacitance in pF is : ")
diff --git a/3515/CH6/EX6.2/Ex_6_2.sce b/3515/CH6/EX6.2/Ex_6_2.sce new file mode 100644 index 000000000..a6d80e17f --- /dev/null +++ b/3515/CH6/EX6.2/Ex_6_2.sce @@ -0,0 +1,16 @@ +// Exa 6.2
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+R1= 50;// in kohm
+R1=R1*10^3;// in ohm
+R2=R1;// in ohm
+R3=R2;// in ohm
+C1= 60;// in pF
+C1= C1*10^-12;// in F
+C2=C1;// in F
+C3=C2;// in F
+f= 1/(2*%pi*R1*C1*sqrt(6));
+disp(f*10^-3,"Frequency of oscilltions in kHz is : ")
diff --git a/3515/CH6/EX6.3/Ex_6_3.sce b/3515/CH6/EX6.3/Ex_6_3.sce new file mode 100644 index 000000000..38e5ab2bc --- /dev/null +++ b/3515/CH6/EX6.3/Ex_6_3.sce @@ -0,0 +1,21 @@ +// Exa 6.3
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+f=2;// in kHz
+f=f*10^3;// in Hz
+// Let
+R= 10;// in kohm (As R should be greater than 1 kohm)
+R=R*10^3;// in ohm
+// Formula f= 1/(2*%pi*R*C)
+C= 1/(2*%pi*f*R);// in F
+C= C*10^9;// in nF
+// For Bita to be 1/3, Choose
+R4= R;// in ohm
+R3= 2*R4;// in ohm
+disp(C,"Value of C in nF is : ")
+disp(R3*10^-3,"Value of R3 in kohm is : ")
+disp(R4*10^-3,"Value of R4 in kohm is : ")
+
diff --git a/3515/CH6/EX6.4/Ex_6_4.sce b/3515/CH6/EX6.4/Ex_6_4.sce new file mode 100644 index 000000000..e1506d3f5 --- /dev/null +++ b/3515/CH6/EX6.4/Ex_6_4.sce @@ -0,0 +1,16 @@ +// Exa 6.4
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R1= 200;// in kohm
+R1=R1*10^3;// in ohm
+R2=R1;// in ohm
+C1= 200;// in pF
+C1= C1*10^-12;// in F
+C2=C1;// in F
+f= 1/(2*%pi*R1*C1);// in Hz
+disp(f*10^-3,"Frequency of oscilltions in kHz is : ")
+
+// Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong
diff --git a/3515/CH6/EX6.5/Ex_6_5.sce b/3515/CH6/EX6.5/Ex_6_5.sce new file mode 100644 index 000000000..53e04af83 --- /dev/null +++ b/3515/CH6/EX6.5/Ex_6_5.sce @@ -0,0 +1,24 @@ +// Exa 6.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+L= 100;// in µH
+L= L*10^-6;// in H
+C1= .001;// in µF
+C1= C1*10^-6;// in F
+C2= .01;// in µF
+C2= C2*10^-6;// in F
+C= C1*C2/(C1+C2);// in F
+// (i)
+f= 1/(2*%pi*sqrt(L*C));// in Hz
+disp(round(f*10^-3),"Operating frequency in kHz is : ")
+// (ii)
+Bita= C1/C2;
+disp(Bita,"Feedback fraction is : ")
+// (iii)
+// A*Bita >=1, so Amin*Bita= 1
+Amin= 1/Bita;
+disp(Amin,"Minimum gain to substain oscillations is : ")
+
diff --git a/3515/CH6/EX6.6/Ex_6_6.sce b/3515/CH6/EX6.6/Ex_6_6.sce new file mode 100644 index 000000000..48f35971a --- /dev/null +++ b/3515/CH6/EX6.6/Ex_6_6.sce @@ -0,0 +1,15 @@ +// Exa 6.6
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+L= 15;// in µH
+L= L*10^-6;// in H
+C1= .004;// in µF
+C1= C1*10^-6;// in F
+C2= .04;// in µF
+C2= C2*10^-6;// in F
+C= C1*C2/(C1+C2);// in F
+f= 1/(2*%pi*sqrt(L*C));// in Hz
+disp(f*10^-3,"Frequency of oscillations in kHz is : ")
diff --git a/3515/CH6/EX6.7/Ex_6_7.sce b/3515/CH6/EX6.7/Ex_6_7.sce new file mode 100644 index 000000000..f279d67e2 --- /dev/null +++ b/3515/CH6/EX6.7/Ex_6_7.sce @@ -0,0 +1,13 @@ +// Exa 6.7
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+L= 0.01;// in H
+C= 10;// in pF
+C= C*10^-12;// in F
+f= 1/(2*%pi*sqrt(L*C));// in Hz
+disp(f*10^-3,"Frequency of oscillations in kHz is : ")
+
+// Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong
diff --git a/3515/CH6/EX6.8/Ex_6_8.sce b/3515/CH6/EX6.8/Ex_6_8.sce new file mode 100644 index 000000000..cd685f6e5 --- /dev/null +++ b/3515/CH6/EX6.8/Ex_6_8.sce @@ -0,0 +1,21 @@ +// Exa 6.8
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+L= 0.8;// in H
+
+C= .08;// in pF
+C= C*10^-12;// in F
+C_M= 1.9;// in pF
+C_M= C_M*10^-12;// in F
+C_T= C*C_M/(C+C_M);// in F
+R=5;// in kohm
+f_s= 1/(2*%pi*sqrt(L*C));// in Hz
+disp(f_s*10^-3,"Series resonant frequency in kHz is : ")
+// (ii)
+f_p= 1/(2*%pi*sqrt(L*C_T));// in Hz
+disp(f_p*10^-3,"parallel resonant frequency in kHz is : ")
+
+// Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong
|