## 2 Resolution of the Kinematic Problem by Traditional Methods
### Inverse Kinematics Using Traditional Methods
#### 2.2.1 Inverse Kinematics of the PUMA 560 by the Geometric Method
\[\vec{A}B=a_{2};\qquad\vec{BC}=a_{3};\qquad\vec{CD}=d_{4};\] \[\vec{BD}=r_{3}=\sqrt{(a_{3})^{2}+(d_{4})^{2}}\] \[\vec{AD}=r_{43}=\sqrt{(p_{x})^{2}+(p_{y})^{2}+(p_{z})^{2}-(d_{2})^ {2}}\] \[\beta=\text{atan2}\bigg{(}\frac{|d_{4}|}{r_{3}},\frac{|a_{3}|}{r_{ 3}}\bigg{)}\] \[\cos{(\varphi)}=\frac{a_{2}^{2}+r_{3}^{2}-r_{42}^{2}}{2\cdot a_{2 }\cdot r_{3}} \tag{4}\] \[\sin{\left(\varphi^{LA}\right)}=-\sqrt{1-\cos{(\varphi)}^{2}}; \qquad\sin{\left(\varphi^{RA}\right)}=+\sqrt{1-\cos{(\varphi)}^{2}};\] \[\sin{\left(\varphi^{LB}\right)}=+\sqrt{1-\cos{(\varphi)}^{2}}; \qquad\sin{\left(\varphi^{RB}\right)}=-\sqrt{1-\cos{(\varphi)}^{2}};\] \[\varphi^{k}=\text{atan2}\Big{(}\sin{\left(\varphi^{k}\right)}, \cos{(\varphi)}\Big{)}\]  
The superscript \(k\) in Equation (4) may have the values \(LA\), \(RA\), \(LB\) or \(RB\), depending on the value of the ARM and ELBOW indicators. Thus, the four possible solutions for \(q_{3}\) can be compacted in the expression presented in Equation (5):  
\[q_{3}^{k}=\varphi^{k}-\beta \tag{5}\]  
Projecting the position vector \(\vec{\mathbf{p}}\) onto the plane \(\mathbf{X_{1}}-\mathbf{Y_{1}}\), as shown in Figure 6, \(q_{2}\) is calculated solving the geometric equations presented in Equation (6). \[\vec{A}B=a_{2};\qquad\vec{BC}=a_{3};\qquad\vec{CD}=d_{4};\]0 Geometric solution for joint 3 (\(q_{3}\)), showing two of the possible four configurations: “LEFT and BELOW Arm” (**left**) and “LEFT and ABOVE Arm” (**right**) [3]. \[\vec{A}B=a_{2};\qquad\vec{BC}=a_{3};\qquad\vec{CD}=d_{4};\]1 Geometric solution for joint 2 (\(q_{2}\)) [3]. \[ \begin{split}\bar{E}F=p_{x};\quad\quad\bar{E}G=p_{y};\quad\quad\bar{D}E= p_{z};\\ \bar{A}E=r_{a2};\quad\quad\bar{A}D=r_{a3};\\ \sin(\alpha)=-\frac{p_{z}}{r_{a3}}\\ \cos\bigl{(}\alpha^{L}\bigr{)}=\frac{r_{a2}}{r_{a3}}\\ \cos\bigl{(}\alpha^{R}\bigr{)}=-\cos\bigl{(}\alpha^{L}\bigr{)}= -\frac{r_{a2}}{r_{a3}}\\ \alpha^{i}=\text{atan2}\bigl{(}\sin(\alpha),\cos(\alpha^{i}) \bigr{)}\\ \cos(\beta)=\frac{a_{2}^{2}+r_{a3}^{2}-(a_{4}^{2}+a_{3}^{2})}{2 \cdot a_{2}\cdot r_{a3}}\\ \sin(\beta)=\sqrt{1-\cos(\beta^{2})}\\ \beta=\text{atan2}\left(\sin(\beta),\cos(\beta)\right)\end{split}  \tag{6}\]  
In Equation (6), the superscript \(i\) could either be \(L\) or \(R\), depending on the value of the ARM indicator. Therefore, the four possible solutions for \(q_{2}\) are presented in Equation (7):  
\[ \begin{split} q_{2}^{LA}=\alpha^{L}-\beta;\quad\quad q_{2}^{RA}= \alpha^{R}+\beta;\\ q_{2}^{LB}=\alpha^{L}+\beta;\quad\quad q_{2}^{RB}=\alpha^{R}- \beta;\end{split}  \tag{7}\]  
Finally, Equation (8) presents the four configurations structure that conforms the whole solution of the Inverse Kinematic Problem of the PUMA 560 manipulator:  
\[ \begin{split} q^{LA}=\begin{bmatrix}q_{1}^{L}\\ q_{2}^{LA}\\ q_{3}^{LA}\end{bmatrix}\quad\quad q^{RA}=\begin{bmatrix}q_{1}^{R}\\ q_{2}^{RA}\\ q_{3}^{RA}\end{bmatrix}\\ q^{LB}=\begin{bmatrix}q_{1}^{L}\\ q_{2}^{LB}\\ q_{3}^{LB}\end{bmatrix}\quad\quad q^{RB}=\begin{bmatrix}q_{1}^{R}\\ q_{2}^{RB}\\ q_{3}^{RB}\end{bmatrix}\end{split}  \tag{8}\]