diff options
Diffstat (limited to '1445/CH2/EX2.39')
-rw-r--r-- | 1445/CH2/EX2.39/ch2_ex_39.sce | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/1445/CH2/EX2.39/ch2_ex_39.sce b/1445/CH2/EX2.39/ch2_ex_39.sce new file mode 100644 index 000000000..e16ecd91c --- /dev/null +++ b/1445/CH2/EX2.39/ch2_ex_39.sce @@ -0,0 +1,58 @@ +//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT +//Example 39 // read it as example 38 in the book on page 2.94 + +disp("CHAPTER 2"); +disp("EXAMPLE 39"); + +//VARIABLE INITIALIZATION +z1=2.5+1.5*%i; +z2=4+3*%i; +z3=3-4*%i; +V=200; +f=50; +E=V+0*%i; // representing as a vector +//invZ=1/z1+1/z2; +Z23=z2*z3/(z2+z3); +Z=z1+Z23; +I=E/Z; +magI=sqrt(real(I)^2+imag(I)^2); //total current +phi=atan(-imag(I)/real(I)); //total phase +// +//Voltages across the branches +e12=I*z1; //voltage across series branch +mage12=sqrt(real(e12)^2+imag(e12)^2); +phi12=atan(imag(e12)/real(e12)); +// +e23=E-e12; //voltage across parallel branch +mage23=sqrt(real(e23)^2+imag(e23)^2); +phi23=atan(-imag(e23)/real(e23)); +// +//current in branch 1 upper +i1=e23/z2; +magi1=sqrt(real(i1)^2+imag(i1)^2); +phii1=atan(-imag(i1)/real(i1)); +// +//current in branch 2 lower +i2=e23/z3; +magi2=sqrt(real(i2)^2+imag(i2)^2); +phii2=atan(imag(i2)/real(i2)); +disp("SOLUTION (b)"); +disp(sprintf("The current in Upper branch is %f Amp",magi1)); +disp(sprintf("The current in Lower branch is %f Amp",magi2)); +disp(sprintf("The Total current is %f Amp",magI)); +// +pf=cos(phi); // +disp("SOLUTION (c)"); +disp(sprintf("The Power factor is %f", pf)); +// +disp("SOLUTION (d)"); +disp(sprintf("The voltage across series branch is %f V", mage12)); +disp(sprintf("The voltage across parallel branch is %f V", mage23)); +// +tp=V*magI*pf; +disp("SOLUTION (e)"); +disp(sprintf("The total power absorbed in circuit is %f W", tp)); +disp(" "); +// +//END + |