Enhanced Center Constraint Weighted A* Algorithm for Path Planning of Petrochemical Inspection Robot

In many practical applications of robot path planning, finding the shortest path is critical, while the response time is often overlooked but important. To address the problems of search node divergence and long calculation time in the A* routing algorithm in the large scenario, this paper presents a novel center constraint weighted A* algorithm (CCWA*). The heuristic function is modified to give different dynamic weights to nodes in different positions, and the node weights are changed in the specified direction during the expansion process, thereby reducing the number of search nodes. An adaptive threshold is further added to the heuristic function to enhance the adaptiveness of the algorithm. To verify the effectiveness of the CCWA* algorithm, simulations are performed on 2-dimensional grid maps of different sizes. The results show that the proposed algorithm speeds up the search process and reduces the planning time in the process of path planning in a multi-obstacle environment compared with the conventional A* algorithm and weighted A* algorithm.


Introduction
With the rapid development of intelligence and information technology, it is critical to improve the level of intelligence in monitoring systems in oil fields, petrochemical enterprises and other industries. A high-tech tool is required to build "smart oil fields" and realize the unattended digital management of equipment by introducing petrochemical inspection robots into oil field production inspection work. A rail navigation inspection robot adopts magnetic navigation tracking or radio frequency identification (RFID) and other auxiliary positioning devices. An autonomous naviga-Xin Lai xinlai06@163.com 1 State Key Laboratory of Oil and Gas Reservoir Geology and Exploitation, School of Mechanical and Electrical Engineering, Southwest Petroleum University, Chengdu, 610500, China tion inspection robot does not need the support of the track, and relies on the airborne equipment to independently perform the patrol operation with a wide range of activities, manoeuvrability and all-round monitoring. At present, the application of trackless navigation technology to unmanned autonomous patrol systems has become a research hotspot. The inspection robot uses SINS/GPS for autonomous navigation and positioning, in which the key technology is path planning and trajectory tracking [21,22]. Under the condition that the map of the actual site is known, an accurate and efficient path planning method is needed in the process of the robot moving from the starting point to the target point.
Path planning for a mobile robot entails finding an optimal or suboptimal safe collision-free path for the robot from the starting point to the target point in an environment with obstacles. The path planning problem is usually constrained by a large amount of environmental information including many obstacles, which has been proven to be an uncertain polynomial difficult problem [7].
The commonly used path planning algorithms are the breadth-first search algorithm [15], the depth-first search algorithm [11], the heuristic search algorithm [25], and Dijkstra's algorithm [32]. Dijkstra's algorithm is a typical breadth-first search algorithm, which has the advantage of finding the shortest path between nodes in the map, but the search efficiency is low, and it is difficult to meet the demand of fast path planning. The advantage of the depth-first algorithm is that it takes less memory to run, but the search speed is slow, and it cannot guarantee to find the optimal path. The best-first search algorithm [3] is a kind of heuristic search algorithm, and is evaluated based on the distance from the target node, and can quickly direct the search to the target node, thereby greatly improving the search efficiency of the algorithm, but it usually cannot obtain a reasonable shortest path. All of these algorithms eventually find their endpoints while having certain limitations. Therefore, a variety of improved algorithms have been proposed based on these algorithms. A flood filling algorithm proposed by Francy et al. [9] is one of the most commonly used maze solving algorithms, and it is based on an improved depth-first search algorithm. The flood filling algorithm can find the shortest path from the starting point to the target point. Duchon et al. [5] proposed a jump point search strategy to reduce the number of nodes to be visited during the traversal, and the running speed is fast. The quality of routing in the probabilistic roadmap method [8] depends to a large extent on the number of nodes, which can improve the speed of the algorithm, but when the distribution of nodes is unreasonable or the number of nodes is small, the method is not perfect, and the routing is not globally optimal in most cases. An ant colony algorithm [26,29,41] has good global optimization ability. The rapidly exploring random tree algorithm [18,28] can effectively avoid the algorithm falling into the defect of local search by introducing random sampling, and finds a feasible path quickly. The bidirectional rapidly exploring random tree algorithm [13,35,36] can effectively solve the problems of high-dimensional space and complex constraint. A particle swarm algorithm [34] has the characteristics of fast convergence speed and few setting parameters. Shyam used probabilistic movement primitives (ProMPs) to learn the trajectory distribution from which any number of trajectories could be sampled [33]. ProMP generated versatile initial solutions for the optimisation, so the chance to find poor local minima is reduced. This method optimized the local trajectory by learning from demonstration results in a much smoother or natural looking trajectory, and it is effective in several complex obstacle avoidance scenarios. Liu [23] proposed a novel geometric analysis-based trajectory planning approach. They imposed a harmonic drive and computed the dynamic projection onto a hyper-manifold to reduce complexity and to characterize coupling, the trajectory planning is converted into geometric analysis and trajectory optimization, such that the optimal locomotion can be achieved.
The A* algorithm was first proposed in 1968 by Hart et al. [14], it is a heuristic search algorithm proposed by combining the advantages of the best-first search algorithm and Dijkstra's algorithm [37,42]. The A* algorithm uses heuristic information to guide the search direction, which has been widely used to find the optimal solution in a short time, and has strong expansibility and adaptability to different scenarios. The A* algorithm usually focuses on the optimal path and ignores the response time of the system. However, the time consumption of the device is also important to evaluate the performance of the algorithm in the actual field environment of a petrochemical inspection robot system. Researchers have made different improvements for different application scenarios. In terms of mobile robot path planning, the heuristic graph search algorithm represented by the sparse A* search algorithm [19,27] is most widely used in engineering due to its high efficiency and strong robustness. Wang et al. [38] proposed an improved A* path planning algorithm, which solved the problem that the path of the traditional A* algorithm contains too many redundant points, and obtained the minimum turning angle at the inflection point to clarify the robot's turning. The infinite neighborhood A* algorithm proposed by Xin et al. [43] solves the problem where the direction of motion is limited to a multiple of π/4, but the search speed decreases. Gu [12] proposed an improved algorithm that avoids generating a path through the vertex of the obstacle grid employing the priority sub-node generation strategy. Botea et al. [2] proposed the hierarchical path-finding A* (HPA*) algorithm to reduce the complexity in path-finding on gridbased maps. The HPA* algorithm adapts to dynamically changing environments, and the hierarchy can be extended to several abstraction levels, making it scalable for large space problem. Qin et al. [31] proposed a double-layer grid map method to optimize the A* algorithm. The high-level A* algorithm determines the next large grid local map, and the low-level A* algorithm performs the path planning on the combined local map. This algorithm optimizes the quality of the route and effectively reduces the length, turning times and turning angle of the planned path of the robot. Goldberg et al. [10] developed a new bidirectional variant of A* search, and used A* search in combination with a new graph-theoretic lowerbounding technique based on landmarks and the triangle inequality. Gao [6] proposed a bidirectional time-efficient A* algorithm to find the path, and exploited a multi-nearest neighbor grid distance calculation scheme to improve efficiency and smooth the path, but it is not suitable for large-scale complex maps. Lin et al. [20] proposed an improved real-time A* algorithm based on the introduction of the parent node and the change of the heuristic cost weight to control the path planning of intelligent robots. This method can usually obtain the optimal path, and the speed is greatly improved compared with the A* algorithm.
However, while pursuing a higher speed, there is a higher space complexity, which makes the algorithm take up more storage space. Korf [17] proposed an iterative deepening A* algorithm (IDA*), which optimized the routing strategy of the A* algorithm without the need to make state judgments and evaluate rankings. Wang et al. [39] optimizes the A* algorithm by using straight lines with heuristic factors, thereby attaining high stability and the potential to obtain the shortest path. Wang et al. [40] proposed the smooth A* algorithm. When there are no obstacles on the connection between the front and back nodes of the intermediate node, the intermediate node of the extension line is deleted, and a better path can be obtained at the expense of time efficiency.
To sum up, the A* algorithm is a typical heuristic search algorithm which can significantly reduce the number of extended states while ensuring the optimization of solutions. Although there have been many studies on the improvement of the A* algorithm, which have greatly improved its application in different environments, these advantages will be weakened when the search area is too large or the robot moves faster. These methods do not yet address the inefficiency of algorithms in environments with large search regions and multiple obstacles.
It was found that A* algorithm can search for the optimal solution if the value of the heuristic function from the current state to the target state is less than the cost of the optimal path. Based on this, we can draw a conclusion: the larger value of the heuristic function, the smaller the number of expansion states, thereby improving the search efficiency. When the value of the heuristic function is greater than the cost of the optimal solution, the A* algorithm can quickly find a feasible path, although the optimality of the solution cannot be guaranteed.
Pohl proposed a weighted A* algorithm [30] (WA*) that multiplies the heuristic function h(n) of the A algorithm by an inflation factor α (α ≥ 1), which can reduce the search time and search area. Although the weighted A* algorithm sacrifices the optimal path, it can quickly determine a suboptimal path, and its cost does not exceed α times of the optimal path [4]. In this way, the WA* algorithm can solve the problem of planning failure in a limited time. With more time, the WA* algorithm will reduce α and look for a better solution again until the allocation time expires. However, this method does not reuse the previous planning work, and the efficiency is not very high. There is still room for improvement in the WA* algorithm.
A novel improved weighted A* algorithm is proposed in the paper. The new optimization method is based on a raster method graph algorithm [1,16,45], and improves the efficiency of the algorithm in a multi-obstacle environment while ensuring that near optimal paths are obtained. Our main contributions are summarized as follows: (1) To improve the efficiency of the A* algorithm, a novel center constraint weighted A* algorithm (CCWA*) is proposed. A new optimization factor for the heuristic function of the A* algorithm is designed -namely a dynamic weight. (2) The CCWA* algorithm assigns the different weights to the heuristic functions of different nodes based on the distance between the node location and the central node. In this way, it can control the nodes to explore the direction of expansion, effectively reducing the search nodes, and ensure that the search direction will not diverge excessively. (3) The expected value ε is added on the basis of giving the dynamic weights to the heuristic function. The selected expected value is the coefficient of the dynamic weight, it further reduces the node's exploration area by changing the expected value ε. An adaptive threshold method is proposed to change the weights of the heuristic function adaptively in real time according to the map size, thus making the expansion node toward the direction of the target node, and improving the search efficiency. (4) The experimental results show that, compared with the A* algorithm and the weighted A* algorithm, the CCWA* algorithm can reduce the planning time and improve the path planning efficiency for relatively large and complex environments and ensure that the path is near optimal.

Environmental Modelling
In the path planning of a petrochemical inspection robot, it is first necessary to fuse the environmental information obtained by various sensors, and establish a map model representing the surrounding environment. A grid unit has been widely used in path planning for its simple, effective and easy-to-implement way to describe environmental information. The abbreviations and symbols used in this paper are shown in Table 1.
In this paper, a map consisting of a grid with side length 1 is used to represent the environmental information around the robot, as shown in Fig. 1. The grid method expresses the working environment of the robot as a series of grids with the same size, and divides the grid into two states according to the environmental information: the occupied state and the The inflation factor of the WA* algorithm ε The expected value of the CCWA* algorithm δ The adaptive parameter of the prediction model of ε (x a , y a ) The node in search of the A* algorithm (x t , y t ) The target node of the A* algorithm n s (x s , y s ) Starting node of the CCWA* algorithm The target node of the CCWA* algorithm The center node with the starting point and the traget node as the diameter circle n c (x c , y c ) The node in search of the CCWA* algorithm n x , y The next search node of the CCWA* algorithm r 1 Half of the distance difference between the starting node n s and the target node n d r 2 The distance from the node n c to the node n o k The dynamic parameter, which is the absolute value of the difference between r 1 and r 2 K(n) Weighted factor of the CCWA* f (n) The evaluation function g(n) The actual cost h(n) The heuristic function H (n) The new heuristic function idle state. The blank grid in Fig. 1 represents the area that the inspection robot can pass through, which reflects being in the idle state; the black grid represents the obstacles in the environment, which the robot cannot pass at this time.
To facilitate the study and experiments, two assumptions are used in the paper: (1) It is assumed that both map boundaries and obstacle boundaries are established, taking into account the safe distance of the detected robot, and the robot is considered as a particle that can only move within the grid. The black areas are obstacles and the white areas are reachable roads. (2) In the absence of a boundary and obstacles, the robot can move to the grid in the four directions. Based on

Basic Principles
The basic principle of the A* algorithm is a heuristic path search method. The heuristic information contained in the evaluation function quickly lock the target direction. The general form of the evaluation function of the A* algorithm  (1): where f (n) is the evaluation function from the starting point through the node to the end point, which represents the total cost value of node n to the end point. g(n) is the actual cost from the starting point to the node n, which represents the real cost value of the path from the starting point to node n. h(n) is the heuristic function, which represents the estimated cost from node n to the end point. h(n) makes the algorithm have the potential of heuristic search, so the selection of the heuristic function h(n) is crucial to the entire algorithm. It is generally assumed that the optimal cost value from node n to the end point is h * (n), h * (n) and h(n) have the following three relationships: , each expansion point belongs to a point on the optimal path, and the expansion will definitely have an optimal solution. (2) If h * (n) > h(n), that is an optimal path can be found, but it may pass through many invalid points.
In the extreme cases, when h(n) = 0, f (n) = g(n), it becomes the breadth-first search algorithm, thus making the algorithm lose its heuristic.
, it can find a path to the destination in a relatively short time, but may not be the optimal solution.
Only when h * (n) > h(n) holds, the algorithm has the ability of completeness and optimal solution. The key of the A* algorithm to find the optimal solution (the shortest path) lies in the selection of the evaluation function f (n): the value of h(n) is less than the actual value of the distance from n to the target node. In practice, if you want to accurately obtain the optimal path, you need to construct the function closer to the actual shortest path. This needs to refer to more heuristic information, but the more constraints, the more h(n) needs to be calculated. This means that the A* algorithm can theoretically obtain the optimal solution, but its biggest disadvantage is that it requires too much space. We can use some time-for-space methods to improve performance, for example, by choosing an evaluation function to reduce the solution space.

A* Algorithm Heuristic Function
The design of the heuristic function for the A* algorithm is very important, which determines the search efficiency. The construction of the heuristic function has no rules to follow, so long as it is conducive to the solution of the problem. In practice, a real-valued function is usually used to optimize through the experimental process. We suppose that the coordinate (x a , y a ) is any node in the search, and the coordinate (x t , y t ) is the target node. The most commonly used methods for the A* algorithm are: (1) Manhattan distance [46], the sum of the projection distances of line segments on the two coordinate axes in the rectangular coordinate system of Euclidean space: (2) Euclidean distance [44] , the linear distance between two points in Euclidean space: (3) Chebyshev distance [24], the maximum value of each component difference between two vectors: The calculation of Euclidean distance is simple. It only needs to calculate the straight-line distance between two points, but the error is large when encountering a complicated map; Manhattan distance and Chebyshev distance are easy to realize, and they are widely used in search and have high efficiency.
We can observe a petrochemical site from Fig. 3. The topographic structure of petrochemical plants is more complex, the number of nodes in the network is large, and the search width is deeper. An inspection robot working in this kind of field finds a near optimal path in a limited time, and its heuristic function must be efficient and accurate. Considering the practical application scenarios, Manhattan distance is chosen as the heuristic function to be more accurate in the multi-obstacle environment. On the basis of (1), an improved heuristic function method in the WA* algorithm takes the form [30]: where α is the inflation factor of the WA* algorithm. The heuristic function is endowed with dynamic weights. In the early stages, speed is given priority to speed up the search, while in the later stages, accuracy is given priority to expand the search. The heuristic function including distance and direction can ensure that the search direction will not deviate excessively, thereby greatly increasing the amount of heuristic information, which can speed up the search process and accuracy. For the weight that changes dynamically during the search process, the value of α keeps decreasing, and repeated attempts to find a relatively better path are made until the path converges or α = 1. The disadvantage of this algorithm is that the prediction process of α is difficult to control, so the algorithm is complicated to calculate and difficult to implement.

CCWA* Algorithm Principle
The A* algorithm takes more time and sacrifices efficiency in finding the shortest paths, especially for large and complex maps. The actual working environment of petrochemical inspection robots is complex, and the requirements for optimal path during work are reduced, but the requirements for a real-time response are higher to deal with different work tasks. In general, the heuristic function h(n) is set to the Euclidean distance between two nodes, which is often smaller than the actual shortest distance. Under the premise of ensuring the acceptability of the algorithm, the proposed algorithm is shown in Fig. 4, the heuristic function h(n) in the A* algorithm is improved. The modification of h(n) is used to control the process of selecting subsequent nodes, which enhances the node expansion direction and depth of the A* algorithm, and ensures the direction of the next search node n x , y will not be excessively divergent. The amount of heuristic information is greatly increased, it can speed up the search process and improve its accuracy and efficiency. If the search node is beyond the circular region with a diameter of the distance from the starting node to the target node, the farther away the node will be from this circular region, and the greater the value of the heuristic function h(n). Lemma 1 Each step of the A* algorithm always has a node n * before termination, which has the following characteristics on the OPEN table: (1) n * is the best way to achieve the goal.
(2) A* algorithm has found the best path to n * . ( Then this algorithm is acceptable. If further extended, any function whose distance is not greater than h(n 0 ) is suitable, so these improvements are still feasible.
In this paper, the proposed algorithm is improved based on the above lemma. We set two parameters: the distance threshold r 1 is half of the distance difference between the starting node n s and the target node n d ; r 2 is the distance from the node n c to the node n o .
where (x s , y s ) denotes the X and Y coordinates of the starting node n s , (x d , y d ) denotes the X and Y coordinates of the target node n d , n c denotes the exploration node, n o denotes the center node with the starting point and the end point as the diameter circle. We compare r 1 with r 2 , and define k as the dynamic parameter The heuristic function h(n) is given a weighted factor K(n), where ε is the expected value, and the specific parameters of its range are the desired paths. We give constraints to the heuristic function, so as to add directional guidance to the selection of the exploration nodes during the operation of the OPEN table. Employing (6), (7), (8) and (9), a new heuristic function is obtained, Defining the new heuristic funciton H (n), (10) becomes the following f (n) = g(n) + H (n) (11) where H (n) = K(n) * h(n). Assuming that you do not want your path to exceed 1000 steps, we can make ε = 0.001, which can reduce the search area of the A* algorithm and limit the value of K(n). If the value of K(n) is too large, it will cause H (n) >> g(n), which will result in the g(n) function failing and the A* algorithm will become a breadth-first search algorithm reducing the optimality of the path. The threshold is set in the algorithm, when the node is in the region of a circle with the starting point and the end point as the diameter (when r 2 ≤ r 1 ), k = 0, the CCWA* algorithm performs an optimal path search in this region. When the nodes are far from the target area, the H (n) value will be larger to ensure that the search will not deviate excessively; when the search node is close to the target area, the H (n) value will be smaller, which reduces the importance of the heuristic function.

CCWA* Algorithm Implementation
The steps of the proposed algorithm are shown in Algorithm

Experiment and Simulation of the Improved A* Algorithm
The proposed algorithm and existing algorithms are coded in C++ and run on a computer with a 2.50 GHz Intel Core i7-6500U CPU. The simulation experiments are conducted in the Windows environment and Linux environment respectively, and the map in which the length of each grid is 1 and the cost of moving each grid is 1.   (7). (1):
Select the node of the smallest value in the OPEN table, and put it in the CLOSED table. 5. Check node n is target node n d . If yes, successfully search for the best optimal path and exit; if not, go to step 7. 6. Extend the child nodes m of node n, node n is the parent node at this time. (1) If m is already in the OPEN table, a comparison is made between the new f (m) just calculated and the old one in the table. If the new value of f (m) is smaller, a better path has been found, and the old value in the table is replaced by the new value. The parent pointer of this node is modified and its parent pointer points to the current exploration node n.
(2) If m is unreachable or it is in the CLOSED table, compare the new value of f (m) just calculated by node m and its child nodes with the old value of f (m) they previously calculated. If the new value is small, indicating that a better path has been found, the new value is replaced by the old one. The parent pointers of these nodes are modified to point to the nodes with the new value of f (m).
(3) If m is neither in the OPEN table nor in the CLOSED  table, add it to the OPEN table. Then add a pointer to m to its parent node n. After finally finding the target node n d , this pointer can be used to retrieve the final path step by step. 7. Skip to step 4 and continue the loop until the path is searched or exit if not found.
upper opening is the starting point and the lower opening is the end.
Comparing the red paths in Figs. 6a and b, it is intuitive to see that the path of the proposed algorithm is suboptimal. It can be seen from Table 2 that the proposed algorithm    nodes. The simulation results are shown in Fig. 6, the black areas indicate the obstacle area, the white areas indicate the barrier-free passable area, the grey shaded areas indicate the node exploration area, and the color line indicates the planned route. The blue point is the starting point and the red point is the end point. We employ the time, path length and exploration nodes as performance indexes. Table 3 is comparison of the proposed algorithms and A* algorithm in Scenario 2. Compare with the A* algorithm, 1) when ε = 0.001, the time is optimized by 0.2% , the path length is unchanged, and the exploration node is optimized by 0.7%. 2) when ε = 0.01, the time is optimized by 10.3%, the path length is increased by 1.4%, and the exploration node is optimized by 13.4%. 3) when ε = 0.1, the time is optimized by 33.2%, the path length is increased by 2.9%, and the exploration node is optimized by 34.8%.
It can be seen from Table 3 above that the expected value ε has a greater influence on the search time, path and exploration nodes. When ε = 0.1, the time and exploration nodes are greatly optimized. Although the path has a certain increase, it is still within the acceptable range. When ε = 0.001, the path is optimal, but the time and exploration nodes are optimized less than that of the other ε cases. Figure 7 demonstrates that the expected value ε has a great influence on the search path of the algorithm, and selecting the appropriate expected value will yield more desirable results. When the value ε is large, the value H (n) is obviously large, which leads to the increase of the path and the contraction of the exploration node towards the target area; when the value ε is small, the value k * ε in (9) is too small, and the value of K(n) approaches 1, and the effect of the proposed algorithm is not obvious. Because Scenario 2 is more complex than scenario 1, search nodes need to go through more and further areas. The farther the weighting factor K(n) is from the central node, the greater the effect of the value of ε. It can be seen that when ε = 0.1, a significant deviation occurs in the value of the heuristic function H (n) for nodes far from the central point, leading to the path obviously being offset from the center region. It is this deviation from the central area that causes the path to increase.   Table 4 lists the search time, path and exploration nodes under different expected value ε. As shown in Fig. 8, compared to the A* algorithm, 1) when ε = 0.001, the time is optimized by 15.3%, the path length is increased by 0.6%, and the exploration node is optimized by 11.5%. 2) when ε = 0.01, the time is optimized by 47.3%, the path increases by 2.7%, and the exploration node is optimized by 48.9%. 3) when ε = 0.1, the time is optimized by 48.8%, the path length is increased by 14.8%, and the exploration node is optimized by 50.8%. In Scenario 3, the simulation results again demonstrate that the expectation value ε has a significant impact on the search path.
As can be seen from Figs. 7 and 9, compared to the traditional A* algorithm, we can see that the proposed algorithm is optimized by 0.8% − 48.8% in path node time, and the space utilization is increased by 0.7% − 50.3%, but the proposed algorithm has a path length increased by 0% − 14.8%. Therefore, the A* algorithm only uses the shortest path length as the criterion to generate the optimal path, in contrast, the proposed algorithm also considers the path length, the algorithm response time, and the space utilization.
The proposed algorithm can greatly improve the efficiency and the space utilization of the algorithm whilst slightly increasing the path length, and has certain advantages. In this case, we further compare the proposed algorithm with the WA* algorithm [30] under the inflation factor α in two cases. The simulation results of scenario 3 using the WA* algorithm are shown in Figs. 10 and 5. It can be seen from Tables 4 and 5: 1) when α = 1.80 in the WA* algorithm and ε = 0.01 in the proposed algorithm, the path length is the same for both algorithms, the search time increases by 13.8%, and the search nodes increase by 15.5%. 2 ) when α = 2.35 in the WA* algorithm and ε = 0.01 in the proposed algorithm, the search node is reduced by 1%, the search time is increased by 9.3%, and the path length is increased by 1.9%. The simulation results show that the proposed algorithm optimizes the search range, reduces search time, and improves search efficiency compared to the WA* algorithm.
To sum up, the proposed algorithm has advantages over the A* algorithm and WA* algorithm. Although the proposed algorithm can ensure that the path is near optimal and improves the efficiency of the path planning, it is greatly affected by ε, which makes it have certain limitations. Therefore, the proposed algorithm still has room for improvement.

An Adaptive Threshold CCWA* Algorithm Experiment
It has been found experimentally that when the node searches outside the target region (r 1 < r 2 ), as the search node is farther away from the center, the proposed algorithm will make the value of K(n) larger as the k becomes larger. The algorithm will become a breadth-first search algorithm when K(n) is too large, causing the H (n) function to be too large and the g(n) function to fail. Therefore, to enhance the search accuracy based on improving search efficiency, we set an threshold for the CCWA* algorithm. Set the upper and lower limits of k * ε to be: H and L are respectively the upper and the lower limit of k * ε, and ε is dynamically adjusted during the search process. When the search node is closer to the target area, the smaller the ω is, the higher the search accuracy is, which ensures the authenticity of the path. When the search node is far away from the target area, the greater the weight of ω, the search speed will increase, and the accuracy of the search range will also decrease. If ω is too large, the algorithm will fail, so set the upper limit H to ensure that the function does not diverge excessively.
An adaptive threshold CCWA* algorithm (ATCCWA*) is proposed in this paper to further improve the proposed algorithm. It limits the search range of nodes and changes the weight of the heuristic function in real time. On the basis of ensuring the search accuracy, the search speed is accelerated. The parameter settings in the simulation are: the upper limit H = 1, the lower limit L = 0, and ε is ε = δ, k < 10 δ/10, 10 < k < 100 We build a prediction model of ε, and it is determined by where δ denotes the adaptive parameter of the prediction model of ε, which predicts the expected value of based on the ratio of the distance from the start point to the end point and the map size. When the search node range exceeds the distance set by the observation model, the value of ε will be reduced. x max and y max denote the maximum value in the x direction and y direction on the map, respectively. We use the ATCCWA* in scenario 3. The experimental results are shown in Fig. 11 and Table 6. Compared with the A* algorithm in Table 4, the ATCCWA* algorithm is optimized by 43.9% in time, and the exploration node is optimized by 42.8%, while the path length only grows 0.5%. ATCCWA* algorithm is superior to the A* algorithm in terms of search time and search nodes, thus improving the overall performance. The performance of the proposed algorithm is similar to that of the CCWA* algorithm. The proposed algorithm can adjust the ε adaptively according to The ATCCWA* Algorithm 0.2231 593 18700 the map size in real time, which has better adaptability and optimality of the path.
We conducted experiments on the actual petrochemical map. The simulation results are shown in Fig. 12 and Table 7. The simulation shows that the ATCCWA* algorithm still performs well in the actual environment, the path is optimal, the exploration node and exploration time are reduced.

Conclusion
A novel CCWA* algorithm and ATCCWA* algorithm are proposed in the paper. Dynamic weights are assigned to the heuristic function in these algorithms. The adaptive threshold of the ATCCWA* algorithm further enhances the performance and adaptability of the algorithm. The simulation results demonstrated that the proposed algorithm has higher search speed and accuracy than the A* algorithm and WA* algorithm. The proposed algorithm can improve the efficiency of path planning in a multi-obstacle large map environment, make sure that the search direction does not deviate excessively, and achieve a path which is near optimal. It can be used for inspection mobile robots in petrochemical plants with complex terrain structures. For future work, we plan to further explore and optimize the weight functions to improve algorithm performance.
Author Contributions Xin Lai is responsible for overall design, programming and writing, Jiahe Li is responsible for programming and writing, and Jonathon Chambers is responsible for overall guidance and proofreading.

Declarations
Ethical Approval Conflict of interests The authors declare that they have no conflict of interest.

Consent to Participate
The authors consent to participate.

Consent to Publish
The authors consent to Publish.

Competing Interests
The authors declare no competing interest.