summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.16/Ex2_16.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH2/EX2.16/Ex2_16.sce')
-rw-r--r--1445/CH2/EX2.16/Ex2_16.sce80
1 files changed, 80 insertions, 0 deletions
diff --git a/1445/CH2/EX2.16/Ex2_16.sce b/1445/CH2/EX2.16/Ex2_16.sce
new file mode 100644
index 000000000..1de5edbc7
--- /dev/null
+++ b/1445/CH2/EX2.16/Ex2_16.sce
@@ -0,0 +1,80 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 16
+
+disp("CHAPTER 2");
+disp("EXAMPLE 16");
+
+//VARIABLE INITIALIZATION
+r1=5; //in Ohms
+r2=10; //in Ohms
+L1=0.04; //in Henry
+L2=0.05; //in Henry
+v=200; //in Volts
+f=50; //in Hertz
+
+//SOLUTION
+
+//solution (i)
+xl1=L1*(2*%pi*f);
+xl2=L2*(2*%pi*f);
+z1=r1+(%i*xl1);
+z2=r2+(%i*xl2);
+//function to convert from rectangular form to polar form
+function [z,angle]=rect2pol(x,y);
+z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[z1,angle1]=rect2pol(r1,xl1);
+[z2,angle2]=rect2pol(r2,xl2);
+Y1=1/z1; //admittance
+Y2=1/z2;
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[G1,B1]=pol2rect(Y1,angle1);
+[G2,B2]=pol2rect(Y2,angle2);
+disp("......................................");
+disp("SOLUTION (i)");
+disp(sprintf("Conductance of 1st coil is %5.3f S",G1));
+disp(sprintf("Conductance of 2nd coil is %5.3f S",G2));
+disp(" ");
+disp(sprintf("Susceptance of 1st coil is %5.3f S",B1));
+disp(sprintf("Susceptance of 2nd coil is %5.3f S",B2));
+disp(" ");
+disp(sprintf("Admittance of 1st coil is %5.3f S",Y1));
+disp(sprintf("Admittance of 2nd coil is %5.3f S",Y2));
+disp("......................................");
+
+//solution (ii)
+G=G1+G2;
+B=B1+B2;
+[Y,angle]=rect2pol(G,B);
+I=v*Y;
+pf=cos((angle)*(%pi/180));
+disp("SOLUTION (ii)");
+disp(sprintf("Total current drawn by the circuit is %5.3f A, %.2f degrees",I,-angle));
+disp(sprintf("Power factor of the circuit is %5.3f (lagging)",pf));
+disp("......................................");
+
+//solution (iii)
+p=v*I*pf;
+disp("SOLUTION (iii)");
+disp(sprintf("Power absorbed by the circuit is %5.3f kW",p/1000));// text book answer is 2.256 kW
+disp("......................................");
+
+//solution (iv)
+z=v/I;
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[r,x]=pol2rect(z,angle);
+L=x/(2*%pi*f);
+disp("SOLUTION (iv)");
+disp(sprintf("Resitance of single coil is %5.3f Ω",r));//
+disp(sprintf("Inductance of single coil is %5.3f H",L));//inductance not worked out i the etx book
+disp("......................................");
+
+//END