diff options
Diffstat (limited to '104/CH3')
-rwxr-xr-x | 104/CH3/EX3.1/3_1.sce | 11 | ||||
-rwxr-xr-x | 104/CH3/EX3.10/3_10.sce | 29 | ||||
-rwxr-xr-x | 104/CH3/EX3.11/3_11.sce | 38 | ||||
-rwxr-xr-x | 104/CH3/EX3.3/3_3.sce | 8 | ||||
-rwxr-xr-x | 104/CH3/EX3.4/3_4.sce | 22 | ||||
-rwxr-xr-x | 104/CH3/EX3.5/3_5.sce | 29 | ||||
-rwxr-xr-x | 104/CH3/EX3.6/3_6.sce | 26 | ||||
-rwxr-xr-x | 104/CH3/EX3.7/3_7.sce | 21 | ||||
-rwxr-xr-x | 104/CH3/EX3.9/3_9.sce | 11 |
9 files changed, 195 insertions, 0 deletions
diff --git a/104/CH3/EX3.1/3_1.sce b/104/CH3/EX3.1/3_1.sce new file mode 100755 index 000000000..41057abf6 --- /dev/null +++ b/104/CH3/EX3.1/3_1.sce @@ -0,0 +1,11 @@ +//closed loop transfer function matrix
+s=%s
+G=[1/(s+1) -1/s;2 1/(s+2)]
+H=[1 0;0 1]
+GH=G*H
+disp(GH,"G(s)H(s)=")
+I=[1 0;0 1]
+x=I+GH
+y=inv(x)
+M=y*G
+disp(M,"M(s)=")
\ No newline at end of file diff --git a/104/CH3/EX3.10/3_10.sce b/104/CH3/EX3.10/3_10.sce new file mode 100755 index 000000000..20d533b75 --- /dev/null +++ b/104/CH3/EX3.10/3_10.sce @@ -0,0 +1,29 @@ +//applying gain formula to state diagram 3-22
+//r(t),x1(t) and x2(t) are input nodes
+//y(t) is output node
+//superposition principle holds good
+
+syms s r x1 x2
+//r(t) as input node and y(t) as output node
+M1=0
+delta1=1
+delta=1
+a=(M1*delta1)/delta
+y1=a*r
+disp(y1,"y1(t)=")
+
+//x1(t) as input node and y(t) as output node
+M1=1
+delta1=1
+b=(M1*delta1)/delta
+y2=b*x1
+disp(y2,"y2(t)=")
+
+//x2(t) as input node and y(t) as output node
+M1=0
+delta1=1
+c=(M1*delta1)/delta
+y3=c*x2
+disp(y3,"y3(t)=")
+
+disp(y1+y2+y3,"y(t)=")
diff --git a/104/CH3/EX3.11/3_11.sce b/104/CH3/EX3.11/3_11.sce new file mode 100755 index 000000000..9725c3597 --- /dev/null +++ b/104/CH3/EX3.11/3_11.sce @@ -0,0 +1,38 @@ +//applying gain formula to state diagram in figure 3-23(b)
+//r(t),x1(t),x2(t) and x3(t) are input nodes
+//y(t) is output node
+//superposition principle holds good
+
+syms s a0 a1 a2 a3 r x1 x2 x3
+//r(t) as input node and y(t) as output node
+M1=0
+delta1=1
+L11=-a0*a3
+delta=1-(L11)
+a=(M1*delta1)/delta
+y1=a*r
+disp(y1,"y1(t)=")
+
+//x1(t) as input node and y(t) as output node
+M1=1
+delta1=1
+b=(M1*delta1)/delta
+y2=b*x1
+disp(y2,"y2(t)=")
+
+//x2(t) as input node and y(t) as output node
+M1=0
+delta1=1
+c=(M1*delta1)/delta
+y3=c*x2
+disp(y3,"y3(t)=")
+
+//x3(t) as input node and y(t) as output node
+M1=a0
+delta1=1
+d=(M1*delta1)/delta
+y4=d*x3
+disp(y4,"y4(t)=")
+
+disp(y1+y2+y3+y4,"y(t)=")
+
diff --git a/104/CH3/EX3.3/3_3.sce b/104/CH3/EX3.3/3_3.sce new file mode 100755 index 000000000..ef6ee3e5d --- /dev/null +++ b/104/CH3/EX3.3/3_3.sce @@ -0,0 +1,8 @@ +//mason's gain formula applied to SFG in figure 3-15
+syms G H
+M1=G //as seen from SFG there is only one forward path
+L11=-G*H //only one loop and no non touching loops
+delta=1-L11
+delta1=1
+Y=M1*delta1/delta
+disp(Y,"Y(s)/R(s)=")
\ No newline at end of file diff --git a/104/CH3/EX3.4/3_4.sce b/104/CH3/EX3.4/3_4.sce new file mode 100755 index 000000000..eba49d595 --- /dev/null +++ b/104/CH3/EX3.4/3_4.sce @@ -0,0 +1,22 @@ +//masons gain formula applied to SFG in figure 3-8(d)
+//two forward paths
+syms a12 a23 a24 a25 a32 a34 a43 a44 a45
+M1=a12*a23*a34*a45
+M2=a12*a25
+//four loops
+L11=a23*a32
+L21=a34*a43
+L31=a24*a32*a43
+L41=a44
+//one pair of non touching loops
+L12=a23*a32*a44
+delta=1-(L11+L21+L31+L41)+(L12)
+delta1=1
+delta2=1-(L21+L41)
+x=(M1*delta1+M2*delta2)/delta
+disp(x,"y5/y1=")
+//if y2 is output node
+M1=a12
+delta1=1-(L21+L41)
+y=(M1*delta1)/delta
+disp(y,"y2/y1=")
\ No newline at end of file diff --git a/104/CH3/EX3.5/3_5.sce b/104/CH3/EX3.5/3_5.sce new file mode 100755 index 000000000..5dfc067ad --- /dev/null +++ b/104/CH3/EX3.5/3_5.sce @@ -0,0 +1,29 @@ +//mason's gain formula applied to SFG in figure 3-16
+//y2 as output node
+syms G1 G2 G3 G4 G5 H1 H2 H3 H4
+M1=1
+L11=-G1*H1
+L21=-G3*H2
+L31=G1*G2*G3*-H3
+L41=-H4
+L12=G1*H1*G3*H2
+L22=G1*H1*H4
+L32=G3*H2*H4
+L42=-G1*G2*G3*H3*H4
+L13=-G1*H1*G3*H2*H4
+delta=1-(L11+L21+L31+L41)+(L12+L22+L32+L42)+L13
+delta1=1-(L21+L41)+(L32)
+x=M1*delta1/delta
+disp(x,"y2/y1=")
+//y4 as output node
+M1=G1*G2
+delta1=1-(L41)
+y=M1*delta1/delta
+disp(y,"y4/y1=")
+//y6 or y7 as output node
+M1=G1*G2*G3*G4
+M2=G1*G5
+delta1=1
+delta2=1-(L21)
+z=(M1*delta1+M2*delta2)/delta
+disp(z,"y6/y1=y7/y1=")
\ No newline at end of file diff --git a/104/CH3/EX3.6/3_6.sce b/104/CH3/EX3.6/3_6.sce new file mode 100755 index 000000000..21eaff84e --- /dev/null +++ b/104/CH3/EX3.6/3_6.sce @@ -0,0 +1,26 @@ +//mason's gain formula applied to SFG in figure 3-16
+//y2 as output node
+syms G1 G2 G3 G4 G5 H1 H2 H3 H4
+M1=1
+L11=-G1*H1
+L21=-G3*H2
+L31=G1*G2*G3*-H3
+L41=-H4
+L12=G1*H1*G3*H2
+L22=G1*H1*H4
+L32=G3*H2*H4
+L42=-G1*G2*G3*H3*H4
+L13=-G1*H1*G3*H2*H4
+delta=1-(L11+L21+L31+L41)+(L12+L22+L32+L42)+L13
+delta1=1-(L21+L41)+(L32)
+x=M1*delta1/delta
+disp(x,"y2/y1=")
+//y7 as output node
+M1=G1*G2*G3*G4
+M2=G1*G5
+delta1=1
+delta2=1-(L21)
+y=(M1*delta1+M2*delta2)/delta
+disp(y,"y7/y1=")
+z=y/x // (y7/y2)=(y7/y1)/(y2/y1)
+disp(z,"y7/y2=")
\ No newline at end of file diff --git a/104/CH3/EX3.7/3_7.sce b/104/CH3/EX3.7/3_7.sce new file mode 100755 index 000000000..3a2ab3ee4 --- /dev/null +++ b/104/CH3/EX3.7/3_7.sce @@ -0,0 +1,21 @@ +//block diagram is converted to SFG
+//mason's gain formula applied to SFG in figure 3-17
+//E as output node
+syms G1 G2 G3 G4 H1 H2
+M1=1
+L11=-G1*G2*H1
+L21=-G2*G3*H2
+L31=-G1*G2*G3
+L41=-G1*G4
+L51=-G4*H2
+delta=1-(L11+L21+L31+L41+L51)
+delta1=1-(L21+L51+L11)
+x=M1*delta1/delta
+disp(x,"E(s)/R(s)=")
+//Y as output node
+M1=G1*G2*G3
+M2=G1*G4
+delta1=1
+delta2=1
+y=(M1*delta1+M2*delta2)/delta
+disp(y,"Y(s)/R(s)=")
\ No newline at end of file diff --git a/104/CH3/EX3.9/3_9.sce b/104/CH3/EX3.9/3_9.sce new file mode 100755 index 000000000..c36cc08d4 --- /dev/null +++ b/104/CH3/EX3.9/3_9.sce @@ -0,0 +1,11 @@ +//finding transfer function from state diagram by applying gain formula
+//state diagram is shown in fifure 3-21
+syms s
+//initial conditions are sset to zero
+M1=s^-1*s^-1
+L11=-3*s^-1
+L21=-2*s^-1*s^-1
+delta=1-(L11+L21)
+delta1=1
+x=M1*delta1/delta
+disp(x,"Y(s)/R(s)=")
\ No newline at end of file |