## 4 Path Generator Solving for Inverse Kinematics
### Differential Inverse Kinematics with PID Control Algorithm
#### 4.2.2 Back-Calculation Algorithm with Actuation Bounds  
A surgical robot has to follow an arbitrary path that is generated by the operator in real-time, not a predefined path, like industrial robots follow. The proposed path generator with the PID control algorithm is only based on the kinematic model, so it is vulnerable to oscillation and sudden motion. The inverse kinematic solution might sometimes suddenly diverge, as shown in Figure 17a. The anti-windup technique has been used to address similar problems. A robust PID controller with anti-windup was designed for robot manipulators with an uncertain Jacobian matrix [26], and an anti-windup method based on back-calculation was designed for a robotic manipulator with optical tweezers [27]. This study applied a back-calculation algorithm in the integration control term with a saturation function of the velocity-level actuation bound. The boundary values of the saturation function are determined while considering the mechanical limitations of the actuators. The path generator with back-calculation can maintain stable performance, as shown in Figure 17b.  
The path generator with differential kinematics and the PID control algorithm were tested using the same desired position and orientation as in the test of the optimization path generator. In this test, the path generator had four gain matrices, as shown in Table 2. \(\mathrm{K}_{p}\), \(\mathrm{K}_{I}\), and \(\mathrm{K}_{D}\) were the proportional, integral, and derivative control gains, respectively, and \(\mathrm{K}_{a}\) was the back-calculation gain. The computing loop time was fixed at 1 ms. The error is shown in Figure 18. The MSE was \(2.18\times 10^{-6}\), and the calculated value could be considered to be an exact solution. There were no errors around 120 s, in contrast to the results of the optimization path generator.  
Figure 16: Inverse kinematic solution of distal coupled joint angles with the constraint algorithm using the null space solution.  
The second path generator had no restricting constraints of the joint bending angle. The inverse kinematic solution of the proximal joint angle exceeded the joint limit according to the desired value from the master device, as shown in Figure 17b, and the driving wire length was also larger than in the case of the first path generator in that region, as shown in Figure 19. This can lead to joint dislocation or breaking of the wires. A pulling wire that exceeds the joint limit causes fatigue fracture or tension beyond the tensile strength of the wire. Excessive tension may cause damage to a small joint structure. The path generator must make a bounded path in real time, even if the operator manipulates the master device beyond the actuation limit. The weighted least-norm method [28; 29] might be one of the solutions for avoiding joint limits, but it has a dulling effect against sensitive manipulation. A path regulation algorithm within actuation bounds will be added to the inverse kinematic solver with the PID control algorithm in a future study.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Gain** & **Value** \\ \hline \(\mathbf{K_{P}}\) & \(diag\{64.3,\,82.7,\,81.0,\,65.2,\,32.2,\,33.3\}\)1  \\ \(\mathbf{K_{I}}\) & \(diag\{2.28,\,3.25,\,49.10,\,1.81,\,0.19,\,0.22\}\) \\ \(\mathbf{K_{D}}\) & \(diag\{0.55,\,0.39,\,0.43,\,0.51,\,0.11,\,0.11\}\) \\ \(\mathbf{K_{a}}\) & \(diag\{0.050,\,0.087,\,0.825,\,0.039,\,0.203,\,0.232\}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Parameters of PID control algorithm with back-calculation.  
Figure 17: Inverse kinematic solution (**a**) without back-calculation and (**b**) with back-calculation.  
Figure 19: Driving wire length from the path generator with the Jacobian matrix and PID control algorithm for (**a**) proximal joints and (**b**) distal joints.  
Figure 18: Error of the path generator with the Jacobian matrix and PID control algorithm: (**a**) position error and (**b**) orientation error.