\documentclass[12pt]{article}
\usepackage{amsmath}
%%%--------- Set up page size and formatting information ----------%%%
\def\newpage{\par\vfill\eject}	%new page macro
\def\tab{\ \ \ \ \ }		%tab in five spaces
\def\dtab{{\tab}{\tab}}         %double tab

\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.0in}
\setlength{\topmargin}{-0.51in}
\setlength{\oddsidemargin}{0.0in}
\parskip 2ex
\parindent=0pt
%%%----------------------------------------------------------------------%%%
\begin{document}
\input{/home/jwb/tex/reals.tex}

\centerline{\bf ME 115(a):  Solution to Homework $\#4$}
\vskip 0.5 true in

%%%--------------------------------------------------------------------%%%
{\bf Problem 1:} 

Let the three rotating frames be termed the ``$\psi$-frame,''
``$\phi$-frame,'' and the ``$\gamma$-frame.''  The spatial angular velocity of
the body will be the same as the spatial angular velocity of the
$\gamma$-frame:
   \begin{equation} \label{eq:angular}
    \vec{\omega}^s = {^S}R^{\psi} \vec{\omega}_{\psi}^b + 
                       {^S}R^{\phi} \vec{\omega}_{\phi}^b + 
                       {^S}R^{\gamma} \vec{\omega}_{\gamma}^b  \end{equation}
where $\vec{\omega}_{\psi}^b$ is the body angular velocity of the $\psi$-frame,
$^{S}R^{\psi}$ is the orientation of the $\psi$-frame with respect to the
stationary frame, etc.  The body angular velocities are simply:
   \[\vec{\omega}^b_{\psi} = \begin{bmatrix} 0\\ 0\\ \dot{\psi}\end{bmatrix}
	 \tab
     \vec{\omega}^b_{\phi} = \begin{bmatrix} 0\\ \dot{\phi}\\ 0\end{bmatrix}
          \tab
    \vec{\omega}^b_{\gamma} = \begin{bmatrix} 0\\ 0\\ \dot{\gamma}\end{bmatrix}
        \]

while the orientations of the frames are:
 \[ ^{S}R^{\psi} =\begin{bmatrix} \cos\psi & -\sin\psi & 0\\ 
                \sin\psi & \cos\psi & 0\\
                0 & 0 & 1\end{bmatrix} \tab
      ^{\psi}R^{\phi} =\begin{bmatrix} \cos\phi & 0 & \sin\phi\\ 
                0 & 1 & 0\\ 
                -\sin\phi & 0 & \cos\phi \end{bmatrix} \]

  \[  ^{\phi}R^{\gamma}= \begin{bmatrix} \cos\gamma & -\sin\gamma & 0\\ 
                        \sin\gamma & \cos\gamma & 0 \\
                        0 & 0 & 1\end{bmatrix} \]
Using these frames, one can determine:
  \[ ^{S}R^{\phi} = {^{S}}R^{\psi} {^{\psi}}R^{\phi} \tab
     ^{S}R^{\gamma} = {^{S}}R^{\psi} {^{\psi}}R^{\phi} {^{\phi}}R^{\gamma}. \]

Substituting into Equation (\ref{eq:angular}) results in:

 \begin{equation}
    \vec{\omega}^s = \begin{bmatrix} 0\\ 0\\ \dot{\psi}\end{bmatrix} +
     \begin{bmatrix} -\dot{\phi}\sin\psi \\ 
                    \dot{\phi}\cos\psi \\ 0\end{bmatrix} +
     \begin{bmatrix}\dot{\gamma}\cos\psi \sin\phi \\
                    \dot{\gamma}\sin\psi \sin\phi \\
                    \dot{\gamma}\cos\phi \end{bmatrix}
   = \begin{bmatrix} -\dot{\phi}\sin\psi + \dot{\gamma}\cos\psi \sin\phi \\
        \dot{\phi}\cos\gamma + \dot{\gamma} \sin\psi \sin\phi \\
        \dot{\psi} + \dot{\gamma}\cos\phi \end{bmatrix}
   \end{equation}

%%%--------------------------------------------------------------------%%%
\vskip 0.2 true in
{\bf Problem 2:} (Problem 11(d,e) in Chapter 2 of MLS).



{\bf Part (d):} Let 
  \[ g=\begin{bmatrix} A & \vec{p}\\ \vec{0}^T & 1\end{bmatrix} \]
where $A\in SO(2)$ and $\vec{p}\in\real^2$.  Then direct calculation shows
that $\dot{g}g^{-1}$ and $g^{-1}\dot{g}$ are twists.  The spatial and
body velocities have definitions analogous to those for 3-dimensional
rigid bodies

{\bf Part (e):} Let $\hat{V}^b$ denote the planar body velocity:
   \[ \hat{V}^b = \begin{bmatrix} \hat{\omega}^b & \vec{v}^b\\
			        \vec{0}^T & 0\end{bmatrix} \]
where $\hat{\omega}^b\in so(2)$, $\vec{v}^b\in\real^2$. Then the planar
spatial velocity is:
  \[\begin{array}{rl} 
    \hat{V}^s &= Ad_g \hat{V}^b = g\hat{V}^b g^{-1} \\ 
      &= \begin{bmatrix} R & \vec{p}\\ \vec{0}^T & 1\end{bmatrix}
         \begin{bmatrix} \hat{\omega}^b & \vec{v}^b\\ \vec{0}^T & 0\end{bmatrix} 
         \begin{bmatrix} R^T & -R^T\vec{p}\\ \vec{0}^T & 0\end{bmatrix}\\ 
      &= \begin{bmatrix} R\hat{\omega}^bR^T & -R\hat{\omega}^b R^T\vec{p}
	       + R \vec{v}^b\\ \vec{0}^T & 0\end{bmatrix} \end{array} \]
Therefore:
  \[ \hat{\omega}^s = R \hat{\omega}^b R^T \tab 
     \vec{v}^s = R\vec{v}^b - R\hat{\omega}^b R^T \vec{p}
               = R\vec{v}^b - \hat{\omega}^s\vec{p} \]
The spatial angular velocity can be simplified as follows:
  \[ \hat{\omega}^s = R \hat{\omega}^b R^T = 
     \begin{bmatrix} r_{11} & r_{12}\\ r_{21} & r_{22}\end{bmatrix}
     \begin{bmatrix} 0 & -\omega\\ \omega & 0\end{bmatrix}
     \begin{bmatrix} r_{11} & r_{21}\\ r_{12} & r_{22}\end{bmatrix}
     = \omega \begin{bmatrix} 0 & -\det(R)\\ \det(R) & 0\end{bmatrix}
     = \omega \begin{bmatrix} 0 & -1\\ 1 & 0\end{bmatrix} = \hat{\omega}^b \]

Using this result:
  \begin{eqnarray}
    \vec{v}^s &=& R\vec{v}^b - \hat{\omega}^s \vec{p}
               = R\vec{v}^b + \omega^b \begin{bmatrix} p_y\\ -p_x\end{bmatrix} 
		 \end{eqnarray}
Therefore:
  \[ V^s = \begin{bmatrix} \vec{v}^s\\ \omega^s\end{bmatrix}
         = \begin{bmatrix} R & \begin{bmatrix} p_y \\ -p_x \end{bmatrix} \\
		         \vec{0}^T & 1\end{bmatrix} V^b \]


%%%----------------------------------------------------------------------%%%
{\bf Problem 3:} (Problem 14 in Chapter 2 of MLS).

{\bf Part (a):} Let $g\in SE(3)$ denote a homogeneous transformation matrix:
  \[ g= \begin{bmatrix} R & \vec{p}\\ \vec{0}^T & 1\end{bmatrix} \tab
    Ad_g = \begin{bmatrix} R & \hat{p}R\\ 0 & R\end{bmatrix} \]
Then:
  \[ g^{-1}=\begin{bmatrix} R^T & -R^T\vec{p}\\ \vec{0}^T & 1\end{bmatrix} \tab
     Ad_{g^{-1}} = \begin{bmatrix} R^T & -\widehat{(R^T\vec{p})} R^T\\
       		                \vec{0}^T & R^T\end{bmatrix}
        = \begin{bmatrix} R^T & -R^T\hat{p}\\ 0 & R^T\end{bmatrix} \]
where we have made use of the identity $\widehat{(R^T\vec{p})} = R^T \hat{p} 
R$.  Let's now compute $Ad_g Ad_{g^{-1}}$:
  \[ Ad_g Ad_{g^{-1}} = 
     \begin{bmatrix} R & \hat{p}R\\ 0 & R\end{bmatrix}
     \begin{bmatrix} R^T & -R^T\hat{p}\\ 0 & R^T\end{bmatrix}
   = \begin{bmatrix} I & 0\\ 0 & I\end{bmatrix} \]
Hence, $Ad_{g^{-1}}$ must equal $(Ad_g)^{-1}$ since $Ad_g Ad_{g^{-1}} = I$.

{\bf Part (b):} If 
  \[   g_1=\begin{bmatrix} R_1 & \vec{p}_1\\ \vec{0}^T & 1\end{bmatrix} \tab
       g_2=\begin{bmatrix} R_2 & \vec{p}_2\\ \vec{0}^T & 1\end{bmatrix} \]
Then
  \[ g_1 g_2=\begin{bmatrix} R_1 R_2 & \vec{p}_1 + R_1 \vec{p}_2\\
			\vec{0}^T & 1\end{bmatrix} \]
Hence:
  \[ \begin{array}{rl}
    Ad_{g_1 g_2} &= 
     \begin{bmatrix} R_1 R_2 & (\vec{p}_1 + R_1 \vec{p}_2)^{\hat{}} R_1 R_2\\ 
	  0 & R_1 R_2 \end{bmatrix} \\
    &= \begin{bmatrix} R_1 R_2 & \hat{p}_1 R_1 R_2 +R_1\hat{p}_2 R_1^T R_1 R_2\\ 
		0 & R_1 R_2  \end{bmatrix} \\ 
    &= \begin{bmatrix} R_1 R_2 & \hat{p}_1 R_1 R_2 +R_1\hat{p}_2 R_2\\ 
		0 & R_1 R_2  \end{bmatrix} \\ 
    &= \begin{bmatrix} R_1 & \hat{p}_1 R_1\\  0 & R_1 \end{bmatrix}
       \begin{bmatrix} R_2 & \hat{p}_2 R_2\\  0 & R_2 \end{bmatrix} = Ad_{g_1}
	Ad_{g_2} \end{array}\]


%%%----------------------------------------------------------------------%%%
{\bf Problem 4:} (Problem 17(a,b) in Chapter 2 of MLS).

{\bf Part(a):} Let $\xi_1$ and $\xi_2$ denote the coordinates of two
screws, as described in Frame A.  Let frame B be displaced relative to
frame A by $g$.  Let $\eta_1$ and $\eta_2$ be the representation of these
screws in Frame B.  Hence:
   \[ \xi_1 = Ad_g \eta_1 \tab \xi_2 = Ad_g \eta_2 \]
Letting $\circ$ denote the reciprocal product:
   \[ \begin{array}{rl}
    \eta_1 \circ \eta_2 &= \eta_1^T \begin{bmatrix}0 & I\\ I & 0\end{bmatrix}
	\eta_2 \\
     &= (Ad_{g^{-1}}\xi_1)^T \begin{bmatrix}0 & I\\ I & 0\end{bmatrix}
        (Ad_{g^{-1}}\xi_2) \\ 
     &= \xi_1^T\left(Ad_{g^{-1}}^T \begin{bmatrix}0 & I\\ I & 0\end{bmatrix}
        Ad_{g^{-1}}\right)\xi_2 \end{array}\]
A direct calculation shows that
  \[ Ad_{g^{-1}}^T\begin{bmatrix} 0 & I\\ I & 0\end{bmatrix} Ad_{g^{-1}}
      = \begin{bmatrix} 0 & I\\ I & 0\end{bmatrix} \]
Hence, $\eta_1 \circ\eta_2 = \xi_1 \circ \xi_2$.

{\bf Part(b):} Using the same notation as in part (a):
  \[\begin{array}{rl}
    \eta_1 \cdot \eta_2 &= \eta_1^T \eta_2\\
   &= (Ad_{g^{-1}}\xi_1)^T (Ad_{g^{-1}}\xi_2)\\
   &= \xi_1^T Ad_{g^{-1}}^T Ad_{g^{-1}} \xi_2\\
   &= \xi_1^T \begin{bmatrix} I & -\hat{p}\\ \hat{p} & I-\hat{p}^2\end{bmatrix}
        \xi_2 \ne \xi_1 \cdot \xi_2 \end{array} \]
%%%----------------------------------------------------------------------%%%
\vskip 0.2 true in
{\bf Problem 5:} (Problem 18(b,c,d,e) in Chapter 2 of MLS.)

{\bf Part (b):} There are many ways to solve this problem.  For example,
you could either start with Proposition 2.14 or Proposition 2.15 on
page 59 of MLS which relate the velocities of three frames, A, B, and C.  
Let's choose Prop. 2.15:
  \begin{equation}\label{eq:3frame}
  V_{ac}^b = Ad_{g_{bc}^{-1}} V_{ab}^b + V_{bc}^b \end{equation}
Using the fact that
  \[ V_{ac}^h = \begin{bmatrix} R_{ac} & 0\\ 0 & R_{ac}\end{bmatrix} V_{ac}^b\]
Eq. (\ref{eq:3frame}) can be written as:
  \begin{equation}\label{eq:3hybrid}\begin{array}{rl}
  V_{ac}^h &= \begin{bmatrix} R_{ac} & 0\\ 0 & R_{ac}\end{bmatrix}
	(Ad_{g_{bc}^{-1}} V_{ab}^b + V_{bc}^b)\\
  &= \begin{bmatrix} R_{ac} & 0\\ 0 & R_{ac}\end{bmatrix}
     \begin{bmatrix} R_{bc}^T & -R_{bc}^T\hat{p}_{bc} \\ 0 & R_{bc}^T
      \end{bmatrix}  	V_{ab}^b 
    + \begin{bmatrix} R_{ac} & 0\\ 0 & R_{ac}\end{bmatrix} V_{bc}^b\\
  &=\begin{bmatrix} R_{ab} & -R_{ab}\hat{p}_{bc}\\ 0 & R_{ab}\end{bmatrix}
     V_{ab}^b + \begin{bmatrix} R_{ab} & 0\\ 0& R_{ab}\end{bmatrix}
      \begin{bmatrix} R_{bc} & 0\\ 0& R_{bc}\end{bmatrix} V_{bc}^b\\ 
  &= \begin{bmatrix} I & -\widehat{(R_{ab}p_{bc})}\\ 0& R_{ab}\end{bmatrix}
     \begin{bmatrix} R_{ab} & 0\\ 0& R_{ab}\end{bmatrix} V_{ab}^b + 
     Ad_{R_{ab}} V_{bc}^h\\
  & \quad \\ 
  &=Ad_{-R_{ab}p_{bc}} V_{ab}^h + Ad_{R_{ab}} V_{bc}^h   \end{array}
  \end{equation}


{\bf Part (c):} Let frames A and B be stationary ``spatial'' frames, and let
Frame C be fixed to a moving body.  Let $V_{bc}^h$ be the hybrid velocity of
the body, as seen by an observer in the B frame.  If we now want to express
this velocity as seem by an observer in the A frame (i.e., changing the
spatial frame), we need to calculate $V_{ac}^h$.  You can do
this using the results of part (b) of this problem (which was not assigned),
which derived the result:
  \begin{equation}\label{eq:3hybridb}
  V_{ac}^h =Ad_{-R_{ab}p_{bc}} V_{ab}^h + Ad_{R_{ab}} V_{bc}^h 
  \end{equation}
If you chose this approach, then since A and B are stationary, $V_{ab}^h = 0$.
Hence, Eq. (\ref{eq:3hybrid}) takes the form:
    \[ V_{ac}^h = Ad_{R_{ab}} V_{bc}^h \]
Hence, the hybrid velocity is dependent on the orientation of the
spatial frame, but not its position.

Alternatively, if you don't want to rely upon part (b), you can recall
that the expression for the hybrid velocity is:
   \[ V_{ac}^h = 
      \begin{bmatrix} \dot{\vec{p}}_{ac} \\ \vec{\omega}^s_{ac}\end{bmatrix} \]
Since $\vec{p}_{ac}=\vec{p}_{ab} + R_{ab}\vec{p}_{bc}$, and $\vec{p}_{ab}$ is
constant:
	\[ \dot{\vec{p}}_{ac} = R_{ab}\dot{\vec{p}}_{bc}. \]
Similarly, $\vec{\omega}_{ac}=R_{ab}\vec{\omega}_{bc}$.  Hence, $V_{ac}^h$
is dependent of $\vec{p}_{ab}$, but not $R_{ab}$.

{\bf Part (d):} Let A be a stationary spatial frame.  Let B and C be two
different frames attached to a moving body.  Let us assume that the velocity
of the rigid body is given by $V_{ab}^h$.  If we now switch the location of
the body fixed frame from position B to position C, the hybrid velocity of the
body is given by $V_{ac}^h$.  Since B and C are both fixed in the body, then
$V_{bc}^h=0$ in Eq. (\ref{eq:3hybrid}).  Hence Eq. (\ref{eq:3hybrid}) reduces
to:
   \[ V_{ac}^h = Ad_{-R_{ab}p_{bc}} V_{ab}^h\]
Hence, the hybrid velocity in only dependent on $p_{bc}$, the position of the
body frame, and not on $R_{bc}$, the orientation of the body fixed frame.
Alternatively, you could compute $V_{ac}^h$ in a ``brute force'' way:

  \[\begin{array}{rl}
    V_{ac}^h &= \begin{bmatrix} \dot{\vec{p}}_{ac} \\ 
                                \vec{\omega}_{ac}\end{bmatrix} \ 
     =\ \begin{bmatrix}{d\over{dt}} (\vec{p}_{ab} + R_{ab}\vec{p}_{bc}) \\
             (\dot{R}_{ac} R_{ac}^T)^{\vee}\end{bmatrix} \ 
     =\ \begin{bmatrix}  \dot{\vec{p}}_{ab} + 
		    \hat{\omega}_{ab}^s R_{ab}\vec{p}_{bc}) \\
             (\dot{R}_{ab}R_{bc} R_{bc}^T R_{ab}^T)^{\vee}\end{bmatrix} \\
     &= \begin{bmatrix} \dot{\vec{p}}_{ab} + 
		    \hat{\omega}_{ab}^s R_{ab}\vec{p}_{bc}) \\
             \vec{\omega}_{ab}^s\end{bmatrix}
      = Ad_{-R_{ab}p_{bc}} V_{ab}^h \end{array} \]

Thus, the result only depends upon $\vec{p}_{bc}$, and not $R_{bc}$.

{\bf Part (e):} Let the position and orientation of a moving rigid body be
given by $R(t)$ and $\vec{p}(t)$.  Let $V^b$ be the body velocity of the rigid
body, and let $F^b$ be a wrench applied to the body, expressed in body
coordinates.  The power applied to the body due to this wrench is given by: 
   \begin{equation}\label{eq:power}
     V^b \cdot F^b = (V^b)^T F^b \end{equation}
Let $V^h$ denote the velocity of the body in hybrid coordinates.  Similarly,
define the hybrid wrench to be $F^h$.  We will define $F^h$ to be the wrench
that preserves the amount of power in Eq. (\ref{eq:power}):
  \[ \begin{array}{rl}
    V^b \cdot F^b = (V^b)^T F^b &= V^h \cdot F^h \\ 
                                &= (V^h)^T F^h \\
     &= (\begin{bmatrix}R & 0\\ 0& R\end{bmatrix} V^b)^T F^h \\ 
     &=(V^b)^T \begin{bmatrix}R^T & 0\\ 0 & R^T\end{bmatrix} F^h\end{array} \]
Hence, it must be true that:
   \[ F^b = \begin{bmatrix}R^T & 0\\ 0 & R^T\end{bmatrix} F^h \tab {\rm or}\tab
      F^h = \begin{bmatrix}R & 0\\ 0 & R\end{bmatrix} F^b \]


\end{document}