# Development of Path Planning Tool for Unmanned System Considering Energy Consumption
## 3 Path Planning
### Eepp  
In contrast to the general SPP algorithm, which only accounts for the distance between nodes, the EEPP algorithm calculates the energy-efficient path by considering factors including the distance between nodes, the minimum and maximum speed of the UAV, and the weight of the UAV as shown in Figure 4.  
Figure 3: Flowchart of shortest-path planning (SPP) algorithm.  
Figure 2: Flowchart of path planning.  
The overall amount of battery consumption of the UAV, \(B_{o}\), would be  
\[B_{o}=B_{t}+B_{h}+B_{a}+B_{n}+B_{d}+B_{c}+B_{l}, \tag{1}\]  
where \(B_{t}\) is the battery consumption during takeoff (W), \(B_{h}\) is the battery consumption during hovering (W), \(B_{a}\) is the battery consumption during acceleration (W), \(B_{n}\) is the battery consumption during normal flight (W), \(B_{d}\) is the battery consumption during deceleration (W), \(B_{c}\) is the battery consumption during the circular flight (W), and \(B_{l}\) is the battery consumption during landing (W).  
Because the takeoff and landing occur in a short period and the amount of battery consumption is insignificant compared with the total consumption, \(B_{t}\) and \(B_{l}\) are assumed to be zero, and Equation (1) becomes  
\[B_{o}\approx B_{h}+B_{a}+B_{n}+B_{d}+B_{c}. \tag{2}\]  
If there are \(n_{e}\) number of edges in the given path,  
\[B_{o}\approx\sum_{i=1}^{n_{e}}(B_{h}+B_{a}+B_{n}+B_{d}+B_{c}). \tag{3}\]  
From the equation of a single rotor helicopter in hover [16; 17], the required hovering power of the UAV can be derived as  
\[B_{h}=m^{\frac{3}{2}}\sqrt{\frac{g^{3}}{2\rho\zeta n_{r}}}, \tag{4}\]  
where \(m\) is the mass of the UAV (kg), \(g\) is the gravitational acceleration (m/s\({}^{2}\)), \(\rho\) is the fluid density of air (kg/m\({}^{3}\)),  
The unknown value, \(t_{a}\), in Equation (5) can be calculated as  
\[t_{a}=t_{d}=\frac{v_{\max}-v_{\min}}{a_{\max}}. \tag{9}\]  
The unknown value, \(t_{n}\), in Equation (7) can be calculated as  
\[\frac{1}{2}t_{c}=\frac{1}{v_{\min}}\left\{\frac{v_{\min}^{2}}{a_{\max}}\tan \left(\frac{\pi}{2}-\frac{\alpha}{2}\right)\right\}, \tag{10}\]  
therefore,  
\[t_{c}=2\frac{v_{\min}}{a_{\max}}\tan\left(\frac{\pi}{2}-\frac{\alpha}{2} \right), \tag{11}\]  
where \(\alpha\) is the intersection angle of two edges, which satisfies \(0\leq\alpha\leq\pi\).  
Because  
\[\begin{array}{l}b_{1}=t_{a}v_{\min}+\frac{1}{2}t_{a}(v_{\max}-v_{\min}),\\ b_{2}=\frac{v_{\min}^{2}}{a_{\max}}\tan\left(\frac{\pi}{2}-\frac{\alpha}{2} \right),\end{array} \tag{12}\]  
the unknown value, \(t_{c}\), in Equation (8) can be calculated as  
\[t_{n}=\frac{1}{v_{\max}}\{\|W_{i-1},W_{i}\|-2(b_{1}+b_{2})\}, \tag{13}\]  
where \(W_{i}\) is the waypoint (no unit), \(b_{1}\) is the distance in which the UAV accelerates or decelerates (m), and \(b_{2}\) is the distance at which the UAV flies in a circular motion (m).  
Figure 4: Analysis of flight path using the Dubins path method [18; 19; 20].  
If Equations (4)-(13) are combined into Equation (3), then  
\[B_{0}=\sum_{i=1}^{n_{v}}\biggl{[}m^{\frac{3}{2}}\sqrt{\frac{s^{3}}{2\rho\zeta n_{ r}}}+ma_{\max}(v_{\max}-v_{\min})+\frac{mv_{\max}^{3}}{2[\|W_{i-1},W_{i}\|-2(b_{1}+b_{2} )]}+\frac{mv_{\min}a_{\max}}{4\tan\left(\frac{\pi}{2}-\frac{\pi}{2}\right)} \biggr{]}. \tag{14}\]  
To calculate the total unit energy consumption (UEC) (Wh), \(U_{b}\), Equation (14) is converted as  
\[B_{0}=\frac{t_{t}}{3600}\sum_{i=1}^{n_{v}}\biggl{[}m^{\frac{3}{2}}\sqrt{\frac{ s^{3}}{2\rho\zeta n_{r}}}+ma_{\max}(v_{\max}-v_{\min})+\frac{mv_{\max}^{3}}{2[\|W_{i- 1},W_{i}\|-2(b_{1}+b_{2})]}+\frac{mv_{\min}a_{\max}}{4\tan\left(\frac{\pi}{2} -\frac{\pi}{2}\right)}\biggr{]} \tag{15}\]  
where \(t_{t}=t_{a}+t_{n}+t_{d}+t_{c}\).  
The overall flowchart of the EEPP algorithm is shown in Figure 5.