summaryrefslogtreecommitdiff
path: root/3809/CH7
diff options
context:
space:
mode:
Diffstat (limited to '3809/CH7')
-rw-r--r--3809/CH7/EX7.1/EX7_1.sce18
-rw-r--r--3809/CH7/EX7.2/EX7_2.sce20
-rw-r--r--3809/CH7/EX7.3/EX7_3.sce26
3 files changed, 64 insertions, 0 deletions
diff --git a/3809/CH7/EX7.1/EX7_1.sce b/3809/CH7/EX7.1/EX7_1.sce
new file mode 100644
index 000000000..a79df19fb
--- /dev/null
+++ b/3809/CH7/EX7.1/EX7_1.sce
@@ -0,0 +1,18 @@
+//Chapter 7, Example 7.1
+
+clc
+//Initialisation'
+v=50 //voltage
+i=5 //current
+phi=30 //angle in degree
+pi=3.14 //pi
+
+//Calculation
+s=v*i //apparent power
+p=cos(phi*3.14/180) //power factor
+ap=s*p //active power
+
+//Results
+printf("(a) Apparent Power, S = %d VA\n",s)
+printf("(b) Power Factor = %.3f Degree\n",p) //wrong answer in textbook
+printf("(c) Active Power, P = %.1f W\n",ap) //wrong answer in textbook
diff --git a/3809/CH7/EX7.2/EX7_2.sce b/3809/CH7/EX7.2/EX7_2.sce
new file mode 100644
index 000000000..10601776e
--- /dev/null
+++ b/3809/CH7/EX7.2/EX7_2.sce
@@ -0,0 +1,20 @@
+//Chapter 7, Example 7.2
+
+clc
+//Initialisation
+s=2000 //apparent power
+p=0.75 //power factor
+v=240 //voltage
+//Calculation
+
+ap=s*p //active power
+phi=sqrt(1-(p**2)) //phase angle in radians
+q=s*phi //reactive power in var
+i=s/v //current in ampere
+
+
+//Results
+printf("(a) Apparent Power, S = %d VA\n",s)
+printf("(b) Active Power, P = %d W\n",ap)
+printf("(c) Reactive Power, Q = %d var\n",q)
+printf("(d) Current, I = %.2f A\n",i)
diff --git a/3809/CH7/EX7.3/EX7_3.sce b/3809/CH7/EX7.3/EX7_3.sce
new file mode 100644
index 000000000..691ed3d5f
--- /dev/null
+++ b/3809/CH7/EX7.3/EX7_3.sce
@@ -0,0 +1,26 @@
+//Chapter 7, Example 7.3
+
+clc
+//Initialisation
+s=2000 //apparent power
+p=0.75 //power factor
+v=240 //voltage
+pi=3.14 //pi
+f=50 //frequency
+
+//Calculation
+
+ap=s*p //active power
+phi=sqrt(1-(p**2)) //phase angle in radians
+q=s*phi //reactive power in var
+i=s/v //current in ampere
+xc=-v**2/q //capacitive reactance in ohm
+c=1/(xc*2*pi*f) //capacitance in farad
+s1=ap //new apparent power
+i2=s1/v //new current in ampere
+
+//Results
+printf("(a) Apparent Power, S = %d VA\n",s1)
+printf("(b) Active Power, P = %d W\n",ap)
+printf("(c) Reactive Power, Q = %d var\n",q)
+printf("(d) Current, I = %.2f A\n",i2)