Atomic clock fault identification method and system based on VAE-LSTM-GAN

By constructing a VAE-LSTM-GAN hybrid model, utilizing the encoder to extract implicit low-dimensional features and LSTM to capture time series, combined with GAN adversarial training, automatic identification of atomic clock faults was achieved, solving the problem of manual analysis and judgment required in existing methods, and improving the accuracy and efficiency of identification.

CN121956473APending Publication Date: 2026-05-01BEIJING INST OF RADIO METROLOGY & MEASUREMENT
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF RADIO METROLOGY & MEASUREMENT
Filing Date
2025-12-08
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing methods can only indicate the occurrence of atomic clock malfunctions, requiring further manual analysis and judgment, which limits the efficiency of troubleshooting.

Method used

A hybrid model based on VAE-LSTM-GAN is adopted. By collecting raw clock error data of atomic clocks, a hybrid model of VAE-LSTM-GAN is constructed, which includes an encoder, a decoder, a feature fault classifier and a GAN discriminator. Each module is trained to identify the fault categories of atomic clocks.

Benefits of technology

It improves the accuracy and efficiency of atomic clock fault identification, can automatically identify the root cause of the fault, and reduces the reliance on manual analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121956473A_ABST
    Figure CN121956473A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of atomic clock fault recognition, and provides a VAE-LSTM-GAN-based atomic clock fault recognition method, a clock error sequence is high-dimensional time sequence data, implicit low-dimensional feature representation of the clock error sequence is learned by using VAE, and a re-parameter is introduced in random sampling, so that gradient can pass through and be reversely propagated to an encoder, and the clock error sequence is subjected to VAE-LSTM-GAN-based atomic clock fault recognition. Implicit low-dimensional features of the clock error sequence can be determined more accurately, then long-term dependence and dynamic changes of the time sequence are captured in combination with LSTM, and through GAN adversarial training, training samples are increased, and the model recognition precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of atomic clock fault identification, and in particular relates to an atomic clock fault identification method and system based on VAE-LSTM-GAN. Background Technology

[0002] High-precision timekeeping is fundamental to modern technological development, playing a crucial role in fields such as satellite navigation, financial transactions, and industrial automation. Atomic clocks generate stable time frequencies by utilizing atomic energy level transitions. However, due to internal aging and external interference, the output signal becomes unstable, leading to a decrease in time accuracy. To monitor and record the operating status of atomic clocks in real time, systems are equipped with devices such as phase comparators and counters. Based on the time difference data collected by these measuring devices, researchers have conducted studies on atomic clock malfunctions.

[0003] Traditional statistical methods are currently the most mature and widely used approach, identifying clock discrepancies by comparing predicted values ​​generated by model construction with actual observations. With the development of artificial intelligence, methods such as backpropagation (BP) neural networks, HP filtering, and Kalman filtering have been applied to clock discrepancy modeling and anomaly detection. Compared to statistical methods, intelligent algorithms can identify anomalies more quickly and effectively. However, most existing methods can only indicate the occurrence of a fault; further manual analysis and judgment are still required to determine the root cause, which limits troubleshooting efficiency. Summary of the Invention

[0004] This application provides a method and system for identifying atomic clock faults based on VAE-LSTM-GAN, which can solve the problem that most existing methods can only indicate the occurrence of faults, and the root cause of the fault still needs to be further analyzed and judged manually, which limits the efficiency of troubleshooting.

[0005] Firstly, this application provides a method for atomic clock fault identification based on VAE-LSTM-GAN, including: Collect raw clock error data of atomic clocks, split the data according to a given length, and label the fault categories to obtain labeled samples; A VAE-LSTM-GAN hybrid model is constructed, which includes a VAE-LSTM module with encoder and decoder, a feature fault classifier extended from the VAE-LSTM module, and a GAN module with GAN discriminator. It also includes a comprehensive classifier constructed based on the outputs of the VAE-LSTM module and the feature fault classifier; wherein the VAE-LSTM module serves as the generator of the GAN module. The VAE-LSTM module, GAN discriminator, feature fault classifier and comprehensive classifier are trained sequentially, using corresponding loss function and Adam optimizer to complete the training; The test data is input into the trained model, the features are mapped by the VAE encoder and identified by the feature fault classifier to obtain the first result, and the GAN discriminator is used to identify the multi-class output to obtain the second result. The first and second results are input into the integrated classifier to obtain the atomic clock fault category.

[0006] Optionally, the step of collecting raw atomic clock error data, splitting the data according to a given length, and labeling the fault categories to obtain labeled samples includes: Collect raw clock error data of atomic clocks with a preset length; Based on the clock error fluctuation, the original clock error data is divided into multiple data segments according to a set length; Each data segment is labeled with a category, including normal, unlocked, frequency jump, frequency drift, and stability deterioration, to obtain a preset number of labeled samples.

[0007] Optionally, the encoder construction steps of the VAE-LSTM module include: The input layer, with the same length as the labeled sample data, serves as the entry point for clock error data. The encoder body is formed by sequentially connecting the normalization layer and a three-layer LSTM with dimensions of 256, 64, and 16. Two independent fully connected layers are connected at the encoder output to output the mean and variance of the features, respectively. The dimensions of the fully connected layers are consistent with the feature dimensions.

[0008] Optionally, the decoder construction steps of the VAE-LSTM module include: The mean and variance of the encoder output are sampled dimension by dimension to obtain a feature vector with the same dimension as the feature dimension; The feature vectors are input into a 16-dimensional fully connected layer for dimensional expansion. Three layers of LSTM with dimensions of 16, 64, and 256 are sequentially connected to capture temporal correlations; Connect a fully connected layer with the same length as the original clock difference data to output the reconstructed clock difference data.

[0009] Optionally, the construction steps of the feature fault classifier include: The feature vector output by the encoder is used as input; A two-layer LSTM and a fully connected layer are connected sequentially, and the output dimension of the fully connected layer is consistent with the number of categories of the labeled samples; The fully connected layer outputs preliminary identification results corresponding to the fault category.

[0010] Optionally, the construction steps of the GAN discriminator include: Use real data from labeled samples or data synthesized by the generator as input; The discriminator is formed by sequentially connecting the LeakyReLU activation function layer, the dropout layer, and a two-layer LSTM with dimensions of 128 and 32. Two independent fully connected layers are connected. The first fully connected layer outputs the data authenticity judgment result, and the second fully connected layer outputs the fault category judgment result.

[0011] Optionally, the sequential training of the VAE-LSTM module, GAN discriminator, feature fault classifier, and comprehensive classifier includes: The first stage trains the VAE-LSTM module, using a loss function that includes a KL divergence term and a reconstruction loss term, and implements gradient propagation through the reparameterization method. The second stage trains the GAN discriminator. First, it trains the binary classification output with binary_crossentropy as the loss function, iteratively updates the generator and the binary classification discriminator, and then trains the multi-class output with sparse_categorical_crossentropy as the loss function. The third stage trains a feature-based fault classifier, using sparse multi-class cross-entropy as the loss function. The fourth stage trains a comprehensive classifier, using multi-class cross-entropy as the loss function, with the input being the feature classification results and the GAN multi-class output results.

[0012] Optionally, the step of using a loss function that includes a KL divergence term and a reconstruction loss term, and implementing gradient propagation through the reparameter recalculation method, includes: The loss function is set as a weighted sum of the KL divergence term and the reconstruction loss term, where the KL divergence term is used to measure the information loss between the approximate distribution of the encoder output and the preset posterior conditional probability distribution, and the reconstruction loss term is used to measure the difference loss between the reconstructed clock error data and the original clock error data in the decoder output. A random vector with the same feature dimension is drawn from a standard normal distribution. The dimension of the random vector is the same as the mean and variance dimensions of the encoder output. Based on the random vector, the mean and variance of the encoder output, a gradient-propagable feature vector is calculated using a preset formula. The feature vector is input into the decoder, and after being processed by the fully connected layer and LSTM layer of the decoder, the reconstructed clock difference data with the same length as the original clock difference data is output. Based on the mean and variance of the encoder output, the KL divergence values ​​of the approximate distribution and the posterior conditional probability distribution are calculated using the KL divergence formula and used as the KL divergence term. Using the reconstructed clock error data and the original clock error data as input, the negative value of the difference between the two is calculated through the log-likelihood function and used as the reconstruction loss term; The KL divergence term and the reconstruction loss term are added together with preset weights to obtain the total loss of the VAE-LSTM module; Using the Adam optimizer, based on the total loss, the weights and biases of the encoder and decoder are updated with backward gradients to complete one round of training iteration. Then, a random vector with the same feature dimension is drawn from the standard normal distribution until the total loss converges.

[0013] Optionally, the second stage of training the GAN discriminator includes: With fixed generator weights, train the discriminator's binary classification output using real and synthetic data, and update the discriminator weights. With the discriminator weights fixed, train the generator to generate synthetic data that conforms to the distribution of real data, and then update the generator weights. Repeat the process of fixing the generator weights and the discriminator weights until the model stabilizes, then switch to multi-class output training. The discriminator's multi-class output is trained using real data from labeled samples, and the discriminator weights are iteratively updated until the model stabilizes.

[0014] This application also provides an atomic clock fault identification system based on VAE-LSTM-GAN, including: The collection module collects raw clock error data from atomic clocks, splits the data into segments of a given length, and labels the fault categories to obtain labeled samples. The module constructs a VAE-LSTM-GAN hybrid model, which includes a VAE-LSTM module with encoder and decoder, a feature fault classifier extended from the VAE-LSTM module, a GAN module with GAN discriminator, and a comprehensive classifier constructed from the outputs of the VAE-LSTM module and the feature fault classifier; wherein the VAE-LSTM module serves as the generator of the GAN module. The training module sequentially trains the VAE-LSTM module, GAN discriminator, feature fault classifier and comprehensive classifier, using corresponding loss function and Adam optimizer to complete the training. The identification module inputs test data into the trained model, maps features through the VAE encoder, and identifies the first result through the feature fault classifier. At the same time, it identifies the second result through the multi-class output of the GAN discriminator. The first and second results are input into the comprehensive classifier to obtain the atomic clock fault category.

[0015] As can be seen from the above technical solution, the atomic clock fault identification method based on VAE-LSTM-GAN provided in this application uses clock difference sequences as high-dimensional time-series data. By utilizing VAE to learn the implicit low-dimensional feature representation of the clock difference sequence, and introducing reparameters in random sampling, the gradient can be obtained through... , Backpropagation to the encoder can more accurately determine the implicit low-dimensional features of the clock difference sequence. Then, LSTM is combined to capture the long-term dependence and dynamic changes of the time series. Through GAN adversarial training, the number of training samples is increased, and the model's recognition accuracy is improved. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating an atomic clock fault identification method based on VAE-LSTM-GAN in an embodiment of this application.

[0018] Figure 2 This is a schematic diagram of the model architecture in the embodiments of this application.

[0019] Figure 3 This is a schematic diagram of the structure of an atomic clock fault identification system based on VAE-LSTM-GAN in an embodiment of this application. Detailed Implementation

[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not limiting, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without such specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.

[0021] This application provides a method for atomic clock fault identification based on VAE-LSTM-GAN, such as Figure 1 As shown, it includes: Collect raw clock error data of atomic clocks, split the data according to a given length, and label the fault categories to obtain labeled samples; A VAE-LSTM-GAN hybrid model is constructed, which includes a VAE-LSTM module 1 containing an encoder and a decoder, a feature fault classifier 2 extended from the VAE-LSTM module, a GAN module 3 containing a GAN discriminator, and a comprehensive classifier 4 constructed based on the outputs of the VAE-LSTM module and the feature fault classifier; wherein the VAE-LSTM module serves as the generator of the GAN module. The VAE-LSTM module, GAN discriminator, feature fault classifier and comprehensive classifier are trained sequentially, using corresponding loss function and Adam optimizer to complete the training; The test data is input into the trained model, the features are mapped by the VAE encoder and identified by the feature fault classifier to obtain the first result, and the GAN discriminator is used to identify the multi-class output to obtain the second result. The first and second results are input into the integrated classifier to obtain the atomic clock fault category.

[0022] This application provides an atomic clock fault identification method based on VAE-LSTM-GAN. The clock difference sequence is high-dimensional time-series data. By utilizing VAE to learn the implicit low-dimensional feature representation of the clock difference sequence, and introducing re-parameters in random sampling, the gradient can be obtained through... , Backpropagation to the encoder can more accurately determine the implicit low-dimensional features of the clock difference sequence. Then, LSTM is combined to capture the long-term dependence and dynamic changes of the time series. Through GAN adversarial training, the number of training samples is increased, and the model's recognition accuracy is improved.

[0023] In this embodiment of the application, the atomic clock fault identification method achieves accurate fault identification of high-dimensional timing clock difference data through multi-module collaboration. First, regarding the original clock difference data of the atomic clock, it should be noted that this data is not directly obtained and can be used immediately. Instead, it is collected in real time by the metering equipment that is matched with the atomic clock during operation. These devices can record the difference between the atomic clock output signal and the standard time signal, i.e., the clock difference, which reflects the time accuracy status of the atomic clock.

[0024] In this embodiment, the operation of splitting data by a given length is designed based on the temporal characteristics of clock difference data. Since atomic clock failures often exhibit characteristics in a continuous time series, it is necessary to split the long original data into several continuous subsequences. For example, the split length can be determined according to the common failure evolution cycle of atomic clocks to ensure that each subsequence can completely contain the characteristics of a certain operating state. The fault category is labeled by manually combining the atomic clock's operating logs and physical parameter monitoring results to label the split subsequences. The resulting labeled samples can provide supervision information for the subsequent model construction and training. This application is not limited to this. Semi-supervised methods can also be introduced to assist in the labeling process to reduce the workload of purely manual labeling.

[0025] In this embodiment, the construction of the VAE-LSTM-GAN hybrid model requires a clear understanding of the meaning of each module. The VAE-LSTM module combines the advantages of Variational Autoencoder (VAE) and Long Short-Term Memory (LSTM) networks. VAE is responsible for implicit feature extraction from high-dimensional data, while LSTM is responsible for capturing long-term dependencies in time-series data. The combination of the two can simultaneously achieve feature compression and time-series modeling. The feature fault classifier is an extension of the VAE-LSTM module, and its input is the low-dimensional features output by VAE. In this way, redundant information has been removed from the features, and using them as input can improve classification efficiency. The GAN module is the Generative Adversarial Network module, and the generator it contains is undertaken by the VAE-LSTM module. The VAE-LSTM module has the ability to generate synthetic data with a distribution consistent with the original clock bias data, while the discriminator needs to be built separately to determine the authenticity of the data and the fault category. The comprehensive classifier is built based on the outputs of the first two classifiers, which can integrate the advantages of the two classification approaches to further improve the fault identification accuracy.

[0026] It should be noted that the sequential training of each module is not random, but based on the functional dependencies between them. The VAE-LSTM module is the foundation of the generator and needs to be trained first to ensure it can extract effective features and generate qualified synthetic data. The GAN discriminator needs to optimize its discrimination and classification performance through adversarial training after the generator has basic generation capabilities. The feature fault classifier relies on stable features output by the VAE and therefore needs to be trained after the VAE-LSTM module has stabilized. The fusion classifier requires reliable preliminary results from the first two classifiers before fusion optimization can be performed. The Adam optimizer is used, which can adaptively adjust the learning rate and is suitable for training the complex hybrid model in this application, effectively avoiding gradient explosion or vanishing gradient problems during training.

[0027] In this embodiment, the process of using test data needs to clarify each result. The first result is the recognition result obtained by inputting the test data into the feature fault classifier after the test data is mapped into features by the VAE encoder, which reflects the fault judgment based on low-dimensional implicit features. The second result is the recognition result obtained by directly inputting the test data into the multi-classification output part of the GAN discriminator, which reflects the fault judgment based on the time-series features of the original data. After inputting the two results into the comprehensive classifier, the comprehensive classifier integrates the two results through weight allocation or feature fusion algorithm, and finally outputs the atomic clock fault category. In this way, the advantages of implicit features and original time-series features are taken into account, and the recognition accuracy and robustness are better than the single classification method.

[0028] In an optional embodiment, the process of collecting raw atomic clock error data, splitting the data by a given length, and labeling the fault categories to obtain labeled samples includes: Collect raw clock error data of atomic clocks with a preset length; Based on the clock error fluctuation, the original clock error data is divided into multiple data segments according to a set length; Each data segment is labeled with a category, including normal, unlocked, frequency jump, frequency drift, stability deterioration, and others, to obtain a preset number of labeled samples.

[0029] In this embodiment, raw clock bias data of an atomic clock with a preset length is collected. The preset length needs to be determined in conjunction with the actual application scenario. For example, if the atomic clock is used in the field of satellite navigation, its operation status monitoring requires a high time resolution. Therefore, the preset collection length can be set to cover at least one complete navigation signal cycle to ensure that the data contains sufficient status information. It should be noted that the collection of raw clock bias data needs to ensure continuity and accuracy. This is usually achieved through a dedicated data acquisition card connected to the atomic clock. The acquisition card converts the analog or digital signals output by the metering device into a storable and processable digital sequence.

[0030] In this embodiment, the data splitting operation based on clock bias fluctuations is as follows: if the clock bias fluctuations are gentle, it indicates that the atomic clock may be in normal operation, and the splitting length can be appropriately extended; if the clock bias fluctuations are severe, there may be fault evolution, and the splitting length needs to be appropriately shortened to accurately capture fault characteristics. It should be noted that the splitting process must ensure the continuity of the subsequences and must not disrupt the temporal order. LSTM and other time-series models are highly dependent on the temporal order of the data; disrupting the temporal order will prevent the model from learning the true temporal correlation features. This application is not limited to this; a sliding window can also be introduced during splitting to increase the number of samples and improve the model's generalization ability.

[0031] In this embodiment, when categorizing each data segment, the categorization is determined based on common fault types of atomic clocks: the normal category corresponds to segments where clock bias fluctuations are within a preset threshold, which is set according to the technical specifications of the atomic clock; the unlock category corresponds to segments where the internal energy level transitions of the atomic clock lose synchronization with the external excitation signal, typically manifested as a sudden and large jump in clock bias; the frequency jump category corresponds to segments where the output frequency of the atomic clock suddenly changes discontinuously, and the clock bias sequence exhibits a step-like change; the frequency drift category corresponds to segments where the output frequency of the atomic clock slowly shifts over time, and the clock bias sequence exhibits a linear or slow non-linear change; the stability deterioration category corresponds to segments where the amplitude of atomic clock bias fluctuations increases and stability decreases; other categories are used to accommodate rare faults that are not clearly classified.

[0032] It should be noted that the preset number of labeled samples after annotation can provide a basis for supervised training of the model. The number of samples must meet the basic requirements for model training. If the number of samples is insufficient, it can be supplemented by synthetic data from GANs.

[0033] In an optional embodiment, the encoder construction step of the VAE-LSTM module includes: The input layer, with the same length as the labeled sample data, serves as the entry point for clock error data. The encoder body is formed by sequentially connecting the normalization layer and a three-layer LSTM with dimensions of 256, 64, and 16. Two independent fully connected layers are connected at the encoder output to output the mean and variance of the features, respectively. The dimensions of the fully connected layers are consistent with the feature dimensions.

[0034] In this embodiment, an input layer with the same length as the labeled sample data is used as the clock difference data entry point. The dimension of the input layer must match the dimension of the input data to ensure that the data can be completely input into the encoder for processing. The labeled sample data is a temporal subsequence, and its length is the dimension of the data. If the input layer has the same length, it can prevent the data from being truncated or padded with zeros during input, thereby preserving the complete temporal features. It should be noted that the input layer is usually constructed using a fully connected input or a temporal input method. Since this application processes temporal data, a temporal input method is used to ensure that the temporal order of the data is not changed during the input stage.

[0035] In this embodiment, a normalization layer and a multi-layer LSTM are sequentially connected to form the encoder body. The normalization layer can normalize the input data and scale the data to a preset numerical range. It should be noted that this operation can avoid model training bias caused by excessive differences in the numerical range of the data, and at the same time improve the training convergence speed of the model. The design of the multi-layer LSTM is based on the high-dimensional characteristics of clock difference data. The first layer of LSTM is responsible for initially extracting shallow temporal features of the data and removing some redundant information. Subsequent layers of LSTM further extract deep and complex temporal correlation features based on the shallow features, and finally output a vector that can represent the core features of the data.

[0036] In this embodiment, two independent fully connected layers are connected at the encoder output, outputting the mean and variance of the features respectively. It should be noted that this is one of the core designs of the VAE architecture—VAE does not directly output fixed feature vectors, but rather outputs parameters of a probability distribution that the features follow. This increases the generalization ability of the features through probability distribution modeling and avoids model overfitting. The dimension of the fully connected layers is consistent with the feature dimension, and each fully connected layer needs to output the same number of mean or variance parameters as the feature dimension to fully describe the feature distribution. For example, if the feature dimension is d, then the output dimension of both fully connected layers is d, corresponding to the mean and variance of d feature dimensions respectively. These parameters together constitute the approximate posterior distribution of the features, providing a basis for subsequent feature sampling.

[0037] In an optional embodiment, the decoder construction step of the VAE-LSTM module includes: The mean and variance of the encoder output are sampled dimension by dimension to obtain a feature vector with the same dimension as the feature dimension; The feature vectors are input into a 16-dimensional fully connected layer for dimensional expansion. Three layers of LSTM with dimensions of 16, 64, and 256 are sequentially connected to capture temporal correlations; Connect a fully connected layer with the same length as the original clock difference data to output the reconstructed clock difference data.

[0038] In this embodiment, the mean and variance of the encoder output are sampled dimension-by-dimensionally to obtain a feature vector. It should be noted that this dimension-by-dimensional sampling operation is based on the probability distribution of the encoder output—for each feature dimension, a value is randomly selected from the normal distribution of that dimension according to its corresponding mean and variance. The values ​​of all dimensions are combined to form the feature vector. This operation introduces randomness, enhances the generalization ability of the features, and avoids the model from over-relying on specific features of the training samples. It is important to emphasize that this sampling process is not completely random, but is constrained by the mean and variance to ensure that the sampled features still reflect the core information of the original data.

[0039] In this embodiment, the feature vector is input to a fully connected layer for dimensional expansion. This fully connected layer can map the low-dimensional feature vector to a vector that matches the output dimension of the last LSTM layer of the encoder. It should be noted that this is to prepare for the subsequent LSTM layer to capture temporal correlations - the LSTM layer of the decoder needs to receive inputs that are compatible with the output dimension of the encoder's LSTM layer in order to effectively restore the temporal structure of the original data. This application is not limited to this. The number of fully connected layers for dimensional expansion can be adjusted according to the difference between the feature dimension and the LSTM input dimension. If the difference is small, it can also be achieved through a single fully connected layer.

[0040] In this embodiment, multiple LSTM layers are sequentially connected to capture temporal correlations. The function of these LSTM layers is the opposite of that of the encoder's LSTM layers—the encoder's LSTM layers perform dimensionality reduction and feature extraction on the original time-series data, while the decoder's LSTM layers, based on feature vectors, progressively reconstruct the temporal correlation structure of the original data, reconstructing the complete time-series sequence from the low-dimensional feature representation. It should be noted that the dimensionality design of the decoder's LSTM layers is typically symmetrical to that of the encoder's LSTM layers. This symmetrical structure helps improve the accuracy of data reconstruction, ensuring that the reconstructed clock difference data approximates the original data as closely as possible.

[0041] In this embodiment, a fully connected layer with the same length as the original clock difference data is connected to output reconstructed clock difference data. This fully connected layer can map the temporal feature vector output by the decoder LSTM layer to a sequence with the same length as the original clock difference data. It should be noted that reconstructing the clock difference data can verify the effectiveness of the feature vector. If the difference between the reconstructed data and the original data is small, it means that the feature vector has completely preserved the information of the original data and can be used for subsequent fault classification. Otherwise, the parameters of the encoder and decoder need to be adjusted to optimize the feature extraction effect.

[0042] In an optional embodiment, the construction steps of the feature fault classifier include: The feature vector output by the encoder is used as input; A two-layer LSTM and a fully connected layer are connected sequentially, and the output dimension of the fully connected layer is consistent with the number of categories of the labeled samples; The fully connected layer outputs preliminary identification results corresponding to the fault category.

[0043] In this embodiment of the application, the feature vector output by the encoder is used as the input. It should be noted that the feature vector is a low-dimensional vector obtained by the encoder after feature compression and extraction of the original clock difference data. It has removed redundant information in the original data and only retains the features related to the atomic clock's operating state. Using this as input can significantly reduce the computational load of the classifier, while avoiding redundant information from interfering with classification judgment, thereby improving classification efficiency and accuracy.

[0044] In this embodiment, a two-layer LSTM is sequentially connected. While the feature vector has already extracted core features, it still contains temporal correlation information, such as the trend of feature changes over time. The two-layer LSTM can further capture these temporal correlations, especially the evolution of fault features along the feature dimension. For example, frequency drift faults may exhibit a linear trend along the feature dimension. It should be noted that the two-layer LSTM structure effectively avoids the problem of single-layer LSTMs failing to capture long-term temporal correlations, ensuring that the classifier can fully utilize the temporal information of the features.

[0045] In this embodiment, the output dimension of the fully connected layer is consistent with the number of categories of the labeled samples. It should be noted that the output dimension of the fully connected layer must match the number of fault categories in order to output the probability of each category through activation functions such as Softmax, thereby determining the fault category to which the data belongs. For example, if there are 6 fault categories, the output dimension of the fully connected layer is 6, and each output node corresponds to the probability of one type of fault.

[0046] In this embodiment, the fully connected layer outputs a preliminary identification result corresponding to the fault category. It should be noted that the preliminary identification result is a classification judgment based on feature vectors, which can provide a basis for fault identification for the subsequent comprehensive classifier. To further improve robustness, it still needs to be fused with the classification result of the GAN discriminator to form the final identification result.

[0047] In an optional embodiment, the construction steps of the GAN discriminator include: Use real data from labeled samples or data synthesized by the generator as input; The discriminator is formed by sequentially connecting the LeakyReLU activation function layer, the dropout layer, and a two-layer LSTM with dimensions of 128 and 32. Two independent fully connected layers are connected. The first fully connected layer outputs the data authenticity judgment result, and the second fully connected layer outputs the fault category judgment result.

[0048] In this embodiment, either real data from the labeled samples or data synthesized by the generator is used as input. It should be noted that real data refers to the original clock bias data fragments in the labeled samples, which directly reflect the actual operating state of the atomic clock. The data synthesized by the generator is generated by the VAE-LSTM module. This data is reconstructed based on the feature vector output by the encoder, and its distribution is as consistent as possible with the distribution of real data. This can supplement the number of training samples, especially in scenarios where real fault samples are scarce. Using both types of data as input allows the discriminator to simultaneously learn the ability to distinguish between data authenticity and fault category identification.

[0049] In this embodiment, a LeakyReLU activation function layer, a dropout layer, and a two-layer LSTM are connected sequentially. The LeakyReLU activation function layer can solve the problem of neuron death caused by the zero gradient in the negative interval of the traditional ReLU activation function. By setting a small slope in the negative interval, it ensures that the gradient can propagate normally, which is suitable for feature extraction of complex temporal data in this application. The dropout layer can randomly discard some neurons during training to avoid the discriminator from over-relying on a certain feature dimension, thereby preventing overfitting and improving the generalization ability of the model. The two-layer LSTM is used to capture the temporal correlation features of the input data, providing a basis for subsequent authenticity judgment and fault classification. Its dimension design needs to balance feature capture capability and computational efficiency.

[0050] In this embodiment, two independent fully connected layers are connected. It should be noted that these two fully connected layers perform different functions: the first fully connected layer is a authenticity judgment layer, which outputs a probability between 0 and 1 using a sigmoid activation function, where 0 represents synthetic data and 1 represents real data. Its output dimension is typically 1, and its function is to determine whether the input data is real clock difference data. The second fully connected layer is a fault category judgment layer, which outputs the probability of each category using a softmax activation function. Its output dimension is consistent with the number of fault categories, and its function is to identify the fault category corresponding to the input data. This dual-output design allows the discriminator to perform two functions simultaneously, improving the overall performance of the GAN module.

[0051] In an optional embodiment, the sequential training of the VAE-LSTM module, the GAN discriminator, the feature fault classifier, and the comprehensive classifier includes: The first stage trains the VAE-LSTM module, using a loss function that includes a KL divergence term and a reconstruction loss term, and implements gradient propagation through the reparameterization method. The second stage trains the GAN discriminator. First, it trains the binary classification output with binary_crossentropy as the loss function, iteratively updates the generator and the binary classification discriminator, and then trains the multi-class output with sparse_categorical_crossentropy as the loss function. The third stage trains a feature-based fault classifier, using sparse multi-class cross-entropy as the loss function. The fourth stage trains a comprehensive classifier, using multi-class cross-entropy as the loss function, with the input being the feature classification results and the GAN multi-class output results.

[0052] In this embodiment, the first stage trains the VAE-LSTM module. It should be noted that this stage is fundamental to the entire model training – the VAE-LSTM module needs to handle both feature extraction and data reconstruction, and also act as a generator for the GAN module. Therefore, it needs to be trained first to possess stable feature extraction and data generation capabilities. A loss function including a KL divergence term and a reconstruction loss term is used. The KL divergence term measures the difference between the approximate posterior distribution of the encoder output and the preset prior distribution, ensuring the smoothness and generalization of the feature distribution. The reconstruction loss term measures the difference between the reconstructed data output by the decoder and the original data, ensuring that the features completely retain the information of the original data. Gradient propagation is achieved through parameter re-parameterization. The feature sampling process itself is non-differentiable; parameter re-parameterization transforms the sampling process into a differentiable computation process, ensuring that the gradient can propagate back to the encoder and decoder, achieving parameter optimization.

[0053] In this embodiment, the second stage of training the GAN discriminator consists of two steps: binary classification training and multi-class classification training. It's important to note that binary classification training is performed first to determine the authenticity of the data. This allows the discriminator to first learn the ability to distinguish between real and synthetic data. During this process, the generator also optimizes the quality of the synthetic data in the adversarial phase. After the binary classification training stabilizes, multi-class classification training is then performed to identify fault categories. At this point, the discriminator has a good ability to capture temporal features and can further learn the distinguishing features of fault categories, avoiding parameter interference caused by training two tasks simultaneously. Binary cross-entropy is suitable for binary classification tasks and can effectively measure the difference between the true label and the predicted probability; sparse categorical cross-entropy is suitable for multi-class tasks and does not require one-hot encoding of the labels, simplifying the training process.

[0054] In this embodiment, the third stage of training the feature fault classifier should be performed only after the VAE-LSTM module has stabilized. This is because the classifier's input is the feature vector output by the VAE encoder, and the classifier's training is only effective when the feature vector stably reflects the core information of the original data. Sparse multi-class cross-entropy is used as the loss function for the same reason as multi-class training of GAN discriminators: it simplifies the label processing flow and effectively measures the difference between the classification prediction results and the true labels, ensuring that the classifier can accurately identify the fault category corresponding to the feature.

[0055] In this embodiment, the fourth stage of training the integrated classifier involves fusing and optimizing the multi-classification outputs of the first two classifiers: the feature-based fault classifier and the GAN discriminator. Therefore, this stage must be performed after the two classifiers have stabilized. Multi-class cross-entropy is used as the loss function. The output of the integrated classifier remains the fault category probability. This loss function effectively measures the difference between the fused prediction and the true label. The input consists of the feature classification result and the GAN multi-classification output. These two results are based on low-dimensional implicit features and original temporal features, respectively. Fusing them combines the advantages of both types of features, further improving the accuracy and robustness of fault identification. This application is not limited to this; more complex algorithms such as attention mechanisms can also be used to dynamically adjust the weights of the two results.

[0056] In an optional embodiment, the step of employing a loss function that includes a KL divergence term and a reconstruction loss term, and implementing gradient propagation through the reparameter method, includes: The loss function is set as a weighted sum of the KL divergence term and the reconstruction loss term, where the KL divergence term is used to measure the information loss between the approximate distribution of the encoder output and the preset posterior conditional probability distribution, and the reconstruction loss term is used to measure the difference loss between the reconstructed clock error data and the original clock error data in the decoder output. A random vector with the same feature dimension is drawn from a standard normal distribution. The dimension of the random vector is the same as the mean and variance dimensions of the encoder output. Based on the random vector, the mean and variance of the encoder output, a gradient-propagable feature vector is calculated using a preset formula. The feature vector is input into the decoder, and after being processed by the fully connected layer and LSTM layer of the decoder, the reconstructed clock difference data with the same length as the original clock difference data is output. Based on the mean and variance of the encoder output, the KL divergence values ​​of the approximate distribution and the posterior conditional probability distribution are calculated using the KL divergence formula and used as the KL divergence term. Using the reconstructed clock error data and the original clock error data as input, the negative value of the difference between the two is calculated through the log-likelihood function and used as the reconstruction loss term; The KL divergence term and the reconstruction loss term are added together with preset weights to obtain the total loss of the VAE-LSTM module; Using the Adam optimizer, based on the total loss, the weights and biases of the encoder and decoder are updated with backward gradients to complete one round of training iteration. Then, a random vector with the same feature dimension is drawn from the standard normal distribution until the total loss converges.

[0057] In this embodiment, the loss function is set as a weighted sum of the KL divergence term and the reconstruction loss term. It should be noted that introducing weights can balance the influence of the two losses. If the weight of the KL divergence term is too large, it may cause the features to excessively approximate the prior distribution, losing fault features from the original data. If the weight of the reconstruction loss term is too large, it may cause the feature distribution to become chaotic, reducing generalization ability. The weight values ​​need to be adjusted according to the model performance during training to achieve the optimal balance. Specifically, the KL divergence term measures the information loss, referring to the difference between the distribution described by the mean and variance of the encoder output and the preset posterior conditional probability distribution. The smaller this difference, the smoother the feature distribution. The reconstruction loss term measures the difference loss, specifically referring to the numerical difference between the reconstructed clock difference data output by the decoder and the original clock difference data at each time step. The smaller this difference, the more complete the original data information is retained in the features.

[0058] In this embodiment, random vectors are drawn from a standard normal distribution. It should be noted that the dimension of these random vectors must be consistent with the feature dimension, as each feature dimension requires reparameterization calculation. The drawing process is implemented using a random number generation algorithm, and re-drawing is required for each training iteration to introduce appropriate randomness and avoid model overfitting. Feature vectors are calculated using a preset formula based on the random vector, mean, and variance. This preset formula transforms the sampling process into the form of mean + square root of variance × random vector. It should be noted that this form transfers the randomness of the sampling process to the random vector, while the mean and variance, as model parameters, can participate in gradient calculation, thereby achieving backpropagation of the gradient and solving the problem of the non-differentiable sampling process.

[0059] In this embodiment, the feature vector is input into the decoder to obtain reconstructed clock error data. It should be noted that this process is consistent with the decoder's construction logic—expanding the dimension through a fully connected layer, capturing temporal correlations through an LSTM layer, and mapping the output layer to the original length sequence. The final reconstructed data is a representation of the feature vector, and its difference from the original data directly reflects the effectiveness of the features. The KL divergence value is calculated based on the mean and variance of the encoder output using the mathematical formula for KL divergence, eliminating the need for complex integral calculations and making it suitable for efficient model training. The reconstruction loss term is calculated using the log-likelihood function, specifically by taking the negative value of the logarithm of the difference between the reconstructed data and the original data. The smaller this value, the higher the reconstruction accuracy.

[0060] In this embodiment, the Adam optimizer is used to update parameters based on the total loss. It should be noted that the Adam optimizer combines the advantages of momentum gradient descent and adaptive learning rate, which can converge quickly and is not easy to get stuck in local optima. It is suitable for training the complex VAE-LSTM module in this application. The training is iterated until the total loss converges. The standard for judging convergence is usually that the total loss value no longer decreases significantly after multiple consecutive iterations. At this time, it indicates that the model parameters have become stable and the feature extraction and data reconstruction capabilities have reached the optimal level.

[0061] In an optional embodiment, the second stage of training the GAN discriminator includes: With fixed generator weights, train the discriminator's binary classification output using real and synthetic data, and update the discriminator weights. With the discriminator weights fixed, train the generator to generate synthetic data that conforms to the distribution of real data, and then update the generator weights. Repeat the process of fixing the generator weights and the discriminator weights until the model stabilizes, then switch to multi-class output training. The discriminator's multi-class output is trained using real data from labeled samples, and the discriminator weights are iteratively updated until the model stabilizes.

[0062] In this embodiment, the generator weights are fixed to train the discriminator's binary classification output. It should be noted that the reason for fixing the generator weights is to avoid changes in the generator parameters during the discriminator's training process, which would cause instability in the discriminator's training objective. The training objective at this time is to enable the discriminator to accurately distinguish between real data and synthetic data generated by the current generator. The training data consists of real data and synthetic data. The real data is the original data in the labeled samples, and the synthetic data is the reconstructed data generated by the generator based on features. Corresponding real labels need to be labeled for the two types of data. The difference between the predicted probability and the real label is calculated using the binary_crossentropy loss function, and then the discriminator's weights are updated.

[0063] In this embodiment, the generator is trained with fixed discriminator weights. It should be noted that the reason for fixing the discriminator weights is to allow the generator to learn how to generate synthetic data that can deceive the current discriminator. The training goal at this time is to improve the authenticity of the synthetic data. During the training process, the generator receives the original data or its features, generates synthetic data, and inputs it into the binary classification output layer of the discriminator. Based on the discriminator's prediction probability of the authenticity of the synthetic data, the generator's weights are updated through the binary_crossentropy loss function, so that the distribution of the synthetic data is closer to the distribution of the real data.

[0064] In this embodiment, the fixed-weight training is repeated until the model is stable. The standard for judging the stability of the model is usually that the classification accuracy of the discriminator on real data and synthetic data tends to be stable, indicating that the generator and discriminator have reached Nash equilibrium, or the reconstruction accuracy of the generated data no longer significantly improves. When switching to multi-class output training, real data of labeled samples should be used as training data. Each data point is labeled with the corresponding fault category label. The difference between the multi-class output of the discriminator and the real label is calculated by the sparse_categorical_crossentropy loss function, and the weight of the discriminator is updated. At this time, the weight of the generator remains fixed to ensure that the discriminator can focus on learning the distinguishing features of the fault category.

[0065] In this embodiment, the discriminator weights are iteratively updated until the model is stable. The stability criterion here is that the classification accuracy of the discriminator for fault categories no longer improves significantly after multiple iterations, indicating that the discriminator has a good fault category recognition capability, and training can be stopped and the subsequent comprehensive classifier training stage can begin.

[0066] The following provides a detailed description of the specific scenarios and steps involved in this application.

[0067] like Figure 2 The model architecture diagram shown, combined with Figure 2As shown, this model utilizes VAE to learn the implicit low-dimensional feature representation of clock difference sequences, combines it with LSTM to capture the long-term dependencies and dynamic changes of time series, and improves the model's recognition accuracy through GAN adversarial training to increase training samples. This hybrid model uses VAE-LSTM as the generator of the GAN. The first step uses a multi-layer LSTM as the encoder of the VAE, encoding the input time series data into a latent spatial distribution representing its feature information, represented by mean and variance. The second step samples feature vectors from this distribution, and then uses another multi-layer LSTM as the decoder of the VAE to reconstruct the feature vectors back into the original data space. Simultaneously, an LSTM is introduced to identify the category of the input data based on the feature vectors. The third step treats the entire VAE-LSTM structure as the generator of the GAN, and then introduces another multi-layer LSTM as the discriminator. Specifically, the discriminator has two outputs: one output determines whether the input data is real data or data synthesized by the generator; the other output determines the category of the input data, classified according to sample labels as: normal, unlocked, frequency jump, frequency drift, stability deterioration, and others. Finally, the output identified from the feature space and the fault classification output from the GAN discriminator are merged using a fully connected layer to output the comprehensive fault category.

[0068] In some embodiments, a method for identifying atomic clock faults based on VAE-LSTM-GAN includes the following specific steps: Step 1: Atomic Clock Error Data Collection and Preprocessing Let the length of the collection be The original clock difference data is Based on the fluctuations in clock bias, the collected data is processed according to a given length. The faults are broken down and labeled as normal, unlocked, frequency jump, frequency drift, stability deterioration, and other fault categories, resulting in... One sample.

[0069] The second step is to construct a VAE-LSTM-GAN hybrid model. The hybrid model is constructed in three parts: the encoder and decoder of the VAE model, the LSTM-based classifier, and the GAN composed of VAE-LSTM as the generator and LSTM classifier.

[0070] Firstly, LSTM introduces a threshold mechanism on top of RNN, solving the gradient explosion or vanishing problem during training, making it particularly suitable for handling long-term dependencies and short-term variations in time series data. The activation functions used in LSTM models are primarily... and Two categories, with corresponding expressions as follows:

[0071] and .

[0072] The computation of the basic unit of LSTM involves four steps.

[0073]

[0074]

[0075]

[0076] in, For deviation, For input, For the memory of the network, As weight, , , These are temporary data within the basic LSTM module, where t represents the timing sequence and h represents the time series. t-1 d represents the hidden memory data from the previous moment. t-in This indicates the clock difference data at each time step on the input side. The other letters represent specific information, which can be found in the existing LSTM model architecture. This application will not elaborate on this further.

[0077] Secondly, VAE is a generative model architecture. Its network structure has large dimensions at both ends, corresponding to the input and generated data respectively, and a small dimension in the middle, corresponding to the features. By training this network, the weights of the features are obtained by mapping the original data. The VAE structure consists of an encoder and a decoder. The encoder is responsible for compressing the original data and extracting features, while the decoder is responsible for restoring the original data from the compressed features. This generative model architecture can be implemented with different network connections to adapt to different application scenarios. This paper uses LSTM as the basis of VAE to process atomic clock error data and identify the fault categories of atomic clocks.

[0078] The following section describes the construction of a VAE-LSTM model based on LSTM.

[0079] With a data length A consistent input layer serves as the entry point for clock bias data. Then, three LSTM layers with dimensions of 256, 64, and 16 are used sequentially to form an encoder. To ensure the stability of the model, a normalization layer is connected before each LSTM layer.

[0080] Using two independent dimensions as feature dimensions The fully connected layers serve as the mean and variance of each feature, respectively.

[0081] The VAE decoder section, based on the mean and variance from the previous step, samples one value for each dimension, for a total of... The dimension is used as input to the decoder, and then expanded with a 16-dimensional fully connected layer. Three LSTM layers with dimensions of 16, 64, and 256 are used to capture temporal correlations, and finally, a layer with dimensions equal to the data length is connected. A consistent fully connected layer recovers the original, equal-length clock difference data from the feature representation.

[0082] To more accurately identify the type of atomic clock malfunction, we will use the encoder as an example. The input consists of a feature dimension, followed by a two-layer LSTM and a fully connected layer that labels the original data categories, used to identify the fault category based on the features.

[0083] Then, considering that different atomic clocks have different inherent characteristics, and to avoid having too high requirements for the training dataset, a GAN architecture is introduced. This architecture uses sample-based synthetic data to assist model training, achieving higher accuracy on a smaller dataset. GAN consists of two parts: a generative model and a discriminative model. The previously mentioned VAE-LSTM is the generative model of GAN, so we will directly construct the discriminative model of GAN next.

[0084] Considering that in addition to distinguishing whether the data is real or synthetic, the fault category must also be determined for real data, the GAN's discrimination model is designed to have multiple outputs, with the main part of the model still based on LSTM.

[0085] The main body uses a 128-dimensional, 32-dimensional dual-layer LSTM, combined with the LeakyReLU activation function and droupout layer to avoid overfitting.

[0086] It is followed by two independent fully connected layers, which are used to determine whether the data is real or synthetic and to determine the type of atomic clock failure in the real input data.

[0087] Finally, to improve the accuracy of fault category identification, a fully connected layer is added to combine the output of the VAE encoder's compressed features with the GAN's discriminator output, resulting in a comprehensive fault category identification.

[0088] The third step is to train the VAE-LSTM-GAN hybrid model. As can be seen from the model construction process above, this hybrid model is quite complex and requires phased training. Model training mainly involves the selection of the loss function and the optimizer. Here, the Adam optimizer is chosen for all optimizations.

[0089] The first stage involves training the VAE-LSTM model. The training process for the VAE involves finding an approximate distribution that maximizes the log-likelihood of the samples while minimizing the KL divergence between the approximate distribution and the posterior conditional probability distribution. Its loss function is as follows:

[0090]

[0091] in Represented by probability distribution Approximate probability distribution Information loss; The sample comes from the parameter. The probability of the distribution is represented by the negative logarithm of the reconstruction loss.

[0092] To facilitate gradient propagation during training, a reparameterization method is employed, introducing random variables during the sampling process:

[0093]

[0094] Where q is the variational approximation distribution, and N is the normal distribution. For the VAE encoder, the i-th input sample The output mean vector, It is the VAE encoder for the i-th input sample The output variance vector, where I represents the identity matrix.

[0095] The second stage involves training the GAN discriminator. Based on the network structure, different loss functions are used for the two different outputs. For binary classification, `binary_crossentropy` is used to determine whether the input is a true input or a synthetic input. For fault category recognition, since it's a multi-class classification problem, `sparse_categorical_crossentropy` is used as the loss function. The expression for cross-entropy is:

[0096] K is the number of samples involved in the calculation, S is the loss function, j is the j-th input sample, and y j For the j-th atomic clock sample, The model predicts the probability that the j-th atomic clock sample belongs to label y.

[0097] Here, a multi-round iterative training approach is used to update the GAN weights. First, the model is trained using a binary classification output segment. Then, the generative model of VAE-LSTM and the binary classification discriminative model of the GAN are iteratively updated. Once the model stabilizes, the output is switched to multi-class classification, and training is performed using real data. Because multi-class training affects the LSTM weights, two different outputs are used iteratively for GAN training until the model stabilizes.

[0098] The third-stage feature-based fault identification classifier For the fault category identification part, which takes the VAE compressed feature output as input, sparse multi-class cross-entropy is used as the loss function for training.

[0099] The fourth stage trains a classifier that integrates the original data and features. By using multi-class cross-entropy as the loss function, a fully connected layer is trained with feature output and GAN multi-class output as input, thereby improving the model's recognition accuracy.

[0100] The fourth step is to use the VAE-LSTM-GAN model to predict the fault category. Test data with the same input dimension as the model is input into the model. First, the VAE's encoder maps the input data to a feature dimension. Then, this feature is used as input to the classifier to directly identify the category of the input data. At the same time, the discrete multi-class output part of the GAN's discriminator, which directly feeds the raw data, also identifies the category of the data. The outputs of these two parts are used as input to the model trained in the fourth stage above, finally obtaining the fault identification result corresponding to the input data.

[0101] As can be seen, the atomic clock fault identification method based on VAE-LSTM-GAN disclosed in this application utilizes the ability of LSTM to characterize both long and short time-series data, combined with the feature compression and extraction advantages of the VAE architecture, to extract features of different types of faults from the collected clock difference data. Simultaneously, the extracted features are passed through LSTM layers and fully connected layers as one method for final discrimination. To improve the model's accuracy, a GAN architecture is used, with VAE-LSTM as the generator and a dual-head network based on LSTM as the discriminator. This enables the identification of real and synthetic data, as well as fault category identification based on the original data. This type identification serves as another method for final discrimination. Finally, a fully connected network combines the two discrimination methods, achieving an intuitive method for atomic clock fault category identification.

[0102] This application also provides an atomic clock fault identification system based on VAE-LSTM-GAN, such as... Figure 3 As shown, it includes: Collection module 11 collects the raw clock error data of the atomic clock, splits the data according to a given length and labels the fault categories to obtain labeled samples; Module 12 is used to construct a VAE-LSTM-GAN hybrid model. The VAE-LSTM-GAN hybrid model includes a VAE-LSTM module with an encoder and decoder, a feature fault classifier extended from the VAE-LSTM module, and a GAN module with a GAN discriminator. It also includes a comprehensive classifier constructed based on the outputs of the VAE-LSTM module and the feature fault classifier. The VAE-LSTM module serves as the generator for the GAN module. Training module 12 sequentially trains the VAE-LSTM module, GAN discriminator, feature fault classifier and comprehensive classifier, using corresponding loss function and Adam optimizer to complete the training; The identification module 14 inputs the test data into the trained model, maps features through the VAE encoder and identifies the first result through the feature fault classifier, and simultaneously identifies the second result through the multi-class output of the GAN discriminator. The first and second results are input into the comprehensive classifier to obtain the atomic clock fault category.

[0103] It is understood that the technical effect of the atomic clock fault identification system based on VAE-LSTM-GAN provided in this application is the same as the technical effect of the method embodiment in the foregoing embodiments, and this application will not elaborate on this.

[0104] This application uses specific embodiments to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for identifying atomic clock faults based on VAE-LSTM-GAN, characterized in that, include: Collect raw clock error data of atomic clocks, split the data according to a given length, and label the fault categories to obtain labeled samples; A VAE-LSTM-GAN hybrid model is constructed, which includes a VAE-LSTM module with encoder and decoder, a feature fault classifier extended from the VAE-LSTM module, a GAN module with GAN discriminator, and a comprehensive classifier constructed based on the output of the VAE-LSTM module and the feature fault classifier; wherein the VAE-LSTM module serves as the generator of the GAN module. The VAE-LSTM module, GAN discriminator, feature fault classifier and comprehensive classifier are trained sequentially, using corresponding loss function and Adam optimizer to complete the training; The test data is input into the trained model, the features are mapped by the VAE encoder and identified by the feature fault classifier to obtain the first result, and the GAN discriminator is used to identify the multi-class output to obtain the second result. The first and second results are input into the integrated classifier to obtain the atomic clock fault category.

2. The method according to claim 1, characterized in that, The process involves collecting raw clock bias data from atomic clocks, splitting the data into segments of a given length, and labeling each segment with a fault category to obtain labeled samples, including: Collect raw clock error data of atomic clocks with a preset length; Based on the clock error fluctuation, the original clock error data is divided into multiple data segments according to a set length; Each data segment is labeled with a category, including normal, unlocked, frequency jump, frequency drift, and stability deterioration, to obtain a preset number of labeled samples.

3. The method according to claim 1, characterized in that, The encoder construction steps of the VAE-LSTM module include: The input layer, with the same length as the labeled sample data, serves as the entry point for clock error data. The encoder body is formed by sequentially connecting the normalization layer and a three-layer LSTM with dimensions of 256, 64, and 16. Two independent fully connected layers are connected at the encoder output to output the mean and variance of the features, respectively. The dimensions of the fully connected layers are consistent with the feature dimensions.

4. The method according to claim 3, characterized in that, The decoder construction steps of the VAE-LSTM module include: The mean and variance of the encoder output are sampled dimension by dimension to obtain a feature vector with the same dimension as the feature dimension; The feature vectors are input into a 16-dimensional fully connected layer for dimensional expansion. Three layers of LSTM with dimensions of 16, 64, and 256 are sequentially connected to capture temporal correlations; Connect a fully connected layer with the same length as the original clock difference data to output the reconstructed clock difference data.

5. The method according to claim 3, characterized in that, The steps for constructing the feature-based fault classifier include: The feature vector output by the encoder is used as input; A two-layer LSTM and a fully connected layer are connected sequentially, and the output dimension of the fully connected layer is consistent with the number of categories of the labeled samples; The fully connected layer outputs preliminary identification results corresponding to the fault category.

6. The method according to claim 1, characterized in that, The steps for constructing the GAN discriminator include: Use real data from labeled samples or data synthesized by the generator as input; The discriminator is formed by sequentially connecting the LeakyReLU activation function layer, the dropout layer, and a two-layer LSTM with dimensions of 128 and 32. Two independent fully connected layers are connected. The first fully connected layer outputs the data authenticity judgment result, and the second fully connected layer outputs the fault category judgment result.

7. The method according to claim 1, characterized in that, The sequential training of the VAE-LSTM module, GAN discriminator, feature fault classifier, and comprehensive classifier includes: The first stage trains the VAE-LSTM module, using a loss function that includes a KL divergence term and a reconstruction loss term, and implements gradient propagation through the reparameterization method. The second stage trains the GAN discriminator. First, it trains the binary classification output with binary_crossentropy as the loss function, iteratively updates the generator and the binary classification discriminator, and then trains the multi-class output with sparse_categorical_crossentropy as the loss function. The third stage trains a feature-based fault classifier, using sparse multi-class cross-entropy as the loss function. The fourth stage trains a comprehensive classifier, using multi-class cross-entropy as the loss function, with the input being the feature classification results and the GAN multi-class output results.

8. The method according to claim 7, characterized in that, The step of using a loss function that includes a KL divergence term and a reconstruction loss term, and implementing gradient propagation through the reparameter recalculation method, includes: The loss function is set as a weighted sum of the KL divergence term and the reconstruction loss term, where the KL divergence term is used to measure the information loss between the approximate distribution of the encoder output and the preset posterior conditional probability distribution, and the reconstruction loss term is used to measure the difference loss between the reconstructed clock error data and the original clock error data in the decoder output. A random vector with the same feature dimension is drawn from a standard normal distribution. The dimension of the random vector is the same as the mean and variance dimensions of the encoder output. Based on the random vector, the mean and variance of the encoder output, a gradient-propagable feature vector is calculated using a preset formula. The feature vector is input into the decoder, and after being processed by the fully connected layer and LSTM layer of the decoder, the reconstructed clock difference data with the same length as the original clock difference data is output. Based on the mean and variance of the encoder output, the KL divergence values ​​of the approximate distribution and the posterior conditional probability distribution are calculated using the KL divergence formula and used as the KL divergence term. Using the reconstructed clock error data and the original clock error data as input, the negative value of the difference between the two is calculated through the log-likelihood function and used as the reconstruction loss term; The KL divergence term and the reconstruction loss term are added together with preset weights to obtain the total loss of the VAE-LSTM module; Using the Adam optimizer, based on the total loss, the weights and biases of the encoder and decoder are updated with backward gradients to complete one round of training iteration. Then, a random vector with the same feature dimension is drawn from the standard normal distribution until the total loss converges.

9. The method according to claim 7, characterized in that, The second stage of training the GAN discriminator includes: With fixed generator weights, train the discriminator's binary classification output using real and synthetic data, and update the discriminator weights. With the discriminator weights fixed, train the generator to generate synthetic data that conforms to the distribution of real data, and then update the generator weights. Repeat the process of fixing the generator weights and the discriminator weights until the model stabilizes, then switch to multi-class output training. The discriminator's multi-class output is trained using real data from labeled samples, and the discriminator weights are iteratively updated until the model stabilizes.

10. An atomic clock fault identification system based on VAE-LSTM-GAN, characterized in that, include: The collection module collects raw clock error data from atomic clocks, splits the data into segments of a given length, and labels the fault categories to obtain labeled samples. The module constructs a VAE-LSTM-GAN hybrid model, which includes a VAE-LSTM module with encoder and decoder, a feature fault classifier extended from the VAE-LSTM module, and a GAN module with GAN discriminator. It also includes a comprehensive classifier constructed based on the outputs of the VAE-LSTM module and the feature fault classifier; wherein the VAE-LSTM module serves as the generator of the GAN module. The training module sequentially trains the VAE-LSTM module, GAN discriminator, feature fault classifier and comprehensive classifier, using corresponding loss function and Adam optimizer to complete the training. The identification module inputs test data into the trained model, maps features through the VAE encoder, and identifies the first result through the feature fault classifier. At the same time, it identifies the second result through the multi-class output of the GAN discriminator. The first and second results are input into the comprehensive classifier to obtain the atomic clock fault category.