summaryrefslogtreecommitdiff
path: root/887/CH5/EX5.14/5_14.sce
diff options
context:
space:
mode:
Diffstat (limited to '887/CH5/EX5.14/5_14.sce')
-rwxr-xr-x887/CH5/EX5.14/5_14.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/887/CH5/EX5.14/5_14.sce b/887/CH5/EX5.14/5_14.sce
new file mode 100755
index 000000000..b249e8df9
--- /dev/null
+++ b/887/CH5/EX5.14/5_14.sce
@@ -0,0 +1,14 @@
+clc
+//ex5.14
+V_1=10^3*2.2*sqrt(2)*complex(cos(0),sin(0));
+V_2=10^3*2*sqrt(2)*complex(cos(-%pi/18),sin(-%pi/18));
+//writing matrix form of mesh current equaions obtained by KVL
+Z=[5+3*%i+50*complex(cos(-%pi/18),sin(-%pi/18)),-50*complex(cos(-%pi/18),sin(-%pi/18));-50*complex(cos(-%pi/18),sin(-%pi/18)),4+%i+50*complex(cos(-%pi/18),sin(-%pi/18))]; //coefficient matrix
+V=[2200*sqrt(2);-2000*sqrt(2)*complex(cos(-%pi/18),sin(-%pi/18))]; //voltage matrix
+I=Z\V; //current matrix
+S_1=(1/2)*V_1*((I(1,:))'); //complex power
+P_1=real(S_1); //power
+Q_1=imag(S_1); //reactive power
+printf(" All the values in the textbook are approximated hence the values in this code differ from those of Textbook")
+disp(P_1,'real power supplied by V1 in watts')
+disp(Q_1,'reactive power supplied by V1 in VARs')