Laser gyroscope slowly-varying fault diagnosis method based on variational auto-encoder
Through the combination of wavelet packet denoising processing and variational autoencoder, the complexity of slowly changing fault diagnosis of laser gyroscope is solved, accurate detection of slowly changing faults is achieved, the robustness and real-time performance of the system are improved, and it is applicable due to complex gyroscope systems.
Patent Information
- Application Number
- CN202410619355.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-19
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to effectively diagnose slow-varying faults in laser gyroscopes with existing technology, especially under unknown types of faults and complex working conditions, and supervised learning methods that rely on a large amount of labeled data have strong limitations and are difficult to adapt to practical applications.
Wavelet packet denoising is used to preprocess the laser gyroscope angular velocity signal, and a variational autoencoder (VAE) is used to learn the potential representation and reconstruction of the data. By comparing the average reconstruction error with the set threshold to detect system performance changes, it is achieved Troubleshooting.
It improves the robustness and robustness of the system, can effectively deal with noise and interference, has real-time and scalability, is suitable for gyroscope systems of different sizes and complexities, and provides accurate and fast fault diagnosis results.
Smart Images

Figure CN118535918A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of fault diagnosis, and in particular relates to a laser gyroscope slow-varying fault diagnosis method based on variational auto-encoder (VAE). Background Art
[0002] Laser gyroscope is an instrument for measuring angular velocity and angular displacement based on the principle of laser interference. It is widely used in inertial navigation, aerospace, geological exploration and other fields. During operation, the laser gyroscope may be affected by factors such as the scene, internal structure design and electromagnetic field, and various faults may occur. These faults have a significant impact on the accuracy and safety of the navigation system, so timely detection and troubleshooting are crucial to ensure the normal operation of the navigation system. In the laser gyroscope system, faults can be divided into two categories: sudden and slow-changing. Among them, slow-changing faults are relatively hidden and slow, and their development process is relatively slow, showing a gradually increasing or decreasing signal change trend, which is different from the instantaneous change of sudden faults. This kind of fault is difficult to detect in the early stage, and may cause irregular changes in the signal frequency domain distribution, which increases the complexity of fault diagnosis.
[0003] In a complex space environment, gyroscope failure is inevitable. Once a gyroscope fails, its carrier may cause disasters of varying degrees. According to relevant data analysis, 60% of the failures in inertial navigation systems are related to gyroscopes. Therefore, in order to avoid accidents, improve the reliability, maintainability and effectiveness of laser gyroscopes, and provide accurate navigation and positioning parameters for carriers in a timely manner, ensure the safety of various navigation systems and carriers, and avoid greater accidents, it is of great significance to detect and diagnose laser gyroscope failures.
[0004] For the drift fault of gyroscope, Korkishko YN et al. used wavelet analysis to extract error feature vectors, then used a three-layer feedforward BP neural network to establish a fault model, and finally used fuzzy logic judgment to make the diagnosis method simpler and faster. Zhou Funa et al. proposed a method combining deep learning and PCA to achieve early diagnosis and life prediction of small slow-changing faults. Through deep learning, layer-by-layer feature extraction was performed, and high-dimensional fault features were integrated into a feature variable by combining PCA. A data-driven fault evolution scale and life prediction model were established, and the effectiveness of this method was proved by experiments. Jiang Yingying et al. proposed a strategy based on robust estimation and improved AIMS (autonomous integrity monitoring extrapolation method), which solved the delay and inability to accurately determine the end time of faults when AIMS detects faults in combined navigation. Wang Sipeng et al. combined a multi-step neural network observer with an adaptive threshold to solve the problem of low detection efficiency of the fault detection algorithm of the traditional neural network observer. Aiming at the problem that the traditional residual chi-square test method is inefficient in detecting small-amplitude mutation faults and slow-changing faults, Zhang Chuang et al. proposed a fault detection and fault tolerance method assisted by a least squares support vector machine (LS-SVM).
[0005] The above research methods for slow-changing faults are all based on supervised learning, which has the limitation of requiring a large amount of labeled training data and cannot handle unknown types of faults well. Supervised learning methods are difficult to adapt to complex and diverse actual working conditions because they rely too much on the labels of known fault samples. Therefore, in order to overcome these limitations, the introduction of unsupervised learning methods is a more promising direction. Unsupervised learning can adapt to unknown fault modes more flexibly, is not limited by a large amount of labeled data, and improves the applicability of the algorithm in actual engineering. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, the present invention provides a laser gyroscope slow-changing fault diagnosis method based on variational autoencoder. First, wavelet packet denoising is used to preprocess the laser gyroscope angular velocity signal to ensure data quality and stability. Secondly, the encoder and decoder learn the potential representation of the data and reconstruct the original data to capture key features. Finally, in the fault diagnosis stage, by comparing the average reconstruction error calculated in real time with the set threshold, it is possible to detect changes in system performance and mark the occurrence of drift, thereby improving system reliability and robustness. Finally, the method of the present invention is applied to the laser gyroscope slow-changing fault diagnosis and experimentally verified. The experimental results show that the method of the present invention has a good diagnostic effect, proving the effectiveness of the method.
[0007] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0008] Step 1: Data processing based on wavelet packet denoising;
[0009] Step 1-1: Use a set of wavelet basis functions to perform multi-scale decomposition of the signal;
[0010] By setting the wavelet basis function ψ(t), and then performing translation and scaling operations, the wavelet basis function ψ at different scales and positions is obtained. j,k (t); Next, the signal x(t) is projected onto the wavelet basis function to obtain the wavelet packet coefficients, which are used to represent the energy distribution of the signal at different scales and positions;
[0011] d j,k (t)= <x(t),ψ j,k (t)>=∫x(t)ψ j,k (t)dt
[0012] Among them, d j,k (t) represents the wavelet coefficient with scale j and position k; <x(t),ψ j,k (t)> represents the relationship between the signal x(t) and the wavelet basis function ψ j,k (t) performing inner product calculation;
[0013] Step 1-2: Use the median denoising threshold method to determine the threshold;
[0014] The calculation formula for the median denoising threshold is as follows:
[0015]
[0016] Where N is the total number of data points; median(·) is used to calculate the median of a set of values, that is, the value in the middle position after all values are arranged in order of size;
[0017] Step 1-3: Reconstruct the retained wavelet packet coefficients to obtain the denoised signal;
[0018] The reconstruction process is to traverse the wavelet coefficients at each scale, perform weighted summation according to the corresponding wavelet basis function, and obtain the final reconstructed signal:
[0019]
[0020] in, represents the reconstructed signal, that is, the signal after noise reduction, represents the wavelet coefficients;
[0021] Step 2: Fault diagnosis method based on variational autoencoder;
[0022] Step 2-1: Suppose there is a set of laser gyroscope data X = {x1, x2, ..., x N}, where each xi is an observation value, representing a measurement result of the laser gyroscope; the goal of modeling is to learn a probability model and then establish a joint probability distribution p between the observed data x and the latent variable z θ (z), where θ is the model parameter;
[0023] Using variational inference theory, we optimize the model parameters θ and the posterior distribution q by maximizing the variational lower bound ELBO of the marginal likelihood function. Φ The parameter Φ of (z|x) can realize accurate diagnosis of the slowly varying fault of the laser gyroscope; ELBO consists of two parts, namely the reconstruction term and the KL divergence term;
[0024] Step 2-2: The reconstruction term is used to measure the ability of the input data x to be reconstructed back to the original data under the condition of the given latent variable z. Its expression is:
[0025] L Rec =Εq Φ (z|x)[lnp θ (x|z)]
[0026] Among them, L Rec It represents the expected probability of reconstruction of the input data x by the model when the latent variable z is known; the reconstruction term quantifies the similarity between the reconstructed data and the original laser gyro data based on the known latent variable z; Εq Φ (z|x) represents the expected distribution of the latent variable z generated by the input data x; lnp θ (x|z) represents the log probability of reconstructing the input data x given the latent variable z;
[0027] Step 2-3: The KL divergence term is used to measure the approximate posterior q of the latent variable z Φ (z|x) and the prior distribution p θ The difference between (z) is expressed as:
[0028]
[0029] Where μ and σ are the mean and standard deviation of the latent variable z, respectively. The random variable ε is obtained by sampling from the standard normal distribution N(0,1), and then z = μ + ε × σ is calculated to obtain the encoded latent variable feature z.
[0030] This gives the variational lower bound of the marginal likelihood function, which is expressed as:
[0031] ELBO=L Rec -L KL =E qΦ(z|x) [lnp θ (x|z)]-DKL (q Φ (z|x)||p θ (z))
[0032] The first term represents the reconstruction error, and the second term represents the KL divergence between the latent variable distribution and the prior distribution;
[0033] Step 2-4: Use the variational autoencoder model to reconstruct the preprocessed data;
[0034] (1) Input data: The data set is divided into a training set and a test set. The training set includes the output signal of the laser gyroscope angular velocity under normal operation, which is used for model learning and parameter adjustment. The test set includes the angular velocity drift signal caused by normal operation and slow-changing performance failure.
[0035] (2) Data preprocessing: The collected laser gyro angular velocity signal is preprocessed using wavelet packet denoising technology;
[0036] (3) Variational autoencoder training and fault diagnosis threshold setting: The variational autoencoder is trained using the preprocessed training set; the variational autoencoder consists of an encoder and a decoder, wherein the encoder is responsible for mapping the input data to a latent representation, and the decoder is responsible for restoring the latent representation to the original data; by learning the latent representation of the data and reconstructing the original data, the variational autoencoder can capture the key features in the input data and generate a reconstruction error with similar features;
[0037] During the training process, for each data point in the training set, the reconstruction error after reconstruction by the variational autoencoder is calculated; through back propagation and optimization algorithms, the variational autoencoder gradually adjusts its own parameters to minimize the reconstruction error;
[0038] The fault diagnosis threshold is set based on the reconstruction error mean μ and standard deviation σ of normal data; the threshold is set to the mean plus or minus multiples of the standard deviation to ensure that the changes in normal data are accommodated within a certain range. Specifically, a multiple parameter k is set, and the upper and lower thresholds are calculated according to the following formula:
[0039] Upper Threshold=μ+k×σ
[0040] Lower Threshold=μ-k×σ
[0041] (4) Model application and fault diagnosis:
[0042] Using pre-set upper and lower thresholds, the model determines changes in drift trends by comparing the average reconstruction errors.
[0043] Preferably, k=2.
[0044] The beneficial effects of the present invention are as follows:
[0045] 1. Robustness: The fault diagnosis model based on variational autoencoder can effectively deal with noise and interference in gyroscope signals. Wavelet packet decomposition can extract signal details and trend information in the signal preprocessing stage, thereby enhancing the model's resistance to noise. The fault diagnosis model based on variational autoencoder can detect changes in system performance and mark the occurrence of drift, improve system reliability and robustness, and make it more robust and generalizable.
[0046] 2. Real-time: Since the training time of the fault diagnosis model based on the variational autoencoder is relatively short, fast gyroscope fault diagnosis results can be obtained in real-time or near-real-time application scenarios. This is crucial for rapid response and timely maintenance measures, helping to avoid potential safety issues and production interruptions.
[0047] 3. Scalability: The fault diagnosis model based on variational autoencoder has good scalability and can adapt to gyroscope systems of different scales and complexities. By adjusting the parameters and optimization strategies of the model, it can be flexibly applied to gyroscope devices of different models and configurations to meet the needs of various practical applications.
[0048] In summary, by integrating the fault diagnosis model of wavelet packet decomposition and variational autoencoder, a solution with high accuracy, high efficiency, strong robustness and real-time performance is provided for the detection of slowly varying faults in laser gyroscopes. The advantages and beneficial effects of this model make it the best choice to provide maintenance personnel with reliable fault diagnosis results and support real-time decision-making and maintenance strategy formulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a comparison chart of the original signal and the signal after wavelet packet denoising;
[0050] Figure 2 This is the model structure diagram of VAE;
[0051] Figure 3 It is a fault diagnosis model based on variational autoencoder;
[0052] Figure 4 This is the normal data training flow chart based on variational autoencoder;
[0053] Figure 5 This is a flow chart of fault data testing based on variational autoencoder;
[0054] Figure 6 This is the normal signal output diagram of the angular velocity of the gyroscope Z axis for 10 days;
[0055] Figure 7The angular velocity fault signal output diagram of the gyroscope Z axis, (a) angular velocity fault signal output diagram on January 16, (b) angular velocity fault signal output diagram on January 17;
[0056] Figure 8 This is the 10-day angular velocity fault signal output diagram of the gyroscope Z axis;
[0057] Fig. 9 It is the KL divergence loss curve;
[0058] Fig.10 This is a visualization diagram of the drift detection results. DETAILED DESCRIPTION
[0059] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0060] The present invention proposes a method for diagnosing slow-varying faults of laser gyroscopes based on variational autoencoders. First, wavelet packet denoising is used to preprocess the angular velocity signal of the laser gyroscope to ensure data quality and stability. Secondly, the model learns the potential representation of the data and reconstructs the original data through the encoder and decoder to capture key features. Finally, in the fault diagnosis stage, by comparing the average reconstruction error calculated in real time with the set threshold, the model can detect changes in system performance and mark the occurrence of drift, thereby improving system reliability and robustness. Finally, the proposed method is applied to the diagnosis of slow-varying faults of laser gyroscopes and experimentally verified. The experimental results show that the proposed model has a good diagnostic effect, proving the effectiveness of the method.
[0061] The present invention adopts a fault diagnosis method of a laser gyroscope based on a variational autoencoder to solve the problem of slowly varying fault diagnosis of a laser gyroscope. The steps of the scheme are as follows:
[0062] Step 1: Data processing based on wavelet packet denoising;
[0063] In gyroscope fault diagnosis, through detailed analysis of the data, it is found that there is a lot of noise in the normal signal. Especially when the system performance presents a slow-varying fault, this noise, scale difference and other interference may lead to a negative impact on the subsequent diagnosis and model training. Therefore, there is an urgent need for an effective method to deal with these problems to ensure the quality of the data. In order to improve the stability of the data and remove noise, the present invention introduces a method for data smoothing based on wavelet packet decomposition. Compared with other methods, wavelet packet denoising has unique advantages in processing slow-varying fault data. First, wavelet packet denoising has a wide range of applications and can process non-stationary and variable signals and various types of noise, such as Gaussian noise and salt and pepper noise. Secondly, by decomposing the signal into different frequency sub-bands through wavelet transform and performing threshold processing on each sub-band, wavelet packet denoising can better retain the details of the original signal, thereby helping to capture the characteristics of slow-varying faults. Compared with traditional filtering methods, such as Gaussian filtering and mean filtering, wavelet packet denoising does not destroy the signal structure and more effectively retains the effective information of the signal. Therefore, by adopting wavelet packet decomposition, the data can be better denoised, the stability of the data can be further improved, and a more reliable foundation can be provided for subsequent model training.
[0064] The following is the detailed derivation process of wavelet packet denoising:
[0065] First, a set of wavelet basis functions is used to perform multi-scale decomposition of the signal. By setting the wavelet basis function ψ(t), and then performing translation and scaling operations, the wavelet basis function ψ at different scales and positions can be obtained. j,k (t). Next, the signal x(t) is projected onto the wavelet basis function to obtain the wavelet packet coefficients, which are used to represent the energy distribution of the signal at different scales and positions.
[0066] d j,k (t)= <x(t),ψ j,k (t)>=∫x(t)ψ j,k (t)dt
[0067] Among them, d j,k (t) represents the wavelet coefficient with scale j and position k. <x(t),ψ j,k (t)> represents the relationship between the signal x(t) and the wavelet basis function ψ j,k (t) performs inner product calculation, and for continuous signals, the inner product can be calculated by integration.
[0068] Next, threshold processing is performed, the main purpose of which is to reduce the noise component in the wavelet packet coefficients while retaining the signal part containing valuable information. In the process of threshold processing, it is very important to select a suitable threshold. The median denoising threshold method is used to determine the threshold. Specifically, the selection of the threshold depends on the median of the coefficient, and the coefficient is adaptively adjusted to achieve a better distinction between the signal and the noise. The advantage of this method is that it is relatively simple and robust, and is suitable for various types of signal processing tasks. The calculation formula of the median denoising threshold is as follows:
[0069]
[0070] Finally, after threshold processing, the retained wavelet packet coefficients are reconstructed to obtain the denoised signal. The reconstruction process is to traverse the wavelet coefficients at each scale, perform weighted summation according to the corresponding wavelet basis function, and obtain the final reconstructed signal.
[0071]
[0072] in, Represents the reconstructed signal, that is, the signal after noise reduction. represents the wavelet coefficients.
[0073] By using wavelet packet denoising, it is possible to suppress noise while retaining signal characteristics, providing a more reliable basis for subsequent fault diagnosis model training. Figure 1 A comparison diagram of the original signal and the signal after wavelet packet denoising is shown to intuitively demonstrate the changes in the signal before and after processing.
[0074] from Figure 1 The effect of wavelet packet denoising can be clearly observed in the figure, which maintains the overall trend of the signal while smoothing the signal. Compared with the original signal, wavelet packet denoising more effectively weakens the high-frequency noise in the signal, which helps to improve the clarity and stability of the signal. The denoising effect is evaluated using two parameters: signal-to-noise ratio (SNR) and waveform similarity (Normalized Cross-Correlation, NCC), as shown in Table 1. Among them, SNR stands for signal-to-noise ratio, which is used to measure the ratio between useful information and noise level in the signal, while NCC stands for waveform similarity, which is used to measure the similarity between signals.
[0075]
[0076] Among them, x i and are the original signal and the signal after noise reduction respectively; N represents the length of the signal.
[0077]
[0078] Table 1. Comparison of denoising performance with different evaluation indicators
[0079]
[0080] As can be seen from Table 1, the SNR of the wavelet packet denoising method is the highest, which is 7.73, which is significantly higher than the SNR values of the mean filtering and median filtering methods. This shows that the wavelet packet denoising method can more effectively retain the useful information of the signal while suppressing noise. Moreover, the NCC value of the wavelet packet denoising method is the highest, which is 0.8595, while the NCC values of the mean filtering and median filtering are 0.7986 and 0.7451 respectively. This shows that the signal after wavelet packet denoising is more similar to the original signal and retains the characteristics of the original signal. The results of Table 1 show that the wavelet packet denoising method has better effects in improving signal clarity, stability and retaining useful information than the mean filtering and median filtering.
[0081] Step 2: Fault diagnosis method based on variational autoencoder
[0082] During the operation of the laser gyroscope, the complexity of the fault mode and the scarcity of label samples pose great challenges to fault diagnosis. Especially for slowly varying faults, the signal development is often smooth and continuous, so it is necessary to find a model that can capture such characteristics and has low dependence on label samples. The variational autoencoder (VAE) shows its unique advantages.
[0083] As an unsupervised learning model, the Variational Auto-Encoder (VAE) does not rely on a large number of labeled samples, so it can better adapt to the situation where it is difficult to obtain samples of laser gyroscope fault labels. Another significant advantage of VAE lies in its probabilistic modeling framework. The probabilistic modeling framework of VAE enables it to comprehensively model the signals of the laser gyroscope, not just simply mapping the data. The samples it outputs can reflect the entire process from normal to faulty state, which is of great significance for defining the fault threshold and detecting potential faults early.
[0084] In this framework, VAE maps input data to hidden variables in a low-dimensional space by utilizing latent variables and learns their probability distribution. This allows the normal operating state and fault state of the gyroscope to be distinguished in the latent space, so that any slight deviation from the normal state can be effectively detected. Even if the fault mode is unknown or a certain fault mode is not included in the training data, VAE can still diagnose the fault by learning the data distribution under the normal state.
[0085] The model structure of the variational autoencoder is as follows Figure 2 Its goal is to learn the underlying distribution of the data and generate new data samples.
[0086] Assume that there is a set of laser gyroscope data X = {x1, x2, ..., x N}, where each x i represents an observation value, and represents a measurement result of the laser gyroscope. The goal of modeling is to learn a probability model and then establish a joint probability distribution p between the observed data x and the latent variable z. θ (z), where θ is the model parameter. However, it is difficult to solve the marginal likelihood function, so the variational inference theory is used to optimize the model parameter θ and the posterior distribution q by maximizing the variational lower bound (Evidence Lower Bound, ELBO) of the marginal likelihood function. Φ The parameter Φ of (z|x) can realize accurate diagnosis of the slowly varying fault of the laser gyroscope. ELBO consists of two parts, namely the reconstruction term and the KL divergence term.
[0087] The reconstruction term is used to measure the ability of the input data x to reconstruct the original data under the condition of the given latent variable z, and its expression is:
[0088] L Rec =Εq Φ (z|x)[lnp θ (x|z)]
[0089] This represents the model's expectation of the probability of reconstruction of the input data x given the known latent variable z. The reconstruction term quantifies the similarity between the reconstructed data and the original laser gyro data based on the known latent variable z. In a fault-free state, the original data is generated according to a specific pattern, and the latent variables extracted from it can better reflect these patterns. When optimizing the reconstruction term, it is to make the variational autoencoder restore the original reading as accurately as possible after determining the latent variable. However, once the gyroscope fails, its data pattern may change. At this time, the same latent variable cannot accurately reconstruct the original reading, and the reconstruction term will increase. Therefore, detecting the numerical change of the reconstruction term can serve as an early warning of faults, and timely discover and diagnose laser gyroscope faults, which has important practical value.
[0090] The KL divergence term is used to measure the approximate posterior q of the latent variable z. Φ (z|x) and the prior distribution p θ The difference between (z) is expressed as:
[0091]
[0092] In the diagnosis of slowly varying faults of laser gyroscopes, the role of KL divergence can be interpreted as helping the model to effectively distinguish the potential feature differences between normal and faulty states. Slowly varying faults are usually manifested as gradual changes in the laser gyroscope signal. These changes may be relatively weak and gradually accumulate, making it difficult to accurately identify them directly from the raw data. By introducing the KL divergence term, the VAE model is stimulated to make the distribution in the latent space close to the prior distribution, which means that the model will distinguish the features of the normal state and the faulty state, so that the data points in the faulty state have a larger deviation in the latent space. Therefore, the KL divergence prompts the model to learn the sensitivity to the slowly varying fault features during the training process, so that the model can better distinguish between the normal state and the faulty state, thereby achieving accurate diagnosis of the slowly varying faults of the laser gyroscope.
[0093] Among them, μ and σ are the mean and standard deviation of the latent variable z, respectively. In order to realize the backpropagation of gradients during training, the reparameterization technique is introduced. The random variable ε is sampled from the standard normal distribution N(0,1), and then z=μ+ε×σ is calculated to obtain the encoded hidden variable feature z.
[0094] In this way, we can obtain the variational lower bound of the marginal likelihood function, which is expressed as:
[0095] ELBO=L Rec -L KL =E qΦ(z|x) [lnp θ (x|z)]-D KL (q Φ (z|x)||p θ (z))
[0096] Among them, the first term represents the reconstruction error, and the second term represents the KL divergence between the latent variable distribution and the prior distribution. Maximizing ELBO is equivalent to minimizing the reconstruction error and making the distribution of the latent variable close to the prior distribution. In this way, even in the case of slowly varying faults, since the model has learned the data distribution under the normal state, any observation data that deviates significantly from the normal state will be detected, thereby achieving the goal of fault diagnosis.
[0097] By maximizing the ELBO, the variational autoencoder aims to improve the ability to reconstruct the input data during training, while making the distribution of the latent variables close to the prior distribution through the KL divergence term. This process enables the model to learn more meaningful and coherent latent representations.
[0098] For the problem of laser gyroscope slow-varying fault diagnosis, after completing the key data preprocessing and signal smoothing, the laser gyroscope angular velocity signal that has been processed by wavelet packet denoising is selected as the input of the model. Next, the variational autoencoder (VAE) model is used to reconstruct the preprocessed data. The overall process of the fault diagnosis model based on the variational autoencoder is as follows: Figure 3 shown.
[0099] (1) Input data: The data set is divided into a training set and a test set. The training set contains the output signal of the laser gyroscope angular velocity under normal operation, which is used for model learning and parameter adjustment. The test set includes the angular velocity drift signal caused by normal operation and slow-changing performance failure to more realistically simulate the actual working environment.
[0100] (2) Data preprocessing: Before model training, the collected laser gyroscope angular velocity signals were preprocessed to ensure data quality and stability. Wavelet packet denoising technology was used. This signal processing method not only smoothed the data curve and reduced the impact of noise, but also eliminated potential outliers to ensure the reliability and stability of the final data.
[0101] (3) Variational autoencoder training and fault diagnosis threshold setting: In this stage, the variational autoencoder is trained using the preprocessed training set. Figure 4 The normal data training process based on variational autoencoder is demonstrated.
[0102] The model consists of an encoder and a decoder, where the encoder is responsible for mapping the input data to a latent representation and the decoder is responsible for restoring the latent representation to the original data. By learning the latent representation of the data and reconstructing the original data, VAE can capture the key features in the input data and generate a reconstruction error with similar features, such as Figure 4 Shown as a medium blue line.
[0103] During the training process, for each data point in the training set, the reconstruction error after reconstruction by the VAE model is calculated. This error measures the accuracy of the model in restoring the data and is a key indicator for optimizing model parameters. Through back propagation and optimization algorithms, the model gradually adjusts its own parameters to minimize the reconstruction error.
[0104] Subsequently, the threshold of fault diagnosis is set based on the reconstruction error mean μ and standard deviation σ of the normal data. In this paper, the threshold is set to the mean plus or minus multiples of the standard deviation to ensure that the variation of normal data is accommodated within a certain range. Specifically, a multiple parameter k is set. If a smaller k is selected, such as k = 1, the sensitivity of the model to anomalies will increase, but the false alarm rate may increase. If a larger k = 3 is selected, the robustness will be improved, but the false alarm rate may increase. And based on the properties of the normal distribution, k = 2 corresponds to a confidence level of about 95%, which is generally considered to be a good choice in balancing accuracy and robustness. Therefore, in this paper, k = 2, and then the threshold is calculated according to the following formula:
[0105] Upper Threshold=μ+k×σ
[0106] Lower Threshold=μ-k×σ
[0107] (4) Model application and fault diagnosis:
[0108] Based on model training and threshold setting, the next stage is model application and fault diagnosis. This stage is the key to the entire process. It aims to quickly detect changes in system performance by monitoring drift trends in real time, and mark potential failure points and the time when failures begin to occur. Using pre-set upper and lower thresholds, the model determines changes in drift trends by comparing the average reconstruction error. If the average reconstruction error exceeds the upper threshold, the model identifies the drift trend as increasing, indicating that system performance may have changed. Figure 5 The fault data testing process based on variational autoencoders is demonstrated. From the final test results, it can be seen that once the drift trend is detected, the model not only identifies the occurrence of drift, but also marks the specific data points that exceed the upper threshold. These data points are considered to be the starting point of the drift, that is, the time point when the system performance changes. Marking the drift starting point helps with subsequent detailed fault diagnosis and analysis, allowing operators or system maintenance personnel to quickly locate potential fault sources.
[0109] Example:
[0110] (1) Dataset introduction;
[0111] The data set used in this example records in detail the operation of the laser gyroscope system in two states, namely normal operation and slow-changing performance failure. The data set used in the study is divided into a training set and a test set. The training set mainly contains the continuous operation records of the system under standard working conditions, which lasted for 10 days and covered 2880 sample points every day. Among them, the normal signal output of the gyroscope Z-axis angular velocity is as follows Figure 6 shown.
[0112] The test set covers the angular velocity signal drift caused by normal operation and slow-changing performance failure. In order to simulate the slow-changing performance failure more realistically, the corresponding drift is artificially injected into the test set, making the angular velocity signal show a trend of gradual development and gradual accumulation. Figure 7 The figure shows the gyroscope angular velocity fault signal output for two consecutive days.
[0113] It can be seen from the figure that the gyroscope Z-axis angular velocity fault signal output does not clearly show an obvious drift trend. This makes it difficult to judge slow-changing performance faults in a short time scale, especially for the early detection of slow and gradually developing drift phenomena.
[0114] and Figure 8 The angular velocity fault signal output of the gyroscope Z-axis over a period of 10 days is shown.
[0115] from Figure 8 It can be clearly seen that the drift trend becomes significant on this longer time scale. The daily angular velocity fault signal gradually develops and accumulates, showing a clearly discernible trend. In this longer time frame, the drift signal is persistent, progressive, and the trend is relatively stable, further highlighting the characteristics of slow-varying performance faults.
[0116] (2) Example verification;
[0117] In the experimental verification stage, Fig. 9 The KL divergence loss curve in can provide in-depth insights into the model's training process. KL divergence loss is a widely used metric in variational autoencoders that measures the difference between the distribution of latent variables learned by the model and the standard normal distribution. The curve uses the training cycle as the horizontal axis and the KL divergence loss value as the vertical axis. The KL divergence loss curve shows a typical trend of first rising, then falling, and finally stabilizing.
[0118] from Fig. 9 It can be seen that in the early stages of training, the model may not understand the structure and complexity of the input data, so the KL divergence loss increases. At this stage, the model tries to adapt to the distribution of the training data and adjust the distribution of the potential representation to better capture the characteristics of the input data. Since the initialization of the potential representation may not be ideal, the model needs some time to adapt to the complexity of the data, resulting in an increase in the KL divergence loss.
[0119] As training progresses, the model gradually understands the structure of the input data, and the KL divergence loss begins to decrease. This means that the adjustment of the potential representation is more precise and gradually approaches the standard normal distribution. The model has learned how to better express the input data, making the generated potential representation more discriminative and interpretable.
[0120] In the later stages of training, the KL divergence loss curve tends to stabilize, indicating that the model has learned a stable latent representation. At this point, the model's parameters have been adjusted enough so that the latent representation can balance the tasks of generation and reconstruction in the loss function. The model no longer needs to strongly adjust the distribution of the latent representation because it is already well adapted to the input data. Overall, the shape of the KL divergence loss curve reflects the process of the model fine-tuning the latent representation during training, showing a trend of gradual convergence. This trend shows that the variational autoencoder gradually achieves an effective representation of the input data during the learning process, thus providing a more reliable basis for subsequent diagnosis.
[0121] Fig.10 This is a visualization of the drift detection results. The upward trend of the blue line indicates that the average reconstruction error gradually increases over time, suggesting potential data drift. The red dotted line marks the set drift threshold, and its value represents a possible drift indication. The orange scattered points mark the time point when the sliding average reconstruction error exceeds the drift threshold, which is regarded as the start of the drift event. It can be seen from the figure that the gyroscope Z-axis angular velocity signal has drifted since the 13224th sample point. This figure provides an intuitive drift trend and can quickly capture the occurrence of data drift.
Claims
1. A method for diagnosing slow-varying faults of laser gyroscopes based on variational autoencoders. It is characterized in that The steps include: Step 1: Data processing based on wavelet packet denoising; Step 1-1: Use a set of wavelet basis functions to perform multi-scale decomposition of the signal; By setting the wavelet basis function ψ(t), and then performing translation and scaling operations, the wavelet basis function ψ at different scales and positions is obtained. j,k (t); Next, the signal x(t) is projected onto the wavelet basis function to obtain the wavelet packet coefficients, which are used to represent the energy distribution of the signal at different scales and positions; d j,k (t)=<x(t),ψ j,k (t)>=∫x(t)ψ j,k (t)dt Among them, d j,k (t) represents the wavelet coefficient with scale j and position k; <x(t),ψ j,k (t)> represents the relationship between the signal x(t) and the wavelet basis function ψ j,k (t) performing inner product calculation; Step 1-2: Use the median denoising threshold method to determine the threshold; The calculation formula for the median denoising threshold is as follows: Where N is the total number of data points; median(·) is used to calculate the median of a set of values, that is, the value in the middle position after all values are arranged in order of size; Step 1-3: Reconstruct the retained wavelet packet coefficients to obtain the denoised signal; The reconstruction process is to traverse the wavelet coefficients at each scale, perform weighted summation according to the corresponding wavelet basis function, and obtain the final reconstructed signal: in, represents the reconstructed signal, that is, the signal after noise reduction, represents the wavelet coefficients; Step 2: Fault diagnosis method based on variational autoencoder; Step 2-1: Suppose there is a set of laser gyroscope data X = {x 1 ,x 2 ,...,x N }, where each x i is an observation value, representing a measurement result of the laser gyroscope; the goal of modeling is to learn a probability model and then establish a joint probability distribution p between the observed data x and the latent variable z θ (z), where θ is the model parameter; Using variational inference theory, we optimize the model parameters θ and the posterior distribution q by maximizing the variational lower bound ELBO of the marginal likelihood function. Φ The parameter Φ of (z|x) can realize accurate diagnosis of the slowly varying fault of the laser gyroscope; ELBO consists of two parts, namely the reconstruction term and the KL divergence term; Step 2-2: The reconstruction term is used to measure the ability of the input data x to be reconstructed back to the original data under the condition of the given latent variable z. Its expression is: L Rec =Εq Φ (z|x)[lnp θ (x|z)] Among them, L Rec It represents the expected probability of reconstruction of the input data x by the model when the latent variable z is known; the reconstruction term quantifies the similarity between the reconstructed data and the original laser gyro data based on the known latent variable z; Εq Φ (z|x) represents the expected distribution of the latent variable z generated by the input data x; lnp θ (x|z) represents the log probability of reconstructing the input data x given the latent variable z; Step 2-3: The KL divergence term is used to measure the approximate posterior q of the latent variable z Φ (z|x) and the prior distribution p θ The difference between (z) is expressed as: Where μ and σ are the mean and standard deviation of the latent variable z, respectively. The random variable ε is obtained by sampling from the standard normal distribution N(0,1), and then z = μ + ε × σ is calculated to obtain the encoded latent variable feature z. This gives the variational lower bound of the marginal likelihood function, which is expressed as: ELBO=L Rec -L KL =E qΦ(z|x) [lnp θ (x|z)]-D KL (q Φ (z|x)||p θ (z)) The first term represents the reconstruction error, and the second term represents the KL divergence between the latent variable distribution and the prior distribution; Step 2-4: Use the variational autoencoder model to reconstruct the preprocessed data; (1) Input data: The data set is divided into a training set and a test set. The training set includes the output signal of the laser gyroscope angular velocity under normal operation, which is used for model learning and parameter adjustment. The test set includes the angular velocity drift signal caused by normal operation and slow-changing performance failure. (2) Data preprocessing: The collected laser gyro angular velocity signal is preprocessed using wavelet packet denoising technology; (3) Variational autoencoder training and fault diagnosis threshold setting: The variational autoencoder is trained using the preprocessed training set; the variational autoencoder consists of an encoder and a decoder, wherein the encoder is responsible for mapping the input data to a latent representation, and the decoder is responsible for restoring the latent representation to the original data; by learning the latent representation of the data and reconstructing the original data, the variational autoencoder can capture the key features in the input data and generate a reconstruction error with similar features; During the training process, for each data point in the training set, the reconstruction error after reconstruction by the variational autoencoder is calculated; through back propagation and optimization algorithms, the variational autoencoder gradually adjusts its own parameters to minimize the reconstruction error; The fault diagnosis threshold is set based on the reconstruction error mean μ and standard deviation σ of normal data; the threshold is set to the mean plus or minus multiples of the standard deviation to ensure that the changes in normal data are accommodated within a certain range. Specifically, a multiple parameter k is set, and the upper and lower thresholds are calculated according to the following formula: Upper Threshold=μ+k×σ Lower Threshold=μ-k×σ (4) Model application and fault diagnosis: Using pre-set upper and lower thresholds, the model determines changes in drift trends by comparing the average reconstruction errors.
2. According to claim 1, a laser gyroscope slow-varying fault diagnosis method based on variational autoencoder, It is characterized in that The k=2.
