Skip to main content

State-Space ⇄ Transfer Function Calculator

Turn A, B, C, D into G(s), or G(s) into canonical forms, with every step. Eigenvalues, eigenvectors, controllability, observability and e^(At). Free.

State-Space Calculator

ẋ = Ax + Bu, y = Cx + Du ⇄ G(s), with eigenvalues and e^(At)

Rows separated by ; and entries by spaces, like MATLAB: [0 1; -2 -3]. Fractions and decimals are fine. Leave D as 0 if there is no direct term. Up to 6 states, 3 inputs and 3 outputs.

Examples:

State space to transfer function: examples

Pick these in the calculator to see every step. All checked with SymPy.

Model (D = 0 unless shown)G(s)Eigenvalues
A = [0 1; −2 −3], B = [0; 1], C = [1 0]1/((s + 1)(s + 2))−1, −2
A = [0 1; −5 −2], B = [0; 1], C = [3 1](s + 3)/(s² + 2s + 5)−1 ± 2j
A = [0 1 0; 0 0 1; −6 −11 −6], B = [0; 0; 1], C = [1 0 0]1/((s + 1)(s + 2)(s + 3))−1, −2, −3
A = diag(−1, −2, −3), B = [1; 1; 1], C = [1 1 0](2s + 3)/((s + 1)(s + 2))−1, −2, −3 (−3 is unobservable)
A = [0 1; 0 0], B = [0; 1], C = [1 0], D = 2(2s² + 1)/s²0, 0

Transfer function to state space: controllable canonical form

The observable canonical form is the transpose: Aᵀ, with B and C swapped.

G(s)ABCD
(s + 3)/(s² + 3s + 2)[0 1; −2 −3][0; 1][3 1]0
10/(s(s + 2)(s + 5))[0 1 0; 0 0 1; 0 −10 −7][0; 0; 1][10 0 0]0
(2s² + 3)/(s² + 2s + 5)[0 1; −5 −2][0; 1][−7 −4]2

Common questions

How do you convert state space to a transfer function?

Take the Laplace transform of ẋ = Ax + Bu, y = Cx + Du with zero initial state: G(s) = C(sI − A)⁻¹B + D. In practice (sI − A)⁻¹ = adj(sI − A)/det(sI − A), so the denominator of G(s) is the characteristic polynomial det(sI − A).

How do you convert a transfer function to state space?

Make the denominator start with sⁿ, split off a constant if the top and bottom have the same degree, then read the coefficients into a canonical form. In the controllable canonical form A has ones above the diagonal and the negated denominator coefficients in its last row, B = [0 … 0 1]ᵀ and C holds the numerator coefficients. The model is not unique: the observable canonical form (A transposed, B and C swapped) gives the same G(s).

Are the eigenvalues of A the poles of G(s)?

Every pole of G(s) is an eigenvalue of A. The converse holds only for a minimal realization: if a mode is uncontrollable or unobservable, its eigenvalue cancels out of G(s). LapCalc checks the ranks of the controllability and observability matrices to tell you which case you have.

What is the state transition matrix?

Φ(t) = e^(At) = L⁻¹{(sI − A)⁻¹}. With no input the state is x(t) = Φ(t)x(0). LapCalc inverts each entry of (sI − A)⁻¹ exactly and checks the result against a numerical matrix exponential.

Is it free?

Yes. Both directions, every step and the checks are free.

Transfer Function Workbench · Characteristic Equation Calculator · Laplace Transform Calculator