diff options
Diffstat (limited to '3432/CH7/EX7.9/Ex7_9.sce')
-rw-r--r-- | 3432/CH7/EX7.9/Ex7_9.sce | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/3432/CH7/EX7.9/Ex7_9.sce b/3432/CH7/EX7.9/Ex7_9.sce new file mode 100644 index 000000000..28a048851 --- /dev/null +++ b/3432/CH7/EX7.9/Ex7_9.sce @@ -0,0 +1,40 @@ +//Example 7.9
+//State Equations in Modal Canonical Form.
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//------------------------------------------------------------------
+//System transfer function
+s=poly(0,'s');
+g1=1/s^2;
+g2=-1/(s^2+2*s+4);
+Gs=g1+g2;
+//------------------------------------------------------------------
+// State space representation in modal canonical form
+sys1=tf2ss(g1);
+sys2=tf2ss(g2);
+[F1,G1,T1]=canon(sys1.A, sys1.B)
+H1=sys1.C*T1;
+
+[F2,G2,T2]=canon(sys2.A, sys2.B)
+H2=sys2.C*T2;
+
+F=[F1 zeros(2,2);zeros(2,2) F2];
+G=[G1;G2];
+H=[H1,H2];
+J=0;
+disp(J,"J",H,"H",G,"G",F,"F","System in modal canonical form")
+//------------------------------------------------------------------
+ //As Y=G*U; consatnts k1 and k2 are taken out from G1 and G2 will be
+ //multiplied to H1 and H2
+
+// So alternately, it can be reprsented as
+k1=-1;k2=-2;
+F=[F1 zeros(2,2);zeros(2,2) F2];
+G=[G1/k1;G2/k2];
+H=[H1*k1,H2*k2];
+J=0;
+disp(J,"J",H,"H",G,"G",F,"F","System in modal canonical form")
+//------------------------------------------------------------------
+
|