State-Space Representation of Systems
AI-Generated Content
State-Space Representation of Systems
Moving beyond the limitations of transfer functions, the state-space representation provides a unified, powerful framework for modeling and controlling complex modern systems. Whether you are designing a multi-joint robotic arm, stabilizing an aircraft, or managing a chemical process, this approach handles multi-input multi-output (MIMO) systems with internal feedback loops and complex interconnections. It forms the essential mathematical foundation for virtually all modern control techniques, from pole placement to optimal control theory.
What Are State Variables?
The core idea of state-space modeling is to describe a system not just by its input-output relationship, but by its internal condition. This internal condition is captured by the state variables. Think of the state as the system's "memory." For a moving car, its position and velocity are natural state variables—knowing them at any instant, along with future inputs (like throttle and brake), allows you to predict all future motion. Formally, the state vector, , is the minimal set of variables that, if known at an initial time and given the input for , completely determines the system's behavior for all future time.
State variables are not unique; you can choose different but equivalent sets. However, they are always internal quantities that define the system's energy storage. In an electrical circuit, capacitor voltages and inductor currents are typical state variables. In a mechanical system, positions and momenta serve this role. The number of state variables defines the order of the system, which corresponds to the number of independent energy storage elements.
The State and Output Equations
The dynamics of the chosen state variables are expressed as a set of coupled, first-order differential equations. This is the state equation. For linear time-invariant (LTI) systems, it takes the elegant matrix form: Here, is the state vector, and is its derivative. is the input vector. The system matrix () describes how the states interact and evolve internally. The input matrix () describes how the inputs directly affect the rate of change of each state.
The state variables themselves may not be directly measurable. What we can observe or measure are the outputs. The relationship between outputs and states is given by the output equation: Here, is the output vector. The output matrix () selects and combines states to form the outputs. The feedforward matrix () describes any direct, instantaneous coupling from the inputs to the outputs (often zero in physical systems). Together, the quadruple constitutes a complete state-space model.
From Physical Laws to State-Space Form
Deriving a state-space model typically follows a systematic process. First, write the fundamental physical equations (Newton's laws, Kirchhoff's laws, etc.) for the system. Next, identify the energy-storing elements and assign their associated variables as your state variables. Then, manipulate the physical equations to express the first derivative of each state variable as a function only of the state variables themselves and the system inputs. Finally, identify the output variables and express them similarly.
Example: DC Motor Consider a DC motor with armature voltage as input and shaft angular position as output. The key physical parameters are armature resistance , inductance , motor torque constant , back-emf constant , rotor inertia , and viscous friction .
- Choose State Variables: Natural choices are armature current (energy in inductance) and angular velocity (energy in rotor inertia). We can also include angular position . Thus, .
- Write State Equations: Using electrical and mechanical laws:
Rearranging into the form :
- Write Output Equation: If the output is shaft position , then:
Here, .
Analyzing System Properties in State-Space
The state-space representation makes key system properties transparent through the matrices , , , and .
- Controllability: A system is controllable if, by applying a suitable input , we can drive the state vector from any initial point to any final point in finite time. This is determined by the controllability matrix . If this matrix has full rank (), the system is controllable. This property is crucial for pole placement.
- Observability: A system is observable if, by observing the output over a finite time interval, we can uniquely determine the initial state . This is determined by the observability matrix . Full rank ensures observability, which is necessary for designing state estimators (observers).
- Stability: The internal stability of an LTI system is dictated entirely by the eigenvalues of the matrix, often called the poles of the system. The system is asymptotically stable if and only if all eigenvalues of have negative real parts (lie in the left-half of the complex plane).
Enabling Modern Control Design
The state-space framework is the gateway to sophisticated control strategies. With a state-space model, you can design a full-state feedback controller of the form , where is the gain matrix. By choosing appropriately, you can place the closed-loop poles (eigenvalues of ) anywhere in the complex plane (provided the system is controllable), thereby dictating the system's dynamic response.
Furthermore, this formulation is essential for optimal control theory, such as the Linear Quadratic Regulator (LQR). LQR finds the gain matrix that minimizes a cost function balancing state error and control effort, providing a systematic, high-performance design method. For systems where not all states are measured, the duality between controllability and observability allows you to design a Luenberger observer or Kalman filter to estimate the state vector from the outputs, enabling output-feedback control.
Common Pitfalls
- Confusing States with Outputs: A state variable is an internal quantity that defines the system's dynamics. An output is what you measure. They can be the same (e.g., is an identity matrix), but often are not. For instance, in the DC motor, current () is a state but is rarely the primary output.
- Correction: Always ask: "Is this variable necessary to predict the future, or is it just something I can sense?" The answer defines state vs. output.
- Incorrect System Order: The order () must equal the number of independent energy-storing elements. In complex systems, some storage elements may be dependent (e.g., capacitors in parallel under certain conditions), leading to a lower-order model than the number of physical components.
- Correction: After writing equations, check that your state equations are independent. The rank of the controllability or observability matrix can also reveal if your model has redundancies.
- Neglecting to Check Controllability/Observability Before Design: Attempting pole placement on an uncontrollable system or designing an observer for an unobservable system is mathematically impossible and will lead to design failure.
- Correction: Always verify controllability before full-state feedback design and observability before observer design as the first step in your control synthesis procedure.
- Misinterpreting the D Matrix: The matrix represents a direct, algebraic path from input to output. In many physical systems (like the DC motor from voltage to position), there is no instantaneous connection due to inherent inertia or inductance, so . Forcing a non-zero when it should be zero will make your model inaccurate at high frequencies.
- Correction: Consider the physics: does a change in input cause an immediate change in output, or is it always mediated through a state (an integrator)? The latter implies .
Summary
- State-space representation models a system's internal dynamics using state variables collected in a vector , governed by the first-order state equation .
- The measurable outputs are related to states and inputs by the output equation , defined by the matrix quadruple .
- This framework naturally and elegantly handles multi-input multi-output (MIMO) systems, unlike the transfer function approach.
- Key system properties—controllability, observability, and stability—are analyzed using the , , and matrices, providing deep insight into the system's structure.
- The state-space form is the essential foundation for modern control design methods, including full-state feedback pole placement and optimal control theory like LQR.