summaryrefslogtreecommitdiff
path: root/2492/CH2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2492/CH2
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2492/CH2')
-rwxr-xr-x2492/CH2/EX2.1/ex2_1.sce31
-rwxr-xr-x2492/CH2/EX2.2/ex2_2.sce26
-rwxr-xr-x2492/CH2/EX2.3/ex2_3.sce25
-rwxr-xr-x2492/CH2/EX2.4/ex2_4.sce20
-rwxr-xr-x2492/CH2/EX2.5/ex2_5.sce23
-rwxr-xr-x2492/CH2/EX2.6/ex2_6.sce20
-rwxr-xr-x2492/CH2/EX2.7/ex2_7.sce26
-rwxr-xr-x2492/CH2/EX2.8/ex2_8.sce22
8 files changed, 193 insertions, 0 deletions
diff --git a/2492/CH2/EX2.1/ex2_1.sce b/2492/CH2/EX2.1/ex2_1.sce
new file mode 100755
index 000000000..45774bc43
--- /dev/null
+++ b/2492/CH2/EX2.1/ex2_1.sce
@@ -0,0 +1,31 @@
+// Exa 2.1
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+n_i = 1.5 * 10^10;// in /cc
+p = n_i;// in /cc
+n = n_i;// in /cc
+miu_n = 1400;// in cm^2/V-s
+miu_p = 450;//in cm^2/V-s
+q = 1.6 * 10^-19;// in C
+E = 20;// in V/cm
+a= 5;// cross section area of Si bar in cm^2
+sigma_n = n*q*miu_n;// in mho/cm
+sigma_p = n*q*miu_p;// in mho/cm
+// Electron current density
+Jn = sigma_n*E;// in A
+Jn= Jn*10^6;// in µA/cm^2
+disp(Jn,"Electron current density in µA/cm^2 is");
+// The hole current density
+Jp = sigma_p*E;// in A/cm^2
+Jp= Jp*10^6;// in µA/cm^2
+disp(Jp,"The hole current density in µA/cm^2 is");
+//The total current in the bar
+total = (Jn+Jp)*a;// µA/cm^2
+disp(total,"The total current in the bar in µA/cm^2 is");
+format('e',8)
+// The resistivity of the bar
+rho = 1/(n_i*q*(miu_p+miu_n)*10^2);// in ohm-cm
+disp(rho,"The resistivity of the bar in ohm-cm is");
diff --git a/2492/CH2/EX2.2/ex2_2.sce b/2492/CH2/EX2.2/ex2_2.sce
new file mode 100755
index 000000000..849b9adbc
--- /dev/null
+++ b/2492/CH2/EX2.2/ex2_2.sce
@@ -0,0 +1,26 @@
+// Exa 2.2
+format('v',5)
+clc;
+clear;
+close;
+// Given data
+V_F = 20;// in V
+Vin = V_F;// in V
+V_BE = 0.7;// in V
+R1 = 500;//resistance in ohm
+R2 = 10;// resistance in ohm
+// Peak current though the diode
+Ifpeak = (V_F-V_BE)/(R1+R2);// in A
+Ifpeak = Ifpeak * 10^3;// in mA
+disp(Ifpeak,"The peak current through the diode in mA is");
+R_L = 500;// in ohm
+// Peak output voltage
+Vpeakout = Ifpeak*10^-3*R_L;// in V
+disp(Vpeakout,"The peak out voltage in V is");
+// For ideal diode
+Ifpeak = V_F/R_L;// in A
+Ifpeak = Ifpeak * 10^3;// in mA
+// The peak output voltage for ideal diode
+Vpeakout= Ifpeak*10^-3*R_L;// in V
+disp(Ifpeak,"The peak current for ideal diode in mA is");
+disp(Vpeakout,"The peak output voltage for ideal diode in V is");
diff --git a/2492/CH2/EX2.3/ex2_3.sce b/2492/CH2/EX2.3/ex2_3.sce
new file mode 100755
index 000000000..66b3e9ed7
--- /dev/null
+++ b/2492/CH2/EX2.3/ex2_3.sce
@@ -0,0 +1,25 @@
+// Exa 2.3
+format('v',6)
+clc;
+clear;
+close;
+// Given data
+t = 27;// in °C
+t= t+273;// in °K
+q= 1.6*10^-19;// electron charge in C
+v = 200*10^-3;// in V
+kt_by_q= 0.026;// in V
+Io= 3*10^-7;// in A
+// For large reverse bias I= Io*(%e^(q*v/(k*t)))
+I= Io*(%e^(v/kt_by_q)-1);// in A
+I= round(I*10^6);// in µA
+disp(I,"The current flowing through the diode in µA is");
+Idaso = Io*2^7;// in A
+// r_ac = dv/di = 1/( Io*(1/kTdividedq)*(%e^(v/(kTdividedq))) );
+r_ac = 1/( Io*(1/kt_by_q)*(%e^(v/(kt_by_q))) );
+disp(r_ac,"The ac resistance in ohm is : ");
+kt_by_q = 0.032;// in V
+I1 = Idaso * ((%e^(v/(kt_by_q))) - 1);// in A
+I1 = I1 * 10^3;// in mA
+delI = I1-(I*10^-3);// in mA
+disp(delI,"The increase in forward current in mA is");
diff --git a/2492/CH2/EX2.4/ex2_4.sce b/2492/CH2/EX2.4/ex2_4.sce
new file mode 100755
index 000000000..792a9e905
--- /dev/null
+++ b/2492/CH2/EX2.4/ex2_4.sce
@@ -0,0 +1,20 @@
+// Exa 2.4
+format('e',9)
+clc;
+clear;
+close;
+// Given data
+V = 30;//applied forward voltage in V
+R_L = 3;//load resistance in k ohm
+R_L = R_L * 10^3;// in ohm
+Imax = V/R_L;// maximum diode current in A
+Imax = Imax * 10^3;// in mA
+slope = -1/R_L;// in mho
+plot([V,0],[0,Imax]);
+xlabel("V_F in volts");
+ylabel("I_F in mA");
+title("DC load line");
+disp("DC load line shown in figure")
+disp(slope,"The slope of the line in mho is");
+
+// Note: There is calculation error to find the value of slope because -1/3kΩ = -3.33*10^-4 mho, not = -3.33*10^-3 mho
diff --git a/2492/CH2/EX2.5/ex2_5.sce b/2492/CH2/EX2.5/ex2_5.sce
new file mode 100755
index 000000000..db2bb8eb6
--- /dev/null
+++ b/2492/CH2/EX2.5/ex2_5.sce
@@ -0,0 +1,23 @@
+// Exa 2.5
+format('v',6)
+clc;
+clear;
+close;
+// Given data
+Vp= '[4+0.2*sin(omega*t)]';// in V
+Ip= '[4+0.3*sin(omega*t)]';// in mA
+//The instantaneous power dissipated, P= Vp*Ip = [4+0.2*sind(wt)]*[4+0.3*sind(wt)]
+// and putting, sin^2(omega*t)= 1/2-1/2*cos(2*omega*t)
+P= '[16.03+2*sin(omega*t)-0.03*cos(2*omega*t)]*10^-3';// in W
+disp(P,"The instantaneous power dissipated in the diode in W is : ")
+// Pmax occurs when omega*t=90, so
+omega_t= 90;// in °
+Pmax= [16.03+2*sind(omega_t)-0.03*cosd(2*omega_t)]*10^-3;// in W
+disp(Pmax,"The maximum value of instantaneous power dissipated in W is : ")
+// Pmin occurs when omega*t=-90, so
+omega_t= -90;// in °
+Pmin= [16.03+2*sind(omega_t)-0.03*cosd(2*omega_t)]*10^-3;// in W
+disp(Pmin,"The minimum value of instantaneous power dissipated in W is : ");
+// The average power dissipated
+Pav=(Pmax+Pmin)/2;// in W
+disp(Pav,"The average power dissipated in the diode in W is : ")
diff --git a/2492/CH2/EX2.6/ex2_6.sce b/2492/CH2/EX2.6/ex2_6.sce
new file mode 100755
index 000000000..549de380c
--- /dev/null
+++ b/2492/CH2/EX2.6/ex2_6.sce
@@ -0,0 +1,20 @@
+// Exa 2.6
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+R_L = 50;// in ohm
+V = 10;// in V
+R = 5;// in ohm
+V_D = (V*R)/(R_L+R);// in V
+R_D = (R_L*R)/(R_L+R);// in ohm
+I_D = V_D/R_D;// in A
+I_D = I_D * 10^3;// in mA
+plot([V_D,0],[0,I_D])
+xlabel("V_D in volts");
+ylabel("I_D in mA");
+title("DC load line");
+disp("DC load line shown in figure")
+slope = -1/R_D;
+disp(slope,"The slope of the dc load line is : ");
diff --git a/2492/CH2/EX2.7/ex2_7.sce b/2492/CH2/EX2.7/ex2_7.sce
new file mode 100755
index 000000000..aba6b1ea5
--- /dev/null
+++ b/2492/CH2/EX2.7/ex2_7.sce
@@ -0,0 +1,26 @@
+// Exa 2.7
+format('e',8)
+clc;
+clear;
+close;
+// Given data
+V_T= 26*10^-3;// in V
+T = 300;// in K
+V = 0.25;// in V
+I= 10 * 10^-3;// in A
+// I = I_S*( (%e^(V/(n*kTdividedq)))-1 ) = I_S*( (%e^(V/V_T))-1 );
+I_S= I/(%e^(V/V_T)-1);// in A
+disp(I_S,"The reverse saturate current in amp. is : ")
+format('v',6)
+// For 1 mA current
+I = 1;// in mA
+I = I*10^-3;// in A
+V = (1/38.46)*log(I/I_S);// in V
+disp(V,"The bias voltage needed for 1 mA in V is");
+// For 100 mA current
+I = 100;// in mA
+I = I * 10^-3;// in A
+V = (1/38.46)*log(I/I_S);// in V
+disp(V,"The bias voltage needed for 100 mA in V is");
+
+// Note: Answer in the book is not accurate.
diff --git a/2492/CH2/EX2.8/ex2_8.sce b/2492/CH2/EX2.8/ex2_8.sce
new file mode 100755
index 000000000..e6eabc950
--- /dev/null
+++ b/2492/CH2/EX2.8/ex2_8.sce
@@ -0,0 +1,22 @@
+// Exa 2.8
+format('v',6)
+clc;
+clear;
+close;
+// Given data
+V_T= 25*10^-3;// in V
+// I = Io*( (%e^(V/V_T))-1 );
+I = 1;// in mA
+I = I * 10^-3;// in A
+V = 0.15;// in V
+Io = I/( (%e^((1/V_T)*V))-1 );// in A
+Io = Io * 10^6;// in µA
+disp(Io,"The reverse saturation current at room temperature in µA is");
+// Io doubles for every 10°C-rise in temperature. Thus at 40°C
+Io_new= 4*Io;//new value of reverse saturation current in µA
+disp(Io_new,"The reverse saturation current at 40 °C in µA is");
+I = 100;// in mA
+I = I * 10^-3;// in A
+// I = Io*( (%e^((1/V_T)*V))-1 );
+V = (1/40)*log( I/(Io*10^-6) );// in V
+disp(V,"The forward bias voltage in V is");