State-variable models are made of first-order differential equations, allowing linear algebra to be used to solve problems. They are formed by defining higher-order derivatives as a cascade of first-order derivatives.
The state variables of a system are a set of independent variables whose values at time , together with input for all , determine the behavior of the system for all .
- State variables are used to represent the states of a system
- The set of possible combinations of state variable values is called the state space of the system
- The equations relating the current state of a system to its most recent input and past states are called the state equations
- The equations expressing the values of the output variables in terms of the state variables and inputs are called the output equations
Setting State Variables
Suppose that a differential equation model of a system is already obtained, the variables in the differential equations are the input and the internal variables , and the highest order of the derivatives of in the differential equations is . Then we can choose
as the state variables. So, we choose the state variables up to one order lower than the highest-order derivative.
Alternatively, if we have various time derivatives of some function :
We then use:
Standard State-Variable Model
The standard form of a state variable model is given by the state equation and the output equation.
State equation:
where:
- is the derivative of the state vector,
- is the system/state matrix,
- is the state vector,
- is the input/control matrix,
- is the input vector,
Essentially, and are column vectors containing the state variables and the inputs, if any.
Output equation:
where:
- is the output vector,
- is the state output matrix,
- is the state vector,
- is the control output,
- is the input vector,
Note that in general.
Formalization
We can also consider the state space model in a more general way. Given a state vector :
The mixed ordered differential equations can be converted into a set of first-order differential equations plus an algebraic equation:
where is the input, is the output, and
is a vector-valued function, and
is a scalar-valued function.
- The number of state variables n is called the order of the system.
- The set of first-order differential equations is the state equation of the system. The algebraic equation is called the output equation of the system. Together they form the state space model of the system.
We always assume that the system starts operation at time ; we assume that the input is a unilateral signal whose value before the initial time is zero. To determine the state vector from the differential equation, the input alone is not sufficient. The initial value of the state is also needed.
- This initial value is called the initial condition.
To conform to our standard mathematical treatment of signals, we also view as a unilateral function. If the initial condition is nonzero, then has a jump discontinuity at and its derivative contains impulse functions.
Examples
Mass-Spring-Damper
An example is the typical mass-spring-damper system:
We define:
Then, we can re-write the original equation as:
Thus, we’ve reduced our original 2nd-order equation to two first-order equations:
This is our state-variable model. The variables and are the state variables.
3rd Order System
A third order system:
Re-arrange so that highest order variable is isolated:
Since this is 3rd order, we expect three 1st-order ODEs to describe the system.
We define
Now, our state-variable model is::
In vector-matrix form, we can write:
The output can also be described in matrix form: