summaryrefslogtreecommitdiff
path: root/Working_Examples/154/CH10
diff options
context:
space:
mode:
Diffstat (limited to 'Working_Examples/154/CH10')
-rwxr-xr-xWorking_Examples/154/CH10/EX10.4/ch10_4.sce27
-rwxr-xr-xWorking_Examples/154/CH10/EX10.5/ch10_5.sce28
-rwxr-xr-xWorking_Examples/154/CH10/EX10.7/ch10_7.sce45
3 files changed, 100 insertions, 0 deletions
diff --git a/Working_Examples/154/CH10/EX10.4/ch10_4.sce b/Working_Examples/154/CH10/EX10.4/ch10_4.sce
new file mode 100755
index 0000000..bd68900
--- /dev/null
+++ b/Working_Examples/154/CH10/EX10.4/ch10_4.sce
@@ -0,0 +1,27 @@
+clc
+disp("Problem 10.4")
+printf("\n")
+
+//For V1
+Ro1=25
+Theta1=143.13
+//For V1
+Ro2=11.2
+Theta2=26.57
+//We need to find V1/V2
+//Let V=V1/V2
+Vmag=(Ro1/Ro2)
+Vph=Theta1-Theta2
+x=Vmag*cos((Vph*%pi)/180);
+y=Vmag*sin((Vph*%pi)/180);
+z=complex(x,y)
+//Let V1+V2=V12
+x1=Ro1*cos((Theta1*%pi)/180);
+y1=Ro1*sin((Theta1*%pi)/180);
+z1=complex(x1,y1)
+x2=Ro2*cos((Theta2*%pi)/180);
+y2=Ro2*sin((Theta2*%pi)/180);
+z2=complex(x2,y2)
+V12=z1+z2
+[R,Theta]=polar(V12)
+printf("V1/V2=%0.2f+i*%3.2f \nV1+V2=%3.2f(%3.2f deg)",x,y,R,(Theta*180)/%pi) \ No newline at end of file
diff --git a/Working_Examples/154/CH10/EX10.5/ch10_5.sce b/Working_Examples/154/CH10/EX10.5/ch10_5.sce
new file mode 100755
index 0000000..87f47e8
--- /dev/null
+++ b/Working_Examples/154/CH10/EX10.5/ch10_5.sce
@@ -0,0 +1,28 @@
+clc
+disp("Problem 10.5")
+printf("\n")
+
+printf("Given")
+disp("Voltage is 100(45 deg)")
+disp("Current is 5(15 deg)")
+//For V
+Ro1=100
+Theta1=45
+//For I
+Ro2=5
+Theta2=15
+//We need to find V/I=Z
+
+Zmag=(Ro1/Ro2)
+Zph=Theta1-Theta2
+x=Zmag*cos((Zph*%pi)/180);
+y=Zmag*sin((Zph*%pi)/180);
+z=complex(x,y)
+//Let Y=1/Z
+Ymag=(Ro2/Ro1)
+Yph=Theta2-Theta1
+x1=Ymag*cos((Yph*%pi)/180);
+y1=Ymag*sin((Yph*%pi)/180);
+z1=complex(x1,y1)
+
+printf("R=%3.2fohm XL=%3.2fH \nG=%0.3fS BL=%0.3fS",x,y,x1,abs(y1)); \ No newline at end of file
diff --git a/Working_Examples/154/CH10/EX10.7/ch10_7.sce b/Working_Examples/154/CH10/EX10.7/ch10_7.sce
new file mode 100755
index 0000000..13299d1
--- /dev/null
+++ b/Working_Examples/154/CH10/EX10.7/ch10_7.sce
@@ -0,0 +1,45 @@
+clc
+disp("Problem 10.7")
+printf("\n")
+
+printf("Voltage v1=5*cos(w1*t)")
+printf("Voltage v2=10*cos(w2*t+60)")
+//The circuit is modeled as
+disp("Resistance is 10ohm and inductance is 5mH")
+R=10;L=5*10^-3;
+disp("a)")
+w1=2000;w2=2000;
+//Let Z be the impedance of the coil
+Z1=R+%i*L*w1
+Z2=R+%i*L*w2
+//Let V be phasor voltage between the terminals
+Vmag=10;
+Vph=60;
+x=Vmag*cos((Vph*%pi)/180);
+y=Vmag*sin((Vph*%pi)/180);
+z=complex(x,y)
+v=5-z;
+//Let I be the current
+I=v/Z1
+[R,Theta]=polar(I)
+printf("i=%0.2f*cos(%dt%d deg)",R,w1,(Theta*180)/%pi);
+
+disp("b)")
+R=10;L=5*10^-3;
+w1=2000;w2=4000;
+//Let Z be the impedance of the coil
+Z1=R+%i*L*w1
+Z2=R+%i*L*w2
+V1=5;
+//By applying superposition i=i1-i2
+I1=V1/Z1
+[R,Theta]=polar(I1)
+printf("i1=%0.2f*cos(%dt%d deg)\n",R,w1,(Theta*180)/%pi);
+V2mag=10;V2ph=60;
+I2=z/Z2
+[R1,Theta1]=polar(I2)
+printf("i2=%0.2f*cos(%dt%3.2f deg)\n",R1,w2,(Theta1*180)/%pi);
+//i=i1-i2
+printf("i=%0.2f*cos(%dt%d deg)-%0.2f*cos(%dt%3.2f deg)\n",R,w1,(Theta*180)/%pi,R1,w2,(Theta1*180)/%pi)
+
+