Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
459e1a3aa3908dd371ab80f0d7615d90 |
User & Date: | gawthrop@users.sourceforge.net on 1996-08-25 10:13:37 |
Other Links: | branch diff | manifest | tags |
Context
1996-08-26
| ||
09:46:37 | Changed $() to `` check-in: 9fd5edce9d user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
1996-08-25
| ||
10:13:37 | Initial revision check-in: 459e1a3aa3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
10:07:05 |
Remove a du state ment causaing touble - but needs more work. check-in: fc06d98918 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/cse2csm_r version [6480ffc8bd].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: cse2csm_r # Constrained-state equation to linear constrained-state matrices conversion # P.J.Gawthrop 6th September 1991, May 1994 # Copyright (c) P.J.Gawthrop, 1991, 1994. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### # Inform user echo Creating $1_csm.r # Remove the old log file rm -f cse2csm_r.log # Use reduce to accomplish the transformation reduce >cse2csm_r.log << EOF in "$1_def.r"; in "$1_cse.r"; in "$1_cr.r"; in "$1_sympar.r"; OFF Echo; OFF Nat; % Find MTTA : the A matrix matrix MTTA(MTTNx,MTTNx); FOR j := 1:MTTNx DO BEGIN xj := MTTX(j,1); FOR i := 1:MTTNx DO MTTA(i,j) := df(MTTEdx(i,1), xj, 1); END; % Find MTTB : the B matrix matrix MTTB(MTTNx,MTTNu); FOR j := 1:MTTNu DO BEGIN uj := MTTU(j,1); FOR i := 1:MTTNx DO MTTB(i,j) := df(MTTEdx(i,1), uj, 1); END; % Find MTTC : the C matrix matrix MTTC(MTTNy,MTTNx); FOR i := 1:MTTNy DO FOR j := 1:MTTNx DO BEGIN xj := MTTX(j,1); MTTC(i,j) := df(MTTY(i,1), xj, 1); END; % Find MTTD : the D matrix matrix MTTD(MTTNy,MTTNu); FOR i := 1:MTTNy DO FOR j := 1:MTTNu DO BEGIN xj := MTTU(j,1); MTTD(i,j) := df(MTTY(i,1), xj, 1); END; %Substitute the ss values in "$1_ss.r"; %Create the output file OUT "$1_csm.r"; %Write out the matrices. IF MTTNx>0 THEN BEGIN write "matrix MTTE(", MTTNx, ",", MTTNx, ");"; FOR i := 1:MTTNx DO FOR j := 1:MTTNx DO IF MTTE(i,j) NEQ 0 THEN write "MTTE(", i, ",", j, ") := ", MTTE(i,j); write "matrix MTTA(", MTTNx, ",", MTTNx, ");"; FOR i := 1:MTTNx DO FOR j := 1:MTTNx DO IF MTTA(i,j) NEQ 0 THEN write "MTTA(", i, ",", j, ") := ", MTTA(i,j); END; IF MTTNx>0 THEN IF MTTNu>0 THEN BEGIN write "matrix MTTB(", MTTNx, ",", MTTNu, ");"; FOR i := 1:MTTNx DO FOR j := 1:MTTNu DO IF MTTB(i,j) NEQ 0 THEN write "MTTB(", i, ",", j, ") := ", MTTB(i,j); END; %Write it out IF MTTNy>0 THEN IF MTTNx>0 THEN BEGIN write "matrix MTTC(", MTTNy, ",", MTTNx, ");"; FOR i := 1:MTTNy DO FOR j := 1:MTTNx DO IF MTTC(i,j) NEQ 0 THEN write "MTTC(", i, ",", j, ") := ", MTTC(i,j); END; IF MTTNy>0 THEN IF MTTNu>0 THEN BEGIN write "matrix MTTD(", MTTNy, ",", MTTNu, ");"; FOR i := 1:MTTNy DO FOR j := 1:MTTNu DO IF MTTD(i,j) NEQ 0 THEN write "MTTD(", i, ",", j, ") := ", MTTD(i,j); END; write "END;"; SHUT "$1_csm.r"; EOF # Now invoke the standard error handling. mtt_error_r cse2csm_r.log |
Added mttroot/mtt/bin/trans/dm2tf_r version [7b35edd35c].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### # Bourne shell script: dm2tf_r # Reduce descriptor matrices to transfer function # P.J.Gawthrop 8th May 1991, Dec 1993, April 1994. # Copyright (c) P.J.Gawthrop, 1991, 1993, 1994. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### #Inform user echo Creating $1_tf.r # Remove the old log file rm -f dm2tf_r.log # Use reduce to accomplish the transformation reduce >dm2tf_r.log << EOF %ON FLOAT; IN "$1_def.r"; IN "$1_dm.r"; OFF Echo; OFF Nat; %create sE-A %MTT_SEA := s*MTTE-MTTA; %Find the denominator of the TF - det(sE-A); %comden := det(MTT_SEA); %Find the Adjoint transpose. %matrix AdjT(MTTNx,MTTNx); %FOR i := 1:MTTNx DO % BEGIN % FOR j := 1:MTTNx DO % AdjT(i,j) := cofactor(MTT_SEA,i,j); % END; %Adj := TP(AdjT); %Find the numerator matrix %Num := MTTC*Adj*MTTB + MTTD*comden; %Create the transfer function matrix MTTTF := MTTD; IF MTTNy>0 THEN MTTTF := MTTTF + (MTTC * ((s*MTTE-MTTA)^-1) * MTTB); %MTTTF := Num/comden; OUT "$1_tf.r"; %Declare the transfer function matrix write "matrix MTTTF(", MTTNy, ",", MTTNu, ")$"$ %And write it. %MTTTF := MTTTF; FOR i := 1:MTTNy DO BEGIN FOR j := 1:MTTNu DO IF MTTTF(i,j) NEQ 0 THEN write "MTTTF(", i, ",", j, ") := ", MTTTF(i,j)$ END; write ";END;"$ SHUT "$1_tf.r"; EOF # Now invoke the standard error handling. mtt_error_r dm2tf_r.log |