diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1445/CH2/EX2.10/Ex2_10.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1445/CH2/EX2.10/Ex2_10.sce')
-rw-r--r-- | 1445/CH2/EX2.10/Ex2_10.sce | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/1445/CH2/EX2.10/Ex2_10.sce b/1445/CH2/EX2.10/Ex2_10.sce new file mode 100644 index 000000000..a4136861e --- /dev/null +++ b/1445/CH2/EX2.10/Ex2_10.sce @@ -0,0 +1,35 @@ +//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT +//Example 10 + +disp("CHAPTER 2"); +disp("EXAMPLE 10"); + +//Equations +//If z1, z2 || then net impedance is Z=z1.z2/(z1+z2) +//V=IZ +//Power drawn is = V.I. cos (phi) + +//VARIABLE INITIALIZATION +v=230; //in Volts +z1=3+(%i*4); //impedance in rectangular form in Ohms +z2=6+(%i*8); //impedance in rectangular form in Ohms + +//SOLUTION +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(3,4); +[z2,angle2]=rect2pol(6,8); + +z=(z1*z2)/(z1+z2); +I=v/z; +angle=-angle1; //as angle1=angle2 +// +disp(sprintf("The current drawn from the circuit is %2.0f Amp",I)); +disp(sprintf("The net current lags net voltage by %4.2f and ckt is inductive in nature",-angle)); +p=v*I*cos(angle*%pi/180); //to convert the angle from degrees to radians +disp(sprintf("The power drawn from the source is %5.3f kW",p/1000)); + +//END |