# Research on artificial potential field path planning (Matlab code implementation)

?About the author: A Matlab simulation developer who loves scientific research. He cultivates his mind and improves his technology simultaneously. For cooperation on MATLAB projects, please send a private message.

Personal homepage: Matlab Research Studio

Personal credo: Investigate things to gain knowledge.

For more complete Matlab code and simulation customization content, click

Intelligent optimization algorithm Neural network prediction Radar communication Wireless sensor Power system

Signal processing Image processing Path planning Cellular automaton Drone

### Content introduction

In modern society, path planning algorithms play an important role in many fields. Whether in applications such as autonomous vehicles, drones, robot navigation, or logistics management, efficient and accurate path planning algorithms are needed to achieve optimal path selection. The artificial potential field path planning algorithm is a commonly used path planning method. It is based on the potential field theory and determines the best path by simulating the behavior of objects moving in the potential field.

The main idea of the artificial potential field path planning algorithm is to divide the environment into obstacle areas and free areas, and assign a potential field to each area. The potential field can be viewed as an energy field, with obstacle areas having higher potential energy and free areas having lower potential energy. The goal of path planning is to find a path from the starting point to the end point that minimizes the potential energy on the path.

The basic steps of the artificial potential field path planning algorithm include the following aspects:

1. Build an environment model: Divide the environment into obstacle areas and free areas, and assign a potential field to each area. The potential energy of the obstacle area is usually set to a high value to prevent the path from crossing the obstacle.
2. Calculate potential energy field: Calculate the potential energy value of each point based on the environment model. Generally, the calculation method of potential energy can be adjusted according to the specific problem to obtain better path planning results.
3. Determine the path: Determine the path from the starting point to the end point by simulating the process of the object moving in the potential energy field. This can be achieved through optimization algorithms such as gradient descent.
4. Path optimization: The obtained initial path can be further optimized to obtain a smoother and more efficient path. Common optimization methods include local search, curve fitting, etc.

One of the advantages of artificial potential field path planning algorithms is their simplicity and efficiency. It does not require complex calculations and a large amount of storage space, and is suitable for real-time path planning. In addition, the algorithm can handle multiple targets and multiple obstacles and has good robustness.

However, there are also some problems in the artificial potential field path planning algorithm. First, since the potential field is determined by the environmental model, local optimal solutions may occur for complex environments. Secondly, when there are multiple targets, interference between targets may occur, resulting in unsatisfactory path planning results. In addition, the artificial potential field path planning algorithm has poor adaptability to dynamic environments and cannot update the path in time.

In order to overcome these problems, researchers have proposed many improved artificial potential field path planning algorithms. For example, a penalty function is introduced to solve the local optimal solution problem, and a dynamic potential field is used to adapt to the dynamic environment. These improvements make the artificial potential field path planning algorithm more reliable and effective in practical applications.

To sum up, the artificial potential field path planning algorithm is a commonly used path planning method. It is based on the potential field theory and determines the best path by simulating the behavior of objects moving in the potential field. Although there are some problems, through improvement and optimization, this algorithm still has broad application prospects. In future research, we can further explore the application of artificial potential field path planning algorithms in different fields and combine them with other algorithms and technologies to improve the accuracy and efficiency of path planning.

### Part of the code

```%% Specific Lat-Lon to visualization

clear all;
clc;
% You can use that part to visualize specific year !
% take user input for the year they want projected sea rise
yearx = input("Enter the year you would like to learn sea level rise in future: ");
%d = datetime('today');

result = 0.02354*(yearx^2) -91.4*yearx + 8.866e + 04;
result = result - 88;

% 36-42 lat ---- 26-45 lon is Turkey's parameters

lat_start = 36;
lat_end = 42;

lon_start = 26;
lon_end = 45;

% create the map
geolimits([lat_start lat_end],[lon_start lon_end])
geobasemap streets

gtextm("The average sea level rise is " + string(result) + " mm")```

### References

[1] Yang Yibo, Wang Chaoli. Robot obstacle avoidance control based on improved artificial potential field method and its MATLAB implementation [J]. Journal of University of Shanghai for Science and Technology, 2013, 35(5):5.DOI:10.3969/j.issn. 1007-6735.2013.05.018.

[2] Lin Tengfei. Research on collaborative formation of multiple quad-rotor UAVs based on consistency theory[J].[2023-09-20].

[3] Lin Jie, Zhang Zhian. Research on path planning by improving artificial potential field method [J]. Mechanical and Electronics, 2022(003):040.

[4] Zhang Huanghui. Research and application of path planning based on dynamic artificial potential field [D]. Changsha University of Science and Technology, 2010. DOI: 10.7666/d.y1699355.