# A Novel Approach for a Inverse Kinematics Solution of a Redundant Manipulator
## 3 Inverse Kinematic Model and Computing Algorithm
### Final Inverse Kinematic Model
admissible value
6:decrease priority of chosen task by chosen function
7:counter = 0
8:END IF
9:Computation of Jacobian matrix \(\mathrm{J}\) (damped least squares method)
10:Determination of actual end-effector position in the task space \(\mathrm{x}\in\mathrm{R^{m}}\) with actual generalized variables \(\mathrm{q}\in\mathrm{R^{m}}\)
11:Computation of general equation \(\mathrm{\dot{q}}=\left(\mathrm{J^{-1}WJ+J_{O}}^{-1}\mathrm{W}J_{C}+J_{1}^{-1}WJ _{1}+W_{s}\right)^{-1}\left(\mathrm{J^{T}Wx}\right)\)
12:\(\mathrm{q}=\mathrm{q_{previous}}+\mathrm{\dot{q}dt}\)
13:\(\mathrm{q_{previous}}=\mathrm{q}\)
14:IF \(\mathrm{x_{d}}=\mathrm{x}\) THEN
15:END CYCLE WHILE 2
16:ELSE
17:CYCLE WHILE 2 continues
18:END IF
19:END CYCLE WHILE 2
20:IF counter < min. admissible value
21:increase priority of chosen task by chosen function
22:counter = 0
23:END IF
24:counter = 0
25:END CYCLE WHILE 1
```

**Algorithm 5** New algorithm for inverse kinematic model

Figure 6: Dynamixel AX12 connection. Figure 7: Scheme of information flow. ## 5 Numerical Computing and Results

In this section, the testing of several case studies is presented. The first one assumed a 20-link manipulator and the second one a 5-link manipulator. These case studies used the same initial conditions as number and positions of obstacles, the same start and goal point of end-effector, and range of links motion of \(\pm 100^{\circ}\). The link length of the five-link manipulator was 67 mm and the link length of the 20-link manipulator was 16.75 mm. Both manipulators had a link length of 335 mm. The admissible tolerance of end-effector positioning was set to be 5 mm. All of the abovementioned algorithms were subsequently applied by numerical computing. All case studies used the same scenario according to Figure 4. Case studies were run using an Intel Core(tm) i7-3770 3.40 GHz CPU. The resulting computing time for particular case studies was an average value based on 10 repeated simulations. ### Case Study 1

The first case study assumes a 20-link manipulator with a link length of 16.75 mm. The values of the weight matrices are as follows



### Case Study 2

The second case study assumes a 5-link manipulator with a link length of 67 mm. The values of all weight matrices are the same as in Case Study 1. The only difference is in the dimension of weight matrices. In the case with constant weight matrices, the simulation time was 8.8106 s. Using our algorithm, the simulation time decreased to 5.6325 s. Using FPS speeds up the simulation by about 36.07%. Graphical representations of the simulation of Case Study 2 are shown in Figure 9.

Algorithm 5 (New algorithm for inverse kinematic model) appeared to be significantly accelerative. Using Algorithm 3, in some cases the computing fails, whereas using our approach the computing finished successfully. The effectiveness of the improved approach is due to the suitable choice of the parameters max. admissible value and min. admissible value from Algorithm 5. Despite the fact that our algorithm consists of more computing instructions in comparison with the original algorithm, it is significantly faster; in the case of the five-link manipulator, it is 36.07% times faster and in the case of the 20-link manipulator it is 24.65% faster. For all case studies, all weight matrices were constant besides the weight matrix of the primary task. This means that the joint limit avoidance task, kinematic singularities avoidance task, and obstacle avoidance task have more priority than the precise positioning of the end-effector through each point of the planned path. In other words, it is better to move the end-effector slightly less precisely than for the manipulator to collide with the obstacles, since this could result in destructive consequences for the manipulator or its environment in real applications. The second case study, considering the 5-link manipulator, was also tested by an experimental model composed of five Dynamixel AX12 servomechanisms.