State space representation rewrites a dynamic system as a set of first-order equations. Instead of working with one higher-order differential equation, you track a state vector that holds exactly the information needed to predict what happens next.

When To Use State Space Form

Reach for this method when a model arrives as a higher-order differential equation and you want a form that is easier to analyze, simulate, or feed into matrix methods. First-order systems all fit one structure, so once a model is rewritten this way, you can discuss initial conditions, inputs, outputs, and stability in a consistent language.

In general, a state-space model can be written as

x(t)=f(x(t),u(t),t)x'(t) = f(x(t), u(t), t)

where x(t)x(t) is the state vector and u(t)u(t) is an input when the system has one. If the system is linear and time-invariant, the same idea takes the matrix form

x(t)=Ax(t)+Bu(t),y(t)=Cx(t)+Du(t)x'(t) = Ax(t) + Bu(t), \qquad y(t) = Cx(t) + Du(t)

That matrix version is common in control and differential equations, but state space is broader than the linear case. It appears in differential equations, control theory, signal processing, robotics, and physics, especially when you care about how a system changes over time.

The Steps

  1. Choose the state. Pick variables that describe the current condition of the system, often the original quantity and its lower-order derivatives.
  2. Rewrite as first-order equations. Express each state variable's derivative using the state variables and any input.
  3. Add the output if needed. Write a separate output equation when you want to track a measured quantity rather than the full internal state.
  4. Use matrix form when appropriate. If the system is linear, collect the coefficients into matrices such as AA, BB, CC, and optionally DD.

The state is the collection of current quantities that lets you determine future behavior once the input is known. For a moving object, position alone is usually not enough, but position and velocity together often are.

Full Worked Example: Convert A Second-Order Equation

Start with

y+3y+2y=u(t)y'' + 3y' + 2y = u(t)

where u(t)u(t) is an input.

Choose the state. Pick variables that capture the current condition:

x1=y,x2=yx_1 = y, \qquad x_2 = y'

Rewrite as first-order equations. Since x1=yx_1 = y,

x1=x2x_1' = x_2

Since x2=yx_2 = y', we have x2=yx_2' = y''. Rearranging the original equation gives

y=3y2y+u(t)y'' = -3y' - 2y + u(t)

Substituting y=x1y = x_1 and y=x2y' = x_2,

x2=2x13x2+u(t)x_2' = -2x_1 - 3x_2 + u(t)

So the state equations are

x1=x2x2=2x13x2+u(t)\begin{aligned} x_1' &= x_2 \\ x_2' &= -2x_1 - 3x_2 + u(t) \end{aligned}

Use matrix form. With x=(x1x2)x = \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}, this becomes

x=(0123)x+(01)u(t)x' = \begin{pmatrix} 0 & 1 \\ -2 & -3 \end{pmatrix} x + \begin{pmatrix} 0 \\ 1 \end{pmatrix} u(t)

Add the output if needed. If the output is the original quantity yy, then

y=(10)xy = \begin{pmatrix} 1 & 0 \end{pmatrix} x

The heart of the method is the conversion from one second-order equation to two first-order equations. Note that the output yy is not the same as the full state vector: here y=x1y = x_1, while the full state is (x1,x2)(x_1, x_2).

Where Each Step Goes Wrong, And A Self-Check

Confusing the state with the output. The state contains the internal variables needed to evolve the system; the output is whatever you choose to observe. They sometimes overlap but are not automatically the same.

Assuming the representation is unique. It usually is not. Different choices of state variables can describe the same dynamics, as long as they capture enough information.

Forgetting the first-order requirement. If you still have a second-order derivative of a state variable left over, the rewrite is not finished. This is the quickest self-check: scan every state equation and confirm each one is first-order in the state variables.

Treating every model as linear. The matrix form with AA, BB, CC, and DD only applies when the equations are linear in the chosen state variables. Nonlinear systems still use state space, written with functions instead of constant matrices.

To practice, take y+4y+5y=0y'' + 4y' + 5y = 0, choose x1=yx_1 = y and x2=yx_2 = y', rewrite it as a first-order system, and read off the matrix AA. You should find A=(0154)A = \begin{pmatrix} 0 & 1 \\ -5 & -4 \end{pmatrix}. For linear models, eigenvalues of AA can describe growth, decay, or oscillation, but only under the assumptions built into the model.

Frequently Asked Questions

What is a state variable?
A state variable is one of the quantities you need at the current time to determine how the system evolves next, once the input is known.
Is state space representation only for linear systems?
No. State space is a general framework. The matrix form $x'(t) = Ax(t) + Bu(t)$ is a special case used when the model is linear in the chosen state variables.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →