State-space models provide a unified framework for describing systems with multiple inputs and outputs using first-order differential (or difference) equations. Unlike transfer functions, which only capture input-output relationships, state-space models also represent the internal dynamics of a system. This makes them essential for modern control design techniques like pole placement, observer design, and optimal control.
State-space representation
A state-space representation describes a physical system as a set of first-order differential equations (continuous-time) or difference equations (discrete-time) that relate input, output, and state variables. This compact matrix formulation lets you apply linear algebra tools directly to analyze and design controllers for systems with multiple inputs and outputs.
State variables
State variables are the smallest set of variables that fully describe a system's condition at any given time. If you know the current state variables and the future inputs, you can predict the system's future behavior.
- For a mechanical system: position and velocity
- For an electrical circuit: capacitor voltage and inductor current
- For a thermal system: temperature at key nodes
The number of state variables equals the system's order, which corresponds to the number of independent energy storage elements.
State equations
State equations describe how the state variables change over time. They relate the current state and input to the rate of change (continuous-time) or the next value (discrete-time) of each state variable.
These are always first-order equations. If your original system involves higher-order derivatives, you introduce new state variables to reduce everything to first order (more on this below).
Output equations
Output equations define how the measurable quantities of the system depend on the current state and input. Not every state variable is directly measurable, so the output equation specifies which combinations of states and inputs you can actually observe.
Matrix notation
State-space models are written compactly using matrices:
Continuous-time:
Discrete-time:
Where:
- is the state vector ()
- is the input vector ()
- is the output vector ()
- is the state matrix (), governing internal dynamics
- is the input matrix (), mapping inputs to state changes
- is the output matrix (), mapping states to outputs
- is the feedthrough (or direct transmission) matrix (), representing direct input-to-output coupling. In many physical systems, .
Linear vs nonlinear models
State-space models fall into two categories based on the nature of their equations.
Linear models have state and output equations that are linear combinations of the state variables and inputs. The matrices , , , and are constant, and superposition applies. Most of the analysis and design tools in this unit assume linearity.
Nonlinear models contain nonlinear functions of the state variables or inputs (quadratic terms, trigonometric functions, exponentials, etc.). These can capture more complex behaviors, but they require specialized techniques like linearization around an operating point, feedback linearization, or Lyapunov-based methods.
In practice, you often linearize a nonlinear model around an equilibrium point to obtain a linear state-space model that's valid for small deviations from that operating condition.
Continuous-time state-space models
Continuous-time models describe systems that evolve smoothly over time using differential equations. The state variables and outputs are functions of a continuous time variable . These are the natural choice for modeling physical systems like mechanical, electrical, and thermal processes.
First-order differential equations
Each state variable gets one first-order differential equation. The right-hand side is a linear combination of all state variables and inputs, with coefficients drawn from the and matrices.
For a two-state system, this looks like:
Higher-order differential equations
Many physical systems are naturally described by higher-order differential equations. A mass-spring-damper system, for example, gives you a second-order ODE:
To convert this into state-space form:
-
Define state variables to capture each derivative up to one less than the system order. Here, let (position) and (velocity).
-
Write first-order equations for each state variable:
-
Assemble into matrix form to identify , , , and .
This procedure generalizes: an th-order ODE becomes first-order equations.
Discrete-time state-space models
Discrete-time models describe systems at specific time instants using difference equations. These are used for digital control systems where a computer samples sensor data and updates control signals at regular intervals.
Difference equations
Each state variable has a difference equation that computes its value at the next time step from the current state and input:
The structure mirrors the continuous-time case, but derivatives are replaced by forward shifts in time.
Sampling and discretization
To implement a continuous-time controller digitally, or to simulate a continuous-time plant on a computer, you need to convert the continuous-time model to discrete-time. The steps are:
- Choose a sampling period . This should be small enough to capture the system's dynamics (a common rule of thumb: 10 to 20 samples per rise time).
- Apply a discretization method to convert the continuous-time and matrices to their discrete-time equivalents.
Common discretization methods:
- Zero-order hold (ZOH): Assumes the input is held constant between samples. This is the most common method and gives exact results for piecewise-constant inputs.
- Tustin (bilinear) approximation: Maps the continuous-time frequency response to discrete-time more accurately at higher frequencies, preserving stability.
A sampling period that's too large can introduce aliasing and degrade stability. Too small, and you waste computational resources without meaningful improvement.
State-space model properties
Three properties are fundamental to understanding what you can and cannot do with a given system: controllability, observability, and stability.
Controllability
Controllability answers the question: Can you drive the system from any initial state to any desired state in finite time using the available inputs?
To test controllability, form the controllability matrix:
where is the number of state variables. If , the system is controllable. If the rank is less than , some states cannot be influenced by the input, and you won't be able to place all closed-loop poles arbitrarily.
Observability
Observability answers the question: Can you determine the system's initial state from the output measurements over a finite time interval?
To test observability, form the observability matrix:
If , the system is observable. If not, some internal states are "hidden" from the output, and you cannot design an observer that estimates all states.
Controllability and observability are dual properties. A system is controllable if and only if is observable (with appropriate relabeling). This duality shows up repeatedly in controller and observer design.

Stability
Stability characterizes whether the system's state remains bounded and eventually settles to equilibrium.
The test is based on the eigenvalues of the state matrix :
- Continuous-time: The system is asymptotically stable if all eigenvalues have strictly negative real parts (i.e., they lie in the open left-half of the complex plane).
- Discrete-time: The system is asymptotically stable if all eigenvalues have magnitude less than 1 (i.e., they lie strictly inside the unit circle).
If even one eigenvalue violates these conditions, the system is unstable (or marginally stable if eigenvalues sit exactly on the boundary).
State-space model transformations
Transformations change the state variables while preserving the system's input-output behavior. They're used to simplify analysis, decouple dynamics, or convert models into standard forms that make controller design more straightforward.
Similarity transformations
A similarity transformation applies a nonsingular matrix to define new state variables . The transformed system matrices become:
The key point: similarity transformations preserve eigenvalues, controllability, observability, and the transfer function. The system looks different internally, but its external behavior is identical.
Canonical forms
Canonical forms are standardized matrix structures obtained through specific similarity transformations. They simplify design by giving the matrices a predictable pattern.
Controllable canonical form
In this form, the state matrix is a companion matrix and the input matrix has a single 1 in its last row (for SISO systems). The coefficients of the characteristic polynomial appear directly in the last row of .
This form is particularly useful for pole placement via state feedback, because the relationship between the feedback gains and the desired characteristic polynomial becomes transparent.
The transformation matrix is constructed from the controllability matrix .
Observable canonical form
This is the dual of the controllable canonical form. Here, the state matrix is again a companion matrix, and the output matrix has a simple structure (a single 1 in its first column for SISO systems).
This form is useful for observer design, since the observer gain selection maps directly to choosing the observer's characteristic polynomial.
The transformation matrix is constructed from the observability matrix .
Coordinate transformations
Coordinate transformations are a broader category that includes any change of basis for the state variables. Beyond canonical forms, you might use:
- Diagonalization (using eigenvectors) to decouple modes
- Scaling to normalize state variables to similar magnitudes
- Jordan form when the state matrix isn't diagonalizable
These transformations help align the mathematical representation with physical intuition or numerical convenience.
State-space model analysis
Eigenvalues and eigenvectors
The eigenvalues of the state matrix are the solutions to . Each eigenvalue has an associated eigenvector satisfying .
What eigenvalues tell you:
- Real part (continuous-time) or magnitude (discrete-time) determines stability
- Imaginary part determines oscillation frequency
- Complex conjugate pairs correspond to oscillatory modes; purely real eigenvalues correspond to exponential decay or growth
The eigenvectors define the directions in state space along which these modes act.
Modal decomposition
If has linearly independent eigenvectors, you can diagonalize it:
where is the matrix of eigenvectors and is diagonal with eigenvalues on the diagonal.
In the transformed coordinates , each state evolves independently:
This decoupling lets you analyze each mode separately. For mechanical or structural systems, the modes correspond to natural frequencies and damping ratios, which directly relate to physical vibration patterns.
Lyapunov stability
Lyapunov stability analysis extends beyond eigenvalue tests, especially for nonlinear systems. The idea is to find a Lyapunov function that acts like a generalized energy function:
- for all (positive definite)
- along system trajectories (negative semidefinite for stability, strictly negative definite for asymptotic stability)
If such a function exists, the equilibrium is stable. For linear systems, a common choice is the quadratic form , where is a positive definite matrix satisfying the Lyapunov equation:
for some positive definite . If a solution exists, the system is asymptotically stable.
State-space model design
Pole placement
Pole placement designs a state feedback gain so that the closed-loop system has eigenvalues at specified locations. The procedure:
- Determine the desired closed-loop pole locations based on performance specs (settling time, damping ratio, natural frequency).
- Verify that the system is controllable (required for arbitrary pole placement).
- Compute the gain matrix using Ackermann's formula or direct matching of the characteristic polynomial.
The closed-loop characteristic polynomial becomes , and you choose so this polynomial has the desired roots.
State feedback control
State feedback control uses the law , where is a reference input. This requires access to the full state vector. If some states aren't measurable, you need an observer (see below) and use the estimated state instead: .
Common extensions:
- Integral action: Augment the state with the integral of the tracking error to eliminate steady-state error
- Feedforward: Add a term based on the reference to improve transient tracking
- Separation principle: Design the controller gain and observer gain independently; the combined system remains stable as long as each is designed for stability
State observers
Observers estimate unmeasured states from available outputs and the known system model. The general structure is:
The term is a correction that drives the estimate toward the true state. The estimation error evolves as , so the observer gain is chosen to make stable with fast eigenvalues.
Full-order observers
Full-order observers estimate all states, including those that are directly measured. They have the same dimension as the original system. The observer gain is designed so the error dynamics have eigenvalues that converge faster than the controller's closed-loop poles (a common guideline: observer poles 2 to 6 times faster than controller poles).
Reduced-order observers
Reduced-order observers only estimate the unmeasured states, using the measured outputs directly. For a system with measured outputs and states, the observer has order . This is computationally cheaper and avoids redundantly estimating states you already know. The tradeoff is a more complex derivation.
Optimal control
Optimal control finds the input that minimizes a cost function, balancing performance against control effort.
Linear quadratic regulator (LQR)
LQR minimizes the cost function:
where weights state deviations and weights control effort. Larger penalizes state error more aggressively (faster response); larger penalizes control effort (more conservative actuation).
The optimal control law is , where and is the positive definite solution to the continuous-time algebraic Riccati equation (CARE):
LQR guarantees closed-loop stability and provides good robustness margins (at least 60° phase margin and infinite gain margin for SISO systems).
Kalman filter
The Kalman filter is the optimal state estimator for linear systems with Gaussian process noise and measurement noise :
It operates in two recursive steps:
- Predict: Propagate the state estimate and its covariance forward using the system model.
- Update: Correct the prediction using the new measurement, weighted by the Kalman gain , which balances trust in the model versus trust in the measurement based on their respective noise covariances.
The Kalman gain is computed from the solution of a Riccati equation analogous to the LQR case. The Kalman filter is the dual of LQR: LQR optimizes control, while the Kalman filter optimizes estimation. Together, they form the Linear Quadratic Gaussian (LQG) controller, combining optimal control with optimal estimation.