diff options
Diffstat (limited to '1445/CH2/EX2.18/ch2_ex_18.sce')
-rw-r--r-- | 1445/CH2/EX2.18/ch2_ex_18.sce | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/1445/CH2/EX2.18/ch2_ex_18.sce b/1445/CH2/EX2.18/ch2_ex_18.sce new file mode 100644 index 000000000..1ccb56cde --- /dev/null +++ b/1445/CH2/EX2.18/ch2_ex_18.sce @@ -0,0 +1,36 @@ +//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT +//Example 18 + +disp("CHAPTER 2"); +disp("EXAMPLE 18"); + +//VARIABLE INITIALIZATION +r=10; //in Ohms +v=200; //in Volts +f=50; //in Hertz +I=10; //in Amperes +rc=2; //resistance of coil in Ohms + +//SOLUTION + +//solution (i) +z=v/I; +xl=sqrt((z^2)-((r+rc)^2)); +L=xl/(2*%pi*f); +disp(sprintf("(i) The inductance of the coil is %f H",L)); + +//solution (ii) +pf=(r+rc)/z; +disp(sprintf("(ii) The power factor is %f",pf)); + +//solution (iii) +vl=I*(rc+(%i*xl)); +//function to convert from rectangular form to polar form +function [mag,angle]=rect2pol(x,y); +mag=sqrt((x^2)+(y^2)); +angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees +endfunction; +[vl,angle_vl]=rect2pol(real(vl),imag(vl)); +disp(sprintf("(iii) The voltage across the coil is %f V, %f degrees",vl,angle_vl)); + +//END |