Signal Processing Toolbox | Help Desk |
tf2ss
Transfer function to state-space conversion.
[A,B,C,D
] = tf2ss(num,den)
tf2ss
converts a transfer function representation of a given system to an equivalent state-space representation.
[A,B,C,D] = tf2ss(num,den)
finds a state-space representation:den
contains the denominator coefficients in descending powers of s. Array num
contains the numerator coefficients with as many rows as there are outputs y. tf2ss
returns the A
, B
, C
, and D
matrices in controller canonical form.
tf2ss
also works for discrete systems, but you must pad the numerator with trailing zeros to make it the same length as the denominator.
The function ss2tf
is the inverse of tf2ss
.
Consider the systemnum = [0 2 3; 1 2 1];
den = [ 1 0.4 1];
[A,B,C,D
] = tf2ss(num,den)
A =
-0.4000 -1.0000
1.0000 0
B =
1
0
C =
2.0000 3.0000
1.6000 0
D =
0
1
There is disagreement in the literature on naming conventions for the canonical forms. It is easy, however, to generate similarity transformations that convert to other forms. For example:
T = fliplr(eye(n));
A = T\A*
T;
tf2ss
writes the output in controller canonical form by inspection.