# Design and Implementation of Inverse Kinematics and Motion Monitoring System for 6 DoF Platform
## 2 Inverse Kinematics Design
### Proposed Inverse Kinematics  
Because traditional inverse kinematics methods fail in the position control implementation, the upper platform can only be moved approximately to adjust the length of the virtual support arm. To improve the movements of the endpoint coordinates of the motion platform crank arm, an actuating method similar to that of a linear actuator was adopted to obtain the relevant coordinates. The position of the linear actuator was set as the lower fixed point coordinate, and the upper platform coordinate could be changed by adjusting the elongation of six linear actuators. In practice, the elongation required by each electric cylinder can be calculated by subtracting the distance between the upper and lower platform coordinates with elongation from that without elongation. Therefore, this study proposes changing the motion platform of the rotary crank arm to the output end of the crank arm motor as the lower fixed point of the linear actuator, thereby determining di, which is the distance between the upper platform coordinate and the motor coordinate (xb_Mi, yb_Mi, zb_Mi). The vector of di is expressed as follows [21]:  
\[d_{i}=q_{i}-b_{i}=T+R\cdot p_{i}-b_{i} \tag{3}\]  
where \(T\) is the position vector of the upper platform coordinate relative to the lower platform, \(R\) denotes the homogeneous transformation matrix, \(p_{i}\) = [xpi ypi zpi] represents the position vector of the upper platform, \(b_{i}\) = [xb_Mi yb_Mi zb_Mi] is the position vector of the motor rotation axis, and \(d_{i}\) denotes the equivalent rod length. Thus, by taking into account the relationship between the lengths of the crank, connecting rod, and support arm, the positions of the motor end and upper platform were bi and pi, respectively, s was the sum of the connecting link length (p) and support arm length (l), and the contact coordinate (A\({}_{\text{i}}\)) between s and the crank length (a) was projected to the xy plane. In Figure 3, \(\phi_{i}\) denotes the included angle between the x direction and the crank length. The known conditions, namely, s, a, B\({}_{\text{i}}\) = [xb\({}_{\text{b}}\)_Mi yb\({}_{\text{b}}\)_Mi zb\({}_{\text{b}}\)_Mi], pi = [xpi ypi zpi], and \(\phi_{i}\), were used to calculate the angle required for each axis to rotate (\(\theta_{i}\)), thereby controlling  
Figure 2: The schematic diagram of axis1 control. the different virtual cylinder lengths (di), controlling the elongation of the virtual cylinder, and determining the platform attitude required by the 6 DoF platform. Because the six sets of crank arm mechanisms were arranged opposite to each other, they were divided into odd and even numbers. The first, third, and fifth axes were controlled at 0-180 degrees, while the second, fourth, and sixth axes were controlled at 180-360 degrees. The odd axes of Ai are expressed as  
\[x_{ai}=a\cdot\cos(\theta_{i})\cos(\phi_{i})+x_{b\_Mi} \tag{4}\]  
\[y_{ai}=a\cdot\cos(\theta_{i})\cos(\phi_{i})+y_{b\_Mi} \tag{5}\]  
\[z_{ai}=a\cdot\sin(\theta_{i})+z_{b\_Mi} \tag{6}\]  
where i = 1, 3, and 5. The even axes of Ai are expressed as  
\[x_{ai}=a\cdot\cos(180-\theta_{i})\cos(180+\phi_{i})+x_{b\_Mi} \tag{7}\]  
\[y_{ai}=a\cdot\cos(180-\theta_{i})\cos(180+\phi_{i})+y_{b\_Mi} \tag{8}\]  
\[z_{ai}=a\cdot\sin(180-\theta_{i})+z_{b\_Mi} \tag{9}\]  
where i = 2, 4, and 6. As shown in Figure 3, Pythagorean theorem is applied to find s, di, and a, which are expressed as follows:  
\[s^{2}=\left(x_{pi}-x_{ai}\right)^{2}+\left(y_{pi}-y_{ai}\right)^{2}+\left(z_{ pi}-z_{ai}\right)^{2} \tag{10}\]  
\[d_{i}^{2}=\left(x_{pi}-x_{b\_Mi}\right)^{2}+\left(y_{pi}-y_{b\_Mi}\right)^{2}+ \left(z_{pi}-z_{b\_Mi}\right)^{2} \tag{11}\]  
Figure 2:0  
Equations (11) and (12) are substituted into Equation (10) to derive  
\[ \begin{array}{l}s^{2}=d_{i}^{2}+a^{2}+2\left(x_{b\_Mi}^{2}+y_{b\_Mi}^{2}+z_ {b\_Mi}^{2}\right)-2\left(x_{pi}x_{b\_Mi}+y_{pi}y_{b\_Mi}+x_{pi}z_{b\_Mi} \right)+2x_{ai}\left(x_{pi}-x_{b\_Mi}\right)\\ +2y_{ai}\left(y_{pi}-y_{b\_Mi}\right)+2z_{ai}\left(z_{pi}-z_{b\_Mi}\right) \end{array}