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 --- 46/CH30/EX30.1/Example30_1.sce | 24 ++++++++++++++++++++++++ 46/CH30/EX30.2/Example30_2.sce | 26 ++++++++++++++++++++++++++ 46/CH30/EX30.3/Example30_3.sce | 31 +++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100755 46/CH30/EX30.1/Example30_1.sce create mode 100755 46/CH30/EX30.2/Example30_2.sce create mode 100755 46/CH30/EX30.3/Example30_3.sce (limited to '46/CH30') diff --git a/46/CH30/EX30.1/Example30_1.sce b/46/CH30/EX30.1/Example30_1.sce new file mode 100755 index 000000000..04d59a57e --- /dev/null +++ b/46/CH30/EX30.1/Example30_1.sce @@ -0,0 +1,24 @@ +//Example 30.1 +clc +A1=1; +A2=1/2; +R1=1/2; +R2=2; +R3=1; +A=[-1/(R1*A1)-1/(R3*A1) 1/(A1*R1);1/(R1*A2) -1/(R2*A2)-1/(A2*R1)] +B=[1/A1 0;0 1/A2] +syms s M1 M2; +I=eye(2,2) +Gp=inv(s*I-A)*B +G11=Gp(1,1) +G12=Gp(1,2) +G21=Gp(2,1) +G22=Gp(2,2) +M=[M1;M2] +Cs=inv(s*I-A)*B*M +M1=1/s; +M2=0; +Cs=eval(Cs) +M1=0; +M2=1/s; +Cs=eval(Cs) \ No newline at end of file diff --git a/46/CH30/EX30.2/Example30_2.sce b/46/CH30/EX30.2/Example30_2.sce new file mode 100755 index 000000000..216f176ef --- /dev/null +++ b/46/CH30/EX30.2/Example30_2.sce @@ -0,0 +1,26 @@ +//Example 30.2 +clc +syms s K1 K2 +Gc11=K1; +Gc22=K2; +A1=1; +A2=1/2; +R2=2; +R3=1; +//In this problem ,Gv is a unit diagonal matrix i.e., +Gv1=1; +Gv2=1; +A=[-1/(R1*A1)-1/(R3*A1) 1/(A1*R1);1/(R1*A2) -1/(R2*A2)-1/(A2*R1)] +B=[1/A1 0;0 1/A2] +I=eye(2,2) +Gp=inv(s*I-A)*B +G11=Gp(1,1) +G12=Gp(1,2) +G21=Gp(2,1) +G22=Gp(2,2) +Gc12=-G12*Gv2*Gc22/(G11*Gv1) +Gc21=-G21*Gv1*Gc11/(G22*Gv2) +Gv=[Gv1 0;0 Gv2] +Gc=[Gc11 Gc12;Gc21 Gc22] +Go=Gp*Gv*Gc; +Go=simple(Go) \ No newline at end of file diff --git a/46/CH30/EX30.3/Example30_3.sce b/46/CH30/EX30.3/Example30_3.sce new file mode 100755 index 000000000..77fc98570 --- /dev/null +++ b/46/CH30/EX30.3/Example30_3.sce @@ -0,0 +1,31 @@ +//Example 30.3 +clc +A1=1; +A2=1/2; +R1=1/2; +R2=2; +R3=1; +Gc11=K1; +Gc22=K2; +Gc12=0; +Gc21=0; +A=[-1/(R1*A1)-1/(R3*A1) 1/(A1*R1);1/(R1*A2) -1/(R2*A2)-1/(A2*R1)] +B=[1/A1 0;0 1/A2] +syms s; +I=eye(2,2) +Gp=inv(s*I-A)*B +G11=Gp(1,1) +G12=Gp(1,2) +G21=Gp(2,1) +G22=Gp(2,2) +Gv1=1; +Gv2=1; +Gm=I +Gv=[Gv1 0;0 Gv2] +Gc=[Gc11 Gc12;Gc21 Gc22] +Go=Gp*Gv*Gc; +Go=simple(Go) +//From Eq.(30.32) +P=det(I+Go*Gm) +disp('=0',simple(P)) + -- cgit