User:Egm6321.f11.team1.zheng.zx/personal place/HW3

= R*3.6 Derive the equations of motion of the Double Pendulums =

Find
1.Derive the equations of motion
 * {| style="width:100%" border="0" align="left"

\displaystyle m_1l^2 \ddot{\theta_1} = -ka^2(\theta_1-\theta_2)-m_1gl\theta_1+ u_1l $$ $$
 * $$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle m_2l^2 \ddot{\theta_2} = -ka^2(\theta_2-\theta_1)-m_2gl\theta_2+ u_2l $$ $$ 2.Write in matrix form
 * $$\displaystyle
 * }
 * }

Solution
For the left arm: 'M' is the torque relative to hinge point


 * {| style="width:100%" border="0" align="left"

\displaystyle \sum M=M_u+M_k+M_G $$ $$ 'I' is the moment of inertia '$$\alpha$$' is the angular acceleration
 * $$\displaystyle (Equation\;3.6.1 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \sum M=I\cdot\alpha $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle I_1=m_1l^2 $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle \alpha=\ddot{\theta_1} $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle M_u=u_1 \cdot l \cdot \cos \theta_1 \approx u_1 \cdot l $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle M_k=F_k \cdot a \cdot \cos \theta_1 =k(a \cdot \sin \theta_2 -a \cdot \sin \theta_1) \cdot a \cdot \cos \theta_1 \approx -ka^2(\theta_1 - \theta_2) $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle M_G=-m_1g \cdot l \cdot \sin \theta_1 \approx -m_1gl \theta_1 $$ Apply to equation 3.6.1:
 * 
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle m_1l^2 \ddot{\theta_1} = -ka^2(\theta_1-\theta_2)-m_1gl\theta_1+ u_1l $$ $$ Similarly, we can get the equation of motion for the right arm:
 * $$\displaystyle (Equation\; 3.6.2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle m_2l^2 \ddot{\theta_2} = -ka^2(\theta_2-\theta_1)-m_2gl\theta_2+ u_2l $$ $$
 * $$\displaystyle (Equation\; 3.6.3)
 * }
 * }

Linear time-variant systems
 * {| style="width:100%" border="0" align="left"

\displaystyle \dot{x}(t)=A(t)x(t)+B(t)u(t) $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle x:=\left \lfloor \theta_1 \dot \theta_1 \theta_2 \dot \theta_2 \right \rfloor ^T \in \mathbb {R} ^{4 \times 1} $$
 * 
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle u:= \begin{Bmatrix} u_1l\\u_2l \end{Bmatrix} \in \mathbb {R}^{2 \times 1} $$
 * 
 * }
 * }

to find A and B in the following format


 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{bmatrix} \dot \theta_1\\ \ddot \theta_1\\ \dot \theta_2\\ \ddot \theta_2 \end{bmatrix} = \begin{bmatrix} & &  & \\  &  &  & \\  &  &  & \\  &  &  & \end{bmatrix} \begin{bmatrix} \theta_1\\ \dot \theta_1\\ \theta_2\\ \dot \theta_2 \end{bmatrix} + \begin{bmatrix} & \\ & \\  & \\  & \end{bmatrix} \begin{bmatrix} u_1l\\ u_2l \end{bmatrix} $$ $$
 * $$\displaystyle (Equation\; 3.6.4)
 * }
 * }

finally, the matrix is:


 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{bmatrix} \dot \theta_1\\ \ddot \theta_1\\ \dot \theta_2\\ \ddot \theta_2 \end{bmatrix} = \begin{bmatrix} 0&1 &0  &0 \\  \displaystyle -\frac{ka^2}{m_1l^2}-\frac{g}{l} &0 & \displaystyle \frac{ka^2}{m_1l^2}  &0 \\ 0 &0 &0  &1 \\  \displaystyle \frac{ka^2}{m_2l^2}&0  & \displaystyle -\frac{ka^2}{m_2l^2}-\frac{g}{l} &0 \end{bmatrix} \begin{bmatrix} \theta_1\\ \dot \theta_1\\ \theta_2\\ \dot \theta_2 \end{bmatrix} + \begin{bmatrix} 0&0 \\ \displaystyle \frac{1}{m_1l^2}&0 \\ 0&0\\ 0&\displaystyle \frac{1}{m_2l^2} \end{bmatrix} \begin{bmatrix} u_1l\\ u_2l \end{bmatrix} $$ $$
 * $$\displaystyle (Equation\; 3.6.5)
 * }
 * }

= R*3.13 Second exactness condition =

Given

 * {| style="width:100%" border="0" align="left"

\displaystyle G(x,y,y',y)=g(x,y,p)+f(x,y,p)y=0 $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g(x,y,p):=\phi_x (x,y,p)+\phi_y (x,y,p)p $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle f(x,y,p):=\phi_p (x,y,p) $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }

Find
1.Derive the 2nd relation in the 2nd exactness condition 2.Derive the 1st relation in the 2nd exactness condition 3.Verify that $$x(y')^2+yy'+(xy)y''=0$$satisfies the 2nd exactness condition

1.Derive the 2nd relation in the 2nd exactness condition

 * {| style="width:100%" border="0" align="left"

\displaystyle G(x,y,y',y)=g(x,y,p)+f(x,y,p)y=0 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.1 )
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g(x,y,p):=\phi_x (x,y,p)+\phi_y (x,y,p)p $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\; 3.13.2)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle f(x,y,p):=\phi_p (x,y,p) $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.3 )
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle p:=y' $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g_p = \phi_{xp} + \phi_{yp} \cdot p +\phi y $$ for
 * <p style="text-align:right;">
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle f=\phi_p $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g_p = f_x+f_y \cdot p + \phi y $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.4 )
 * }
 * }

then
 * {| style="width:100%" border="0" align="left"

\displaystyle g_{pp}=f_{xp} + pf_{yp}+f_y+\phi_{yp} $$
 * <p style="text-align:right;">
 * }
 * }

for
 * {| style="width:100%" border="0" align="left"

\displaystyle f=\phi_p $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g_{pp}=f_{xp}+pf_{yp}+2f_y $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.5 )
 * }
 * }

2.Derive the 1st relation in the 2nd exactness condition
For we know that:
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_{xy}= \phi_{yx} $$
 * <p style="text-align:right;">
 * }
 * }

From equation 3.13.4 we can get:
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_y = g_p-f_x-pf_y $$
 * <p style="text-align:right;">
 * }
 * }

then
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_x = g-\phi_y \cdot p =g- pg_p + pf_x + p^2f_y $$ then
 * <p style="text-align:right;">
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_{xy}=g_y-p_yg_p+p_yf_x-pg_{py}+pf_{xy}+2pp_yf_y+p^2f_{yy} $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle \phi_{yx}=gp_x - pf_{xy}-f_yp_x-f_{xx} $$ apply $$\phi_{xy}=\phi_{yx}$$
 * <p style="text-align:right;">
 * }
 * }

and $$p_x=p_y=0$$ We get:
 * {| style="width:100%" border="0" align="left"

\displaystyle f_{xx}+2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.6 )
 * }
 * }

3.Verify that $$x(y')^2+yy'+(xy)y''=0$$satisfies the 2nd exactness condition

 * {| style="width:100%" border="0" align="left"

\displaystyle x(y')^2+yy'+(xy)y''=0 $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g(x,y,y')=x(y')^2+yy' $$
 * <p style="text-align:right;">
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle f(x,y,y')=xy $$
 * <p style="text-align:right;">
 * }
 * }

1.Verify the first relation
 * {| style="width:100%" border="0" align="left"

\displaystyle f_{xx}+2pf_{xy}+p^2f_{yy}=0+2p+0=2p $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.7 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle g_{xp}+pg_{yp}-g_y=2p+p-p=2p $$ $$ so Eq7=Eq8, satisfied 2.Verify the second relation
 * <p style="text-align:right;">$$\displaystyle (Equation\; 3.13.8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle f_{xp}+pf_{yp}+2f_y=0+0+2x=2x $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.13.9 )
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle g_{pp}=2x $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\; 3.13.10)
 * }
 * }

so Eq9=Eq10, satisfied

= R*3.16 Finish the story =

Given

 * {| style="width:100%" border="0" align="left"

\displaystyle \phi (x,y,p)=3p^5 \cos x^2 +2xy^3 =k $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _x = 3p^5(-\sin x^2)(2x)+2y^3 $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _y = 6xy^2 $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _p = 15p^4 \cos x^2 $$ $$
 * <p style="text-align:right;">$$\displaystyle
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle h_yy'+h_x=(6xy^2)y' + 2y^3 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.0 )
 * }
 * }

Find
$$ \displaystyle \phi (x,y,p) $$ using reverse engineering

Solution

 * {| style="width:100%" border="0" align="left"

\displaystyle \phi (x,y,p)=3p^5 \cos x^2 +2xy^3 =k $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\; 3.16.1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _x = 3p^5(-\sin x^2)(2x)+2y^3 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _y = 6xy^2 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\; 3.16.3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi _p = 15p^4 \cos x^2 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.4 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle f= \phi _p =15p^4 \cos x^2 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.5 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle g= \phi_yp+\phi _x = (6xy^2)y'+[-6xp^5 \sin x^2 +2y^3] $$ $$ From equation 6, we get:
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.6 )
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle \phi = h(x,y)+3p^5\cos x^2 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.7 )
 * }
 * }

then
 * {| style="width:100%" border="0" align="left"

\displaystyle g=(h_y+0)y' + [h_x + 3p^5(-sinx^2)(2x)]=(6xy^2)y' - 6xp^5 \sin x^2 + 2y^3 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\; 3.16.8)
 * }
 * }

rearranging:
 * {| style="width:100%" border="0" align="left"

\displaystyle h_yy'+h_x=(6xy^2)y' + 2y^3 $$ $$
 * <p style="text-align:right;">$$\displaystyle (Equation\;3.16.9 )
 * }
 * }

We have solved the problem assumed that $$\displaystyle h_x=2y^3$$

Now we assume that $$\displaystyle h_yy'=2y^3$$ so:


 * {| style="width:100%" border="0" align="left"

\displaystyle h_x=(6xy^2)y'=6y^2y' \cdot x $$
 * <p style="text-align:right;">
 * }
 * }

integrating h:


 * {| style="width:100%" border="0" align="left"

\displaystyle h(x,y)=3x^2 y^2 y' + k_2(y) $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle h_y=6x^2 y y'+{k_2}'(y) $$
 * <p style="text-align:right;">
 * }
 * }

for
 * {| style="width:100%" border="0" align="left"

\displaystyle h_y=\frac{2y^3}{y'} $$
 * <p style="text-align:right;">
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle {k_2}'(y)=\frac{2y^3}{y'}-6x^2y \cdot y' $$
 * <p style="text-align:right;">
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\displaystyle k_2(y)=\frac{y^4}{2y'}-3x^2y'y^2+k_3 $$ so:
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle h(x,y)=\frac{y^4}{2y'}+k_3 $$
 * <p style="text-align:right;">
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\displaystyle \phi (x,y,p)=3p^5\cos x^2 + \frac{y^4}{2y'}=k $$
 * <p style="text-align:right;">
 * }
 * }

= References =