From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3640/CH2/EX2.7/Ex2_7.sce | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 3640/CH2/EX2.7/Ex2_7.sce (limited to '3640/CH2/EX2.7/Ex2_7.sce') diff --git a/3640/CH2/EX2.7/Ex2_7.sce b/3640/CH2/EX2.7/Ex2_7.sce new file mode 100644 index 000000000..4de784cbb --- /dev/null +++ b/3640/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,53 @@ +clc + +//the code below uses userdefined complexstring function +function s=complexstring(a) + + + if imag(a)>=0 then + s=sprintf('%g+%gi',real(a),imag(a)) + else + s=sprintf('%g%gi',real(a),imag(a)) + + end + funcprot(0) +endfunction +VLB=2400 //line to base voltage in volts +V1=VLB/sqrt(3) //reference phasor in volts //ans may vary due to roundoff error +mprintf("V1=%fV\n",V1) +kVAB=9375 //rated kVA +I1B=(kVAB*1000)/(sqrt(3)*VLB) +pf=0.8 //power factor +mprintf("I1B=%fA\n",I1B) //ans may vary due to roundoff error +I1=I1B*exp((-1)*%i*(acos(pf))) +disp('I1='+complexstring(I1)+'A')//ans may vary due to roundoff error +mprintf("\n") +x1=0.1//in ohms +disp('EΦ=V1+jI1x1='+complexstring(V1+%i*I1*x1)+'V')//ans may vary due to roundoff error +mprintf("\n") +disp('sqrt3*|EΦ|='+complexstring((abs(V1+%i*I1*x1))*sqrt(3))+'V') +Ifu=110 //value in ampere,dc +Ifs=149 //value in ampere,dc +ks=Ifs/Ifu +mprintf("ks=%f\n",ks) //ans may vary due to roundoff error +m1=(abs((V1+%i*I1*x1)))/Ifs //equal to m` in textbook +mprintf("ḿ́=|EΦ|/Ifs=%fΩ\n",m1)//ans may vary due to roundoff error +xdu=0.8 //in ohms +xd=x1+((xdu-x1)/ks) +mprintf("xd=x1+(xdu-x1)/ks=%fΩ\n",xd)//ans may vary due to roundoff error +Ef=V1+(%i*I1*xd) +disp('Ef='+complexstring(Ef)+'V')//ans may vary due to roundoff error +mprintf("\n") +mprintf("If=%fA\n",abs(Ef)/m1)//ans may vary due to roundoff error + + + + + + + + + + + + -- cgit