# Solution to the Inverse Problem of the Angular Manipulator Kinematics with Six Degrees of Freedom
## 2 Methods and Algorithms
### Determination of Orientation Angles
#### 2.4.2 Orientation Angles at \(\sin\varphi_{5}\
eq 0\)  
Comparing matrices (13) and (14), we obtain that at \(\sin\varphi_{5}>0\)  
\[\begin{split}\varphi_{5}=\arccos(s_{11}),\\ \varphi_{4}=\text{atan2}(s_{21},-s_{31}),\\ \varphi_{6}=\text{atan2}(s_{12},s_{13}),\end{split} \tag{15}\]  
where \(s_{11},s_{12},s_{13},s_{21},s_{31}\) are the components of the matrix (14). They can be obtained from Expression (14) as follows  
\[\begin{split} s_{11}&=\big{[}C_{\varphi_{2}+\varphi _{3}}S_{\lambda_{E}-\varphi_{1}}S_{\varphi_{E}}-\big{(}C_{\varphi_{2}+\varphi_ {3}}C_{\lambda_{E}-\varphi_{1}}S_{\varphi_{E}}+S_{\varphi_{2}+\varphi_{3}}C_{ \varphi_{E}}\big{)}C_{\varphi_{E}}\big{]}S_{v}+\\ &\big{(}S_{\varphi_{2}+\varphi_{3}}S_{\varphi_{E}}-C_{\varphi_{2} +\varphi_{3}}C_{\lambda_{E}-\varphi_{1}}C_{\varphi_{E}}\big{)}C_{v},\\ s_{12}&=C_{\varphi_{2}+\varphi_{3}}S_{\lambda_{E}- \varphi_{1}}C_{\varphi_{E}}+\big{[}C_{\varphi_{2}+\varphi_{3}}S_{\lambda_{E}- \varphi_{1}}S_{\varphi_{E}}+S_{\varphi_{2}+\varphi_{3}}C_{\varphi_{E}}\big{]}S _{\varphi_{E}},\\ s_{13}&=\big{(}C_{\varphi_{2}+\varphi_{3}}C_{\lambda_{E}- \varphi_{1}}C_{\varphi_{E}}-S_{\varphi_{2}+\varphi_{3}}S_{\varphi_{E}}\big{)} S_{v}+\\ &\big{[}C_{\varphi_{2}+\varphi_{3}}S_{\lambda_{E}-\varphi_{1}}S_{ \varphi_{E}}-\big{(}C_{\varphi_{2}+\varphi_{3}}C_{\lambda_{E}-\varphi_{1}}S_{ \varphi_{E}}+S_{\varphi_{2}+\varphi_{3}}C_{\varphi_{E}}\big{)}C_{\varphi_{E} }\big{]}C_{v},\\ s_{21}&=-\big{(}S_{\lambda_{E}-\varphi_{1}}S_{\varphi_{E}}C_{ \varphi_{E}}+C_{\lambda_{E}-\varphi_{1}}S_{\varphi_{E}}\big{)}S_{v}-S_{\lambda_ {E}-\varphi_{1}}C_{\varphi_{E}}C_{v},\\ s_{31}&=\big{[}(C_{\varphi_{2}+\varphi_{3}}C_{\varphi_{E}}-S_{ \varphi_{2}+\varphi_{3}}C_{\lambda_{E}-\varphi_{1}}S_{\varphi_{E}})C_{\varphi_{ E}}+S_{\varphi_{2}+\varphi_{3}}S_{\lambda_{E}-\varphi_{1}}S_{\varphi_{E}}\big{]}S _{v}-\\ &\big{(}S_{\varphi_{2}+\varphi_{3}}C_{\lambda_{E}-\varphi_{1}}C_{ \varphi_{E}}+C_{\varphi_{2}+\varphi_{3}}S_{\varphi_{E}}\big{)}C_{v}\end{split}\]  
The arccos function has principal values in the range \([0,\pi]\), in which the \(sin\) function has positive values. Of the design features of this manipulator, the angle module \(\mid\varphi_{5}\mid<\pi\), therefore, in this range \([0,\pi]\) of changing the angle \(\varphi_{5}\), is possible to stop, but other possible solutions for the range of changing the angle \(\varphi_{5}\in[0,-\pi)\) have to be considered. For this range, the \(sin\) function has negative values, so Equation (15) must be rewritten in the form  
\[\begin{split}\varphi_{5}=-\arccos(s_{11}),\\ \varphi_{4}=\text{atan2}(s_{21},-s_{31}),\\ \varphi_{6}=\text{atan2}(s_{12},s_{13}).\end{split} \tag{16}\]  
For the first and second assumptions about the position of point \(K\), Equations (15) and (16) allow us to immediately find the approximate values of the angles and, thereby, complete the solution of the inverse problem of the kinematics of the manipulator. For the third assumption about the position of point \(K\), it is necessary at first to solve the second equation in Equation (15) or Equation (16) with respect to the angle \(\varphi_{4}\), and then find the angles \(\varphi_{5}\) and \(\varphi_{6}\).