diff options
Diffstat (limited to '1445/CH1')
59 files changed, 1772 insertions, 0 deletions
diff --git a/1445/CH1/EX1.1/Ex1_1.sce b/1445/CH1/EX1.1/Ex1_1.sce new file mode 100644 index 000000000..35c637d9c --- /dev/null +++ b/1445/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,15 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 1 + +disp("CHAPTER 1"); +disp("EXAMPLE 1"); + +//VARIABLE INITIALIZATION +b=14; //number of branches +n=8; //number of nodes + +//SOLUTION +m=b-n+1; //number of loop equations +disp(sprintf("The total number of independent loop equations are %d",m)); + +//END diff --git a/1445/CH1/EX1.10/Ex1_10.sce b/1445/CH1/EX1.10/Ex1_10.sce new file mode 100644 index 000000000..4bd8f0826 --- /dev/null +++ b/1445/CH1/EX1.10/Ex1_10.sce @@ -0,0 +1,21 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 10 + +disp("CHAPTER 1"); +disp("EXAMPLE 10"); + +//VARIABLE INITIALIZATION +v=10; //voltage source in Volts +I=5; //current source in Amperes +r1=2; //in Ohms +r2=2; //in Ohms +r3=4; //in Ohms + +//SOLUTION +res=I+(v/r1); +v1=res/((1/r1)+(1/r2)+(1/r3)); +I1=v1/r3; +disp(sprintf("By Nodal analysis, the current through resistor R3 is %d A",I1)); + +//END + diff --git a/1445/CH1/EX1.11/Ex1_11.sce b/1445/CH1/EX1.11/Ex1_11.sce new file mode 100644 index 000000000..f78a7b4a2 --- /dev/null +++ b/1445/CH1/EX1.11/Ex1_11.sce @@ -0,0 +1,25 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 11 + +disp("CHAPTER 1"); +disp("EXAMPLE 11"); + +//VARIABLE INITIALIZATION +I3=-5; //direction of I3 is opposite to the current which flows from the current source + +//SOLUTION + +//using mesh analysis, the following equations are obtained +//(4)I1+(-2)I2=10...........eq (1) +//(-2)I1+(6)I2=-20..........eq (2) +//solving the two equations using matrix method +A=[4 -2; -2 6]; +b=[10;-20]; +x=inv(A)*b; +I1=x(1,:); //to access 1st element of 2X1 matrix +I2=x(2,:); //to access 2nd element of 2X1 matrix +I=I2-I3; +disp(sprintf("By mesh analysis, the current through resistor R3 is %d A",I)); + +//END + diff --git a/1445/CH1/EX1.12/Ex1_12.sce b/1445/CH1/EX1.12/Ex1_12.sce new file mode 100644 index 000000000..6ca51aa27 --- /dev/null +++ b/1445/CH1/EX1.12/Ex1_12.sce @@ -0,0 +1,27 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 12 + +disp("CHAPTER 1"); +disp("EXAMPLE 12"); + +//VARIABLE INITIALIZATION +v=10; //voltage source in Volts +I=5; //current source in Amperes +r1=2; //in Ohms +r2=2; //in Ohms +r3=4; //in Ohms + +//SOLUTION + +//deactivating current source +v1=(v/r1)/((1/r1)+(1/r2)+(1/r3)); //using nodal analysis +I1=v1/r3; + +//deactivating voltage source +v2=I/((1/r1)+(1/r2)+(1/r3)); //using nodal analysis +I2=v2/r3; +I_tot=I1+I2; //applying Superposition Theorem (I1 and I2 are in same direction) + +disp(sprintf("By Superposition Theorem, the current through resistor R3 is %d A",I_tot)); + +//END diff --git a/1445/CH1/EX1.13/Ex1_13.sce b/1445/CH1/EX1.13/Ex1_13.sce new file mode 100644 index 000000000..abd93a4fc --- /dev/null +++ b/1445/CH1/EX1.13/Ex1_13.sce @@ -0,0 +1,26 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 13 + +disp("CHAPTER 1"); +disp("EXAMPLE 13"); + +//VARIABLE INITIALIZATION +v=10; //voltage source in Volts +I=5; //current source in Amperes +r1=2; //in Ohms +r2=2; //in Ohms +r3=4; //in Ohms + +//SOLUTION +//solving by nodal analysis +res=I+(v/r1); //'res' is used to make the calculation easy +vth=res/((1/r1)+(1/r2)); //Thevenin voltage +rth=(r1*r2)/(r1+r2); //Thevenin resistance +Ith=vth/(rth+r3); //Thevenin current +disp(sprintf("By Thevenin Theorem, the current through resistor R3 is %d A",Ith)); + +//END + + + + diff --git a/1445/CH1/EX1.14/Ex1_14.sce b/1445/CH1/EX1.14/Ex1_14.sce new file mode 100644 index 000000000..dc2c6f076 --- /dev/null +++ b/1445/CH1/EX1.14/Ex1_14.sce @@ -0,0 +1,30 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 14 + +disp("CHAPTER 1"); +disp("EXAMPLE 14"); + +//VARIABLE INITIALIZATION +v=10; //voltage source in Volts +I3=-5; //current source in Amperes +r1=2; //in Ohms +r2=2; //in Ohms +r3=4; //in Ohms + +//SOLUTION +//by loop analysis +//(1)I1+(-1)I2=0.........eq (1) +//(4)I1+(-2)I2=10........eq (2) +//solving the equations by matrix method +A=[1 -1;4 -2]; +b=[0;10]; +x=inv(A)*b; +I1=x(1,:); //to access 1st element of 2X1 matrix +I2=x(2,:); //to access 2nd element of 2X1 matrix +In=I2-I3; +rn=(r1*r2)/(r1+r2); +I=(rn*In)/(rn+r3); +disp(sprintf("By Norton Theorem, the current through resistor R3 is %d A",I)); + +//END + diff --git a/1445/CH1/EX1.15/Ex1_15.sce b/1445/CH1/EX1.15/Ex1_15.sce new file mode 100644 index 000000000..ec612db54 --- /dev/null +++ b/1445/CH1/EX1.15/Ex1_15.sce @@ -0,0 +1,26 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 15 + +disp("CHAPTER 1"); +disp("EXAMPLE 15"); + +//VARIABLE INITIALIZATION +v=7; //voltage source in Volts +I=7; //current source in Amperes +r3=1; //in Ohms + +//SOLUTION +//(1)I1+(-4)I2+(4)I3=7............eq (1) +//(-1)I1+(6)I2+(-3)I3=0...........eq (2) +//(1)I1+(0)I2+(-1)I3=7............eq (3) +//solving the equations by matrix method +A=[1 -4 4;-1 6 -3;1 0 -1]; +b=[7;0;7]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 3X1 matrix +I2=x(2,:); //to access the 2nd element of 3X1 matrix +I3=x(3,:); //to access the 3rd element of 3X1 matrix +vx=-(I3*r3); +disp(sprintf("By Mesh analysis, the value of Vx is %d V",vx)); + +//END diff --git a/1445/CH1/EX1.16/Ex1_16.sce b/1445/CH1/EX1.16/Ex1_16.sce new file mode 100644 index 000000000..ce11db243 --- /dev/null +++ b/1445/CH1/EX1.16/Ex1_16.sce @@ -0,0 +1,28 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 16 + +disp("CHAPTER 1"); +disp("EXAMPLE 16"); + +//VARIABLE INITIALIZATION +v=7; //voltage source in Volts +I=7; //current source in Amperes +r1=1; //in Ohms +r2=2; //in Ohms +r3=1; //in Ohms +r4=2; //in Ohms +r5=3; //in Ohms + +//SOLUTION +//(4)vb+(-1)vc=0........eq (1) +//(-2)vb+(11)vc=21......eq (2) +//solving the equations by matrix method +A=[4 -1;-2 11]; +b=[0;21]; +x=inv(A)*b; +vb=x(1,:); //to access the 1st element of 2X1 matrix +vc=x(2,:); //to access the 2nd element of 2X1 matrix +vx=-vc; +disp(sprintf("By Nodal analysis, the value of Vx is %d V",vx)); + +//END diff --git a/1445/CH1/EX1.17/Ex1_17.sce b/1445/CH1/EX1.17/Ex1_17.sce new file mode 100644 index 000000000..46d6a28bf --- /dev/null +++ b/1445/CH1/EX1.17/Ex1_17.sce @@ -0,0 +1,36 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 17 + +disp("CHAPTER 1"); +disp("EXAMPLE 17"); + +//VARIABLE INITIALIZATION +v=7; //voltage source in Volts +I=7; //current source in Amperes +r1=1; //in Ohms +r2=2; //in Ohms +r3=1; //in Ohms +r4=2; //in Ohms +r5=3; //in Ohms + +//SOLUTION + +//deactivating the current source +res=(v/4)+(v/2); +vc=res/((1/4)+(1/r1)+(1/r2)); +vx1=-vc; + +//deactivating voltage source +//(4)va+(-1)vb=-21........eq (1) +//(2)va+(-11)vb=0.........eq (2) +//solving the equations by matrix method +A=[4 -1;2 -11]; +b=[-21;0]; +x=inv(A)*b; +va=x(1,:); //to access 1st element of 2X1 matrix +vb=x(2,:); //to access 2nd element of 2X1 matrix +vx2=-vb; +vx=vx1+vx2; +disp(sprintf("By Superposition Theorem, the value of Vx is %d V",vx)); + +//END diff --git a/1445/CH1/EX1.18/Ex1_18.sce b/1445/CH1/EX1.18/Ex1_18.sce new file mode 100644 index 000000000..3dec1c69c --- /dev/null +++ b/1445/CH1/EX1.18/Ex1_18.sce @@ -0,0 +1,28 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 18 + +disp("CHAPTER 1"); +disp("EXAMPLE 18"); + +//VARIABLE INITIALIZATION +v=7; //voltage source in Volts +I=7; //current source in Amperes +r1=1; //in Ohms +r2=2; //in Ohms +r3=1; //in Ohms +r4=2; //in Ohms +r5=3; //in Ohms + +//SOLUTION +//solving by mesh analysis +I2=0; //since mesh 2 is open +I1=I-I2; +I3=I1/6; //from the equation of mesh 3 +vth=-(r2*I3)+v; //Thevenin voltage +r=r1+r5; //series combination of resistors +rth=(r*r4)/(r+r4); //parallel combination of resistors (Thevenin resistance) +I=vth/(rth+r3); //Thevenin current +vx=-I*r3; +disp(sprintf("By Thevenin Theorem, the value of Vx is %d V",vx)); + +//END diff --git a/1445/CH1/EX1.19/Ex1_19.sce b/1445/CH1/EX1.19/Ex1_19.sce new file mode 100644 index 000000000..990af1202 --- /dev/null +++ b/1445/CH1/EX1.19/Ex1_19.sce @@ -0,0 +1,34 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 19 + +disp("CHAPTER 1"); +disp("EXAMPLE 19"); + +//VARIABLE INITIALIZATION +v=7; //voltage source in Volts +I=7; //current source in Amperes +r1=1; //in Ohms +r2=2; //in Ohms +r3=1; //in Ohms +r4=2; //in Ohms +r5=3; //in Ohms + +//SOLUTION +//by using mesh analysis, the following equations are obtained +//(1)I1+(-4)I2+(3)In=7.......eq (1) +//(-1)I1+(6)I1+(-3)In=0......eq (2) +//(0)I1+(1)I2+(-1)In=0.......eq (3) +//solving the equations by matrix method +A=[1 -4 3;-1 6 -3;0 1 -1]; +b=[7;0;0]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 3X1 matrix +I2=x(2,:); //to access the 2nd element of 3X1 matrix +IN=x(3,:); //to access the 3rd element of 3X1 matrix; IN is Norton current +r=r1+r5; //series combination of resistors +rN=(r*r4)/(r+r4); //parallel combination of resistors (Norton resistance) +I=(rN*IN)/(rN+r3); +vx=-I*r3; +disp(sprintf("By Norton Theorem, the value of Vx is %d V",vx)); + +//END diff --git a/1445/CH1/EX1.2/Ex1_2.sce b/1445/CH1/EX1.2/Ex1_2.sce new file mode 100644 index 000000000..d9885ec94 --- /dev/null +++ b/1445/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,34 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 2 + +disp("CHAPTER 1"); +disp("EXAMPLE 2"); + +//VARIABLE INITIALIZATION +//star values ra, rc and rd +ra=2; //in Ohms +rc=4; //in Ohms +rd=3; //in Ohms +r1=5; //in Ohms +r2=4; //in Ohms +r3=6; //in Ohms + +//SOLUTION +//converting star with points A, C and D into delta ACD +r=(ra*rc)+(rc*rd)+(rd*ra); //'r' is the resistance that appears in the numerator of the equation of star-delta conversion + +//delta values rac, rcd and rad +rac=r/rd; +rcd=r/ra; +rad=r/rc; +req1=(r1*rad)/(r1+rad); //equivalent resistance between A and D +req2=(r2*rcd)/(r2+rcd); //equivalent resistance between C and D +req3=req1+req2; //series combination of resistors +req4=(req3*rac)/(req3+rac); //parallel combination of resistors +req5=req4+r3; +req6=(req5*7)/(req5+7); +disp(sprintf("The eqivalent resistance between points A and B is %.2f Ω",req6)); + +//END + + diff --git a/1445/CH1/EX1.20/Ex1_20.sce b/1445/CH1/EX1.20/Ex1_20.sce new file mode 100644 index 000000000..0255e39d2 --- /dev/null +++ b/1445/CH1/EX1.20/Ex1_20.sce @@ -0,0 +1,32 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 20 + +disp("CHAPTER 1"); +disp("EXAMPLE 20"); + +//VARIABLE INITIALIZATION +I=20; //current source in Amperes +v1=10; //voltage source in Volts +v2=40; //voltage source in Volts +r1=8; //in Ohms +r2=5; //in Ohms +r3=4; //in Ohms +r4=12; //in Ohms + +//SOLUTION +req=r1+r2; +rn=(req*r3)/(req+r3); +//finding In by mesh analysis +//(17)I2+(-4)I3=110.......eq (1) +//(1)I2+(-1)I3=-10........eq (2) +//solving the equations by matrix mehod +A=[17 -4;1 -1]; +b=[110;-10]; +x=inv(A)*b; +I2=x(1,:); //to access the 1st element of 2X1 matrix +I3=x(2,:); //to access the 2nd element of 2X1 matrix +In=I3; +I=(rn*In)/(rn+r4); +disp(sprintf("By Norton Theorem, the value of I is %.3f A",I)); + +//END diff --git a/1445/CH1/EX1.21/Ex1_21.sce b/1445/CH1/EX1.21/Ex1_21.sce new file mode 100644 index 000000000..6529af7b8 --- /dev/null +++ b/1445/CH1/EX1.21/Ex1_21.sce @@ -0,0 +1,35 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 21 + +disp("CHAPTER 1"); +disp("EXAMPLE 21"); + +//VARIABLE INITIALIZATION +I=20; //current source in Amperes +v1=10; //voltage source in Volts +v2=40; //voltage source in Volts +r1=8; //in Ohms +r2=5; //in Ohms +r3=4; //in Ohms +r4=12; //in Ohms + +//SOLUTION + +req=r1+r2; //series combination of resistors +rth=(req*r3)/(req+r3); //parallel connection of resistors (Thevenin resistance) + +//by using nodal analysis, the following equations are obtained +//(13)v1+(-8)v2=750.......eq (1) +//(-4)v1+(9)v2=200........eq (2) +//solving the equations by matrix mehod + +A=[13 -8;-4 9]; +b=[750;200]; +x=inv(A)*b; +v1=x(1,:); //to access the 1st element of 2X1 matrix +v2=x(2,:); //to access the 2nd element of 2X1 matrix +vth=v2; //Thevenin voltage +I=vth/(rth+r4); //Thevenin current +disp(sprintf("By Thevenin Theorem, the value of I is %.3f A",I)); + +//END diff --git a/1445/CH1/EX1.22/Ex1_22.sce b/1445/CH1/EX1.22/Ex1_22.sce new file mode 100644 index 000000000..5f8a39459 --- /dev/null +++ b/1445/CH1/EX1.22/Ex1_22.sce @@ -0,0 +1,30 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 22 + +disp("CHAPTER 1"); +disp("EXAMPLE 22"); + +//VARIABLE INITIALIZATION +I1=20; //current source in Amperes +v1=10; //voltage source in Volts +v2=40; //voltage source in Volts +r1=8; //in Ohms +r2=5; //in Ohms +r3=4; //in Ohms +r4=12; //in Ohms + +//SOLUTION + +//by using mesh analysis the following equations are obtained +//(17)I2+(-4)I3=110.......eq (1) +//(-1)I2+(4)I3=10.........eq (2) +//solving the equations by matrix method +A=[17 -4;-1 4]; +b=[110;10]; +x=inv(A)*b; +I2=x(1,:); //to access the 1st element of 2X1 matrix +I3=x(2,:); //to access the 2nd element of 2X1 matrix +I=I3; +disp(sprintf("By mesh analysis, the value of I is %.3f A",I)); + +//END diff --git a/1445/CH1/EX1.23/Ex1_23.sce b/1445/CH1/EX1.23/Ex1_23.sce new file mode 100644 index 000000000..b94474269 --- /dev/null +++ b/1445/CH1/EX1.23/Ex1_23.sce @@ -0,0 +1,27 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 23 + +disp("CHAPTER 1"); +disp("EXAMPLE 23"); + +//VARIABLE INITIALIZATION +I1=20; //current source in Amperes +v1=10; //voltage source in Volts +v2=40; //voltage source in Volts +r1=8; //in Ohms +r2=5; //in Ohms +r3=4; //in Ohms +r4=12; //in Ohms + +//SOLUTION +//(17)I2+(-4)I3=110.......eq (1) +//(-4)v1+(16)I3=40........eq (2) +//solving the equations by matrix mehod +A=[17 -4;-4 16]; +b=[110;40]; +x=inv(A)*b; +I2=x(1,:); //to access the 1st element of 2X1 matrix +I3=x(2,:); //to access the 2nd element of 2X1 matrix +disp(sprintf("By Nodal analysis, the value of I is %.3f A",I3)); + +//END diff --git a/1445/CH1/EX1.24/Ex1_24.sce b/1445/CH1/EX1.24/Ex1_24.sce new file mode 100644 index 000000000..1bb5528b5 --- /dev/null +++ b/1445/CH1/EX1.24/Ex1_24.sce @@ -0,0 +1,34 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 24 + +disp("CHAPTER 1"); +disp("EXAMPLE 24"); + +//VARIABLE INITIALIZATION +I=20; //current source in Amperes +v1=10; //voltage source in Volt +v2=40; //voltage source in Volts +r1=8; //in Ohms +r2=5; //in Ohms +r3=4; //in Ohms +r4=12; //in Ohms + +//SOLUTION + +//activating 20A current source +r=r2+((r3*r4)/(r3+r4)); +I1=(r*I1)/(r+r1); +I_20=(r3*I1)/(r3+r4); + +//activating 10V battery source +req=r1+r2; +v_10=(-v1/req)/((1/req)+(1/r3)+(1/r4)); +I_10=v_10/r4; + +//activating 40V battery source +v_40=(v2/r3)/((1/req)+(1/r3)+(1/r4)); +I_40=v_40/r4; +I_tot=I_20+I_10+I_40; +disp(sprintf("By Superposition Theorem, the value of I is .3%f A",I_tot)); + +//END diff --git a/1445/CH1/EX1.25/Ex1_25.sce b/1445/CH1/EX1.25/Ex1_25.sce new file mode 100644 index 000000000..e1c250c68 --- /dev/null +++ b/1445/CH1/EX1.25/Ex1_25.sce @@ -0,0 +1,22 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 25 + +disp("CHAPTER 1"); +disp("EXAMPLE 25"); + +//SOLUTION +//(1)I1+(0)I2+(0)I3=5.............eq (1) +//(-20)I1+(50)I2+(-20)I3=0........eq (2) +//(0)I1+(1)I2+(-1)I3=5............eq (3) +//solving the equations by matrix mehod +A=[1 0 0;-20 50 -20;0 1 -1]; +b=[5;0;5]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 3X1 matrix +I2=x(2,:); //to access the 2nd element of 3X1 matrix +I3=x(3,:); //to access the 3rd element of 3X1 matrix +I=I2; +disp(sprintf("By Mesh analysis, the value of I is %d A",I)); + +//END + diff --git a/1445/CH1/EX1.26/Ex1_26.sce b/1445/CH1/EX1.26/Ex1_26.sce new file mode 100644 index 000000000..18b2768c4 --- /dev/null +++ b/1445/CH1/EX1.26/Ex1_26.sce @@ -0,0 +1,19 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 26 + +disp("CHAPTER 1"); +disp("EXAMPLE 26"); + +//VARIABLE INITIALIZATION +I1=5; //current source in Amperes +v2=100; //voltage source in Volts +r1=20; //in Ohms +r2=10; //in Ohms +r3=20; //in Ohms + +//SOLUTION +v1=(I1+(v2/r2))/((1/r1)+(1/r2)); +I=(v1-v2)/r2; +disp(sprintf("By Nodal analysis, the value of I is %d A",I)); + +//END diff --git a/1445/CH1/EX1.27/Ex1_27.sce b/1445/CH1/EX1.27/Ex1_27.sce new file mode 100644 index 000000000..e4aa7816d --- /dev/null +++ b/1445/CH1/EX1.27/Ex1_27.sce @@ -0,0 +1,21 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 27 + +disp("CHAPTER 1"); +disp("EXAMPLE 27"); + +//VARIABLE INITIALIZATION +I1=5; //current source in Amperes +vb=100; //voltage source in Volts +r1=20; //in Ohms +r2=10; //in Ohms +r3=20; //in Ohms + +//SOLUTION +va=I1*r1; //by applying node analysis at point 'a' +vth=va-vb; //Thevenin voltage vth=vab +rth=r1+((r3*0)/(r3+0)); //Thevenin resistance +I=vth/(rth+r2); +disp(sprintf("By Thevenin Theorem, the value of I is %d A",I)); + +//END diff --git a/1445/CH1/EX1.28/Ex1_28.sce b/1445/CH1/EX1.28/Ex1_28.sce new file mode 100644 index 000000000..2391711a6 --- /dev/null +++ b/1445/CH1/EX1.28/Ex1_28.sce @@ -0,0 +1,20 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 28 + +disp("CHAPTER 1"); +disp("EXAMPLE 28"); + +//VARIABLE INITIALIZATION +I1=5; //current source in Amperes +va=100; //voltage source in Volts +r1=20; //in Ohms +r2=10; //in Ohms +r3=20; //in Ohms + +//SOLUTION +IN=I1-(va/r1); //using nodal analysis at point 'a' +rN=r1+((r3*0)/(r3+0)); +I=(rN*IN)/(rN+r2); +disp(sprintf("By Norton Theorem, the value of I is %d A",I)); + +//END diff --git a/1445/CH1/EX1.29/Ex1_29.sce b/1445/CH1/EX1.29/Ex1_29.sce new file mode 100644 index 000000000..319e202f9 --- /dev/null +++ b/1445/CH1/EX1.29/Ex1_29.sce @@ -0,0 +1,25 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 29 + +disp("CHAPTER 1"); +disp("EXAMPLE 29"); + +//VARIABLE INITIALIZATION +I=5; //current source in Amperes +v=100; //voltage source in Volts +r1=20; //in Ohms +r2=10; //in Ohms +r3=20; //in Ohms + +//SOLUTION + +//activating current source +I1=(I*r1)/(r1+r2); //by current divider law + +//activating voltage source +I2=-(v/(r1+r2)); + +I_tot=I1+I2; +disp(sprintf("By Superposition Theorem, the value of I is %d A",I_tot)); + +//END diff --git a/1445/CH1/EX1.3/Ex1_3.sce b/1445/CH1/EX1.3/Ex1_3.sce new file mode 100644 index 000000000..fdaccbce2 --- /dev/null +++ b/1445/CH1/EX1.3/Ex1_3.sce @@ -0,0 +1,38 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 3 + +disp("CHAPTER 1"); +disp("EXAMPLE 3"); + +//VARIABLE INITIALIZATION +r1=4.6; //in Ohms +r2=7.6; //in Ohms + + +//star values +rc=3; +rd=7; +re=5; + +//SOLUTION +//converting star with points C, D and E to delta CDE +r=(rc*rd)+(rd*re)+(re*rc); //'r' is the resistance that appears in the numerator of the equation of star-delta conversion + +//delta values rcd, rde and rec +rcd=r/re; +rde=r/rc; +rec=r/rd; +req1=(8*rec)/(8+rec); //equivalent resistance between C and E +req2=(6*rde)/(6+rde); //equivalent resistance between D and E +req3=(4*rcd)/(4+rcd); //equivalent resistance between C and D +req4=req2+req3; +req5=(req1*req4)/(req1+req4); //parallel combination of resistors +req6=req5+r1; //series combination of resistors +req7=(req6*r2)/(req6+r2); +disp(sprintf("The equivalent resistance between points A and B is %.2f Ω",req7)); + +//END + + + + diff --git a/1445/CH1/EX1.30/Ex1_30.sce b/1445/CH1/EX1.30/Ex1_30.sce new file mode 100644 index 000000000..54c39d141 --- /dev/null +++ b/1445/CH1/EX1.30/Ex1_30.sce @@ -0,0 +1,42 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 30 + +disp("CHAPTER 1"); +disp("EXAMPLE 30"); + +//VARIABLE INITIALIZATION +I1=25; //current source in Amperes +I2=20; //current source in Amperes +v=20; //voltage source in Volts +r1=4; //LHS resistance in Ohms +r2=10; //in Ohms +r3=2; //in Ohms +r4=1; //in Ohms +r5=10; //RHS resistance in Ohms + +//SOLUTION + +//source transformation +v1=I1*r1; //current source I1 is converted to voltage source v1 +v2=I2*r3; //current source I2 is converted to voltage source v2 + +//using mesh analysis +//(8)IA+(-1)IB=30........eq (1) +//(-2)IA+(3)IB=20........eq (2) +//solving the equations by matrix method +A=[8 -1;-2 3]; +b=[30;20]; +x=inv(A)*b; +IA=x(1,:); //to access the 1st element of 2X1 matrix +IB=x(2,:); //to access the 2nd element of 2X1 matrix +disp(sprintf("By Mesh analysis I_A= %d A and I_B= %d A",IA,IB)); + +//using nodal analysis +req=r1+r2; +res=(v1/req)+(v2/r3)+(v/r4); +v3=res/((1/req)+(1/r3)+(1/r4)); +I3=(v1-v3)/req; +I4=(v2-v)/r3; //since here ((v2-v)/r3)=((v3-v)/r4) (this is only done for convinient calculation) +disp(sprintf("By Nodal analysis I_1= %d A and I_2= %d A",I3,I4)); + +//END diff --git a/1445/CH1/EX1.31/Ex1_31.sce b/1445/CH1/EX1.31/Ex1_31.sce new file mode 100644 index 000000000..fd519c1c9 --- /dev/null +++ b/1445/CH1/EX1.31/Ex1_31.sce @@ -0,0 +1,38 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 31 + +disp("CHAPTER 1"); +disp("EXAMPLE 31"); + +//VARIABLE INITIALIZATION +r1=6; //in Ohms +r2=4; //in Ohms +r3=4; //in Ohms +r4=4; //in Ohms +r5=6; //in Ohms +r6=6; //in Ohms +r7=6; //in Ohms +r8=8; //in Ohms +r9=4; //in Ohms +r10=10; //in Ohms +r11=10; //middle resistance in Ohms + +//SOLUTION +//converting delta cde in a star +req1=r5+r6+r7; +req2=(r6*r7)/req1; +req3=(r5*r6)/req1; +req4=(r5*r7)/req1; + +req5=r1+r2+r3; //on LHS of middle resistance +req6=r4+req2; //top LHS +req7=req4+r11; //equivalent middle resistance +req8=req3+r8+r9+r10; //top RHS + +req9=(req7*req8)/(req7+req8); //parallel combination of resistors +req10=req9+req6; //series combination of resistors +req11=(req5*req10)/(req5+req10); + +disp(sprintf("The equivalent resistance between A and B is %d Ω",req11)); + +//END diff --git a/1445/CH1/EX1.32/Ex1_32.sce b/1445/CH1/EX1.32/Ex1_32.sce new file mode 100644 index 000000000..c8b992869 --- /dev/null +++ b/1445/CH1/EX1.32/Ex1_32.sce @@ -0,0 +1,30 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 32 + +disp("CHAPTER 1"); +disp("EXAMPLE 32"); + +//VARIABLE INITIALIZATION +I=10; //current source in Amperes +v=10; //voltage source in Volts +r1=4; //top resistance in Ohms +r1=4; //right resistance in Ohms +r3=4; //bottom resistance in Ohms +r4=6; //left resistance in Ohms +r5=1; //in Ohms + +//SOLUTION +//without converting the current source into voltage source +//(10)I1+(-4)I2+(0)I3=50........eq (1) +//(-4)I1+(9)I2+(-4)I3=0.........eq (2) +//(0)I1+(-4)I2+(8)I3=10.........eq (3) +//solving the equations by matrix method +A=[10 -4 0;-4 9 -4;0 -4 8]; +b=[50;0;10]; +x=inv(A)*b; +I2=x(2,:); //to access the 2nd element of 3X1 matrix +disp(sprintf("By Mesh analysis, the current through 1Ω resistor is %.2f A",I2)); + +//END + + diff --git a/1445/CH1/EX1.33/Ex1_33.sce b/1445/CH1/EX1.33/Ex1_33.sce new file mode 100644 index 000000000..60903ad05 --- /dev/null +++ b/1445/CH1/EX1.33/Ex1_33.sce @@ -0,0 +1,36 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 33 + +disp("CHAPTER 1"); +disp("EXAMPLE 33"); + +//VARIABLE INITIALIZATION +I=10; //current source in Amperes +v=10; //voltage source in Volts +r1=4; //top resistance in Ohms +r1=4; //right resistance in Ohms +r3=4; //bottom resistance in Ohms +r4=6; //left resistance in Ohms +r5=1; //in Ohms + +//SOLUTION + +//by applying nodal analysis at node 1, the following equations are obtained: +//(17)v1+(-12)v2=150.......eq (1) +//(-4)v1+(6)v2=10..........eq (2) +//solving the equations by matrix method + +A=[17 -12;-4 6]; +b=[150;10]; +x=inv(A)*b; +v1=x(1,:); //to access the 1st element of 2X1 matrix +v2=x(2,:); //to access the 1st element of 2X1 matrix +if(v1>v2) then +I=(v1-v2)/r5; +disp(sprintf("By nodal analysis, the current through 1Ω resistor is %.3f A",I)); +else +I=(v2-v1)/r5; +disp(sprintf("By nodal analysis, the current through 1Ω resistor is %.3f A",I)); +end; + +//END diff --git a/1445/CH1/EX1.34/Ex1_34.sce b/1445/CH1/EX1.34/Ex1_34.sce new file mode 100644 index 000000000..2b8ba28a7 --- /dev/null +++ b/1445/CH1/EX1.34/Ex1_34.sce @@ -0,0 +1,51 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 34 + +disp("CHAPTER 1"); +disp("EXAMPLE 34"); + +//VARIABLE INITIALIZATION +I=10; //current source in Amperes +v=10; //voltage source in Volts +r1=4; //top resistance in Ohms +r1=4; //right resistance in Ohms +r3=4; //bottom resistance in Ohms +r4=6; //left resistance in Ohms +r5=1; //in Ohms + +//SOLUTION + +//activating the current source +//(17)v1+(-12)v2=120.......eq (1) +//(-4)v1+(6)v2=0...........eq (2) +//solving the equations by matrix method +A=[17 -12;-4 6]; +b=[120;0]; +x=inv(A)*b; +v1=x(1,:); //to access the 1st element of 2X1 matrix +v2=x(2,:); //to access the 1st element of 2X1 matrix +if(v1>v2) then +I1=(v1-v2)/r5; +else +I1=(v2-v1)/r5; +end; + +//activating the voltage source +//(17)v1+(-12)v2=30.......eq (1) +//(-4)v1+(6)v2=10...........eq (2) +//solving the equations by matrix method +A=[17 -12;-4 6]; +b=[30;10]; +x=inv(A)*b; +v3=x(1,:); //to access the 1st element of 2X1 matrix +v4=x(2,:); //to access the 1st element of 2X1 matrix +if(v3>v4) then +I2=(v3-v4)/r5; +else +I2=(v4-v3)/r5; +end; + +I_tot=I1+I2; +disp(sprintf("By Superposition Theorem, the current through 1Ω resistor is %.3f A",I_tot)); + +//END diff --git a/1445/CH1/EX1.35/Ex1_35.sce b/1445/CH1/EX1.35/Ex1_35.sce new file mode 100644 index 000000000..453b01ba6 --- /dev/null +++ b/1445/CH1/EX1.35/Ex1_35.sce @@ -0,0 +1,27 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 35 + +disp("CHAPTER 1"); +disp("EXAMPLE 35"); + +//VARIABLE INITIALIZATION +I=10; //current source in Amperes +v=10; //voltage source in Volts +r1=4; //top resistance in Ohms +r2=4; //right resistance in Ohms +r3=4; //bottom resistance in Ohms +r4=6; //left resistance in Ohms +r5=1; //in Ohms + +//SOLUTION +res=I+(v/r1); //'res' is used to make calucations easy +va=res/((1/r4)+(1/r1)); //applying nodal analysis at node 1 +vb=(v/r2)/((1/r2)+(1/r3)); //applying nodal analysis at node 2 +vth=va-vb; +req1=(r1*r4)/(r1+r4); +req2=(r2*r3)/(r2+r3); +rth=req1+req2; +Ith=vth/(rth+r5); +disp(sprintf("By Thevenin Theorem, the current through the 1Ω resistor is %.3f A",Ith)); + +//END diff --git a/1445/CH1/EX1.36/Ex1_36.sce b/1445/CH1/EX1.36/Ex1_36.sce new file mode 100644 index 000000000..86044a5a5 --- /dev/null +++ b/1445/CH1/EX1.36/Ex1_36.sce @@ -0,0 +1,30 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 36 + +disp("CHAPTER 1"); +disp("EXAMPLE 36"); + +//VARIABLE INITIALIZATION +I=10; //current source in Amperes +v=10; //voltage source in Volts +r1=4; //top resistance in Ohms +r2=4; //right resistance in Ohms +r3=4; //bottom resistance in Ohms +r4=6; //left resistance in Ohms +r5=1; //in Ohms + +//SOLUTION +//(1)v1+(12/5)In=30........eq (1) +//(2)v1+(-4)In=10..........eq (2) +A=[1 12/5;2 -4]; +b=[30;10]; +x=inv(A)*b; +v1=x(1,:); //to access the 1st element of 2X1 matrix +In=x(2,:); //to access the 2nd element of 2X1 matrix +req1=(r1*r4)/(r1+r4); +req2=(r2*r3)/(r2+r3); +rn=req1+req2; +I1=(rn*In)/(rn+r5); +disp(sprintf("By Norton Theorem, the current through 1Ω resistor is %.3f A",I1)); + +//END diff --git a/1445/CH1/EX1.37/Ex1_37.sce b/1445/CH1/EX1.37/Ex1_37.sce new file mode 100644 index 000000000..b7eb9f63a --- /dev/null +++ b/1445/CH1/EX1.37/Ex1_37.sce @@ -0,0 +1,54 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 37 + +disp("CHAPTER 1"); +disp("EXAMPLE 37"); + +//VARIABLE INITIALIZATION +v1=90; //voltage source in Volts +r1=8; //in Ohms +r2=6; //in Ohms +r3=5; //in Ohms +r4=4; //in Ohms +r5=8; //diagonal resistance in Ohms +r6=8; //in Ohms + +//SOLUTION + +//solution (i): using Thevenin's Theorem +//(3)v1+(-2)v2=90...........eq (1) //applying nodal analysis at node 1 +//(-2)v1+(4)v2=-90..........eq (2) //applying nodal analysis at node 2 +A=[3 -2;-2 4]; +b=[90;-90]; +x=inv(A)*b; +v1=x(1,:); +v2=x(2,:); +vth=v1; +req1=(r1*r5)/(r1+r5); +req2=req1+r4; +req3=(req2*r6)/(req2+r6); +rth=req3+r2; +vab1=(vth*r3)/(rth+r3); +disp(sprintf("By Thevenin Theorem, the value of Vab is %.2f V",vab1)); + +//solution (ii): using Norton's Theorem +//(13)v1+(-7)v2=270.........eq (1) //applying nodal analysis at node 1 +//(7)v1+(-13)v2=0...........eq (2) //applying nodal analysis at node 2 +A=[13 -7;7 -13]; +b=[270;0]; +x=inv(A)*b; +v1=x(1,:); +v2=x(2,:); +req1=(r1*r5)/(r1+r5); +req2=req1+r4; +req3=(req2*r6)/(req2+r6); +rN=req3+r2; +if(v1>v2) then +In=(v1-v2)/r2; +else +IN=(v2-v1)/r2; +end; +vab2=(r3*IN)*(rN/(rth+r3)); +disp(sprintf("By Norton Theorem, the value of Vab is %.2f V",vab2)); + +//END diff --git a/1445/CH1/EX1.38/Ex1_38.sce b/1445/CH1/EX1.38/Ex1_38.sce new file mode 100644 index 000000000..7cde0f2d3 --- /dev/null +++ b/1445/CH1/EX1.38/Ex1_38.sce @@ -0,0 +1,37 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 38 + +disp("CHAPTER 1"); +disp("EXAMPLE 38"); + +//VARIABLE INITIALIZATION +I=2; //current source in Amperes +r1=2; //in Ohms +r2=1; //in Ohms +r3=1; //in Ohms +r4=2; //in Ohms + +//SOLUTION + +//Thevenin Equivalent circuit +I1=1; //since there is equal resistance of 3Ω, hence, current=1A +vth=(I1*r2)+(-I1*r4); +req1=r1+r2; +req2=r3+r4; +rth=(req1*req2)/(req1+req2); +disp("THEVENIN EQUIVALENT CIRCUIT IS-"); +disp(sprintf(" Thevenin voltage= %d V",vth)); +disp(sprintf(" Thevenin resistance= %.2f Ω",rth)); + +//Norton Equivalent circuit +v1=I/((1/r2)+(1/r4)); +v2=-I/((1/r3)+(1/r1)); +req1=r1+r2; +req2=r3+r4; +rn=(req1*req2)/(req1+req2); +Isc=(v1/r4)+v2; +disp("NORTON EQUIVALENT CIRCUIT IS-"); +disp(sprintf(" Norton current= %.3f A",Isc)); +disp(sprintf(" Norton resistance= %.3f Ω",rn)); + +//END diff --git a/1445/CH1/EX1.39/Ex1_39.sce b/1445/CH1/EX1.39/Ex1_39.sce new file mode 100644 index 000000000..237e65eb5 --- /dev/null +++ b/1445/CH1/EX1.39/Ex1_39.sce @@ -0,0 +1,21 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 39 + +disp("CHAPTER 1"); +disp("EXAMPLE 39"); + +//VARIABLE INITIALIZATION +v=2; //in Volts +r=2; //in Ohms + +//SOLUTION +z_star=r/3; +req1=(r/3)+r; +req2=(r/3)+r; +req3=(req1*req2)/(req1+req2); +req4=(r/3)+req3; +req5=(req4*r)/(req4+r); +I=v/req5; +disp(sprintf("The value of I is %d A",I)); + +//END diff --git a/1445/CH1/EX1.4/Ex1_4.sce b/1445/CH1/EX1.4/Ex1_4.sce new file mode 100644 index 000000000..b8847eae1 --- /dev/null +++ b/1445/CH1/EX1.4/Ex1_4.sce @@ -0,0 +1,41 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 4 + +disp("CHAPTER 1"); +disp("EXAMPLE 4"); + +//VARIABLE INITIALIZATION +r1=1; //LHS resistance in Ohms +r2=2; //in Ohms +r3=3; //in Ohms +r4=4; //in Ohms +r5=5; //in Ohms +r6=6; //in Ohms +r7=7; //in Ohms +r8=8; //RHS resistance in Ohms + +//SOLUTION + +//To find resistance between a and b +req1=r1+r2; //series combination of resistors +req2=(req1*r3)/(req1+r3); //parallel combination of resistors +req3=req2+(r4+r5); +req4=(req3*r6)/(req3+r6); +req5=req4+r7; +req6=(req5*r8)/(req5+r8); +disp(sprintf("The eqiuvalent resistance between points a and b is %.2f Ω",req6)); + +//To find resistance between c and d +req7=r7+r8; +req8=(req7*r6)/(req7+r6); +req9=req2+r5+req8; +req10=(req9*r4)/(req9+r4); +disp(sprintf("The eqiuvalent resistance between points c and d is %.2f Ω",req10)); + +//To find resistance between d and e +req11=req2+r4+r5; +req12=(req11*r6)/(req11+r6); +req13=(req12*req7)/(req12+req7); +disp(sprintf("The eqiuvalent resistance between points d and e is %.2f Ω",req13)); + +//END diff --git a/1445/CH1/EX1.40/Ex1_40.sce b/1445/CH1/EX1.40/Ex1_40.sce new file mode 100644 index 000000000..6f60627ea --- /dev/null +++ b/1445/CH1/EX1.40/Ex1_40.sce @@ -0,0 +1,33 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 40 + +disp("CHAPTER 1"); +disp("EXAMPLE 40"); + +//VARIABLE INITIALIZATION +v1=20; //in Volts +v2=10; //in Volts +r1=5; //top resistance in Ohms +r2=10; //bottom resistance in Ohms +r3=5; //in Ohms +r4=5; //in Ohms +r5=10; //in Ohms + +//SOLUTION +//(5)I1+(10)I3+(-10)I4=20............eq (1) +//(0)I1+(10)I3+(10)I4=-50............eq (2) +//(5)I1+(20)I3+(0)I4=-30.............eq (3) (eq(1) + eq(2)) +//Since the determinant of matrix A is 0, hence, the set of these equations cannot be solved by matrix method +//So, solving them directly, + +I3=-15/25; +I1=-3-(3/5); +I4=-5-(-3/5); +I=I1+3+5; +disp("The currents (in Amperes) flowing in different branches are:"); +disp(I1); +disp(I3); +disp(I4); +disp(sprintf("The total current is %.2f A",I)); + +//END diff --git a/1445/CH1/EX1.41/Ex1_41.sce b/1445/CH1/EX1.41/Ex1_41.sce new file mode 100644 index 000000000..53e65b5b2 --- /dev/null +++ b/1445/CH1/EX1.41/Ex1_41.sce @@ -0,0 +1,30 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 41 + +disp("CHAPTER 1"); +disp("EXAMPLE 41"); + +//VARIABLE INITIALIZATION +vs=6; //in Volts +Is=4; //in Amperes +r1=5; //in Ohms +r2=2; //in Ohms +r3=2; //in Ohms +r=2/3; //in Ohms +r4=3; //in Ohms +r5=1; //in Ohms +r6=2; //in Ohms + +//SOLUTION +req1=(r2*r3)/(r2+r3); +req2=req1+r1; //resistance across vs +va=vs/req2; //voltage divider law +rth1=(req1*r1)/(req1+r1); +I1=Is*(r2/req2); //current divider law +vb=I1*r4; +rth2=(r4*r4)/(r4+r4); +I=(vb-va)/(rth1+r+rth2); +disp(sprintf("The value of the current is %d A",I)); + +//END + diff --git a/1445/CH1/EX1.42/Ex1_42.sce b/1445/CH1/EX1.42/Ex1_42.sce new file mode 100644 index 000000000..4d3388dd9 --- /dev/null +++ b/1445/CH1/EX1.42/Ex1_42.sce @@ -0,0 +1,40 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 42 + +disp("CHAPTER 1"); +disp("EXAMPLE 42"); + +//VARIABLE INITIALIZATION +v=10; //in Volts +I=0.5; //in Amperes +r1=4; //top LHS resistance in Ohms +r2=2; //top RHS resistance in Ohms +r3=2; //first resistance in Ohms +r4=2; //second resistance in Ohms + +//SOLUTION + +//using Thevenin's theorem +rth=(r1*r3)/(r1+r3); +vth=v*(r3/(r1+r3)); //Thevenin voltage +R=(40-(56*I))/(24*I); //solving for R directly +disp(sprintf("(i) By Thevenin Theorem, the value of R is %d Ω",R)); + +//v1=(10R+4)/(3R+4)........eq(1) //using nodal analysis at node 1 +//v1=1+R...................eq(2) //using nodal analysis at node 2 +//the following the quadratic equation is formed when both the equations are compared +//(3)R^2+(-3)R+(0)=0 +//solving the quadratic equation +a=3; +b=-3; +c=0; +D=(b^2)-(4*a*c); //discriminant +R1=(-b+sqrt(D))/(2*a); +R2=(-b-sqrt(D))/(2*a); +if(R1==1) then +disp(sprintf("(ii) By Nodal analysis, the value of R is %d Ω",R1)); +else +disp(sprintf("(ii) By Nodal analysis, the value of R is %d Ω",R1)); +end; + +//END diff --git a/1445/CH1/EX1.43/Ex1_43.sce b/1445/CH1/EX1.43/Ex1_43.sce new file mode 100644 index 000000000..ad30b370f --- /dev/null +++ b/1445/CH1/EX1.43/Ex1_43.sce @@ -0,0 +1,25 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 43 + +disp("CHAPTER 1"); +disp("EXAMPLE 43"); + +//VARIABLE INITIALIZATION +Is1=2; //first current source in Amperes +Is2=4; //second current source in Amperes +v=2; //in Volts +r1=200; //in Ohms +r2=100; //in Ohms +r3=4; //in Ohms + +//SOLUTION +req1=34; +I1=Is2*(r3/req1); +req2=24; +Iab=Is1*(req2/req1); +I=Iab+I1; +vab=I*10; +disp(sprintf("By Superposition Theorem the voltage Vab is %.3f V",vab)); + +//END + diff --git a/1445/CH1/EX1.44/Ex1_44.sce b/1445/CH1/EX1.44/Ex1_44.sce new file mode 100644 index 000000000..e060456a9 --- /dev/null +++ b/1445/CH1/EX1.44/Ex1_44.sce @@ -0,0 +1,15 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 44 + +disp("CHAPTER 1"); +disp("EXAMPLE 44"); + +//VARIABLE INITIALIZATION +I=40; //in Amperes +r=5; //in Ohms + +//SOLUTION +v=I*r; //Ohm's Law +disp(sprintf("The voltage required is %d V",v)); + +//END diff --git a/1445/CH1/EX1.45/Ex1_45.sce b/1445/CH1/EX1.45/Ex1_45.sce new file mode 100644 index 000000000..361cfdda5 --- /dev/null +++ b/1445/CH1/EX1.45/Ex1_45.sce @@ -0,0 +1,15 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 45 + +disp("CHAPTER 1"); +disp("EXAMPLE 45"); + +//VARIABLE INITIALIZATION +w=5*1000; //power consumed by coil in Watts +v=200; //applied voltage in Volts + +//SOLUTION +r=(v^2)/w; //since w=(v^2)/r +disp(sprintf("Value of resistance is %d Ω",r)); + +//END diff --git a/1445/CH1/EX1.46/Ex1_46.sce b/1445/CH1/EX1.46/Ex1_46.sce new file mode 100644 index 000000000..4623527b7 --- /dev/null +++ b/1445/CH1/EX1.46/Ex1_46.sce @@ -0,0 +1,26 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 46 + +disp("CHAPTER 1"); +disp("EXAMPLE 46"); + +//VARIABLE INITIALIZATION +v=240; //in Volts + +//SOLUTION +//case1: p=60W +p1=60; //in Watts +r1=(v^2)/p1; +disp(sprintf("Resistance of the metal filament lamp is %d Ω",r1)); + +//case2: p=100W +p2=100; //in Watts +r2=(v^2)/p2; + +if(r1>r2) then +disp(sprintf("Resistance of %d W lamp will be greater",p1)); +else +disp(sprintf("Resistance of %d W lamp will be greater",p2)); +end; + +//END diff --git a/1445/CH1/EX1.47/Ex1_47.sce b/1445/CH1/EX1.47/Ex1_47.sce new file mode 100644 index 000000000..9b53f1882 --- /dev/null +++ b/1445/CH1/EX1.47/Ex1_47.sce @@ -0,0 +1,32 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 47 + +disp("CHAPTER 1"); +disp("EXAMPLE 47"); + +//VARIABLE INITIALIZATION +lc=20; //length of copper wire in m +dc=0.015/100; //diameter of copper wire in m +rhoc=1.7; //specific resistance for copper +lp=15; //length of platinum silver wire in m +dp=0.015/100; //diameter of platinum silver wire in m +rhop=2.43; //specific resistance for platinum silver + +//SOLUTION + +//for copper wire +sc=(%pi/4)*(dc^2); //area +rc=rhoc*(lc/sc); + +//for platinum silver +sp=(%pi/4)*(dp^2); //area +rp=rhop*(lp/sp); + + +if(rc>rp) then +disp("Copper wire has greater resistance"); +else +disp("Platinum silver wire has greater resistance"); +end; + +//END diff --git a/1445/CH1/EX1.48/Ex1_48.sce b/1445/CH1/EX1.48/Ex1_48.sce new file mode 100644 index 000000000..99933d888 --- /dev/null +++ b/1445/CH1/EX1.48/Ex1_48.sce @@ -0,0 +1,32 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 48 + +disp("CHAPTER 1"); +disp("EXAMPLE 48"); + +//VARIABLE INITIALIZATION +v1=2.05; //1st cell in Volts +v2=2.15; //2nd cell in Volts +r1=0.05; //in Ohms +r2=0.04; //in Ohms +r3=1; //in Ohms + +//SOLUTION +//(r3+r1)I1+(r3)I2=v1......eq (1) +//(r3)I1+(r3+r2)I2=v2......eq (2) +req1=r3+r1; +req2=r3+r2; +A=[req1 r3;r3 req2]; +b=[v1;v2]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 2X1 matrix +I2=x(2,:); //to access the 2nd element of 2X1 matrix +I=I1+I2; +pd=I*r3; +disp(sprintf("Current through B1 is %.2f A",I1)); +disp(sprintf("Current through B2 is %.2f A",I2)); +disp(sprintf("Potential difference across AC is %.2f V",pd)); + +//END + + diff --git a/1445/CH1/EX1.49/Ex1_49.sce b/1445/CH1/EX1.49/Ex1_49.sce new file mode 100644 index 000000000..1691f133c --- /dev/null +++ b/1445/CH1/EX1.49/Ex1_49.sce @@ -0,0 +1,38 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 49 + +disp("CHAPTER 1"); +disp("EXAMPLE 49"); + +//VARIABLE INITIALIZATION +v1=110; //voltage source in Volts +v2=80; //voltage source in Volts +v3=50; //voltage source in Volts +r=2; //in Ohms + +//SOLUTION + +//solution (a) +I1=4; //charging +I2=6; //charging +r1=((v1-v2)-((I1+I2)*r))/I1; +r2=((v1-v3)-((I1+I2)*r))/I2; +disp(sprintf("(a) R1= %.2f Ω",r1)); +disp(sprintf(" R2= %.2f Ω",r2)); + +//solution (b) +I1=2; //discharging +I2=20; //charging +r1=((v1-v2)-((I2-I1)*r))/(-I1); +r2=((v1-v3)-((I2-I1)*r))/I2; +disp(sprintf("(b) R1= %.2f Ω",r1)); +disp(sprintf(" R2= %.2f Ω",r2)); + +//solution (c) +I1=0; +I2=(v1-v2)/r; +r2=((v1-v3)-(I2*r))/I2; +disp(sprintf("(c) I1=0 when R2= %d Ω",r2)); + +//END + diff --git a/1445/CH1/EX1.5/Ex1_5.sce b/1445/CH1/EX1.5/Ex1_5.sce new file mode 100644 index 000000000..01fbb7a42 --- /dev/null +++ b/1445/CH1/EX1.5/Ex1_5.sce @@ -0,0 +1,39 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 5 + +disp("CHAPTER 1"); +disp("EXAMPLE 5"); + +//VARIABLE INITIALIZATION +r1=2; //in Ohms +r2=4; //in Ohms +r3=8; //in Ohms +r4=8; //in Ohms +r5=2; //middle resistance in Ohms + +//SOLUTION + +//To find resistance between a and c +req1=r1+r2; +req2=r1+r4; +req3=(req1*r1)/(req1+r1); +rac=(req3*req2)/(req3+req2); +disp(sprintf("The eqiuvalent resistance between points a and c is %.2f Ω",rac)); + +//To find resistance between b and d +//converting delta abc into star with points a, b and c +//delta values +rab=r1; +rbc=r2; +rac=6; +//star values +r=rab+rbc+rac; //'r' is the resistance that appears in the denominator of the equation of delta-star conversion +ra=(rab*rbc)/r; +rb=(rab*rac)/r; +rc=(rbc*rac)/r; +req5=rb+rac; +req6=rc+8; +rbd=ra+((req5*req6)/(req5+req6)); +disp(sprintf("The eqiuvalent resistance between points b and d is %.2f Ω",rbd)); + +//END diff --git a/1445/CH1/EX1.50/Ex1_50.sce b/1445/CH1/EX1.50/Ex1_50.sce new file mode 100644 index 000000000..e1ce34a4e --- /dev/null +++ b/1445/CH1/EX1.50/Ex1_50.sce @@ -0,0 +1,21 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 50 + +disp("CHAPTER 1"); +disp("EXAMPLE 50"); + +//SOLUTION +//(5)I1+(-3)I2=10..........eq (1) +//(-3)I1+(34)I2=40.........eq (2) +A=[5 -3;-3 34]; +b=[10;40]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 2X1 matrix +I2=x(2,:); //to access the 2nd element of 2X1 matrix +I=I2-I1; +disp(sprintf("Current i1 is %.2f A (loop EFAB)",I1)); +disp(sprintf("Current i2 is %.2f A (loop BCDE)",abs(I))); + +//END + + diff --git a/1445/CH1/EX1.51/Ex1_51.sce b/1445/CH1/EX1.51/Ex1_51.sce new file mode 100644 index 000000000..cd7fdbdce --- /dev/null +++ b/1445/CH1/EX1.51/Ex1_51.sce @@ -0,0 +1,23 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 51 + +disp("CHAPTER 1"); +disp("EXAMPLE 51"); + +//SOLUTION +//(9)I1+(-5)I2+(-3)I3=5..........eq (1) +//(-5)I1+(8)I2+(-1)I3=5..........eq (2) +//(-3)I1+(-1)I2+(6)I3=3..........eq (3) +A=[9 -5 -3;-5 8 -1;-3 -1 6]; +b=[5;5;3]; +x=inv(A)*b; +I1=x(1,:); //to access the 1st element of 3X1 matrix +I2=x(2,:); //to access the 2nd element of 3X1 matrix +I3=x(3,:); //to access the 3rd element of 3X1 matrix +disp(sprintf("Current i1 is %.2f A (loop ABGH)",I1)); +disp(sprintf("Current i2 is %.2f A (loop BCDH)",I2)); +disp(sprintf("Current i3 is %.2f A (loop GDEF)",I3)); + +//END + + diff --git a/1445/CH1/EX1.52/Ex1_52.sce b/1445/CH1/EX1.52/Ex1_52.sce new file mode 100644 index 000000000..c669dfdd1 --- /dev/null +++ b/1445/CH1/EX1.52/Ex1_52.sce @@ -0,0 +1,46 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 52 + +disp("CHAPTER 1"); +disp("EXAMPLE 52"); + +//VARIABLE INITIALIZATION +v1=20; //LHS voltage source in Volts +v2=12; //RHS voltage source in Volts +r1=5; //LHS resistance in Ohms +r2=2; //in Ohms +r3=8; //in Ohms +r4=10; //RHS resistance in Ohms + +//SOLUTION + +//by Thevenin's Theorem +rth=r3+((r1*r2)/(r1+r2)); //Thevenin resistance +v=v1*(r2/(r1+r2)); //voltage divider law +vab=-v2+(r3*0)+(rth*0)+v; +It=vab/(rth+r4); //current obtained by applying Thevenin's Theorem +Isc=vab/rth; +disp(sprintf("By Thevenin Theorem, current in the 10Ω resistor is %.2f A",It)); + +//verification by Norton's Theorem +//(7)I1+(2)I2=20.................eq (1) +//(2)I1+(10)I2=12................eq (2) +//solving the equations using matrix method +A=[7 2;2 10]; +b=[20;12]; +x=inv(A)*b; +x1=x(1,:); //to access 1st element of 2X1 matrix +x2=x(2,:); //to access 2nd element of 2X1 matrix and Isc=-x2 +Isc=-x2; //Isc is negative because its direction is opposite to I2 +I=Isc*(rth/(rth+r4)); //current obtained by applying Norton's Theorem +if(It==I) +disp(sprintf("By Norton Theorem, current in the 10Ω resistor is %.2f A",I)); +disp(sprintf("Hence, answer is confirmed by Norton Theorem")); +else +disp(sprintf("The answer is not confirmed by Norton Theorem")); +end; + +//END + + + diff --git a/1445/CH1/EX1.53/Ex1_53.sce b/1445/CH1/EX1.53/Ex1_53.sce new file mode 100644 index 000000000..2b20673b7 --- /dev/null +++ b/1445/CH1/EX1.53/Ex1_53.sce @@ -0,0 +1,26 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 53 + +disp("CHAPTER 1"); +disp("EXAMPLE 53"); + +//VARIABLE INITIALIZATION +v1=10; //LHS voltage source in Volts +v2=4; //RHS voltage source in Volts +r1=2; //LHS resistance in Ohms +r2=3; //in Ohms +r3=10; //in Ohms +r4=3; //in Ohms +r5=1; //RHS resistance in Ohms + +//SOLUTION +van=v1*(r2/(r1+r2)); //voltage divider law +vbn=-v2*(r4/(r5+r4)); //voltage divider law +ran=(r1*r2)/(r1+r2); +rbn=(r4*r5)/(r4+r5); +vab=(ran*0)+van-vbn+(rbn*0); //current is zero as AB is open circuited when Thevenin's Theorem is applied +disp(sprintf("The Thevenin voltage is %d V",vab)); + +//END + + diff --git a/1445/CH1/EX1.54/Ex1_54.sce b/1445/CH1/EX1.54/Ex1_54.sce new file mode 100644 index 000000000..f480cc116 --- /dev/null +++ b/1445/CH1/EX1.54/Ex1_54.sce @@ -0,0 +1,29 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 54 + +disp("CHAPTER 1"); +disp("EXAMPLE 54"); + +//VARIABLE INITIALIZATION +v=5; //voltage source in Volts +r1=1; //LHS resistance in Ohms +r2=5; //in Ohms +r3=1; //in Ohms +r4=1; //RHS resistance in Ohms +I=10; //current source in Amperes + +//SOLUTION + +req1=r1+r3+r4; //on deactivating the current source, current I1 flows in the circuit +I1=v/req1; +vab1=v-(I1*r1); //(I1*r1) is voltage drop across 1Ω resistance +I2=I/req1; +vab2=vab1+(I2*r1); //(I2*r1) is voltage drop across 1Ω resistance +req=r1+((r3*r4)/(r3+r4)); //'req' is the same as 'Rth' mentioned in the book +I=vab2/(req+r2); +RTh=(6/5)+(3/4); +req2=10+2; +I3=9/12; +disp(sprintf("The value of the current is %.2f A",I3)); + +//END diff --git a/1445/CH1/EX1.55/Ex1_55.sce b/1445/CH1/EX1.55/Ex1_55.sce new file mode 100644 index 000000000..5c76ec6ec --- /dev/null +++ b/1445/CH1/EX1.55/Ex1_55.sce @@ -0,0 +1,22 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 55 + +disp("CHAPTER 1"); +disp("EXAMPLE 55"); + +//VARIABLE INITIALIZATION +vcd=50; //voltage source in Volts +v=100; //voltage source in Volts +r1=40; //in Ohms +r2=50; //in Ohms +r3=20; //in Ohms +r4=10; //in Ohms + +//SOLUTION +res=(vcd/r2)-(v/r3); //'res' (short for result) is used to make calculations easy +vp=res/((1/r2)+(1/r3)+(1/r4)); +vba=vp+v; +disp(sprintf("The voltage between A and B is %.2f V",vba)); + +//END + diff --git a/1445/CH1/EX1.56/Ex1_56.sce b/1445/CH1/EX1.56/Ex1_56.sce new file mode 100644 index 000000000..83663522a --- /dev/null +++ b/1445/CH1/EX1.56/Ex1_56.sce @@ -0,0 +1,21 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 56 + +disp("CHAPTER 1"); +disp("EXAMPLE 56"); + +//VARIABLE INITIALIZATION +r=1; //this is an assumption +r1=r*1; //in Ohms +r2=r*2; //in Ohms +r3=r*3; //in Ohms + +//SOLUTION +req=(r1*r2)+(r2*r3)+(r3*r1); //'req' is the equivalent resistance that appears in the numerator of the equation of star-delta conversion +ra=req/r3; +rb=req/r1; +rc=req/r2; +disp(sprintf("The equivalent delta values are ra=( %.2f x r) Ω, rb=( %.2f x r) Ω and rc=( %.2f x r) Ω",ra,rb,rc)); + +//END + diff --git a/1445/CH1/EX1.57/Ex1_57.sce b/1445/CH1/EX1.57/Ex1_57.sce new file mode 100644 index 000000000..7c117b894 --- /dev/null +++ b/1445/CH1/EX1.57/Ex1_57.sce @@ -0,0 +1,33 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 57 + +disp("CHAPTER 1"); +disp("EXAMPLE 57"); + +//VARIABLE INITIALIZATION +v=10; //voltage source in Ohms +r1=2; //RHS resistance in Ohms +r2=2; //in Ohms +r3=4; //in Ohms +r4=4; //in Ohms +I=20; //current source in Amperes + +//SOLUTION + +r=r1+r2; +//deactivating voltage source of 10Ω +v1=-I/((1/r)+(1/r3)+(1/r4)); //from equation +I1=v1/r3; + +//deactivating current source of 20A +v2=(v/r)/((1/r)+(1/r3)+(1/r4)); +I2=v2/r3; + +I_tot=I1+I2; +if(I_tot>0) +disp(sprintf("The value of I is %.2f A (upward)",I_tot)); +else +disp(sprintf("The value of I is %.2f A (downward)",-I_tot)); + +//END + diff --git a/1445/CH1/EX1.58/Ex1_58.sce b/1445/CH1/EX1.58/Ex1_58.sce new file mode 100644 index 000000000..f077490a3 --- /dev/null +++ b/1445/CH1/EX1.58/Ex1_58.sce @@ -0,0 +1,35 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 58 + +disp("CHAPTER 1"); +disp("EXAMPLE 58"); + +//VARIABLE INITIALIZATION +v1=20; //LHS voltage source in Volts +v2=5; //RHS voltage source in Volts +r1=100; //LHS resistance in Ohms +r2=2; //in Ohms +r3=1; //in Ohms +r4=4; //in Ohms +r5=1; //RHS resistance in Ohms + +//SOLUTION + +//applying Thevenin's Theorem +//Thevnin's equivalent resistance, r_th is same as r_AB +r_th=((r3+r5)*r2)/((r3+r5)+r2); +v_th=(v1-v2)/2; //from the equation +I1=v_th/(r4+r_th); +v1=I1*r4; +disp(sprintf("By Thevenin Theorem, the value of V is %d V",v1)); + +//applying Norton's Theorem +//Norton's equivalent resistance, r_n is same as r_AB +r_n=((r3+r5)*r2)/((r3+r5)+r2); +I_n=(v1-v2)/r2; //since v_A=0 +I2=r_n*(I_n/(r4+r_n)); +v2=I2*r4; +disp(sprintf("By Norton Theorem, the value of V is %d V",v2)); + +//END + diff --git a/1445/CH1/EX1.59/Ex1_59.sce b/1445/CH1/EX1.59/Ex1_59.sce new file mode 100644 index 000000000..39e9ba594 --- /dev/null +++ b/1445/CH1/EX1.59/Ex1_59.sce @@ -0,0 +1,23 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 59 + +disp("CHAPTER 1"); +disp("EXAMPLE 59"); + +//SOLUTION + +//I1+I2=20...............eq (1) +//-I1+I2=10..............eq (2) +//solving the simultaneous equations by matrix method + +A=[1 1;-1 1]; +b=[20;10]; +I=inv(A)*b; +I1=I(1,:); //to access 1st element of 2X1 matrix +I2=I(2,:); //to access 2nd element of 2X1 matrix +disp(sprintf("Current I1= %d A",I1)); +disp(sprintf("Current I2= %d A",I2)); + +//END + + diff --git a/1445/CH1/EX1.6/Ex1_6.sce b/1445/CH1/EX1.6/Ex1_6.sce new file mode 100644 index 000000000..f5e6536c4 --- /dev/null +++ b/1445/CH1/EX1.6/Ex1_6.sce @@ -0,0 +1,27 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 6 + +disp("CHAPTER 1"); +disp("EXAMPLE 6"); + +//VARIABLE INITIALIZATION +n=4; //number of nodes +b=6; //number of branches + +//SOLUTION +m=b-n+1; //number of mesh equations +disp(sprintf("Number of mesh equations are %d",m)); +nd=n-1; //number of node equations +disp(sprintf("Number of node equations are %d",nd)); + +//(5/2)I1+(-2)I2+(-1/2)I3=4.....eq (1) +//(0)I1+(0)I2+(1)I3=-2..........eq (2) +//(-2)I1+(10/3)I2+(-1/3)I3=0....eq (3) +//using matrix method to solve the set of equations +A=[5/2 -2 -1/2;-2 10/3 -1/3;0 0 1]; +b=[4;0;-2]; +x=inv(A)*b; +I=x(1,:); //to access the 1st element of 3X1 matrix +disp(sprintf("The current from the source Vs is %d A",I)); + +//END diff --git a/1445/CH1/EX1.7/Ex1_7.sce b/1445/CH1/EX1.7/Ex1_7.sce new file mode 100644 index 000000000..0d1f19f9b --- /dev/null +++ b/1445/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,43 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 7 + +disp("CHAPTER 1"); +disp("EXAMPLE 7"); + +//VARIABLE INITIALIZATION +I1=1; //current source in Amperes +v1=4; //voltage source in Volts +v2=3; //voltage source in Volts +v3=6; //voltage source in Volts +r1=2; //resistance in Ohms +r2=2; //resistance in Ohms +r3=1; //resistance in Ohms +r4=3; //resistance in Ohms + +//SOLUTION +//converting all the voltage sources into current sources +I2=v1/r1; +I3=v2/r3; +I4=v3/r4; +disp(sprintf("The four current sources are %d A, %d A, %d A and %d A",I1,I2,I3,I4)); + +req1=(r1*r2)/(r1+r2); //parallel combination of resistors +req2=(r3*r4)/(r3+r4); +v2=(I1+I4)*req1; +v3=(I3-I2)*req2; +req=req1+req2; +v=v2+v3; +I=v/req; +disp("VOLTAGE EQUIVALENT CIRCUIT:"); +disp(sprintf(" Voltage source= %.2f V",v)); +disp(sprintf(" Equivalent resistance(in series)= %.2f Ω",req)); +disp("CURRENT EQUIVALENT CIRCUIT:"); +disp(sprintf(" Current source= %.2f A",I)); +disp(sprintf(" Equivalent resistance(in parallel)= %.2f Ω",req)); + +//END + + + + + diff --git a/1445/CH1/EX1.8/Ex1_8.sce b/1445/CH1/EX1.8/Ex1_8.sce new file mode 100644 index 000000000..5f83da65a --- /dev/null +++ b/1445/CH1/EX1.8/Ex1_8.sce @@ -0,0 +1,26 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 8 + +disp("CHAPTER 1"); +disp("EXAMPLE 8"); + +//VARIABLE INITIALIZATION +I=2; //current source in Amperes +r1=1/2; //in Ohms +r2=1/2; //in Ohms + +//SOLUTION +//the current source of 2A is converted into two 1V sources +v1=I*r1; +v2=I*r2; +disp(sprintf("The voltage sources after conversion are %d V and %d V",v1,v2)); +//(5/2)I1+(-1)I2=0........eq (1) //applying KVL in mesh 1 +//(-1)I1+(7/2)I2=2........eq (2) //applying KVL in mesh 2 +//using matrix method to solve the set of equations +A=[5/2 -1;-1 7/2]; +b=[2;2]; +x=inv(A)*b; +x=x(2,:); +disp(sprintf("The current in 2Ω resistor is %.2f A",x)); + +//END diff --git a/1445/CH1/EX1.9/Ex1_9.sce b/1445/CH1/EX1.9/Ex1_9.sce new file mode 100644 index 000000000..8e91926d2 --- /dev/null +++ b/1445/CH1/EX1.9/Ex1_9.sce @@ -0,0 +1,32 @@ +//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS +//Example 9 + +disp("CHAPTER 1"); +disp("EXAMPLE 9"); + +//VARIABLE INITIALIZATION +r1=1; //in Ohms +r2=2; //in Ohms +r3=3; //in Ohms +r4=1; //in Ohms + +//SOLUTION + +//delta values +rab=r1; //between points a and b +rac=r2; //between points a and c +rbc=r3; //between points b and c +//coverting delta abc into star with points a, b and c +//star values ra, rb and rc +r=rab+rbc+rac; //'r' is the resistance that appears in the denominator of the equation of delta-star conversion +ra=(rab*rac)/r; +rb=(rab*rbc)/r; +rc=(rbc*rac)/r; +req1=r1+r4; +req2=rb+r2; +req3=(req1*req2)/(req1+req2); +req4=ra+req3; +disp(sprintf("The equivalent input resistance is %.2f Ω",req4)); + +//END + |