Fiveable

🔦Electrical Circuits and Systems II Unit 12 Review

QR code for Electrical Circuits and Systems II practice questions

12.1 State variables and state equations

12.1 State variables and state equations

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🔦Electrical Circuits and Systems II
Unit & Topic Study Guides

State Variables and State Equations

State variables and state equations give you a systematic way to describe how a circuit (or any dynamic system) evolves over time. Instead of writing one high-order differential equation, you break the system into a set of first-order equations that are easier to solve, simulate, and analyze for properties like stability and controllability.

This unit covers how to choose state variables, how to assemble them into matrix-form state equations, and how the input/output structure ties everything together.

State Variables and Equations

Fundamentals of State Variables

A state variable is one member of the minimum set of variables needed to completely describe a system's internal condition at any instant. If you know every state variable at time t0t_0, plus the future input, you can predict the system's behavior for all t>t0t > t_0.

Key properties:

  • State variables are independent of each other; no state variable can be derived from the others.
  • The number of state variables equals the system order.
  • In electrical circuits, the natural choices are voltages across capacitors and currents through inductors, because these are the energy-storing elements whose values can't change instantaneously.

Why capacitor voltages and inductor currents? Capacitors store energy in an electric field (12Cv2\frac{1}{2}Cv^2) and inductors store energy in a magnetic field (12Li2\frac{1}{2}Li^2). The energy stored in these elements defines the circuit's "memory," so their values at any moment capture everything you need to know about the circuit's past.

Fundamentals of State Variables, control theory - Derivation for state equation linearization - Mathematics Stack Exchange

State Equations and Vectors

State equations express how each state variable changes over time as a function of the current state and the input. They are always first-order differential equations.

General (possibly nonlinear) form:

dxdt=f(x,u,t)\frac{dx}{dt} = f(x, u, t)

where xx is the vector of state variables, uu is the input vector, and tt is time.

The state vector collects all state variables into a single column matrix:

x=[x1,x2,,xn]Tx = [x_1, x_2, \dots, x_n]^T

where nn is the number of state variables (and the system order).

For linear time-invariant (LTI) systems, the state equations simplify to matrix form:

x˙=Ax+Bu\dot{x} = Ax + Bu

  • AA is the n×nn \times n system matrix (also called the state matrix). Its entries come from the circuit element values and topology. The eigenvalues of AA determine the natural response of the system.
  • BB is the n×mn \times m input matrix, mapping the mm inputs to the state derivatives.

Example: For a series RLC circuit driven by a voltage source vs(t)v_s(t), you'd pick x1=iLx_1 = i_L (inductor current) and x2=vCx_2 = v_C (capacitor voltage) as state variables. The resulting state equations are:

x˙1=RLx11Lx2+1Lvs\dot{x}_1 = -\frac{R}{L}x_1 - \frac{1}{L}x_2 + \frac{1}{L}v_s

x˙2=1Cx1\dot{x}_2 = \frac{1}{C}x_1

Written in matrix form, the AA and BB matrices follow directly from these coefficients.

Applications and Analysis

The state-space framework is not just a different way to write equations; it unlocks tools that transfer-function methods can't easily provide:

  • Stability analysis: The eigenvalues of AA tell you whether the system is stable (all eigenvalues have negative real parts) or unstable.
  • Controllability and observability: Matrix rank tests (using AA and BB for controllability, AA and CC for observability) determine whether you can steer the system to any state or reconstruct internal states from outputs.
  • Feedback controller design: State feedback (u=Kxu = -Kx) lets you place the system's poles wherever you want, provided the system is controllable.
  • Numerical simulation: Software like MATLAB and Simulink solve state equations directly, making it straightforward to simulate even large, complex circuits.
Fundamentals of State Variables, GMD - Continuous state-space representation of a bucket-type rainfall-runoff model: a case study ...

System Dynamics

Characterizing Dynamic Systems

A dynamic system is one whose output depends not only on the current input but also on the system's history. Circuits with capacitors or inductors are dynamic because energy storage creates memory.

Dynamic systems are described by differential equations that relate inputs, outputs, and state variables. They can be classified along several axes:

  • Linear vs. nonlinear (superposition applies or doesn't)
  • Time-invariant vs. time-varying (parameters constant or changing)
  • Causal (output depends only on present and past inputs, not future)

For this course, the focus is on linear time-invariant (LTI) circuits, where the matrix form x˙=Ax+Bu\dot{x} = Ax + Bu applies directly.

Input and Output Vectors

The input vector gathers all external sources driving the system:

u=[u1,u2,,um]Tu = [u_1, u_2, \dots, u_m]^T

where mm is the number of independent inputs (voltage or current sources).

The output vector contains the quantities you actually want to measure or control:

y=[y1,y2,,yp]Ty = [y_1, y_2, \dots, y_p]^T

where pp is the number of outputs.

The output equation links the state and input to the output. In general form:

y=g(x,u,t)y = g(x, u, t)

For LTI systems, this becomes:

y=Cx+Duy = Cx + Du

  • CC is the p×np \times n output matrix, selecting which combinations of state variables appear in the output.
  • DD is the p×mp \times m feedthrough matrix (also called the direct transmission matrix). In most circuits, D=0D = 0 because there's no direct path from input to output that bypasses all energy-storage elements. A nonzero DD appears when, for example, a resistor connects the source directly to the output node.

Together, the four matrices (A,B,C,D)(A, B, C, D) form the complete state-space representation of an LTI system.

System Order and Complexity

The system order equals the number of independent energy-storage elements in the circuit, which matches the number of state variables.

  • A single RC or RL circuit is first-order (one state variable).
  • A series or parallel RLC circuit is second-order (two state variables: iLi_L and vCv_C).
  • Circuits with multiple capacitors and inductors yield higher-order systems.

Higher order means more complex transient behavior: a second-order system can oscillate, while a first-order system can only exhibit exponential decay or growth.

One practical note: if two capacitors are connected in parallel with no resistance between them, they act as a single equivalent capacitor, so they contribute only one state variable, not two. Always check for such dependencies when counting independent energy-storage elements.

For very high-order systems, model reduction techniques (like balanced truncation) can approximate the system with fewer state variables while preserving the dominant dynamic behavior. This becomes important when simulating or designing controllers for large-scale circuits.