Linearized equations rearranged into series of first order differential equations for state-space form

274 Views Asked by At

I am trying to follow this tutorial: http://ctms.engin.umich.edu/CTMS/index.php?example=InvertedPendulum&section=SystemModeling

I am stuck to understand how to make a state-space representation from these transfer functions

$$ \frac{\Phi(s)}{U(s)} = \frac{\frac{ml}{q}s}{s^3+\frac{b(I+ml^2)}{q}s^2-\frac{(M+m)mgl}{q}s-\frac{bmgl}{q}} \\ \frac{X(s)}{U(s)} = \frac{\frac{(I+ml^2)s^2-gml}{q}}{s^4+\frac{b(I+ml^2)}{q}s^3-\frac{(M+m)mgl}{q}s^2-\frac{bmgl}{q}s} $$

The text gives a hint "The linearized equations of motion from above can also be represented in state-space form if they are rearranged into a series of first order differential equations. Since the equations are linear, they can then be put into the standard matrix form shown below."

But I do not understand this hint, I tried to research on to reduce the order like on http://tutorial.math.lamar.edu/Classes/DE/ReductionofOrder.aspx but maybe you can give me more input to my brain.

Solution: $$ \begin{bmatrix} \dot x \\ \ddot x \\ \dot \phi \\ \ddot \phi \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & \frac{-(I+ml^2)b}{I(M+m)+Mml²} & \frac{m^2gl^2}{I(M+m)+Mml^2} & 0 \\ 0 & 0 & 0 & 1 \\ 0 & \frac{-mlb}{I(M+m)+Mml^2} & \frac{mgl(M+m)}{I(M+m)+Mml^2} & 0 \end{bmatrix} \begin{bmatrix} x \\ \dot x \\ \phi \\ \dot \phi \end{bmatrix} + \begin{bmatrix} 0 \\ \frac{I+ml^2}{I(M+m)+Mml²} \\ 0 \\ \frac{ml}{I(M+m)+Mml^2} \end{bmatrix} u $$

$$ y = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} x \\ \dot x \\ \phi \\ \dot \phi \end{bmatrix} + \begin{bmatrix} 0 \\ 0 \end{bmatrix} u $$

2

There are 2 best solutions below

0
On BEST ANSWER

The second approach does not start from the transfer functions but restarts fresh from the original linearized equations. Write them in matrix form as $$ \begin{bmatrix}I+ml^2&-ml\\-ml&M+m\end{bmatrix} \begin{bmatrix}\ddot ϕ\\\ddot x\end{bmatrix} + \begin{bmatrix}0&0\\0&b\end{bmatrix} \begin{bmatrix}\dot ϕ\\\dot x\end{bmatrix} + \begin{bmatrix}-mgl&0\\0&0\end{bmatrix} \begin{bmatrix}ϕ\\ x\end{bmatrix} = \begin{bmatrix}0\\ u\end{bmatrix} $$ and then as usual transform into a first order system by forming a phase space vector $$ \begin{bmatrix}I+ml^2&-ml&0&0\\-ml&M+m&0&0\\0&0&1&0\\0&0&0&1\end{bmatrix} \begin{bmatrix}\ddot ϕ\\\ddot x\\\dot ϕ\\\dot x\end{bmatrix} + \begin{bmatrix}0&0&-mgl&0\\0&b&0&0\\-1&0&0&0\\0&-1&0&0\\\end{bmatrix} \begin{bmatrix}\dot ϕ\\\dot x\\ϕ\\ x\end{bmatrix} = \begin{bmatrix}0\\ u\\0\\0\end{bmatrix} $$ Now multiply with the inverse of the first matrix to get an explicit first order system.

2
On

There's a step that seems to be suppressed here, which is mapping your system back to the time domain from the Laplace-frequency domain. In this case the denominator represents the "left side" of your ODE in a standard way. Specifically an $s^k$ term corresponds to a $y^{(k)}$ term and their coefficients match up. The numerators, when they are polynomial, correspond to initial conditions: the coefficient on $s^{(k)}$ in the numerator is the initial condition for $y^{(k)}$. So for example, $Y=\frac{2s-1}{3s^2-2s+4}$ means $3y''-2y'+4y=0,y(0)=-1,y'(0)=2$.

Then there is a standard way to change variables to convert an nth order equation to a first order system: you just choose your variables to be $y,y',y'',\dots,y^{(n-1)}$. Then your nth order equation "lives" in the equation defining $(y^{(n-1)})'$, which you get by solving for $y^{(n)}$.

What I don't understand is why you wind up dividing by $U$ rather than adding it to the numerator on the other side, which is what would happen if your equation were just "left side of ODE = $u$". But that might be lack of familiarity with control theory specifically.