diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1445/CH7/EX7.2/ch7_ex_2.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
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 |