A fault diagnosis method and device for a UAV
By constructing a reinforcement learning model that combines fusion vectors and a dual-threshold mechanism, accurate diagnosis of faults in multi-rotor UAVs was achieved, solving the problems of poor adaptability and misdiagnosis in existing technologies, and improving the accuracy and timeliness of diagnosis.
Patent Information
- Application Number
- CN202611043906.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-11-20
AI Technical Summary
Existing fault diagnosis methods for multi-rotor UAVs suffer from poor adaptability to changes in operating conditions, high modeling costs, and a lack of ability to reject unknown anomalies not observed during training, leading to high-risk misdiagnosis and insufficient timeliness of diagnosis.
A fusion vector containing health representations and multiple uncertainty measures is constructed. Combining a dual-threshold mechanism and a reinforcement learning model, the initial state is determined by generating the fusion vector and unknown scores. Reinforcement learning is then performed under uncertain states to obtain the final fault diagnosis result.
It significantly improves the accuracy, timeliness, and robustness of fault diagnosis for multi-rotor UAVs, avoids misjudgment of unknown faults, and enhances engineering safety.
Smart Images

Figure CN123139060A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) fault diagnosis technology, and in particular to a method and apparatus for diagnosing UAV faults. Background Technology
[0002] Multi-rotor drones are characterized by their compact structure, high maneuverability, convenient deployment, and strong mission adaptability, and have been widely used in fields such as patrol mapping, low-altitude logistics, forest fire prevention, security monitoring, agricultural plant protection, and emergency rescue. With the increasing density and complexity of low-altitude flight missions, the requirements for flight safety, mission reliability, and environmental adaptability of multi-rotor drones have significantly increased.
[0003] Stable flight of multi-rotor UAVs relies on the coordinated operation of motors, propellers, flight control systems, sensors, actuators, and control algorithms. If motor performance deteriorates, propellers are damaged, sensors drift, control loops malfunction, actuators become sluggish, or external disturbances intensify, the aircraft may experience thrust imbalance, increased attitude fluctuations, and rising trajectory tracking errors, potentially leading to loss of control or crashes. Therefore, timely and reliable identification of fault conditions during flight is of significant engineering importance.
[0004] Currently, the methods used for fault diagnosis of multi-rotor UAVs typically include threshold alarms, model-driven methods, traditional machine learning, and deep closed-set classification. However, these methods have drawbacks in the fault diagnosis process, such as poor adaptability to changes in operating conditions, high modeling costs, lack of ability to reject unknown anomalies not seen in training, leading to high-risk misdiagnosis, and single-window diagnostic mechanisms have difficulty balancing the risk of misjudgment with the timeliness of diagnosis when there is insufficient evidence in the early stages of a fault. Summary of the Invention
[0005] This invention provides a method and apparatus for diagnosing drone faults, so as to achieve accurate diagnosis of drone faults.
[0006] According to a first aspect of the present invention, a fault diagnosis method for an unmanned aerial vehicle (UAV) is provided, the method comprising: constructing a window-level sample sequence based on multivariate flight logs collected during the flight of the UAV, wherein each of the window-level sample sequences is located within a different sliding window; A fusion vector is generated for the current sliding window based on the window-level sample sequence, and the unknown score of the current sliding window is determined based on the fusion vector. The fusion vector includes health representation, known class failure probability, maximum confidence, probability entropy, nearest prototype distance, and energy score. The initial state of the current window is determined using a dual threshold mechanism based on the unknown score, wherein the initial state includes known fault, unknown fault, or uncertain state; When the initial state is the uncertain state, a learning state is constructed based on the fusion vector and the unknown score. Reinforcement learning is performed on the learning state to obtain the final state, and the fault diagnosis result of the UAV is determined based on the final state.
[0007] According to another aspect of the present invention, a fault diagnosis device for a drone is provided, the device comprising: A window-level sample sequence construction module is used to construct window-level sample sequences based on multivariate flight logs collected during UAV flight, wherein each window-level sample sequence is located within a different sliding window; The unknown score determination module is used to generate a fusion vector for the current sliding window based on the window-level sample sequence, and determine the unknown score of the current sliding window based on the fusion vector. The fusion vector includes health representation, known class failure probability, maximum confidence, probability entropy, nearest prototype distance, and energy score. The initial state determination module is used to determine the initial state of the current window based on the unknown score using a dual threshold mechanism, wherein the initial state includes known fault, unknown fault, or uncertain state; The fault diagnosis result output module is used to construct a learning state based on the fusion vector and the unknown score when the initial state is the uncertain state, perform reinforcement learning on the learning state to obtain the final state, and determine the fault diagnosis result of the UAV based on the final state.
[0008] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: one or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any embodiment of the present invention.
[0009] According to another aspect of the present invention, a storage medium for computer-executable instructions is provided, on which a computer program is stored, which, when executed by a processor, implements the method as described in any of the embodiments of the present invention.
[0010] The technical solution of this invention, by constructing a fusion vector that includes health representation and multiple uncertainty measures, combined with a dual threshold mechanism and a reinforcement learning model, can clearly distinguish between known and unknown faults, avoiding misjudgment of unknown faults, thereby significantly improving the timeliness, robustness and engineering safety of diagnosis while ensuring diagnostic accuracy.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of a fault diagnosis method for a drone according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of another method for diagnosing faults in a drone according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a fault diagnosis device for a drone according to Embodiment 3 of the present invention; Figure 4 This is a structural block diagram of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or terminal device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or terminal devices.
[0016] Example 1 Figure 1 This is a flowchart of a fault diagnosis method for a drone provided in Embodiment 1 of the present invention. This embodiment is applicable to the fault diagnosis of drones. The method can be executed by a drone fault diagnosis device, which can be implemented in hardware and / or software, and can be integrated into an electronic device with data processing capabilities. Figure 1 As shown, the method includes: S101, construct a window-level sample sequence based on the multivariate flight logs collected during the UAV's flight.
[0017] Optionally, a window-level sample sequence is constructed based on the multivariate flight logs collected during the UAV flight, including: aligning the timestamps of the multivariate flight logs collected during the UAV flight to construct an overall sample sequence; preprocessing the overall sample sequence to obtain a processed sample sequence; and segmenting the processed sample sequence using a sliding window to obtain multiple window-level sample sequences arranged in chronological order.
[0018] Specifically, the drone in this embodiment can be a multi-rotor drone, such as a quadcopter or a hexacopter. This embodiment does not limit the type of human-machine interface to multi-rotor drones. During the drone's flight, flight data is collected in real time to obtain multi-variable flight logs. These multi-variable flight logs not only include the drone's basic operating status (attitude angle, attitude angular velocity, linear acceleration, velocity, and position), but also collect in-depth data on the underlying actuators (motor speed, motor current, motor PWM, and propeller response), as well as power supply status (battery voltage and battery current), environmental / mechanical characteristics (vibration characteristics), and mission status, providing rich basic data for subsequent fault diagnosis.
[0019] Since the raw data collected in multivariate flight logs often contains noise, missing data, or inconsistent formats, it cannot be directly used for algorithm analysis. Therefore, a series of preprocessing operations are required. First, time synchronization is performed to obtain the overall sample sequence, ensuring that the data from all different sensors are strictly aligned on the time axis. Then, missing value processing and outlier smoothing are performed on the overall sample sequence to repair data gaps and spikes caused by signal loss or sensor interference, ensuring data continuity. Finally, scale annotation is performed, which converts data of different units and magnitudes (such as a few volts of voltage versus a few meters per square second of acceleration) to the same numerical range, eliminating the influence of units and enabling the algorithm to treat each feature fairly. The time-synchronized and continuous processed sample sequence obtained after the above preprocessing is shown below: , where x tLet represent the d-dimensional flight state vector at the t-th sampling time. This implementation will segment the processed sample sequence using a sliding window. For example, a sliding window of length L and step size s will be used to obtain multiple window-level sample sequences arranged in chronological order, such as... Let represent an example of the window-level sample sequence at time i. Therefore, in this embodiment, the continuous processed sample sequence is cut into multiple fixed-length small windows to form a window-level sample sequence arranged in chronological order, so that feature extraction and fault diagnosis can be performed on the basis of the window-level sample sequence in the future.
[0020] S102, generate a fusion vector for the current sliding window based on the window-level sample sequence, and determine the unknown score of the current sliding window based on the fusion vector.
[0021] Optionally, a fusion vector is generated for the current sliding window based on the window-level sample sequence, including: generating a health representation indicating the health status of the window based on the window-level sample sequence; outputting the known class probability, fault severity probability, and fault location probability based on the health representation and the logistic regression vector, wherein the logistic regression vector is an intermediate parameter generated during the generation of the health representation; calculating the maximum confidence and probability entropy of the current sliding window based on the known class probability, and calculating the nearest prototype distance corresponding to the current sliding window based on the prototype center distance between the health representation and each known fault category; calculating the energy score based on the logistic regression vector, and fusing the health representation, known class probability, maximum confidence, probability entropy, nearest prototype distance, and energy score to generate a fusion vector.
[0022] Optionally, based on the health representation and the prototype center distance of each known fault category, the nearest prototype distance corresponding to the current sliding window is calculated, including: establishing a prototype center for each known fault category in the health representation space, wherein the prototype center is initialized with the mean of the health representation of the training samples and dynamically updated as a learnable parameter during model training; calculating the distance from the health representation of the current sliding window to each prototype center, and taking the distance with the smallest value as the nearest prototype distance corresponding to the current sliding window.
[0023] Specifically, each sliding window is analyzed to generate a corresponding fusion vector. For example, taking the currently analyzed sliding window as an example, a temporal convolutional network, recurrent neural network, Transformer, self-attention network, or a combination of the above networks is used to map the window-level sample sequence within the current sliding window into a low-dimensional health representation, such as: The health representation is a vector indicating the health status of a window. The combined structure includes an input mapping layer, multi-layer dilated convolutional residual blocks, a channel attention layer, and a temporal attention pooling layer. The input mapping layer unifies the dimensions of the multi-channel flight log; the dilated convolutional residual blocks extract local short-term anomalies and trend changes over longer time scales; the channel attention layer highlights fault-sensitive state variables and actuator responses; and the temporal attention pooling layer converges window-level health representations from multiple time positions within the window. Therefore, the health representation in this embodiment condenses the deep features of the window-level sample sequence within the current sliding window. The combined result generates an intermediate parameter during the health representation generation process: a logistic regression vector. Where K represents the number of known fault types, and the logistic regression vector is the raw evaluation score output by the model before deriving the final probability. It is the key bridge connecting the feature extraction inside the neural network with the final probability output.
[0024] In this implementation, the known class probability, fault severity probability, and fault location probability are output based on the health representation and logistic regression vector. The health representation is connected to a multi-head output structure. The first output head is the known class classification head, outputting the known class probability; the second output head is the severity head, outputting the severity probabilities (mild, moderate, severe, etc.); and the third output head is the fault location head, outputting the fault location probabilities for motors, propellers, sensors, control loops, etc. Through the multi-head output structure, the system can simultaneously obtain information such as class, severity, and location from the same health representation. For example, the known class probability is expressed as: Furthermore, in this embodiment, the maximum confidence and probability entropy of the current sliding window can be calculated based on the known class probabilities obtained above. For example, the maximum confidence is: , used to represent the degree of certainty that the current sliding window belongs to a certain known type of fault, with the probability entropy being: C is used to represent the uncertainty of the current sliding window classification result. i The higher, H i The lower the value, the closer the current window is to a known category. i Lower or H i A higher value indicates insufficient evidence or unclear category boundaries.
[0025] In addition, this embodiment will establish a prototype center for each known fault in the health characterization space. The prototype center can be initialized using the mean of the health representation of the training samples and continuously fine-tuned during model training, or it can be recalculated based on known class samples after model training is complete. This embodiment is merely illustrative and does not limit the specific method for determining the prototype center. Since the health representation of the current sliding window is known, the distance from the health representation to each prototype center is calculated: The distance with the smallest value is taken as the nearest prototype distance for the current sliding window. If the nearest prototype distance is small, it means that the current sliding window representation is close to a known class prototype; if the nearest prototype distance is large, it means that the current sliding window may deviate from the distribution of all known classes, and is more likely to be a case of training without anomalies or unknown faults.
[0026] It should be noted that, in this embodiment, the energy score will also be calculated based on the logistic regression vector obtained above: Where T is the temperature coefficient. Let be the logistic regression vector for the k-th known class, where the energy score characterizes whether the current sliding window deviates from the distribution of known class data from the perspective of the logistic regression vector distribution. In this embodiment, the obtained health characteristics, known class probabilities, maximum confidence, probability entropy, nearest prototype distance, and energy scores are fused to generate a fused vector. ,in, Indicates signs of health. Represents the probability of a known class. Indicates the maximum confidence level. Represents probability entropy. Indicates the nearest prototype distance. This represents the energy score. After obtaining the fusion vector, the fusion vector will be... The input is a fusion discriminator, which outputs an unknown score via a sigmoid function. The larger the unknown score, the higher the probability that the current window belongs to the training without anomalies or unknown faults. In this embodiment, the size of the unknown score corresponding to the current sliding window is not limited.
[0027] S103, use a dual threshold mechanism to determine the initial state of the current window based on the unknown score.
[0028] Optionally, a dual-threshold mechanism is used to determine the initial state of the current window based on the unknown score, including: when the unknown score is not greater than a first score threshold, the maximum confidence is not less than a confidence threshold, and the nearest prototype distance is not greater than a distance threshold, the initial state of the current window is determined to be a known fault; when the unknown score is not less than a second score threshold, the maximum confidence is less than a confidence threshold, and the nearest prototype distance is greater than a distance threshold, the initial state of the current window is determined to be an unknown fault, wherein the second score threshold is greater than the first score threshold; when the unknown score is between the first score threshold and the second score threshold, the initial state of the current window is determined to be uncertain.
[0029] Specifically, this implementation performs a preliminary diagnosis of the current sliding window based on the unknown score, and before the preliminary diagnosis, two score thresholds are determined: the first score threshold... Second score threshold Furthermore, the second score threshold is greater than the first score threshold; therefore, a dual-threshold mechanism is used to determine the initial state of the current window during initial diagnosis. When this happens, the initial state of the current window is determined to be a known fault, where, Indicates the confidence threshold. Indicates the distance threshold; If so, the initial state of the current window is determined to be an unknown fault; when If so, then the initial state of the current window is determined to be uncertain.
[0030] S104. When the initial state is uncertain, a learning state is constructed based on the fusion vector and the unknown score. Reinforcement learning is performed on the learning state to obtain the final state, and the fault diagnosis result of the UAV is determined based on the final state.
[0031] Optionally, reinforcement learning is performed on the learning state to obtain the final state, including: using a reinforcement learning strategy to perform reinforcement learning on the learning state to select action types, wherein the action types include continuing to observe, outputting known faults, and outputting unknown faults; and determining the final state based on the action types.
[0032] Optionally, the fault diagnosis results of the UAV are determined based on the final state, including: when the final state is a known fault, the known fault type is determined according to the known class probability, the fault severity is determined according to the fault severity probability, and the fault location is determined according to the fault location probability, and the fault type, fault severity, and fault location are used as the fault diagnosis results; when the final state is an unknown fault, an unknown anomaly alarm and risk level are generated, and the unknown anomaly alarm, risk level, and unknown score are used as the fault diagnosis results; when the final state is uncertain corresponding to the continue observation action, a continuous observation prompt is displayed, and the continuous observation prompt is used as the fault diagnosis result.
[0033] Specifically, when the initial state of the current sliding window is a known fault or an unknown fault, the known fault or unknown fault is directly used as the final state without any additional operations. However, when the initial state is an uncertain state, a learning state is constructed based on the fusion vector and the unknown score. and learning status The data is input into the reinforcement learning sequential decision unit, and a reinforcement learning strategy is used to reinforce the learning state. It then selects one of three actions: continue observation, output a known fault, or output an unknown fault. "Continue observation" indicates insufficient evidence, so no conclusion is drawn until data from the next window arrives. "Output a known fault" indicates conclusive evidence, directly outputting the specific known fault label identified in previous steps. "Output an unknown fault" indicates confirmation of an anomaly, but the specific fault is unknown, issuing an unknown fault alarm. The reinforcement learning process is not responsible for reclassification; it does not need to determine the specific known fault in the current sliding window. It is solely dedicated to addressing whether the current timing is right and whether a diagnostic conclusion should be output. In this implementation, the final state is determined based on the action type.
[0034] Specifically, when the final state is a known fault, the system determines the known fault type with the highest probability value among the known fault types and sets this known fault type as the fault type corresponding to the current sliding window. It also determines the fault severity with the highest probability value among the fault severity probabilities and sets this fault severity as the fault severity corresponding to the current sliding window. Finally, it determines the fault location with the highest probability value among the fault location probabilities and sets this fault location as the fault location corresponding to the current sliding window. Therefore, for known faults, the fault type, fault severity, and fault location are used as the fault diagnosis results. Conversely, when the final state is an unknown fault, an unknown anomaly alarm is generated (to explicitly indicate that an anomaly not previously seen by the system has occurred). Simultaneously, the system assesses the fault risk level based on the physical risk characteristics contained in the window-level sample sequence within the current sliding window, such as attitude deviation or vibration, and uses the unknown anomaly alarm, risk level, and unknown score as the fault diagnosis results. Finally, when the final state is uncertain, corresponding to the "continue observation" action, the system generates a "continuous observation" prompt message, and uses this "continuous observation" prompt message as the fault diagnosis result. This means that the system is not currently providing any specific fault label (neither a known fault nor an unknown fault), but is clearly informing the outside world that the system is collecting more data and has not yet made a final diagnosis.
[0035] The technical solution of this invention, by constructing a fusion vector that includes health representation and multiple uncertainty measures, combined with a dual threshold mechanism and a reinforcement learning model, can clearly distinguish between known and unknown faults, avoiding misjudgment of unknown faults, thereby significantly improving the timeliness, robustness and engineering safety of diagnosis while ensuring diagnostic accuracy.
[0036] Example 2 Figure 2 This is a flowchart of another method for diagnosing a drone's faults, provided by an embodiment of the present invention. Based on the above embodiments, after determining the fault diagnosis result of the drone based on the final state, this embodiment further includes detecting the fault diagnosis result. When the detection passes, the fault diagnosis result is output in a specified manner, such as... Figure 2 As shown, the method includes: S201, construct a window-level sample sequence based on the multivariate flight logs collected during the UAV's flight.
[0037] Optionally, a window-level sample sequence is constructed based on the multivariate flight logs collected during the UAV flight, including: aligning the timestamps of the multivariate flight logs collected during the UAV flight to construct an overall sample sequence; preprocessing the overall sample sequence to obtain a processed sample sequence; and segmenting the processed sample sequence using a sliding window to obtain multiple window-level sample sequences arranged in chronological order.
[0038] S202, generate a fusion vector for the current sliding window based on the window-level sample sequence, and determine the unknown score of the current sliding window based on the fusion vector.
[0039] Optionally, a fusion vector is generated for the current sliding window based on the window-level sample sequence, including: generating a health representation indicating the health status of the window based on the window-level sample sequence; outputting the known class probability, fault severity probability, and fault location probability based on the health representation and the logistic regression vector, wherein the logistic regression vector is an intermediate parameter generated during the generation of the health representation; calculating the maximum confidence and probability entropy of the current sliding window based on the known class probability, and calculating the nearest prototype distance corresponding to the current sliding window based on the prototype center distance between the health representation and each known fault category; calculating the energy score based on the logistic regression vector, and fusing the health representation, known class probability, maximum confidence, probability entropy, nearest prototype distance, and energy score to generate a fusion vector.
[0040] Optionally, based on the health representation and the prototype center distance of each known fault category, the nearest prototype distance corresponding to the current sliding window is calculated, including: establishing a prototype center for each known fault category in the health representation space, wherein the prototype center is initialized with the mean of the health representation of the training samples and dynamically updated as a learnable parameter during model training; calculating the distance from the health representation of the current sliding window to each prototype center, and taking the distance with the smallest value as the nearest prototype distance corresponding to the current sliding window.
[0041] S203, use a dual threshold mechanism to determine the initial state of the current window based on the unknown score.
[0042] Optionally, a dual-threshold mechanism is used to determine the initial state of the current window based on the unknown score, including: when the unknown score is not greater than a first score threshold, the maximum confidence is not less than a confidence threshold, and the nearest prototype distance is not greater than a distance threshold, the initial state of the current window is determined to be a known fault; when the unknown score is not less than a second score threshold, the maximum confidence is less than a confidence threshold, and the nearest prototype distance is greater than a distance threshold, the initial state of the current window is determined to be an unknown fault, wherein the second score threshold is greater than the first score threshold; when the unknown score is between the first score threshold and the second score threshold, the initial state of the current window is determined to be uncertain.
[0043] S204. When the initial state is uncertain, a learning state is constructed based on the fusion vector and the unknown score. Reinforcement learning is performed on the learning state to obtain the final state, and the fault diagnosis result of the UAV is determined based on the final state.
[0044] Optionally, reinforcement learning is performed on the learning state to obtain the final state, including: using a reinforcement learning strategy to perform reinforcement learning on the learning state to select action types, wherein the action types include continuing to observe, outputting known faults, and outputting unknown faults; and determining the final state based on the action types.
[0045] Optionally, the fault diagnosis results of the UAV are determined based on the final state, including: when the final state is a known fault, the known fault type is determined according to the known class probability, the fault severity is determined according to the fault severity probability, and the fault location is determined according to the fault location probability, and the fault type, fault severity, and fault location are used as the fault diagnosis results; when the final state is an unknown fault, an unknown anomaly alarm and risk level are generated, and the unknown anomaly alarm, risk level, and unknown score are used as the fault diagnosis results; when the final state is uncertain corresponding to the continue observation action, a continuous observation prompt is displayed, and the continuous observation prompt is used as the fault diagnosis result.
[0046] S205 checks the fault diagnosis results of the UAV and outputs the fault diagnosis results in a specified manner when the test is passed.
[0047] Specifically, in this implementation, before outputting the fault diagnosis results, the system not only performs basic logical verification on the fault diagnosis results but also performs cross-validation using multi-source data. For example, the fault labels output by the algorithm are compared with the physical risk characteristics of the current UAV (such as vibration, motor imbalance, etc.) to assess the confidence and rationality of the diagnosis. If a logical conflict or low confidence is detected, the system will trigger a second review or automatically downgrade to continuous observation to prevent false alarms. In addition, when the detection passes, different fault diagnosis results will be output in a specified manner. The specified manner should be dynamically adjusted according to the severity and type of the fault and the current state of the UAV. For example, for continuous observation or low-risk anomalies, the system can display them in the form of a regular prompt box through the ground station UI interface or flight control APP; for clear known faults or unknown anomaly alarms, the highest priority output mechanism must be triggered, such as local alarm via audible and visual buzzers or real-time push to the ground command terminal via a high-bandwidth data link.
[0048] After the fault diagnosis is passed, the results are not only displayed but also converted into control commands. For example, the system can directly send the diagnostic results to the flight control computer via the internal communication bus to trigger corresponding safety protection strategies, such as automatic hovering, limiting maximum flight speed, emergency landing, or one-click return to base, thus achieving an automated closed loop from problem detection to problem resolution. In addition, while outputting alarms, the system automatically stores the multivariate flight logs, fused vector features, diagnostic conclusions, and risk levels before and after the alarm trigger locally and simultaneously uploads them to the cloud server. Subsequently, the digital management platform automatically generates maintenance work orders containing fault images, location coordinates, and fault type based on the diagnostic results, accurately dispatching them to the appropriate maintenance personnel, greatly improving the efficiency of subsequent troubleshooting.
[0049] The technical solution of this invention, by constructing a fusion vector that includes health representation and multiple uncertainty measures, combined with a dual threshold mechanism and a reinforcement learning model, can clearly distinguish between known and unknown faults, avoiding misjudgment of unknown faults, thereby significantly improving the timeliness, robustness and engineering safety of diagnosis while ensuring diagnostic accuracy.
[0050] Example 3 Figure 3 This is a schematic diagram of a fault diagnosis device for a drone provided in an embodiment of the present invention. Figure 3 As shown, the device includes: a window-level sample sequence construction module 310, an unknown score determination module 320, an initial state determination module 330, and a fault diagnosis result output module 340.
[0051] Among them, the window-level sample sequence construction module 310 is used to construct window-level sample sequences based on the multivariate flight logs collected during the flight of the UAV, wherein each window-level sample sequence is located in a different sliding window; The unknown score determination module 320 is used to generate a fusion vector for the current sliding window based on the window-level sample sequence, and to determine the unknown score of the current sliding window based on the fusion vector. The fusion vector includes health representation, known class failure probability, maximum confidence, probability entropy, nearest prototype distance and energy score. The initial state determination module 330 is used to determine the initial state of the current window based on the unknown score using a dual threshold mechanism. The initial state includes known faults, unknown faults, or uncertain states. The fault diagnosis result output module 340 is used to construct a learning state based on the fusion vector and unknown score when the initial state is uncertain, perform reinforcement learning on the learning state to obtain the final state, and determine the fault diagnosis result of the UAV based on the final state.
[0052] Optionally, a window-level sample sequence construction module 310 is used to timestamp-align the multivariate flight logs collected during the UAV flight to construct an overall sample sequence; Preprocess the overall sample sequence to obtain the processed sample sequence; The processed sample sequence is segmented using a sliding window to obtain multiple window-level sample sequences arranged in chronological order.
[0053] Optionally, the unknown score determination module 320 includes a fusion vector generation unit for generating a health representation indicating the health status of the window based on the window-level sample sequence for the current sliding window; Based on health representation and logistic regression vector, the output includes known class probability, fault severity probability, and fault location probability. The logistic regression vector is an intermediate parameter generated during the health representation generation process. Calculate the maximum confidence and probability entropy of the current sliding window based on the known class probabilities, and calculate the nearest prototype distance corresponding to the current sliding window based on the health representation and the prototype center distance of each known fault category. The energy score is calculated based on the logistic regression vector, and the health representation, known class probability, maximum confidence, probability entropy, nearest prototype distance and energy score are fused to generate a fused vector.
[0054] Optionally, the fusion vector generation unit is also used to establish a prototype center for each known fault in the health representation space, wherein the prototype center is initialized with the mean of the health representation of the training samples and dynamically updated as a learnable parameter during model training. Calculate the distance from the health representation of the current sliding window to the center of each prototype, and take the distance with the smallest value as the nearest prototype distance for the current sliding window.
[0055] Optionally, the initial state determination module 330 is used to determine the initial state of the current window as a known fault when the unknown score is not greater than the first score threshold, the maximum confidence is not less than the confidence threshold, and the nearest prototype distance is not greater than the distance threshold. When the unknown score is not less than the second score threshold, the maximum confidence is less than the confidence threshold, and the nearest prototype distance is greater than the distance threshold, the initial state of the current window is determined to be an unknown fault, where the second score threshold is greater than the first score threshold. When the unknown score is between the first score threshold and the second score threshold, the initial state of the current window is determined to be uncertain.
[0056] Optionally, the fault diagnosis result determination module 340 includes a final state determination unit, which is used to perform reinforcement learning on the learning state to select the action type using a reinforcement learning strategy, wherein the action type includes continuing to observe, outputting known faults, and outputting unknown faults; The final state is determined based on the type of action.
[0057] Optionally, the fault diagnosis result determination module 340 includes a fault diagnosis result determination unit, which is used to determine the known fault type based on the known class probability, the fault severity based on the fault severity probability, and the fault location based on the fault location probability when the final state is a known fault, and to use the fault type, fault severity and fault location as the fault diagnosis result. When the final state is an unknown fault, an unknown anomaly alarm and risk level are generated, and the unknown anomaly alarm, risk level and unknown score are used as the fault diagnosis result. When the final state is uncertain, corresponding to the "continue observation" action, a "continuous observation" prompt message will be displayed, and this message will be used as the fault diagnosis result.
[0058] The fault diagnosis device for unmanned aerial vehicles (UAVs) provided in this embodiment of the invention can execute the fault diagnosis method for UAVs provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0059] Example 4 Figure 4A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0060] The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.
[0061] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0062] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other electronic devices through computer networks such as the Internet and / or various telecommunications networks.
[0063] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as fault diagnosis methods for unmanned aerial vehicles.
[0064] That is, a window-level sample sequence is constructed based on the multivariate flight logs collected during the flight of the UAV, wherein each window-level sample sequence is located in a different sliding window; A fusion vector is generated for the current sliding window based on the window-level sample sequence, and the unknown score of the current sliding window is determined based on the fusion vector. The fusion vector includes health representation, known class failure probability, maximum confidence, probability entropy, nearest prototype distance, and energy score. The initial state of the current window is determined using a dual threshold mechanism based on the unknown score, wherein the initial state includes known fault, unknown fault, or uncertain state; When the initial state is the uncertain state, a learning state is constructed based on the fusion vector and the unknown score. Reinforcement learning is performed on the learning state to obtain the final state, and the fault diagnosis result of the UAV is determined based on the final state.
[0065] In some embodiments, the drone fault diagnosis method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the drone fault diagnosis method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the drone fault diagnosis method by any other suitable means (e.g., by means of firmware).
[0066] Various embodiments of the apparatuses and techniques described above herein can be implemented in digital electronic circuit devices, integrated circuit devices, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), device-on-a-chip (SoC) devices, complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable device including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage device, at least one input device, and at least one output device, and transmitting data and instructions to the storage device, the at least one input device, and the at least one output device.
[0067] Computer programs used to implement the fault diagnosis method for the UAV of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer or a special-purpose computer, such that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, or as a standalone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0068] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution apparatus, device, or electronic device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage electronics, magnetic storage electronics, or any suitable combination thereof.
[0069] To provide interaction with a user, the devices and techniques described herein can be implemented on an electronic device having: a display device (e.g., a touchscreen) for displaying information to the user; and buttons through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0070] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0071] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A fault diagnosis method for unmanned aerial vehicles (UAVs), characterized in that, The method includes: A window-level sample sequence is constructed based on the multivariate flight logs collected during the UAV flight, wherein each window-level sample sequence is located within a different sliding window; A fusion vector is generated for the current sliding window based on the window-level sample sequence, and the unknown score of the current sliding window is determined based on the fusion vector. The fusion vector includes health representation, known class failure probability, maximum confidence, probability entropy, nearest prototype distance, and energy score. The initial state of the current window is determined using a dual threshold mechanism based on the unknown score, wherein the initial state includes known fault, unknown fault, or uncertain state; When the initial state is the uncertain state, a learning state is constructed based on the fusion vector and the unknown score. Reinforcement learning is performed on the learning state to obtain the final state, and the fault diagnosis result of the UAV is determined based on the final state.
2. The method according to claim 1, characterized in that, The construction of a window-level sample sequence based on the multivariate flight logs collected during the UAV flight includes: Timestamp alignment was performed on the multivariate flight logs collected during the drone's flight to construct an overall sample sequence; The overall sample sequence is preprocessed to obtain the processed sample sequence; The processed sample sequence is segmented using a sliding window to obtain multiple window-level sample sequences arranged in chronological order.
3. The method according to claim 1, characterized in that, The step of generating a fusion vector for the current sliding window based on the window-level sample sequence includes: For the current sliding window, a health representation indicating the window's health status is generated based on the window-level sample sequence. Based on the health characterization and logistic regression vector, output the known class probability, fault severity probability, and fault location probability, wherein the logistic regression vector is an intermediate parameter generated during the generation of the health characterization; The maximum confidence and probability entropy of the current sliding window are calculated based on the known class probabilities, and the nearest prototype distance corresponding to the current sliding window is calculated based on the health representation and the prototype center distance of each known fault category. The energy score is calculated based on the logistic regression vector, and the health representation, the known class probability, the maximum confidence, the probability entropy, the nearest prototype distance, and the energy score are fused to generate the fused vector.
4. The method according to claim 3, characterized in that, The calculation of the nearest prototype distance corresponding to the current sliding window based on the health characteristics and the prototype center distances for each known fault category includes: In the health representation space, a prototype center is established for each known fault. The prototype center is initialized with the mean of the health representation of the training samples and dynamically updated as a learnable parameter during model training. Calculate the distance from the health representation of the current sliding window to each prototype center, and take the distance with the smallest value as the nearest prototype distance corresponding to the current sliding window.
5. The method according to claim 1, characterized in that, The step of determining the initial state of the current window using a dual threshold mechanism based on the unknown score includes: When the unknown score is not greater than the first score threshold, the maximum confidence level is not less than the confidence level threshold, and the nearest prototype distance is not greater than the distance threshold, then the initial state of the current window is determined to be the known fault. When the unknown score is not less than the second score threshold, the maximum confidence is less than the confidence threshold, and the nearest prototype distance is greater than the distance threshold, the initial state of the current window is determined to be the unknown fault, wherein the second score threshold is greater than the first score threshold; When the unknown score is between the first score threshold and the second score threshold, the initial state of the current window is determined to be uncertain.
6. The method according to claim 3, characterized in that, The step of performing reinforcement learning on the learning state to obtain the final state includes: A reinforcement learning strategy is used to select action types for the learning state, wherein the action types include continuing to observe, outputting a known fault, and outputting an unknown fault; The final state is determined based on the action type.
7. The method according to claim 6, characterized in that, The determination of the UAV's fault diagnosis result based on the final state includes: When the final state is the known fault, the known fault type is determined according to the known class probability, the fault severity is determined according to the fault severity probability, the fault location is determined according to the fault location probability, and the fault type, the fault severity, and the fault location are used as the fault diagnosis result. When the final state is the unknown fault, an unknown anomaly alarm and a risk level are generated, and the unknown anomaly alarm, the risk level, and the unknown score are used as the fault diagnosis result; When the final state is uncertain as corresponding to the continued observation action, a continuous observation prompt message is displayed, and the continuous observation prompt message is used as the fault diagnosis result.
8. A fault diagnosis device for unmanned aerial vehicles (UAVs), characterized in that, The device includes: A window-level sample sequence construction module is used to construct window-level sample sequences based on multivariate flight logs collected during UAV flight, wherein each window-level sample sequence is located within a different sliding window; The unknown score determination module is used to generate a fusion vector for the current sliding window based on the window-level sample sequence, and determine the unknown score of the current sliding window based on the fusion vector. The fusion vector includes health representation, known class failure probability, maximum confidence, probability entropy, nearest prototype distance, and energy score. The initial state determination module is used to determine the initial state of the current window based on the unknown score using a dual threshold mechanism, wherein the initial state includes known fault, unknown fault, or uncertain state; The fault diagnosis result determination module is used to construct a learning state based on the fusion vector and the unknown score when the initial state is the uncertain state, perform reinforcement learning on the learning state to obtain the final state, and determine the fault diagnosis result of the UAV based on the final state.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A storage medium for computer-executable instructions, wherein a computer program is stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
