# A Neural Network Based Approach to Inverse Kinematics Problem for General Six-Axis Robots
## 5 Results and Discussion
### Efficiency and Singularity  
In addition to accuracy, the efficiency of the inverse kinematics algorithm, indicated by the computation time, was also an important factor in practical applications. A comparison of the proposed algorithm with the research works in [21; 25] is performed, on position and orientation errors, as well as processing time on initial and optimized solution. Comparison results are presented in Table 10, where NR denotes the error minimization method resorted to Newton-Raphson in this paper, GA represents the genetic algorithm in [21], and EF is the optimization process based on error feedback in [25]. Compared with the five-DoF and six-DoF decoupled robots in [19; 39], respectively, the six-joint robot with offset wrist being studied in this work brings in more challenges for solving the IKP. Nevertheless, from Table 10, it can be seen that our algorithm is capable of achieving a similar or better precision with the highest efficiency. Moreover, although the computational time on the optimized process is not given for GA, considering the extremely low computational cost for NNs to give predictions, the processing time can be inferred to be more than 0.2 s. Noticing the 0.2275 s optimization time for MEF, apparently, NR is the optimal one to serve as a real-time error minimization method. It is noteworthy that though the solution of IKP can be directly found via the NR method with a random initial guess, two drawbacks arise. First, a bad random initialization may lead to a solution outside the joint limitation. Second, since the algorithm is based on the inverse of the Jacobian matrix, it might suffer from the singularity problems. In terms of utilizing Equation (12) as an error minimization approach, these defects can be, to a large extent, avoided. This is partially due to that the prediction system behaves just like an intelligent initial guess supplier and can always provide a suitable start point for the iterative process. To be more specific, for one thing, since NNs learn from practical data, the prediction of a well trained system, the initial solution, will be close to an executable solution. As a result, the optimal solution will likely to fall into the local minimum around it and the final solution is thus feasible. For another, the Jacobian matrix cannot suddenly be illness. If the initial solution is relatively accurate, only a small adjustment will be required \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Error for** & **Error for** & **Time on** & **Time on** & **Total** \\  & **Position** & **Orientation** & **Initial Solution** & **Optimization** & \\ \hline NR & 0.001 mm (max) & 0.01\({}^{\circ}\) (max) & 0.0159 s & 0.0059 s & 0.0218 s \\ GA & 0.0037 mm (max) & N/A & N/A & N/A & 0.28 s \\ EF & 0.0054 mm (mean) & \(1.1154^{\circ}\) (mean) & 0.0075 s & 0.2775 s & 0.285 s \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Comparison of three error minimization approaches. Figure 11: Joint motion results for initial and optimized solution during trajectory tracking task. (**a**) Joint motion of initial solution; (**b**) Joint motion of optimized solution. for each joint to reach its practical counterpart during optimization and the iterative process is, hence, unlikely to pass across any illness region. The only exception is the goal pose being at or infinitely close to a singular configuration, which should be avoided during practical applications. To verify the above hypothesis, the NR algorithm was tested to solve the same IKPs in Section 5.2 with random initial guesses. During the searching process, the following cases might happen:  
1. Failures due to the singularity problem. 2. Failures due to joint limitation. The solution exceeds joint limitation. 3. Success. The algorithm gives a desired answer. While in case 3, the algorithm directly stops, for case 1 and 2, the algorithm will restart at another start point until the target is completed. The test was repeated three times.