summaryrefslogtreecommitdiff
path: root/2459/CH15/EX15.4/Ex15_4.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /2459/CH15/EX15.4/Ex15_4.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '2459/CH15/EX15.4/Ex15_4.sce')
-rw-r--r--2459/CH15/EX15.4/Ex15_4.sce34
1 files changed, 34 insertions, 0 deletions
diff --git a/2459/CH15/EX15.4/Ex15_4.sce b/2459/CH15/EX15.4/Ex15_4.sce
new file mode 100644
index 000000000..6e10ac45f
--- /dev/null
+++ b/2459/CH15/EX15.4/Ex15_4.sce
@@ -0,0 +1,34 @@
+//chapter15
+//example15.4
+//page325
+
+Vcc=20 // V
+Vbe=0.7 // V
+Rb=1d3 // ohm
+Rc=20 // ohm
+gain=25
+
+Ib=(Vcc-Vbe)/Rb
+Ic=Ib*gain
+Vce=Vcc-Ic*Rc
+
+ib_peak=10d-3
+ic_peak=gain*ib_peak
+Po_ac=ic_peak^2*Rc/2
+P_dc=Vcc*Ic
+eta=(Po_ac/P_dc)*100
+
+printf("operating point = %.3f V and %.3f mA \n",Vce,Ic*1000)
+printf("output power = %.3f W \n",Po_ac)
+printf("input power = %.3f W \n",P_dc)
+printf("collector efficiency = %.3f percent \n",eta)
+
+// when Ic=0, Vce=Vcc i.e. Vce=8 and when Vce=0, Ic=Vcc/Rc i.e. Ic=20/20
+// so equation of load line becomes Ic=-50*Vce+1000
+
+// plot the load line
+clf()
+x=linspace(0,20,5)
+y=-50*x+1000
+plot2d(x,y,style=3,rect=[0,0,25,1100])
+xtitle("dc load line","Vce(volts)","Ic(mA)")