From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 887/CH13/EX13.1/13_1.sce | 7 +++++++ 887/CH13/EX13.2/13_2.sce | 21 +++++++++++++++++++++ 887/CH13/EX13.4/13_4.sce | 37 +++++++++++++++++++++++++++++++++++++ 887/CH13/EX13.5/13_5.sce | 37 +++++++++++++++++++++++++++++++++++++ 887/CH13/EX13.6/13_6.sce | 27 +++++++++++++++++++++++++++ 887/CH13/EX13.7/13_7.sce | 31 +++++++++++++++++++++++++++++++ 887/CH13/EX13.8/13_8.sce | 42 ++++++++++++++++++++++++++++++++++++++++++ 887/CH13/EX13.9/13_9.sce | 33 +++++++++++++++++++++++++++++++++ 8 files changed, 235 insertions(+) create mode 100755 887/CH13/EX13.1/13_1.sce create mode 100755 887/CH13/EX13.2/13_2.sce create mode 100755 887/CH13/EX13.4/13_4.sce create mode 100755 887/CH13/EX13.5/13_5.sce create mode 100755 887/CH13/EX13.6/13_6.sce create mode 100755 887/CH13/EX13.7/13_7.sce create mode 100755 887/CH13/EX13.8/13_8.sce create mode 100755 887/CH13/EX13.9/13_9.sce (limited to '887/CH13') diff --git a/887/CH13/EX13.1/13_1.sce b/887/CH13/EX13.1/13_1.sce new file mode 100755 index 000000000..cb6718e6c --- /dev/null +++ b/887/CH13/EX13.1/13_1.sce @@ -0,0 +1,7 @@ +clc +//ex13.1 +V_CE=4; //It should be high enough so that collector base junction is reverse-biased +i_B=30*10^-6; //base current, a value is selected from the graph +i_C=3*10^-3; //collector current corresponding to values of i_B and V_CE +B=i_C/i_B; //beta value +disp(B,'The value of beta B is') diff --git a/887/CH13/EX13.2/13_2.sce b/887/CH13/EX13.2/13_2.sce new file mode 100755 index 000000000..f223d9280 --- /dev/null +++ b/887/CH13/EX13.2/13_2.sce @@ -0,0 +1,21 @@ +clc +//ex13.2 +V_CC=10; +V_BB=1.6; +R_B=40*10^3; +R_C=2*10^3; +V_in_Q=0; //Q point +V_in_max=0.4; +V_in_min=-0.4; +//the following values are found from the intersection of input loadlines with the input characteristic +i_B_Q=25*10^-3; //for V_in_Q +i_B_max=35*10^-3; //for V_in_max +i_B_min=15*10^-3; //for V_in_min +//the following values are found from the intersection of output loadlines with the output characteristic +V_CE_Q=5; //corresponding to i_B_Q +V_CE_max=7; //corresponding to i_B_min +V_CE_min=3; //corresponding to i_B_max +disp('graphs cannot be shown but the required values are') +disp(V_CE_max,'maximum value of V_CE') +disp(V_CE_min,'minimum value of V_CE') +disp(V_CE_Q,'Q-point value of V_CE') diff --git a/887/CH13/EX13.4/13_4.sce b/887/CH13/EX13.4/13_4.sce new file mode 100755 index 000000000..d937e7a60 --- /dev/null +++ b/887/CH13/EX13.4/13_4.sce @@ -0,0 +1,37 @@ +clc +//ex13.4 +V_CC=15; +B=100; //beta value +R_B=200*10^3; +R_C=1*10^3; +//we proceed in such a way that the required values will be displayed according to the satisfied condition of the below three cases + +//a)cut-off region +V_BE=15; //no voltage drop across R_B in cut-off state +V_CE=15; //no voltage drop across R_C in cut-off state +i_C=0; //no collector current flows as there is no voltage drop +i_B=0; //no base current flows as there is no voltage drop +if(V_BE<0.5) then, //cut-off condition + disp(i_C,'collector current in amperes') + disp(V_CE,'collector to emitter voltage in volts') + end + +//b)saturation region +V_BE=0.7; //base to emitter voltage in saturation state +V_CE=0.2; //collector to emitter voltage in saturation state +i_C=(V_CC-V_CE)/R_C; //collector current +i_B=(V_CC-V_BE)/R_B; //base current +if((B*i_B>i_C)&(i_B>0)) then, //saturation state conditions + disp(i_C,'collector current in amperes') + disp(V_CE,'collector to emitter voltage in volts') + end + +//c)active region +V_BE=0.7; //base to emitter voltage in active state +i_B=(V_CC-V_BE)/R_B; //base current +i_C=B*i_B; //collector current in active state +V_CE=V_CC-i_C*R_C; //collector to emitter voltage +if((V_CE>0.2)&(i_B>0)) then, //active state conditions + disp(i_C,'collector current in amperes') + disp(V_CE,'collector to emitter voltage in volts') + end diff --git a/887/CH13/EX13.5/13_5.sce b/887/CH13/EX13.5/13_5.sce new file mode 100755 index 000000000..e70cbf697 --- /dev/null +++ b/887/CH13/EX13.5/13_5.sce @@ -0,0 +1,37 @@ +clc +//ex13.5 +R_B=200*10^3; +R_C=1*10^3; +V_CC=15; +B=300; //beta value +//we proceed in such a way that the required values will be displayed according to the satisfied condition of the below three cases + +//a)active region +V_BE=0.7; //base to emitter voltage in active state +i_B=(V_CC-V_BE)/R_B; //base current +i_C=B*i_B; //collector current in active state +V_CE=V_CC-i_C*R_C; //collector to emitter voltage +if((V_CE>0.2)&(i_B>0)) then, //active state conditions + disp(i_C,'collector current in amperes') + disp(V_CE,'collector to emitter voltage in volts') + end + +//b)saturation region +V_BE=0.7; //base to emitter voltage in saturation state +V_CE=0.2; //collector to emitter voltage in saturation state +i_C=(V_CC-V_CE)/R_C; //collector current +i_B=(V_CC-V_BE)/R_B; //base current +if((B*i_B>i_C)&(i_B>0)) then, //saturation state conditions + disp(i_C,'collector current in amperes') + disp(V_CE,'collector to emitter voltage in volts') + end + +//c)cut-off region +V_BE=15; //no voltage drop across R_B in cut-off state +V_CE=15; //no voltage drop across R_C in cut-off state +i_C=0; //no collector current flows as there is no voltage drop +i_B=0; //no base current flows as there is no voltage drop +if(V_BE<0.5) then, //cut-off condition + disp(i_C,'collector current in amperes') + disp(V_CE,'collector to emitter voltage in volts') + end diff --git a/887/CH13/EX13.6/13_6.sce b/887/CH13/EX13.6/13_6.sce new file mode 100755 index 000000000..a7699d7d9 --- /dev/null +++ b/887/CH13/EX13.6/13_6.sce @@ -0,0 +1,27 @@ +clc +//ex13.6 +V_CC=15; +V_BB=5; +V_BE=0.7; //assuming the device is in the active state +R_C=2*10^3; +R_E=2*10^3; +i_E=(V_BB-V_BE)/R_E; //emitter current +printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook") + +//a)B=100 +disp('For beta B=100:') +B=100; //beta value +i_B=i_E/(B+1); //base current +i_C=B*i_B; //collector current +V_CE=V_CC-i_C*R_C-i_E*R_E; //collector to emitter voltage +disp(i_C,'collector current in amperes') +disp(V_CE,'collector to emitter voltage in volts') + +//b)B=300 +disp('For beta B=300:') +B=300; //beta value +i_B=i_E/(B+1); //base current +i_C=B*i_B; //collector current +V_CE=V_CC-i_C*R_C-i_E*R_E; //collector to emitter voltage +disp(i_C,'collector current in amperes') +disp(V_CE,'collector to emitter voltage in volts') diff --git a/887/CH13/EX13.7/13_7.sce b/887/CH13/EX13.7/13_7.sce new file mode 100755 index 000000000..0c2afde08 --- /dev/null +++ b/887/CH13/EX13.7/13_7.sce @@ -0,0 +1,31 @@ +clc +//ex13.7 +V_CC=15; +R_1=10*10^3; +R_2=5*10^3; +R_C=1*10^3; +R_E=1*10^3; +V_BE=0.7; +R_B=1/((1/R_1)+(1/R_2)); //thevenin resistance +V_B=V_CC*R_2/(R_1+R_2); //thevenin voltage +printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook") + +//a)B=100 +disp('For beta B=100:') +B=100; //beta value +i_B=(V_B-V_BE)/(R_B+(B+1)*R_E); //base current +i_C=B*i_B; //collector current +i_E=i_B+i_C; //emitter current +V_CE=V_CC-i_C*R_C-i_E*R_E; //collector to emitter voltage +disp(i_C,'collector current in amperes') +disp(V_CE,'collector to emitter voltage in volts') + +//b)B=300 +disp('For beta B=300:') +B=300; //beta value +i_B=(V_B-V_BE)/(R_B+(B+1)*R_E); //base current +i_C=B*i_B; //collector current +i_E=i_B+i_C; //emitter current +V_CE=V_CC-i_C*R_C-i_E*R_E; //collector to emitter voltage +disp(i_C,'collector current in amperes') +disp(V_CE,'collector to emitter voltage in volts') diff --git a/887/CH13/EX13.8/13_8.sce b/887/CH13/EX13.8/13_8.sce new file mode 100755 index 000000000..e22ab2fb6 --- /dev/null +++ b/887/CH13/EX13.8/13_8.sce @@ -0,0 +1,42 @@ +clc +//ex13.8 +V_CC=15; +V_BE=0.7; +B=100; //beta value +R_1=10*10^3; +R_2=5*10^3; +R_L_1=2*10^3; //R_L is taken as R_L_1 +R_C=1*10^3; +R_E=1*10^3; +V_T=26*10^-3; //thermal voltage +//from the analysis of the previous example we have the the values of i_C_Q and V_CE +i_C_Q=4.12*10^-3; +V_CE=6.72; +r_pi=(B*V_T)/i_C_Q; +R_B=1/((1/R_1)+(1/R_2)); //thevenin resistance +R_L_2=1/((1/R_L_1)+(1/R_C)); //R_L' is taken as R_L_2 +A_v=-(R_L_2*B)/r_pi; //voltage gain +A_voc=-(R_C*B)/r_pi; //open circuit voltage gain +Z_in=1/((1/R_B)+(1/r_pi)); //input impedance +A_i=(A_v*Z_in)/R_L_1; //current gain +G=A_i*A_v; //power gain +Z_o=R_C //output impedance +//assume f=1hz +f=1; +t=0:0.0005:3; +V_in=0.001*sin(2*%pi*f*t); +V_o=-(V_in*R_L_2*B)/r_pi; +subplot(121) +xtitle('Input voltage vs time','time','input voltage') +plot(t,V_in) +subplot(122) +xtitle('output voltage vs time','time','output voltage') +plot(t,V_o) +//In the graph, notice the phase inversion between input and output voltages +printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook") +disp(A_v,'voltage gain') +disp(A_voc,'open circuit voltage gain') +disp(Z_in,'input impedance in ohms') +disp(A_i,'current gain') +disp(G,'power gain') +disp(Z_o,'output impedance in ohms') diff --git a/887/CH13/EX13.9/13_9.sce b/887/CH13/EX13.9/13_9.sce new file mode 100755 index 000000000..66f035ff6 --- /dev/null +++ b/887/CH13/EX13.9/13_9.sce @@ -0,0 +1,33 @@ +clc +//ex_13.9 +V_CC=20; +V_BE_Q=0.7; +V_T=26*10^-3; //thermal voltage +B=200; //beta value +R_S_1=10*10^3; //R_S is taken as R_S_1 +R_1=100*10^3; +R_2=100*10^3; +R_L_1=1*10^3; //R_L is taken as R_L_1 +R_E=2*10^3; +V_B=V_CC*R_2/(R_1+R_2); //thevenin voltage +R_B=1/((1/R_1)+(1/R_2)); //thevenin resistance +R_L_2=1/((1/R_L_1)+(1/R_E)); //R_L' is taken as R_L_2 +i_B_Q=(V_B-V_BE_Q)/(R_B+R_E*(1+B)) +i_C_Q=B*i_B_Q; +i_E_Q=i_B_Q+i_C_Q; +V_CE_Q=V_CC-i_E_Q*R_E; +//we can verify that the device is in active region as we get V_CE>0.2 and i_BQ>0 +r_pi=B*V_T/i_C_Q; +A_v=(1+B)*R_L_2/(r_pi+(1+B)*R_L_2); //voltage gain +Z_it=r_pi+(1+B)*R_L_2; //input impedance of base of transistor +Z_i=1/((1/R_B)+(1/Z_it)); //input impedance of emitter-follower +R_S_2=1/((1/R_S_1)+(1/R_1)+(1/R_2)); //R_S' is taken as R_S_2 +Z_o=1/(((1+B)/(R_S_2+r_pi))+(1/R_E)); //output impedance +A_i=A_v*Z_i/R_L_1; //current gain +G=A_v*A_i; //power gain +printf(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook") +disp(A_v,'voltage gain') +disp(Z_i,'input impedance in ohms') +disp(A_i,'current gain') +disp(G,'power gain') +disp(Z_o,'output impedance in ohms') -- cgit