# AI-Driven Safety and Security for UAVs: From Machine Learning to Large Language Models
## 3 AI for UAV Safety
### UAV Battery Safety Management  
UAV battery safety management technology is a key component for ensuring UAV safety. A battery management system (BMS) is responsible for monitoring parameters such as the state of charge (SOC), state of health (SOH), and remaining useful life (RUL). Through charging control strategies, battery balancing strategies, and hybrid battery energy management strategies, BMSs optimize battery performance and predict battery performance and remaining flight time, as shown in Figure 8. Additionally, BMSs include safety measures such as overtemperature, overvoltage, and short-circuit protection to prevent flight accidents caused by battery failures. Abnormal changes in battery temperature are the main factors leading to UAV battery degradation, performance decline, and even safety accidents. Traditional temperature management methods usually rely on thermal sensors and simple threshold settings, which cannot predict the risk of battery thermal runaway. DL neural networks can be applied to predict the evolution trend of battery temperatures on the basis of historical and real-time sensor data while considering factors such as the discharge rate, ambient temperature, and load changes. This approach leads to improved prediction accuracy and enables early prediction of potential overheating [109]. RL methods can also be applied to dynamically adjust the charging and discharging strategies of UAV batteries to avoid overheating issues, enhance temperature control management capabilities, monitor and identify abnormal battery parameters, and provide early warnings of battery failure [110; 111]. Moreover, the limited endurance time of UAV batteries makes the accurate prediction of the remaining charge crucial. Traditional SOC prediction methods based on open-circuit voltage, internal battery resistance, or Coulomb counting suffer from error accumulation during long-term operation [112]. RNNs and Bayesian optimization models can combine multi-modal sensor data such as battery temperature, current, voltage, and ambient humidity to predict the remaining charge, reduce error accumulation, and improve SOC prediction accuracy [113; 114]. For UAV battery health status assessment, combining features such as temperature, internal resistance, and voltage curves allows DL or RL models to optimize battery management strategies, predict battery health status and remaining life, enhance the precision of battery management [86], and optimize battery charging and discharging strategies [110; 115]. However, owing to confidentiality policies, access to actual operational data is strictly limited [109]. Additionally, battery manufacturers are reluctant to share battery health data [116], and generating data in the laboratory is time-consuming and costly. These factors  
Figure 7: LLMs in UAV physical safety design. collectively restrict the application of AI models in battery management, constraining AI model training and optimization due to limitations in data quality and quantity [117; 118]. The lack of data indirectly leads to limited research on temperature [119] and charging rate [114] ranges in current papers. Models may not be stable under different temperatures, charging rates, battery ages, and battery types. In addition, they may face challenges in the presence of uncertainty and noise [119], making it difficult to generalize to unseen scenarios. Moreover, BMSs involve complex parameters and strong coupling. Existing AI tools still face challenges in predicting battery status and capturing the dynamic complexity of batteries [120], potentially overestimating model prediction accuracy. There are also potential issues with long-range spatial connections across multiple time scales [121]. Therefore, battery failure and in-flight crash risks cannot be avoided entirely [86]. AI models have poor interpretability, making it difficult for humans to understand the analysis and decision-making processes related to complex battery health factors and their interactions.