# A Novel Approach for a Inverse Kinematics Solution of a Redundant Manipulator
## 2 Path Planning Task for End-Effector
### Potential Field Method
By summing the attractive field \(\mathrm{U}_{\mathrm{att}}(\mathrm{s})\) and repulsive field \(\mathrm{U}_{\mathrm{rep}}(\mathrm{s})\) we obtain the matrix \(\mathrm{F}(\mathrm{q})\), which includes obstacles of the manipulator environment as well as course of the attractive function with goal point (local extreme). Based on this matrix the shortest way from the start point to the goal point can be obtained. The principle is as follows. Each point of the workspace is represented by a numerical value. The goal point has the lowest numerical value from each point of the workspace. Starting at the start point, the next step is to move to the adjoining point, which has a lower numerical value than the start point. After this step, an adjoining point has to be found with a lower numerical value than the previous point. Thus, the path from the start point to the goal point can be generated (see Figure 3). The repulsive field, which is included in the aforementioned final matrix, ensures that the obstacles have high numerical values and, therefore, the path never goes through these obstacles. In Figure 3, the square outlined in green represents the start point of the manipulator end-effector and the square outlined in blue represents the goal point of the end-effector. The squares outlined in red show the planned path according to the algorithm introduced above. As can be seen in Figure 3, the minimum value of all values in the matrix is 350. This represents the goal point of the manipulator end-effector. Next, the algorithm for the path planning is introduced. In the first step of the algorithm, the obstacles are determined. In this research it is irrelevant whether the obstacles are scanned by camera, sensor, or whether they are defined by the user. The generation of the arrays \(\mathrm{U}_{\mathrm{att}}\) and \(\mathrm{U}_{\mathrm{rep}}\) are performed in Steps 2-3. In the FOR cycles (Steps 4-5), the relation between each point of the manipulator workspace in regard to the particular obstacles is investigated. The output of Algorithm 1 (Generation of Attractive and Repulsive Fields) is an  
Figure 3: Final potential field matrix, which is used to find the shortest path from the start point to the goal point. Figure 2: Example of the repulsive field. attractive field and a repulsive field in the form of matrices. The constants \(x_{\text{max}}\) and \(y_{\text{max}}\) characterize the workspace in which the manipulator works. Following the generation of the final function, it is then necessary to find the shortest path from the start point of the manipulator end-effector to its goal point in the workspace, according to Figure 3. This can be achieved by the following algorithm. ```
1:Determination (scan) of the obstacles
2:\(U_{\text{att}}\) - > zero matrix, \(U_{\text{att}}\in\mathbb{R}^{x_{\text{max}}}\times y_{\text{max}}\)
3:\(U_{\text{rep}}\) - > unit matrix, \(U_{\text{rep}}\in\mathbb{R}^{x_{\text{max}}}\times y_{\text{max}}\)
4:FOR x = x_min: x_max
5:FOR y = y_min: y_max
6:Computation of \(-\
abla U_{\text{att}}(x,y)\)
7:FOR obstacle = 1: number_of_obstacles
8:IF \(\parallel s_{\text{obstacle}}-s_{\text{robot}}\parallel\leq d_{0}\)
9:\(\
abla U_{\text{rep}}(x,y)=\
abla U_{\text{rep}}+n\Big{(}\frac{1}{d}-\frac{1 }{d_{0}}\Big{)}^{2}\)
10:ELSE
11:\(\
abla U_{\text{rep}}(x,y)=\
abla U_{\text{rep}}(x,y)+0\)
12:END IF
13:END FOR
14:END FOR
15:END FOR
16:\(\text{F}(\text{q})=-\
abla U_{\text{att}}+\
abla U_{\text{rep}}\)
```  
**Algorithm 1** Generation of Attractive and Repulsive Fields  
Algorithm 2 (Path Planning) works with the output of Algorithm 1 (Generation of Attractive and Repulsive Fields). The aim of this algorithm is to determine the shortest path from the start point to the goal point. The output of this algorithm is the matrix \(\text{P}\in\mathbb{R}^{r\times 2}\), where r is the number of workspace positions between the start point and the goal point. The matrix P is then used as the input to the inverse kinematic model to control the manipulator links.