## 3 Path Planning
### Potential Field Algorithm Simulation  
In order to perform autonomous driving by implementing the potential field algorithm, it is necessary to determine the importance of avoiding obstacles and maintaining the path by adjusting tunable variables. As shown in Figure 6, when the target and obstacles are positioned, the safe distance from the obstacle is determined by the variables k and C. And Table 1 shows the description of each variable. From Equations (1)-(3), the potential at each point is calculated as follows:  
\[U(q)=k\bigg{(}\frac{1}{D}-\frac{1}{Q}\bigg{)}^{2}+Cl^{2}. \tag{4}\]  
If the constant \(C\) is defined as in Equation (5), a potential at a point \(L\) meters away from the global path has the same potential as a point with an obstacle within \(D_{min}\). Therefore, the potential_dist and \(L\) must be determined in consideration of the size of the obstacles in the driving environment. If the created global path is blocked by an obstacle larger than \(L\) vertically from the global path, it is impossible to create a path that avoids the obstacle. In this study, \(L\) was set to about 5 m because there was no area blocked by a wall, and obstacles in the form of square pillars were used. The pseudo code of the Modified Potential Field algorithm is shown in Algorithm 1. \[C=k\bigg{(}\frac{1}{D_{min}}-\frac{1}{Q}\bigg{)}^{2}\frac{1}{L^{2}}. \tag{5}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Variables** & \\ \hline path\_length & Length of local path generated by potential field algorithm \\ \hline path\_interval & Interval of global path (the shortest path) \\ \hline K & Potential gain for obstacle \\ \hline C & Potential gain for perpendicular distance from the global path \\ \hline Q & Distance from obstacle to minimize potential \\ \hline D\_min & Distance from obstacle to maximize potential \\ \hline Potential\_Value\_Max & Maximum potential value \\ \hline potential\_number & Number of potential calculation points \\ \hline potential\_dist & Perpendicular distance from global path to calculation potential \\ \hline potential\_dist\_ratio & The ratio of distance in a normal direction to the driving direction to calculate potential \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation variables. Figure 6: Variables for potential field simulation. When \(L\) is 5 m, the starting point is (0, 0), the target position is (20, 0), and the obstacle position is (10, 0), the potential field and path shown in the Figure 7 are created. The vehicle changes direction about 4 m in front of the obstacle and drives 3.8 m away from the obstacle. Figure 7a is the result of calculating the potential field for all points, while the result of applying the modified method is shown in Figure 7b. In the modified method, the potential is calculated only for some regions, and the generated path is the same as for the existing method. As shown in Figure 8a, in the situation of passing between two obstacles, when the potentials are calculated for all points and the points having the minimum value are selected, the path is cut off because the point that cannot be reached has the minimum potential. On the other hand, in Figure 8b, a smooth path was created because the potential was calculated only for a certain region in the next timestep on the basis of the point with the minimum potential. In the modified potential field algorithm, the amount of computation is reduced because the potential is calculated only for some areas. Since both methods calculate the potential using the distance to the nearest obstacle among the point clouds in the region of interest, the calculation time varies according to the number of point clouds.