Research on AGV path planning in new energy battery workshop

In recent years, more and more factories have begun to use automatic guided vehicles (AGVs) instead of manual work in production, transportation, and other links, which has broad application prospects and market prospects. This paper takes the new energy battery workshop as the research object, analyzes the AGV operation plan in the workshop according to the overall workflow of the workshop material distribution, and uses AnyLogic to simulate the map to complete the algorithm test. A* global algorithm is optimized and improved, and the optimal shortest route with more smoothness from the beginning of the AGV to the end of the AGV is planned, which greatly improves the operation efficiency of the whole scheduling and has high practicability.


Introduction
AGV is a transfer transport car equipped with an automatic guidance device, environmental perception, behavior control, and other functions.Its wide application has made important contributions to the improvement of warehouse transportation efficiency and cost reduction [1][2][3][4].
Based on the actual new energy battery production and processing workshop scene, this paper analyzes the operational requirements of the AGV workshop, completes the three-dimensional modeling of AGV and scene map, prepares for the study of subsequent path planning problems, improves the traditional A* algorithm, and solves the problems of slow search time and multiple inflection points of A* algorithm.Finally, the simulation model is established through AnyLogic material handling library.The validity of the improved algorithm is demonstrated [5][6][7][8].

Job shop analysis and map setting
According to the actual situation of the new energy battery production and processing workshop, it is known that before the introduction of AGV in the workshop, the average daily production of finished products was 48, the handling required 6 manpower, and the monthly wage expenditure was 30, 000 yuan.The AGV is sold for 90, 000 yuan, which costs 3 months of workers' wages.The AGV service life is at least 6 years, which can save a lot of costs.AGV can ship 1 battery at a time and complete a single transportation time within 7 minutes, that is, it can complete all operations up to 48 times during 5 and 6 hours, which can greatly improve the efficiency of workshop transportation.AnyLogic 3D physical simulation software was used to draw a three-dimensional map of equal scale, and the three-dimensional model of AGV was placed in the drawn AnyLogic simulation map to prepare for the subsequent work, as shown in Figure 1.The workshop is composed of at least the following important parts, which is indicated in Table 1.There are three battery pack production lines and two W places on the map.The orange W is the storage area for finished battery pack products, and the blue W is the storage area for waste products, respectively marked with 5 points, Point a, Point b, Point c, Point d, and Point e, corresponding to the AGV operation stopping point.Now the AGV operation plan is formulated as follows: The first operation AGV starts from the starting point (coordinate origin), goes to the stopping point a, completes the loading of finished products of the production line, and then goes to the stopping point b; To stop Point b, it finishes loading the finished products of the production line, continues to stop Point c, finishes loading, goes to the stop point d to finish unloading, and then returns to the stop point a to start the next round of operation.Since the amount of battery pack waste is much less than the number of finished products, it is stipulated that only one waste transport is required per day, so the waste operation route is a-b-c-e-a [9].

Global path planning based on the improved A* algorithm
In global route matching, the traditional A* algorithm plans routes with many turns and large angles, and the actual search efficiency is low, resulting in poor security of the planned paths [10].Therefore, based on the environmental information and movement behavior of the AGV, dynamic weighting is proposed in this chapter, and Bessel curve smoothing is done on the generated path inflection point.
Where s(n) is the cost function, representing the actual cost from the initial node to the present node in the state space, and h(n) is the heuristic function, representing the estimated cost of the best path from the current node to the target node.The optimal search function of this algorithm is determined by a heuristic function, and the improved A* algorithm introduces weighting coefficients into the heuristic function.Different weight ratios have different effects on the planning speed and path results of the algorithm.
In response to this question, this chapter presents a dynamic weighting method to calculate the weight ratio of h(n) compared with s(n).The judgment principle is as follows: When the actual cost s(n) of current (n) is taken as the judgment basis and current (n) is the starting point, the cost of s(n) is 0, and the priority is to move quickly to the target location.When current (n) approaches the target point, the optimal planning route should be considered first, and the weight specified is between h(n) and s(n).The equation of the improved evaluation function f(n) is as follows: represents the weighting coefficient of the heuristic equation; h(n) and d(c) denote the current (n) to goal node distance; d(s) represents the distance from the initial point to the goal node.Among them, the distance of h(n) is represented by diagonal distance, which is calculated as follows:

Bessel curve smoothing optimization
The improved A* algorithm path consists of multiple independent path points connected to form multiple turning points, and the robot movement is greatly restricted.For a better setup of the robot movement route, a second-order Bessel curve is employed to do smoothing on the generated path turning points.
Where the change of the time parameter t from 0 to 1 of the polynomial equation is the generation process of the curve from 0 p to 1 p ; t=0 or t=1 respectively represents the start and end time of the curve; 0 p , 1 p , and 2 p are the curve's three control points.The shape of the curve is determined by the position of each control point.We keep the original map unchanged and compare the simulation experiment results before and after the optimization of the Bezier curve.As shown in Figure 3 below, the pink solid line is the path planned before the optimization of the Bezier curve, and the blue curve is the actual route planned after the optimization of the Bezier curve.

Calculation of adaptive speed function
The speed is controlled by using the weight coefficients in the speed evaluation.If α is large, the AGV will be very fast and less secure.Conversely, if α is small, the AGV will be very slow and more secure.If α is small, the AGV speed will be very slow and the safety will be improved.
The shortest distance between the AGV and the obstacle is denoted as 1 D , and then we can obtain: . max 1 Where β0is the max speed weight and Ds is the security valve.When Ds is larger than Dmin, the speed weight increases with Dmin monotonically and βr =β0, which means it reduces the AGV speed.When Ds is fewer than Dmin, the speed weight is an exponential function of Dmin and Ds.When the value of Dmin and Ds decreases, the AGV speed is increased.On the contrary, βr is reduced, and the simulation results of the fusion improved A* algorithm are shown in Figure 4.
The simulation experiment compares the improved A* algorithm and the fusion improved A* algorithm and path length and the planning time are obtained.The comparison results are shown in Table 2.
Table 2 The simulation results show that the A* global optimal path is planned by the improved A* algorithm.Compared with the improved A* algorithm, the path is smoother and more consistent with the actual running trajectory of AGV.

Conclusion
In this chapter, the AGV field operation scheme is designed reasonably based on the actual work scenario, and the actual map is simulated as a three-dimensional map, to facilitate the research of the path planning algorithm.Secondly, the paper analyzes the shortcomings of the A* global path planning algorithm, such as slow search speed and many path inflection points, and improves the algorithm.
represent the distance from current (n) to the target point in x and y directions; x c and y c denote the x and y coincidences of the goal node; x g and y g respectively represent the x and y coordinates of the target node.Python's matplotlib drawing library was used to simulate and verify the A* algorithm before and after the improvement several times.Simulation experiments were conducted in a 60*60 obstacle map.We conduct six experiments and choose one with more moderate results for comparison.The results of the experiment are shown in Figure 2.

Figure 2 .
Figure 2. Simulation comparison chart before and after heuristic function optimization.

Figure 3 .
Figure 3.Comparison chart of simulation before and after Bézier curve optimization.

Figure 4 .
Figure 4. Simulation results of fusion improved A * algorithm.

.
Comparison of results before and after heuristic optimization