ss2tfc

Convert state-space model parameters to transfer function model parameters.

Syntax

[NUM, DEN] = ss2tfc(A, B, C, D)

[NUM, DEN] = ss2tfc(A, B, C, D, K)

Inputs

A
The state matrix (n x n), where n is the number of states.
B
The input matrix (n x p), where p is the number of inputs.
C
The output matrix (q x n), where q is the number of outputs.
D
The direct transmission matrix (q x p).
K (optional)
Scalar requesting only input K.

Outputs

NUM
The numerator polynomial coefficients, stored as a vector or as a cell array (q x p) of row vectors.
DEN
The denominator polynomial coefficients, stored as a vector or as a cell array (q x p) of row vectors.

Examples

An SISO system:
sys_tf = tf([1],[1 3 4]);
sys = ss(sys_tf);
[tf_num,tf_den] = ss2tfc(sys.a,sys.b,sys.c,sys.d)
tf_num = 1
tf_den = [Matrix] 1 x 3
1  3  4
An MIMO system with 3 inputs and 2 outputs, selecting input 2:
A = [0.9,  0.0,  0.6, -1.4, -4.2;
     0.2,  0.1, -0.2,  0.5,  0.6;
    -4.3,  0.0,  2.2,  0.0,  2.4;
    -3.7, -0.5,  2.4, -0.6,  2.7;
     6.4,  0.1, -4,   -0.5, -4];

B = [-0.1, -0.1,  0.0;
      0.0,  0.0,  0.1;
     -0.1,  0.2, -0.1;
      0.2,  0.2, -0.6;
      0.2, -0.1,  0.1];
 
C = [2,  7, -2,  5,  1;
     0, -1,  3,  0,  2];

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

[num, den] = ss2tfc(A, B, C, D, 2)
num = 
{
  [1,1] [Matrix] 1 x 5
  0.30000  0.52000  8.02400  14.23650  3.95450
  [2,1] [Matrix] 1 x 5
  0.40000  0.19000  9.73500  5.46010  -0.09758
}
den = 
{
  [1,1] [Matrix] 1 x 6
  1.00000  1.40000  25.39000  35.10400  15.45680  -0.62960
  [2,1] [Matrix] 1 x 6
  1.00000  1.40000  25.39000  35.10400  15.45680  -0.62960
}

Comments

Transfer function coefficients are stored in descending powers of s or z.

ss2tfc supports MIMO transfer functions via cell outputs (unlike ss2tf). Vector outputs are produced only for SISO systems. The function uses SLICOT algorithm tb04ad and attempts to produce a minimal system.