diff options
author | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
commit | f35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch) | |
tree | eb72842d800ac1233e9d890e020eac5fd41b0b1b /1445/CH2/EX2.13 | |
parent | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff) | |
download | Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2 Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip |
updated the code
Diffstat (limited to '1445/CH2/EX2.13')
-rw-r--r-- | 1445/CH2/EX2.13/Ex2_13.sce | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/1445/CH2/EX2.13/Ex2_13.sce b/1445/CH2/EX2.13/Ex2_13.sce index 7d6d5143c..fce8566d7 100644 --- a/1445/CH2/EX2.13/Ex2_13.sce +++ b/1445/CH2/EX2.13/Ex2_13.sce @@ -1,49 +1,36 @@ //CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT //Example 13 +clc; disp("CHAPTER 2"); disp("EXAMPLE 13"); -//given -//load of impedance 1+j.1 ohm connected AC Voltage -//AC Voltage represented by V=20.sqrt(2).cos(wt+10) volt - -//to find -//current in form of i=Im.sin(wt+phi) A -// real power - -//Equations to be used -//real Power pr=Vrms.Irms.cos (phi) -// =(Vm/sqrt(2)).(Im/sqrt(2)).cos(phi) -// apparent power pa=Vrms.Irms -// =(Vm/sqrt(2)).(Im/sqrt(2)) -// //VARIABLE INITIALIZATION -z1=1+(%i*1); //impedance in rectangular form in Ohms -v=20*sqrt(2); //amplitude of rms value of voltage in Volts +z=1+(%i*1); //load impedance in rectangular form in Ohms +v=20*sqrt(2); //amplitude of rms value of voltage in Volts //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 +function [zp,angle]=rect2pol(x,y); //function 'rect2pol()' converts impedance in rectangular form to polar form +zp=sqrt((x^2)+(y^2)); //z= (x) + j(y)= (1)+ j(1); 'zp' is in polar form +angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees endfunction; //solution (i) -[z,angle]=rect2pol(1,1); +[zp,angle]=rect2pol(1,1); //since x=1 and y=1 v=v/sqrt(2); -angle_v=100; //v=(20/sqrt(2))*sin(ωt+100) -I=v/z; //RMS value of current +angle_v=100; //v=(20/sqrt(2))*sin(ωt+100) +I=v/zp; //RMS value of current angle_I=angle_v-angle; Im=I*sqrt(2); disp(sprintf("(i) The current in load is i = %d sin(ωt+%d) A",Im,angle_I)); //solution (ii) -pr=(v/sqrt(2))*(I*sqrt(2))*cos(angle*(%pi/180)); -disp(sprintf("(ii) The real power is %4.0f W",pr)); +p=(v/sqrt(2))*(I*sqrt(2))*cos(angle*(%pi/180)); +disp(sprintf("(ii) The real power is %f W",p)); //solution (iii) pa=(v/sqrt(2))*(I*sqrt(2)); -disp(sprintf("(ii) The apparent power is %6.2f VAR",pa)); +disp(sprintf("(ii) The apparent power is %f VAR",pa)); //END |