2.1 HW 1

  2.1.1 Questions
  2.1.2 Problem 1
  2.1.3 Problem 2
  2.1.4 Problem 3
  2.1.5 Problem 4
  2.1.6 Problem 5
  2.1.7 key solution

2.1.1 Questions

pict ;

pict ;

pict ;

pict ;

pict ;

pict ;

2.1.2 Problem 1

part (a)

Starting with the assumption that the ground surface is smooth and there is no friction. Assuming that all parts are moving in the positive direction to the right. Taking a snap shot when \(s_{2}>s_{1}\) so that the spring \(k_{2}\) is in compression. Spring \(k_{1}\) is in compression by also assuming that \(s_{1}>u\) at this instance.

Any other assumptions will also lead to the same set of equations as long as they are used in consistent way when finding the forces in the springs.

Starting with drawing a free body diagram of each body showing all forces acting on them based on the above assumption, and then using \(F=ma\) to find the equation of motion of each body \(m_{1},m_{2}\). The free body diagrams is shown below

pict

Now \(F=ma\) is applied to each body to obtain the equation of motions. For mass \(m_{2}\) \begin{align*} m_{2}s_{2}^{\prime \prime } & =-k_{2}\left ( s_{2}-s_{1}\right ) \\ s_{2}^{\prime \prime } & =-\frac{k_{2}}{m_{2}}\left ( s_{2}-s_{1}\right ) \end{align*}

And for mass \(m_{1}\) \begin{align*} m_{1}s_{1}^{\prime \prime } & =k_{2}\left ( s_{2}-s_{1}\right ) -k_{1}\left ( s_{1}-u\right ) \\ s_{1}^{\prime \prime } & =\frac{k_{2}}{m_{1}}\left ( s_{2}-s_{1}\right ) -\frac{k_{1}}{m_{1}}\left ( s_{1}-u\right ) \end{align*}

Part (b)

Now the state space equations are found. \begin{align*} \begin{pmatrix} x_{1}=s_{1}\\ x_{2}=s_{2}\\ x_{3}=s_{1}^{\prime }\\ x_{4}=s_{2}^{\prime }\end{pmatrix} & \overset{\frac{d}{dt}}{\Longrightarrow }\begin{pmatrix} x_{1}^{\prime }=s_{1}^{\prime }=x_{3}\\ x_{2}^{\prime }=s_{2}^{\prime }=x_{4}\\ x_{3}^{\prime }=s_{1}^{\prime \prime }=\frac{k_{2}}{m_{1}}\left ( s_{2}-s_{1}\right ) -\frac{k_{1}}{m_{1}}\left ( s_{1}-u\right ) =\frac{k_{2}}{m_{1}}\left ( x_{2}-x_{1}\right ) -\frac{k_{1}}{m_{1}}\left ( x_{1}-u\right ) \\ x_{4}^{\prime }=s_{2}^{\prime \prime }=-\frac{k_{2}}{m_{2}}\left ( s_{2}-s_{1}\right ) =-\frac{k_{2}}{m_{2}}\left ( x_{2}-x_{1}\right ) \end{pmatrix} \\ & =\begin{pmatrix} x_{3}\\ x_{4}\\ x_{1}\left ( -\frac{k_{2}}{m_{1}}-\frac{k_{1}}{m_{1}}\right ) +\frac{k_{2}}{m_{1}}x_{2}+\frac{k_{1}}{m_{1}}u\\ \frac{k_{2}}{m_{2}}x_{1}-\frac{k_{2}}{m_{2}}x_{2}\end{pmatrix} \end{align*}

Hence\begin{align*} \begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\\ x_{3}^{\prime }\\ x_{4}^{\prime }\end{pmatrix} & =\overset{A\left ( n\times n\right ) }{\overbrace{\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -\left ( \frac{k_{2}}{m_{1}}+\frac{k_{1}}{m_{1}}\right ) & \frac{k_{2}}{m_{1}} & 0 & 0\\ \frac{k_{2}}{m_{2}} & -\frac{k_{2}}{m_{2}} & 0 & 0 \end{pmatrix} }}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix} +\overset{B\left ( n\times m\right ) }{\overbrace{\begin{pmatrix} 0\\ 0\\ \frac{k_{1}}{m_{1}}\\ 0 \end{pmatrix} }}u\left ( t\right ) \\\begin{pmatrix} y_{1}\\ y_{2}\end{pmatrix} & =\overset{C\left ( r\times n\right ) }{\overbrace{\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \end{pmatrix} }}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix} +\overset{D\left ( r\times m\right ) }{\overbrace{\begin{pmatrix} 0\\ 0 \end{pmatrix} }}u\left ( t\right ) \end{align*}

The above is in the form of \(x^{\prime }=Ax+Bu\) and \(y=Cx+Du\) where \(r=2\) is number of outputs, \(m=1\) is the number of input and \(n=4\) is the number of states.

Part(c)

Using \(k_{1}=k_{2}=0.5,m_{1}=1,m_{2}=2\) and \(x\left ( 0\right ) =0\) now the unit step response for \(y_{1},y_{2}\) is found using Simulink. With the above values the system becomes\begin{align*} \begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\\ x_{3}^{\prime }\\ x_{4}^{\prime }\end{pmatrix} & =\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -1 & 0.5 & 0 & 0\\ 0.25 & -0.25 & 0 & 0 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix} +\begin{pmatrix} 0\\ 0\\ 0.5\\ 0 \end{pmatrix} u\left ( t\right ) \\\begin{pmatrix} y_{1}\\ y_{2}\end{pmatrix} & =\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix} +\begin{pmatrix} 0\\ 0 \end{pmatrix} u\left ( t\right ) \end{align*}

Using simulink, state space block was used to implement the above. A step input source was used. Demux was used to send the \(y_{1}\) and \(y_{2}\) responses to two different time scopes. Simulation was set for 40 seconds to obtain long enough view of the response. The following figure shows the step response and the model used.

pict

Part(d)

Different values of \(k_{1},k_{2}\) are used to see the effect on the responses. When the spring stiffness increased, the frequency of oscillation increased. For example, this is a simulation using \(k_{1}=0.5,k_{2}=10,m_{1}=1,m_{2}=2\) and \(x\left ( 0\right ) =0\). With the above values the system becomes

\begin{align*} \begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\\ x_{3}^{\prime }\\ x_{4}^{\prime }\end{pmatrix} & =\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -10.5 & 10 & 0 & 0\\ 5 & -5 & 0 & 0 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix} +\begin{pmatrix} 0\\ 0\\ 0.5\\ 0 \end{pmatrix} u\left ( t\right ) \\\begin{pmatrix} y_{1}\\ y_{2}\end{pmatrix} & =\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\end{pmatrix} +\begin{pmatrix} 0\\ 0 \end{pmatrix} u\left ( t\right ) \end{align*}

The step response for \(y_{1},y_{2}\) is

pict

Part (e)

Given\begin{align*} x^{\prime } & =Ax+Bu\\ y & =Cx+Du \end{align*}

Applying the Laplace transform to the above and using zero initial conditions gives the following result. In the following, \(X\left ( s\right ) \) is the Laplace transform of \(x\left ( t\right ) \), \(Y\left ( s\right ) \) is the Laplace transform of \(y\left ( t\right ) ,\) and \(U\left ( s\right ) \) is the Laplace transform of \(u\left ( t\right ) \)\begin{align*} sX\left ( s\right ) & =AX\left ( s\right ) +BU\left ( s\right ) \\ Y\left ( s\right ) & =CX\left ( s\right ) +DU\left ( s\right ) \end{align*}

The first equation above gives \(X\left ( s\right ) =\left ( sI-A\right ) ^{-1}BU\left ( s\right ) \). Substituting this value of \(X\left ( s\right ) \) in the second equation above results in\[ Y\left ( s\right ) =C\left ( sI-A\right ) ^{-1}BU\left ( s\right ) \] Where \(DU\left ( s\right ) \) was not used since \(D\) is zero matrix in this example. Therefore the system transfer function matrix is \[ G\left ( s\right ) =\frac{Y\left ( s\right ) }{U\left ( s\right ) }=C\left ( sI-A\right ) ^{-1}B \] Using numerical values of \(A,B,C\) from part(c) gives\[ G\left ( s\right ) =\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \end{pmatrix} \left ( s\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{pmatrix} -\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -1 & 0.5 & 0 & 0\\ 0.25 & -0.25 & 0 & 0 \end{pmatrix} \right ) ^{-1}\begin{pmatrix} 0\\ 0\\ 0.5\\ 0 \end{pmatrix} \] Hence \(G\left ( s\right ) \) is a \(2\times 1\) vector. The first entry is the transfer function between \(u\) and \(y_{1}\) and the second entry is the transfer function between \(u\) and \(y_{2}\). The above is evaluated using Matlab syms as follows

A=[0 0 1 0;0 0 0 1;-1 0.5 0 0;0.25 -0.25 0 0];
B=[0 0 .5 0]';
C=[1 0 0 0;0 1 0 0];
syms s
G=C*inv(s*eye(4)-A)*B
G =
(4*s^2 + 1)/(8*s^4 + 10*s^2 + 1)
1/(8*s^4 + 10*s^2 + 1)

From above, the transfer functions are \begin{align*} & \fbox{$H_1\left ( s\right ) =\frac{Y_1\left ( s\right ) }{U\left ( s\right ) }=\frac{4s^2+1}{8s^4+10s^2+1}$}\\ & \fbox{$H_2\left ( s\right ) =\frac{Y_2\left ( s\right ) }{U\left ( s\right ) }=\frac{1}{8s^4+10s^2+1}$} \end{align*}

Part (f)

Using \(H_{1}\left ( s\right ) \) above \[ Y_{1}\left ( s\right ) \left ( 8s^{4}+10s^{2}+1\right ) =\left ( 4s^{2}+1\right ) U\left ( s\right ) \] And taking inverse Laplace transform gives (each \(s\) adds one derivative in time)\[ \fbox{$8\frac{d^4y_1}{dt^4}+10\frac{d^2y_1}{dt^2}+y_1\left ( t\right ) =4\frac{d^2u}{dt^2}+u\left ( t\right ) $}\]

2.1.3 Problem 2

pict

The kinetic energy is given by\[ K=\frac{m}{2}\left ( \dot{r}^{2}+\left ( r\dot{\phi }\right ) ^{2}+\left ( r\dot{\theta }\cos \phi \right ) ^{2}\right ) \] And the potential energy is\[ P=-\frac{km}{r}\] Where \(k\) is constant and \(m\) is mass of satellite. The Lagrangian is\begin{align*} L & =K-P\\ & =\frac{m}{2}\left ( \dot{r}^{2}+\left ( r\dot{\phi }\right ) ^{2}+\left ( r\dot{\theta }\cos \phi \right ) ^{2}\right ) +\frac{km}{r} \end{align*}

The equations of motions of the mass \(m~\) in each degree of freedom \(r,\theta ,\phi \) are given by\begin{align} \frac{d}{dt}\frac{\partial L}{\partial \dot{r}}-\frac{\partial L}{\partial r} & =u_{r}\left ( t\right ) \tag{1}\\ \frac{d}{dt}\frac{\partial L}{\partial \dot{\theta }}-\frac{\partial L}{\partial \theta } & =u_{\theta }\left ( t\right ) \tag{2}\\ \frac{d}{dt}\frac{\partial L}{\partial \dot{\phi }}-\frac{\partial L}{\partial \phi } & =u_{\phi }\left ( t\right ) \tag{3} \end{align}

Part (a)

Starting with (1) gives find \(\frac{\partial L}{\partial r}=mr\dot{\phi }^{2}+mr\left ( \dot{\theta }\cos \phi \right ) ^{2}-\frac{km}{r^{2}}\) and \(\frac{\partial L}{\partial \dot{r}}=m\dot{r}\), hence (1) becomes\[ m\ddot{r}-mr\left ( \dot{\phi }^{2}+\left ( \dot{\theta }\cos \phi \right ) ^{2}\right ) +\frac{km}{r^{2}}=u_{r}\left ( t\right ) \]

Hence

\[ \fbox{$\ddot{r}=r\left ( \dot{\phi }^2+\left ( \dot{\theta }\cos \phi \right ) ^2\right ) -\frac{k}{r^2}+\frac{1}{m}u_r\left ( t\right ) $}\]

Similarly for (2), \(\frac{\partial L}{\partial \theta }=0\) and \(\frac{\partial L}{\partial \dot{\theta }}=m\dot{\theta }r^{2}\cos ^{2}\phi \), and \begin{align*} \frac{d}{dt}\frac{\partial L}{\partial \dot{\theta }} & =m\left ( \ddot{\theta }r^{2}\cos ^{2}\phi +2\dot{\theta }r\dot{r}\cos ^{2}\phi -2\dot{\theta }\dot{\phi }r^{2}\cos \phi \sin \phi \right ) \\ & =mr\cos \phi \left ( \ddot{\theta }r\cos \phi +2\dot{\theta }\dot{r}\cos \phi -2\dot{\theta }\dot{\phi }r\sin \phi \right ) \end{align*}

And (2) becomes\begin{align*} mr\cos \phi \left ( \ddot{\theta }r\cos \phi +2\dot{\theta }\dot{r}\cos \phi -2\dot{\theta }\dot{\phi }r\sin \phi \right ) & =u_{\theta }\left ( t\right ) \\ \ddot{\theta }r\cos \phi +2\dot{\theta }\left ( \dot{r}\cos \phi -\dot{\phi }r\sin \phi \right ) & =\frac{1}{mr\cos \phi }u_{\theta }\left ( t\right ) \\ \ddot{\theta }r\cos \phi & =-2\dot{\theta }\left ( \dot{r}\cos \phi -\dot{\phi }r\sin \phi \right ) +\frac{1}{mr\cos \phi }u_{\theta }\left ( t\right ) \end{align*}

Hence

\[ \fbox{$\ddot{\theta }=-\frac{2\dot{\theta }\dot{r}}{r}+2\dot{\theta }\dot{\phi }\tan \phi +\frac{1}{mr^2\cos ^2\phi }u_\theta \left ( t\right ) $}\]

Similarly for (3), \(\frac{\partial L}{\partial \phi }=-mr^{2}\dot{\theta }^{2}\cos \phi \sin \phi \) and \(\frac{\partial L}{\partial \dot{\phi }}=mr^{2}\dot{\phi },\) and \(\frac{d}{dt}\frac{\partial L}{\partial \dot{\phi }}=m\left ( 2r\dot{r}\dot{\phi }+r^{2}\ddot{\phi }\right ) \) hence (3) becomes\begin{align*} mr\left ( 2\dot{r}\dot{\phi }+r\left ( \ddot{\phi }+\dot{\theta }^{2}\cos \phi \sin \phi \right ) \right ) & =u_{\phi }\left ( t\right ) \\ 2\dot{r}\dot{\phi }+r\ddot{\phi }+r\dot{\theta }^{2}\cos \phi \sin \phi & =\frac{1}{mr}u_{\phi }\left ( t\right ) \end{align*}

Hence

\[ \fbox{$\ddot{\phi }=-\frac{2\dot{r}\dot{\phi }}{r}-\dot{\theta }^2\cos \phi \sin \phi +\frac{1}{mr^2}u_\phi \left ( t\right ) $}\]

The state space becomes \begin{align*} \begin{pmatrix} x_{1}=r\\ x_{2}=\dot{r}\\ x_{3}=\theta \\ x_{4}=\dot{\theta }\\ x_{5}=\phi \\ x_{6}=\dot{\phi }\end{pmatrix} & \overset{\frac{d}{dt}}{\Longrightarrow }\begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\\ x_{3}^{\prime }\\ x_{4}^{\prime }\\ x_{5}^{\prime }\\ x_{6}^{\prime }\end{pmatrix} =\begin{pmatrix} \dot{r}\\ \ddot{r}\\ \dot{\theta }\\ \ddot{\theta }\\ \dot{\phi }\\ \ddot{\phi }\end{pmatrix} =\begin{pmatrix} \dot{r}\\ r\dot{\phi }^{2}+r\dot{\theta }^{2}\cos ^{2}\phi -\frac{k}{r^{2}}+\frac{1}{m}u_{r}\left ( t\right ) \\ \dot{\theta }\\ -\frac{2}{r}\dot{\theta }\dot{r}+2\dot{\theta }\dot{\phi }\tan \phi +\frac{1}{mr^{2}\cos ^{2}\phi }u_{\theta }\left ( t\right ) \\ \dot{\phi }\\ -\frac{2}{r}\dot{r}\dot{\phi }-\dot{\theta }^{2}\cos \phi \sin \phi +\frac{1}{mr^{2}}u_{\phi }\left ( t\right ) \end{pmatrix} \\ & =\begin{pmatrix} x_{2}\\ x_{1}\left ( x_{6}^{2}+\left ( x_{4}\cos x_{5}\right ) ^{2}\right ) -\frac{k}{x_{1}^{2}}+\frac{1}{m}u_{r}\left ( t\right ) \\ x_{4}\\ -\frac{2}{x_{1}}x_{4}x_{2}+2x_{4}x_{6}\tan x_{5}+\frac{1}{mx_{1}^{2}\cos ^{2}x_{5}}u_{\theta }\left ( t\right ) \\ x_{6}\\ -\frac{2}{x_{1}}x_{2}x_{6}-x_{4}^{2}\cos x_{5}\sin x_{5}+\frac{1}{mx_{1}^{2}}u_{\phi }\left ( t\right ) \end{pmatrix} \\ & =\begin{pmatrix} f_{1}\left ( x,u\right ) \\ f_{2}\left ( x,u\right ) \\ f_{3}\left ( x,u\right ) \\ f_{4}\left ( x,u\right ) \\ f_{5}\left ( x,u\right ) \\ f_{6}\left ( x,u\right ) \end{pmatrix} \end{align*}

The output equation is now found. \(y_{1}=r=x_{1},y_{2}=\theta =x_{3},y_{3}=\phi =x_{5}\), hence\[\begin{pmatrix} y_{1}\\ y_{2}\\ y_{3}\end{pmatrix} =\begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\\ x_{5}\\ x_{6}\end{pmatrix} \]

Part (b)

Applying the values given to the state vector \(x\) results in\[ x=\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\\ x_{5}\\ x_{6}\end{pmatrix} =\begin{pmatrix} r\\ \dot{r}\\ \theta \\ \dot{\theta }\\ \phi \\ \dot{\phi }\end{pmatrix} =\begin{pmatrix} r_{0}\\ 0\\ \omega t\\ \omega \\ 0\\ 0 \end{pmatrix} \] And \[ \bar{u}=\begin{pmatrix} u_{r}\\ u_{\theta }\\ u_{\phi }\end{pmatrix} =\begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix} \] It is seen that the state vector \(x\) now has zero in all the components that can change the orbit from being in the equatorial orbit. Since the input \(u=0\) then this state will not change. The satellite will remain in this orbit.

Part(c)

To obtain \(x^{\prime }\) at \(\left ( \bar{x}+\Delta x,\bar{u}+\Delta u\right ) \) then \(f\left ( \bar{x}+\Delta x,\bar{u}+\Delta u\right ) \) is evaluated using Taylor expansion and higher order terms are ignored. This results in the \(A,B\) matrices as follows \[ f\left ( \bar{x}+\Delta x,\bar{u}+\Delta u\right ) =\overset{0\text{ since equilibrium}}{\overbrace{f\left ( \bar{x},\bar{u}\right ) }}+\left . \frac{\partial f}{\partial x}\Delta x\right \vert _{x=\bar{x}}+\left . \frac{\partial f}{\partial u}\Delta u\right \vert _{u=\bar{u}}+H.O.T \] In matrix form, the above is\[ f\left ( \bar{x}+\Delta x,\bar{u}+\Delta u\right ) =\begin{pmatrix} \frac{\partial f_{1}}{\partial x_{1}}\Delta x_{1} & \frac{\partial f_{1}}{\partial x_{2}}\Delta x_{2} & \cdots & \cdots & \cdots & \frac{\partial f_{1}}{\partial x_{6}}\Delta x_{6}\\ \frac{\partial f_{2}}{\partial x_{1}}\Delta x_{1} & \frac{\partial f_{2}}{\partial x_{2}}\Delta x_{2} & \cdots & \cdots & \cdots & \frac{\partial f_{2}}{\partial x_{6}}\Delta x_{6}\\ \vdots & & & & & \vdots \\ \vdots & & & \ddots & & \vdots \\ \vdots & & & & & \vdots \\ \frac{\partial f_{6}}{\partial x_{1}}\Delta x_{1} & \frac{\partial f_{6}}{\partial x_{2}}\Delta x_{2} & \cdots & \cdots & \cdots & \frac{\partial f_{6}}{\partial x_{6}}\Delta x_{6}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }+\begin{pmatrix} \frac{\partial f_{1}}{\partial u_{1}}\Delta u_{1} & \frac{\partial f_{1}}{\partial u_{2}}\Delta u_{2} & \frac{\partial f_{1}}{\partial u_{3}}\Delta u_{3}\\ \frac{\partial f_{2}}{\partial u_{1}}\Delta u_{1} & \frac{\partial f_{2}}{\partial u_{2}}\Delta u_{2} & \frac{\partial f_{2}}{\partial u_{3}}\Delta u_{3}\\ \vdots & & \vdots \\ \vdots & \ddots & \vdots \\ \vdots & & \vdots \\ \frac{\partial f_{6}}{\partial u_{1}}\Delta u_{1} & \frac{\partial f_{6}}{\partial u_{2}}\Delta u_{2} & \frac{\partial f_{6}}{\partial u_{3}}\Delta u_{3}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\] Therefore\[ f\left ( \bar{x}+\Delta x,\bar{u}+\Delta u\right ) =\begin{pmatrix} \frac{\partial f_{1}}{\partial x_{1}} & \frac{\partial f_{1}}{\partial x_{2}} & \cdots & \cdots & \cdots & \frac{\partial f_{1}}{\partial x_{6}}\\ \frac{\partial f_{2}}{\partial x_{1}} & \frac{\partial f_{2}}{\partial x_{1}} & \cdots & \cdots & \cdots & \frac{\partial f_{2}}{\partial x_{6}}\\ \vdots & & & & & \vdots \\ \vdots & & & \ddots & & \vdots \\ \vdots & & & & & \vdots \\ \frac{\partial f_{6}}{\partial x_{1}} & \frac{\partial f_{6}}{\partial x_{2}} & \cdots & \cdots & \cdots & \frac{\partial f_{6}}{\partial x_{6}}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\begin{pmatrix} \Delta x_{1}\\ \Delta x_{2}\\ \Delta x_{3}\\ \Delta x_{4}\\ \Delta x_{5}\\ \Delta x_{6}\end{pmatrix} +\begin{pmatrix} \frac{\partial f_{1}}{\partial u_{1}} & \frac{\partial f_{1}}{\partial u_{2}} & \frac{\partial f_{1}}{\partial u_{3}}\\ \frac{\partial f_{2}}{\partial u_{1}} & \frac{\partial f_{2}}{\partial u_{2}} & \frac{\partial f_{2}}{\partial u_{3}}\\ \vdots & & \vdots \\ \vdots & \ddots & \vdots \\ \vdots & & \vdots \\ \frac{\partial f_{6}}{\partial u_{1}} & \frac{\partial f_{6}}{\partial u_{2}} & \frac{\partial f_{6}}{\partial u_{3}}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\begin{pmatrix} \Delta u_{1}\\ \Delta u_{2}\\ \Delta u_{3}\end{pmatrix} \] Each component in the above is now evaluated and \(A,B\) are evaluated at \(\bar{x}=\begin{pmatrix} r_{0} & 0 & \omega t & \omega & 0 & 0 \end{pmatrix} ^{T},\bar{u}=\begin{pmatrix} 0 & 0 & 0 \end{pmatrix} \) in order to obtain \(A,B\). Since \(f_{1}\left ( x,u\right ) =x_{2}\), then \(\frac{\partial f_{1}}{\partial x_{2}}=1\) and all other values are zero. Since \(f_{2}\left ( x,u\right ) =x_{1}\left ( x_{6}^{2}+\left ( x_{4}\cos x_{5}\right ) ^{2}\right ) -\frac{k}{x_{1}^{2}}+\frac{1}{m}u_{r}\left ( t\right ) \) then \begin{align*} \frac{\partial f_{2}}{\partial x_{1}} & =\left ( x_{6}^{2}+\left ( x_{4}\cos x_{5}\right ) ^{2}\right ) +2\frac{k}{x_{1}^{3}}\\ \frac{\partial f_{2}}{\partial x_{2}} & =0\\ \frac{\partial f_{2}}{\partial x_{3}} & =0\\ \frac{\partial f_{2}}{\partial x_{4}} & =2x_{1}x_{4}\cos ^{2}x_{5}\\ \frac{\partial f_{2}}{\partial x_{5}} & =-2x_{1}x_{4}^{2}\cos x_{5}\sin x_{5}\\ \frac{\partial f_{2}}{\partial x_{6}} & =0 \end{align*}

Since \(f_{3}\left ( x,u\right ) =x_{4}\) then \(\frac{\partial f_{3}}{\partial x_{4}}=1\) and all other components are zero. And since \(f_{4}\left ( x,u\right ) =-\frac{2}{x_{1}}x_{4}x_{2}+2x_{4}x_{6}\frac{\sin x_{5}}{\cos x_{5}}+\frac{1}{mx_{1}^{2}\cos ^{2}x_{5}}u_{\theta }\left ( t\right ) \) then\begin{align*} \frac{\partial f_{4}}{\partial x_{1}} & =0\\ \frac{\partial f_{4}}{\partial x_{2}} & =-\frac{2}{x_{1}}x_{4}\\ \frac{\partial f_{4}}{\partial x_{3}} & =0\\ \frac{\partial f_{4}}{\partial x_{4}} & =-\frac{2}{x_{1}}x_{2}+2x_{6}\frac{\sin x_{5}}{\cos x_{5}}\\ \frac{\partial f_{4}}{\partial x_{5}} & =2x_{4}x_{6}\sec ^{2}\left ( x_{5}\right ) +\frac{2u_{\theta }\sec ^{2}x_{5}\tan x_{5}}{mx_{1}^{2}}\\ \frac{\partial f_{2}}{\partial x_{6}} & =2x_{4}\tan x_{5} \end{align*}

Since \(f_{5}\left ( x,u\right ) =x_{6}\) then \(\frac{\partial f_{5}}{\partial x_{6}}=1\) and all other components are zero. Finally, since \(f_{6}\left ( x,u\right ) =-\frac{2}{x_{1}}x_{2}x_{6}-x_{4}^{2}\cos x_{5}\sin x_{5}+\frac{1}{mx_{1}^{2}}u_{\phi }\left ( t\right ) \) then\begin{align*} \frac{\partial f_{6}}{\partial x_{1}} & =-\frac{2}{mx_{1}^{3}}u_{\phi }\\ \frac{\partial f_{6}}{\partial x_{2}} & =-\frac{2}{x_{1}}x_{2}\\ \frac{\partial f_{6}}{\partial x_{3}} & =0\\ \frac{\partial f_{6}}{\partial x_{4}} & =-2x_{4}\cos x_{5}\sin x_{5}\\ \frac{\partial f_{6}}{\partial x_{5}} & =-x_{4}^{2}\cos ^{2}x_{5}+x_{4}^{2}\sin ^{2}x_{5}\\ \frac{\partial f_{6}}{\partial x_{6}} & =-\frac{2}{x_{1}}x_{2} \end{align*}

Therefore, the linearized \(A\) matrix is\[ A=\begin{pmatrix} 0 & 1 & 0 & 0 & 0 & 0\\ \left ( x_{6}^{2}+\left ( x_{4}\cos x_{5}\right ) ^{2}\right ) +2\frac{k}{x_{1}^{3}} & 0 & 0 & 2x_{1}x_{4}\cos ^{2}x_{5} & -2x_{1}x_{4}^{2}\cos x_{5}\sin x_{5} & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & -\frac{2}{x_{1}}x_{4} & 0 & -\frac{2}{x_{1}}x_{2}+2x_{6}\frac{\sin x_{5}}{\cos x_{5}} & 2x_{4}x_{6}\sec ^{2}\left ( x_{5}\right ) +\frac{2u_{\theta }\sec ^{2}x_{5}\tan x_{5}}{mx_{1}^{2}} & 2x_{4}\tan x_{5}\\ 0 & 0 & 0 & 0 & 0 & 1\\ -\frac{2}{mx_{1}^{3}}u_{\phi } & -\frac{2}{x_{1}}x_{2} & 0 & -2x_{4}\cos x_{5}\sin x_{5} & -x_{4}^{2}\cos ^{2}x_{5}+x_{4}^{2}\sin ^{2}x_{5} & -\frac{2}{x_{1}}x_{2}\end{pmatrix} \] The above is evaluated at \(\bar{x}=\begin{pmatrix} r_{0} & 0 & \omega t & \omega & 0 & 0 \end{pmatrix} ^{T},\bar{u}=\begin{pmatrix} 0 & 0 & 0 \end{pmatrix} \) which results in\begin{align*} A & =\begin{pmatrix} 0 & 1 & 0 & 0 & 0 & 0\\ \left ( 0+\left ( \omega \cos 0\right ) ^{2}\right ) +2\frac{k}{r_{0}^{3}} & 0 & 0 & 2r_{0}\omega \cos ^{2}0 & -2r_{0}\omega ^{2}\cos 0\sin 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & -\frac{2}{r_{0}}\omega & 0 & -\frac{2}{r_{0}}\left ( 0\right ) +2\left ( 0\right ) \frac{\sin 0}{\cos 0} & 2\omega \left ( 0\right ) \sec ^{2}\left ( 0\right ) +\frac{2u_{\theta }\sec ^{2}\left ( 0\right ) \tan \left ( 0\right ) }{mr_{0}^{2}} & 2\omega \tan \left ( 0\right ) \\ 0 & 0 & 0 & 0 & 0 & 1\\ -\frac{2}{mr_{0}^{3}}\left ( 0\right ) & -\frac{2}{r_{0}}\left ( 0\right ) & 0 & -2\omega \cos 0\sin 0 & -\omega ^{2}\cos ^{2}0+\omega ^{2}\sin ^{2}0 & -\frac{2}{r_{0}}\left ( 0\right ) \end{pmatrix} \\ & =\begin{pmatrix} 0 & 1 & 0 & 0 & 0 & 0\\ \omega ^{2}+2\frac{k}{r_{0}^{3}} & 0 & 0 & 2r_{0}\omega & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & -\frac{2}{r_{0}}\omega & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1\\ 0 & 0 & 0 & 0 & -\omega ^{2} & 0 \end{pmatrix} \end{align*}

Using \(r_{0}=1,m=1\) and \(k=r_{0}^{3}\omega ^{2}\) then the above becomes\[ \fbox{$A=\begin{pmatrix} 0 & 1 & 0 & 0 & 0 & 0\\ 3\omega ^{2} & 0 & 0 & 2\omega & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & -2\omega & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1\\ 0 & 0 & 0 & 0 & -\omega ^{2} & 0 \end{pmatrix} $}\] The \(B\) matrix is now found. Since \(f_{1}\left ( x,u\right ) =x_{2}\), then \(\frac{\partial f_{1}}{\partial u_{i}}=0\) for \(i=1\cdots 3\). And since \(f_{2}\left ( x,u\right ) =x_{1}\left ( x_{6}^{2}+\left ( x_{4}\cos x_{5}\right ) ^{2}\right ) -\frac{k}{x_{1}^{2}}+\frac{1}{m}u_{r}\left ( t\right ) \) then \(\frac{\partial f_{2}}{\partial u_{r}}=\frac{1}{m}\) and the other two components are zero. Since \(f_{3}\left ( x,u\right ) =x_{4}\) then \(\frac{\partial f_{3}}{\partial u_{i}}=0\) for \(i=1\cdots 3\). And since \(f_{4}\left ( x,u\right ) =-\frac{2}{x_{1}}x_{4}x_{2}+2x_{4}x_{6}\frac{\sin x_{5}}{\cos x_{5}}+\frac{1}{mx_{1}^{2}\cos ^{2}x_{5}}u_{\theta }\left ( t\right ) \) then \(\frac{\partial f_{4}}{\partial u_{\theta }}=\frac{1}{mx_{1}^{2}\cos ^{2}x_{5}}\)and the other two components are zero. Since \(f_{5}\left ( x,u\right ) =x_{6}\) then \(\frac{\partial f_{5}}{\partial u_{i}}=0\) for \(i=1\cdots 3.\) Finally, since \(f_{6}\left ( x,u\right ) =-\frac{2}{x_{1}}x_{2}x_{6}-x_{4}^{2}\cos x_{5}\sin x_{5}+\frac{1}{mx_{1}^{2}}u_{\phi }\left ( t\right ) \) then \(\frac{\partial f_{6}}{\partial u_{\phi }}=\frac{1}{mx_{1}^{2}}\) and the other two components are zero. Hence the \(B\) matrix becomes

\[ B=\begin{pmatrix} 0 & 0 & 0\\ \frac{1}{m} & 0 & 0\\ 0 & 0 & 0\\ 0 & \frac{1}{mx_{1}^{2}\cos ^{2}x_{5}} & 0\\ 0 & 0 & 0\\ 0 & 0 & \frac{1}{mx_{1}^{2}}\end{pmatrix} \] The above is evaluated at \(\bar{x}=\begin{pmatrix} r_{0} & 0 & \omega t & \omega & 0 & 0 \end{pmatrix} ^{T}\) which results in\[ B=\begin{pmatrix} 0 & 0 & 0\\ \frac{1}{m} & 0 & 0\\ 0 & 0 & 0\\ 0 & \frac{1}{mr_{0}^{2}\cos ^{2}0} & 0\\ 0 & 0 & 0\\ 0 & 0 & \frac{1}{mr_{0}^{2}}\end{pmatrix} =\begin{pmatrix} 0 & 0 & 0\\ \frac{1}{m} & 0 & 0\\ 0 & 0 & 0\\ 0 & \frac{1}{mr_{0}^{2}} & 0\\ 0 & 0 & 0\\ 0 & 0 & \frac{1}{mr_{0}^{2}}\end{pmatrix} \] And using \(r_{0}=1,m=1\) it reduces to\[ \fbox{$B=\begin{pmatrix} 0 & 0 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0\\ 0 & 0 & 1 \end{pmatrix} $}\]

Part d

The linearized \(A\) matrix found above is

pict

This shows that due to zeros everywhere in the linkage between the states \(r,r^{\prime },\theta ,\theta ^{\prime }\) and the states \(\phi ,\phi ^{\prime }\), these states are decoupled. What this means is that motion can be analyzed in the \(\phi ,\phi ^{\prime }\) states as its own system without having to carry along other terms from the other states. This simplifies both the analysis and design for these parts of the system since they are decoupled from each others. The above decoupling is also present in the \(B\) and \(C\) matrices.

2.1.4 Problem 3

part (a)

Using chain rule, and using \(\frac{\partial \zeta }{\partial x}=1\) and \(\frac{\partial \zeta }{\partial t}=-v\) then1 \[ \frac{\partial ^{2}\phi }{\partial x^{2}}=\frac{\partial }{\partial x}\left ( \frac{\partial \phi }{\partial x}\right ) =\frac{\partial }{\partial x}\left ( \frac{d\phi }{d\zeta }\frac{\partial \zeta }{\partial x}\right ) =\frac{\partial }{\partial x}\left ( \frac{d\phi }{d\zeta }\right ) =\frac{\partial }{\partial \zeta }\left ( \frac{d\phi }{d\zeta }\right ) \frac{\partial \zeta }{\partial x}=\frac{\partial }{\partial \zeta }\left ( \frac{d\phi }{d\zeta }\right ) =\frac{d^{2}\phi }{d\zeta ^{2}}\] And\begin{align*} \frac{\partial ^{2}\phi }{\partial t^{2}} & =\frac{\partial }{\partial t}\left ( \frac{\partial \phi }{\partial t}\right ) =\frac{\partial }{\partial t}\left ( \frac{d\phi }{d\zeta }\frac{\partial \zeta }{\partial t}\right ) =\frac{\partial }{\partial t}\left ( \frac{d\phi }{d\zeta }\left ( -v\right ) \right ) =\frac{\partial }{\partial \zeta }\left ( \frac{d\phi }{d\zeta }\left ( -v\right ) \right ) \frac{\partial \zeta }{\partial t}=\frac{\partial }{\partial \zeta }\left ( \frac{d\phi }{d\zeta }\left ( -v\right ) \right ) \left ( -v\right ) \\ & =v^{2}\frac{d^{2}\phi }{d\zeta ^{2}} \end{align*}

Hence the PDE becomes the ODE\begin{equation} \frac{d^{2}\phi }{d\zeta ^{2}}-v^{2}\frac{d^{2}\phi }{d\zeta ^{2}}=\sin \phi \left ( \zeta \right ) \nonumber \end{equation}

Hence the differential equation is

\begin{equation} \fbox{$\left ( 1-v^2\right ) \frac{d^2\phi }{d\zeta ^2}=\sin \phi \left ( \zeta \right ) $}\tag{1} \end{equation}

Part (b)

Let \(x_{1}=\phi ,x_{2}=\frac{d\phi }{d\zeta }\), hence\[\begin{pmatrix} x_{1}=\phi \\ x_{2}=\frac{d\phi }{d\zeta }\end{pmatrix} \overset{\frac{d}{dt}}{\Longrightarrow }\begin{pmatrix} x_{1}^{\prime }=\frac{d\phi }{d\zeta }\\ x_{2}^{\prime }=\frac{d^{2}\phi }{d\zeta ^{2}}\end{pmatrix} =\begin{pmatrix} x_{2}\\ \frac{\sin x_{1}}{1-v^{2}}\end{pmatrix} \] Hence \(x^{\prime }=f\left ( x\right ) \) becomes\begin{align*} \begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\end{pmatrix} & =\begin{pmatrix} x_{2}\\ \frac{\sin x_{1}}{1-v^{2}}\end{pmatrix} \\ & \equiv f\left ( x\right ) \end{align*}

Part (c)

Equation (1) is solved, and then the result is compared to the so called ”kink” solution provided in order to determine what the constant of integration are. The constant of integration will be \(x_{1}\left ( 0\right ) \) and \(x_{2}\left ( 0\right ) \). Starting by multiplying both sides of (1) by \(\frac{d\phi }{d\zeta }\) results in\[ \left ( 1-v^{2}\right ) \frac{d^{2}\phi }{d\zeta ^{2}}\frac{d\phi }{d\zeta }=\sin \phi \frac{d\phi }{d\zeta }\] Or\[ \left ( 1-v^{2}\right ) \frac{d^{2}\phi }{d\zeta ^{2}}\frac{d\phi }{d\zeta }d\zeta =\sin \phi d\phi \] Now both sides are integrated. The RHS gives \(\int \sin \phi d\phi =-\cos \left ( \phi \right ) +c_{1}\) and the LHS gives \[ \int \left ( 1-v^{2}\right ) \frac{d^{2}\phi }{d\zeta ^{2}}\frac{d\phi }{d\zeta }d\zeta =\left ( 1-v^{2}\right ) \frac{1}{2}\left ( \frac{d\phi }{d\zeta }\right ) ^{2}\] This is becuase if \(\frac{1}{2}\left ( \frac{d\phi }{d\zeta }\right ) ^{2}\) is differentiated, using chain rule, the result will be the integrand. Since differentiating \(\frac{1}{2}\left ( \frac{d\phi }{d\zeta }\right ) ^{2}\) w.r.t. \(\zeta \) gives \(\frac{d\phi }{d\zeta }\frac{d^{2}\phi }{d\zeta ^{2}}\) which is the integrand in the LHS. No need to introduced a new integration of constant again here as it can be absorbed with \(c_{1}\). Therefore, the result after integration once is\begin{equation} \left ( 1-v^{2}\right ) \frac{1}{2}\left ( \frac{d\phi }{d\zeta }\right ) ^{2}=-\cos \left ( \phi \right ) +c_{1}\tag{2} \end{equation} To make some progress now, assuming the following initial conditions \(x_{1}\left ( 0\right ) =0=\phi \) and \(x_{2}\left ( 0\right ) =0=\frac{d\phi }{d\zeta }\). Using these initial conditions results in \[ \fbox{$c_1=1$}\] Equation (2) now becomes\begin{align} \frac{\left ( \frac{d\phi }{d\zeta }\right ) ^{2}}{1-\cos \left ( \phi \right ) } & =\frac{2}{\left ( 1-v^{2}\right ) }\nonumber \\ \frac{1}{\sqrt{1-\cos \left ( \phi \right ) }}\frac{d\phi }{d\zeta } & =\frac{\sqrt{2}}{\sqrt{1-v^{2}}}\tag{3} \end{align}

From trigonometric tables the relation \(\sin \frac{x}{2}=\pm \sqrt{\frac{1-\cos x}{2}}\) is used, therefore \(\sqrt{1-\cos \left ( \phi \right ) }=\pm \sqrt{2}\sin \frac{\phi }{2}\) and (3) becomes\begin{align*} \frac{1}{\pm \sqrt{2}\sin \frac{\phi }{2}}\frac{d\phi }{d\zeta } & =\frac{\sqrt{2}}{\sqrt{1-v^{2}}}\\ \pm \frac{d\phi }{\sin \frac{\phi }{2}} & =\frac{2}{\sqrt{1-v^{2}}}d\zeta \end{align*}

Doing integration again\begin{equation} \pm \int \frac{d\phi }{\sin \frac{\phi }{2}}=\frac{2}{\sqrt{1-v^{2}}}\int d\zeta \tag{4} \end{equation} From tables (or using substitutions) \(\int \) \(\frac{d\phi }{\sin \frac{\phi }{2}}=2\ln \left ( \tan \left ( \frac{\phi }{4}\right ) \right ) \) hence (4) becomes\begin{align*} \pm 2\ln \left ( \tan \left ( \frac{\phi }{4}\right ) \right ) & =\frac{2}{\sqrt{1-v^{2}}}\left ( \zeta -\zeta _{0}\right ) \\ \tan \left ( \frac{\phi }{4}\right ) & =\exp \left ( \pm \frac{\zeta -\zeta _{0}}{\sqrt{1-v^{2}}}\right ) \end{align*}

Therefore\begin{align*} \frac{\phi }{4} & =\arctan \left ( \pm \exp \left ( \frac{\zeta -\zeta _{0}}{\sqrt{1-v^{2}}}\right ) \right ) \\ \phi \left ( \zeta \right ) & =x_{1}=4\arctan \left ( \pm \exp \left ( \frac{\zeta -\zeta _{0}}{\sqrt{1-v^{2}}}\right ) \right ) \end{align*}

If \(\zeta _{0}=0\) then\[ \fbox{$x_1=4\arctan \left ( \pm \exp \left ( \frac{\zeta }{\sqrt{1-v^2}}\right ) \right ) $}\] This is the answer we are asked to show. Hence the initial conditions needed to obtain this answer are \(x_{1}\left ( 0\right ) =0\) and \(x_{2}\left ( 0\right ) =0\)

2.1.5 Problem 4

The robotic arm coupled differential equations are\begin{align*} I\theta _{1}^{\prime \prime }+mgl\sin \theta _{1}+k\left ( \theta _{1}-\theta _{2}\right ) & =0\\ J\theta _{2}^{\prime \prime }-k\left ( \theta _{1}-\theta _{2}\right ) & =F\left ( t\right ) \end{align*}

Part a

Let\begin{align*} \begin{pmatrix} x_{1}=\theta _{1}\\ x_{2}=\theta _{2}\\ x_{3}=\theta _{1}^{\prime }\\ x_{4}=\theta _{2}^{\prime }\end{pmatrix} \overset{\frac{d}{dt}}{\Longrightarrow }\begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\\ x_{3}^{\prime }\\ x_{4}^{\prime }\end{pmatrix} & =\begin{pmatrix} \theta _{1}^{\prime }\\ \theta _{2}^{\prime }\\ \theta _{1}^{\prime \prime }\\ \theta _{2}^{\prime \prime }\end{pmatrix} =\begin{pmatrix} \theta _{1}^{\prime }\\ \theta _{2}^{\prime }\\ \frac{mgl}{I}\sin \theta _{1}+\frac{k}{I}\left ( \theta _{1}-\theta _{2}\right ) \\ \frac{k}{J}\left ( \theta _{1}-\theta _{2}\right ) +\frac{1}{J}F\left ( t\right ) \end{pmatrix} =\begin{pmatrix} x_{3}\\ x_{4}\\ -\frac{mgl}{I}\sin x_{1}-\frac{k}{I}\left ( x_{1}-x_{2}\right ) \\ \frac{k}{J}\left ( x_{1}-x_{2}\right ) +\frac{1}{J}F\left ( t\right ) \end{pmatrix} \\ & =\begin{pmatrix} f_{1}\left ( x,u\right ) \\ f_{2}\left ( x,u\right ) \\ f_{3}\left ( x,u\right ) \\ f_{4}\left ( x,u\right ) \end{pmatrix} \end{align*}

Where \(u\), the input, is \(F\left ( t\right ) \) in this example, but the letter \(u\) is used since it is the common notation.

Part b

Let equilibrium point be \(\left ( \bar{x},\bar{u}\right ) =\left ( 0,0\right ) \). The system is now linearized around this point.\begin{align*} f\left ( \bar{x}+\Delta x,\bar{u}+\Delta u\right ) & =\begin{pmatrix} \frac{\partial f_{1}}{\partial x_{1}} & \frac{\partial f_{1}}{\partial x_{2}} & \frac{\partial f_{1}}{\partial x_{3}} & \frac{\partial f_{1}}{\partial x_{4}}\\ \frac{\partial f_{2}}{\partial x_{1}} & \frac{\partial f_{2}}{\partial x_{2}} & \frac{\partial f_{2}}{\partial x_{3}} & \frac{\partial f_{2}}{\partial x_{4}}\\ \frac{\partial f_{3}}{\partial x_{1}} & \frac{\partial f_{3}}{\partial x_{2}} & \frac{\partial f_{3}}{\partial x_{3}} & \frac{\partial f_{3}}{\partial x_{4}}\\ \frac{\partial f_{4}}{\partial x_{1}} & \frac{\partial f_{4}}{\partial x_{2}} & \frac{\partial f_{4}}{\partial x_{3}} & \frac{\partial f_{4}}{\partial x_{4}}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\begin{pmatrix} \Delta x_{1}\\ \Delta x_{2}\\ \Delta x_{3}\\ \Delta x_{4}\end{pmatrix} +\begin{pmatrix} \frac{\partial f_{1}}{\partial u}\\ \frac{\partial f_{2}}{\partial u}\\ \frac{\partial f_{2}}{\partial u}\\ \frac{\partial f_{2}}{\partial u}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\Delta u\\ & =\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -\frac{mgl}{I}\cos x_{1}-\frac{k}{I} & \frac{k}{I} & 0 & 0\\ \frac{k}{J} & -\frac{k}{J} & 0 & 0 \end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\begin{pmatrix} \Delta x_{1}\\ \Delta x_{2}\\ \Delta x_{3}\\ \Delta x_{4}\end{pmatrix} +\begin{pmatrix} 0\\ 0\\ 0\\ \frac{1}{J}\end{pmatrix} _{\left ( \bar{x},\bar{u}\right ) }\Delta u \end{align*}

The above is evaluated at \(\left ( \bar{x},\bar{u}\right ) =\left ( 0,0\right ) \) giving\begin{align*} A & =\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -\frac{mgl}{I}-\frac{k}{I} & \frac{k}{I} & 0 & 0\\ \frac{k}{J} & -\frac{k}{J} & 0 & 0 \end{pmatrix} \\ B & =\begin{pmatrix} 0\\ 0\\ 0\\ \frac{1}{J}\end{pmatrix} \end{align*}

Part c

Using values \(I=J=mgl=k=1\), the A matrix becomes\[ \fbox{$A=\begin{pmatrix} 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\\ -2 & 1 & 0 & 0\\ 1 & -1 & 0 & 0 \end{pmatrix} $}\] The real part of the eigenvalues of this matrix are

A=[0 0 1 0;0 0 0 1;-2 1 0 0;1 -1 0 0];
EDU>> real(eig(A))
ans =
2.9302e-18
2.9302e-18
-3.1554e-30
-3.1554e-30

There is no positive real part. The real part of the eigenvalues are effectively zero. They are pure complex conjugate values. Hence the system is stable (sometimes also called marginally stable in this case).

2.1.6 Problem 5

solution

\[\begin{pmatrix} x_{1}^{\prime }\\ x_{2}^{\prime }\end{pmatrix} =\begin{pmatrix} -\frac{t}{1+t^{2}} & 1\\ 0 & \frac{-4t}{1+t^{2}}\end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\end{pmatrix} \] With initial conditions \(\begin{pmatrix} x_{1}\left ( 0\right ) \\ x_{2}\left ( 0\right ) \end{pmatrix} =\begin{pmatrix} x_{10}\\ x_{20}\end{pmatrix} \)

\(x_{2}\left ( t\right ) \) is first solved since it does not depend on \(x_{1}\left ( t\right ) \) and then the solution is used to solve for \(x_{1}\left ( t\right ) \). The differential equation for \(x_{2}\left ( t\right ) \) is\begin{align*} \frac{dx_{2}}{dt} & =\frac{-4t}{1+t^{2}}x_{2}\\ \frac{dx_{2}}{x_{2}} & =\frac{-4t}{1+t^{2}}dt \end{align*}

Integrating\begin{align*} \ln x_{2} & =\ln \left ( \frac{1}{\left ( 1+t^{2}\right ) ^{2}}\right ) +c\\ x_{2} & =c\frac{1}{\left ( 1+t^{2}\right ) ^{2}} \end{align*}

When \(t=0\), \(x_{2}\left ( 0\right ) =x_{20}\), hence \(c=x_{20}\) and \[ \fbox{$x_2\left ( t\right ) =\frac{x_{20}}{\left ( 1+t^2\right ) ^2}$}\] Now since \(x_{2}\left ( t\right ) \) was found, it is used to obtain \(x_{1}\left ( t\right ) \). The differential equation for \(x_{1}\left ( t\right ) \) is\begin{align*} \frac{dx_{1}}{dt} & =-\frac{t}{1+t^{2}}x_{1}+x_{2}\\ \frac{dx_{1}}{dt}+\frac{t}{1+t^{2}}x_{1} & =x_{20}\frac{1}{\left ( 1+t^{2}\right ) ^{2}} \end{align*}

The integrating factor is \(I=e^{\int \frac{t}{1+t^{2}}dt}=\sqrt{\left ( 1+t^{2}\right ) }\), hence the solution to the above is\[ d\left ( Ix_{1}\right ) =x_{20}\frac{I}{\left ( 1+t^{2}\right ) ^{2}}\] Integrating\begin{align*} Ix_{1} & =\int x_{20}\frac{I}{\left ( 1+t^{2}\right ) ^{2}}dt\\ & =x_{20}\int \frac{\sqrt{\left ( 1+t^{2}\right ) }}{\left ( 1+t^{2}\right ) ^{2}}dt\\ & =x_{20}\int \frac{1}{\left ( 1+t^{2}\right ) ^{3/2}}dt\\ & =x_{20}\frac{t}{\sqrt{1+t^{2}}}+c_{2} \end{align*}

Hence, dividing by \(I\) gives the final solution\[ x_{1}\left ( t\right ) =x_{20}\frac{t}{1+t^{2}}+\frac{c_{2}}{\sqrt{\left ( 1+t^{2}\right ) }}\] When \(t=0,x_{1}\left ( 0\right ) =x_{10}\), hence \(c_{2}=x_{10}\) and the solution becomes\[ x_{1}\left ( t\right ) =x_{20}\frac{t}{1+t^{2}}+\frac{x_{10}}{\sqrt{\left ( 1+t^{2}\right ) }}\] Now we are asked to let \(x_{10}=1\), hence \(x_{1}\left ( t\right ) \) becomes\[ \fbox{$x_1\left ( t\right ) =x_{20}\frac{t}{1+t^2}+\frac{1}{\sqrt{\left ( 1+t^2\right ) }}$}\] Now taking the limit of \(x_{1}\left ( t\right ) _{t\rightarrow \infty }\) gives\[ x_{1}\left ( t\right ) \rightarrow 0 \]

Using Matlab syms, these can be solved as follows

clear all
syms x1(t) x2(t) t x10 x20
eq1=diff(x1,t)== -t/(1+t^2)*x1+x2;
eq2=diff(x2,t)== -(4*t)/(1+t^2)*x2;
[x1Sol,x2Sol]=dsolve(eq1,eq2,x1(0)==1)

x1Sol =

1/(t^2 + 1)^(1/2) + (C2*t)/(t^2 + 1)

x2Sol =

C2/(t^2 + 1)^2

2.1.7 key solution

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict

pict