Hello,

I'm looking to set up a system of ODE's into a state space form so that I can run some numeric simulations. I simplified the equations to demonstrate the issue that I'm having. Consider the following set of ordinary differential equations

$\displaystyle a\ddot{x}=b\dot{x}$

$\displaystyle c\ddot{x}=dx+e\dot{x}$

My initial though was to define a state vector as $\displaystyle [x, \dot{x}]^T$ and the two equations are put into matrix form as

$\displaystyle \begin{bmatrix} 0&a\\ 0&b\\ \end{bmatrix}\begin{bmatrix} \dot{x} \\ \ddot{x}\\ \end{bmatrix}= \begin{bmatrix} 0 & b\\ c & d \\ \end{bmatrix} \begin{bmatrix} x\\ \dot{x}\\ \end{bmatrix} $

However, the matrix on the left hand side is singular and even after trying algebraic manipulations the simulations results aren't what would be expected.

If we introduce a new variable, call it y, and set it equal to $\displaystyle \dot{x}$, i.e. $\displaystyle y=\dot{x}$, then the above equations can be changed to

$\displaystyle a\dot{y}=b\dot{x}$

$\displaystyle c\ddot{x}=dx+e\dot{x}$

$\displaystyle \dot{x}=y$

Defining a the following state vector $\displaystyle [x, \dot{x}, y]^T$ we can easily see that the above can be written in matrix form as

$\displaystyle \begin{bmatrix} \dot{x} \\ \ddot{x}\\ \dot{y} \\\end{bmatrix}= \begin{bmatrix} 0 & 0 & 1\\ d/c & e/c & 0\\ 0& a/b & 0\\ \end{bmatrix} \begin{bmatrix} x\\ \dot{x}\\ y\\ \end{bmatrix} $

The above formulation appears to yield the correct simulation results, and intuitively looks better (i.e. looks like a classic state space $\displaystyle \dot{x}=Ax$ instead of $\displaystyle B\dot{x}=Cx$ derived first).

I'm looking for a solid mathematical reason to introduce the y variable...particularly since these equations will get more complicated, and determining the number of state variables needs to be more tractable than "Well...you can tell you need another equation". If anyone has any good material I can look at that discusses determining the number of state variables necessary (number should be unique, but actual states are not) or any explanations they'd be greatly appreciated.

Brad