Switch machine fault diagnosis system and method based on distribution difference and domain confrontation
Patent Information
- Application Number
- CN202610887294.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-06-18
AI Technical Summary
[0005]针对铁路道岔转辙机故障诊断存在模型泛化性能不足、故障样本稀缺、多故障并发诊断能力弱的问题,提出了一种基于分布差异和领域对抗训练的铁路道岔转辙机故障诊断系统及方法
1、本发明对铁路道岔转辙机运行的健康状态进行识别和管理,便于设备管理人员和企业管理者对所有设备的健康状况有更全面的了解,也便于进行更精细化的管理,解决了提出的问题。针对工业场景中样本匮乏及分布不一致的挑战,系统利用数据增强与领域对齐机制实现信号样本的均衡化扩充,有效抑制了不同运行环境导致的特征分布显著偏移。这极大提升了深度学习模型的泛化增益,为轨道交通系统在复杂工况下的安全稳健运行提供了高可靠的技术保障与决策支撑。
Smart Images

Figure CN122413089B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial equipment fault diagnosis technology, and in particular to a fault diagnosis system and method for turnout switching machines based on distribution differences and domain adversarial mechanisms. Background Technology
[0002] With the acceleration of global urbanization, urban rail transit has become a critical transportation infrastructure. By the end of 2023, the total operating mileage of China's rail transit system had exceeded 10,000 kilometers, with a significant increase in passenger volume. In the railway system, the turnout switch machine, as the core equipment for track switching, directly affects train dispatching safety and operational efficiency with its accuracy and reliability. Therefore, achieving accurate fault diagnosis of the turnout switch machine is a crucial guarantee for improving system safety and avoiding major operational accidents; its reliability has become a key factor affecting the transportation efficiency and safety of the rail transit system.
[0003] Taking a subway operating system in Zhejiang as an example, facing a large network with a daily passenger flow of over 4 million and an operating mileage of over 500 kilometers, its turnout equipment needs to complete over 10 million high-precision switching operations every year.
[0004] However, current engineering practice faces three major challenges. First, the generalization performance of the models is insufficient, and most models are unstable on different lines or equipment. Second, fault samples are scarce, and it is difficult to collect actual fault data (the failure rate of turnout switch machines is too low), especially rare faults. Third, the ability to diagnose multiple faults concurrently is weak, and the accuracy of diagnosing complex faults is low. Summary of the Invention
[0005] To address the shortcomings in railway turnout switch machine fault diagnosis, such as insufficient model generalization performance, scarce fault samples, and weak ability to diagnose multiple concurrent faults, a fault diagnosis system and method for railway turnout switch machines based on distributional differences and domain adversarial training are proposed. Through digital monitoring of the entire line's operational status, a panoramic management of equipment health is achieved, enhancing management decision-making efficiency and empowering lean closed-loop management of rail transit operations.
[0006] The technical solution of this invention is as follows: A fault diagnosis system for railway turnout switching machines based on distributional differences and domain adversarial training includes: The data management module collects equipment operation data in real time, and stores the data in batches in the source domain database and target domain database within the data management module after preprocessing the data. The data augmentation module is used to augment the data in the source and target domains, and then store the augmented data in the source and target databases respectively. The feature extraction and fusion module extracts features from the three-phase current signals and fuses the extracted features through channels to obtain a comprehensive feature vector. The feature alignment module is used to measure the joint distribution distance of features in the source and target domains in the reproducing kernel Hilbert space and to align the feature distributions. The fault diagnosis module uses adversarial training between the domain discriminator and the feature extraction layer to extract rich features with domain invariance, and then uses a label predictor to output fault classification results. The data management module uses an integrated circuit sensing matrix to perform real-time situational awareness of the switch machine's full switching operation. After acquiring the original electrical signals, it performs adaptive noise reduction and hierarchical sampling preprocessing, and stores the heterogeneous data in the source domain database and the target domain database based on domain migration logic. The data augmentation module utilizes an improved vector quantization variational autoencoder (IVAE) to deeply reconstruct the latent space probability distributions of the source and target domains, and expands the manifold coverage of scarce fault samples through generative representation learning. The aim is to enhance the generalization robustness of the model on imbalanced datasets by increasing the abundance of samples. The feature extraction and fusion module uses a three-way parallel convolutional neural network (TripleCNN) to perform modally independent deep feature mining on the three-phase current signal. It uses a channel attention mechanism to perform nonlinear tensor concatenation on the extracted physical coupling features to achieve deep fusion and feature representation of high-dimensional feature vectors. The feature alignment module introduces the Joint Distribution Maximum Mean Difference (JMMD) to map heterogeneous features to a high-dimensional reproducing kernel Hilbert space (RKHS). By collaboratively minimizing the edge distribution and conditional distribution offset between the source and target domains, it achieves accurate distribution alignment of cross-domain feature manifolds, thereby eliminating the domain offset phenomenon. The fault diagnosis module integrates a label predictor, a domain discriminator, and a gradient inversion layer (GRL). It constructs a zero-sum game adversarial mechanism during the backpropagation of the neural network. Through the collaborative evolution of the feature extraction layer and the domain discriminator, it eliminates environmental interference and equipment difference information, thereby extracting essential fault features with domain-invariant properties. The label predictor then outputs a high-confidence fault diagnosis decision.
[0007] A fault diagnosis method for railway turnout switch machines based on distributional differences and domain adversarial training includes the following steps: Step S1: The data management module is used to collect the raw three-phase current data of the turnout switch machine and divide it into source domain dataset and target domain dataset. Step S2: The data augmentation module first uses Gramian Angular Field (GAF) encoding technology to map a one-dimensional time series signal into a two-dimensional image representation with spatial topological features. Then, relying on the improved Vector Quantization Variational Autoencoder (IVAE) model, variational inference and probabilistic modeling are performed on the latent space distribution of the source and target domains to generate high-fidelity synthetic samples to achieve cross-domain equalization expansion of the dataset. The augmented heterogeneous data is then fed back to the source and target domain databases, respectively. Step S3: The feature extraction and fusion module retrieves high-performance training samples from the database and uses a parallel architecture of a three-way convolutional neural network (TripleCNN) to perform multi-scale feature decoupling and high-dimensional mapping on the three-phase current signal. The aim is to extract deep physical features with strong discriminative power from non-stationary time-series fluctuations, and then use a channel attention mechanism to fuse the features. Step S4, the feature alignment module and fault diagnosis module, adopts Domain Adversarial Network and Joint Distribution Maximum Mean Difference (JMMD) as the measurement criteria to map the fused features to the Regenerative Kernel Hilbert Space (RKHS). By collaboratively minimizing the edge distribution and conditional distribution shift between the source and target domains, accurate cross-domain alignment of the feature manifold is achieved, thereby effectively suppressing the impact of domain shift on diagnostic accuracy. Then, a minimum-maximum optimization mechanism is established between the feature extractor and the domain discriminator using a gradient inversion layer (GRL). During backpropagation, the hyperparameters of the label predictor and the domain discriminator are synchronously corrected through the gradient inversion operator, driving the model to iteratively extract essential fault features with domain invariance. Finally, the diagnostic results are output through the converged label predictor.
[0008] The beneficial effects of this invention are as follows: 1. This invention identifies and manages the health status of railway turnout switching machines, facilitating a more comprehensive understanding of the health status of all equipment for equipment managers and enterprise administrators, and enabling more refined management, thus solving the aforementioned problems. Addressing the challenges of scarce and inconsistent sample distribution in industrial scenarios, the system utilizes data augmentation and domain alignment mechanisms to achieve balanced expansion of signal samples, effectively suppressing significant feature distribution shifts caused by different operating environments. This greatly enhances the generalization gain of deep learning models, providing highly reliable technical assurance and decision support for the safe and robust operation of rail transit systems under complex conditions.
[0009] 2. This invention proposes an improved vector quantization variational autoencoder (IVAE), which adds a self-attention mechanism (SAM) to both the encoder and decoder, and replaces the ReLU activation function with a smoother H-Switch activation function. This greatly improves the efficiency and stability of training and solves the risk of posterior collapse.
[0010] 3. This invention will use a three-way parallel CNN to extract features from the three-phase currents A, B, and C, and fuse the features through a channel attention mechanism.
[0011] 4. This invention introduces Joint Distribution Maximum Mean Difference (JMMD) to reduce the distribution difference of data, and further reduces the training loss through the game training system of Domain Adversarial Network (DANN), and finally outputs the diagnostic results through the converged label predictor.
[0012] In summary, this system enables a significant leap in both the accuracy and robustness of cross-domain model recognition, while effectively mitigating resource waste caused by ineffective maintenance. It optimizes the operation and maintenance decision-making process and constructs a multi-dimensional safety barrier for rail transit systems, demonstrating significant industry application value and economic benefits. Attached Figure Description
[0013] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a flowchart of the system workflow of the present invention; Figure 3 This is a diagram of the IVAE network structure of the data augmentation model of this invention; Figure 4 A comparison chart of the data augmentation module IVAE and the VQ-VAE model; Figure 5 This is a diagram of the Domain Adversarial Neural Network (DANN) in this invention. Figure 6 This is a graph of the Domain Adversarial Neural Network combined with the Joint Distribution Maximum Mean Difference (JMMD-DANN) in this invention. Figure 7 This is a flowchart of the model solution process for this invention; Figure 8 This is a graph showing the accuracy and loss of the model results in this invention; Figure 9 This is a graph showing the F1 score, recall, and precision of the model in this invention. Figure 10 This is a comparative experimental diagram of the present invention; Figure 11 This is a diagram showing the diagnostic results of the generalization performance of the transfer training test in this invention. Detailed Implementation
[0014] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0015] This invention provides a fault diagnosis system and method for railway turnout switch machines based on distribution differences and domain adversarial training, which aims to diagnose and locate faults in railway turnout switch machines with a small sample size and multiple faults. The system and method are described in the invention.
[0016] In the intelligent diagnostic system solution for railway turnout switching machines, such as Figure 1 As shown, it includes a data management module, a data enhancement module, a feature extraction and fusion module, a feature alignment module, and a fault diagnosis module.
[0017] The data management module mainly comprises three functions: data acquisition, data preprocessing, and database management. The data acquisition function collects real-time data from the circuit sensing system on the turnout switch machine and stores it in the database. The real-time data originates from the equipment's operating circuit data, including changes in current and power during operation. The data sampling frequency is 400ms.
[0018] The data preprocessing function is used to standardize the raw data. First, the collected raw data is cleaned, and operations such as deleting outliers and filling in missing values are performed to unify the data format.
[0019] The database management function is used for data transmission between the source domain database and the target domain database. The source domain database uses MySQL to store and manage real-time data, which is used for data analysis functions in the data augmentation and feature extraction / fusion modules. The target domain database stores data on turnouts and switch machines for lines different from those in the source domain database, and is used for data analysis functions in the feature alignment and fault diagnosis modules. When either database receives a data request from another functional module, it will write SQL statements based on the request information to retrieve the corresponding data from its own database and perform the operations for the relevant functional module.
[0020] Note: The source domain database and the target domain database store data from turnout switch machines on different lines. The source domain database stores simulated data of the lines that are out of service (lots of healthy data, few fault data), while the target domain database stores data of the real lines (lots of healthy data, very few fault data).
[0021] The source domain database primarily stores the following types of tables: Table 1. Current and Power Field Information Table
[0022] The target domain database primarily stores the following types of tables: Table 2. Current and Power Field Information Table
[0023] The data augmentation module is used to augment the data from two major databases. First, the data is converted to two dimensions using GAF (Graphical Data Encoding Facility) and then input into the IVAE model. The encoder extracts features from the input data using a convolutional neural network and maps these features to a discrete latent space. The continuous latent space is then mapped to a finite vector dictionary, ensuring that the generated latent representation is discrete. The decoder is responsible for restoring the discrete latent representation output by the encoder back to an approximation of the original data. The decoder also uses a convolutional neural network, taking the discrete latent representation as input and learning the restoration process to generate reconstructed data that is as close as possible to the original data. Furthermore, the IVAE model, based on the original VQ-VAE model, adds a self-attention mechanism to both the encoder and decoder and replaces all ReLU activation functions with H-Switch functions, significantly improving computational efficiency and stability. The augmented data and the original data are then stored separately in the original databases, as detailed below. Figure 3 As shown.
[0024] Figure 3 shows the use of an IVAE model (data augmentation module) to augment the fault data in this paper. This IVAE model takes the images from this paper as input, trains and reconstructs them, resulting in images with a high degree of similarity in mechanism to the original images. The specific reconstruction process is shown below: Step 1: Define a potential embedding space e ∈ R K×D ,in K Represents the size of the discrete latent space. D For each latent embedding vector e i The dimension. This space is composed of... K indivual D The IVAE model receives input from a 3D embedding vector. x Feature extraction is performed through an encoder. The encoder uses convolutional layers and residual blocks (Res-Stack) to capture local features, and finally adds a self-attention mechanism at position (b) to enhance the feature map output by the residual block by calculating global correlation, generating the final encoded output. z e (x) .
[0025] Step 2: Discrete latent variable acquisition and vector quantization. According to equation (1), through the shared embedding space... e Nearest neighbor search is performed to obtain discrete latent variables. z Subsequently, the decoder receives the corresponding embedding vector calculated by equation (2). e kThis forward process is considered as a standard autoencoder with a nonlinear mapping, which projects the latent variables into a... 1-of-K The one-hot encoding is used where if one element is 1, the rest are 0. The full parameters of the IVAE model include the encoder, decoder, and embedding space. e The parameters. Posterior classification distribution. q(z|x) It is determined by the One-hot encoding method described in equation (1), where z e (x) This is the output of the encoder. The IVAE model is considered a variational autoencoder, designed to maximize the data likelihood. p (x) This means that the generated output should closely match the real data, as shown in equation (3).
[0026] Step 3: Encoder output z e (x) After discretization, the nearest neighbor is searched and mapped to the closest element in the embedding space, as shown in Equations (1) and (2).
[0027] (1) (2) (3) (4) In formula (1), x This represents the original input data; Discrete latent variables z The posterior classification distribution; Indicates input data x The continuous feature representation output after being extracted by the encoder; Represents the first in the latent embedding space (i.e., the codebook) j Embedded vectors; L2 norm (Euclidean distance) is used to calculate the distance between the encoder output features and the embedding vector; This indicates the search for the index that minimizes the subsequent distance expression; k This indicates the index number of the embedding vector with the smallest calculated distance.
[0028] In formula (2), This represents the quantized latent variable, which is the result of mapping the continuous output features of the encoder to discrete embedding vectors. This result will be used as the input of the decoder. Indicates that the index in the potential embedding space is k The optimal embedding vector.
[0029] In formula (3), Indicates input data x The marginal likelihood probability is the objective that the model strives to maximize. Representing discrete latent variables z The prior probability distribution; Indicates that given latent variables z Under these conditions, the corresponding data is generated through the decoder. x The conditional probability distribution.
[0030] In formula (4), L This represents the total loss function of the IVAE model; Indicates the reconstruction loss; This represents the gradient cutoff operation. It is treated as a constant during forward propagation of the network, and its partial derivative is zero during backward propagation. It is used to cut off the backpropagation of gradients. This represents the vector quantization (codebook) loss. Its weight coefficients are used to bring the embedding vector closer together. e The embedding space is updated using the distance from the encoder output in this model. Take 1.01; Indicates a commitment to loss, Its weighting coefficients are used to constrain the encoder output. Do not deviate from the selected embedding vector e Too far, in this model Take 0.1.
[0031] Step 4: Next, discrete latent variable modeling is achieved through the three-stage optimization process in the IVAE training framework, which reconstructs the loss, codebook loss (vector quantization loss), and commitment loss, as shown in Equation (4). Specifically, it includes: (1) Reconstruction loss : Calculation using gradient approximation. Although quantization operation z e (x)—>z q (x) It is not differentiable on its own, but by introducing a pass-through estimator (STE), the decoder input can be directly passed during backpropagation. z q (x) The gradient is copied to the encoder output. z e (x) This leads to reconstruction loss. log p(x|z q (x)) It can jointly optimize the encoder and decoder.
[0032] (2) Vector quantization loss The vector quantization loss is generated during the vector quantization process. Here... sg This represents the gradient cutoff (Stop-gradient) operation, which maintains a constant value during forward propagation and has zero partial derivatives during backward propagation.
[0033] (3) Commitment loss By constraining the encoder output to the geometric distance of the selected embedding vector, the latent space is prevented from diverging due to lack of regularization.
[0034] Step 5: The decoder receives the quantized embedding vector, processes it first through a convolutional layer, and then reconstructs the image through a residual block (Res-Stack) before the self-attention mechanism, a self-attention mechanism, and a transposed convolutional layer (ConvTrans) after the self-attention mechanism. After training, high-quality random image generation can be achieved by sampling a discrete distribution and inputting it into the decoder.
[0035] Figure 4 This is a comparison experiment of the models in the data augmentation module. The figure shows that the IVAE model is more stable during training than the original VQ-VAE model, and reaches stability much faster. This significantly improves training efficiency and eliminates the risk of post-training collapse.
[0036] The feature extraction and fusion module employs a three-way parallel convolutional neural network to perform parallel feature mining on the three-phase currents (A, B, and C), aiming to fully extract the local time-series features of each phase current. In the feature fusion stage, a channel attention mechanism is introduced to adaptively weight and fuse the features from multiple channels. This mechanism learns the contribution of each channel's features and dynamically adjusts the weights, effectively enhancing the expressive power of key fault features and suppressing the interference of redundant noise.
[0037] The feature alignment module and fault diagnosis module introduce domain adversarial neural networks and the maximum mean difference of the joint distribution.
[0038] Domain-Adversarial Neural Networks (DANNs) are an important branch of transfer learning. They address the inconsistency between the source and target domains by learning domain-agnostic features through adversarial training, thereby improving the generalization ability and robustness of IVAE models trained in the source domain to the target domain. A schematic diagram of the network structure is shown below. Figure 5 As shown.
[0039] The feature extractor maps source and target domain samples to a shared domain-invariant feature space for feature alignment, merging the feature distributions of the source and target domains. This prevents the domain discriminator from distinguishing whether a feature originates from the source or target domain. Simultaneously, this domain-invariant feature space retains highly correlated discriminative information about the fault category, enabling the label predictor to accurately output fault classification results. Through adversarial training, the accuracy of the label classifier is maximized while the accuracy of the domain discriminator is minimized. For three-phase current data from subway turnout switching machines, a three-path convolutional neural network (TripleCNN) is used for feature extraction and fusion.
[0040] Three-phase current is the current data measured in real time by a current sensor when the turnout switch machine is working. Figure 5 In this process, the convolutional layer is a convolutional neural network layer, adaptive batch normalization is performed, and the max pooling layer performs max pooling. Finally, the features of the three-phase current data are fused to prepare for the subsequent classification and diagnosis network.
[0041] The adaptive batch normalization calculation formula is as follows:
[0042] in, X Data characteristics representing the research subjects; X’ This represents the data characteristics after normalization.
[0043] Convolutional layers are crucial for feature extraction from current data, and their calculation formula is as follows:
[0044] in, G f ( x ) are the features of the input; N This represents the total number of channels in the input feature map of the previous layer; Indicates the first l 1st floor (i.e., the floor above) j Input feature maps for each channel; W ij l It is the first j On the first channel i One convolutional kernel; b i l It's a bias. sigmoid ( ) represents the activation function.
[0045] Max pooling can reduce the dimensionality of data while retaining the maximum amount of information. The calculation formula is as follows:
[0046] in, M i l (j) After max pooling, the result is passed to the first... l The values of layer neurons; It is the first l- 1st floor m The th eigenvector s The activation value of each neuron; P Indicates the size of the pooling window; K This represents the sliding index within the pooling window.
[0047] The label predictor classifies data from the source domain, aiming to maximize label accuracy. The modeling formula is:
[0048] in, G y It is a label classifier; V It is a weight matrix; c It is the bias vector; softmax ( ) represents the activation function. The formula for calculating cross-entropy loss is:
[0049] in, The cross-entropy loss function represents the label prediction. Indicates the first u The true fault labels for each sample. In the source domain, the training optimization objective is represented as:
[0050] in, W and b These represent the weight matrix and bias term of the feature extraction network, respectively. n This represents the total number of samples participating in the training. L y,u Indicates the first u Label prediction loss for each sample, R(W,b) For regularizers, Let be the gradient parameter. As can be seen from the optimization expression, minimizing the gradient parameter minimizes the label predictor loss, thus leading to more accurate label discrimination.
[0051] The role of the domain discriminator is to classify sample data in the feature space, maximizing the accuracy of identifying the source of domain data. The modeling formula is:
[0052] in, Representation domain discriminator network model, U It is a weight matrix. For bias vectors, T This is the transpose symbol. The formula for calculating cross-entropy loss is:
[0053] in, The cross-entropy loss function of the domain discriminator; For the first u The domain-discriminative label for each sample is used to determine whether the sample data comes from the source domain or the target domain. This loss function is used to measure the difference between the domain discriminator's prediction and the true label. The domain discrimination training optimization objective is:
[0054] in, This represents a domain-adversarial regularization term constructed to obfuscate the domain discriminator; n For source domain sample data, n’ For target domain sample data, N t This represents the total number of samples in the dataset.
[0055] In summary, the overall loss expression for domain adversarial networks is:
[0056] in, E This represents the overall loss function of the domain adversarial network. During the iteration process: through... argmin W,V,b,c Update the label predictor parameters. Update the domain discriminator parameters.
[0057] Adversarial training occurs during the propagation process from the feature extractor to the label predictor and the domain discriminator, where the label prediction parameters are optimized to decrease and the domain discriminator parameters are optimized to increase. The adversarial process employs gradient backpropagation to enable the feature extractor to learn features unknown in the source domain. This is achieved by reversing the gradient propagated back from the domain discriminator and passing it back to the feature extractor, thereby enriching the sample features.
[0058] Building upon DANN, Joint Maximum Mean Difference (JMMD) is introduced to further address issues such as data imbalance between the source and target domains, and to some extent, aligns normal and faulty data samples within the same domain, resolving the imbalance problem among different categories within the domain. After fully connecting the data through JMMD feature integration, label partitioning and domain-specific adversarial training can achieve faster and more accurate convergence of the total loss, resulting in better diagnostic performance. Figure 6 As shown.
[0059] The overall feature extraction and fusion, feature alignment, and fault diagnosis module structure diagram is shown below. Figure 7 As shown.
[0060] The overall diagnostic steps are as follows: Step S1: The data management module is used to collect the raw three-phase current data of the turnout switch machine and divide it into source domain dataset and target domain dataset. Step S2: The data augmentation module first uses Gram angle field (GAF) coding technology to map a one-dimensional time series signal into a two-dimensional image representation with spatial topological features. Then, relying on the improved vector quantization variational autoencoder (IVAE) model, variational inference and probabilistic modeling are performed on the latent space distribution of the source domain and the target domain to generate high-fidelity synthetic samples to achieve cross-domain equalization expansion of the dataset. The augmented heterogeneous data is then fed back to the source domain and the target domain databases, respectively. Step S3: The feature extraction and fusion module retrieves high-performance training samples from the source domain database and uses a parallel architecture of a three-way convolutional neural network (TripleCNN) to perform multi-scale feature decoupling and high-dimensional mapping on the three-phase current signal. The aim is to extract deep physical features with strong discriminative power from non-stationary time-series fluctuations and then use a channel attention mechanism for feature fusion. Step S4: The feature alignment module introduces the Joint Distribution Maximum Mean Difference (JMMD) criterion to map the fused features to the Regenerative Kernel Hilbert Space (RKHS). By collaboratively minimizing the edge distribution and conditional distribution shifts between the source and target domains, it achieves accurate cross-domain alignment of the feature manifold, thereby effectively suppressing the impact of domain shift on diagnostic accuracy.
[0061] Step S5: The fault diagnosis module constructs a game-theoretic training system based on Domain Adversarial Network (DANN), and uses Gradient Reversal Layer (GRL) to establish a minimax optimization mechanism between the feature extractor and the domain discriminator. During backpropagation, the hyperparameters of the label predictor and the domain discriminator are synchronously corrected through the gradient reversal operator, driving the model to iteratively extract essential fault features with domain invariance, and finally outputting the diagnostic results through the converged label predictor.
[0062] The TripleCNN-JMMD-DANN model is trained for 100 rounds using 2D data of ten different states as input, resulting in the final trained TripleCNN-JMMD-DANN model. Then, given any image of a fault state, the system can output the probability of that fault state based on the final TripleCNN-JMMD-DANN model.
[0063] For example, if the input image is in state 2, the system can output: the probability that this image is in fault state 0 is 0.1%, the probability that it is in fault state 1 is 0.1%, the probability that it is in fault state 2 is 99.1%, the probability that it is in fault state 3 is 0.1%, the probability that it is in fault state 4 is 0.1%, the probability that it is in fault state 5 is 0.1%, the probability that it is in fault state 6 is 0.1%, the probability that it is in fault state 7 is 0.1%, the probability that it is in fault state 8 is 0.1%, and the probability that it is in fault state 9 is 0.1%.
[0064] This includes fault alarms, which receive information on different health statuses sent by the fault diagnosis module and push the health status of the device in real time based on the fault information. Alarms can also be sent through multiple platforms such as mobile apps.
[0065] The system workflow of this invention embodiment is as follows: Figure 2 As shown, it includes the following steps: 1. The data management module preprocesses the real-time device data collected by the sensors and stores it in the source domain database and the target domain database. Simultaneously, during data augmentation, data from both databases are used as input, and the augmented samples are then stored in the two databases respectively.
[0066] 2. Extract the data requested by the fusion module and perform feature extraction and feature fusion through a three-way parallel convolutional neural network and channel attention mechanism.
[0067] 3. Subsequently, the feature alignment and fault diagnosis module uses DANN combined with JMMD to perform terbium alignment, reducing the distribution difference between the source domain and the target domain data, and thus obtaining the diagnosis results.
[0068] Figure 8 This graph shows the training process of the TripleCNN-JMMD-DANN model, where the accuracy and loss change as training progresses. The diagnostic results on the training set remain stable at 100%, and the accuracy on the test set remains stable at 99.67%, indicating good diagnostic performance.
[0069] Figure 9 The graph shows the precision, recall, and F1 score of the model in this paper during iterations. The recall and F1 score can reach 1 as the number of iterations increases, indicating that the model in this paper has high precision.
[0070] Figure 10 compares the proposed model IVAE-TripleCNN-JMMD-DANN (a three-way convolutional adversarial neural network fusing an improved variational autoencoder and joint maximum mean difference) with other models under the same experimental conditions: TripleCNN-JMMD-DANN, TripleCNN-Transformer, TripleCNN-DANN, TripleCNN-LSTM, TripleCNN-LSTM, and CNN. The results are shown in Figure 10. The figure demonstrates that the proposed model achieves the highest accuracy.
[0071] Figure 11 To verify the transferability of the constructed differential adversarial joint network model, transfer training was performed using data from turnout switch machines of the same model but different locations and with different serial numbers. In the diagram, I, II, III, and IV represent: source domain → W4001A, source domain → W4001B, source domain → W4002A, and source domain → W4002B, respectively (W4001A, W4001B, W4002A, and W4002B are turnout switch machines in different locations; note that the data for these four switch machines is not in the target domain but is separate data). Figure 11 Analysis of the transfer learning training results shows that the experimental model can achieve good diagnostic results on switch machines of the same model but in different positions. The slightly lower accuracy of Experiment IV may be due to the missing data samples of the W4002B switch machine.
[0072] In summary, this invention acquires real-time data on equipment operation through a microcomputer circuit monitoring system, establishes a low-level model algorithm using multi-fault diagnosis technology, and performs real-time assessment and monitoring of the equipment's health status based on sensor data. The system includes: a data management module that collects raw current, power, and other data, preprocesses it, and stores it in a database; a data enhancement module that uses an improved vector quantization variational autoencoder (IVAE) to augment the data; an extraction and fusion module that uses a three-way parallel convolutional neural network for feature extraction and channel attention mechanism for feature fusion; and a feature alignment module and a fault diagnosis module that use DANN combined with JMMD to reduce distribution differences and diagnose the target domain signal. This diagnostic system augments and diagnoses the equipment's condition. This invention enables monitoring, data augmentation, and fault diagnosis of railway turnout switch machine status, helping managers to understand the equipment's health status in a timely manner and achieve more refined management.
[0073] The above-described embodiments are merely one implementation of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A fault diagnosis system for turnout switching machines based on distribution differences and domain adversarial mechanisms, characterized in that, include: The data management module collects the raw electrical signals of the switch machine in real time under all switching conditions through an integrated circuit sensing matrix. After adaptive noise reduction and hierarchical sampling preprocessing, the signals are stored in batches in the source domain database and the target domain database based on domain migration logic. The data augmentation module is used to expand the source and target domain data. It constructs an improved IVAE by adding a self-attention mechanism to the encoder and decoder of the vector quantization variational autoencoder VQ-VAE and replacing ReLU with the H-Switch activation function. It deeply reconstructs the latent space probability distribution to expand the scarce fault samples and stores them in the source and target domain databases respectively. The feature extraction and fusion module uses a three-way parallel convolutional neural network TripleCNN to extract features from the three-phase current signal independently, and uses a channel attention mechanism to concatenate the extracted physical coupling features into nonlinear tensors and fuse them to obtain a comprehensive feature vector. The feature alignment module aligns features by introducing the Joint Distribution Maximum Mean Difference (JMMD) to map features to the high-dimensional reproducing kernel Hilbert space (RKHS), measuring and co-minimizing the offset of marginal and conditional distributions between the source and target domains. The fault diagnosis module integrates a label predictor, a domain discriminator, and a gradient inversion layer (GRL). It enables the feature extraction layer and the domain discriminator to undergo adversarial training through backpropagation to construct a zero-sum game mechanism, extract essential fault features with domain invariance, and finally output the fault classification result using the label predictor. The adversarial training occurs during the propagation process from the feature extractor to the label predictor and the domain discriminator, i.e., the label prediction parameters are optimized to decrease and the domain discriminator parameters are optimized to increase.
2. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 1, characterized in that, In the feature extraction and fusion module, each branch of the convolutional neural network is configured with multiple downsampling layers with an initial convolutional kernel size of 16 and a stride of 2, and then multiple sets of residual connection blocks are connected in series to prevent deep feature degradation.
3. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 1, characterized in that, The Joint Maximum Mean Difference (JMMD) adopts a multi-kernel kernel function strategy, which adaptively adjusts the bandwidth parameters of each kernel function through weights to fit the data distribution at different scales. The gradient inversion layer in the adversarial training module is connected between the feature extractor and the domain discriminator. During backpropagation, the gradient is inverted, which enables the features generated by the feature extractor to "deceive" the domain discriminator, thereby achieving domain adaptation.
4. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 1, characterized in that, The data management module specifically includes: The system consists of three main functions: data acquisition, data preprocessing, and database management. The data acquisition function is used to collect real-time data from the circuit sensing system on the turnout switch machine and store it in the database. The real-time data comes from the equipment's operating circuit data, including changes in current and power during operation. The data preprocessing function is used to standardize the raw data; firstly, the collected raw data is cleaned, outliers are removed, missing values are filled, and the data format is unified. The database management function is used for data transmission between the source domain database and the target domain database. The source domain database uses MySQL to store and manage real-time data, which is used for data analysis functions of the data augmentation and feature extraction fusion modules. The target domain database stores data on turnouts and switch machines of lines different from those in the source domain database, which is used for data analysis functions of the feature alignment and fault diagnosis modules. When the two databases receive data requests from other functional modules, they will write SQL statements based on the request information to retrieve the corresponding data from their own databases and perform the corresponding functional module operations.
5. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 1, characterized in that, The data augmentation module specifically includes: The data augmentation module is used to augment data from two major databases. First, the data is converted to two dimensions using GAF (Graphical Image Processing), and then input into the IVAE (In-Variety Image Processing) model. The encoder extracts features from the input data using a convolutional neural network and maps these features to a discrete latent space. The continuous latent space is then mapped to a finite vector dictionary, ensuring that the generated latent representation is a discrete symbol. The decoder is responsible for restoring the features of the original data from the discrete latent representation output by the encoder. The decoder also uses a convolutional neural network, taking the discrete latent representation as input and generating reconstructed data with the same distribution as the original data through a learning process. The augmented data and the original data are stored separately in the original databases, and the IVAE model is used to augment the faulty data. This IVAE model takes the input data image as input, trains it, and reconstructs an image with the same features as the original image.
6. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 5, characterized in that, The IVAE model training and reconstruction process specifically includes: Step s1: Define a potential embedding space e∈R K×D ,in K Represents the size of the discrete latent space. D For each latent embedding vector e i The dimension; the space is composed of K indivual D 3D embedding vector composition; IVAE model receives input x Feature extraction is performed through an encoder; the encoder uses convolutional layers and residual blocks (Res-Stack) to capture local features, and finally incorporates a self-attention mechanism to enhance the feature map output by calculating global correlations, generating the final encoded output. z e (x) ; Step s2: Discrete latent variable acquisition and vector quantization. According to equation (1), through the shared embedding space... e Nearest neighbor search is performed to obtain discrete latent variables. z Subsequently, the decoder receives the corresponding embedding vector calculated by equation (2). e k Projecting latent variables into a 1-of-K One-hot encoding; the full parameters of the IVAE model include the encoder, decoder, and embedding space. e Parameters; posterior classification distribution q(z|x) It is determined by the One-hot encoding method described in equation (1), where z e (x) It is the output of the encoder; this IVAE model is considered a variational autoencoder, designed to maximize the data likelihood. p(x) As shown in equation (3); Step s3: Encoder output z e (x) After discretization, the nearest neighbor is searched and mapped to the closest element in the embedding space, as shown in Equations (1) and (2). (1) (2) (3) (4) In formula (1), x This represents the original input data; Discrete latent variables z The posterior classification distribution; Indicates input data x The continuous feature representation output after being extracted by the encoder; This represents the potential embedding space, i.e., the first in the codebook. j Embedded vectors; This represents the L2 norm, used to calculate the distance between the encoder output features and the embedding vector; This indicates the search for the index that minimizes the subsequent distance expression; k This indicates the index number of the calculated embedding vector with the smallest distance; In formula (2), This represents the quantized latent variable, which is the result of mapping the continuous output features of the encoder to discrete embedding vectors. This result will be used as the input of the decoder. Indicates that the index in the potential embedding space is k The optimal embedding vector; In formula (3), Indicates input data x The marginal likelihood probability is the objective that the model strives to maximize. Representing discrete latent variables z The prior probability distribution; Indicates that given latent variables z Under these conditions, the corresponding data is generated through the decoder. x The conditional probability distribution; In formula (4), L This represents the total loss function of the IVAE model; Indicates the reconstruction loss; This represents the gradient cutoff operation. It is treated as a constant during forward propagation of the network, and its partial derivative is zero during backward propagation. It is used to cut off the backpropagation of gradients. This represents vector quantization loss, also known as codebook loss. Its weight coefficients are used to bring the embedding vector closer together. e The embedding space is updated using the distance from the encoder output; Indicates a commitment to loss, Its weighting coefficients are used to constrain the encoder output. Do not deviate from the selected embedding vector e Too far; Step s4: Next, discrete latent variable modeling is achieved through the three-stage optimization process in the IVAE training framework, which includes reconstruction loss, codebook loss (i.e., vector quantization loss), and commitment loss, as shown in equation (4). Step s5: The decoder receives the quantized embedding vector, processes it first through a convolutional layer, and then reconstructs the image through the residual block Res-Stack before the self-attention mechanism, the self-attention mechanism Self-Attention, and the transposed convolutional layer ConvTrans after the self-attention mechanism. After training, high-quality random image generation can be achieved by sampling the discrete distribution and inputting it into the decoder.
7. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 6, characterized in that, The three-stage optimization process in step s4 specifically includes: Reconstruction loss : Utilizes gradient approximation; by introducing a pass-through estimator (STE), the decoder input is directly fed into the backpropagation process. z q (x) The gradient is copied to the encoder output. z e (x) This leads to reconstruction loss. logp(x|z q (x)) Capable of jointly optimizing encoders and decoders; Vector quantization loss The vector quantization loss is generated by the vector quantization process; here sg This represents the Stop-gradient operation, which maintains a constant value during forward propagation and has zero partial derivatives during backward propagation. Promised loss By constraining the encoder output to the geometric distance of the selected embedding vector, the latent space is prevented from diverging due to lack of regularization.
8. The turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures according to claim 1, characterized in that, The feature extraction and fusion module specifically includes: The feature extraction and fusion module employs a three-way parallel convolutional neural network to perform parallel feature mining on the three-phase currents A, B, and C, fully extracting the local time-series features of each phase current. In the feature fusion stage, a channel attention mechanism is introduced to adaptively weight and fuse the features from multiple channels. This channel attention mechanism learns the contribution of each channel feature and dynamically adjusts the weights, thereby effectively enhancing the expressive power of key fault features and suppressing the interference of redundant noise.
9. A turnout switch machine fault diagnosis system based on distribution difference and domain countermeasures as described in claim 1, characterized in that, The feature alignment module and fault diagnosis module specifically include: Introduce the domain adversarial neural network and the maximum mean difference of the joint distribution; The feature extractor maps source and target domain samples to a shared domain-invariant feature space for feature alignment, enabling the feature distributions of the source and target domains to merge. This makes it impossible for the domain discriminator to distinguish whether a feature originates from the source or target domain. Simultaneously, this domain-invariant feature space retains highly correlated discriminative information about the fault category, allowing the label predictor to accurately output fault classification results. Through adversarial training, the accuracy of the label classifier is maximized while the accuracy of the domain discriminator is minimized. For the three-phase current data of subway turnout switching machines, a three-path convolutional neural network (TripleCNN) is used for feature extraction and fusion. The three-phase current is the current data measured in real time by current sensors when the turnout switch machine is working; the features of the three-phase current data are finally fused to prepare for the subsequent classification and diagnosis network. The formula for AdaBN adaptive batch normalization is as follows: in, X Data characteristics representing the research subjects; X’ This represents the data characteristics after normalization. Convolutional layers are crucial for feature extraction from current data, and their calculation formula is as follows: in, G f ( x ) are the features of the input; N This represents the total number of channels in the input feature map of the previous layer; Indicates the first l The first floor is the floor above. j Input feature maps for each channel; W ij l It is the first j On the first channel i One convolutional kernel; b i l It's a bias. sigmoid () represents the activation function; Max pooling reduces the dimensionality of data while retaining the maximum amount of information. The calculation formula is as follows: in, M i l (j) After max pooling, the result is passed to the first... l The values of layer neurons; It is the first l- 1st floor m The th eigenvector s The activation value of each neuron; P Indicates the size of the pooling window; K This represents the sliding index within the pooling window; The label predictor classifies data from the source domain; the formula is: in, G y It is a label classifier; V It is a weight matrix; c It is the bias vector; softmax () represents the activation function; the cross-entropy loss is calculated using the following formula: in, The cross-entropy loss function represents the label prediction. Indicates the first u The true fault labels of each sample; in the source domain, the training optimization objective is represented as: in, W and b These represent the weight matrix and bias term of the feature extraction network, respectively. n This represents the total number of samples participating in the training. L y,u Indicates the first u Label prediction loss for each sample, R(W,b) For regularizers, Here are the gradient parameters; the formula is: in, Representation domain discriminator network model, U It is a weight matrix. For bias vectors, T The sign is transpose; the formula for calculating cross-entropy loss is: in, The cross-entropy loss function of the domain discriminator; For the first u The domain discriminant label for each sample is used to determine whether the sample data comes from the source domain or the target domain. This loss function is used to measure the difference between the domain discriminant's prediction and the true label. The domain discriminant training optimization objective is: in, This represents a domain-adversarial regularization term constructed to obfuscate the domain discriminator; n For source domain sample data, n’ For target domain sample data, N t This represents the total number of samples in the dataset. The overall loss expression for domain adversarial networks is: in, E Represents the overall loss function of the domain adversarial network; during the iteration process: through argmin W,V,b,c Update the label predictor parameters; via Update the domain discriminator parameters; Adversarial training occurs during the propagation process from the feature extractor to the label predictor and the domain discriminator. Specifically, the label prediction parameters are optimized to decrease, while the domain discriminator parameters are optimized to increase. The adversarial process uses gradient backpropagation to enable the feature extractor to learn features unknown in the source domain. By reversing the gradients returned from the domain discriminator, the gradients are backpropagated to the feature extractor, thereby enriching the sample features.
10. A fault diagnosis method for turnout switching machines based on distribution differences and domain adversarial mechanisms, characterized in that, This is achieved through the turnout switch machine fault diagnosis system based on distribution difference and domain adversarial as described in any one of claims 1-9, including the following steps: Step S1: The data management module is used to collect the raw three-phase current data of the turnout switch machine and divide it into source domain dataset and target domain dataset. Step S2: The data augmentation module first uses Gram angle field (GAF) coding technology to map a one-dimensional time series signal into a two-dimensional image representation with spatial topological features. Then, relying on the improved vector quantization variational autoencoder (IVAE) model, variational inference and probabilistic modeling are performed on the latent space distribution of the source and target domains to generate high-fidelity synthetic samples to achieve cross-domain equalization expansion of the dataset. The augmented heterogeneous data is then fed back to the source and target domain databases, respectively. Step S3: The feature extraction and fusion module retrieves high-performance training samples from the database and uses a parallel architecture TripleCNN three-way convolutional neural network to perform multi-scale feature decoupling and high-dimensional mapping on the three-phase current signal. The aim is to extract deep physical features with strong discriminative power from non-stationary time-series fluctuations, and then use a channel attention mechanism to fuse the features. Step S4, the feature alignment module and fault diagnosis module, adopts Domain Adversarial Network and Joint Distribution Maximum Mean Difference (JMMD) as the measurement criteria to map the fused features to the Regenerating Kernel Hilbert Space (RKHS). By collaboratively minimizing the edge distribution and conditional distribution shifts between the source and target domains, accurate cross-domain alignment of the feature manifold is achieved, thereby effectively suppressing the impact of Domain Shift on diagnostic accuracy. Furthermore, a Mini-Maximum Optimization (MMAX) mechanism is established between the feature extractor and the domain discriminator using a Gradient Reversal Layer (GRL). During backpropagation, the hyperparameters of the label predictor and the domain discriminator are synchronously corrected through the gradient reversal operator, driving the model to iteratively extract essential fault features with domain invariance. Finally, the diagnostic results are output through the converged label predictor.
Citation Information
Patent Citations
Multi-working-condition motor fault diagnosis method and system based on adversarial transfer learning
CN115144747A
Vacuum dry pump bearing fault diagnosis method based on domain confrontation and attention transfer learning
CN119322967A