# Derive state space model

I'm trying to derive the state space model for the following system: $L\ddot{\theta}-g\sin(\theta)-\ddot{z}\sin(\theta) = 0$

I'm allowed to use that $\sin(\theta) \approx \theta$. And I must set $x_1 = \theta, x_2 = \dot{\theta}$, input $u = \ddot{z}$, output $y = \theta$.

This is what I've come up with: \begin{equation*} \dot{x} = \begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \end{bmatrix} = Ax + Bu = \begin{bmatrix} 0 & 1 \\ \frac{g}{L} & 0 \end{bmatrix} x + \begin{bmatrix} 0 \\ \frac{\theta}{L} \end{bmatrix} u \end{equation*} \begin{equation*} y = Cx + Du = \begin{bmatrix} 1 & 0 \end{bmatrix}x \end{equation*}

But I can't have the $\theta$ in $B$, since that is equal to $x_1 = y = \theta$, right? How should I solve it?

• Who is $g$? A constant? – Math1000 Nov 22 '16 at 21:16
• As in $$g \approx 9.80665\ \mathrm m\ \mathrm s^{-2}\quad \large ?$$ – Math1000 Nov 22 '16 at 21:21
• Yes, exactly! But $g\approx 9.82 ms^{-2}$ in Sweden ;) – user1415066 Nov 22 '16 at 21:24
This is a nonlinear model, even if you linearize $\sin\theta$ to $\theta$. If you want to linearize it further you would also have to assume that $\theta$ stays close to one value and use that value to define $B$. But if you want to solve this differential equation you could use separation of variables,
$$\int\!\!\!\int \frac{1}{\sin\theta} d\theta\,d\theta = \int\!\!\!\int \frac{g + u(t)}{L}dt\,dt,$$