A rotorcraft fault diagnosis method based on physical guidance neural network and extended Kalman filter

By combining physical-guided neural networks with extended Kalman filtering, the problems of insufficient data and environmental adaptability in rotorcraft fault diagnosis are solved, and efficient fault identification and classification in complex environments are achieved.

CN121115726BActive Publication Date: 2026-06-23HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH
Filing Date
2025-09-28
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing deep learning-based rotorcraft fault diagnosis methods have not performed well in practical applications, mainly because training data is difficult to obtain and the simulation environment differs greatly from the actual environment, resulting in insufficient accuracy of the model in complex noise and nonlinear environments.

Method used

By combining a physical-guided neural network with an extended Kalman filter, multi-source sensor data is processed through a sliding window. The neural network dynamically estimates the observation noise covariance matrix, and the extended Kalman filter is used for state estimation and fault classification. Diagnostic features are extracted for fault judgment.

Benefits of technology

It performs well with limited data, exhibits better robustness and adaptability, and can accurately identify faults in complex environments, thus improving the accuracy and precision of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121115726B_ABST
    Figure CN121115726B_ABST
Patent Text Reader

Abstract

The application discloses a rotorcraft fault diagnosis method based on a physically guided neural network and an extended Kalman filter, and belongs to the technical field of aircraft fault diagnosis. In order to solve the problem that the actual effect of the existing rotorcraft fault diagnosis method based on deep learning needs to be improved, flight data in a sliding window is input into an encoder to obtain latent observations, a neural network is used to dynamically estimate the covariance matrix of observation noise, a physically guided neural network is used to predict prior state estimation values and a prior estimation error covariance matrix, and then an extended Kalman filter is used to filter to obtain posterior state estimation values. In each filtering cycle, features used for rotorcraft system fault classification are extracted, and after the entire input sequence is processed, the features collected at each time step are stacked into a feature sequence and sent to a classifier to obtain rotorcraft fault classification results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of aircraft fault diagnosis technology, and specifically relates to a method for diagnosing faults in rotorcraft. Background Technology

[0002] In recent years, with the rapid development of the low-altitude economy and the continuous advancement of related technologies such as microelectromechanical systems (MEMS), flight control, and wireless communication, multirotor aircraft have been increasingly widely used in social production and public services. Due to their advantages such as vertical takeoff and landing, free hovering, and compact size and maneuverability, multirotor aircraft have played a crucial role in typical low-altitude economic scenarios such as fire rescue, short-haul transportation, and power line inspection. However, multirotor aircraft are typical underactuated unstable systems, exhibiting dynamic characteristics with multivariable coupling and strong nonlinearity, making flight control challenging. In complex and variable operating environments, aircraft are highly susceptible to external interference, leading to various types of malfunctions that may result in mission interruptions, crashes, property damage, and even casualties. As the scale of the low-altitude economy continues to expand, the operational density and mission complexity of aircraft are constantly increasing, placing higher demands on the safety and stability of aircraft systems. Therefore, timely detection and handling of malfunctions during flight are of great significance for ensuring the healthy development of the low-altitude economy. This requires fault diagnosis technology for aircraft systems to perform real-time monitoring, quickly and accurately locate faults, and implement fault-tolerant control measures to ensure the safe operation of aircraft.

[0003] Currently, methods applied to fault diagnosis of multirotor aircraft systems are mainly divided into two types: model-based methods and data-driven methods. Model-based methods rely on accurate mathematical models, among which the Kalman filter is widely used as a state-optimal estimation method. However, the standard Kalman filter is based on the linear Gaussian assumption, and its estimation accuracy is significantly affected when dealing with complex nonlinear systems. Although the extended Kalman filter improves nonlinear problems to some extent, it is still difficult to obtain accurate state estimation results under conditions with complex noise, model uncertainty, and strong nonlinearity.

[0004] In contrast, data-driven methods do not rely on mathematical models. Instead, they extract data features from various sensor data of the UAV and use algorithms such as deep learning to learn system data for fault diagnosis. These methods are better suited to the complex dynamic characteristics of multi-rotor UAV systems and avoid modeling errors. However, diagnostic models based on deep learning algorithms require training with a large amount of high-quality data. Because multi-rotor aircraft experience diverse fault types and complex application scenarios in actual operation, comprehensive and realistic flight data is difficult to obtain. While professional software simulations can easily generate a large number of samples, the simulation environment often cannot simulate the various environmental disturbances and complex noise effects of the real system compared to actual flight conditions. The resulting data differs significantly from actual data, leading to poor practical application of the trained diagnostic models and greatly limiting the application of data-driven methods in UAV fault diagnosis design. Summary of the Invention

[0005] This invention aims to address the problem that existing deep learning-based rotorcraft fault diagnosis methods have limited practical effectiveness.

[0006] A fault diagnosis method for rotorcraft based on a physical guided neural network and extended Kalman filter includes the following steps:

[0007] Based on multi-source sensor data from a rotorcraft, an input data sequence is obtained through a sliding window. The data within the sliding window is then input into an encoder for encoding to obtain the potential observations. Using neural networks Dynamically estimate the covariance matrix of observation noise ;Utilizing physics-guided neural networks Predicting the prior state estimate and the prior estimation error covariance matrix , It includes a state estimation model unit based on the kinematics and dynamics formulas of the aircraft and a neural network model unit. The state estimation model is used to obtain the preliminary state estimation results of the aircraft, which are then fed into the neural network model unit to obtain the final state. and ;according to , , and The extended Kalman filter is used to obtain the posterior state estimate. ;

[0008] In each filtering loop, features for fault classification of the rotorcraft system are extracted, including: posterior state, diagonal elements of the posterior estimation error covariance matrix, innovation, and normalized innovation squared. After the entire input sequence is processed, the features collected at each time step are stacked into a feature sequence and fed into the final classifier to obtain the rotorcraft fault classification result.

[0009] Furthermore, the obtained potential observations The encoder uses a neural network consisting of two LSTM layers.

[0010] Furthermore, utilizing neural networks Dynamically estimate the covariance matrix of observation noise The process includes:

[0011] The hidden state at the previous moment and the potential observation at the current moment The predicted observations obtained from the state variables difference As input, network-based processing yields the covariance matrix of the observation noise. ; Do not output directly Instead of outputting all elements, it outputs the constituent elements. The Choreski decomposition factor, i.e., a lower triangular matrix. The elements, through To obtain the covariance matrix of the observation noise .

[0012] Furthermore, the neural network It includes an LSTM network and a fully connected layer fc; where fc linearly transforms the output of the LSTM network into elements of a lower triangular matrix.

[0013] Furthermore, The neural network model unit in the middle is obtained and The process includes:

[0014] The first network module in the neural network model unit takes the preliminary state estimate of the aircraft as input, and obtains the correction term of the preliminary state estimate, i.e., the residual, based on network processing. The preliminary state estimate and the correction are added together to obtain the prior state estimate. ;

[0015] The second network module in the neural network model unit is As input, network-based processing yields the prior estimation error covariance matrix. The second network module does not output directly. Instead of outputting all elements, it outputs the constituent elements. The Choreski decomposition factor, i.e., a lower triangular matrix. ,pass To obtain the prior estimation error covariance matrix .

[0016] Furthermore, The first network module in the neural network model unit includes an LSTM network and a fully connected layer, and the second network module includes an LSTM network and a fully connected layer.

[0017] Furthermore, the state quantity estimation model unit established based on the kinematic and dynamic formulas of the aircraft is as follows:

[0018]

[0019]

[0020]

[0021]

[0022]

[0023]

[0024]

[0025]

[0026]

[0027] in, Represents the time step. In order to be in The position vector at time , Is The velocity vector at time t, Represents the total mass of the aircraft. Represents the vector of gravitational acceleration. Representative at The attitude quaternion at time, Representative at Angular velocity vector at time t, The moment of inertia matrix represents the rotation of the aircraft; It is a rotation matrix generated by quaternions, used to transform vectors from the body coordinate system to the world coordinate system; It is a quaternion kinematic matrix generated by angular velocity; Representing the Each motor The thrust generated at every moment; and The first The efficiency coefficient and control input of each motor; It is the resultant thrust vector generated by all motors. It is the vector of the resultant torque generated by all motors; This represents the control allocation matrix, which maps the thrust of each motor to the total torque. This represents the gyroscope bias at any given time. This represents the bias of the accelerometer at a given time. and Typically, it is Gaussian white noise.

[0028] Furthermore, according to , , and The extended Kalman filter is used to obtain the posterior state estimate. During the process, the state is updated based on the calculated Kalman gain to obtain the posterior state estimate. ,in For Kalman gain, It is a linear measurement matrix.

[0029] Furthermore, during the filtering process using extended Kalman filtering, the innovation is the latent observation. Compared with predicted observations difference Predicted observations From prior state estimates With linear measurement matrix Multiply them to get the result.

[0030] Furthermore, encoders and neural networks used in the troubleshooting of rotorcraft malfunctions... and neural networks It is pre-trained, the encoder and neural network. and neural networks The entire process is trained together, and the loss function used during training is... ,in For loss weights; For classifying losses, , The losses corresponding to the prior state estimate, the posterior state estimate, and the actual state data under the healthy state are as follows:

[0031]

[0032]

[0033] in, For the true value of the state variable, , These are optional parameters; For the corresponding prior state estimate, i.e. ; This corresponds to the posterior state estimate, i.e. .

[0034] The rotorcraft fault diagnosis method proposed in this invention, based on a hybrid model combining extended Kalman filtering and neural networks, has the following advantages:

[0035] 1. This invention proposes a hybrid network that combines deep learning with an extended Kalman filter structure. Completely "black box" neural networks require a large amount of data to ensure effective learning. This invention simplifies the task of the neural network by embedding a known physical model, and it only needs to learn the errors of the physical model or unmodeled dynamic characteristics. This allows the model to perform well even with limited data and exhibits better robustness.

[0036] 2. The model of this invention has a certain degree of interpretability. The dimensions of the network output have real physical meaning, and the correction term of the neural network output can also indicate the uncertainty of the model's prediction. If this correction term is consistently large, it indicates that the predicted output deviates significantly from reality. Therefore, this invention can better understand the fault diagnosis effect of rotorcraft.

[0037] 3. Traditional EKF uses manually adjusted, fixed Q and R matrices. This invention, however, learns the distribution of these noises through a network, giving the model a degree of adaptability. For example, the model performs more robustly in situations where sensors may be less reliable during high-speed flight, or where uncertainty in state prediction increases during severe maneuvers.

[0038] The effectiveness of the invention was verified using real datasets. The results show that the invention has good performance, with an accuracy of 95.85%, a precision of 0.9622, and an F1 score of 0.9586. Attached Figure Description

[0039] Figure 1 A flowchart for malfunction diagnosis of rotary-wing aircraft;

[0040] Figure 2 This is a schematic diagram of a network structure that combines deep learning with an extended Kalman filter. Detailed Implementation

[0041] This invention proposes a physical information neural network method that combines deep learning with an extended Kalman filter structure. While reducing the model's training data requirements, it also improves the model's adaptability to complex real-world environments through dynamic estimation of uncertainty matrices such as process noise. Detailed descriptions of specific implementation methods follow.

[0042] Specific implementation method one: Combining Figure 1 and Figure 2 This implementation method is described below.

[0043] This embodiment is a fault diagnosis method for rotorcraft based on a physical guided neural network and an extended Kalman filter, including the following steps:

[0044] Step 1: Preprocess the raw data and build training and testing data loaders. The role of the data loader is to preprocess the data and feed the preprocessed data into the model in batches, shuffled, and in parallel to ensure the efficiency and stability of the training process. The specific process includes:

[0045] Step A1: Preprocess the raw flight data.

[0046] Load data from the dataset file and separate sensor data and control input data according to preset column names.

[0047] The dataset is divided into training and testing sets based on time series data. Time series data is a set of data points collected in chronological order; it not only contains the numerical values ​​themselves, but also exhibits patterns and dependencies in their evolution over time. Sensor data and control input data from quadcopters are examples of time series data.

[0048] Step A2: Normalize all data except for the fault category label, scaling it to the range of 0 to 1. Then, use a sliding window function to convert the continuous time series data into a sample format suitable for neural network learning. In some embodiments, the sliding window is fixed at 25, and the window always contains 25 consecutive elements. Starting from the beginning of the data sequence, it slides one element to the right each time until the entire sequence has been traversed.

[0049] The system will eventually return the processed training and testing data. After processing, this data will be packaged into a DataLoader for batch processing.

[0050] Step 2: Construct a hybrid structure comprising an encoder, a process noise prediction network, and physical model constraints. The encoder maps the high-dimensional input to the latent space; the process noise prediction network dynamically estimates the observation noise covariance; the physical model is combined with an LSTM (Long Short-Term Memory) network to generate prior state estimates and uncertainty estimates; the physical prediction and neural network corrections are fused to obtain the prior state and prior estimate error covariance matrix. Then, combining the observation and measurement noise covariance, innovation and Kalman gain are calculated to update the state, ultimately obtaining the posterior state and posterior covariance; the posterior state, uncertainty index, innovation, and consistency statistics are extracted as diagnostic features in the filtering loop, forming a time-series feature input classifier; the classifier distinguishes fault types and outputs the probability distribution and loss function through Softmax for training and diagnostic decision-making.

[0051] More specifically, it includes the following steps:

[0052] Step B1: Construct an encoder network to compress high-dimensional input into a low-dimensional latent space, so that the low-dimensional representation of high-dimensional sensor data in this latent space serves as the latent observation. It is linearly related to the state variables, thus avoiding the linearization of the nonlinear observation function.

[0053] The encoder network in this embodiment employs two LSTM layers. The original high-dimensional input sequence is fed into the first LSTM layer and transformed into a lower-dimensional hidden state sequence; the second LSTM layer processes this intermediate sequence, mapping it to an even lower-dimensional latent space.

[0054] In some embodiments, the state variables adopt 22 states in the physical discrete model, including position (3D), velocity (3D), attitude quaternion (4D), three-axis angular velocity (3D), accelerometer bias (3D), gyroscope bias (3D), and four motor efficiency coefficients (4D).

[0055] Step B2: Construct the covariance matrix for dynamically estimating observation noise. Process noise prediction neural network .

[0056] R_net consists of an LSTM network and a fully connected layer fc. The LSTM-3 in the model uses the hidden state from the previous time step and the latent observations from the current time step. With predictive observations The difference (predicted from state variables) As input, fc linearly transforms the output of the LSTM network into elements of a lower triangular matrix; LSTM was introduced to find temporal sequential dependencies in sensor data, enabling the determination of dependencies based on observation differences. The measurement uncertainty is dynamically estimated and used as the covariance matrix of the observation noise in the extended Kalman filter. It participates in subsequent Kalman gain calculations and state updates. Do not directly output the covariance matrix Instead of outputting all elements, it outputs the constituent elements. The Cholesky decomposition factor, i.e., a lower triangular matrix. The elements are used to mathematically guarantee that the covariance matrix is ​​symmetric and positive definite. This is achieved through calculation... To obtain the covariance matrix. To ensure the matrix... It is strictly positive definite. During computation, a very small positive number is added to its diagonal, ultimately allowing us to return a reliable, dynamically changing value. matrix.

[0057] It should be noted that the Kalman filter processes data at a single moment, while the input data is in the form of a time sliding window. Therefore, it is necessary to process the data at each moment within each window one by one.

[0058] Step B3: Based on physical knowledge and the LSTM network, a method for predicting prior state estimates and prior estimation error covariance matrix is ​​constructed. Matrix network The specific process includes:

[0059] First, a rough estimation model of the state variables is established based on the kinematic and dynamic formulas of the aircraft:

[0060]

[0061]

[0062]

[0063]

[0064]

[0065]

[0066]

[0067]

[0068]

[0069] in, Represents the time step. In order to be in The position vector at time , Is The velocity vector at time t, Represents the total mass of the aircraft. Represents the vector of gravitational acceleration. Representative at The attitude quaternion at time, Representative at Angular velocity vector at time t, The moment of inertia matrix represents the rotation of the aircraft; It is a rotation matrix generated by quaternions, used to transform vectors from the body coordinate system to the world coordinate system. It is a quaternion kinematic matrix generated by angular velocity. Representing the Each motor The thrust generated at any moment. and The first The efficiency coefficient and control input of each motor. It is the resultant thrust vector generated by all motors. It is the resultant torque vector generated by all motors. This represents the control allocation matrix, which maps the thrust of each motor to the total torque. This represents the bias of the gyroscope at any given time. This represents the bias of the accelerometer at time t. and Typically, it is Gaussian white noise.

[0070] It should be noted that the motor efficiency coefficient *c* indirectly affects the aircraft's dynamics by acting on the thrust. The thrust is determined by both the motor efficiency coefficient and the control input, and further affects the resultant force of the aircraft, thus influencing the velocity calculation at the next moment in the discrete physical model. Simultaneously, the thrust also affects the resultant torque of the airframe, thereby determining the angular velocity in the discrete physical model at the next moment. However, the thrust, resultant torque, and resultant thrust of the four motors are not modeled as state variables of the system. In other embodiments, other forms of state variables can be used to roughly estimate the model.

[0071] In this part of the network, state variables are used to coarsely estimate the physical model, resulting in a preliminary state estimate based on physical laws. Simultaneously, an LSTM network (LSTM-1) is constructed, using this preliminary state estimate as input. The output of the LSTM-1 network is fed into a fully connected layer, and then the correction term for the physical prediction, i.e., the residual, is calculated. The correction term represents the residual between the true value and the discrete physical model. Adding the initial state estimate and the correction term yields the prior state estimate. .

[0072] The difference between the prior state estimates and the actual state variables is used as the loss function during the training of the overall network model.

[0073]

[0074] in, For the true value of the state variable, For the corresponding prior state estimate, i.e. ; These are optional parameters.

[0075] Will As input to the LSTM-2, the output of the LSTM-2 passes through a fully connected layer. The output of the fully connected layer is the element used to construct the prior estimation error covariance matrix. This set of values ​​is then used to construct a lower triangular matrix. And ensure that its diagonal elements are positive. Finally, through Calculate the prior estimation error covariance matrix. This matrix describes the uncertainty or confidence level of the model in the prior state estimates. The larger the value on the diagonal, the more uncertain the prediction for that state component.

[0076] Step B4: Accept the latent observations obtained from the encoder and The obtained prior state estimates are then used to predict the observations. The step of fusing the state estimate with the latent observations embodies the core idea of ​​Kalman filtering.

[0077] First, through a fixed linear measurement matrix Mapping the prior state estimate to the latent space, i.e., the observation space, involves mapping the prior state estimate to the linear measurement matrix. Multiply to obtain the predicted observations In a traditional extended Kalman filter, the matrix... The Jacobian matrix of the observation function maps the prior state estimate to the observation space and compares it with the latent observations to calculate the residuals. Subsequently, in the update step, the prior estimate and residuals are used to correct for the posterior state estimate. In this invention, because an encoder is used to reduce the dimensionality of the sensor data, the process of linearizing the observation function is bypassed. A matrix can be simplified to a linear matrix, such as the identity matrix, whose dimension is determined by the dimension reduction space dimension of the encoder output.

[0078] Then, the network It will be based on the difference between the latent observations obtained by dimensionality reduction by the encoder network and the predicted observations. Dynamically estimate the covariance matrix of the observation noise at the current time. .

[0079] Calculating new information, i.e., potential observations (Originated from high-dimensional sensor data through encoder network dimensionality reduction) and predicted observations (from prior state estimates and linear measurement matrix) The difference (obtained by multiplication) Combined with prior estimation of the error covariance matrix Covariance matrix with observation noise To calculate the covariance of the new information.

[0080] Then, the Kalman gain is calculated using the formula:

[0081]

[0082] This gain is used to weigh the importance of prior predictions against innovation.

[0083] By correcting the state, the posterior state estimate is obtained: the state is updated based on the calculated Kalman gain to obtain the posterior state estimate.

[0084]

[0085] The posterior estimation error covariance matrix is ​​updated accordingly. In traditional extended Kalman filtering, the partial derivative matrix (i.e., the Jacobian matrix) of the state transition function is used to predict the prior estimation error covariance matrix.

[0086]

[0087] in, yes The Jacobian matrix of the state transition function at time t. This is the process noise matrix. The prior estimate error covariance matrix reflects the uncertainty of the current prediction.

[0088] After calculating the Kalman gain during the update phase, the posterior estimation error covariance matrix is ​​then updated based on the Kalman gain and the prior estimation error covariance matrix.

[0089]

[0090] in The prior estimation error covariance matrix, as the posterior estimation error covariance matrix, reflects the uncertainty of the corrected state estimate. However, in this invention, the prior estimation error covariance matrix... The posterior estimation error covariance matrix is ​​updated directly from the network prediction, and the update is the same as in the traditional Kalman filter. For Kalman gain, It is an identity matrix.

[0091] During the training of the overall network model, the loss is calculated using posterior state estimates and the actual state data under healthy conditions. The loss function is as follows:

[0092]

[0093] in, For the true value of the state variable, This corresponds to the posterior state estimate, i.e. ; These are optional parameters.

[0094] After estimating the posterior state, fault classification is performed based on a portion of the overall network model's output. In each filtering loop, the neural network not only updates the state but also extracts a set of features for rotorcraft system fault classification. These features include: the posterior state, the diagonal elements of the posterior estimation error covariance matrix (representing the uncertainty of each state component), the innovation (representing the deviation between prediction and reality, obtained through Kalman filtering), and the normalized squared innovation (a statistic measuring model consistency). After processing the entire input sequence, the features collected at each time step are stacked into a feature sequence and fed into the final classifier. This classifier analyzes the evolution patterns of these diagnostic features throughout the time window to make the final judgment on the system fault and outputs the rotorcraft fault classification result.

[0095] During training, the cross-entropy loss function is used to calculate the loss. The loss function is defined as follows:

[0096]

[0097] in For predicted fault labels, This is a genuine fault label.

[0098] This part tightly couples state estimation with fault diagnosis, using the internal variables generated during the filtering process as the basis for diagnosis. This differs from the traditional method of separating the two, thus achieving more accurate and robust diagnostic performance.

[0099] Finally, the total loss is defined as:

[0100]

[0101] in The network optimizes by minimizing the total loss, corresponding to the weights of the loss. After training, the network model's parameters are saved.

[0102] Step 3: Initialize network parameters, set the hyperparameters involved in training the neural network, and begin training; the specific process includes:

[0103] Step C1: Initialize network parameters, set an appropriate number of training epochs, and ensure the learning rate roughly meets the network's fitting requirements. Set the training batch size and maximum number of training epochs. After all training-related hyperparameters are set, begin training.

[0104] Step C2: If the classification accuracy remains relatively stable before the network reaches the maximum number of training rounds set, the network is considered to have converged, and the network parameters trained at this time are saved.

[0105] Step 4: Test the trained model and calculate performance metrics.

[0106] Perform the same processing on the test set data as on the training set. Calculate the classification results, including accuracy, F1 score, precision, and other metrics.

[0107] The RflyMAD public dataset contains 11 common faults across 6 flight states, including faults related to actuators (such as motors and propellers), sensors (such as accelerometers, gyroscopes, magnetometers, barometers, and GPS), and various environmental interferences. In this invention, the data used consists of real flight data samples, categorized into four types: fault-free state, motor fault, accelerometer fault, and GPS fault. Each fault type contains 868 data samples, totaling 3543 data samples.

[0108] Step 1:

[0109] Step A1: Read data from the original file, select 26 features, including features from flight sensors (such as accelerometer, gyroscope, magnetometer, and barometer data), actuator outputs (motor speed), and flight status information (such as the aircraft's position, velocity, and attitude), as features for the high-dimensional observation input data. Select the aircraft's position vector ( (axis, 3D), velocity vector () Axis (3D), quaternion (4D), motor efficiency coefficient (four motors, 4D), and bias of accelerometer and gyroscope ( The state vector is composed of 22 features (all axes are 3D), and the control inputs of four motors are selected as the input vectors. A moving average of size 20 is applied to smooth the data to reduce noise.

[0110] Step A2 involves normalizing and hot-coding the source and target domain data. Data normalization scales the feature values ​​to the range of 0 to 1. Numerical category labels are converted into binary vectors using a function, aiding the model in learning more effectively. Then, a sliding window function converts the continuous time-series data into a sample format suitable for neural network learning, using a fixed-length (25) input window corresponding to a state window of the same length, ultimately returning the processed training and testing data. After processing, this data is encapsulated into a DataLoader for batch processing.

[0111] Step 2:

[0112] Step B1: Construct an encoder network to compress high-dimensional input observation data into a low-dimensional latent space. The encoder consists of two LSTM layers. The original 26-dimensional observation input sequence is input into the first LSTM layer and transformed into a lower-dimensional hidden state sequence. The second LSTM layer processes this intermediate sequence, mapping it to an even lower-dimensional latent space, namely a 6-dimensional observation vector. The row dimension of the matrix should match the output dimension of the encoder (mapping the first 6 dimensions of the state to the observation space, comparing it with the dimensionality-reduced latent observations), and the column dimension should match the dimension of the state variables. .

[0113] Step B2: Constructing the process noise matrix prediction network It is used to dynamically estimate the covariance matrix of the observed noise based on the current system state. An LSTM layer receives its hidden state from the previous time step and the features extracted at the current time step. As input, LSTM is introduced to capture the temporal sequence dependencies of IMU data, enabling dynamic changes and real-time adjustments to the covariance matrix based on the noise characteristics of the current data. The input dimension of an LSTM network is the same as the dimension of the observation vector, which is 6 dimensions. The output is... The dimensions of the lower triangular matrix. Do not directly output the covariance matrix Instead of outputting all elements, it outputs the constituent elements. The Cholesky decomposition factor, i.e., a lower triangular matrix. The elements are used to mathematically guarantee that the covariance matrix is ​​symmetric and positive definite. This is achieved through calculation... To obtain the covariance matrix. To ensure the matrix... It is strictly positive definite. During computation, a very small positive number is added to its diagonal, ultimately allowing us to return a reliable, dynamically changing value. matrix.

[0114] Step B3: Based on physical knowledge and an LSTM network, a network was constructed to predict prior state estimates and the P matrix. First, a rough estimation model of the state variables was established based on the kinematics and dynamics formulas of the aircraft.

[0115] In the network, this model is used to derive preliminary state estimates based on physical laws. The LSTM network has an input dimension of 26, consisting of a 22-dimensional state vector and a 4-dimensional control input vector concatenated together.

[0116] Step B4: In this step, the model receives the latent observations obtained from the encoder and The core idea of ​​Kalman filtering is to make prior predictions of the state variables and then fuse these predictions with actual observations to correct the state estimate. First, a fixed measurement matrix is ​​used... Mapping the real state to the observation space yields the real observations. Then, another is used for prediction. The neural network module of the matrix dynamically estimates the covariance matrix of the observation noise at the current time step based on the predicted observations. The model then calculates the innovation, i.e., the difference between the true latent observation and the predicted observation, and combines the prior estimation error covariance matrix and the measurement noise covariance to calculate the covariance of the innovation. The model can then calculate the Kalman gain, which is used to weigh the importance of prior predictions and innovation. Finally, by correcting the state, the posterior state is obtained, and the posterior covariance matrix is ​​updated accordingly. The loss is calculated using the posterior state and the true state data in the healthy state, with the following loss function:

[0117]

[0118] in For real data samples, For the corresponding predicted value, This is an optional parameter, and it is selected as 1 in this invention.

[0119] After predicting the posterior state, final diagnostic feature extraction and sequence classification are required. In each filtering loop, the model not only updates the state but also extracts a set of diagnostic features for the system. These features are composed of four parts: the posterior state, the diagonal elements of the posterior covariance matrix (representing the uncertainty of each state component), the innovation (representing the deviation between the prediction and the actual situation), and the normalized squared innovation (a statistic measuring model consistency). After the entire input sequence is processed, the features collected at each time step are stacked into a feature sequence and fed into the final classifier module. The classifier module consists of an LSTM layer and a fully connected layer, with an input dimension of 51 and an output dimension of 6. The classifier analyzes the evolution pattern of these diagnostic features throughout the time window to make the final judgment on system faults and outputs the classification result. The Softmax function is then used to calculate the probability value of each class and simultaneously calculate the loss function. The loss function is defined as follows:

[0120]

[0121] in The actual label value. To predict label values.

[0122] This part tightly couples state estimation with fault diagnosis, using the internal variables generated during the filtering process as the basis for diagnosis. This differs from the traditional method of separating the two, thus achieving more accurate and robust diagnostic performance.

[0123] Step three specifically includes:

[0124] Step C1: Initialize network parameters. Set the hyperparameters for the training process. The training adopts the batch iteration method, with the batch size set to 64, the maximum number of training rounds set to 20, the learning rate set to 0.01, and the Adam optimizer used.

[0125] In step C3, if the classification accuracy remains relatively stable before the network reaches the maximum number of training rounds set, the network is considered to have converged, and the trained network parameters are saved.

[0126] Step four specifically includes:

[0127] The test set data was processed in the same way as the training set. Performance metrics such as accuracy, precision, and F1 score were calculated. The test results are shown in Table 1.

[0128] Table 1 Experimental Classification Results

[0129]

[0130] As can be seen from the table above, the method of the present invention improves in all three evaluation indicators: accuracy, precision, and F1 score.

[0131] This invention may have other embodiments. Without departing from the spirit and essence of this invention, those skilled in the art can make various corresponding changes and modifications according to this invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.

[0132] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering, characterized in that, Includes the following steps: Based on multi-source sensor data from a rotorcraft, an input data sequence is obtained through a sliding window. The data within the sliding window is then input into an encoder for encoding to obtain the potential observations. Using neural networks Dynamically estimate the covariance matrix of observation noise ; Utilizing physics-guided neural networks Predicting the prior state estimate and the prior estimation error covariance matrix , It includes a state estimation model unit based on the kinematics and dynamics formulas of the aircraft and a neural network model unit. The state estimation model is used to obtain the preliminary state estimation result of the aircraft, which is then fed into the neural network model unit. The first network module in the neural network model unit takes the preliminary state estimation result of the aircraft as input, and obtains the correction term of the preliminary state estimation result, i.e., the residual, based on network processing. The preliminary state estimate and the correction are added together to obtain the prior state estimate. The second network module in the neural network model unit is... As input, network-based processing yields the prior estimation error covariance matrix. The second network module does not output directly. Instead of outputting all elements, it outputs the constituent elements. The Choreski decomposition factor, i.e., a lower triangular matrix. ,pass To obtain the prior estimation error covariance matrix ;according to , , and The extended Kalman filter is used to obtain the posterior state estimate. ; In each filtering loop, features for fault classification of rotorcraft systems are extracted, including: posterior state, diagonal elements of the posterior estimation error covariance matrix, innovation, and normalized innovation squared. After the entire input sequence has been processed, the features collected at each time step are stacked into a feature sequence and fed into the final classifier to obtain the rotorcraft fault classification result.

2. The method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering as described in claim 1, characterized in that, The potential observations obtained The encoder uses a neural network consisting of two LSTM layers.

3. The method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering as described in claim 1, characterized in that, Using neural networks Dynamically estimate the covariance matrix of observation noise The process includes: The hidden state at the previous moment and the potential observation at the current moment The predicted observations obtained from the state variables difference As input, network-based processing yields the covariance matrix of the observation noise. ; Do not output directly Instead of outputting all elements, it outputs the constituent elements. The Choreski decomposition factor, i.e., a lower triangular matrix. The elements, through To obtain the covariance matrix of the observation noise .

4. The method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering as described in claim 3, characterized in that, The neural network It includes an LSTM network and a fully connected layer fc; where fc linearly transforms the output of the LSTM network into elements of a lower triangular matrix.

5. The method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering according to claim 1, characterized in that, The first network module in the neural network model unit includes an LSTM network and a fully connected layer, and the second network module includes an LSTM network and a fully connected layer.

6. The method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering according to claim 1, characterized in that, The state quantity estimation model unit established based on the kinematic and dynamic formulas of the aircraft is as follows: , , , , , , , , , in, Represents the time step. In order to be in The position vector at time , Is The velocity vector at time t, Represents the total mass of the aircraft. Represents the gravitational acceleration vector. Representative at The attitude quaternion of time, Representative at Angular velocity vector at time t, The moment of inertia matrix represents the rotation of the aircraft; It is a rotation matrix generated by quaternions, used to transform vectors from the body coordinate system to the world coordinate system; It is a quaternion kinematic matrix generated by angular velocity; Representing the Each motor The thrust generated at every moment; and The first Each motor Efficiency coefficient and control input at any given time; It is the resultant thrust vector generated by all the motors. It is the vector of the resultant torque generated by all motors; This represents the control allocation matrix, which maps the thrust of each motor to the total torque. Representative at The bias of the time-of-flight gyroscope; Representative at The bias of the accelerometer at any given moment; and Typically, it is Gaussian white noise.

7. A method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering according to any one of claims 1 to 6, characterized in that, according to , , and The extended Kalman filter is used to obtain the posterior state estimate. During the process, the state is updated based on the calculated Kalman gain to obtain the posterior state estimate. ,in For Kalman gain, It is a linear measurement matrix.

8. The method for diagnosing rotorcraft faults based on a physical-guided neural network and extended Kalman filtering according to claim 7, characterized in that, In the process of filtering using the extended Kalman filter, the innovation is the latent observation. Compared with predicted observations difference Predicted observations From prior state estimates With linear measurement matrix Multiply them to get the result.

9. The method for diagnosing rotorcraft faults based on a physical guided neural network and extended Kalman filter according to claim 7, characterized in that, Encoders and neural networks used in the troubleshooting of rotorcraft and neural networks It is pre-trained, the encoder and neural network. and neural networks The entire process is trained together, and the loss function used during training is... ,in For loss weights; For classifying losses, , The losses corresponding to the prior state estimate, the posterior state estimate, and the actual state data under the healthy state are as follows: , , in, For the true value of the state variable, , These are optional parameters; For the corresponding prior state estimate, i.e. ; This corresponds to the posterior state estimate, i.e. .

Citation Information

Patent Citations

  • Distribution transformer monitoring and early warning device and method based on uncertainty information fusion

    CN114111892A

  • Fault diagnosis method for aircraft attitude control system actuator

    CN117539227A