A method and system for integrated fault diagnosis
By combining and integrating fault diagnosis models in the regional rail transit network, and utilizing multi-source sensor data training and location coding technology, the problem of insufficient diagnostic performance of a single model under multi-source heterogeneous data is solved, and efficient fault diagnosis and monitoring are achieved.
Patent Information
- Application Number
- CN202411600209.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Existing single fault diagnosis models are ill-suited to the complex and ever-changing passenger flow, operating conditions, and environment when faced with multi-source, multi-dimensional, heterogeneous detection or monitoring data in regional rail transit networks, resulting in insufficient diagnostic performance and efficiency.
An integrated fault diagnosis method is adopted. By collecting sensor data on vehicles, ground infrastructure and environmental conditions, a K-fold training and testing dataset is constructed to train the basic fault diagnosis model and the meta-classifier model. The optimal parameter model is constructed using location encoding, and the models are combined to form an integrated fault diagnosis model.
It improves the diagnostic performance and overall efficiency of integrated detection and monitoring of the regional rail transit network operation status, effectively integrates the advantages of various individual fault diagnosis models, and improves the accuracy of fault location, classification and identification, and severity identification.
Smart Images

Figure CN119691443B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a combined integrated fault diagnosis method and system. Technical Background
[0002] With the rapid development and increasing complexity of regional rail transit networks, traditional single fault diagnosis models can no longer meet the needs of integrated detection and monitoring of data from multiple professional fields. Existing single models, such as those based on convolutional neural networks (CNNs), long short-term memory networks (LSTMs), and multi-layer perceptrons (MLPs), typically focus on processing a certain type of data or a specific task. CNN-based fault diagnosis models are good at extracting local fault features, but have weak adaptability to dynamic time series data. LSTM-based fault diagnosis models have strong time series memory capabilities and can handle long-distance dependencies in time series data, but perform poorly when faced with multi-source heterogeneous data. While MLP-based fault diagnosis models can classify faults using manually extracted features, they have poor adaptability and generalization capabilities under complex working conditions. While these single fault diagnosis models have certain advantages in specific scenarios, they struggle to adapt to the complex and ever-changing passenger flows, operating conditions, road conditions, and environments in regional rail transit networks, often failing to provide high-performance diagnostic results when faced with multi-source, multi-dimensional, heterogeneous detection or monitoring data from vehicles (vehicles), ground infrastructure (ground), and environmental conditions (air). Therefore, there is an urgent need for an integrated fault diagnosis solution that can combine multiple fault diagnosis models / methods and fully leverage the advantages of each model to improve the diagnostic performance and overall efficiency of integrated detection and monitoring of the operating status of regional rail transit networks. Summary of the Invention
[0003] The purpose of the present invention is to disclose a combined integrated fault diagnosis method and system, which realizes the combined integration of multiple fault diagnosis models in rail transit and can quickly diagnose multiple faults.
[0004] To achieve the above objectives, in a first aspect, the present invention discloses a combined integrated fault diagnosis method and system, comprising:
[0005] S1: Collect sensor data from vehicles, ground infrastructure, and environmental status equipment in the regional rail transit network to construct a K-fold training dataset and its corresponding label set, a K-fold test dataset and its corresponding label set;
[0006] S2: Using the K-fold training data set and the corresponding label set for training, a basic fault diagnosis model of the basic fault diagnosis algorithm and an optimal parameter basic fault diagnosis model are constructed; using the K-fold test data set and the corresponding label set, a primary fault diagnosis test result of the optimal parameter basic fault diagnosis model is obtained;
[0007] S3: constructing the primary fault diagnosis test results of all basic fault diagnosis algorithms with position coding based on the primary fault diagnosis test results; and constructing the meta-feature data sets with position coding and the corresponding meta-feature label sets under all arrangement modes;
[0008] S4: training based on the position-coded meta-feature dataset and the corresponding meta-feature label set to construct an optimal parameter meta-classifier model under all permutations, wherein the optimal parameter basic fault diagnosis model and the optimal parameter meta-classifier model are combined to form an integrated fault diagnosis model;
[0009] S5: collecting device sensor data in real time and constructing an inference data set, inputting the inference data set into the optimal parameter basic fault diagnosis model for inference, and obtaining the average primary fault diagnosis inference results of all J columns of output;
[0010] S6: Based on the average primary fault diagnosis reasoning results of all J columns, construct the average primary fault diagnosis reasoning results of all J columns with position coding; and construct the reasoning meta-feature dataset with position coding under the u-th arrangement; input the reasoning meta-feature dataset with position coding into the optimal parameter meta-classifier model under the u-th arrangement to obtain the final combined integrated fault diagnosis reasoning result.
[0011] To achieve the above-mentioned purpose, in a second aspect, the present invention also discloses a combined integrated fault diagnosis method and system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0012] The present invention has the following beneficial effects
[0013] The present application provides a combined integrated fault diagnosis method. In the training stage: the method first uses sensor data collected from vehicles (cars), ground infrastructure (ground) and environmental conditions (air) in the regional rail transit network to construct a K-fold training data set and a test data set and their corresponding label sets; uses the K-fold training data set to train multiple basic fault diagnosis algorithms to construct a basic fault diagnosis model; uses the K-fold test data set to test the basic fault diagnosis model; uses the position coding meta-data set to train the set meta-classification algorithm to construct a meta-classifier model; the basic fault diagnosis model and the meta-classifier model are combined to form an integrated fault diagnosis model; in the reasoning stage: real-time collection of sensor data from vehicles, ground and air equipment in the regional rail transit network, and uses the constructed combined integrated fault diagnosis model to obtain the regional rail transit network operation status monitoring / diagnosis results (abnormality / fault location, classification identification and degree identification). In this way, the advantages of each single fault diagnosis model are effectively integrated, and the diagnostic performance and overall efficiency of the integrated detection and monitoring of the regional rail transit network operation status are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A flowchart of a combined integrated fault diagnosis method according to a preferred embodiment of the present invention;
[0015] Figure 2(a) 、 2(b) , 2(c), 2(d), and 2(e) are respectively the 1st, 2nd, 3rd, 4th, and 5th row matrices in the confusion matrix diagram of the primary fault diagnosis reasoning results of all optimal parameter-based fault diagnosis models of a combined integrated fault diagnosis method of a preferred embodiment of the present invention;
[0016] Figure 3 A confusion matrix diagram of integrated fault diagnosis reasoning results of all optimal parameter meta-classifier models of a combined integrated fault diagnosis method according to a preferred embodiment of the present invention; DETAILED DESCRIPTION
[0017] The following is a clear and complete description of the technical solutions of the present invention. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0018] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.
[0019] It is worth noting that the combined integrated fault diagnosis method provided by the present application is mainly aimed at the field of rail transit, and is applicable to the operation status detection, monitoring and fault diagnosis of vehicles (cars), ground infrastructure (ground) and environmental conditions (air) in the rail transit network. Rail transit vehicles (cars) include but are not limited to high-speed trains / EMUs, ordinary trains, subway trains, light rail trains, monorail trains, maglev trains, heavy-load locomotives, etc.; equipment in vehicles (cars) includes but is not limited to pantographs, traction transformers, four-quadrant rectifiers, traction inverters, traction motors, wheelsets, bogies, etc. Equipment in ground infrastructure (ground) includes tracks, contact lines, power supply equipment, electrical equipment, railway signal systems, switches, etc. Equipment in the environmental conditions (air) includes but is not limited to anemometers, rain gauges, snow depth gauges, foreign object intrusion collection equipment, road and bridge monitoring equipment, tunnel monitoring equipment, various disaster prevention monitoring equipment, etc.
[0020] In addition, it is worth noting that the basic fault diagnosis model, the optimal parameter basic fault diagnosis model and the corresponding output results in this application can all be expressed in matrices, but this is only one form of expression. This application is only an example and not a limitation, but no matter how it is transformed, it is within the scope of protection of this application.
[0021] like Figure 1 As shown, this embodiment provides a combined integrated fault diagnosis method, including:
[0022] S1: Collect sensor data from vehicles, ground infrastructure, and environmental status equipment in the regional rail transit network to construct a K-fold training dataset and its corresponding label set, a K-fold test dataset and its corresponding label set;
[0023] S2: Using the K-fold training data set and the corresponding label set for training, a basic fault diagnosis model of the basic fault diagnosis algorithm and an optimal parameter basic fault diagnosis model are constructed; using the K-fold test data set and the corresponding label set, a primary fault diagnosis test result of the optimal parameter basic fault diagnosis model is obtained;
[0024] S3: constructing the primary fault diagnosis test results of all basic fault diagnosis algorithms with position coding based on the primary fault diagnosis test results; and constructing the meta-feature data sets with position coding and the corresponding meta-feature label sets under all arrangement modes;
[0025] S4: training based on the position-coded meta-feature dataset and the corresponding meta-feature label set to construct an optimal parameter meta-classifier model under all permutations, wherein the optimal parameter basic fault diagnosis model and the optimal parameter meta-classifier model are combined to form an integrated fault diagnosis model;
[0026] S5: collecting device sensor data in real time and constructing an inference data set, inputting the inference data set into the optimal parameter basic fault diagnosis model for inference, and obtaining the average primary fault diagnosis inference results of all J columns of output;
[0027] S6: Based on the average primary fault diagnosis reasoning results of all J columns, construct the average primary fault diagnosis reasoning results of all J columns with position coding; and construct the reasoning meta-feature dataset with position coding under the u-th arrangement; input the reasoning meta-feature dataset with position coding into the optimal parameter meta-classifier model under the u-th arrangement to obtain the final combined integrated fault diagnosis reasoning result.
[0028] In this application, sensor data includes but is not limited to electrical signals / time series, images, video signals, log or message information, audio information, etc.
[0029] The above-mentioned combined integrated fault diagnosis method, in the training stage: uses sensor data collected from vehicles (vehicles), ground infrastructure (ground) and environmental conditions (air) in the regional rail transit network to construct a K-fold training data set and a test data set and their corresponding label sets; constructs a K-fold training data set to train multiple basic fault diagnosis algorithms and construct a basic fault diagnosis model matrix; uses the K-fold test data set to test the basic fault diagnosis model matrix; uses the position coding meta-data set to train the set meta-classification algorithm and construct a meta-classifier model; the basic fault diagnosis model and the meta-classifier model are combined to form an integrated fault diagnosis model; in the reasoning stage: real-time collection of operating status detection and monitoring data from vehicles, ground and air equipment in the regional rail transit network, and uses the constructed combined integrated fault diagnosis model to obtain the regional rail transit network operating status diagnosis results (abnormality / fault location, classification identification and degree identification), which effectively integrates the advantages of each single fault diagnosis model and improves the integrated detection and monitoring efficiency and diagnostic performance of the regional rail transit network operating status.
[0030] It should be noted that the device described in this embodiment is a traction motor on a rail transit vehicle, and the sensor data collected is the stator current signal of the traction motor. The main hyperparameters for model training in this embodiment are shown in Table 1.
[0031] Table 1 Model training hyperparameters
[0032] Learning rate Number of iterations Batch size Optimizer Basic fault diagnosis model 0.01 10 128 SGD Meta-classifier model 6e-4 10 128 SGD
[0033] Furthermore, based on the above parameters, the steps of the combined integrated fault diagnosis method provided by this application are described in detail as follows:
[0034] Optionally, the S1 includes:
[0035] S11: Collect sensor data from vehicles (vehicles), ground infrastructure (ground), and environmental conditions (air) in the regional rail transit network to form the original data set D = {d1,…,d n ,…,d N},in is a sample, n=1,2,…,N, N is the total number of samples, C is the total number of sensor channels, W is the length of the sensor data sequence; for sample d n After labeling, the samples and labels satisfy the mapping relationship:
[0036] Λ:d n →y n (1)
[0037] Where y n∈{0,1,2,…,L-1}, L is the total number of labels, and the label set Y corresponding to the original data set D is {y1,…,y n ,…y N}, Λ represents the mapping from samples to labels.
[0038] S12: Randomly divide the original data set D into K subsets in is the kth data subset, k=1,2,…,K,N s =N / K represents the total number of samples in the kth data subset; all subsets meet the condition i=1,2,…,K; correspondingly, the label set Y is divided into K subsets is the label subset corresponding to the kth data subset; data subset N in s samples and label subsets N in s The labels satisfy the mapping relationship of formula (1).
[0039] Construct K-fold training datasets separately K-fold validation dataset in They are the k-fold training dataset and the k-fold validation dataset, k=1,2,…,K, With the kth data subset The relationship satisfies the following relationship:
[0040]
[0041] Where, Indicates that in the data set D K Remove the kth data subset The set consisting of the K-1 data subsets remaining after the difference operation,
[0042] Construct label sets corresponding to K-fold training datasets respectively The label set corresponding to the K-fold validation dataset in are the label sets corresponding to the k-th fold training dataset and the k-th fold validation dataset, respectively. With the kth label subset The relationship satisfies the following relationship:
[0043]
[0044] Where, Indicates that in the label set Y K Remove the kth label subset from The set consisting of the K-1 label subsets remaining after the difference operation,
[0045] Optionally, the S2 includes:
[0046] S21: Build a basic fault diagnosis model:
[0047] Assume that J different basic fault diagnosis algorithms are represented as M J ={M1,…,M j ,…,M J}, where M j Represents the jth basic fault diagnosis algorithm, j = 1, 2, ..., J, J is the total number of basic fault diagnosis algorithms; using the K-fold training data set and the label set of the K-fold training dataset For the jth basic fault diagnosis algorithm M j Train K times respectively to obtain K basic fault diagnosis models {M 1,j ,…,M k,j ,…,M K,j}; For J basic fault diagnosis algorithms {M1,…,M j ,…,M J}Train K times respectively, and obtain K×J basic fault diagnosis models, which can be expressed as a matrix:
[0048]
[0049] Where, For J basic fault diagnosis algorithms {M1,…,M j ,…,M J The basic fault diagnosis model matrix obtained after K trainings, M k,j Represents the k-th row and j-th column element of the basic fault diagnosis model matrix M, that is, the k-th fold data set is used for the j-th basic fault diagnosis algorithm and the corresponding label set The basic fault diagnosis model obtained through training.
[0050] As a preferred implementation method of this embodiment, two different fault diagnosis algorithms M1 and M2 (J=2) are set. M1 is a manual feature extraction and multi-layer perceptron classifier algorithm. The manually extracted features include six groups of features: time domain mean, root mean square, standard deviation, peak, kurtosis, and skewness of the three-phase current; frequency domain features include five groups of features: spectrum energy, spectrum center, spectrum bandwidth, spectrum kurtosis, and spectrum entropy; phase features include five groups: phase difference mean, phase difference standard deviation, phase difference peak, phase difference square sum and correlation coefficient, for a total of 48 features; the classifier uses a four-layer multi-layer perceptron network. M2 is an 18-layer, one-dimensional residual neural network algorithm consisting of five basic units. Feature extractor basic unit 1 includes a one-dimensional convolution, a batch normalization layer, and a maximum pooling layer. Feature extractor basic units 2 through 4 each contain only one residual block, and feature extractor basic unit 5 includes a residual block, an average pooling layer, and a flattening layer. The classifier is a single-layer fully connected network. The original dataset was split into five folds (K = 5), resulting in a 5×2 matrix of basic fault diagnosis models. A total of 10 basic fault diagnosis models were trained using the two different fault diagnosis algorithms.
[0051] S22: Construct the optimal parameter-based fault diagnosis model matrix.
[0052] For the jth basic fault diagnosis algorithm M j The k-th basic fault diagnosis model M k,j Then perform E rounds of training and update to obtain K optimal parameter basic fault diagnosis models Taking j = 1, 2, ..., J, we can get a total of K × J optimal parameter basic fault diagnosis models, which can be expressed as a matrix:
[0053]
[0054] Where, Represents J basic fault diagnosis algorithms {M1,…,M j ,…,M J After K times of training, K×J basic fault diagnosis models M are obtained. Then, each basic fault diagnosis model M is trained separately. k,j The optimal parameter basic fault diagnosis model matrix obtained by E rounds of training; Represents the optimal parameter basic fault diagnosis model matrix The kth row and jth column element of j Use the k-fold dataset and the corresponding label set The kth basic fault diagnosis model M obtained by training k,j , and then the optimal parameter basic fault diagnosis model is obtained through E rounds of training; The optimal parameter-based fault diagnosis model The optimal parameters of The optimization function is:
[0055]
[0056] Where, L ce (·,·) represents the cross entropy loss function, φ k,j The basic fault diagnosis model M k,j Parameters, The parameter is φ k,j Basic fault diagnosis model M k,j In the k-th fold training dataset The model output when training for input, The parameter is φ k,j Basic fault diagnosis model M k,j In the k-th fold training dataset Model output when trained for input and Corresponding label set The cross entropy loss function value between ; represents the cross entropy loss function Returns the model parameter φ when the minimum value is taken k,j Operations for obtaining values; is the k-fold training dataset The corresponding label set.
[0057] The basic fault diagnosis model M in formula (4) is modified by random gradient descent method. k,j Perform the e-th round of training update. The formula for updating the model parameters in the e-th round is:
[0058]
[0059] Where, φ k,j,e Update the model for round e The parameter, φ k,j,e-1 Update the model for round e-1 Parameters, Update model parameters φ for round e k,j,e The learning rate, The parameter is φ k,j,e-1 The e-1th round update model In the k-th fold training dataset The output of the model when trained for the input; represents the cross entropy loss function About φ k,j,e-1 The partial derivative of .
[0060] Specifically, when e=1, the basic fault diagnosis model M in formula (4) k,j The formula for updating the first round of model parameters is:
[0061]
[0062] where φ k,j,0 To use the k-fold data set for the j-th basic fault diagnosis algorithm and the corresponding label set Basic fault diagnosis model obtained through training (model not updated) Initialization parameters; Indicates that the initialization parameter is φ k,j,0 The unupdated model In the k-th fold training dataset The output of the model when trained for the input; Represents the cross entropy loss function About the basic fault diagnosis model (model not updated) Initialization parameter φ k,j,0 The partial derivative of .
[0063] Take e=1,2,…,E, repeat formula (7) to update until the maximum number of iterations E, at which time the E-th round update model The parameter is φ k,j,E , let the optimal parameter That is, the jth basic fault diagnosis algorithm uses the kth fold data set and the corresponding label set The basic fault diagnosis model M obtained by training k,j , and then the optimal parameter basic fault diagnosis model obtained by E rounds of training is
[0064] Take k = 1, 2, ..., K, j = 1, 2, ..., J, and form the optimal parameter basic fault diagnosis model matrix of formula (5)
[0065] S23: Use the k-fold validation dataset Test the optimal parameter basic fault diagnosis model matrix separately The k-th row J optimal parameter basic fault diagnosis model The primary fault diagnosis test results of the k-th row J optimal parameter basic fault diagnosis model are obtained, which can be expressed as:
[0066]
[0067] in, Indicates that the k-th row J optimal parameter basic fault diagnosis model is input into the k-th fold validation data set respectively Primary fault diagnosis test results obtained during the test; Represents the optimal parameter-based fault diagnosis model for the kth row and jth column Input is the k-fold validation dataset The primary fault diagnosis test results obtained when , are expressed as:
[0068]
[0069] Where, Indicates input of the k-fold validation dataset When testing, the corresponding nth s The primary fault diagnosis test results obtained by samples, n s =1,2,…,N s , For the nth s The test results of the lth class label obtained by the samples are the probability of being judged as the lth class label, l = 0, 1, 2, ..., L, L is the total number of labels.
[0070] Taking k = 1, 2, ..., K, we can get the primary fault diagnosis test result matrix of the J basic fault diagnosis models trained with all K-fold training data sets and tested with the K-fold validation data sets, which can be expressed as:
[0071]
[0072] in, Represents the optimal parameter basic fault diagnosis model matrix The primary fault diagnosis test result matrix obtained by testing the K-fold validation data set for all optimal parameter basic fault diagnosis models in , N = KN s ;
[0073] Primary Fault Diagnosis Test Results Matrix The corresponding true label matrix is expressed as:
[0074]
[0075] in, Represents the primary fault diagnosis test result matrix The corresponding true label matrix is obtained from the K-fold validation dataset Corresponding label set Build, where is the k-fold validation dataset The corresponding label set.
[0076] Optionally, the S3 includes:
[0077] S31: Test result matrix for primary fault diagnosis The jth column All elements are position-coded to obtain the jth basic fault diagnosis algorithm M with position coding. j Primary fault diagnosis test results The formula is:
[0078]
[0079] in, Represents the jth basic fault diagnosis algorithm M with position coding j The primary fault diagnosis test results of cat(·,·) represent the results of horizontal (column) stacking operation on the two matrices in the brackets. represents an N×1 column matrix of all 1 elements; onehot(·) represents the result of the one-hot encoding operation, which is expressed as:
[0080] onehot(j)=[O1(j) … O t (j) … O J (j)] (14)
[0081] in, represents the one-hot encoded column vector about j, O t (j) is the value of the t-th element in the one-hot encoding vector for j, t = 1, 2, 3, ..., J, satisfying the condition:
[0082]
[0083] In formula (9) The Kronecker product is an operation that multiplies all elements of the previous matrix by the other matrix in two matrices of arbitrary size, and replaces the results in blocks to fill in all elements of the previous matrix to synthesize a larger matrix. The result is:
[0084]
[0085] Where, Representation matrix With the matrix The result of the Kronecker product operation; in formula (9) For the matrix With the matrix After the horizontal stacking operation, a new matrix with a dimension of N×(L+J) is obtained;
[0086] Primary fault diagnosis test result matrix All elements in the jth column of the position code are position-coded, j = 1, 2, ..., J, and J basic fault diagnosis algorithms with position coding {M1, ..., M j ,…,M J Primary fault diagnosis test results
[0087] S32: Construct a set of all permutations of the natural number sequence {1,2,…,j,…,J}, expressed as:
[0088] S J ={σ1,σ1,…,σ u ,…,σ U} (17)
[0089] Among them, S J is the set of all permutations of the natural number sequence {1,2,…,j,…,J}, σ u represents the full permutation set S J The u-th arrangement, σ u =(σ u (1),σ u (2),…,σ u (j)…,σ u (J)), u=1,2,3,…,U, U is the total number of permutations, U=J!, where J! represents the total number of permutations of J, σ u (j) represents the jth value of the uth arrangement, j = 1, 2, 3, ..., J; for any σ v ,σ n (v≠n)∈S J ,have
[0090] When J = 3, that is, the natural number sequence is {1, 2, 3}, the full permutation set S3, a total of U = 3! = 6 permutations, expressed as: S3 = {σ1, σ2, σ3, σ4, σ5, σ6}, the first, second, third, fourth, fifth, and sixth permutations are σ1 = (1, 2, 3), σ2 = (1, 3, 2), σ3 = (2, 1, 3), σ4 = (2, 3, 1), σ5 = (3, 1, 2), σ6 = (3, 2, 1); the fourth permutation is denoted as σ4 = (σ4(1), σ4(2), σ4(3)), σ4(1) = 2, σ4(2) = 3, σ4(3) = 1, respectively representing the first, second, and third values of the fourth permutation.
[0091] For the u-th arrangement σ u ∈S J , construct the meta-feature dataset matrix with position encoding under the u-th arrangement method, expressed as:
[0092]
[0093] In the formula represents the meta-feature dataset matrix with position encoding under the u-th arrangement; represents the column matrix of the jth meta-feature dataset with positional encoding under the uth arrangement;
[0094] The meta-feature dataset matrix with position encoding under all u-th (u=1,2,3,…,U) arrangements Stack vertically (by row) to obtain the meta-feature dataset matrix with position encoding, which is expressed as:
[0095]
[0096] Where, It represents the position-coded meta-feature dataset matrix obtained by stacking the meta-feature dataset matrices with position coding in all U arrangements vertically (by row);
[0097] Corresponding matrix of meta-feature dataset with positional encoding The meta-feature label set matrix is expressed as:
[0098]
[0099] Where, Represents the corresponding feature dataset matrix with position encoding The meta-feature label set matrix of ;
[0100] Optionally, the S4 includes:
[0101] S41: Set the meta-classifier algorithm to F; use the meta-feature dataset matrix with position encoding and the corresponding meta-feature label set matrix Perform T rounds of training optimization on the meta-classifier algorithm F to obtain the optimal parameter meta-classifier model is the optimal parameter meta-classifier model The optimal parameters of .
[0102] S42: Constructing optimal parameters The optimization function is:
[0103]
[0104] Where, is the optimal parameter meta-classifier model The optimal parameters of the meta-classifier model F θ Parameters, Denotes the meta-classifier model F with parameters θ θ In the dataset matrix D with positional encoding meta-features meta,pos The model output when training is input, L ce (F θ (D meta,pos ),Y meta,pos ) represents the meta-classifier model F with parameter θ θ In the dataset matrix D with positional encoding meta-features meta,pos Model output when trained for input With D meta,pos Corresponding label set Y meta,pos The cross entropy loss function value between ; Represents the cross entropy loss function L ce (F θ (D meta,pos ),Y meta,pos ) returns the value of the model parameter θ when it takes the minimum value;
[0105] Satisfies the following expression:
[0106]
[0107] in, Denotes the meta-classifier model F with parameters θ θ The matrix of the feature dataset with position encoding in the u-th arrangement The output of the model when trained on the input.
[0108] S43: Meta-classifier model using stochastic gradient descent Perform the tth round of training update. The formula for updating the model parameters in the tth round is:
[0109]
[0110] Where, Update the model for round t Parameters, Update the model for round t-1 Parameters, Update model parameters for round t The learning rate; Indicates that the parameter is The t-1th round update model The matrix of the feature dataset with position encoding in the u-th arrangement The output of the model when trained for the input; Indicates that the parameter is The t-1th round update model The matrix of the feature dataset with position encoding in the u-th arrangement Model output when trained for input and Corresponding label set The cross entropy loss function value between ; represents the cross entropy loss function about The partial derivative of .
[0111] Specifically, when t=1, the meta-classifier model F θ The formula for updating the first round of model parameters is:
[0112]
[0113] Where, Update the model for Round 1 Parameters, The matrix of the meta-feature dataset with position encoding under the u-th arrangement method is used for the meta-classifier algorithm and the corresponding label set The meta-classifier model obtained by training (the model is not updated) Initialization parameters; Indicates that the initialization parameters are The unupdated model The matrix of the feature dataset with position encoding in the u-th arrangement The output of the model when trained for the input; represents the cross entropy loss about The partial derivative of .
[0114] Take t = 1, 2, ..., T, and repeat formula (23) to update until the maximum number of iterations T, at which time the T-th round update model The parameters are Let the optimal parameters That is, the meta-classifier algorithm uses the meta-feature dataset matrix with position encoding under the u-th arrangement and the corresponding label set The meta-classifier model obtained by training The optimal parameter meta-classifier model obtained after T rounds of training is
[0115] Take u=1,2,…,U to form the optimal parameter meta-classifier model matrix
[0116] As a preferred implementation of this embodiment, the meta-classifier algorithm is set to a multi-layer perceptron algorithm including a three-layer multi-layer perceptron, and a meta-classifier model matrix containing two models is obtained through training.
[0117] It is worth emphasizing that the optimal parameter basic fault diagnosis model and the optimal parameter meta-classifier model are combined to form an integrated fault diagnosis model.
[0118] Optionally, the S5 includes:
[0119] S51: In the inference phase, real-time collection of device sensor data is performed to build an inference dataset. where N infer is the total number of samples in the inference dataset;
[0120] S52: Using the Inference Dataset Enter the optimal parameter basic fault diagnosis model matrix of formula (5) respectively All K×J optimal parameter basic fault diagnosis models in the , obtain the output results of the K×J optimal parameter basic fault diagnosis models, that is, the primary fault diagnosis reasoning result matrix, which is expressed as:
[0121]
[0122] Where, Represents the optimal parameter basic fault diagnosis model matrix Inference dataset The primary fault diagnosis reasoning result matrix obtained as input, Represents the optimal parameter-based fault diagnosis model matrix The optimal parameter-based fault diagnosis model in the kth row and jth column Input inference dataset D infer The primary fault diagnosis reasoning result obtained when is expressed as:
[0123]
[0124] Where, Represents the input inference dataset D infer When reasoning, the corresponding nth infer The primary fault diagnosis reasoning results obtained by samples, n infer =1,2,…,N infer , For the nth infer The primary fault diagnosis reasoning result about the lth class label obtained by samples is the probability of being judged as the lth class label, l = 0, 1, 2, ..., L-1, where L is the total number of labels.
[0125] S53: Optimal parameter-based fault diagnosis model matrix The K optimal parameter basic fault diagnosis model in the jth column (jth basic fault diagnosis algorithm) Input the inference dataset D respectively infer When reasoning, the primary fault diagnosis reasoning result of the basic fault diagnosis model with the K optimal parameters in the jth column is obtained as follows:
[0126]
[0127] As a preferred embodiment of the present invention, the 5×2 optimal parameter basic fault diagnosis model matrix, the 1st, 2nd, 3rd, 4th and 5th row matrices in the confusion matrix diagram of the primary fault diagnosis reasoning results of all optimal parameter basic fault diagnosis models are respectively as follows: Figure 2(a) 、 2(b) , 2(c), 2(d), and 2(e).
[0128] All K elements in formula (27) are averaged to obtain the average primary fault diagnosis reasoning result of the primary fault diagnosis reasoning results of the K optimal parameter basic fault diagnosis models in the jth column. The formula is:
[0129]
[0130] Where, is the average value of the primary fault diagnosis reasoning results of the K optimal parameter basic fault diagnosis models in the jth column, that is, the average primary fault diagnosis reasoning result of the optimal parameter basic fault diagnosis model in the jth column;
[0131] Take j = 1, 2, ..., J, and obtain the j-th column average primary fault diagnosis reasoning result matrix of all J basic fault diagnosis algorithms, which is expressed as:
[0132]
[0133] Where, is the average primary fault diagnosis reasoning result matrix of all J columns of the optimal parameter basic fault diagnosis model.
[0134] Optionally, S6 includes:
[0135] S61: Average primary fault diagnosis reasoning results for column j Perform position encoding to obtain the j-th column average primary fault diagnosis reasoning result with position encoding, and the formula is:
[0136]
[0137] In the formula is the average primary fault diagnosis reasoning result for the jth column Perform position encoding to obtain the j-th column average primary fault diagnosis reasoning result with position encoding; Indicates that the matrix With the matrix Stack horizontally to get a dimension of N infer ×(L+J) new matrix operation;
[0138] Construct the average primary fault diagnosis reasoning result matrix of all J columns with position coding, the formula is:
[0139]
[0140] in, is the average primary fault diagnosis reasoning result matrix of all J columns with position encoding.
[0141] S62: For any u-th arrangement σ u ∈S J ,(u∈1,2,3,…,U), average all J columns of the primary fault diagnosis reasoning result matrix with position coding By stacking horizontally (columns), we can obtain the matrix of the meta-feature dataset with positional coding inference under the u-th arrangement mode, which is expressed as:
[0142]
[0143] Where, It represents the average primary fault diagnosis reasoning result matrix of all J columns with position coding under the u-th arrangement mode Stack horizontally (by column) to obtain the matrix of the positional encoding inference meta-feature dataset under the u-th arrangement;
[0144] S63: The inference meta-feature dataset matrix with position encoding under the u-th arrangement Input to the optimal parameter meta-classifier model under the u-th arrangement The optimal parameter meta-classifier model output is obtained, which is the combined integrated fault diagnosis reasoning result:
[0145]
[0146] Where, The optimal parameters are The optimal meta-classifier model The matrix of the inference meta-feature dataset with position encoding in the u-th arrangement The model output when reasoning with the input, that is, N infer Inference dataset of samples The combined integrated fault diagnosis reasoning results.
[0147] Taking u=1,2,…,U, the combined integrated fault diagnosis reasoning results are as follows:
[0148]
[0149] As a preferred embodiment of the present invention, the optimal parameter meta-classifier model matrix of the two models is included, and the confusion matrix of the combined integrated fault diagnosis reasoning result of each optimal parameter meta-classifier model is as follows: Figure 3 shown.
[0150] The present application also provides a combined integrated fault diagnosis system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-described method when executing the computer program. This combined integrated fault diagnosis system can implement various embodiments of the above-described combined integrated fault diagnosis method and achieve the same beneficial effects, which are not described in detail here.
[0151] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. A combined integrated fault diagnosis method, characterized in that: include: S1: Collect sensor data from vehicles, ground infrastructure, and environmental status equipment in the regional rail transit network to construct a K-fold training dataset and its corresponding label set, a K-fold test dataset and its corresponding label set; S2: Using the K-fold training data set and the corresponding label set for training, a basic fault diagnosis model of the basic fault diagnosis algorithm and an optimal parameter basic fault diagnosis model are constructed; using the K-fold test data set and the corresponding label set, a primary fault diagnosis test result of the optimal parameter basic fault diagnosis model is obtained; S3: constructing primary fault diagnosis test results of all basic fault diagnosis algorithms with position coding based on the primary fault diagnosis test results; And construct the meta-feature dataset with position encoding and the corresponding meta-feature label set under all arrangement modes; S4: training based on the position-coded meta-feature dataset and the corresponding meta-feature label set to construct an optimal parameter meta-classifier model under all permutations, wherein the optimal parameter basic fault diagnosis model and the optimal parameter meta-classifier model are combined to form an integrated fault diagnosis model; S5: collecting device sensor data in real time and constructing an inference data set, inputting the inference data set into the optimal parameter basic fault diagnosis model for inference, and obtaining the average primary fault diagnosis inference results of all J columns of output; S6: Based on the average primary fault diagnosis reasoning results of all J columns, construct the average primary fault diagnosis reasoning results of all J columns with position coding; and construct the reasoning meta-feature dataset with position coding under the u-th arrangement; input the reasoning meta-feature dataset with position coding into the optimal parameter meta-classifier model under the u-th arrangement to obtain the final combined integrated fault diagnosis reasoning result.
2. The combined integrated fault diagnosis method according to claim 1, characterized in that: Said S1 comprises: S11: Collect sensor data of equipment in rail transit vehicles to form an original data set D = {d1,…,d n ,…,d N },in is the sample, n=1,2,…,N, N is the total number of samples, C is the total number of sensor channels, W is the length of the sensor data sequence, is the real number field; for sample d n After labeling, the mapping relationship between samples and labels is as follows: L:d n →y n (1) Where y n ∈{0,1,2,…,L-1}, L is the total number of labels, and the label set Y corresponding to the original data set D is {y1,…,y n ,…y N }, Λ represents the mapping from sample to label; S12: Randomly divide the original data set D into K subsets in is the kth data subset, k=1,2,…,K,N s =N / K represents the total number of samples in the kth data subset; all subsets meet the condition Divide the label set Y into K subsets is the label subset corresponding to the kth data subset; data subset N in s samples and label subsets N in s The labels satisfy the mapping relationship of formula (1); Construct K-fold training datasets separately K-fold validation dataset in They are the k-fold training dataset and the k-fold validation dataset, k=1,2,…,K, With the kth data subset The relationship satisfies the following relationship: Where, Indicates that in the data set D K Remove the kth data subset The set consisting of the K-1 data subsets remaining after the difference operation, Construct label sets corresponding to K-fold training datasets respectively The label set corresponding to the K-fold validation dataset in are the label sets corresponding to the k-th fold training dataset and the k-th fold validation dataset, respectively. With the kth label subset The relationship satisfies the following relationship: Where, Indicates that in the label set Y K Remove the kth label subset from The set consisting of the K-1 label subsets remaining after the difference operation, 3. The combined integrated fault diagnosis method according to claim 1, characterized in that: The S2 includes: S21: Build a basic fault diagnosis model: Assume that J different basic fault diagnosis algorithms are expressed as in Represents the jth basic fault diagnosis algorithm, j = 1, 2, ..., J, J is the total number of basic fault diagnosis algorithms; using the K-fold training data set and the label set of the K-fold training dataset For the jth basic fault diagnosis algorithm Train K times respectively to obtain K basic fault diagnosis models J basic fault diagnosis algorithms After training K times respectively, a total of K×J basic fault diagnosis models are obtained, which are expressed as follows using matrices: Where, J basic fault diagnosis algorithms The basic fault diagnosis model obtained after K times of training, Represents the basic fault diagnosis model The k-th row and j-th column element of S22: Constructing the optimal parameter-based fault diagnosis model: For the jth basic fault diagnosis algorithm The k-th basic fault diagnosis model Then perform E rounds of training and update to obtain K optimal parameter basic fault diagnosis models Taking j = 1, 2, ..., J, we can get a total of K × J optimal parameter basic fault diagnosis models, which can be expressed as a matrix: Where, Represents J basic fault diagnosis algorithms After K training times, K×J basic fault diagnosis models are obtained Then, each basic fault diagnosis model is The optimal parameter-based fault diagnosis model obtained through E rounds of training; Represents the optimal parameter-based fault diagnosis model The k-th row and j-th column element of The optimal parameter-based fault diagnosis model The optimal parameters of The optimization function satisfies the following relationship: Where, represents the cross entropy loss function, φ k,j Basic fault diagnosis model Parameters, The parameter is φ k,j Basic fault diagnosis model In the k-th fold training dataset The model output when training for input, The parameter is φ k,j Basic fault diagnosis model In the k-th fold training dataset Model output when trained for input and Corresponding label set The cross entropy loss function value between ; represents the cross entropy loss function Returns the model parameter φ when the minimum value is taken k,j Operations for obtaining values; is the k-fold training dataset The corresponding label set; The basic fault diagnosis model in formula (4) is modified by stochastic gradient descent method. Perform the e-th round of training update. The formula for updating the model parameters in the e-th round is as follows: Where, φ k,j,e Update the model for round e The parameter, φ k,j,e-1 Update the model for round e-1 Parameters, Update model parameters φ for round e k,j,e The learning rate, The parameter is φ k,j,e-1 The e-1th round update model In the k-th fold training dataset The output of the model when trained for the input; represents the cross entropy loss function About φ k,j,e-1 The partial derivative of Indicates partial derivative; Take e=1,2,…,E, repeat formula (7) to update until the maximum number of iterations E, at which time the E-th round update model The parameter is φ k,j,E , let the optimal parameter That is, the jth basic fault diagnosis algorithm uses the kth fold data set and the corresponding label set Basic fault diagnosis model obtained through training The optimal parameter basic fault diagnosis model obtained after E rounds of training is: Take k = 1, 2, ..., K, j = 1, 2, ..., J, and form the optimal parameter-based fault diagnosis model of formula (5) S23: Use the k-fold validation dataset Test the optimal parameter-based fault diagnosis model separately The k-th row J optimal parameter basic fault diagnosis model The primary fault diagnosis test results of the k-th row J optimal parameter basic fault diagnosis model are obtained, which are expressed as follows: in, Indicates that the k-th row J optimal parameter basic fault diagnosis model is input into the k-th fold validation data set respectively Primary fault diagnosis test results obtained during the test; Represents the optimal parameter-based fault diagnosis model for the kth row and jth column Input is the k-fold validation dataset The primary fault diagnosis test results obtained when , are expressed as: Where, Indicates input of the k-fold validation dataset When testing, the corresponding nth s The primary fault diagnosis test results obtained by samples, n s =1,2,…,N s , For the nth s The test results of the lth class label obtained by samples, l = 0, 1, 2, ..., L, L is the total number of labels; Taking k = 1, 2, ..., K, we can get the primary fault diagnosis test results of the J basic fault diagnosis models trained with all K-fold training data sets and tested with the K-fold validation data sets, which are expressed as: in, Represents the optimal parameter-based fault diagnosis model The primary fault diagnosis test results of all the optimal parameter basic fault diagnosis models obtained by testing the K-fold validation dataset; Primary fault diagnosis test results The corresponding true label is expressed as: in, Indicates the results of the primary fault diagnosis test The corresponding true label.
4. The combined integrated fault diagnosis method according to claim 1, characterized in that: The S3 includes: S31: Test results for primary fault diagnosis The jth column All elements are position-coded to obtain the jth basic fault diagnosis algorithm with position coding Primary fault diagnosis test results Satisfies the following relationship: in, Represents the jth basic fault diagnosis algorithm with position coding The primary fault diagnosis test results of cat(·,·) represent the results of horizontal stacking operation on the two matrices in the brackets. represents an N×1 column matrix of all 1 elements, The Kronecker product is an operation that multiplies all elements of one matrix by the other matrix of any size and replaces the results in blocks to fill in all elements of the previous matrix to generate a larger matrix. Onehot(·) represents the result of the one-hot encoding operation. Primary fault diagnosis test results All elements in the jth column are position-coded, j = 1, 2, ..., J, and J basic fault diagnosis algorithms with position coding are obtained. Primary fault diagnosis test results S32: Construct a set of all permutations of the natural number sequence {1,2,…,j,…,J}, expressed as: S J ={σ1,σ1,…,σ u ,…,s U } (16) Among them, S J is the set of all permutations of the natural number sequence {1,2,…,j,…,J}, σ u represents the full permutation set S J The u-th arrangement, σ u =(σ u (1),σ u (2),…,σ u (j)…,σ u (J)), u=1,2,3,…,U, U is the total number of permutations, U=J!, where J! represents the total number of permutations of J, σ u (j) represents the jth value of the uth arrangement, j = 1, 2, 3, ..., J; for any σ v ,σ n (v≠n)∈S J ,have For the u-th arrangement σ u ∈S J , construct the meta-feature dataset with position encoding under the u-th arrangement, expressed as: Where, represents the meta-feature dataset with position encoding under the u-th arrangement; represents the jth column of the meta-feature dataset with positional encoding under the uth arrangement; The meta-feature dataset with position encoding under all u-th arrangement By stacking vertically, we can obtain a meta-feature dataset with position encoding, which can be expressed as: Corresponding meta-feature dataset with position encoding The meta-feature tag set is expressed as: In the formula Indicates the results of the primary fault diagnosis test The corresponding true label.
5. The combined integrated fault diagnosis method according to claim 1, characterized in that: The S4 includes: S41: Set the meta-classifier algorithm to Using the position-encoded meta-feature dataset: and the corresponding meta-feature tag set Meta-classifier algorithm Perform T rounds of training optimization to obtain the optimal parameter meta-classifier model is the optimal parameter meta-classifier model The optimal parameters of S42: Constructing optimal parameters The optimization function satisfies the following relationship: Where θ is the meta-classifier model Parameters, Represents a meta-classifier model with parameters θ In the dataset D with positional encoding meta-features meta,pos The model output when training for input, Represents a meta-classifier model with parameters θ In the dataset D with positional encoding meta-features meta,pos Model output when trained for input With D meta,pos Corresponding label set Y meta,pos The cross entropy loss function value between ; represents the cross entropy loss function The operation that returns the value of the model parameter θ when the minimum value is taken; S43: Meta-classifier model using stochastic gradient descent Perform the tth round of training update. The formula for updating the model parameters in the tth round is as follows: Where, Update the model for round t Parameters, Update the model for round t-1 Parameters, Update model parameters for round t The learning rate; Indicates that the parameter is The t-1th round update model The dataset with positional encoding meta-features in the u-th arrangement The output of the model when trained for the input; Indicates that the parameter is The t-1th round update model The dataset with positional encoding meta-features in the u-th arrangement Model output when trained for input and Corresponding label set The cross entropy loss function value between ; represents the cross entropy loss function about The partial derivative of Take t = 1, 2, ..., T, and repeat formula (21) to update until the maximum number of iterations T, at which time the T-th round update model The parameters are Let the optimal parameters That is, the meta-classifier algorithm uses the position-encoded meta-feature dataset under the u-th arrangement and the corresponding label set The meta-classifier model obtained by training The optimal parameter meta-classifier model obtained after T rounds of training is Take u=1,2,…,U to form the optimal parameter meta-classifier model 6. The combined integrated fault diagnosis method according to claim 1, characterized in that: The S5 includes: S51: In the inference phase, real-time collection of device sensor data is performed to build an inference dataset. where N infer is the total number of samples in the inference dataset; S52: Using the Inference Dataset Input optimal parameters of basic fault diagnosis model respectively All K×J optimal parameter basic fault diagnosis models in the , obtain the primary fault diagnosis reasoning results of the K×J optimal parameter basic fault diagnosis models, and satisfy the following relationship: Where, Represents the optimal parameter-based fault diagnosis model The optimal parameter-based fault diagnosis model in the kth row and jth column Input inference dataset D infer The primary fault diagnosis reasoning results obtained when is expressed as follows: Where, Represents the input inference dataset D infer When reasoning, the corresponding nth infer The primary fault diagnosis reasoning results obtained by samples, n infer =1,2,…,N infer , For the nth infer The primary fault diagnosis reasoning results of the lth class label obtained by samples, l = 0, 1, 2, ..., L, L is the total number of labels; S53: Optimal parameter-based fault diagnosis model The j-th column K optimal parameter basic fault diagnosis model Input the inference dataset D respectively infer When reasoning, the primary fault diagnosis reasoning result of the basic fault diagnosis model with the K optimal parameters in the jth column is obtained as follows: All K elements in formula (24) are averaged to obtain the average primary fault diagnosis reasoning result of the primary fault diagnosis reasoning results of the K optimal parameter basic fault diagnosis models in the jth column, which is as follows: Where, is the average value of the primary fault diagnosis reasoning results of the K optimal parameter basic fault diagnosis models in the jth column; Taking j = 1, 2, 3, ..., J, we can obtain the j-th average primary fault diagnosis reasoning results of all J basic fault diagnosis algorithms, which are expressed as follows: Where, is the average primary fault diagnosis reasoning result of all J columns of the optimal parameter basic fault diagnosis model.
7. The combined integrated fault diagnosis method according to claim 6, characterized in that: The S6 includes: S61: Average primary fault diagnosis reasoning results for column j Perform position encoding to obtain the j-th column average primary fault diagnosis reasoning result with position encoding, and the formula is as follows: Where, is the average primary fault diagnosis reasoning result for the jth column Perform position encoding to obtain the j-th column average primary fault diagnosis reasoning result with position encoding; Indicates that the matrix With the matrix Stack horizontally to get a dimension of N infer ×(L+J) new matrix operation; Construct the average primary fault diagnosis reasoning results of all J columns with position encoding, the formula is as follows: in, Average primary fault diagnosis reasoning results for all J columns with position encoding; S62: For any u-th arrangement σ u ∈S J ,(u∈1,2,3,…,U), average the primary fault diagnosis reasoning results of all J columns with position encoding By stacking horizontally, we can obtain the meta-feature dataset with positional encoding inference under the u-th arrangement, which is expressed as follows: Where, represents the average primary fault diagnosis reasoning result of all J columns with position coding under the u-th arrangement Perform horizontal stacking to obtain the meta-feature dataset with positional encoding inference under the u-th arrangement; S63: The reasoning meta-feature dataset with position encoding under the u-th arrangement Input to the optimal parameter meta-classifier model under the u-th arrangement Get the combined integrated fault diagnosis reasoning result output by the optimal parameter meta-classifier model: Where, The optimal parameters are The optimal meta-classifier model Inference meta-feature dataset with position encoding in the u-th arrangement The model output when reasoning with the input, that is, N infer Inference dataset of samples Combined integrated fault diagnosis reasoning results; Taking u=1,2,…,U, the combined integrated fault diagnosis reasoning results are as follows:
8. A combined integrated fault diagnosis system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Stacking sewage treatment fault diagnosis method based on weighted integration of plurality of meta-classifiers
CN110826611A
Wind turbine generator compound fault diagnosis method based on artificial intelligence
CN114626415A