diff options
author | Siddharth Agarwal | 2019-09-03 18:27:40 +0530 |
---|---|---|
committer | Siddharth Agarwal | 2019-09-03 18:27:40 +0530 |
commit | 8ac15bc5efafa2afc053c293152605b0e6ae60ff (patch) | |
tree | e1bc17aae137922b1ee990f17aae4a6cb15b7d87 /Working_Examples/293/CH7 | |
parent | 52a477ec613900885e29c4a0b02806a415b4f83a (diff) | |
download | Xcos_block_examples-master.tar.gz Xcos_block_examples-master.tar.bz2 Xcos_block_examples-master.zip |
Diffstat (limited to 'Working_Examples/293/CH7')
-rwxr-xr-x | Working_Examples/293/CH7/EX7.1/eg7_1.sce | 6 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.10/eg7_10.sce | 14 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.11/eg7_11.sce | 14 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.2/eg7_2.sce | 9 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.3/eg7_3.sce | 10 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.4/eg7_4.sce | 14 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.5/eg7_5.sce | 16 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.6/eg7_6.sce | 7 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.7/eg7_7.sce | 41 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.8/eg7_8.sce | 12 | ||||
-rwxr-xr-x | Working_Examples/293/CH7/EX7.9/eg7_9.sce | 29 |
11 files changed, 172 insertions, 0 deletions
diff --git a/Working_Examples/293/CH7/EX7.1/eg7_1.sce b/Working_Examples/293/CH7/EX7.1/eg7_1.sce new file mode 100755 index 0000000..2b6c2c8 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.1/eg7_1.sce @@ -0,0 +1,6 @@ +Vm = 2; // assumption
+//average value of the function
+//v(t) = Vm*alpha/(%pi/3) for 0 <= alpha <= %pi/3
+// = Vm for %pi/3 <= alpha <= %pi/2
+Vav = (2/%pi)*integrate('Vm*alpha*(3/%pi)','alpha',0,%pi/3) + (2/%pi)*integrate('Vm*alpha/alpha','alpha',%pi/3,%pi/2);
+disp(Vav)
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.10/eg7_10.sce b/Working_Examples/293/CH7/EX7.10/eg7_10.sce new file mode 100755 index 0000000..8471961 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.10/eg7_10.sce @@ -0,0 +1,14 @@ +V1 = complex(10);
+V2 = complex(10*cos(-%pi/3),10*sin(-%pi/3));
+Z1 = complex(1,1);
+Z2 = complex(1,-1);
+Z3 = complex(1,2);
+//By appling the nodal analysis we get the following equation:
+//Va((1/Z1)+(1/Z2)+(1/Z3)) = (V1/Z1) + (V2/Z2)
+
+Y = (1/Z1)+(1/Z2)+(1/Z3);
+Va = (1/Y)*((V1/Z1) + (V2/Z2)); //voltage of node a
+
+Ibr = Va/Z3; //current flowing through Z3
+
+disp(Ibr,"current flowing through Z3 = ")
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.11/eg7_11.sce b/Working_Examples/293/CH7/EX7.11/eg7_11.sce new file mode 100755 index 0000000..8a4f15a --- /dev/null +++ b/Working_Examples/293/CH7/EX7.11/eg7_11.sce @@ -0,0 +1,14 @@ +V1 = complex(10);
+V2 = complex(10*cos(-%pi/3),10*sin(-%pi/3));
+Z1 = complex(1,1);
+Z2 = complex(1,-1);
+Z3 = complex(1,2);
+
+Zth = Z3 + (Z1*Z2/(Z1+Z2)); // thevinin resistance
+
+I = (V1 - V2)/(Z1 + Z2); // current flowing through the circuit when R3 is not connected
+Vth = V1 - I*Z1; //thevinin voltage
+
+Ibr = Vth/Zth; //current flowing through Z3
+
+disp(Ibr,"current flowing through Z3 = ")
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.2/eg7_2.sce b/Working_Examples/293/CH7/EX7.2/eg7_2.sce new file mode 100755 index 0000000..96d6655 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.2/eg7_2.sce @@ -0,0 +1,9 @@ +theta = %pi/6; //phase difference between current and voltage
+pf = cos(theta); //power factor
+disp(pf,"power factor = ")
+
+Vm = 170; //peak voltage
+Im = 14.14; //peak current
+
+Pav = Vm*Im*pf/2; //average power delivered to the circuit
+disp(Pav,"average power delivered to the circuit = ")
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.3/eg7_3.sce b/Working_Examples/293/CH7/EX7.3/eg7_3.sce new file mode 100755 index 0000000..7ef4543 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.3/eg7_3.sce @@ -0,0 +1,10 @@ +// lets assume that i1 and i2 are stationary and the coordinate system is rotating with an angular frquency of w. And i1 lies on the x-axis (i.e. making an angle of 0 degree with the x-axis)
+theta = %pi/3; //phase difference between i1 and i2;
+I1 = 10*sqrt(2); // peak value of i1
+I2 = 20*sqrt(2); // peak value of i2
+I = sqrt(I1^2 + I2^2 + 2*I1*I2*cos(theta)); //peak value of the resultant current
+
+phi = atan(I2*sin(theta)/(I1 + I2*cos(theta)));// phase difference between the resultant and i1(in radians)
+disp(I,"peak value of the resultant current = ")
+disp(phi,"phase difference between the resultant and i1 = ")
+// result : i = I sin(wt + phi)
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.4/eg7_4.sce b/Working_Examples/293/CH7/EX7.4/eg7_4.sce new file mode 100755 index 0000000..408b4a1 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.4/eg7_4.sce @@ -0,0 +1,14 @@ +I1 = 10; //peak value of i1
+I2 = 20; //peak value of i2
+theta = %pi/3; //phase difference between i1 and i2
+// complex representation of the two currents
+i1 = complex(10);
+i2 = complex(20*cos(%pi/3),20*sin(%pi/3));
+
+i = i1 + i2 ; //resultant current
+I = sqrt (real(i)^2 + imag(i)^2); //calculating the peak value of the resultant current by using its real and imaginary parts
+phi = atan(imag(i)/real(i)); //calculatig the phase of the resultant current by using its real and imaginary parts
+disp(i,"resultant current = ")
+disp(I,"peak value of the resultant current = ")
+disp(phi,"phase of the resultant current = ")
+//result : i = Isin(wt + phi)
diff --git a/Working_Examples/293/CH7/EX7.5/eg7_5.sce b/Working_Examples/293/CH7/EX7.5/eg7_5.sce new file mode 100755 index 0000000..8dc01c2 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.5/eg7_5.sce @@ -0,0 +1,16 @@ +I1 = 3; //peak value of i1
+I2 = 5; //peak value of i2
+I3 = 6; //peak value of i3
+theta1 = %pi/6; //phase difference between i2 and i1
+theta2 = -2*%pi/3; //phase difference between i3 and i1
+// complex representation of the currents
+i1 = complex(3);
+i2 = complex(5*cos(%pi/6),5*sin(%pi/6));
+i3 = complex(6*cos(-2*%pi/3),6*sin(-2*%pi/3));
+
+i = i1 + i2 + i3; //resultant current
+I = sqrt (real(i)^2 + imag(i)^2); //calculating the peak value of the resultant current by using its real and imaginary parts
+phi = atan(imag(i)/real(i)); //calculatig the phase of the resultant current by using its real and imaginary parts
+disp(I,"peak value of the resultant current = ")
+disp(phi,"phase of the resultant current = ")
+//result : i = Isin(wt + phi)
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.6/eg7_6.sce b/Working_Examples/293/CH7/EX7.6/eg7_6.sce new file mode 100755 index 0000000..52b0b90 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.6/eg7_6.sce @@ -0,0 +1,7 @@ +//find V*Z1/Z2
+V = complex(45*sqrt(3), -45);
+Z1 = complex(2.5*sqrt(2), 2.5*sqrt(2));
+Z2 = complex(7.5, 7.5*sqrt(3));
+// we have to find V*Z1/Z2
+Z = V*Z1/Z2;
+disp(Z,"V*Z1/Z2 = ")
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.7/eg7_7.sce b/Working_Examples/293/CH7/EX7.7/eg7_7.sce new file mode 100755 index 0000000..6e6dc46 --- /dev/null +++ b/Working_Examples/293/CH7/EX7.7/eg7_7.sce @@ -0,0 +1,41 @@ +//a
+f = 60; //frequency of the volatge source
+V = complex(141);//voltage supply V = 141sin(wt)
+R = 3; //resistance of the circuit
+L = 0.0106; // inductance of the circuit
+Z = complex(R,2*%pi*f*L);//impedance of the circuit = R + jwL
+i = V/Z; //current
+I = sqrt (real(i)^2 + imag(i)^2); //calculating the peak value of the current by using its real and imaginary parts
+phi = atan(imag(i)/real(i)); //calculatig the phase of the resultant current by using its real and imaginary parts
+disp("a")
+disp(I,"effective value of the steady state current = ")
+disp(phi,"relative phase angle = ")
+
+//b
+// expression for the instantaneous current can be written as
+//i = I sin(wt + phi)
+
+//c
+R = complex(3);
+ vr = V*R/Z; // voltage across the resistor
+Vr = sqrt (real(vr)^2 + imag(vr)^2); //peak value of the voltage across the resistor
+phi1 = atan(imag(vr)/real(vr)); //phase of the voltage across the resistor
+
+vl = V - vr; //voltage across the inductor
+Vl = sqrt (real(vl)^2 + imag(vl)^2); //peak value of the voltage across the inductor
+phi2 = atan(imag(vl)/real(vl)); //phase of the voltage across the inductor
+disp("c")
+disp(Vr,"effective value of the voltage drop across the resistor = ")
+disp(phi1,"phase of the voltage drop across the resistor = ")
+disp(Vl,"effective value of the voltage drop across the inductor = ")
+disp(phi2,"phase of the voltage drop across the inductor = ")
+
+//d
+Pav = V*I*cos(phi); //average power dissipated by the circuit
+disp("d")
+disp(Pav,"average power dissipated by the circuit = ")
+
+//e
+pf = cos(phi); //power factor
+disp("e")
+disp(pf,"power factor = ")
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.8/eg7_8.sce b/Working_Examples/293/CH7/EX7.8/eg7_8.sce new file mode 100755 index 0000000..e33b3cc --- /dev/null +++ b/Working_Examples/293/CH7/EX7.8/eg7_8.sce @@ -0,0 +1,12 @@ +//impedances in the circuit
+Z1 = complex(10,10);
+Z2 = complex(15,20);
+Z3 = complex(3,-4);
+Z4 = complex(8,6);
+
+Ybc = (1/Z2)+(1/Z3)+(1/Z4); //admittance of the parallel combination
+Zbc = (1/Ybc); //impedance of the parallel combination
+
+Z = Z1 + Zbc; // equivalent impedance of the circuit
+
+disp(Z,"equivalent impedance of the circuit = ")
\ No newline at end of file diff --git a/Working_Examples/293/CH7/EX7.9/eg7_9.sce b/Working_Examples/293/CH7/EX7.9/eg7_9.sce new file mode 100755 index 0000000..ff8d27d --- /dev/null +++ b/Working_Examples/293/CH7/EX7.9/eg7_9.sce @@ -0,0 +1,29 @@ +V1 = complex(10);
+V2 = complex(10*cos(-%pi/3),10*sin(-%pi/3));
+Z1 = complex(1,1);
+Z2 = complex(1,-1);
+Z3 = complex(1,2);
+
+//by mesh analysis we get the following equations:
+//I1*Z11 - I2*Z12 = V1
+//-I1*Z21 + I2*Z22 = -V2; where I1 and I2 are the currrents flowing in the first and second meshes respectively
+Z11 = Z1 + Z1;
+Z12 = Z1 + Z2;
+Z21 = Z12;
+Z22 = Z2 + Z2;
+
+// the mesh equations can be represented in the matrix form as I*Z = V
+Z = [Z11, -Z12; -Z21, Z22]; //impedance matrix
+V = [V1; -V2]; //voltage matrix
+I = inv(Z)*V; //current matrix = [I1;I2]
+
+I1 = I(1,:); // I1 = first row of I matrix
+I2 = I(2,:); // I1 = second row of I matrix
+
+Ibr = I1 - I2; //current flowing through Z3
+
+disp(Ibr,"current flowing through Z3 = ")
+
+
+
+
|