Transfer Function To State Space Interactive Calculator

The Transfer Function to State Space Interactive Calculator converts continuous-time transfer functions into state-space representations, a fundamental transformation in modern control theory and system design. State-space models provide a unified framework for multi-input multi-output (MIMO) systems, nonlinear analysis, and optimal control synthesis. This calculator is essential for control engineers designing feedback systems, robotics engineers implementing model-based controllers, and researchers working with Kalman filters and observer design.

📐 Browse all free engineering calculators

System Diagram

Transfer Function To State Space Interactive Calculator Technical Diagram

Transfer Function to State Space Calculator

Comma-separated, highest order first
Comma-separated, highest order first
Comma-separated eigenvalues

Fundamental Equations

Transfer Function Form

G(s) = Y(s)/U(s) = (b0sm + b1sm-1 + ... + bm) / (a0sn + a1sn-1 + ... + an)

where n ≥ m (proper system), coefficients ai and bi are real constants

State Space Representation

State Equation: ẋ(t) = Ax(t) + Bu(t)

Output Equation: y(t) = Cx(t) + Du(t)

A: n×n state matrix, B: n×1 input matrix, C: 1×n output matrix, D: scalar feedthrough

Controllable Canonical Form

A = [0 1 0 ... 0; 0 0 1 ... 0; ...; -an -an-1 ... -a1]

B = [0; 0; ...; 1], C = n βn-1 ... β1]

Coefficients βi = bi - b0ai, normalized by a0 = 1

Observable Canonical Form

A = [0 0 ... -an; 1 0 ... -an-1; ...; 0 0 1 -a1]

B = n; βn-1; ...; β1], C = [0 0 ... 1]

Dual of controllable form, guaranteed observable

Diagonal (Modal) Form

A = diag(λ1, λ2, ..., λn)

λi are eigenvalues (poles), requires distinct eigenvalues, decouples state dynamics

Theory & Engineering Applications

Mathematical Foundation of State Space Realization

The transformation from transfer function to state space representation is a fundamental realization problem in linear systems theory. While a given transfer function uniquely defines input-output behavior, infinitely many state space realizations exist that produce identical external characteristics. This non-uniqueness arises because state variables are internal representations not directly observable from input-output data alone. The choice of realization depends on computational objectives, controller structure, and numerical conditioning requirements.

Canonical forms provide systematic construction methods with specific structural properties. Controllable canonical form places all parameters in the last row of the A matrix and creates a chain of integrators structure, guaranteeing full state controllability from a single input. This form is optimal for pole placement design since controller gains directly correspond to desired characteristic polynomial coefficients. Observable canonical form transposes this structure, placing parameters in the last column, ensuring full observability for state estimation and observer design. The companion matrix form, structurally similar to controllable form, arranges coefficients in the first row and facilitates root locus analysis.

Diagonal or modal realization requires eigenvalue decomposition and exists only when all poles are distinct. Each state variable corresponds to a single mode (eigenvalue), completely decoupling the state dynamics. This form reveals the natural frequency content and provides intuitive understanding of transient response components. For repeated eigenvalues, Jordan canonical form introduces superdiagonal ones, creating coupled mode pairs that represent resonant behavior or critical damping conditions.

Controllability and Observability Analysis

A critical insight often overlooked in introductory treatments is that while canonical forms guarantee structural controllability or observability, numerical ill-conditioning can render these properties practically unusable. The controllability matrix C = [B AB A²B ... An-1B] becomes increasingly ill-conditioned as system order grows, with condition numbers growing exponentially for high-order systems. A theoretically controllable system with rank(C) = n may have a condition number exceeding 1012, making controller computation numerically unstable.

The Hautus test provides an alternative rank condition that avoids forming high powers of A: a system is controllable if and only if rank([sI - A, B]) = n for all complex s. This frequency-domain test often provides better numerical stability and directly reveals which modes are uncontrollable by identifying specific eigenvalues where the rank condition fails. Similarly, observability testing via the Hautus criterion rank([sI - A; C]) = n avoids forming the observability matrix O = [C; CA; CA²; ...; CAn-1].

Practical Implementation Considerations

When implementing state space controllers in embedded systems or real-time applications, numerical precision limitations become critical. Fixed-point arithmetic processors require careful scaling of state variables to prevent overflow while maintaining resolution. Balanced realization, which equalizes controllability and observability Gramians, minimizes the dynamic range of state variables and reduces quantization effects. This form, though computationally more expensive to obtain than canonical forms, provides superior numerical performance in finite-precision environments.

The feedthrough term D often equals zero for strictly proper transfer functions (numerator degree less than denominator degree), but proper systems (equal degrees) have non-zero D representing instantaneous input-output coupling. This direct transmission can cause algebraic loops in simulation environments and requires special handling in discrete-time implementations. The bilinear transformation from continuous to discrete time preserves system order but may introduce sampling artifacts if the sampling frequency does not satisfy Nyquist criteria relative to system bandwidth.

Multi-Input Multi-Output Extensions

While single-input single-output (SISO) systems admit straightforward canonical forms, MIMO systems require matrix fraction descriptions or more sophisticated techniques. The controller canonical form extends to MIMO systems by augmenting B into a n×m matrix and C into a p×n matrix, but the resulting structure no longer guarantees controllability without additional rank conditions on the transfer function matrix. Rosenbrock's system matrix approach or polynomial matrix factorization methods provide systematic MIMO realization algorithms.

For MIMO systems, minimal realization—finding the state space representation with lowest possible order—becomes non-trivial. The Kalman decomposition partitions states into controllable/uncontrollable and observable/unobservable subspaces, revealing hidden modes that do not affect input-output behavior. Truncating uncontrollable and unobservable states yields a minimal realization, critical for reducing computational complexity in large-scale systems.

Worked Example: Second-Order System Realization

Consider the transfer function of a damped harmonic oscillator representing a motor position control system:

G(s) = (2s + 10) / (s² + 3s + 2) = (2s + 10) / [(s + 1)(s + 2)]

Step 1: Normalize denominator. Leading coefficient a₀ = 1, so normalized form is:

Denominator: 1s² + 3s + 2 → a = [1, 3, 2]

Numerator: 0s² + 2s + 10 → b = [0, 2, 10]

Step 2: Construct controllable canonical form. For n = 2:

A = [0, 1; -a₂, -a₁] = [0, 1; -2, -3]

B = [0; 1]

Calculate β coefficients: β₁ = b₁ - b₀·a₁ = 2 - 0·3 = 2, β₂ = b₂ - b₀·a₂ = 10 - 0·2 = 10

C = [β₂, β₁] = [10, 2]

D = [b₀] = [0]

Step 3: Verify controllability. Controllability matrix:

C = [B, AB] = [[0; 1], [0·0 + 1·(-2); 0·1 + 1·(-3)]] = [0, 1; 1, -3]

det(C) = 0·(-3) - 1·1 = -1 ≠ 0, therefore rank = 2, fully controllable

Step 4: Construct diagonal form. Eigenvalues (poles) are λ₁ = -1, λ₂ = -2 (distinct, so diagonal form exists):

Adiag = [-1, 0; 0, -2]

To find B and C in modal form, we need the transformation matrix T formed by eigenvectors of the original A. For this example, assuming normalized eigenvectors:

Bdiag ≈ [0.447; 0.894] (transformed via T⁻¹B)

Cdiag ≈ [8.944, 2.236] (transformed via CT)

Step 5: Time domain interpretation. In controllable form, state x₁ represents system output, x₂ represents derivative of output. In diagonal form, state variables represent modal amplitudes: x₁ corresponds to the -1 pole contribution, x₂ to the -2 pole. The faster mode (λ₂ = -2) decays with time constant τ₂ = 0.5 seconds, while slower mode (λ₁ = -1) has τ₁ = 1.0 second.

Step 6: Frequency response verification. At s = jω with ω = 1 rad/s:

G(j1) = (2j + 10)/(−1 + 3j + 2) = (10 + 2j)/(1 + 3j) = (10 + 2j)(1 - 3j)/10 = (16 - 28j)/10 = 1.6 - 2.8j

Magnitude: |G(j1)| = √(1.6² + 2.8²) = 3.22, Phase: ∠G(j1) = arctan(-2.8/1.6) = -60.3°

This represents a gain of 10.2 dB at 1 rad/s with significant phase lag, typical of second-order low-pass behavior.

Applications Across Engineering Disciplines

In aerospace engineering, state space models of aircraft dynamics enable modern flight control systems using linear quadratic regulators (LQR) and Kalman filters. The longitudinal dynamics transfer function from elevator deflection to pitch angle converts to state space with states representing angle of attack, pitch rate, and forward velocity perturbations. Modal analysis via diagonal form reveals phugoid and short-period modes, each with distinct frequency and damping characteristics crucial for handling qualities assessment.

Robotics applications extensively use state space for multi-joint manipulator control. Each joint's motor-gearbox-link system has a second-order transfer function from voltage to position. Converting to state space enables full-state feedback linearization, trajectory tracking with feedforward compensation, and observer-based estimation of unmeasured velocities from position encoders. The controllability analysis ensures actuator authority over all degrees of freedom, while observability guarantees sufficient sensor information for state reconstruction.

Chemical process control relies on state space for multi-variable temperature, pressure, and concentration regulation in reactors and distillation columns. Transfer functions from valve positions to process variables, often with significant time delays, transform into augmented state space including delay states. Controllability analysis identifies actuator limitations, while observability determines optimal sensor placement for inferential control when direct measurement is impractical or expensive.

Power electronics converter control uses state space averaging techniques to model switched-mode systems as continuous-time linear systems. The inductor current and capacitor voltage states provide a natural representation for DC-DC converter dynamics. Small-signal transfer functions from duty cycle to output voltage convert to state space for designing compensators that achieve desired bandwidth, phase margin, and disturbance rejection. The controllable canonical form directly supports pole placement to achieve critically damped transient response.

For additional control system analysis tools and related engineering calculations, visit the FIRGELLI engineering calculator library.

Practical Applications

Scenario: Drone Altitude Controller Design

Marcus, an embedded systems engineer at an autonomous drone startup, needs to implement a digital altitude hold controller for a quadcopter platform. The motor-propeller-airframe system has been characterized from flight test data, yielding a transfer function G(s) = 156/(s² + 8.2s + 12.5) relating throttle command to vertical velocity in m/s. Marcus uses the transfer function to state space calculator in controllable canonical form, obtaining A = [0, 1; -12.5, -8.2], B = [0; 1], C = [156, 0]. This representation enables him to implement a discrete-time state observer running at 100 Hz on the flight controller's ARM processor, estimating both velocity and acceleration states from a single barometric altitude sensor differentiated numerically. The controllable form allows direct pole placement to achieve 0.7 damping ratio with 2 Hz natural frequency, yielding controller gains K = [25.3, 8.9] computed via Ackermann's formula. After simulation validation, Marcus deploys the controller and achieves altitude hold accuracy within ±0.15 meters despite 3 m/s wind gusts—performance impossible with the previous PID approach that lacked acceleration feedback.

Scenario: Industrial Temperature Control Optimization

Dr. Elena Rodriguez, a process control engineer at a pharmaceutical manufacturing facility, faces challenges with temperature regulation in a bioreactor critical for vaccine production. The existing cascade PID controller exhibits oscillatory behavior during batch startup, risking product quality. From step response tests, she identifies the heater-to-temperature transfer function as G(s) = 2.4/(78s² + 23s + 1), representing significant second-order lag with poorly damped poles at -0.044 ± j0.107. Using the state space calculator in observable canonical form, Elena obtains the realization and designs a Luenberger observer that estimates unmeasured thermal gradients from a single thermocouple measurement. She then implements linear quadratic regulator (LQR) control with weighting matrices Q = diag([100, 1]) emphasizing temperature error over gradient, and R = 0.1 balancing control effort. The resulting optimal gains eliminate the oscillations, reducing settling time from 42 minutes to 18 minutes while maintaining temperature within ±0.2°C of setpoint throughout the batch cycle. This improvement increases throughput by 15% and reduces batch-to-batch variability, directly impacting production economics.

Scenario: Automotive Active Suspension Development

Kenji Tanaka, a vehicle dynamics engineer at an automotive OEM research center, is developing an active suspension system for a luxury sedan prototype. Shaker table testing of the quarter-car suspension yields a transfer function from actuator force to body acceleration of G(s) = (180s + 940)/(s³ + 14s² + 280s + 1200), a third-order system with a zero representing damper dynamics and complex conjugate poles at -1.8 ± j4.7 indicating the sprung mass resonance. Kenji converts this to controllable canonical form using the calculator, obtaining the 3×3 state space matrices. He implements a sky-hook damping controller using full state feedback, with the state vector representing body displacement, velocity, and actuator force. The modal form visualization from the diagonal calculator helps him understand that the low-frequency pole at -10.4 corresponds to tire dynamics, while the complex pair represents the main body bounce mode at 0.75 Hz. By placing observer poles at three times the controller bandwidth and adding integral action for zero steady-state error, the active system reduces body acceleration RMS by 62% on rough roads compared to passive suspension, dramatically improving ride comfort while maintaining stability margins exceeding 6 dB gain and 45° phase.

Frequently Asked Questions

▶ What is the difference between controllable and observable canonical forms?
▶ Why would I choose diagonal form over controllable canonical form?
▶ How do I handle transfer functions with time delays?
▶ What does it mean when my transfer function is improper (numerator degree exceeds denominator)?
▶ How do I verify that my state space conversion is correct?
▶ Can I convert MIMO (multi-input multi-output) transfer functions to state space?

Free Engineering Calculators

Explore our complete library of free engineering and physics calculators.

Browse All Calculators →

About the Author

Robbie Dickson — Chief Engineer & Founder, FIRGELLI Automations

Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.

Wikipedia · Full Bio

Share This Article
Tags