High-speed railway turnout fault diagnosis method based on KOA-Transform-BiLSTM
Through the high-speed railway switch fault diagnosis method based on KOA-Transformer-BiLSTM, the problem of poor diagnosis and generalization ability caused by uneven sample and small number in the prior art is solved, and the fault diagnosis effect of high accuracy and simplified process is achieved.
Patent Information
- Application Number
- CN202510380197.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing switch fault diagnosis methods have poor diagnostic capabilities and generalization capabilities in the face of uneven samples and small number of samples, and the diagnosis process is complex and the calculation amount is large.
The high-speed railway switch fault diagnosis method based on KOA-Transformer-BiLSTM is adopted, and the sample set is expanded through the GAN model, the Transformer-BiLSTM model is constructed, and the BiLSTM network hyperparameters are used to optimize the BiLSTM network to improve the performance of the diagnostic model.
It effectively improves the fault diagnosis and generalization capabilities of turntable equipment, ensures high-accurate fault diagnosis, and simplifies the diagnosis process.
Smart Images

Figure CN119884942A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of high-speed railway turnout fault diagnosis, and in particular relates to a high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM. Background Art
[0002] In recent years, with the increase in train speed and traffic density, the operation and maintenance of railway infrastructure has been faced with higher challenges. As one of the important components of railway lines, the failure rate of turnout equipment is as high as 39% of the total failure rate of railway signal equipment. Whether the type of turnout failure can be located in a timely and accurate manner is the key to ensuring stable, safe and efficient operation of railway traffic.
[0003] The existing turnout fault diagnosis methods are as follows: (1) Zhao Linhai et al. [Zhao Linhai, Lu Qiao. Turnout fault diagnosis method based on grey correlation [J]. Journal of the China Railway Society, 2014, 36(2): 69-74.] adopted Fisher criterion to select feature vectors and realized turnout fault diagnosis by calculating the grey correlation between the sample to be tested and the features of each fault mode. (2) Yang Juhua et al. [Yang Juhua, Yu Yijian, Chen Guangwu, et al. Research on turnout fault diagnosis algorithm based on CNN-GRU model [J]. Journal of the China Railway Society, 2020, 42(7): 102-109.] proposed a CNN-GRU model for turnout fault diagnosis. After the turnout operating current curve and the switch machine power curve were transformed by Haar wavelet, a convolutional neural network was used to extract fault features, and then the turnout fault diagnosis was realized by gated recurrent unit. (3) Wang Yankuai et al. [Wang Yankuai, Mi Gensuo, Kong Desheng, et al. Research on high-speed railway turnout fault diagnosis method based on MDS and improved SSA-SVM [J]. Journal of the China Railway Society, 2024, 46(01): 81-90.] By extracting the time domain and frequency domain characteristic indicators of the switch machine power curve and the wavelet packet energy entropy, MDS was used for data dimension reduction, and an improved SSA-SVM turnout fault diagnosis model was constructed to achieve turnout fault diagnosis. (4) He Hui et al. [He Hui, Dai Meng, Li Xue, et al. Research on intelligent turnout fault diagnosis method based on DCNN-SVM [J]. Journal of the China Railway Society, 2023, 45(9): 103-113.] On the basis of identifying the normal and abnormal states of turnout conversion, a turnout fault diagnosis model based on DCNN-SVM was constructed to achieve real-time diagnosis of turnout faults.
[0004] The above-mentioned turnout fault diagnosis method has achieved good fault diagnosis performance and solved many problems existing in turnout fault diagnosis. However, most of the diagnosis methods are oriented to balanced sample sets, and the number of samples is small. In actual working conditions, the samples are abundant under the normal working state of the turnout, and the imbalance of the number of samples of different fault types will lead to poor fault diagnosis and generalization capabilities of the turnout equipment. In addition, the diagnosis process of the above-mentioned method needs to go through data processing, feature extraction and fault diagnosis. The diagnosis process has the shortcomings of large amount of calculation and relatively complex diagnosis process. Summary of the invention
[0005] In view of the problems existing in the above-mentioned background technology, the present invention provides a high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM, which effectively improves the fault diagnosis capability and generalization capability of turnout equipment, ensures the accuracy of fault diagnosis and simplifies the fault diagnosis process.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: The high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM includes the following steps: S1. Compare the characteristics of the normal switch power curve of high-speed railway turnouts to obtain the typical turnout fault types distributed in each stage of the turnout power curve; S2. Retrieve the switch power curve of a typical turnout fault, use the GAN model to perform data expansion after data preprocessing of the switch power curve, construct a turnout fault sample data set, and divide it into a training set and a test set in a ratio of 7:3; S3. Construct a turnout fault diagnosis model based on Transformer-BiLSTM, including a sequence input layer, an addition layer, a Transformer encoder, a BiLSTM network, a ReLU activation function layer, a random inactivation layer, an index layer, a fully connected layer and a Softmax activation function, wherein the Transformer encoder includes a position encoding layer and a multi-head self-attention layer, and the BiLSTM network includes a network input layer, an LSTM forward propagation layer, an LSTM backward propagation layer and a network output layer; a Transformer-BiLSTM unit is composed of two layers of multi-head self-attention layers and one layer of BiLSTM network layer in the Transformer encoder, data is input by the position encoding layer, the output end of the sequence input layer is connected to the position encoding layer and the addition layer respectively, the output end of the position encoding layer is connected to the addition layer, the output end of the addition layer is connected to the Transformer-BiLSTM unit, the output end of the Transformer-BiLSTM unit is sequentially connected to the ReLU activation function layer, the random inactivation layer, the index layer, the fully connected layer and the Softmax activation function, and the turnout fault diagnosis result is output by the Softmax activation function; S4. Use KOA to optimize the hyperparameters of the BiLSTM network in the turnout fault diagnosis model; S5. Input the turnout fault sample data set constructed in step S2 into the turnout fault diagnosis model optimized by KOA to perform turnout fault diagnosis. First, the turnout fault features in the local spatial area are extracted through the Transformer encoder to capture the correlation problem of the time series fragments; then the correlation features between the turnout fault feature indicators are extracted through the BiLSTM network, and finally the extracted features are mapped to the corresponding turnout fault type, and the Softmax activation function is used to classify the features, and the turnout fault diagnosis results are output.
[0007] Furthermore, in step S2, the method for performing data expansion of the GAN model is as follows: The original samples of turnout faults of the switch machine power curve before expansion obey the real distribution. The generator generates new samples based on learning the distribution law of the original samples of turnout faults. Random noise is input into the generator, and the random noise obeys the prior distribution. The new samples of turnout faults are output, and the new samples obey the generated distribution. The discriminator distinguishes whether the input is a new sample of turnout fault or an original sample, and outputs the corresponding scalar, which indicates the probability that the input obeys the real distribution. Different new samples of turnout faults and original samples constitute the new sample set and the original sample set of turnout faults respectively, and the turnout fault sample data set is constructed by the new sample set and the original sample set of turnout faults.
[0008] Furthermore, in the GAN model, the loss functions of the generator and the discriminator are defined as: ; ; Where: is the loss function of the generator, is the loss function of the discriminator, To expand the expectation of the original sample, is the expectation of the new sample after expansion, is the scalar output of the discriminator when the original sample of turnout fault is input, It is the scalar output by the discriminator when a new sample of turnout fault is input; Objective function of the GAN model for: .
[0009] Furthermore, in step S4, the BiLSTM network hyperparameters include the number of hidden layer nodes, the initial learning rate and the L2 regularization coefficient of the network.
[0010] Furthermore, in step S5, the method for diagnosing turnout faults is: S51, the turnout fault diagnosis sample data set is input into the position encoding layer of the Transformer encoder, the sequence position information of the sequence input layer is added, and the input feature sequence and sequence position information are superimposed through the addition layer and then input into the Transformer-BiLSTM unit; S52, after the data is input into the Transformer-BiLSTM unit, it first passes through two layers of multi-head self-attention layers to process long-distance dependencies and extract the characteristics of turnout faults in the local area of space, and then captures the temporal feature information in the sequence data through the BiLSTM network layer to extract the temporal features; S53, Transformer-BiLSTM unit will fuse the extracted spatial local area turnout fault features and time series features and input them into the ReLU activation function layer. After that, through the random inactivation layer, index layer, and fully connected layer, the spatial local area turnout fault features and time series features are mapped to the corresponding turnout fault types, and the Softmax activation function is used to classify the features and output the turnout fault diagnosis results.
[0011] Compared with the shortcomings and deficiencies of the prior art, the present invention has the following beneficial effects: The high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM proposed in the present invention takes the switch machine power curve of turnout fault as the data sample source, expands the sample set through the GAN model, and uses the BiLSTM network hyperparameters in the turnout fault diagnosis model based on Transformer-BiLSTM established by KOA optimization to solve the problems of poor turnout fault diagnosis ability and generalization ability caused by unbalanced samples or small number of samples. It not only has a high fault diagnosis accuracy rate, but also simplifies the fault diagnosis process. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flowchart of a high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM provided by an embodiment of the present invention; Figure 2 It is a power curve diagram of a switch machine for a normal switchover of a high-speed railway provided by an embodiment of the present invention; Figure 3 It is a structural schematic diagram of a turnout fault diagnosis model based on Transformer-BiLSTM provided in an embodiment of the present invention; Figure 4 1 is a data distribution diagram of a switch machine power curve before and after the expansion of a turnout fault sample set provided by an embodiment of the present invention. In the figure, (a) is a data distribution diagram of a turnout fault sample set before the expansion, and (b) is a data distribution diagram of a turnout fault sample set after the expansion; Figure 5 1 is a diagram of switch machine power curves of 8 typical turnout faults before and after the expansion of the turnout fault sample set provided by an embodiment of the present invention. In the diagram, (a)-(d), (i)-(l) are respectively switch machine power curves of F1-F8 type turnout faults before expansion, (e)-(h), (m)-(p) are respectively switch machine power curves of F1-F8 type turnout faults after expansion; Figure 6 is the KOA fitness curve provided by the embodiment of the present invention; Figure 7 It is a training set accuracy curve and a loss function curve after 400 iterations provided by an embodiment of the present invention. In the figure, (a) is the training set accuracy curve, and (b) is the loss function curve; Figure 8 The diagram shows the turnout fault diagnosis results of the training set and the test set of the high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM provided by the embodiment of the present invention. In the diagram, (a) is the fault diagnosis result of the training set, and (b) is the fault diagnosis result of the test set. Fig. 9 is a test set ROC curve provided by an embodiment of the present invention; Fig.10 1 is a diagram showing the turnout fault diagnosis results of the training set and the test set of sample 1 provided by an embodiment of the present invention. In the diagram, (a) is the fault diagnosis result of the training set of sample 1, and (b) is the fault diagnosis result of the test set of sample 1. Fig.11 1 is a diagram showing the turnout fault diagnosis results of the training set and the test set of sample 2 provided by an embodiment of the present invention. In the diagram, (a) is the fault diagnosis result of the training set of sample 2, and (b) is the fault diagnosis result of the test set of sample 2. Fig.12 This is the turnout fault diagnosis result of the turnout fault diagnosis model without KOA hyperparameter optimization for the test sets of sample 2 and sample 3 provided in an embodiment of the present invention. In the figure, (a) is the fault diagnosis result of the test set of sample 2, and (b) is the fault diagnosis result of the test set of sample 3. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0014] The turnout driven by the ZDJ9 electric switch machine widely used on high-speed railway lines is taken as the research object. The mechanical part needs to perform the turnout reverse position conversion and locking to complete a turnout conversion. The control circuit controls the mechanical part to indicate the position of the turnout. Therefore, the turnout failure can be divided into mechanical failure of the mechanical part and electrical failure of the control circuit. Since the turnout is affected by external factors such as wind, frost, rain, snow, train vibration and impact for a long time, its mechanical failure accounts for more than 70% of the total number of failures. At the same time, considering that the turnout action current collected from the railway signal centralized monitoring (CSM) system focuses on recording the working state of the switch machine control circuit, and the output power of the switch machine is proportional to the turnout conversion tension, it can directly reflect the action state of the mechanical part during the turnout conversion process. Therefore, the present invention proposes a high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM, selects the switch power curve as the data source for turnout fault diagnosis, adopts the generative adversarial network (GAN) model to expand the turnout sample data set, and solves the sample imbalance problem; establishes a turnout fault diagnosis model based on Transformer-BiLSTM (bidirectional long short-term memory network), learns the long-distance dependency in the time series data through the Transformer encoder, effectively extracts the global feature information of the turnout fault characteristics, combines the BiLSTM network to capture the relationship between the front and back of the time series data, and effectively extracts the spatial and temporal feature information of the switch power curve data. At the same time, the Kepler optimization algorithm (KOA) is used to optimize the hyperparameters of the BiLSTM network, effectively solving the problem of being easily trapped in the local optimum, thereby improving the fault diagnosis accuracy; on the basis of comprehensively extracting the typical fault characteristics of the turnout, the turnout fault diagnosis is realized in an "end-to-end" manner, and the diagnosis results are comprehensively analyzed. The flow chart is as follows Figure 1 As shown, the detailed description is given below.
[0015] S1. Compare the characteristics of the normal switch power curve of high-speed railway turnouts to obtain the typical turnout fault types distributed in each stage of the turnout power curve.
[0016] The power curve of the switch machine for a normal high-speed railway turnout is as follows: Figure 2 As shown, the power curve of the switch machine in the whole process can be divided into four stages: unlocking stage, conversion stage, locking stage and indication stage. The power curve of the switch machine starts to record data in the unlocking stage, the power curve in the conversion stage is relatively stable, and the power value is roughly the same as the reference curve. The power curve starts to decrease in the locking stage, and the power curve in the indication stage forms a power "small step" and then gradually decreases until it stops recording data.
[0017] After field investigation and combined with experience, the characteristics of the normal switch power curve of the turnout are compared, and the common turnout faults distributed in each stage of the turnout power curve are analyzed and summarized. The fault type of normal turnout conversion is numbered as F1, and the 7 common turnout fault types in the 4 stages of the turnout power curve are numbered as F2~F8, as shown in Table 1:
[0018] Table 1 Common faults of ZDJ9 electric switch machine
[0019] S2. The switch machine power curve of typical turnout failure is retrieved from the CSM system. After data preprocessing of the switch machine power curve, the GAN model is used for data expansion to construct a turnout failure sample data set, and the training set and test set are divided into a ratio of 7:3.
[0020] The GAN model mainly consists of two neural networks: the generator and the discriminator. The data expansion method is as follows: Original sample of turnout fault of switch machine power curve before expansion Follow the true distribution ,Right now ; The generator generates new samples based on the distribution law of the original samples of turnout faults, and inputs random noise into the generator , Follow the prior distribution ,Right now , output new samples of turnout faults , Subordinate to the generating distribution ,Right now ; The discriminator identifies the input as a new sample of turnout failure Or original sample , and the output corresponds to the scalar or , scalar means the input obeys The probability size of , the larger the value, the greater the possibility that the input is the original sample; different new samples of turnout faults and original samples constitute the new sample set and original sample set of turnout faults respectively.
[0021] In the continuous training of the GAN model, the generator and the discriminator update their own parameters in turn according to the discriminator's identification results of the input, and continuously iterate to continuously improve the authenticity of the generator's generation of new samples and the discriminator's identification ability. When the discriminator cannot distinguish the source of the input, the output identification value is set to 0.5, and the network reaches a Nash equilibrium state, which can be considered and obey the same probability distribution.
[0022] From the role of the generator and the discriminator, we can see that when the discriminator is given, the value of the generator is as close to 1 as possible, and vice versa, when the generator is given, the discriminator is as close to 1 as possible. Maximize Minimize. Therefore, the loss functions of the generator and discriminator are defined as: (1) (2) Objective function of the GAN model for: (3) Where: is the loss function of the generator, is the loss function of the discriminator, To expand the expectation of the original sample, is the expectation of the new sample after expansion; is the cross entropy function for binary classification.
[0023] S3. Build a turnout fault diagnosis model based on Transformer-BiLSTM. The structure is as follows: Figure 3As shown in the figure, it includes a sequence input layer, an addition layer, a Transformer encoder, a BiLSTM network, a ReLU activation function layer, a random dropout layer, an index layer, a fully connected layer and a Softmax activation function. Generally, the Transformer encoder includes a position encoding layer, a multi-head self-attention layer, a feedforward neural network layer, a residual connection and a normalization layer. The position encoding layer is mainly used to add sequence position information. Specifically, the even dimensions of the input samples are encoded by the sine function, and the odd dimensions of the input samples are encoded by the cosine function. When constructing a turnout fault diagnosis model based on Transformer-BiLSTM, the core layers in the Transformer encoder: the position encoding layer and the multi-head self-attention layer are used, combined with the BiLSTM network. The BiLSTM network includes a network input layer, an LSTM forward propagation layer, an LSTM backward propagation layer, and a network output layer; the information propagated by the LSTM forward propagation layer and the LSTM backward propagation layer fully considers the mutual relationship between the time series data before and after, so its application in turnout fault diagnosis can more effectively extract the time and other features of the switch power curve to improve the fault diagnosis performance of the model. In the turnout fault diagnosis model based on Transformer-BiLSTM, the Transformer-BiLSTM unit is composed of two layers of multi-head self-attention layers and one BiLSTM network layer in the Transformer encoder. The data is input by the position encoding layer, and the output of the sequence input layer is connected to the position encoding layer and the addition layer respectively. The output of the position encoding layer is connected to the addition layer, and the output of the addition layer is connected to the Transformer-BiLSTM unit. The output of the Transformer-BiLSTM unit is connected to the ReLU activation function layer, the random dropout layer, the index layer, the fully connected layer and the Softmax activation function in sequence. The Softmax activation function outputs the turnout fault diagnosis result.
[0024] S4. KOA is used to optimize the hyperparameters of the BiLSTM network in the turnout fault diagnosis model. The network hyperparameters include the number of hidden layer nodes, the initial learning rate and the L2 regularization coefficient.
[0025] S5. Input the turnout fault sample data set constructed in step S2 into the turnout fault diagnosis model optimized by KOA. First, extract the turnout fault features in the local area of space through the Transformer encoder to capture the correlation problem of the time series fragments, and then extract the correlation features between the turnout fault feature indicators through the BiLSTM network. Specifically, the turnout fault diagnosis sample data set is input into the position encoding layer of the Transformer encoder, and the sequence position information of the sequence input layer is added. The input feature sequence and the sequence position information are superimposed through the addition layer and input into the Transformer-BiLSTM unit. First, the long-distance dependency is processed in turn through the multi-head self-attention layer 1 and 2 to extract the turnout fault features in the local area of space; then the BiLSTM network layer is used to further effectively capture the time series feature information in the sequence data and extract the time series features. The Transformer-BiLSTM unit fuses the extracted spatial local area turnout fault features and time series features and inputs them into the ReLU activation function layer to avoid gradient disappearance; then the random inactivation layer is used to reduce overfitting and improve the generalization ability of the model; then the extracted spatial local area turnout fault features and time series feature information are input into the fully connected layer after the index layer, the spatial local area turnout fault features and time series features are mapped to the corresponding turnout fault types, and the Softmax activation function is used to classify the features to achieve "end-to-end" turnout fault diagnosis and output the turnout fault diagnosis results.
[0026] Experimental verification and result analysis
[0027] 1. Data processing Based on the switch monitoring data records in the signal centralized monitoring CSM system of a certain electric section of a railway bureau, according to the fault handling report, 50 groups of switch machine power curve data of normal switch conversion and 10 groups of switch machine power curve data of other typical switch fault states were obtained after data preprocessing, and classified and labeled. Since the normal switch conversion time of the turnout is about 6 s, and the fault conversion time may exceed 6.4 s, in order to unify the switch machine power curve data into the same dimension, the first 6.4 s part of all power curves was intercepted, and sampled at an interval of 40 ms. A total of 160 switch machine power curve data were collected to construct a sample; for samples with less than 160 points, the data were supplemented to 160, and a 120×160-dimensional turnout fault sample set was initially established.
[0028] 2. Sample data expansion From the 120×160-dimensional turnout fault sample set, 10 groups of samples from the turnout normal conversion samples are randomly selected, and together with 10 groups of samples under 7 typical fault conditions, an 80×160-dimensional turnout fault sample data set is constructed. Each type of sample is expanded through the GAN model to obtain an 800×160-dimensional turnout fault sample data set. The data distribution of the turnout fault sample set of the switch machine power curve before and after expansion is shown in the figure below: Figure 4 As shown in the figure, it can be seen that by expanding each type of sample through the GAN model, new data that conforms to the distribution of the original data can be generated, and the characteristics and distribution law of the original sample data are retained. The power curves of the switch machine for 8 typical turnout faults are retrieved from the original sample before expansion and the new sample after expansion, as shown in the figure. Figure 5 As shown in the figure, by comparing the switch machine power curves of each type of turnout fault sample before and after expansion, the change trends are basically the same, and the typical fault characteristics can be reflected in the switch machine power curves of the expanded samples.
[0029] 3. Hyperparameter optimization based on KOA KOA is used to optimize the hyperparameters of the Transformer-BiLSTM-based turnout fault diagnosis model. In Matlab, the optimization parameters are set, where the population size is 10, the number of iterations is 10, and the number of optimized hyperparameters H is 3, which is the number of hidden layer nodes, initial learning rate, and L2 regularization coefficient of the BiLSTM network. The lower limits of the three hyperparameters are set to [100.0001 1e -5 ], the upper limit is set to [50 0.0025 1e -2 ], and considering that the Adam optimizer is an adaptive optimization algorithm that can adaptively adjust the learning rate, balance the gradient effect, perform normalization, and improve the training effect and generalization ability, this optimizer is selected. The 800×160-dimensional turnout fault sample data set is input and divided into a training set and a test set in a ratio of 7:3. The best hyperparameter combination obtained by KOA hyperparameter optimization is H (42, 0.0014, 0.0068). The KOA fitness curve is shown in Figure 6 As shown, from Figure 6 It can be seen that from the beginning of optimization to the 10th iteration, its fitness value gradually decreases from 0.125 to 0.083, that is, the error gradually decreases, which further illustrates that the optimization algorithm is suitable for the turnout fault diagnosis model based on Transformer-BiLSTM proposed in the present invention.
[0030] 4. Model training According to the results of KOA hyperparameter optimization, the number of hidden layer nodes, initial learning rate, and L2 regularization coefficient of the BiLSTM network were set to 42, 0.0014, and 0.0068, respectively. A 560×160-dimensional training set was input to train the turnout fault diagnosis model. After 400 iterations, the corresponding training set accuracy curve and loss function curve are shown in the figure. Figure 7 As shown by Figure 7 It can be seen that with the increase of the number of iterations, when the number of iterations is 239, the accuracy of the training set has reached 80%, and then the accuracy has been increasing, and reached a high accuracy of 99.29% with very few iterations. At the same time, the loss function value decreases rapidly and tends to be stable, which further shows that the parameters selected by the turnout fault diagnosis model are reasonable, the model training degree is good, and it has a good recognition effect on turnout fault diagnosis.
[0031] 5. Diagnostic model testing The 800×160-dimensional turnout fault sample dataset expanded by the GAN model is divided into a 560×160-dimensional training set and a 240×160-dimensional test set in a ratio of 7:3. The optimal hyperparameter H (42, 0.0014, 0.0068) is input, and the turnout fault diagnosis model based on Transformer-BiLSTM is trained with the training set. The turnout fault diagnosis results of the training set and the test set are shown in Figure 2. Figure 8 As shown in the figure, (a) shows that the fault diagnosis accuracy of the training set is 99.29%, and (b) shows that the fault diagnosis accuracy of the test set is 99.58%. The underreporting rate of the model is not only as low as 0.48%, but also the fault diagnosis accuracy of the training set and the test set differs by only 0.29%. In the test set fault diagnosis result, the F3 type fault is misdiagnosed as the F6 type fault. The power curves of these two types of faults are analyzed. Both power curves deviate from the normal reference curve. The power value of the F3 type fault is higher than the reference value, while the power value of the F6 type fault is lower than the reference value. This is also the main reason for the misdiagnosis. Therefore, it can be considered to add the power deviation value in the future turnout fault diagnosis research to solve this problem.
[0032] To more intuitively represent the performance of the diagnostic model, the test set ROC curve is plotted, as shown in Fig. 9 As shown in the figure, the dotted line is the ROC curve, and the area under the curve is the AUC value, which reflects the diagnostic ability of the model. The larger the value, the higher the diagnostic ability. The AUC value of the model is 1, indicating that the turnout fault diagnosis model has very good diagnostic performance and can well distinguish normal turnout samples from faulty samples.
[0033] 6. Analysis of turnout fault diagnosis results 6.1 Analysis of the impact of sample data expansion on model diagnosis results In order to facilitate the analysis of the problem, the 120×160-dimensional unbalanced sample set before the GAN model expansion, the 80×160-dimensional balanced sample set before the expansion, and the 800×160-dimensional balanced sample set after the expansion are numbered as samples 1, 2, and 3. The performance indicators of the three sample turnout fault diagnosis models are shown in Table 2: Table 2 Performance indicators of different sample turnout fault diagnosis models
[0034] For sample 1: After being divided into training set and test set, the turnout fault diagnosis model based on Transformer-BiLSTM is trained with the training set. The turnout fault diagnosis results of the training set and the test set are as follows: Fig.10 As shown in the figure, the fault diagnosis accuracy of the training set and the test set are 96.43% and 88.89% respectively. Fig.10 In (b), the diagnostic accuracy of normal samples in the test set reaches 100%, while the diagnostic accuracy of the 7 types of fault samples is only 80.95%, which is 7.94% lower than the 88.89% of the total fault diagnosis accuracy of the test set. This shows that the samples are unbalanced before the GAN model is expanded, and it cannot correctly reflect the actual diagnostic ability of the turnout fault diagnosis model for fault samples. In addition, it is unable to fully diagnose F2, F3, and F6 types of fault samples, and even misdiagnoses F3 and F6 types of faults as F1 normal types, with an underreporting rate of up to 19.05%.
[0035] For sample 2: After being divided into training set and test set, the turnout fault diagnosis model based on Transformer-BiLSTM is trained with the training set. The turnout fault diagnosis results of the training set and the test set are as follows: Fig.11 As shown in the figure, the fault diagnosis accuracy of the training set and the test set are 98.21% and 87.5% respectively. Not only is the fault diagnosis accuracy low, but the difference between the fault diagnosis accuracy of the training set and the test set is 10.71%, which shows an obvious overfitting problem. It is obvious that the turnout fault diagnosis accuracy under small samples before the expansion of the GAN model is low and cannot be further applied to the field.
[0036] For sample 3: the turnout fault diagnosis results of the training set and the test set refer to Figure 8, under sample 3, the fault diagnosis accuracy of the training set and the test set differs by only 0.29%. This is because the new sample set is generated under the probability distribution learned by the GAN model, so the overfitting problem of the model is solved. At the same time, the fault diagnosis accuracy of the test set of 80×160 balanced samples before expansion is improved by 12.08%, and the fault diagnosis accuracy of the test set of 120×160 unbalanced samples before expansion is improved by 10.69%. Compared with the AUC values in Table 2, the AUC value corresponding to sample 1 is 0.9286, indicating that the model has good classification ability; the AUC value corresponding to sample 2 is 0.5476, indicating that the model has certain diagnostic ability, but the effect is general; and the AUC value corresponding to sample 3 is 1, indicating that the model has very good classification ability. It can be seen that after the sample set is expanded by the GAN model, the diagnostic performance of the model has been improved.
[0037] 6.2 Analysis of the impact of KOA hyperparameter optimization on model diagnosis results To further illustrate the superiority of KOA in optimizing the hyperparameters of the BiLSTM network, the constructed turnout fault diagnosis model based on Transformer-BiLSTM is not optimized by KOA hyperparameters, and the other parameters remain unchanged. The training sets of sample 2 and sample 3 are used to train the turnout fault diagnosis model without KOA optimization, and the turnout fault diagnosis results of the test set are as follows: Fig.12 As shown by Fig.12 It can be seen that when the hyperparameters are not optimized by KOA, the fault diagnosis accuracy of the two sample sets is low, among which the fault diagnosis accuracy of the test set of sample 2 is 75%, and the fault diagnosis accuracy of the test set of sample 3 is 89.58%. After the hyperparameters are optimized by KOA, combined with Table 2, it can be seen that the fault diagnosis accuracy of the test sets corresponding to samples 2 and 3 is greatly improved. It can be seen that after KOA optimizes the hyperparameters of the BiLSTM network, its optimization goal is to minimize the error rate of turnout fault diagnosis.
[0038] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM, characterized in that: The steps include: S1. Compare the characteristics of the normal switch power curve of high-speed railway turnouts to obtain the typical turnout fault types distributed in each stage of the turnout power curve; S2. Retrieve the switch power curve of a typical turnout fault, use the GAN model to perform data expansion after data preprocessing of the switch power curve, construct a turnout fault sample data set, and divide it into a training set and a test set in a ratio of 7:3; S3. Construct a turnout fault diagnosis model based on Transformer-BiLSTM, including a sequence input layer, an addition layer, a Transformer encoder, a BiLSTM network, a ReLU activation function layer, a random inactivation layer, an index layer, a fully connected layer and a Softmax activation function, wherein the Transformer encoder includes a position encoding layer and a multi-head self-attention layer, and the BiLSTM network includes a network input layer, an LSTM forward propagation layer, an LSTM backward propagation layer and a network output layer; a Transformer-BiLSTM unit is composed of two layers of multi-head self-attention layers and one layer of BiLSTM network layer in the Transformer encoder, data is input by the position encoding layer, the output end of the sequence input layer is connected to the position encoding layer and the addition layer respectively, the output end of the position encoding layer is connected to the addition layer, the output end of the addition layer is connected to the Transformer-BiLSTM unit, the output end of the Transformer-BiLSTM unit is sequentially connected to the ReLU activation function layer, the random inactivation layer, the index layer, the fully connected layer and the Softmax activation function, and the turnout fault diagnosis result is output by the Softmax activation function; S4. Use KOA to optimize the hyperparameters of the BiLSTM network in the turnout fault diagnosis model; S5. Input the turnout fault sample data set constructed in step S2 into the turnout fault diagnosis model optimized by KOA to perform turnout fault diagnosis. First, the turnout fault features in the local spatial area are extracted through the Transformer encoder to capture the correlation problem of the time series fragments; then the correlation features between the turnout fault feature indicators are extracted through the BiLSTM network, and finally the extracted features are mapped to the corresponding turnout fault type, and the Softmax activation function is used to classify the features, and the turnout fault diagnosis results are output.
2. The high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM as claimed in claim 1, characterized in that: In step S2, the method for performing data expansion of the GAN model is as follows: The original samples of turnout faults of the switch machine power curve before expansion obey the real distribution. The generator generates new samples based on learning the distribution law of the original samples of turnout faults. Random noise is input into the generator, and the random noise obeys the prior distribution. The new samples of turnout faults are output, and the new samples obey the generated distribution. The discriminator distinguishes whether the input is a new sample of turnout fault or an original sample, and outputs the corresponding scalar, which indicates the probability that the input obeys the real distribution. Different new samples of turnout faults and original samples constitute the new sample set and the original sample set of turnout faults respectively, and the turnout fault sample data set is constructed by the new sample set and the original sample set of turnout faults.
3. The high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM as claimed in claim 2, characterized in that: In the GAN model, the loss functions of the generator and the discriminator are defined as: ; ; Where: is the loss function of the generator, is the loss function of the discriminator, To expand the expectation of the original sample, is the expectation of the new sample after expansion, is the scalar output of the discriminator when the original sample of turnout fault is input, It is the scalar output by the discriminator when a new sample of turnout fault is input; Objective function of the GAN model for: 。 4. The high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM as claimed in claim 1, characterized in that: In step S4, the BiLSTM network hyperparameters include the number of hidden layer nodes, the initial learning rate and the L2 regularization coefficient of the network.
5. The high-speed railway turnout fault diagnosis method based on KOA-Transformer-BiLSTM as claimed in claim 1, characterized in that: In step S5, the method for diagnosing turnout faults is as follows: S51, the turnout fault diagnosis sample data set is input into the position encoding layer of the Transformer encoder, the sequence position information of the sequence input layer is added, and the input feature sequence and sequence position information are superimposed through the addition layer and then input into the Transformer-BiLSTM unit; S52, after the data is input into the Transformer-BiLSTM unit, it first passes through two layers of multi-head self-attention layers to process long-distance dependencies and extract the characteristics of turnout faults in the local area of space, and then captures the temporal feature information in the sequence data through the BiLSTM network layer to extract the temporal features; S53, Transformer-BiLSTM unit will fuse the extracted spatial local area turnout fault features and time series features and input them into the ReLU activation function layer. After that, through the random inactivation layer, index layer, and fully connected layer, the spatial local area turnout fault features and time series features are mapped to the corresponding turnout fault types, and the Softmax activation function is used to classify the features and output the turnout fault diagnosis results.
Citation Information
Patent Citations
Sample-free turnout fault diagnosis method based on deep learning
CN111914320A
Turnout fault diagnosis method based on mixed deep learning model
CN114494766A