summaryrefslogtreecommitdiff
path: root/3871/CH7/EX7.6/Ex7_6.sce
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3871/CH7/EX7.6/Ex7_6.sce
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-master.tar.gz
Scilab-TBC-Uploads-master.tar.bz2
Scilab-TBC-Uploads-master.zip
Added new codeHEADmaster
Diffstat (limited to '3871/CH7/EX7.6/Ex7_6.sce')
-rw-r--r--3871/CH7/EX7.6/Ex7_6.sce30
1 files changed, 30 insertions, 0 deletions
diff --git a/3871/CH7/EX7.6/Ex7_6.sce b/3871/CH7/EX7.6/Ex7_6.sce
new file mode 100644
index 000000000..7c6825183
--- /dev/null
+++ b/3871/CH7/EX7.6/Ex7_6.sce
@@ -0,0 +1,30 @@
+//===========================================================================
+//chapter 7 example 6
+clc;clear all;
+
+//variable declaration
+RL = 2; //resistance in Ω
+f =50; //frequency in Hz
+L = 0.25; //inductance in H
+V = 200; //voltage in V
+LP = 5.6*10^-3; //inductance in H
+RP =1000;
+
+//calculations
+XL = 2*%pi*f*L; //load reactance in Ω
+ZL = RL+XL*%i; //load impedance
+IL = V/ZL; //load current in A
+XLP = 2*%pi*f*LP; //reactance in Ω
+ZP = RP+XLP*%i; //pressure coil circuit impedance in Ω
+IP = V/ZP; //pressure coil current in A
+theta = (atan(imag(IP)/real(IP)))*180/%pi;
+Ic = IL+IP;
+Ic1 = sqrt(((imag(Ic))^2)+((real(Ic))^2))
+phi = (atan(imag(Ic)/real(Ic)))*180/%pi;
+A = (phi-theta);
+x = cos((A*%pi)/180);
+y =cos((theta*%pi)/180);
+W = V*Ic1*y*x; //actual reading of wattmeter in watts
+
+//result
+mprintf("actual reading of wattmeter = %3.4f watts",W);