diff options
Diffstat (limited to '1445/CH7/EX7.2/ch7_ex_2.sce')
-rw-r--r-- | 1445/CH7/EX7.2/ch7_ex_2.sce | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/1445/CH7/EX7.2/ch7_ex_2.sce b/1445/CH7/EX7.2/ch7_ex_2.sce new file mode 100644 index 000000000..ac414b445 --- /dev/null +++ b/1445/CH7/EX7.2/ch7_ex_2.sce @@ -0,0 +1,32 @@ +//CHAPTER 7- SINGLE PHASE TRANSFORMER +//Example 2 + +disp("CHAPTER 7"); +disp("EXAMPLE 2"); + +//VARIABLE INITIALIZATION +v1=400; //primary voltage in Volts +v2=200; //secondary voltage in Volts +I0=1; //in Amperes +pf1=0.4; //power factor in degrees +I2=50; //secondary current in Amperes +pf2=0.8; //lagging power factor in degrees + +//SOLUTION + +//function to convert from polar to rectangular form +function [x,y]=pol2rect(mag,angle1); +x=mag*cos(angle1); +y=mag*sin(angle1); +endfunction; + +phi_0=acos(pf1); +phi=acos(pf2); +I2_dash=(v2*I2)/v1; +[x0,y0]=pol2rect(I0,-phi_0); +[x2_dash,y2_dash]=pol2rect(I2_dash,-phi); +I1_x=x0+x2_dash; //x-component of I1 +I1_y=y0+y2_dash; //y-component of I1 +disp(sprintf("The primary current in reactangular form is (%f-j%f) A",I1_x,-I1_y)); + +//END |