# Research on AGV Path Planning Integrating an Improved A* Algorithm and DWA Algorithm
## 3 Improvement of the DWA Algorithm
### Traditional DWA Algorithm  
The traditional dynamic window approach (DWA) algorithm simulates the motion trajectory of a mobile robot by collecting its velocity samples and predicting its motion trajectory at the sampled velocities. Among all of the feasible trajectories predicted, the optimal trajectory is determined by evaluating the evaluation function [26]. In the trajectory prediction stage, the robot's kinematic model is used for trajectory prediction. Assuming that the mobile robot moves at a time interval \(\Delta t\), the kinematic model of the mobile robot can be obtained from Equation (7). Here, \((X_{1},Y_{1},\theta_{1})\) represents the robot's position and orientation at time \(t\), and \((X_{2},Y_{2},\theta_{2})\) represents its position and orientation at time \(t+\Delta t\), with \(\triangle\theta=\omega_{t}\Delta t\). \[\left\{ \begin{array}{l}X_{2}=X_{1}+V\_tcos(\triangle\theta)\Delta t\\ Y_{2}=Y_{1}+V\_tsin(\triangle\theta)\Delta t\\ \theta_{2}=\theta_{1}+\omega_{t}\Delta t\end{array} \right. \tag{7}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Path Length (m)** & **Path Search Time (s)** &
\begin{tabular}{c} **Distance from Path** \\ **to the Nearest** \\ **Obstacle (m)** \\ \end{tabular} \\ \hline Traditional A* algorithm & 17.556 & 16.11 & 0 \\ \hline Alternative A* algorithm & 16.728 & 15.35 & 0.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison results of traditional A* algorithm and alternative A* algorithm. Figure 6: Conventional A* algorithm and improved A* algorithm path diagram, (**a**) conventional A* algorithm path diagram, (**b**) alternative A* algorithm path diagram. The motion state of the robot is jointly determined by its current linear velocity \(v\) and angular velocity \(\omega\). Under the velocity constraints of the robot, the sampling space of the velocity sets is established, resulting in multiple velocity sets \((v_{t},\omega_{t})\) in the velocity space. However, in practical applications, the sampling velocity range is limited by the constraints of the mobile robot's performance and the surrounding environment. The sampling velocity range of the mobile robot can be expressed as follows:  
\[V_{m}=\{(v,m)|v\in[v_{min},v_{max}],\omega\in[\omega_{min},\omega_{max}]\} \tag{8}\]  
where \(v_{min}\) and \(v_{max}\) are the minimum and maximum linear velocities of the mobile robot, respectively; \(\omega_{min}\) and \(\omega_{max}\) are the minimum and maximum angular velocities of the mobile robot, respectively. Since the mobile robot is driven by a motor, the addition and subtraction of velocity is constrained by the motor. The sampled velocity space when acceleration is considered within the dynamic window can be expressed as  
\[V_{d}=\big{\{}(v,\omega)\big{|}v\in\big{[}v_{t}-\dot{v}\Delta t,v_{t}+\dot{v} \Delta t\big{]},\omega\in\big{[}\omega_{t}-\dot{\omega}\Delta t,\omega_{t}+ \dot{\omega}\Delta t\big{]}\big{\}} \tag{9}\]  
where \((v_{t},\omega_{t})\) is the current velocity group of the mobile robot, and \(\dot{v}\) and \(\dot{\omega}\) are the maximum linear acceleration and maximum angular acceleration of the mobile robot, respectively. The mobile robot is also constrained by its braking distance. In the localized obstacle avoidance process, the safety of the mobile robot must be ensured, and the robot needs to brake to a stop before colliding with an obstacle. This means that under the condition of maximum deceleration, the current velocity can be reduced to zero before a collision occurs. The velocity limit of the robot can be expressed as follows:  
\[V_{a}=\bigg{\{}(v,\omega)\bigg{|}v\leq\sqrt{2 dist(v,\omega)\dot{v}},\omega \leq\sqrt{2 dist(v,\omega)\dot{\omega}}\bigg{\}} \tag{10}\]  
where \(dist(v,\omega)\) denotes the closest distance of the mobile robot to the obstacle at the current speed. With the above constraints, the final velocity sampling space of the mobile robot is the intersection of the three velocity spaces, as shown in Equation (11):  
\[