State variable (source code)

= State variable

A <state variable> is a coordinate used to describe the instantaneous condition of a <dynamical system> sufficiently completely to determine its future evolution under a specified model and input. For a <simple pendulum>, its angle and <angular velocity> form a state; angle alone generally does not, because the same position can be traversed in either direction.

A second-order <ordinary differential equation> $\ddot q=f(q,\dot q,t)$ becomes a first-order system by setting $v=\dot q$: $\dot q=v$ and $\dot v=f(q,v,t)$. The choice of state variables therefore reflects the memory required by the model, and differs from merely listing measured outputs.