1 Introduction

An intelligent mobile robot must reach the designated targets at a specified time. The robot must determine its location relative to its objectives at each step and issue a suitable strategy to achieve its target. Information about the environment is also needed to avoid obstacles and design optimal routes. In general, the objectives of this study are (1) improving the APF algorithm in order to trace the path and avoid obstacles by a mobile robot and (2) comparing the performance and efficiency of the proposed algorithm with the previous method, APF algorithm. In the real world, it gets a lot of use. For example, we have an automatic ship that we want to avoid collision with obstacles and to take the best possible route for a low cost. It is possible to detect the distance between the robot with the target and obstacles with the help of the sensor. However, the sensor discussion is separate from this article.

Mobile intelligent robot is a useful tool which can lead to the target and at the same time avoid obstacles facing it [1]. There are conventional methods of obstacle avoidance such as the path planning method [2], the navigation function method [3], and the optimal regulator [4]. The first algorithm that was proposed for the discussion of obstacle avoidance is the Bug1 algorithm. This algorithm is perhaps the simplest obstacle avoidance algorithm. In the first algorithm, Bug1, as shown in Fig. 1, the robot completely bypassed the first object, and then, it leaves the first object and performs at the shortest distance from the target. Of course, this approach is very inefficient, but it ensures that the robot is reachable for any purpose. In this algorithm, the current sensor readings play a key role. The weakness of this algorithm is the excessive presence of the robot alongside the obstacle [5].

Fig. 1
figure 1

Bug1 algorithm with two points H1 and H2 as collision points. L1 and L2 are selected as the exit point

In the second algorithm, Bug2, as shown in Fig. 2, the robot moves on the starting lineup to the target, and if it sees the obstacle, it will round the obstacle, and when it again reaches a point on the line between the start to the target, it leaves an obstacle. In this algorithm, the robot spends a lot of time moving along the obstacle, but this time is less than the previous algorithm [5].

Fig. 2
figure 2

Bug2 algorithm with two points H1 and H2 as collision points. L1 and L2 are selected as the exit point

In the following, Mr. Khatib introduced an algorithm called APF in 1985 [6]. This algorithm considers the robot as a point in potential fields and then combines stretching toward the target and repulsion of obstacles. The final path of the output is the intended path. This algorithm is useful given that the trajectory is obtained by quantitative calculations. The problem is that in this algorithm, the robot can be trapped in the local minimum of potential fields and cannot find the path; hence, in this paper, some amendments have been made to resolve this issue, which is discussed in Section 3. Subsequently, in March 1991, Borenstein and Koren presented vector histogram field algorithm (VHF) [7]. In this algorithm, with the help of one of the distance sensors, a planar map of the robot environment is prepared; in the next step, this planar map is translated into a polar histogram. This histogram is shown in Fig. 3, where the x-axis represents the angles around the obstacle and the y-axis represents the probability of an obstacle at the desired viewing angles. In this polar map, the peaks represent bulky objects and valleys represent low-volume objects; valleys below the threshold are suitable valleys for moving the robot; finally, the suitable valley which has a smaller distance to the target is selected from the valleys, and the position of this valley determines the angles of motion and speed of the robot [7].

Fig. 3
figure 3

Polar histogram [7]

Improvements on VFH led to the introduction of VFH and VFH+ [8]. The next algorithm is the sensor fusion in certainty grids for mobile robots which is one of the well-known, powerful, and efficient algorithms for using a multi-sensor combination to identify the environment and determine the direction of movement. In this algorithm, the robot’s motion space is decomposed into non-overlapping cells and is provided with a graphical motion environment, and then based on the algorithms for searching the graph, the path of the movement is determined [9]. In the following, the Follow the Gap method (2012) was proposed [10]; in this algorithm, the robot calculates its distance with each obstacle. The robot can know the distance between obstacles by knowing its distance with each obstacle. The robot then detects the greatest distance between obstacles and calculates the center angles of the empty space. After the central angular momentum, the robot calculates the empty space, combines it with the target angle, and shows the ending angle. Obviously, in this combination, it is done on a weight basis, so that the obstacles that are closer to the robot are weighing more because their avoidance is a priority for the robot. Figure 4 shows how this method works.

Fig. 4
figure 4

Central angle display of free space [10]

Fuzzy logic and neuro-fuzzy networks can also be used to avoid obstacles. In this regard, fuzzy logic can be helpful in solving the problems caused by the ocean flow in the underlying surfaces [11]. It should be noted that the algorithms discussed in the research background for avoiding an obstacle are different from each other, and each algorithm has proposed a separate and new method for avoiding obstacles. So far, novel methods to avoid obstacles in addition to the mentioned methods are also presented [12,13,14,15,16]. In the following section, we first investigate the artificial potential field algorithm and then modify this algorithm in Section 3. In [17], the state-dependent Riccati equation (SDRE) algorithm is studied on the motion design of cable-suspended robots with uncertainties and moving obstacles. A method for controlling the tracing of a robot has been developed by the SDRE. In [18], the fuzzy logic method is used to predict the movement of obstacles and accelerate the linear velocity of the robot. In this paper, the movement trend of the obstacle in approaching the robot is divided away from the robot and translated by the robot. With respect to the three trends, the robot can increase the velocity, decrease the velocity to pass by the obstacle, or stop to wait for the obstacle to pass. Some simulation results show that the proposed method can help the robot avoid an obstacle without changing the initial path. In [19], we have a four-dimensional unmanned aerial vehicle’s platform equipped with a miniature computer equipped with a set of small sensors for this work. The platform is capable of accurately estimating the precision mode, tracking the speed of the user, and providing uninterrupted navigation. The robot estimates its linear velocity by filtering a Kalman filter from the indirect and optical flow with the corresponding distance measurements. In [20], a new method for defining the path in the presence of obstacles is proposed, which describes the curve as a two-level intersection. The planner, based on the definition of the path along with the cascaded control architecture, uses a non-linear control technique for both control loops (position and attitude) to create a framework for manipulating multivariate behavior. The method has been shown to be able to create a safe path based on perceived obstacles in real time and avoiding collisions. Li et al.[21] refer to the tracking control of Euler-Lagrange system problems with external impediments in an environment containing obstacles. According to a new sliding discovery, a new tracking controller is proposed to determine the tracing, convergent errors reach zero as infinite time. In addition, based on the non-destructive sliding terminal, a simultaneous control algorithm with time constraints has also been developed to ensure that tracking errors are approaching a restricted area close to the source at a given time. By introducing multi-purpose collision avoidance functions, both controllers can ensure that the obstacle is avoided. In [22], the mobile sensor deployment (MSD) problem had been studied in mobile sensor networks (MSNs), aiming at deploying mobile sensors to provide target coverage and network connectivity with requirements of moving sensors. This problem is divided into two sub-problems, the Target COVerage (TCOV) problem and Network CONnectivity (NCON) problem. For the TCOV problem, it is proved that it is NP-hard. For a special case of TCOV, an extended Hungarian method is provided to achieve an optimal solution; for general cases, two heuristic algorithms are proposed based on the clique partition and Voronoi diagram, respectively. For the NCON problem, at first, an edge constrained Steiner tree algorithm is proposed to find the destinations of mobile sensors, and then, we used extended Hungarian to dispatch rest sensors to connect the network. Theoretical analysis and simulation results have shown that compared to extended Hungarian algorithm and basic algorithm, the solutions based on TV-Greedy have low complexity and are very close to the optimum. In [23], a novel approach is presented to obtain the optimal performance bounds for a multi-hop multi-rate wireless data network. First, the optimal relay placements are determined for a target terminal located at a distance D away from the access point. Second, for a general analytical PHY layer throughput model, the maximum achievable MAC throughput is determined as a function of the number of relays for a target located at distance D.

In all the research mentioned above, the local minimum problem has not been solved, and we designed the modified APF method to solve this problem. In this paper, in the second part, firstly, the previous method of APF algorithm is presented. Then, in Section 3, the APF method is modified to remedy the defects of this method.

2 Problem statement and formulation

2.1 Methods

The artificial potential field model suggested by Khatib [6] is a typical field model (Fig. 5). In the artificial potential field model, T represents the target for the robot to generate attraction and O represents the obstacles that produce repulsion for the robot.

Fig. 5
figure 5

Artificial potential field model [38]

In a planar space, the problem of avoiding the collision of a robot with an obstacle O is shown in Fig. 5. If XD indicates the target position, the control of the robot with respect to the obstacle O can be done in the artificial potential as follows:

$$ {U}_{\mathrm{A}\mathrm{LL}}(X)={U}_{\mathrm{A}}(X)+{U}_{\mathrm{R}}(X) $$
(1)

where UA, UR, and UALL respectively represent attraction potential energy, repulsive potential energy, and artificial potential field. Then its gradient function can be written as follows:

$$ {F}_{\mathrm{A}\mathrm{LL}}={F}_{\mathrm{A}}+{F}_{\mathrm{R}} $$
(2)
$$ {F}_{\mathrm{A}}=-\operatorname{grad}\left[{U}_{\mathrm{A}}(X)\right] $$
(3)
$$ {F}_{\mathrm{R}}=-\operatorname{grad}\left[{U}_{\mathrm{R}}(X)\right] $$
(4)

where FA is the attraction generated by the robot to reach the target position of XD and FR represents the force created by UR(X), which is caused by the repulsion of the obstacle. FA is proportional to the distance between the robot and the target. Then, the attraction kS factor is also considered, and the attraction potential UA(x) field is simply obtained as follows:

$$ {U}_{\mathrm{A}}=\frac{1}{2}{k}_{\mathrm{S}}{R_{\mathrm{A}}}^2 $$
(5)

Additionally, UR(X) is a non-negative, non-linear function that is continuous and differentiable, and its potential penetration must be limited to a particular region around the obstacle without undesired turbulence forces. Therefore, the equation Urep(X) is as follows:

$$ {U}_{\mathrm{R}}(X)=\left\{\begin{array}{cc}0.5Z{\left(\frac{1}{R_{\mathrm{R}}}-\frac{1}{G_0}\right)}^2& {R}_{\mathrm{R}}\le {G}_0\\ {}0& {R}_{\mathrm{R}}>{G}_0\end{array}\right. $$
(6)

where X = (x, y) is the position of the robot, XOB = (xOB, yOB) is the position of the obstacles, and XD = (xD, yD) is the target position. \( {R}_{\mathrm{A}}=\sqrt{{\left(X-{X}_{\mathrm{D}}\right)}^2+{\left(Y-{Y}_{\mathrm{D}}\right)}^2} \) is the shortest distance between a robot and a target in a planar space, Z is the repulsive increase factor, \( {R}_{\mathrm{R}}=\sqrt{{\left(X-{X}_{\mathrm{OB}}\right)}^2+{\left(Y-{Y}_{\mathrm{OB}}\right)}^2} \) is the shortest distance between the robot and obstacles in the planar space, and G0 represents a safe distance from the obstacles [24]. According to the kinetic theory, the relation G0 ≥ VMAX/2AMAX is used, where VMAX denotes the maximum speed of the robot and AMAX represents the maximum speed of the acceleration (negative acceleration). So attraction and repulsion functions are written as follows:

$$ {F}_{\mathrm{A}}=-\nabla \left[\frac{1}{2}{k}_{\mathrm{S}}{R_{\mathrm{A}}}^2\right]={k}_{\mathrm{S}}{R}_{\mathrm{A}} $$
(7)
$$ {F}_{\mathrm{R}}(X)=\left\{\begin{array}{cc}Z\left(\frac{1}{R_{\mathrm{R}}}-\frac{1}{{R_{\mathrm{R}}}^3}\right)\frac{1}{{R_{\mathrm{R}}}^3}& {R}_{\mathrm{R}}\le {G}_0\\ {}0& {R}_{\mathrm{R}}>{G}_0\end{array}\right. $$
(8)

It is assumed that φ is the angle between the X ‐ axis and the line from the point of the robot to the obstacle. Then, both the repulsion components in the direction of the X ‐ axis and the Y ‐ axis can be obtained. Given θ is the angle between the X ‐ axis and the line from the point of the robot to the target, the attraction components in the X ‐ axis and the Y ‐ axis are considered as the following equations [24]:

$$ {F}_{\mathrm{R}\mathrm{x}}\left(X,{X}_{\mathrm{OB}}\right)={F}_{\mathrm{R}}\left(X,{X}_{\mathrm{OB}}\right)\cos \varphi $$
(9)
$$ {F}_{\mathrm{R}\mathrm{y}}\left(X,{X}_{\mathrm{OB}}\right)={F}_{\mathrm{R}}\left(X,{X}_{\mathrm{OB}}\right)\sin \varphi $$
(10)
$$ {F}_{\mathrm{A}\mathrm{x}}\left(X,{X}_{\mathrm{D}}\right)={F}_{\mathrm{A}}\left(X,{X}_{\mathrm{D}}\right)\cos \theta $$
(11)
$$ {F}_{\mathrm{A}\mathrm{y}}\left(X,{X}_{\mathrm{D}}\right)={F}_{\mathrm{A}}\left(X,{X}_{\mathrm{D}}\right)\sin \theta $$
(12)

First, the force of the repulsion and attraction in the g-axis and the v-axis are calculated, and then, f is the angle between the resulting force and the d-axis. Finally, the angle of the steering command is calculated as follows:

$$ {F}_{\mathrm{x}}={F}_{\mathrm{Ax}}\left(X,{X}_{\mathrm{D}}\right)+{F}_{\mathrm{Rx}}\left(X,{X}_{\mathrm{OB}}\right) $$
(13)
$$ {F}_{\mathrm{y}}={F}_{\mathrm{Ay}}\left(X,{X}_{\mathrm{D}}\right)+{F}_{\mathrm{Ry}}\left(X,{X}_{\mathrm{OB}}\right) $$
(14)
$$ \left\{\begin{array}{c}\delta =\arctan \frac{F_{\mathrm{y}}}{F_{\mathrm{x}}},{F}_{\mathrm{x}}>0\\ {}\delta =\pi +\arctan \frac{F_{\mathrm{y}}}{F_{\mathrm{x}}},{F}_{\mathrm{x}}\le 0\end{array}\right. $$
(15)

The next position of the robot can be continuously calculated according to the following function until it reaches the convergence condition:

$$ \left\{\begin{array}{c}{X}_{\mathrm{f}}=X+L\times \cos \delta \\ {}{Y}_{\mathrm{f}}=Y+L\times \sin \delta \end{array}\right. $$
(16)

where L denotes the step size and Xf and Yf represented the next position of the robot. Then, if the obstacles are simple particles, the artificial potential field model is used to secure the robot to the point of the target. However, there are several problems. First, the result from the sum of the two forces of attraction and repulsion in some places is zero, which results in stopping the robot moving or wandering around those points that are called local minimum. Second, when the target is surrounded by obstacles, the path cannot converge, and the robot cannot reach the target. In order to overcome these shortcomings, Section 3 addresses the modification of the artificial potential field algorithm.

3 Algorithm design

Researchers around the world have been researching about artificial potential field defects and have presented suggestions for improving this method [25,26,27,28,29,30,31,32,33,34,35,36,37]. Here, a regulative agent has been added to improve the artificial potential field algorithm with the target of overcoming the minimum local and inaccessible target. When the robot is close to the target, this regulative agent reduces the attraction control as a linear function, and the repulsion decreases as a higher-order function (M ≥ 3). A flowchart illustrating the steps of the modified APF algorithm is given in Fig. 6.

Fig. 6
figure 6

The framework of the modified APF algorithm

3.1 Modified artificial potential field model

In the planar space, the modified function of the attraction field function is defined as follows:

$$ {U}_{\mathrm{A}}=\frac{1}{2}{k}_{\mathrm{S}}{R_{\mathrm{A}}}^2 $$
(17)

The modified attraction field function is written as follows:

$$ {U}_{\mathrm{R}}(X)=\left\{\begin{array}{cc}0.5Z{\left(\frac{1}{R_{\mathrm{rep}}}-\frac{1}{G_0}\right)}^2{R_{\mathrm{A}}}^N& {R}_{\mathrm{rep}}\le {G}_0\\ {}0& {R}_{\mathrm{rep}}>{G}_0\end{array}\right. $$
(18)

where X = (x, y) is the position of the robot, Xob = (xob, yob) is the position of the obstacles, and Xd = (xd, yd) is the target position. RA is the shortest distance between the robot and the target in the planar space, and RAN is the regulative factor. The attraction function is the gradient across the attraction field, which is obtained as follows:

$$ {F}_{\mathrm{A}}=-\nabla \left[\frac{1}{2}{k}_{\mathrm{S}}{R_{\mathrm{A}}}^2\right]={k}_{\mathrm{S}}{R}_{\mathrm{A}} $$
(19)

In the same way, the repulsive function is a negative gradient from the field of repulsion, which is obtained as follows:

$$ {F}_{\mathrm{R}}=\left\{\begin{array}{cc}Z\times {F}_{\mathrm{R}1}(X)+M\times Z\times {F}_{\mathrm{R}2}(X)& {R}_{\mathrm{R}}\le {G}_0\\ {}0& {R}_{\mathrm{R}}>{G}_0\end{array}\right. $$
(20)

As shown in Fig. 7, in the modified model, FR is decomposed into FR1 and FR2, where FR1 is the component’s force in the direction of the line between the robot and the obstacle and FR2 is the component’s force in the direction of the line between the robot and the target.

$$ \left\{\begin{array}{c}{F}_{\mathrm{R}1}=\left(\frac{1}{R_{\mathrm{R}}}-{\frac{1}{G}}_0\right)\frac{{R_{\mathrm{A}}}^M}{{R_{\mathrm{A}}}^3}\\ {}{F}_{R2}={\left(\frac{1}{R_{\mathrm{R}}}-{\frac{1}{G}}_0\right)}^2{R_{\mathrm{A}}}^M\end{array}\right. $$
(21)
Fig. 7
figure 7

Analysis of forces on a robot

The two components of repulsion and attraction in the direction of the x-axis and the y-axis can be obtained as follows [24]:

$$ {F}_{\mathrm{R}\mathrm{x}}\left(X,{X}_{\mathrm{OB}}\right)={F}_{\mathrm{R}}\left(X,{X}_{\mathrm{OB}}\right)\cos \varphi $$
(22)
$$ {F}_{\mathrm{R}\mathrm{y}}\left(X,{X}_{\mathrm{OB}}\right)={F}_{\mathrm{R}}\left(X,{X}_{\mathrm{OB}}\right)\sin \varphi $$
(23)
$$ {F}_{\mathrm{A}\mathrm{x}}\left(X,{X}_{\mathrm{D}}\right)={F}_{\mathrm{A}}\left(X,{X}_{\mathrm{D}}\right)\cos \theta $$
(24)
$$ {F}_{\mathrm{A}\mathrm{y}}\left(X,{X}_{\mathrm{D}}\right)={F}_{\mathrm{A}}\left(X,{X}_{\mathrm{D}}\right)\sin \theta $$
(25)

The force of the repulsion and attraction on X ‐ axis and Y ‐ axis are calculated, and the angle δ is calculated between the force and the X ‐ axis, where δ is the steering angle of the robot.

$$ {F}_{\mathrm{x}}={F}_{\mathrm{Ax}}\left(X,{X}_{\mathrm{D}}\right)+{F}_{\mathrm{Rx}}\left(X,{X}_{\mathrm{OB}}\right) $$
(26)
$$ {F}_{\mathrm{y}}={F}_{\mathrm{Ay}}\left(X,{X}_{\mathrm{D}}\right)+{F}_{\mathrm{Ry}}\left(X,{X}_{\mathrm{OB}}\right) $$
(27)
$$ \left\{\begin{array}{c}\delta =\arctan \frac{F_{\mathrm{y}}}{F_{\mathrm{x}}},{F}_{\mathrm{x}}>0\\ {}\delta =\pi +\arctan \frac{F_{\mathrm{y}}}{F_{\mathrm{x}}},{F}_{\mathrm{x}}\le 0\end{array}\right. $$
(28)
$$ \left\{\begin{array}{c}{X}_{\mathrm{f}}=x+L\times \cos \delta \\ {}{Y}_{\mathrm{f}}=y+L\times \sin \delta \end{array}\right. $$
(29)

where L represents the step size and Xf and Yf represent the next position of the robot. The regulative factor RAM is added to the modified model of this article. The function of this regulative factor is that if the robot cannot reach the target and M is in the interval (0, 1), FR1 when the robot is close to the target, it tends to be infinite and the path of convergence is created only with FR2 and FA. If M = 1, Frep2 tends to be constant and FR1 will be zero, and the path of convergence will be created only with FR2 and FA. If M = 0, FR1 and FR2 will all tend to be zero, and the path of convergence will be created only by attraction. In the final state, generally, if M is a real positive number, the robot does not face the local minimum cases or the inaccessibility of the target.

4 Simulation results and analysis

In this section, a comparison is firstly done between the simulation results of the artificial potential field algorithm and the modified artificial potential field, then the obstacle avoidance of the mobile robot is displayed against a variety of obstacles that are simulated using the modified artificial potential field algorithm.

In the artificial potential field algorithm in which its relation was said in Section 2, if the value to the parameter be considered as Z = 100, M = 2, kS = 1.1, G0 = 0.11, and L = 0.1 and obstacles on a circle of the radius R = 0.18, the result is as shown in Fig. 8; the robot is trapped and stands at the local minimum. Figure 9 shows that the repulsive force is more than the attraction at all stages, which means the robot is trapped at the local minimum. If these parameters are changed to any desired extent other than these values, there will be no change to the status of the robot at the local minimum. The mesh plot of this simulation as shown in Fig. 10. It describes the obstacles like summit, target act cavity and absorb the robot inside itself.

Fig. 8
figure 8

The simulation result of the artificial potential field algorithm for circular obstacles with radius R = 0.18

Fig. 9
figure 9

The energy amount of repulsion and attraction and their yields according to the number of steps in the artificial potential field algorithm for circular obstacles with radius R = 0.18

Fig. 10
figure 10

Mesh plot of the potential energy of attraction and repulsion in the artificial potential field algorithm for circular obstacles with radius R = 0.18

In the modified artificial potential field algorithm in which its relation was said in Section 3, if the value to the parameter be considered as Z = 100, M = 2, kS = 1.1, G0 = 0.11, and L = 0.1 and obstacles on a circle of the radius R = 0.18, the result is as shown in Fig. 11. By comparing Figs. 8 and 11, it can be seen that in the artificial potential field algorithm, the robot cannot reach the target and is trapped in a local minimum, but with the same conditions, in the modified artificial potential field algorithm, it achieves the target by avoiding obstacles.

Fig. 11
figure 11

The simulation result of the modified artificial potential field algorithm for circular obstacles with radius R = 0.18

Figure 12 shows that with the number of steps of nearly 200 rounds, the attraction force is zeroed; that means, with this number of steps, the robot reaches the target. The mesh plot of this simulation in Fig. 13 shows that the obstacles like the summit and the target act like the cavity and absorb the robot into itself.

Fig. 12
figure 12

The energy amount of repulsion and attraction and their yields according to the number of steps in the modified artificial potential field algorithm for circular obstacles with radius R = 0.18

Fig. 13
figure 13

Mesh plot of the potential energy of attraction and repulsion in the modified artificial potential field algorithm for circular obstacles with radius R = 0.18

In the modified artificial potential field algorithm in which its relation was said in Section 3, if the value to the parameter be considered as Z = 100, M = 2, kS = 1.1, G0 = 5, and L = 0.1 and obstacles on a circle of the radius R = 40, the result is as shown in Fig. 14. It shows that the robot achieves the target by avoiding obstacles.

Fig. 14
figure 14

The simulation result of the modified artificial potential field algorithm for circular obstacles with radius R = 40

Figure 15 shows that with the number of steps of nearly 400 rounds, the attraction force is zeroed; that means, with this number of steps, the robot reaches the target. The mesh plot of this simulation in Fig. 16 shows that the obstacles like the summit and the target act like the cavity and absorb the robot into itself.

Fig. 15
figure 15

The energy amount of repulsion and attraction and their yields according to the number of steps in the modified artificial potential field algorithm for circular obstacle with radius R = 30

Fig. 16
figure 16

Mesh plot of the potential energy of attraction and repulsion in the modified artificial potential field algorithm for circular obstacles with radius R = 30

In the modified artificial potential field algorithm in which its relation was said in Section 3, if the value to the parameter be considered as Z = 100, M = 2, kS = 1.1, G0 = 2.1, and L = 0.5 and obstacles on a circle of the radius R = 7, the result is as shown in Fig. 17. It shows that the robot achieves the target by avoiding obstacles.

Fig. 17
figure 17

The result of simulating circular obstacles with radius R = 7 in the modified artificial potential field algorithm

Figure 18 shows that with the number of steps of nearly 700 rounds, the attraction force is zeroed; that means, with this number of steps, the robot reaches the target. The mesh plot of this simulation in Fig. 19 shows that the obstacles like the summit and the target act like the cavity and absorb the robot into itself.

Fig. 18
figure 18

The energy amount of repulsion and attraction and their yields according to the number of steps in the modified artificial potential field algorithm for circular obstacles with radius R = 7

Fig. 19
figure 19

Mesh plot of the potential energy of attraction and repulsion in the modified artificial potential field algorithm for circular obstacles with radius R = 7

In the modified artificial potential field algorithm in which its relation was said in Section 3, if the value to the parameter be. considered as Z = 100, M = 2, kS = 1.1, G0 = 0.2, and L = 0.03 and the obstacle is considered as \( Y={\left(\frac{1}{X}\right)}^2+0.5;X\in \left(0.7,3.5\right) \), the result is as shown in Fig. 20. It shows that the robot achieves the target by avoiding obstacles.

Fig. 20
figure 20

The result of the curve-shaped obstacle simulation in the modified artificial potential field algorithm

Figure 21 shows that with the number of steps of nearly 1000 rounds, the attraction force is zeroed; that means, with this number of steps, the robot reaches the target. The mesh plot of this simulation in Fig. 22 shows that the obstacles like the summit and the target act like the cavity and absorb the robot into itself.

Fig. 21
figure 21

The energy amount of repulsion and attraction and their yields according to the number of steps in the modified artificial potential field algorithm for the curve-shaped obstacle

Fig. 22
figure 22

Mesh plot of the potential energy of attraction and repulsion in the modified artificial potential field algorithm for the curve-shaped obstacle

In the modified artificial potential field algorithm in which its relation was said in Section 3, if the value to the parameter be considered as Z = 100, M = 2, kS = 1.1, G0 = 0.3, and L = 0.1 and the obstacle is considered as X = 4; 4 ≤ Y ≤ 7, the result is as shown in Fig. 23. It shows that the robot achieves the target by avoiding obstacles.

Fig. 23
figure 23

The result of the straight line obstacle simulation in the modified artificial potential field algorithm

Figure 24 shows that with the number of steps of nearly 900 rounds, the attraction force is zeroed; that means, with this number of steps, the robot reaches the target. The mesh plot of this simulation in Fig. 25 shows that the obstacles like the summit and the target act like the cavity and absorb the robot into itself.

Fig. 24
figure 24

The energy amount of repulsion and attraction and their yields according to the number of steps in the modified artificial potential field algorithm for the straight line obstacle

Fig. 25
figure 25

Mesh plot of the potential energy of attraction and repulsion in the modified artificial potential field algorithm for the straight line obstacle

In the modified artificial potential field algorithm in which its relation was said in Section 3, if the value to the parameter be considered as Z = 100, M = 2, kS = 1.1, G0 = 0.2, and L = 0.03 and the obstacle is considered as Y = 4; 4 ≤ X ≤ 6 and x = 4; 3 ≤ y ≤ 4, the result is as shown in Fig. 26. It shows that the robot achieves the target by avoiding obstacles.

Fig. 26
figure 26

The result of the broken line obstacle simulation in the modified artificial potential field algorithm

Figure 27 shows that with the number of steps of nearly 700 rounds, the attraction force is zeroed; that means, with this number of steps, the robot reaches the target. The mesh plot of this simulation in Fig. 28 shows that the obstacles like the summit and the target act like the cavity and absorb the robot into itself.

Fig. 27
figure 27

The energy amount of repulsion and attraction and their yields according to the number of steps in the modified artificial potential field algorithm for the broken line obstacle

Fig. 28
figure 28

Mesh plot of the potential energy of attraction and repulsion in the modified artificial potential field algorithm for the broken line obstacle

5 Conclusion

In this paper, improvement of the artificial potential field algorithm has been evaluated. If any obstacles are around the target, it allows the robot to find a safe path, move without collision with the obstacle, and not trapped at the local minimum then reach the target point. The artificial potential field is a relatively mature algorithm that is widely used for its math calculations. However, due to the local minimum problem in this algorithm, the robot cannot achieve the target, so in order to solve this problem, a new method is proposed in this paper to remedy this algorithm. The proposed method is simulated in the MATLAB environment. The results of simulation evaluations show that in the modified artificial potential field algorithm, the robot can pass obstacles around the target without collision and reach the target.