# A Cost-Sensitive Diagnosis Method Based on the Operation and Maintenance Data of UAV
###### Abstract  
In the fault diagnosis of UAVs, extremely imbalanced data distribution and vast differences in effects of fault modes can drastically affect the application effect of a data-driven fault diagnosis model under the limitation of computing resources. At present, there is still no credible approach to determine the cost of the misdiagnosis of different fault modes that accounts for the interference of data distribution. The performance of the original cost-insensitive flight data-driven fault diagnosis models also needs to be improved. In response to this requirement, this paper proposes a two-step ensemble cost-sensitive diagnosis method based on the operation and maintenance data of UAV. According to the fault criticality from FMECA information, we defined a misdiagnosis hazard value and calculated the misdiagnosis cost. By using the misdiagnosis cost, a static cost matrix could be set to modify the diagnosis model and to evaluate the performance of the diagnosis results. A two-step ensemble cost-sensitive method based on the MetaCost framework was proposed using stratified bootstrapping, choosing LightGBM as meta-classifiers, and adjusting the ensemble form to enhance the overall performance of the diagnosis model and reduce the occupation of the computing resources while optimizing the total misdiagnosis cost. The experimental results based on the KPG component data of a large fixed-wing UAV show that the proposed cost-sensitive model can effectively reduce the total cost incurred by misdiagnosis, without putting forward excessive requirements on the computing equipment under the condition of ensuring a certain overall level of diagnosis performance. fault diagnosis; cost-sensitive learning; UAV; FMECA; MetaCost 22 November 2021 23 November 2021  
the capability of the fault diagnosis model, researchers have made some inroads, focusing in particular on imbalanced data. Due to the bias of the decision hyperplane in favor of the majority classes [8], the decent overall classification accuracy (the core indicator used to train a general classifier) might not be able to effectively diagnose more serious fault modes with lower frequencies of occurrence. Due to the great number of fault modes that exist and their great differences in frequency, the collected operation data from UAVs are greatly imbalanced. The data characteristics of the minority cases are easily outweighed by those of the majority cases, but the former often contain valuable information [9]. For industrial practitioners, this imbalanced data greatly reduces the fault detection rate and the effectiveness of a data-driven method [10]. Data imbalance significantly interferes with the generalization performance of cost-insensitive learning algorithms, which can cause the more serious faults to be ignored in fault diagnosis procedures. To deal with this imbalanced problem, evaluation methods that focus on all classes, such as total misclassification costs [11], data-level methods, and algorithm-level methods, have been developed. Resampling, as the key to the data-level methods, tries to rebalance the data size of classes before model training with over-sampling, under-sampling, and hybrid methods. The over-sampling technique synthesizes the number of minority instances to balance the classes, whereas the under-sampling technique obtains the balanced data distribution by removing sufficient majority instances. Over-sampling methods, represented by the Synthetic Minority Over-sampling Technique (SMOTE) [12], make it difficult to fix the overfitting problem. Comparatively, under-sampling methods can lose information from partial data. These ineffaceable defects of resampling have encouraged researchers to pay increasing attention to algorithm-level methods. By adopting different types of cost-insensitive classification models, some algorithm level methods have been designed for specific data and problems [13; 14], with their weak generalization ability and heavy manual work with core parameters setting becoming an issue [15].