| Signal Processing Toolbox | Search  Help Desk |
| tf2ss | Examples See Also |
Conversion of transfer function to state-space.
Syntax
[A,B,C,D] = tf2ss(b,a)
Description
tf2ss converts a transfer function representation of a given system to an equivalent state-space representation.
[A,B,C,D] = tf2ss(b,a)
finds a state-space representation:
a contains the denominator coefficients in descending powers of s. Matrix b 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 tf2ss function is part of the standard MATLAB language.
Example
Consider the system
b = [0 2 3; 1 2 1];
a = [1 0.4 1];
[A,B,C,D] = tf2ss(b,a)
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;
Algorithm
tf2ss writes the output in controller canonical form by inspection.
See Also
sos2ss |
Conversion of second-order sections to state-space. |
ss2tf |
Conversion of state-space to transfer function. |
tf2sos |
Conversion of transfer function to second-order sections. |
tf2zp |
Conversion of transfer function to zero-pole-gain. |
zp2ss |
Conversion of zero-pole-gain to state-space. |