\documentclass[12pt]{article}
\usepackage{epsfig,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.2in}
\setlength{\topmargin}{-0.31in}
\setlength{\oddsidemargin}{0.0in}
\parskip 2ex
\parindent=0pt
\begin{document}

%-----------------------------------------------------------------------------%
\centerline{\bf ME 115(b): Solution to Problem Set $\#3$}
\vskip 0.5 true in

%%%%----------------------------------------------------------------------%%%%
\vskip 0.2 true in
{\bf Problem $\# 1$:} Problem 21(a,b,c,e) in MLS text.\\
\bigskip
{\bf Part (a.)}
The number of degrees of freedom of the mechanism, F, is given by the planar version of Gruebler's formula.  Now $g$= 9 joints, $f$ = 1 DOF/link, and N = 7 links.

Thus,
\begin{equation}
F = 3 (7 - 9) + 9 \times 1 = 3
\end{equation}

{\bf Part (b.)}
Define the zero configuration of the mechanism.  We have chosen it to be the left picture in the problem statement.
The structure equation of the mechanism has the form
\begin{equation}
g_{st} =  e^{ \hat\xi_{11}}e^{ \hat\xi_{12}}e^{ \hat\xi_{13}}g_{st}(0) 
= e^{ \hat\xi_{21}}e^{ \hat\xi_{22}}e^{ \hat\xi_{23}}g_{st}(0)
= e^{ \hat\xi_{31}}e^{ \hat\xi_{32}}e^{ \hat\xi_{33}}g_{st}(0)
\end{equation}
where

  \[ \xi_{11}=\begin{bmatrix} 
\frac{h}{2}\\
0\\
1\end{bmatrix} \]
  \[ \xi_{12}=\begin{bmatrix} 
1\\
0\\
0\end{bmatrix} \]
  \[ \xi_{13}=\begin{bmatrix} 
\frac{h}{2}\\
-\omega\\
1\end{bmatrix} \]
  \[ \xi_{21}=\begin{bmatrix} 
\-frac{h}{2}\\
0\\
1\end{bmatrix} \]
  \[ \xi_{22}=\begin{bmatrix} 
\omega \\
h\\
0\end{bmatrix} \]
  \[ \xi_{23}=\begin{bmatrix} 
\frac{h}{2}\\
-\omega \\
1\end{bmatrix} \]
  \[ \xi_{31}=\begin{bmatrix} 
-\frac{h}{2}\\
0\\
1\end{bmatrix} \]
  \[ \xi_{32}=\begin{bmatrix} 
1\\
0\\
0\end{bmatrix} \]
  \[ \xi_{33}=\begin{bmatrix} 
-\frac{h}{2}\\
-\omega\\
1\end{bmatrix} \]
Thus,
  \[ g_{st}(0)=\begin{bmatrix} 
I      & \begin{bmatrix}\omega\\ 0\end{bmatrix} \\
 0 & 1\end{bmatrix} \]

Since in general ($\omega$ h) is not a unit vector, we have to normalize
$\theta_{22}$ by the factor $\frac{1}{\sqrt{\omega^2 + h^2}}$.  Expanding the product of exponentials formula and simplifying, we yield three equations.
\begin{equation}
\Phi = (\theta_{11} + \theta{13}) = (\theta_{21} + \theta_{23}) = (\theta_{31} + \theta_{33})
\end{equation}
where $\Phi$ is the angle the tool frame makes with the horizontal and 

\begin{eqnarray}
x&=&(\omega+\theta_{12}) cos\theta_{11} + \frac{h}{2}sin(\theta_{11} + \theta_{13}) \\ 
&= &\omega(1+\theta_{22})cos\theta_{21}-h(1+\theta_{22})sin\theta_{21}+\frac{h}{2}sin(\theta_{21}+\theta_{23}) \\
 &=&(\omega +\theta_{32})cos\theta_{31}+\frac{h}{2}sin(\theta_{31}+\theta_{33}).
\end{eqnarray}

where $x$ is the $x$-coordinate of the of the origin of the tool frame.  
Finally,
\begin{eqnarray}
y &=& (\omega + \theta_{12})sin\theta_{11}+\frac{h}{2}cos(\theta_{11}+\theta_{13})+\frac{h}{2}\\
&=& \omega(1 + \theta_{22})sin\theta_{21} + h(1 + \theta_{22})cos\theta_{21} -\frac{h}{2}cos(\theta_{21}+\theta_{23})-\frac{h}{2}\\
&=&(\omega+\theta_{32})sin\theta_{31} + \frac{h}{2}cos(\theta_{31}+\theta_{33})-\frac{h}{2}
\end{eqnarray}
where $y$ is the $y$-coordinate of the origin of the tool frame. 

{\bf Part (c.):}\\
We can relate $d_1$ and $g_{st}$:\\
\begin{equation}
x = d_{1}cos\theta_{11}+\frac{h}{2}sin\phi
\end{equation}
\begin{equation}
y = \frac{h}{2}-d_1sin\theta_{11}+\frac{h}{2}cos\phi
\end{equation}
Eliminating $\theta_{11}$, we get
\begin{equation}
d_1 = sqrt{ { (x - \frac{h}{s}sin\phi)}^2 + { (\frac{h}{2}-\frac{h}{2}cos\phi-y)}^2 }
\end{equation}
Similarly,
\begin{equation}
x=d_2cos(\theta_{21} + \theta) + \frac{h}{2}sin\phi
\end{equation}
\begin{equation}
y=d_2+h^2sin(\theta_{21}+\theta) - \frac{h}{2}cos\phi -\frac{h}{2}
\end{equation}
eliminating $\theta_{21}$ and $\theta$, we get
\begin{equation}
d_2=\sqrt{ {(x - \frac{h}{2}sin\phi)}^2+{(y+\frac{h}{2}+\frac{h}{2}cos\phi)}^2}
\end{equation}
Finally,
\begin{equation}
x=d_3cos\theta_{31}-\frac{h}{2}sin\phi
\end{equation}
\begin{equation}
y=d_3sin\theta_{31}+\frac{h}{s}cos\phi-\frac{h}{2}
\end{equation}
Eliminating $\theta_{31}$, we get
\begin{equation}
d_3= \sqrt{{(x+h sin\phi)}^2 + {(y+\frac{h}{2}-\frac{h}{2}cos\phi)}^2}
\end{equation}

{\bf Part (e.):}
The mechanism is singular if any of the following matrices lose rank
  \[ J_{s1}=\begin{bmatrix} 
\xi_{11}   & \xi'_{12}  & \xi'_{13}\end{bmatrix} \]

  \[ J_{s2}=\begin{bmatrix} 
\xi_{21}   & \xi'_{22}  & \xi'_{23}\end{bmatrix} \]

  \[ J_{s3}=\begin{bmatrix} 
\xi_{31}   & \xi'_{32}  & \xi'_{33}\end{bmatrix} \]Now,
\begin{equation}
det(J_{s1}) = -(\omega + \theta_{12})
\end{equation}
\begin{equation}
det(J_{s2}) = -(\omega + \theta_{22})
\end{equation}
\begin{equation}
det(J_{s3}) = -(\omega + \theta_{32})
\end{equation}
Therefore, the mechanism is at a singular configuration if
\begin{equation}
d_i = (\omega + \theta_{i2}) =0
\end{equation}
for any i.
The mechanism is actuator singular if

  \[ \begin{bmatrix} 
\xi_{11}   & \xi'_{13}  &  \xi_{21}  & \xi'_{23} & \xi_{31} & \xi'_{33} \end{bmatrix}
\begin{bmatrix} \dot{theta}_{11}\\ 
\dot{\theta}_{13}\\
\dot{\theta}_{21}\\  
\dot{\theta}_{23}\\ 
\dot{\theta}_{31}\\
\dot{\theta}_{33}\end{bmatrix}
=
\begin{bmatrix}
\xi'_{12} & \xi'_{22} & \xi'_{32}
\end{bmatrix}
\begin{bmatrix}
\dot{\theta}_{12}\\
\dot{\theta}_{22}\\
\dot{\theta}_{32}\end{bmatrix} 
 \]
 \\
 {\bf  Problem 2:}\\
 {\bf Part (a.):}\\
 
   \[ \xi_{1}=\begin{bmatrix} 
0\\
0\\
1\end{bmatrix} \]
 
   \[ \xi_{2}=\begin{bmatrix} 
0\\
-1\\
1\end{bmatrix} \]
 
   \[ \xi_{3}=\begin{bmatrix} 
l_1\cos\theta_A\\
l_1\sin\theta_A\\
1\end{bmatrix} \]
 
   \[ \xi_{4}=\begin{bmatrix} 
\cos(\theta_A+\theta_C)\\
\sin(\theta_A+\theta_C)\\
0\end{bmatrix} \]
 
 
 {\bf Part (b.):}\\
\[Grammian=\begin{bmatrix} 
    \xi_1\cdot\xi_1 &  \xi_1\cdot\xi_2 & \xi_1\cdot\xi_3 &  \xi_1\cdot\xi_4\\
     \xi_2\cdot\xi_1   &  \xi_2\cdot\xi_2  &  \xi_2\cdot\xi_3  & \xi_2\cdot\xi_4\\
    \xi_3\cdot\xi_1   &  \xi_3\cdot\xi_2  &  \xi_3\cdot\xi_3  & \xi_3\cdot\xi_4\\
    \xi_4\cdot\xi_1   &  \xi_4\cdot\xi_2  &  \xi_4\cdot\xi_3  & \xi_4\cdot\xi_4
\end{bmatrix} \]

 
 To find the stationary configurations of joint B (labeled 2), we solve for when the determinant of the cofactor of the 2,2 element of the grammian is equal to zero.
 \begin{eqnarray}
 0 &=& \det\begin{bmatrix} 
    \xi_1\cdot\xi_1  & \xi_1\cdot\xi_3 &  \xi_1\cdot\xi_4\\
        \xi_3\cdot\xi_1    &  \xi_3\cdot\xi_3  & \xi_3\cdot\xi_4\\
    \xi_4\cdot\xi_1     &  \xi_4\cdot\xi_3  & \xi_4\cdot\xi_4
\end{bmatrix} \\
&=& {\sin}^2\theta_C + {l_1}^2
\end{eqnarray}
Thus, for nonzero $l_1$, a stationary position occurs at  $\theta_2$=n$\pi$.\\
{\bf Please note that there are other ways of describing the stationary position depending on how you define your angles.}
\bigskip


 {\bf Part (c.):}\\
 Simply repeat part (b), but for the determinant of the cofactor of the (1,1), (3,3), and (4,4) element.
 
 
    {\bf  Problem 4: MLS Chapter 5, problem (1.a)}\\
    No, this grasp is not force closure. It can not exert torques.
        
    {\bf  Problem 4: MLS Chapter 5, problem (2.a)}\\
 	Yes. This grasp is force closure.


\end{document}