diff options
Diffstat (limited to '1445/CH3')
-rw-r--r-- | 1445/CH3/EX3.1/Ex3_1.sce | 46 | ||||
-rw-r--r-- | 1445/CH3/EX3.11/Ex3_11.sce | 68 | ||||
-rw-r--r-- | 1445/CH3/EX3.12/Ex3_12.sce | 34 | ||||
-rw-r--r-- | 1445/CH3/EX3.2/Ex3_2.sce | 24 | ||||
-rw-r--r-- | 1445/CH3/EX3.3/Ex3_3.sce | 35 | ||||
-rw-r--r-- | 1445/CH3/EX3.4/Ex3_4.sce | 71 | ||||
-rw-r--r-- | 1445/CH3/EX3.5/Ex3_5.sce | 25 | ||||
-rw-r--r-- | 1445/CH3/EX3.6/Ex3_6.sce | 34 | ||||
-rw-r--r-- | 1445/CH3/EX3.7/Ex3_7.sce | 33 | ||||
-rw-r--r-- | 1445/CH3/EX3.8/Ex3_8.sce | 34 | ||||
-rw-r--r-- | 1445/CH3/EX3.9/Ex4_9.sce | 28 |
11 files changed, 432 insertions, 0 deletions
diff --git a/1445/CH3/EX3.1/Ex3_1.sce b/1445/CH3/EX3.1/Ex3_1.sce new file mode 100644 index 000000000..f9883c955 --- /dev/null +++ b/1445/CH3/EX3.1/Ex3_1.sce @@ -0,0 +1,46 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 1 + +disp("CHAPTER 3"); +disp("EXAMPLE 1"); + +//VARIABLE INITIALIZATION +v_l=400; //line voltage in Volts +r=15; //resistance in Ohms +xc=10; //capacitive reactance in Ohms + +//SOLUTION + +//solution (i) +v_ph=v_l/sqrt(3); //phase voltage=(line voltage)/sqrt(3) for star connection +disp(sprintf("(i) The phase voltage is %.2f V",v_ph)); + +//solution (ii) +z_ph=sqrt((r^2)+(xc^2)); +I_l=v_ph/z_ph; //phase current = line current for star connection +disp(sprintf("(ii) The line current is %.2f A",I_l)); + +//solution (iii) +disp(sprintf("(iii) The phase current is %.2f A",I_l)); + +//solution (iv) +pow_fact=r/z_ph; +disp(sprintf("(iv) The power factor of the circuit is %.2f (leading)",pow_fact)); + +//solution (v) +p=sqrt(3)*v_l*I_l*pow_fact; +disp(sprintf("(v) The total power absorbed is %.0f W",p)); + +//solution (vi) +va=sqrt(3)*v_l*I_l; +disp(sprintf("(vi) The apparent power is %.0f VA",va)); +var=sqrt((va^2)-(p^2)); +disp(sprintf("The reactive power is %.0f VAR",var)); + +//Answers (v) and (vi) are different due to precision of floating point numbers + +//END + + + + diff --git a/1445/CH3/EX3.11/Ex3_11.sce b/1445/CH3/EX3.11/Ex3_11.sce new file mode 100644 index 000000000..03c2bf54d --- /dev/null +++ b/1445/CH3/EX3.11/Ex3_11.sce @@ -0,0 +1,68 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 11 + +disp("CHAPTER 3"); +disp("EXAMPLE 11"); + +//SOLUTION +function power_sum=p1(phi); +power_sum=20*cos(phi); //power_sum=p1+p2=20*cos(phi) and in KiloWatts +endfunction; +function power_diff=p2(phi); +power_diff=(20*sin(phi))/sqrt(3); //power_diff=p1-p2=(20*sin(phi))/sqrt(3) and in KiloWatts +endfunction; + +//solution (a): when phi=0 +power_sum=20*cos(0); //eq(i) +power_diff=(20*sin(0))/sqrt(3); //eq(ii) +//solving eq(i) and eq(ii) to get values of p1 and p2 +A=[1 1;1 -1]; +b=[power_sum;power_diff]; +x=inv(A)*b; +x1=x(1,:); //to access the 1st row of 2X1 matrix +x2=x(2,:); //to access the 2nd row of 2X1 matrix +disp("Solution (a)"); +disp(sprintf("P1 + P2 = %d kW",power_sum)); +disp(sprintf("P1 - P2 = %d kW",power_diff)); +disp(sprintf("The two wattmeter readings are %d kW and %d kW",x1,x2)); + +//solution (b): when phi=30 or %pi/6 (lagging) +power_sum=20*cos(%pi/6); +power_diff=(20*sin(%pi/6))/sqrt(3); +A=[1 1;1 -1]; +b=[power_sum;power_diff]; +x=inv(A)*b; +x1=x(1,:); +x2=x(2,:); +disp("Solution (b)"); +disp(sprintf("P1 + P2 = %.2f kW",power_sum)); +disp(sprintf("P1 - P2 = %.2f kW",power_diff)); +disp(sprintf("The two wattmeter readings are %.2f kW and %.2f kW",x1,x2)); + +//solution (c): when phi=60 or %pi/3 +power_sum=20*cos(%pi/3); +power_diff=(20*sin(-(%pi/3)))/sqrt(3); //leading +A=[1 1;1 -1]; +b=[power_sum;power_diff]; +x=inv(A)*b; +x1=x(1,:); +x2=x(2,:); +disp("Solution (c)"); +disp(sprintf("P1 + P2 = %.2f kW",power_sum)); +disp(sprintf("P1 - P2 = %.2f kW",power_diff)); +disp(sprintf("The two wattmeter readings are %.2f kW and %.2f kW",x1,x2)); + +//solution (d): when phi=90 or %pi/2 +power_sum=20*cos(%pi/2); +power_diff=(20*sin(%pi/2))/sqrt(3); //leading +A=[1 1;1 -1]; +b=[power_sum;power_diff]; +x=inv(A)*b; +x1=x(1,:); +x2=x(2,:); +disp("Solution (d)"); +disp(sprintf("P1 + P2 = %.2f kW",power_sum)); +disp(sprintf("P1 - P2 = %.2f kW",power_diff)); +disp(sprintf("The two wattmeter readings are %.2f kW and %.2f kW",x1,x2)); + +//END diff --git a/1445/CH3/EX3.12/Ex3_12.sce b/1445/CH3/EX3.12/Ex3_12.sce new file mode 100644 index 000000000..07ceb2454 --- /dev/null +++ b/1445/CH3/EX3.12/Ex3_12.sce @@ -0,0 +1,34 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 12 + +disp("CHAPTER 3"); +disp("EXAMPLE 12"); + +//VARIABLE INITIALIZATION +v_l=400; //in Volts +f=50; //in Hertz +w1=2000; //in Watts +w2=800; //in Watts + +//SOLUTION +//solution (a) +p1=w1+w2; +p2=w1-w2; +phi=atan((sqrt(3)*p2)/p1); //this equation comes from two-wattmeter method +pow_fact=cos(phi); +disp(sprintf("(a) The power factor of the circuit is %.3f (leading)",pow_fact)); + +//solution (b) +I_l=p1/(sqrt(3)*v_l*pow_fact); +disp(sprintf("(b) The line current is %.2f A",I_l)); + +//solution (c) +v_ph=v_l/sqrt(3); +z_ph=v_ph/I_l; //phase current = line current for delta connection +r_ph=z_ph*pow_fact; +disp(sprintf("(c) The resistance of each phase is %.2f Ω",r_ph)); +xc=sqrt((z_ph^2)-(r_ph^2)); +c=1/(2*%pi*f*xc); +disp(sprintf("The capacitance of each phase is %.3E F",c)); + +//END diff --git a/1445/CH3/EX3.2/Ex3_2.sce b/1445/CH3/EX3.2/Ex3_2.sce new file mode 100644 index 000000000..c5a2d35e0 --- /dev/null +++ b/1445/CH3/EX3.2/Ex3_2.sce @@ -0,0 +1,24 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 2 + +disp("CHAPTER 3"); +disp("EXAMPLE 2"); + +//VARIABLE INITIALIZATION +v_l=400; //line voltage in Volts +I_l=30; //line current in Amperes +p=12*1000; //power absorbed in Watts + +//SOLUTION +v_ph=v_l/sqrt(3); //phase voltage = (line voltage)/sqrt(3) +z_ph=v_ph/I_l; //phase current = line current for star connection +pow_fact=p/(sqrt(3)*v_l*I_l); //three-phase power = sqrt(3)*v_l*I_l*pow_fact +r_ph=z_ph*pow_fact; //from impedance tringle +disp(sprintf("The resisatnce of each impedance is %.2f Ω",r_ph)); +x_ph=sqrt((z_ph^2)-(r_ph^2)); +disp(sprintf("The ractance of each impedance is %.2f Ω",x_ph)); + +//END + + + diff --git a/1445/CH3/EX3.3/Ex3_3.sce b/1445/CH3/EX3.3/Ex3_3.sce new file mode 100644 index 000000000..e99995138 --- /dev/null +++ b/1445/CH3/EX3.3/Ex3_3.sce @@ -0,0 +1,35 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 3 + +disp("CHAPTER 3"); +disp("EXAMPLE 3"); + +//VARIABLE INITIALIZATION +r_ph=30; //resistance of coils in Ohms +l=0.07; //inductance of coils in Henry +v_l=400; //line voltage in Volts +f=50; //frequency in Hertz + +//SOLUTION + +//solution (a) +x_ph=2*(%pi)*f*l; //inductive reactance +z_ph=sqrt((r_ph^2)+(x_ph^2)); +I_ph=v_l/z_ph; //phase voltage = line voltage for delta connection +disp(sprintf("(a) The phase current is %.2f A",I_ph)); + +//solution (b) +I_l=sqrt(3)*I_ph; //phase current = (line current)/sqrt(3) for delta connection +disp(sprintf("(b) The line current is %.2f A",I_l)); + +//solution (c) +pow_fact=r_ph/z_ph; +disp(sprintf("(c) The power factor is %.3f (lagging)",pow_fact)); + +//solution (d) +p=sqrt(3)*v_l*I_l*pow_fact; +disp(sprintf("(d) The power absorbed is %.0f W",p)); + +//Answer is different due to precision of floating point numbers + +//END diff --git a/1445/CH3/EX3.4/Ex3_4.sce b/1445/CH3/EX3.4/Ex3_4.sce new file mode 100644 index 000000000..085e72919 --- /dev/null +++ b/1445/CH3/EX3.4/Ex3_4.sce @@ -0,0 +1,71 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 4 + +disp("CHAPTER 3"); +disp("EXAMPLE 4"); + +//VARIABLE INITIALIZATION +v_l=866; //line voltage in Volts +z_delta=177-(%i*246); //impedance of delta connected load in Ohms +z_wire=1+(%i*2); //impedance of each wire of the line in Ohms + +//SOLUTION +v_ph=v_l/sqrt(3); //phase current = (line current)/sqrt(3) for star connection +z_star=z_delta/3; +z=z_wire + z_star; +I=v_ph/z; //I_na in rectangular form +//I_na, I_nb and I_nc are same in magnitude and are the line currents for delta connection or vice-versa +//function is not used to covert quantities in rectangular form to polar form +//I_na +I_na=sqrt((real(I))^2+(imag(I))^2); //I_na from rectangular to polar form +a=atan(imag(I)/real(I)); //angle in radians +a=a*(180/%pi); //radians to degrees +//I_nb +I_na=sqrt((real(I))^2+(imag(I))^2); +b=a-120; //lags by 120 degrees +//I_nc +I_na=sqrt((real(I))^2+(imag(I))^2); +c=a-240; // lags by another 120 degrees ie.,240 degrees +disp(sprintf("The line currents are %.3f A (%.2f degrees), %.3f A (%.2f degrees) and %.3f A (%.2f degrees)",I_na,a,I_na,b,I_na,c)); + + +//line current lags phase current by 30 degrees, hence (-30) +//I_AB +I_AB=I_na/sqrt(3); +a1=a-(-30); +//I_BC +I_BC=I_na/sqrt(3); +b1=b-(-30); +//I_AC +I_AC=I_na/sqrt(3); +c1=c-(-30); +disp(sprintf("The phase currents are %.3f A (%.2f degrees), %.3f A (%.2f degrees) and %.3f A (%.2f degrees)",I_AB,a1,I_BC,b1,I_AC,c1)); + +//converting z_delta from polar form to rectangular form +z=sqrt((real(z_delta))^2+(imag(z_delta))^2); +angle=atan(imag(z_delta)/real(z_delta)); +angle=angle*(180/%pi); + +//line voltages for load or phase voltages for the delta load- +//v_AB +v_AB=I_AB*z; +a2=a1+angle; +//v_B +v_BC=I_BC*z; +b2=b1+angle; +//v_AC +v_AC=I_AC*z; +c2=c1+angle; +disp(sprintf("The phase voltages for the delta load are %.3f A (%.2f degrees), %.3f A (%.2f degrees) and %.3f A (%.2f degrees)",v_AB,a2,v_BC,b2,v_AC,c2)); + +p_AB=(I_AB^2)*real(z_delta); +p_load=3*p_AB; +disp(sprintf("The power absorbed by the load is %.2f W",p_load)); +p_l=3*(I_na^2)*real(z_wire); +disp(sprintf("The power dissipated by the line is %.2f W",p_l)); +p=p_load+p_l; +disp(sprintf("The total power supplied by 3-ϕ source is %.2f W",p)); + +//Answers may be slightly different due to precision of floating point numbers + +//END diff --git a/1445/CH3/EX3.5/Ex3_5.sce b/1445/CH3/EX3.5/Ex3_5.sce new file mode 100644 index 000000000..2804e3e92 --- /dev/null +++ b/1445/CH3/EX3.5/Ex3_5.sce @@ -0,0 +1,25 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 5 + +disp("CHAPTER 3"); +disp("EXAMPLE 5"); + +//VARIABLE INITIALIZATION +w1=5000; //reading of 1st wattmeter in Watts +w2=-1000; //reading of 2nd wattmeter in Watts + +//SOLUTION + +//solution (a) +p1=w1+w2; +disp(sprintf("(a) The total power is %d W",p1)); + +//solution (b) +p2=w1-w2; +phi=atan((sqrt(3)*p2)/p1); //this equation comes from two-wattmeter method +pow_fact=cos(phi); +disp(sprintf("(b) The power factor of the load is %.3f", pow_fact)); + +//END + + diff --git a/1445/CH3/EX3.6/Ex3_6.sce b/1445/CH3/EX3.6/Ex3_6.sce new file mode 100644 index 000000000..52cdce49a --- /dev/null +++ b/1445/CH3/EX3.6/Ex3_6.sce @@ -0,0 +1,34 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 6 + +disp("CHAPTER 3"); +disp("EXAMPLE 6"); + +//VARIABLE INITIALIZATION +v_l=3300; //line voltage in Volts +p_out=1500*735.5; //output power in Watts (1 metric horsepower= 735.498W) +eff=0.85; +pow_fact=0.81; + +//SOLUTION + +//solution (a) +p_in=p_out/eff; +disp(sprintf("(a) The motor input is %.2f kW",p_in/1000)); + +//solution (b) +I=p_in/(sqrt(3)*v_l*pow_fact);//phase current = line current for star connection +disp(sprintf("(b) The line and phase current of the alternator is %.2f A",I)); + +//solution (c) +I_l=I; +I_ph=I_l/sqrt(3); //phase current = (line current)/sqrt(3) for delta connection +disp(sprintf("(c) The line current of the motor is %.2f A",I_l)); +disp(sprintf("The phase current of the motor is %.2f A",I_ph)); + +//Answers may be different due to precision of floating point numbers + +//END + + + diff --git a/1445/CH3/EX3.7/Ex3_7.sce b/1445/CH3/EX3.7/Ex3_7.sce new file mode 100644 index 000000000..3371d0fe9 --- /dev/null +++ b/1445/CH3/EX3.7/Ex3_7.sce @@ -0,0 +1,33 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 7 + +disp("CHAPTER 3"); +disp("EXAMPLE 7"); + +//VARIABLE INITIALIZATION +v_ph=200; //phase voltage in Volts +r1=5; //in Ohms +r2=8; //in Ohms +r3=10; //in Ohms + +//SOLUTION +I1=v_ph/r1; +I2=v_ph/r2; +I3=v_ph/r3; +disp(sprintf("The current in the three phases are %d A, %d A and %d A",I1,I2,I3)); + +I_x=0+I2*(sqrt(3)/2)-I3*(sqrt(3)/2); //x-component of the three currents =>I_x = I1*cos(90) + I2*cos(30) + I3*cos(30) +I_y=I1-(I2*0.5)-(I3*0.5); //y-component of the three currents =>I_y = I1*sin(90) + I2*sin(30) + I3*sin(30) +I=sqrt((I_x^2)+(I_y^2)); +disp(sprintf("The neutral current is %.2f A",I)); + +p1=v_ph*I1; //power consumed in 1st phase +p2=v_ph*I2; //power consumed in 2nd phase +p3=v_ph*I3; //power consumed in 3rd phase +disp(sprintf("The power consumed in the three phases are %d W, %d W and %d W",p1,p2,p3)); + +p=p1+p2+p3; +disp(sprintf("The total power is %d W",p)); + +//END + diff --git a/1445/CH3/EX3.8/Ex3_8.sce b/1445/CH3/EX3.8/Ex3_8.sce new file mode 100644 index 000000000..bfc910b2f --- /dev/null +++ b/1445/CH3/EX3.8/Ex3_8.sce @@ -0,0 +1,34 @@ +//CHAPTER 3- THREE-PHASE A.C. CIRCUITS +//Example 8 + +disp("CHAPTER 3"); +disp("EXAMPLE 8"); + +//VARIABLE INITIALIZATION +v_ph=230; //in Volts and in polar form +z=8+(%i*6); //in Ohms and in rectanglar form + +//SOLUTION +//converting z from rectangular form to polar form +z_mag=sqrt(real(z)^2+imag(z)^2); +phi=atan(imag(z)/real(z)); //atan() gives output in radians + +I_ph=v_ph/z_mag; +I_l=sqrt(3)*I_ph; +disp(sprintf("The line current is %.2f A",I_l)); + +pow_fact=cos(phi); +disp(sprintf("The power factor is %.2f",pow_fact)); + +p=sqrt(3)*v_ph*I_l*pow_fact; //phase volt=line volt in delta connection(v_l=v_ph) +disp(sprintf("The power is %.2f W",p)); + +var=sqrt(3)*v_ph*I_l*sin(phi); +var=var/1000; //from VAR to kVAR +disp(sprintf("The reactive power is %.2f kVAR",var)); + +va=sqrt(3)*v_ph*I_l; +va=va/1000; //from VA to kVA +disp(sprintf("The total volt amperes is %.2f kVA",va)); + +//END diff --git a/1445/CH3/EX3.9/Ex4_9.sce b/1445/CH3/EX3.9/Ex4_9.sce new file mode 100644 index 000000000..037cea75c --- /dev/null +++ b/1445/CH3/EX3.9/Ex4_9.sce @@ -0,0 +1,28 @@ +//CHAPTER 4- MEASURING INSTRUMENTS +//Example 9 + +disp("CHAPTER 4"); +disp("EXAMPLE 9"); + +//VARIABLE INITIALIZATION +I=50; //in Amperes +v=230; //in Volts +rev=61; //revolutions +t=37/3600; //from seconds to hours +m_c=500; //meter constant in rev/kwh +pow_fact=1; //since load is purely resistive + +//SOLUTION +E1=(v*I*t*pow_fact)/1000; //energy consumed in 37 seconds in kWh +E2=rev/m_c; //energy consumption registered by meter +err=(E2-E1)/E1; +err=err*100; //percentage error +disp(sprintf("The percentage error is %.2f %%",err)); +if(err<0) then +disp("The negative sign indicates that the meter will run slow"); +end + +//END + + + |