State variable

A state variable is an element of the set of variables that describe the state of a dynamical system.

In case of simple mechanical systems, position coordinates and their derivates are typical state variables. Temperature, pressure, internal energy, enthalpy, entropy are examples of state variables in a thermodynamics system.

Control Systems Engineering
In Control Engineering and other areas of science and engineering, state variables are used to represent the states of a general system. The state variables can be used to describe the state space (controls) of the system. The equations relating the current state and output of a system to its current input and past states are called the state equations. The state equations for a linear time invariant system are expressed with Coefficient matrices:

$$A\,\!$$ existing in dimension  RN*N

$$B\,\!$$ existing in dimension  RN*L

$$C\,\!$$ existing in dimension  RM*N

$$D\,\!$$ existing in dimension  RM*L

Discrete-Time Systems
The state variable representing the current state of a discrete-time system (i.e. digital systems) is $$x(n)\,$$, where n is the discrete point at which the system is being evaluated. The discrete-time state equations are
 * $$ x(n+1) = Ax(n) + Bu(n)\,\!$$, which describes the next state of the system (x(n+1)) with respect to current state and inputs u(n) of the system.


 * $$ Y(n)  = Cx(n) + Du(n)\,\!$$, which describes the output Y(n) with respect to current states and inputs u(n) to the system.

Continuous Time Systems (Analog)
The state variable representing the current state of a continuous-time system (i.e. analog systems) is $$x(t)\,$$, and the continuous time state equations are
 * $$ \frac{dx(t)}{dt} \ = Ax(t) + Bu(t)\,\!$$, which describes the next state of the system $$ \frac{dx(t)}{dt} \,\!$$ with respect to current state x(t) and inputs u(t) of the system.


 * $$ Y(t)  = Cx(t) + Du(t)\,\!$$, which describes the output Y(t) with respect to current states x(t) and inputs u(t) to the system.