summaryrefslogtreecommitdiff
path: root/68/CH1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /68/CH1
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 '68/CH1')
-rwxr-xr-x68/CH1/EX1.1/ex1.sce25
-rwxr-xr-x68/CH1/EX1.2/ex2.sce13
-rwxr-xr-x68/CH1/EX1.3/ex3.sce17
-rwxr-xr-x68/CH1/EX1.4/ex4.sce20
-rwxr-xr-x68/CH1/EX1.5/ex5.sce17
-rwxr-xr-x68/CH1/EX1.6/ex6.sce12
6 files changed, 104 insertions, 0 deletions
diff --git a/68/CH1/EX1.1/ex1.sce b/68/CH1/EX1.1/ex1.sce
new file mode 100755
index 000000000..8d243ee34
--- /dev/null
+++ b/68/CH1/EX1.1/ex1.sce
@@ -0,0 +1,25 @@
+// Example1.1: Amplifier gain, power and eficiency
+// Amplifier operates at +10-V/-10-V power supply.
+A_v=9/1; // sinusoidal voltage input of 1V peak and sinusoidal output voltage of 9V peak
+I_o=9/1000; // 1 kilo ohms load
+disp(A_v,"Voltage gain (V/V) =")
+disp(20*log10(A_v),"Voltage gain (dB) =")
+I_i=0.0001 // sinusoidal current input of 0.1mA peak
+A_i=I_o/I_i;
+disp(A_i,"Current gain (A/A) =")
+disp(20*log10(A_i),"Current gain (dB) =")
+V_orms = 9/sqrt(2);
+I_orms = 9/sqrt(2);
+P_L=V_orms*I_orms; // output power in mW
+V_irms=1/sqrt(2);
+I_irms=0.1/sqrt(2);
+P_I=V_irms*I_irms; // input power in mW
+A_p=P_L/P_I;
+disp(A_p,"Power gain (W/W) =")
+disp(10*log10(A_p),"Power gain (dB) =")
+P_dc=10*9.5+10*9.5; // amplifier draws a current of 9.5mA from each of its two power supplies
+disp(P_dc,"Power drawn from the dc supplies (mW) =")
+P_dissipated=P_dc+P_I-P_L;
+disp(P_dissipated,"Power dissipated in the amplifier (mW)")
+n=P_L/P_dc*100;
+disp(n,"Amplifier efficiency in percentage") \ No newline at end of file
diff --git a/68/CH1/EX1.2/ex2.sce b/68/CH1/EX1.2/ex2.sce
new file mode 100755
index 000000000..87f07b3c6
--- /dev/null
+++ b/68/CH1/EX1.2/ex2.sce
@@ -0,0 +1,13 @@
+// Example 1.2: Gain of transistor amplifier
+// Amplifier has transfer characteristics v_O=10-(10^-11)*(exp^40*v_1) applies for v_1 is greater than or equal 0V and v_o is greater than or equal to 0.3V
+L_l = 0.3; // limit L_-
+disp(L_l,"The limit L_- (V) =")
+v_I=1/40*log((10-0.3)/10^-11); // from the transfer characteristics and v_o=0.3V
+disp(v_I,"v_I in volts =")
+L_u=10-10^-11; // obtained by v_I=0 in transfer characteristics
+disp(L_u,"the limit L_+ (V) =")
+V_I=1/40*log((10-5)/10^-11); // V_O=5V
+disp(V_I,"The value of the dc bias voltage that results in V_O=5V (V)=")
+A_v=-10^-11*exp(40*V_I)*40; // A_v=dv_O/dv_I
+disp(A_v,"Gain at the operating point (V/V) =")
+disp("NOTE the gain is negative that implies the amplifier is an inverting amplifier")
diff --git a/68/CH1/EX1.3/ex3.sce b/68/CH1/EX1.3/ex3.sce
new file mode 100755
index 000000000..d4cd1d46a
--- /dev/null
+++ b/68/CH1/EX1.3/ex3.sce
@@ -0,0 +1,17 @@
+// Example 1.3 : Overall voltage gain of cthree-stage amplifier
+gainloss_in=10^6/(1*10^6+100*10^3); // fraction of input signal is obtained using voltage divider rule , gainloss_in= v_i1/v_s
+A_v1=10*100000/(100000+1000); // A_v1 = v_i2/v_i1 is the voltage gain at first stage
+A_v2=100*10000/(10000+1000); // A_v2 = v_i3/v_i2 is the voltage gain at second stage
+A_v3=100/(100+10); // A_v3 = v_L/v_i3 is the voltage gain at the output stage
+A_v=A_v1*A_v2*A_v3; // A_v is the total voltage gain
+disp(A_v,"The overall voltage gain (V/V) =")
+disp(20*log10(A_v),"The overall voltage gain (dB) =")
+gain_src_ld=A_v*gainloss_in;
+disp(gain_src_ld,"The voltage gain from source to gain (V/V) =")
+disp(20*log10(gain_src_ld),"The voltage gain from source to load (dB) =")
+A_i=10^4*A_v; // A_i=i_o/i_i=(v_L/100)/(v_i1/10^6)
+disp(A_i,"The current gain (A/A)=")
+disp(20*log10(A_i),"The current gain (dB) =")
+A_p=818*818*10^4; // A_p=P_L/P_I=v_L*i_o/v_i1*i_i
+disp(A_p,"The power gain (W/W) =")
+disp(10*log10(A_p),"The power gain (dB) =") \ No newline at end of file
diff --git a/68/CH1/EX1.4/ex4.sce b/68/CH1/EX1.4/ex4.sce
new file mode 100755
index 000000000..af74e925d
--- /dev/null
+++ b/68/CH1/EX1.4/ex4.sce
@@ -0,0 +1,20 @@
+// Example1.4 : Bipolar junction transistor
+
+// 1,4a
+// using voltage divider rule the fraction of input signal v_be=v_s*r_pi/(r_pi+R_s)
+// output voltage v_o=-g_mv_be(R_L||r_o)
+r_pi=2.5*10^3; // (ohm)
+R_s=5*10^3; // (ohm)
+R_L=5*10^3 // (ohm)
+g_m=40*10^-3; // (mho)
+r_o=100*10^3; // (ohm)
+gain=-(r_pi*g_m*(R_L*r_o/(R_L+r_o)))/(r_pi+R_s); // gain=v_o/v_s
+disp(gain,"The voltage gain (V/V) =")
+gain_negl_r_o=-r_pi*g_m*R_L/(r_pi+R_s);
+disp(gain_negl_r_o,"Gain neglecting the effect of r_o (V/V) =")
+
+// 1.4b
+// Bi_b=g_m*v_be
+// B is short circuit gain
+B=g_m*r_pi;
+disp(B,"The short circuit gain (A/A) =") \ No newline at end of file
diff --git a/68/CH1/EX1.5/ex5.sce b/68/CH1/EX1.5/ex5.sce
new file mode 100755
index 000000000..81db740be
--- /dev/null
+++ b/68/CH1/EX1.5/ex5.sce
@@ -0,0 +1,17 @@
+// Example 1.5 : DC gain, 3dB frequency and frequency at which gain=0 of voltage amplifier
+
+// 1.5b
+R_s =20*10^3; // (ohm)
+R_i =100*10^3; // (ohm)
+C_i =60*10^-12; // (ohm)
+u = 144; // (V/V)
+R_o = 200; // (ohm)
+R_L = 1000; // (ohm)
+K=u/((1+R_s/R_i)*(1+R_o/R_L));
+disp(K,"The dc gain (V/V)= ")
+disp(20*log10(K)," The dc gain (dB) =")
+w_o=1/(C_i*R_s*R_i/(R_s+R_i));
+disp(w_o,"The 3-dB frequency (rad/s) =")
+f_o= w_o/2/%pi;
+disp(f_o,"Frequency (Hz) =")
+disp(100*w_o,"unity gain frequency (rad/s)=",100*f_o,"Unity gain frequency (Hz)") \ No newline at end of file
diff --git a/68/CH1/EX1.6/ex6.sce b/68/CH1/EX1.6/ex6.sce
new file mode 100755
index 000000000..5531487b0
--- /dev/null
+++ b/68/CH1/EX1.6/ex6.sce
@@ -0,0 +1,12 @@
+// Example 1.6: Time for the output to reach (V_OH+V_OL)/2
+V_DD=5; // (V)
+R=1000; // (ohm)
+R_on=100; // (ohm)
+V_offset=0.1; // (V)
+C=10*10^-12; // (F)
+V_OH=5; // (V)
+V_OL=V_offset+(V_DD-V_offset)*R_on/(R+R_on);
+T=R*C;
+v_o_t_PLH=(V_OH+V_OL)/2; //to find t_PLH
+t_PLH=0.69*T;// t_PLH is low to high propogtion delay
+disp(t_PLH,"time required for he output to reach (V_OH+V_OL)/2 (seconds) =") \ No newline at end of file