summaryrefslogtreecommitdiff
path: root/3640/CH6
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3640/CH6
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 '3640/CH6')
-rw-r--r--3640/CH6/EX6.1/Ex6_1.sce53
-rw-r--r--3640/CH6/EX6.2/Ex6_2.sce64
2 files changed, 117 insertions, 0 deletions
diff --git a/3640/CH6/EX6.1/Ex6_1.sce b/3640/CH6/EX6.1/Ex6_1.sce
new file mode 100644
index 000000000..dd9cae16e
--- /dev/null
+++ b/3640/CH6/EX6.1/Ex6_1.sce
@@ -0,0 +1,53 @@
+clc
+//code uses a userdefined function complexstring
+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
+r1m=1.9//resistance in ohms
+x1m=2.6 //reactance in ohms
+r2=3.6 //resistance in ohms
+x2=2.6 //reactance in ohms
+Xm=56 //magnetizing reactance in ohms
+Prot=25 //rotational losses in watts
+f=60 //supply frequency in Hz
+z1m=r1m+(%i*x1m)
+s=0.05 //slip
+disp('Z1m='+complexstring(z1m)+'Ω')
+Zf=((%i*Xm)*((r2/s)+(%i*x2)))/((%i*Xm)+(r2/s)+(%i*x2))//ans may vary due to roundoff error
+disp('Zf/2='+complexstring(Zf/2)+'Ω')
+Zb=((%i*Xm)*((r2/(2-s))+(%i*x2)))/((%i*Xm)+(r2/(2-s))+(%i*x2))//ans may vary due to roundoff error
+disp('Zb/2='+complexstring(Zb/2)+'Ω')
+Vm=115 //voltage in volts
+Im=Vm/((Zf/2)+(Zb/2)+z1m) //ans may vary due to roundoff error
+Imf=Im
+Imb=Im
+disp('Im='+complexstring(Im)+'A')
+Pin=Vm*abs(Im)*(real(Im)/abs(Im))//ans may vary due to roundoff error
+mprintf("Pin=%fW\n",Pin)
+Pg=((abs(Im))^2)*(real(Zf/2)-real(Zb/2))//ans may vary due to roundoff error
+mprintf("Pg=Pgf-Pgb=%fW\n",Pg)
+mprintf("τd=%fN-m\n",Pg/(2*%pi*(f/2)))
+DMP=Pg*(1-s)
+mprintf("DMP=%fW\n",DMP)//ans may vary due to roundoff error
+Pout=DMP-Prot
+mprintf("Pout=%fW\n",Pout)//ans may vary due to roundoff error
+mprintf("Efficiency=%f\n",Pout/Pin)//ans may vary due to roundoff error
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3640/CH6/EX6.2/Ex6_2.sce b/3640/CH6/EX6.2/Ex6_2.sce
new file mode 100644
index 000000000..0ce9922d6
--- /dev/null
+++ b/3640/CH6/EX6.2/Ex6_2.sce
@@ -0,0 +1,64 @@
+clc
+//Ex6_2 is an extension of Ex6_1
+//code uses userdefined function complexstring
+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
+r1a=12//resistance in ohms
+x1a=6.5//reactance in ohms
+Xc=-20 //reactance in ohms
+r1m=1.9 //from E6_1
+x2=2.6 //from Ex6_1
+s=1
+a=1.6 //no unit
+r2=3.6 //resistance in ohms
+x2=2.6 //reactance in ohms
+Xm=56 //magnetizing reactance in ohms
+Vm=115 //applied voltage in volts
+Zf=((%i*Xm)*((r2/s)+(%i*x2)))/((%i*Xm)+(r2/s)+(%i*x2))//from Ex6_1
+Zst=Zf
+Zb=Zf
+z1a=r1a+(%i*x1a)+(%i*Xc)
+disp('z1a='+complexstring(z1a)+'Ω')//ans may vary due to roundoff error
+mprintf("z1a=%fohm havinga phase angle of %f degrees\n",abs(z1a),(acos(real(z1a)/abs(z1a)))*180/%pi)
+Z12=((1/2)*(z1a/(a*a)))-(r1m+(%i*x2))//ans in textbook is wrong
+disp('Z12='+complexstring(Z12)+'Ω')//ans may vary due to roundoff error
+mprintf("Z12=%fohm havinga phase angle of %f degrees\n",abs(Z12),(acos(real(Z12)/abs(Z12)))*180/%pi)
+Vmf=(Vm/2)*(1-(%i/a))
+disp('Vmf='+complexstring(Vmf)+'V')//ans may vary due to roundoff error
+mprintf("Vmf=%fV havinga phase angle of %f degrees\n",abs(Vmf),(-1)*(acos(real(Vmf)/abs(Vmf)))*180/%pi)
+Vmb=(Vm/2)*(1+(%i/a))
+disp('Vmb='+complexstring(Vmb)+'V')//ans may vary due to roundoff error
+mprintf("Vmb=%fV having a phase angle of %f degrees\n",abs(Vmb),(acos(real(Vmb)/abs(Vmb)))*180/%pi)
+Imf=11.77*exp(%i*(-1)*54.93*%pi/180)//textbook doesnt provide any formula or hint for this calculation
+Imb=4.37*exp(%i*(-1)*19.7*%pi/180)//textbook doesnt provide any formula or hint for this calculation
+disp('Imf='+complexstring(Imf)+'A')//ans may vary due to roundoff error
+disp('Imb='+complexstring(Imb)+'A')//ans may vary due to roundoff error
+mprintf("Imf=%fA having a phase angle of %f degrees\n",11.77,-54.93)
+mprintf("Imb=%fA having a phase angle of %f degrees\n",4.37,-19.37)
+mprintf("τst=%fN-m\n",(2*real(Zst)*((abs(Imf)^2)-(abs(Imb)^2)))/(60*%pi))//ans may vary due to roundoff error
+Im=Imf+Imb
+disp('Im='+complexstring(Im)+'A')//ans may vary due to roundoff error
+mprintf("Im=%fA having a phase angle of%f degrees\n",abs(Im),(-1)*(acos(real(Im)/abs(Im)))*180/%pi)
+Ia=(%i*(Imf-Imb))/a
+disp('Ia='+complexstring(Ia)+'A')//ans may vary due to roundoff error
+mprintf("Ia=%fA having a phase angle of %f degrees\n",abs(Ia),(acos(real(Ia)/abs(Ia)))*180/%pi)
+I=Im+Ia
+disp('Line current='+complexstring(I)+'A')//ans may vary due to roundoff error
+mprintf("I=%fA having a phase angle of %f degrees\n",abs(I),(-1)*(acos(real(I)/abs(I)))*180/%pi)
+
+
+
+
+
+
+
+