# Solution to the Inverse Problem of the Angular Manipulator Kinematics with Six Degrees of Freedom
## 2 Methods and Algorithms
### Determination of Initial Values of Angles Corresponding to Coordinates of Point \(K\)
The angles \(\theta\) and \(\beta\) are found from the triangle \(A_{1}BK\), see Figure 5a,c, as follows:  
\[\theta =\arccos\left(\frac{AK^{2}+BK^{2}-AB^{2}}{2 BK\cdot AK}\right), \tag{6}\] \[\beta =\arccos\left(\frac{AB^{2}+AK^{2}-BK^{2}}{2 AB\cdot AK}\right)\]  
After that, the value of angle \(\gamma\) is computed by  
\[\gamma=\beta+\theta \tag{7}\]  
By use of Equations (5)-(7), the angles of rotation of the first three links of the manipulator can be found  
\[\varphi_{1}=\alpha,\quad\varphi_{2}=\frac{\pi}{2}\mp(\beta\pm\delta),\quad \varphi_{3}=\pm\gamma-\frac{\pi}{2}\]  
Here, the upper signs correspond to the upper configuration, as well as the lower ones to the lower one. Figure 5: Diagrams for deriving the values of the angles at the hinges. Further, let us use the second assumption about the position of point K. We take into account that when the entire manipulator is rotated around the \(OZ\) axis by an angle \(\alpha\), due to the difference in sizes \(d_{1}\) and \(d_{2}\), point \(K\) of the mechanism will not fall into the given position but will turn out (looking from above) to the right if \(d>0\) and to the left if \(d<0\) (\(d=d_{1}-d_{2}\)). Therefore, the mechanism must be turned around the vertical axis by an angle \(\Delta\alpha\), which we find from the isosceles triangle \(A_{1}K_{1}K\)  
\[\Delta\alpha=2\arcsin\frac{0.5 KK_{1}}{A_{1}K\cos\delta}, \tag{8}\]  
where an algebraic value of the misfire \(KK_{1}\) is determined only by the distance \(d\) (together with the sign) since the straight line \(B_{1}K\) in this position is parallel to its ideal position when \(d=0\), see Figure 4b. Then, in the above obtained equations for the angles of rotation of the first three manipulator's links, only the first angle expression will change, and will take the form  
\[\Delta z=Z_{K}-h_{0}-h_{1},\quad AK=\sqrt{X_{K}^{2}+Y_{K}^{2}+\Delta z^{2}}\]0  
where the upper signs correspond to the upper configuration, and the lower ones to the lower one. Let us use the third assumption about the position of point K. As in the second assumption, the angle \(\alpha\) determined by Equation (5) is not enough for point \(K\) to take the required position. However, unlike the case of the second assumption, an error appears in the position of point \(K\) not only in the direction perpendicular to the vertical plane in which the axis of the column and in which the points \(A\) and \(B\) are located, but also in two other directions perpendicular to this one. The plane in which the first of these directions is deposited is shown in Figure 5c with a green dotted line. In this plane, the distance \(d\) is plotted in the plane perpendicular to the \(B_{1}B_{3}\) axis. Figure 6 shows the trajectory of point \(K\) (circle) with a full rotation of the wrist around the \(B_{1}B_{3}\) axis (a) and the position of this point when the wrist is rotated through an angle \(\varphi_{4}\) for the upper (b) and lower (c) configuration of the manipulator. Thus, if, under the second assumption about the position of point \(K\), in order to combine it with the required position it was necessary to tighten the manipulator mechanism around the vertical axis by an angle \(\Delta\alpha\), determined by Equation (8), then it is necessary to eliminate the mismatch by the value \(z_{K_{1}}\), and then to \(y_{K_{1}}\) (see Figure 6a). As a result we obtain  
\[\Delta z=Z_{K}-h_{0}-h_{1},\quad AK=\sqrt{X_{K}^{2}+Y_{K}^{2}+\Delta z^{2}}\]1  
Figure 7 shows the configuration of the shoulder, elbow and forearm in projection onto a plane perpendicular to the rotation axes of shoulder \(A\) and elbow \(B\). Here, the triangle \(ABK\) corresponds to the configuration of the mechanism for the first assumption about the position of point \(K\). Thus, it is the center of the corresponding circle, which is the trajectory of the point \(K_{1}\) (see Figure 6).