## 4 Simple Approach for Optimizing the Offline Motion Preparation
### General Approach  
The basic idea is to convert the given accuracy on the TCP to an approximate accuracy at axis level where the splines are generated. Due to the non-linear transmission of the mechanism, this is not possible without problems. Figure 9 illustrates the non-linear effect using the example of the distortion of a circle on the TCP to an ellipse at axis level. Around the set point \(p\) on the motion specification (blue, left), the given accuracy \(\varepsilon=1\)\(\upmu\)m is shown as a black circle. All motion points that are located  
Figure 8: Percentage of computational effort for kinematic transformations in relation to the total computational effort. (**a**) Results for all algorithms. (**b**) Comparison of monomial splines (left) and B-splines (right). within the black circle are closer to \(p\) than required and, therefore, valid set points. After transformation into axis coordinates, the nominal value \(\varphi\) results from \(p\) (blue, right). The transformed but distorted circle is shown in black. Thereby, the distortion depends on the position of \(p\) and varies over the workspace. If a calculated set point is located within the black tolerance border, it is also valid. As an approach to linearization, the inscribed circle in the ellipse with the radius \(r_{\varphi}\) (Figure 9, red) is to be used instead of the whole ellipse. Points inside this circle are always completely within the required tolerance. Thus, the distance of a calculated spline point to the optimal set point \(\varphi\) can be checked easily for compliance with the requirements at TCP level without a transformation. \(r_{\varphi}\) can be estimated by using the singular value decomposition (SVD) of the Jacobian matrix \(J\) at point \(p\) known from robotics, e.g., [25]. The Jacobian consists of the partial derivatives in the two directions of motion at \(p\). In practice, it can be approximated by numerical differentiation. When using forward differences, the calculation of at least 3 transformations is necessary (\(p\), \(p_{\text{p0}}=p+[\varepsilon,0]\), \(p_{\text{0p}}=p+[0,\varepsilon]\), Figure 9, green). This one-sided difference represents a simplification and saves one kinematic transformation compared to the bilinear difference. For our example, the closed solution of the SVD from [26] is used for calculation with:  
\[a =\left(\varphi_{p0.1}-\varphi_{1}\right)/\varepsilon \tag{1}\] \[b =\left(\varphi_{0p.1}-\varphi_{1}\right)/\varepsilon\] (2) \[c =\left(\varphi_{p0.2}-\varphi_{2}\right)/\varepsilon \tag{3}\]  
and  
\[d =\left(\varphi_{0p.2}-\varphi_{2}\right)/\varepsilon \tag{4}\]  
\(\lambda_{1}\) and \(\lambda_{2}\) are calculated by [26]. \[\lambda_{1} =\ \frac{\sqrt{a^{2}+b^{2}+c^{2}+d^{2}+2\cdot(ad-bc)}+\sqrt{a^{2}+b ^{2}+c^{2}+d^{2}-2\cdot(ad-bc)}}{2} \tag{5}\] \[\lambda_{2} =\ \frac{\left|\sqrt{a^{2}+b^{2}+c^{2}+d^{2}+2\cdot(ad-bc)}-\sqrt{a ^{2}+b^{2}+c^{2}+d^{2}-2\cdot(ad-bc)}\right|}{2} \tag{6}\]  
Therein, \(\lambda_{1}\) corresponds to the major semi-axis and \(\lambda_{2}\) to the minor semi-axis of the ellipse [27]. \(\lambda_{1}\) and \(\lambda_{2}\) have the unit rad/m and represent a transmission factor. As can be seen in Figure 9, the diameter of the circle \(\varepsilon\) on the TCP is distorted to \(\lambda_{1}\) and \(\lambda_{2}\) on axis level. In the minimal case, \(\varepsilon\) is  
Figure 9: Distortion due to nonlinearity. (**a**) Tolerance circle in tool center point (TCP)-coordinate system, (**b**) distorted circle in axis coordinates. distorted to \(r_{\varphi}\) by \(\lambda_{2}\). Since for our application the radius of the inscribed circle is of interest, \(r_{\varphi}\) has to be calculated from \(\varepsilon\) and the smaller \(\lambda_{2}\) by:  
\[r_{\varphi}=\lambda_{2}\cdot\varepsilon \tag{7}\]  
This consideration requires a coupled calculation of the two axes, since both axis coordinates are included in the calculation of the distance. In the uncoupled case, \(r_{\varphi}\) should be distributed to both axes.