From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 154/CH15/EX15.4/ch15_4.sce | 34 ++++++++++++++++++++++++++++++++++ 154/CH15/EX15.7/ch15_7.sce | 29 +++++++++++++++++++++++++++++ 154/CH15/EX15.8/ch15_8.sce | 22 ++++++++++++++++++++++ 154/CH15/EX15.9/ch15_9.sce | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100755 154/CH15/EX15.4/ch15_4.sce create mode 100755 154/CH15/EX15.7/ch15_7.sce create mode 100755 154/CH15/EX15.8/ch15_8.sce create mode 100755 154/CH15/EX15.9/ch15_9.sce (limited to '154/CH15') diff --git a/154/CH15/EX15.4/ch15_4.sce b/154/CH15/EX15.4/ch15_4.sce new file mode 100755 index 000000000..a2703a407 --- /dev/null +++ b/154/CH15/EX15.4/ch15_4.sce @@ -0,0 +1,34 @@ +clc +disp("Example 15.4") +printf("\n") + +printf("Given") +disp("L1=0.1H L2=0.2H") +disp("i1=4A i2=10A") +L1=0.1;L2=0.2 +i1=4;i2=10; +//The energy stored in coupled coils is +disp("W=(L1*i1^2)/2+(L2*i2^2)/2+M*i1*i2") + +disp("a)") +M=0.1; +W=(L1*i1^2)/2+(L2*i2^2)/2+M*i1*i2; +printf("Total Energy in the coils=%3.2fJ\n",W); + +disp("b)") +M=sqrt(2)/10; +W=(L1*i1^2)/2+(L2*i2^2)/2+M*i1*i2; +printf("Total Energy in the coils=%3.2fJ\n",W); + +disp("c)") +M=-0.1; +W=(L1*i1^2)/2+(L2*i2^2)/2+M*i1*i2; +printf("Total Energy in the coils=%3.2fJ\n",W); + +disp("a)") +M=-sqrt(2)/10; +W=(L1*i1^2)/2+(L2*i2^2)/2+M*i1*i2; +printf("Total Energy in the coils=%3.2fJ\n",W); + + + diff --git a/154/CH15/EX15.7/ch15_7.sce b/154/CH15/EX15.7/ch15_7.sce new file mode 100755 index 000000000..86d933993 --- /dev/null +++ b/154/CH15/EX15.7/ch15_7.sce @@ -0,0 +1,29 @@ +clc +disp("Example 15.7") +printf("\n") + +printf("Given") +disp("N1=20 N2=N3=10") +disp("I2=10(-53.13 deg) I3=10(-45 deg)") +N1=20;N2=10;N3=10; +I2mag=10;I2ph=-53.13; +I3mag=10;I3ph=-45; +//From figure 15.14 +disp("N1*I1-N2*I2-N3*I3=0") +//Solving for I1 +Xmag=N2*I2mag +Xph=I2ph +x=Xmag*cos((Xph*%pi)/180); +y=Xmag*sin((Xph*%pi)/180); +z=complex(x,y) + +Ymag=N3*I3mag +Yph=I3ph +x1=Ymag*cos((Yph*%pi)/180); +y1=Ymag*sin((Yph*%pi)/180); +z1=complex(x1,y1) + +I1=(z+z1)/N1 +[R,Theta]=polar(I1); +printf("I1=%3.2f(%3.2f deg) A\n",R,(Theta*180)/%pi); + diff --git a/154/CH15/EX15.8/ch15_8.sce b/154/CH15/EX15.8/ch15_8.sce new file mode 100755 index 000000000..73b86558e --- /dev/null +++ b/154/CH15/EX15.8/ch15_8.sce @@ -0,0 +1,22 @@ +clc +disp("Example 15.8") +printf("\n") + +printf("Given") +disp("L1=0.2H L2=0.1H") +disp("M=0.1H R=10ohm") +disp("v1=142.3*sin(100*t)") +L1=0.2;L2=0.1 +M=0.1;R=10; +v1mag=142.3; +w=100; +//Let Input impedance be Z1 and can be calculated as +//From the equations in 15.10 +disp("Z1=%i*w*L1+((M*w)^2)/(Z2+%i*w*L2)") +Z1=%i*w*L1+((M*w)^2)/(R+%i*w*L2) +[R,Theta]=polar(Z1) +//If I1 is the input current +I1mag=v1mag/R +I1ph=-(Theta*180)/%pi +//In time domain form +printf("i1=%3.1f*sin(%d*t%3.1f deg) (A)",I1mag,w,I1ph); diff --git a/154/CH15/EX15.9/ch15_9.sce b/154/CH15/EX15.9/ch15_9.sce new file mode 100755 index 000000000..0d9f2fa3e --- /dev/null +++ b/154/CH15/EX15.9/ch15_9.sce @@ -0,0 +1,33 @@ +clc +disp("Example 15.9") +printf("\n") + +s=%s; +printf("Given") +disp("L1=0.2H L2=0.1H") +disp("M=0.1H R=10ohm") +disp("v1=u(t) a unit step function") +L1=0.2;L2=0.1 +M=0.1;R=10; +v1=1; +w=100; +//Let Input impedance be Z1 and can be calculated as +//From the equations in 15.10 +disp("Z1(s)=L1*s-((M*s)^2)/(R+L2*s)") +Z1=L1*s-(((M*s)^2)/(R+L2*s)) +//Proper rearranging of co-efficients +Num=Z1('num')/0.01 +Den=Z1('den')*100 + +disp(Num/Den,"Z1(s)") +Y1=1/Z1 +disp(Den/Num,"Y1(s)") + +//As the input is unit step function the value is 1V for t>0 +//In exponential form the value is represented as exp(s*t) with s=0 as the pole of Y1(s) + +//Therefore forced response +k=1/L1; +printf("Forced response i1,f=(%d*t) (A)\n",k); + + -- cgit