Rational Transfer Functions, Can we see them?

(Uses Matlab): ss, tf, State-Space Representation
Yes, Matlab ver 5 is very capable. Use LTI objects, the Linear-Time-Invariant Objects, "ss & tf", here is how to do it.

For (Sample1):


Recall, column vector x represents v1, v2 & is while u represents vi and is and y the outputs happen to be the same as x vector in our State-Space Representation,

x' = A x + B u
y = C x + D u

where:

A = [-1,0,-4000; 0,-2,2000; 0.5,-0.5,0]

B = [1,0; 0,2000; 0,0]

C = [1,0,0; 0,1,0; 0,0,1]

D = [0,0; 0,0; 0,0]



First use ss to generate the State Space Representation, say denote the result as HSS,
EDU>> HSS=ss(A,B,C,D); %add semi-colon to 'suppress' display.

Then use tf to generate ALL six transfer function rational expressions by,

EDU>> TF=tf(HSS); %suppress display.

Now we can display any one of the transfer function:

For v1 / vi use,

EDU>> TF(1,1)
Transfer function:
s^2 + 2 s + 1000
---------------------------------------
s^3 + 3 s^2 + 3002 s + 5000


For v2 / vi use,

EDU>> TF(2,1)
Transfer function:
1000
----------------------------------------
s^3 + 3 s^2 + 3002 s + 5000


For i / vi use,

EDU>> TF(3,1)
Transfer function:
0.5 s + 1
----------------------------------------
s^3 + 3 s^2 + 3002 s + 5000

Finally, to see the transfer functions: v1 / is , v2 / is & i / is simply invoke TF(n,2) for n=1,2,3 individually.


For (Sample 2):

For this sample, lets use m-script file,

%ss2tf2.m
b=2;
A=[0,1,0; -3,0,2; 2/b,0,-2/b];
B=[0;1;0];
C=[1,0,0];
D=0;
sys = ss(A,B,C,D);
sys

MATLAB produces the result,

EDUğ  
a = 
                        x1           x2           x3
           x1            0      1.00000            0
           x2     -3.00000            0      2.00000
           x3      1.00000            0     -1.00000
 
 
b = 
                        u1
           x1            0
           x2      1.00000
           x3            0
 
 
c = 
                        x1           x2           x3
           y1      1.00000            0            0
 
 
d = 
                        u1
           y1            0
 
Continuous-time system.

For the transfer function we execute,

EDUğ tf(sys)

Transfer function:
s + 1
--------------------------
s^3 + s^2 + 3 s + 1

EDUğ