# Rewrite second order non-homogeneous differential equation as a first order system

Question: I believe I am correct up until $$y(t) = Cx(t)$$. I was told I did it incorrectly, but I cannot figure out how to grab the position of the antenna using $$y(t) = Cx(t)$$. Does it look correct, if not, how can I go about finding $$y(t)$$? I am stumped.

We want to design and simulate a full state feedback LQR control law for a rotating antenna. The motion of the antenna can be described by the linear second order non-homogeneous differential equation given by $$Iθ''(t) + cθ'(t) = τ (t)$$ with initial conditions: $$θ(0) = θ_0$$ $$θ'(0) = θ_1$$ where $$I$$ is the effective moment of inertia of all the rotating parts including the antenna, $$c ≥ 0$$ is the coefficient of viscous (i.e. air; the antenna is in low earth atmosphere, not the vacuum of space) friction, $$τ (t)$$ is the torque applied by the motor that effects the rotation at time $$t ≥ 0$$, and $$θ(t)$$ is the angular position of the antenna at time $$t ≥ 0$$.

(The basis for the model is simply Newton’s second law, $$F = ma$$, in the context of rotary motion, i.e. torque equals the moment of inertia times the angular acceleration. The friction term is modeled as a torque that is proportional to the velocity so that it is in the direction opposite to the motion of the antenna.)

The motor torque at time $$t ≥ 0$$ is assumed to be proportional to $$u(t)$$, the input voltage to the motor, with constant of proportionality $$b > 0$$.

In your calculations below use the following values: $$\alpha = \frac{c}{I}=4.6s^{-1},$$ $$λ = \frac{b}{I} = 0.787 \frac{rad}{Vs2}$$, and $$I = 10kgm^2.$$

The output variable is the angular position of the antenna.

Rewrite the model as a first order system of the form $$x'(t) = Ax(t) + Bu(t)$$ $$y(t) = Cx(t)$$ $$x(0) = x_0.$$

ATTEMPT: $$I\theta''(t) + c\theta'(t) + 0\theta(t)= \tau(t)$$ $$\theta''(t) = \frac{1}{I}\tau(t)-\frac{c}{I}\theta'(t)-0\theta(t)$$ $$x_1=\theta(t)$$ $$x_2 =\theta'(t)$$ $$x_1'(t) = \theta'(t)$$ $$x_2'(t) = \theta''(t)=\frac{b}{I}u(t)-\frac{c}{I}\theta'(t)-0\theta(t)$$ $$x_1(0) = \theta(0) = \theta_0$$ $$x_2(0) = \theta'(t) = \theta_1$$ $$x_1'(t) = 0x_1(t)+1x_2(t)+0$$ $$x_2'(t) = 0x_1(t) -\frac{c}{I}x_2(t)+\frac{b}{I}u(t)$$ $$x'(t)=\begin{pmatrix}x_1'\\\ x_2' \end{pmatrix}=\begin{pmatrix}0 & 1\\\ 0 & \frac{-c}{I}\end{pmatrix}x(t)+\begin{pmatrix}0\\\ \frac{b}{I}\end{pmatrix}u(t)$$ $$y(t)=\begin{pmatrix}1\\\ 0\end{pmatrix}x(t)$$ $$x(0)=\begin{pmatrix}\theta_0\\\ \theta_1\end{pmatrix}$$

It seems that you want $$y(t)=\theta(t)=x_1(t).$$ Unfortunately, we can't multiply two $$2\times 1$$ matrices together. In general, if $$M$$ and $$N$$ are non-scalar matrices (that is, neither has only one row and one column), say with $$M$$ being $$k\times m$$ and $$N$$ being $$n\times p,$$ we will have $$MN$$ defined only if $$m=n,$$ in which case $$MN$$ will be a $$k\times p$$ matrix.
Instead, you want $$y(t)=\begin{pmatrix}1 & 0\end{pmatrix}x(t).$$ By multiplying any $$1\times 2$$ matrix and a $$2\times 1$$ matrix together, we obtain a $$1\times 1$$ matrix--a scalar--as desired.