summaryrefslogtreecommitdiff
path: root/1445/CH3
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH3')
-rw-r--r--1445/CH3/EX3.1/Ex3_1.sce15
-rw-r--r--1445/CH3/EX3.11/Ex3_11.sce19
-rw-r--r--1445/CH3/EX3.12/Ex3_12.sce9
-rw-r--r--1445/CH3/EX3.2/Ex3_2.sce5
-rw-r--r--1445/CH3/EX3.3/Ex3_3.sce9
-rw-r--r--1445/CH3/EX3.4/Ex3_4.sce13
-rw-r--r--1445/CH3/EX3.5/Ex3_5.sce3
-rw-r--r--1445/CH3/EX3.6/Ex3_6.sce9
-rw-r--r--1445/CH3/EX3.7/Ex3_7.sce3
-rw-r--r--1445/CH3/EX3.8/Ex3_8.sce11
10 files changed, 53 insertions, 43 deletions
diff --git a/1445/CH3/EX3.1/Ex3_1.sce b/1445/CH3/EX3.1/Ex3_1.sce
index f9883c955..697de879a 100644
--- a/1445/CH3/EX3.1/Ex3_1.sce
+++ b/1445/CH3/EX3.1/Ex3_1.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 1
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 1");
@@ -13,29 +14,29 @@ xc=10; //capacitive reactance in Ohms
//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));
+disp(sprintf("(i) The phase voltage is %f 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));
+disp(sprintf("(ii) The line current is %f A",I_l));
//solution (iii)
-disp(sprintf("(iii) The phase current is %.2f A",I_l));
+disp(sprintf("(iii) The phase current is %f A",I_l));
//solution (iv)
pow_fact=r/z_ph;
-disp(sprintf("(iv) The power factor of the circuit is %.2f (leading)",pow_fact));
+disp(sprintf("(iv) The power factor of the circuit is %f (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));
+disp(sprintf("(v) The total power absorbed is %f W",p));
//solution (vi)
va=sqrt(3)*v_l*I_l;
-disp(sprintf("(vi) The apparent power is %.0f VA",va));
+disp(sprintf("(vi) The apparent power is %f VA",va));
var=sqrt((va^2)-(p^2));
-disp(sprintf("The reactive power is %.0f VAR",var));
+disp(sprintf("The reactive power is %f VAR",var));
//Answers (v) and (vi) are different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.11/Ex3_11.sce b/1445/CH3/EX3.11/Ex3_11.sce
index 03c2bf54d..b340b3974 100644
--- a/1445/CH3/EX3.11/Ex3_11.sce
+++ b/1445/CH3/EX3.11/Ex3_11.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 11
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 11");
@@ -35,9 +36,9 @@ 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));
+disp(sprintf("P1 + P2 = %f kW",power_sum));
+disp(sprintf("P1 - P2 = %f kW",power_diff));
+disp(sprintf("The two wattmeter readings are %f kW and %f kW",x1,x2));
//solution (c): when phi=60 or %pi/3
power_sum=20*cos(%pi/3);
@@ -48,9 +49,9 @@ 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));
+disp(sprintf("P1 + P2 = %f kW",power_sum));
+disp(sprintf("P1 - P2 = %f kW",power_diff));
+disp(sprintf("The two wattmeter readings are %f kW and %f kW",x1,x2));
//solution (d): when phi=90 or %pi/2
power_sum=20*cos(%pi/2);
@@ -61,8 +62,8 @@ 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));
+disp(sprintf("P1 + P2 = %f kW",power_sum));
+disp(sprintf("P1 - P2 = %f kW",power_diff));
+disp(sprintf("The two wattmeter readings are %f kW and %f kW",x1,x2));
//END
diff --git a/1445/CH3/EX3.12/Ex3_12.sce b/1445/CH3/EX3.12/Ex3_12.sce
index 07ceb2454..a7b1cdf9c 100644
--- a/1445/CH3/EX3.12/Ex3_12.sce
+++ b/1445/CH3/EX3.12/Ex3_12.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 12
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 12");
@@ -16,19 +17,19 @@ 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));
+disp(sprintf("(a) The power factor of the circuit is %f (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));
+disp(sprintf("(b) The line current is %f 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));
+disp(sprintf("(c) The resistance of each phase is %f Ω",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));
+disp(sprintf("The capacitance of each phase is %E F",c));
//END
diff --git a/1445/CH3/EX3.2/Ex3_2.sce b/1445/CH3/EX3.2/Ex3_2.sce
index c5a2d35e0..c3ef9143f 100644
--- a/1445/CH3/EX3.2/Ex3_2.sce
+++ b/1445/CH3/EX3.2/Ex3_2.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 2
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 2");
@@ -14,9 +15,9 @@ 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));
+disp(sprintf("The resisatnce of each impedance is %f Ω",r_ph));
x_ph=sqrt((z_ph^2)-(r_ph^2));
-disp(sprintf("The ractance of each impedance is %.2f Ω",x_ph));
+disp(sprintf("The ractance of each impedance is %f Ω",x_ph));
//END
diff --git a/1445/CH3/EX3.3/Ex3_3.sce b/1445/CH3/EX3.3/Ex3_3.sce
index e99995138..4af78e160 100644
--- a/1445/CH3/EX3.3/Ex3_3.sce
+++ b/1445/CH3/EX3.3/Ex3_3.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 3
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 3");
@@ -16,19 +17,19 @@ f=50; //frequency in Hertz
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));
+disp(sprintf("(a) The phase current is %f 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));
+disp(sprintf("(b) The line current is %f A",I_l));
//solution (c)
pow_fact=r_ph/z_ph;
-disp(sprintf("(c) The power factor is %.3f (lagging)",pow_fact));
+disp(sprintf("(c) The power factor is %f (lagging)",pow_fact));
//solution (d)
p=sqrt(3)*v_l*I_l*pow_fact;
-disp(sprintf("(d) The power absorbed is %.0f W",p));
+disp(sprintf("(d) The power absorbed is %f W",p));
//Answer is different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.4/Ex3_4.sce b/1445/CH3/EX3.4/Ex3_4.sce
index 085e72919..b88459ab7 100644
--- a/1445/CH3/EX3.4/Ex3_4.sce
+++ b/1445/CH3/EX3.4/Ex3_4.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 4
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 4");
@@ -26,7 +27,7 @@ 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));
+disp(sprintf("The line currents are %f A (%f degrees), %f A (%f degrees) and %f A (%f degrees)",I_na,a,I_na,b,I_na,c));
//line current lags phase current by 30 degrees, hence (-30)
@@ -39,7 +40,7 @@ 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));
+disp(sprintf("The phase currents are %f A (%f degrees), %f A (%f degrees) and %f A (%f 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);
@@ -56,15 +57,15 @@ 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));
+disp(sprintf("The phase voltages for the delta load are %f A (%f degrees), %f A (%f degrees) and %f A (%f 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));
+disp(sprintf("The power absorbed by the load is %f 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));
+disp(sprintf("The power dissipated by the line is %f W",p_l));
p=p_load+p_l;
-disp(sprintf("The total power supplied by 3-ϕ source is %.2f W",p));
+disp(sprintf("The total power supplied by 3-ϕ source is %f W",p));
//Answers may be slightly different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.5/Ex3_5.sce b/1445/CH3/EX3.5/Ex3_5.sce
index 2804e3e92..f956a407d 100644
--- a/1445/CH3/EX3.5/Ex3_5.sce
+++ b/1445/CH3/EX3.5/Ex3_5.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 5
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 5");
@@ -18,7 +19,7 @@ disp(sprintf("(a) The total power is %d W",p1));
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));
+disp(sprintf("(b) The power factor of the load is %f", pow_fact));
//END
diff --git a/1445/CH3/EX3.6/Ex3_6.sce b/1445/CH3/EX3.6/Ex3_6.sce
index 52cdce49a..192081a59 100644
--- a/1445/CH3/EX3.6/Ex3_6.sce
+++ b/1445/CH3/EX3.6/Ex3_6.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 6
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 6");
@@ -14,17 +15,17 @@ pow_fact=0.81;
//solution (a)
p_in=p_out/eff;
-disp(sprintf("(a) The motor input is %.2f kW",p_in/1000));
+disp(sprintf("(a) The motor input is %f 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));
+disp(sprintf("(b) The line and phase current of the alternator is %f 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));
+disp(sprintf("(c) The line current of the motor is %f A",I_l));
+disp(sprintf("The phase current of the motor is %f A",I_ph));
//Answers may be different due to precision of floating point numbers
diff --git a/1445/CH3/EX3.7/Ex3_7.sce b/1445/CH3/EX3.7/Ex3_7.sce
index 3371d0fe9..68e1d82ad 100644
--- a/1445/CH3/EX3.7/Ex3_7.sce
+++ b/1445/CH3/EX3.7/Ex3_7.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 7
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 7");
@@ -19,7 +20,7 @@ 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));
+disp(sprintf("The neutral current is %f A",I));
p1=v_ph*I1; //power consumed in 1st phase
p2=v_ph*I2; //power consumed in 2nd phase
diff --git a/1445/CH3/EX3.8/Ex3_8.sce b/1445/CH3/EX3.8/Ex3_8.sce
index bfc910b2f..450ea5b3e 100644
--- a/1445/CH3/EX3.8/Ex3_8.sce
+++ b/1445/CH3/EX3.8/Ex3_8.sce
@@ -1,6 +1,7 @@
//CHAPTER 3- THREE-PHASE A.C. CIRCUITS
//Example 8
+clc;
disp("CHAPTER 3");
disp("EXAMPLE 8");
@@ -15,20 +16,20 @@ 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));
+disp(sprintf("The line current is %f A",I_l));
pow_fact=cos(phi);
-disp(sprintf("The power factor is %.2f",pow_fact));
+disp(sprintf("The power factor is %f",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));
+disp(sprintf("The power is %f 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));
+disp(sprintf("The reactive power is %f 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));
+disp(sprintf("The total volt amperes is %f kVA",va));
//END