| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Signal Processing Toolbox |
| Contents | Index |
| Learn more about Signal Processing Toolbox |
[A,B,C,D] = tf2ss(b,a)
tf2ss converts the parameters of a transfer function representation of a given system to those of an equivalent state-space representation.
[A,B,C,D] = tf2ss(b,a) returns the A, B, C, and D matrices of a state space representation for the single-input transfer function
![]()
in controller canonical form
![]()
The input vector a contains the denominator coefficients in descending powers of s. The rows of the matrix b contain the vectors of numerator coefficients (each row corresponds to an output). In the discrete-time case, you must supply b and a to correspond to the numerator and denominator polynomials with coefficients in descending powers of z.
For discrete-time systems you must make b have the same number of columns as the length of a. You can do this by padding each numerator represented in b (and possibly the denominator represented in the vector a) with trailing zeros. You can use the function eqtflength to accomplish this if b and a are vectors of unequal lengths.
The tf2ss function is part of the standard MATLAB language.
Consider the system:

To convert this system to state-space, type
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
Note There is disagreement in the literature on naming conventions for the canonical forms. It is easy, however, to generate similarity transformations that convert these results to other forms. |
sos2ss, ss2tf, tf2sos, tf2zp, tf2zpk, zp2ss
![]() | tf2sos | tf2zp | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |