*4.6. External Validity Analysis*

The effectiveness of the proposed path planning model needs to be validated in balancing risk costs and service benefits when extended to other urban environments. In this work, external validity is performed, and 100 different urban environments are randomly generated.

Randomly generated pedestrian density and vehicle density were in the range [5, 25] <sup>×</sup> 103(*people*/*km*2) [56]. The buildings in all environments had randomly generated variance *σ*. The flight area range was 1000 × 1000m and was divided into 50 × 50 grid areas. We set up the customer area to be served and assigned a random initial demand of *dj* <sup>∈</sup> (0, 10]. The results of path planning without considering risk and the cost-benefit model proposed in this paper were calculated separately in 100 independent environments. The path risk costs obtained from these two methods were compared to demonstrate the risk mitigation effect of the model in this paper. The total risk cost for each simulation is shown in Figure 14. Among the 100 generated samples (urban model), the average customer service completion rate of the paths planned by the model in this study reached 98.68%, and all showed good risk mitigation effects.

To test the effectiveness of risk mitigation, the results were further statistically analysed to calculate the percentage of risk mitigation at the 95% confidence level. Two sample groups were considered, the risk-mitigated group (Group 1) and the risk-unmitigated group (Group 2). There were 100 samples within each group. Due to the large sample size (*n*1, *<sup>n</sup>*<sup>2</sup> <sup>30</sup>), a normal distribution could be used to calculate confidence intervals. The results of calculating the sample means (*x*<sup>1</sup> and *x*2) and sample variances (*s*<sup>2</sup> <sup>1</sup> and *<sup>s</sup>*<sup>2</sup> <sup>2</sup>) for the two groups are shown in Table 9. *<sup>μ</sup>*<sup>1</sup> and *<sup>μ</sup>*<sup>2</sup> are the population means. (*μ*<sup>2</sup> <sup>−</sup> *<sup>μ</sup>*1)/*x*<sup>2</sup> is the confidence interval for the risk mitigation effect, where *μ*<sup>2</sup> − *μ*<sup>1</sup> was estimated by the following equation: (*x*<sup>2</sup> <sup>−</sup> *<sup>x</sup>*1) <sup>±</sup> *<sup>Z</sup>α*/2 *s*2 <sup>1</sup>/*n*<sup>1</sup> <sup>+</sup> *<sup>s</sup>*<sup>2</sup> <sup>2</sup>/*n*2.

**Figure 14.** Mitigation effects of path risk in 100 urban environments.

**Table 9.** Statistical analysis parameters of the risk-mitigated group and the risk-unmitigated group.


The results show the 95% confidence interval for the risk mitigation effect (*μ*<sup>2</sup> − *<sup>μ</sup>*1)/*x*<sup>2</sup> <sup>∈</sup> [0.6962, 0.7312]. In any urban environment, path planning with the cost-benefit model proposed in this paper mitigates the average total risk by [69.62%, 73.12%] at the 95% confidence level and can effectively reduce the risk cost of path planning results for all types of urban environments based on customer service completion.

#### **5. Conclusions**

Owing to the complexity of the urban environment, it is still a challenging task to mitigate the security threats from drones while ensuring service completion in logistics drone path planning. To address this issue, we propose a model that couples customers and risk, and guides path planning in logistics drones by means of quantifying and balancing the risk cost and service benefit. The results show that compared to traditional approaches considering only obstacle avoidance, the model proposed in this paper can capture various risks and customers dispersed in all types of urban patterns and mitigate the path risk while ensuring customer service completion. In addition, the different risk and benefit preferences would greatly affect the path planning results, which further demonstrates the importance of our proposed model for balancing risk cost and service benefit. Furthermore, the proposed path search rules with heuristic factors outperform the quality of results in traditional algorithms in complex environments. It is well known that other customer demands and risk areas also exist. For instance, convective weather also has a significant influence on the integrated risk model. In addition, the customer demand model could also consider some more conditions, such as the time window for acceptable service, customer location movement, etc. Therefore, the present work would be further investigated in subsequence research to build a more realistic logistics drone path planning model driven by more customer demands and risk areas.

**Author Contributions:** Conceptualization, J.L. and Q.S.; methodology, J.L. and Q.S.; formal analysis, J.L. and R.L.; writing—original draft preparation, J.L., R.L. and X.G.; writing—review and editing, J.Z.; supervision, Q.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported by the National Natural Science Foundation of China (Grant no. 71874081), the Natural Science Foundation of Jiangsu Province (Grant no. BK20201296), the Fundamental Research Funds for Nanjing University of Aeronautics and Astronautics (Grant no. NS2022065), and the Qing Lan Project of the Jiangsu Province.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The author declares no conflict of interest.

#### **References**

