Electrical equipment fault diagnosis method and system based on quantum coding generative adversarial network
Through quantum encoding generation of adversarial networks and dynamic group evolution optimization algorithms, the problems of insufficient data and difficulty in feature extraction in electrical equipment fault diagnosis are solved, and efficient and accurate fault identification and diagnosis are achieved.
Patent Information
- Application Number
- CN202510687720.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-29
AI Technical Summary
There are problems in the existing electrical equipment fault diagnosis methods such as insufficient data samples, high feature complexity, diversified noise interference and difficult to capture nonlinear features, resulting in insufficient generalization ability and fault recognition accuracy of diagnostic models, especially in minor faults and fault warnings, which are difficult to meet actual needs.
The method of generating adversarial networks based on quantum encoding is adopted, and electrical equipment data is collected through distributed sensor networks, and the data is encoded and an adversarial network is generated. Combined with a 6-layer fully connected neural network and a dynamic group evolution optimization algorithm, fault characteristics are extracted and classified to generate diagnostic reports.
It improves the accuracy and generalization ability of fault diagnosis, especially in dealing with complex features and identifying minor faults, significantly improves the accuracy and efficiency of diagnosis, solving the limitations of traditional methods.
Smart Images

Figure CN120561807A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrical equipment fault diagnosis, and more specifically, relates to a method and system for electrical equipment fault diagnosis based on quantum coding generative adversarial networks. Background Art
[0002] In the operation and maintenance of electrical equipment, accurate diagnosis of equipment faults is crucial. Current electrical equipment fault diagnosis mainly relies on machine learning and deep learning methods based on sensor data. However, existing technologies have many limitations, including insufficient data samples, complex data features, diverse noise interference, and difficulty in capturing nonlinear features, resulting in insufficient generalization capabilities and fault identification accuracy of diagnostic models. Traditional generative adversarial networks have the difficulty of generating diverse samples when processing small samples, while feature extraction and dimensionality reduction methods lack dynamic optimization mechanisms for complex features, which easily leads to inefficient model training. In addition, traditional classifiers have obvious limitations in dealing with the nonlinear characteristics of complex electrical data and are unable to accurately identify various fault conditions, especially in the subtle identification of minor faults and fault warnings, which is difficult to meet actual needs.
[0003] Prior Art Document 1 (CN 118797431 A) discloses a neural network-based base station fault diagnosis method and apparatus. The shortcoming of Prior Art Document 1 is that its algorithm focuses primarily on encoding operating base station data into quantum states using quantum bits, and training generation and discrimination using the superposition and entanglement properties of quantum states. While it mentions the training process for the generator and discriminator, as well as the adjustment of quantum states, it is relatively brief on quantum operations and computational details, and does not clearly describe how to implement quantum circuits and specific quantum gate operations. Summary of the Invention
[0004] To address the shortcomings of the existing technology, this paper provides a method and system for electrical equipment fault diagnosis based on a quantum-coded generative adversarial network. This method addresses the challenges of insufficient data and difficult feature extraction in electrical equipment fault diagnosis. By using a quantum-coded generative adversarial network to generate new fault data and combining quantum coding with neural networks to extract key features, the accuracy and generalization of fault diagnosis are effectively improved.
[0005] The present invention adopts the following technical solutions.
[0006] A first aspect of the present invention provides a method for diagnosing electrical equipment faults based on a quantum coding generative adversarial network, comprising the following steps:
[0007] Collecting the operating data of electrical equipment through a distributed sensor network, annotating the operating data of electrical equipment based on the equipment status, and obtaining annotated data;
[0008] Convert the labeled data into a quantum state, use quantum gates to quantum encode the labeled data, map the labeled data to a quantum feature space, use quantum measurement to obtain the quantum feature representation of the labeled data, and obtain quantum encoded data;
[0009] Using quantum-encoded data as input, a generative adversarial network (GAN) is trained. The GAN consists of a generator and a discriminator. The entangled state feedback mechanism is used to optimize the generator parameters and obtain new fault data. The new fault data and quantum-encoded data are input into a 6-layer fully connected neural network to extract feature vectors. The feature vectors are then screened and sorted, and the fault feature data is output.
[0010] Perform dimensionality reduction and classification on fault feature data, output fault status, generate diagnostic report based on fault status, and output classification results of electrical equipment operating status.
[0011] Preferably, the operation data of the electrical equipment is collected through a distributed sensor network, and the operation data of the electrical equipment is annotated based on the equipment status, and the annotated data is obtained, including:
[0012] The collected operating data of electrical equipment is filtered out of noise and stored in a cloud server in a standardized JSON format;
[0013] The collected operating data of electrical equipment is manually labeled, and the labeled categories include: normal operation, minor fault, serious fault and equipment fault warning.
[0014] Preferably, the labeled data is converted into quantum state initialization as follows:
[0015]
[0016] Where |ψ> is the quantum state after initialization, H i represents the Hadamard gate applied to each qubit to put the qubit into a superposition state, is n cs The initial state of the qubit, n cs is the number of qubits;
[0017] Quantum gates are used to quantum encode the labeled data and map the labeled data into the quantum feature space, including:
[0018] |φ enc >=U enc (θ c )|ψ>
[0019] Where U enc Encode quantum gates for labeling data; φ enc is the encoded quantum state; θc Parameters representing quantum operations;
[0020] Quantum measurement is used to obtain the quantum feature representation of the labeled data, and the quantum coded data is obtained as follows:
[0021] x out =Tr(ρM c )
[0022] Where x out is the numerical matrix after measurement, ρ is the density matrix of quantum state, M c is the measurement operator, and Tr() is the trace operation of the matrix.
[0023] Preferably, the generative adversarial network includes a generator and a discriminator, including:
[0024] The generator generates new fault data based on quantum coded data:
[0025] |φ gen >=U gen (G c ,θ c )|φ enc >
[0026] The discriminator evaluates the similarity between the generated new fault data and the real device fault data;
[0027] D c (|φ gen >)=<φ gen |I+M c |φ gen >
[0028]
[0029] Where U gen () is the quantum operation of the generator, θ c is the parameter of the quantum operation; |φ> is the quantum state output by the generator, |φ gen > represents the left vector of the quantum state output by the generator; I is the identity matrix; G c Denotes the generator, D c Denotes the discriminator; D c () represents the discriminator function, G c () represents a generator function;
[0030] M c is the constructed quantum measurement operator; j,c represents the eigenvalue of the jth measurement result, |u j,c > is the characteristic state of the jth measurement result; j,c | is the left vector of the quantum state of the j-th measurement result.
[0031] Preferably, the step of training a generative adversarial network using quantum coded data as input comprises:
[0032] The generator parameters are optimized as follows to construct the Hamiltonian operator:
[0033]
[0034] Where, and are the Pauli X and Z gates acting on the k-th qubit; and are the Pauli X and Z gates acting on the k+1th quantum bit; H c represents the Hamiltonian operator;
[0035] The adversarial training loss is calculated as follows:
[0036]
[0037] Where, L c represents the loss function of adversarial training, is the expected operation, p data is the true data distribution, p z is the input noise distribution of the generator, ~ indicates that it obeys a specific distribution; x ds is the input data of the discriminator; z ds is the input noise of the generator;
[0038] The generator parameters are optimized using the entangled state feedback mechanism as follows:
[0039] E c (|ψ>)=-Tr(ρ A logρ A )
[0040] Where, E c (|ψ>) represents the entanglement degree of the quantum state; ρ A is the density matrix of the partial qubits of the quantum state |ψ〉;
[0041] The quantum gate parameters are optimized as follows:
[0042]
[0043] Where, is the updated quantum operation parameter, α c is the learning rate of the generative adversarial network,
[0044] is about the parameter θ c The loss function L cThe gradient of η c is the learning rate of entanglement feedback, which is used to control the contribution of entanglement to parameter adjustment; is the gradient of the entanglement with respect to the parameter.
[0045] Preferably, the step of inputting the new fault data and quantum coded data into a 6-layer fully connected neural network to extract feature vectors includes:
[0046] A 6-layer fully connected neural network is trained based on dynamic swarm evolution optimization, including:
[0047] Use the bionic algorithm to initialize the population, each individual represents a neural network configuration, and the individual weights and biases are initialized through normal distribution;
[0048] The configuration calculates the output of the new fault data input, evaluates the performance of each individual according to the loss function, and optimizes using a composite loss function that includes mean squared error and regularization terms;
[0049] According to the evaluation results of the loss function, individuals with higher fitness are selected from the population as candidate solutions for the next generation;
[0050] Perform crossover and mutation operations on the population to generate new individuals. The crossover operation exchanges some genes of two individuals.
[0051] Repeat the selection, crossover and mutation operations to optimize the weights and biases of the neural network until the stopping condition is met; and extract the feature vector of the new fault data input.
[0052] Preferably, the configuration calculates the output of inputting new fault data, evaluates the performance of each individual according to a loss function, and optimizes using a composite loss function, the loss function including a mean square error and a regularization term, including:
[0053] The composite loss function is calculated as follows:
[0054]
[0055] Where, MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter; W pi,k is the kth weight of the neural network corresponding to the i-th individual; l() represents the composite loss function, and fsig() represents the neural network model function; Represents the characteristics of the j-th sample; represents the label of the jth sample.
[0056] Preferably, the fault feature data is reduced in dimension and classified, the fault status is output, a diagnostic report is generated based on the fault status, and the classification result of the electrical equipment operating status is output, including:
[0057] The fault feature data is trained with a feature-refinement-based autoencoding neural network for dimensionality reduction. The feature-refinement-based autoencoding neural network includes an encoder, a decoder, and a feature adjustment module.
[0058] The encoder uses a multi-layer nonlinear mapping structure to reduce the dimension of the fault feature data. The decoder is used to remap the reduced-dimensional fault feature data back to the original fault feature data. The feature adjustment module adjusts the reduced-dimensional fault feature data through recursive optimization.
[0059] The fault feature data is reduced in dimension using the following formula:
[0060] Z r =Sig enc (W r X r +b r )
[0061] Where Z r represents the initial low-dimensional features, W r is the weight matrix of the encoder, b r is the bias vector of the encoder, Sig enc () is the multi-layer Sigmoid activation function of the encoder;
[0062] The fault feature data after dimensionality reduction is recursively optimized and adjusted using the following formula:
[0063] Z′ r =A r Z r
[0064] A r =diag(α r )
[0065] Where Z′ r is the feature representation after feature weight adjustment; A r is the initial weight matrix; α r is the feature weight vector, α r Each element α in r,i Initialized to the same value, it means that all features have the same importance in the initial stage; diag() is a function that extracts the diagonal elements of the matrix.
[0066] Preferably, the fault feature data after dimensionality reduction is input into a classifier model, wherein the classifier model is constructed based on a fractional-order neural network of a differential operator, and the classification result is optimized through collaborative robustness constraints;
[0067] Based on the fractional-order neural network, the fault feature data after dimensionality reduction is transformed nonlinearly to extract the representation vector for classification as follows:
[0068]
[0069] Where, represents the fractional-order neural network output of the lth layer; is the weight matrix of the lth layer of the fractional-order neural network; It is the output or input layer data of the l-1th layer of the fractional-order neural network; is the bias of the lth layer of the fractional-order neural network; Sig() is the Sigmoid activation function; δ is the fractional-order differential operator;
[0070] The classification results are optimized as follows:
[0071]
[0072] Where, L u is the loss function of the collaborative robustness constraint, which includes the cross entropy loss and the collaborative robustness constraint; is the true label of the i-th sample; is the label predicted by the model; m u is the sample size; λ u is the regularization parameter that controls the strength of the collaborative robustness constraint; R u represents the regularization term; β u is a tuning parameter that determines the sensitivity of the prediction differences.
[0073] A second aspect of the present invention provides an electrical equipment fault diagnosis system based on a quantum coding generative adversarial network, comprising: a data acquisition module, a quantum coding module, a generative adversarial network module, a feature extraction module, and a fault diagnosis module;
[0074] A data acquisition module is used to collect operating data of electrical equipment through a distributed sensor network, and to annotate the collected operating data based on the equipment status to obtain annotated data;
[0075] The quantum coding module converts the labeled data into a quantum state, uses quantum gates to quantum encode the labeled data, maps the labeled data into a quantum feature space, and uses quantum measurement to obtain the quantum feature representation of the labeled data and obtain quantum encoded data;
[0076] The generative adversarial network module uses quantum-encoded data as input to train a generative adversarial network, which includes a generator and a discriminator. The generator optimizes parameters through an entangled state feedback mechanism to generate new fault data.
[0077] The feature extraction module inputs the new fault data and quantum coded data into a 6-layer fully connected neural network, extracts the fault feature vector, filters and sorts the feature vector, and outputs the fault feature data;
[0078] The fault diagnosis module reduces the dimension and classifies the fault feature data, outputs the fault status, generates a diagnostic report for the electrical equipment based on the fault status, and outputs the classification results of the equipment operating status.
[0079] Compared with existing technologies, the present invention offers at least the following advantages: By combining quantum coding and generative adversarial network (GAN) technology, it addresses the challenges of insufficient data samples, high feature complexity, noise interference, and difficulty capturing nonlinear features in traditional electrical equipment fault diagnosis methods. First, quantum coding is used to convert electrical equipment operating data into quantum states, improving data representation and processing accuracy. Then, a generative adversarial network is used to expand the training dataset, addressing the bottleneck of training with small sample data, effectively increasing data diversity, and enhancing the model's generalization capabilities. Specifically, when processing complex features, a neural network algorithm based on dynamic population evolutionary optimization is employed to optimize the feature extraction process, enhance adaptability to nonlinear and complex features, and improve fault diagnosis accuracy and training efficiency. Furthermore, by extracting data features through a six-layer fully connected neural network and combining dimensionality reduction and classification optimization of fault feature data, the present invention effectively improves the ability to identify fault states, particularly in identifying subtle differences between minor faults and fault warnings, significantly enhancing diagnostic accuracy. Overall, the present invention not only overcomes the limitations of traditional technologies for electrical equipment fault diagnosis but also provides an efficient and accurate solution that can better address the various challenges and demands of practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 This is a training flow chart of a neural network algorithm based on dynamic population evolution optimization provided in accordance with an embodiment of the present invention;
[0081] Figure 2 This is a training flow chart of an autoencoding neural network algorithm based on feature refinement provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION
[0082] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without making creative efforts are all within the scope of protection of the present invention.
[0083] Example 1 of the present invention provides a method for diagnosing electrical equipment faults based on a quantum coding generative adversarial network, comprising the following steps:
[0084] Step 1: Collecting operating data of electrical equipment through a distributed sensor network, annotating the operating data of the electrical equipment based on the equipment status, and obtaining annotated data;
[0085] Preferably, step 1 comprises:
[0086] Step 1.1: Filter the noise from the collected operating data of electrical equipment and store it in a cloud server in a standardized JSON format;
[0087] Step 1.2: Label the collected operating data of the electrical equipment manually. The labeling categories include: normal operation, minor fault, serious fault, and equipment fault warning.
[0088] Specifically, data collection and annotation are as follows:
[0089] The training data used in the electrical equipment fault diagnosis model of the present invention comes from real-time monitoring data generated by various electrical equipment during their operation. The data is collected using a distributed sensor network, and the voltage, current, temperature and other parameters of the electrical equipment are monitored in real time through a high-frequency sampling module.
[0090] All collected data are first preprocessed to filter out noise and then stored in a cloud server in a standardized JSON format.
[0091] In one embodiment, the attributes of the data include: voltage value (Ra), current value (Rb), power factor (Rc), frequency (Rd), temperature (Re), vibration frequency (Rf), noise level (Rg), equipment status indication (Rh), maintenance record (Ri), and operation time (Rj).
[0092] It should be noted that this embodiment is only intended to illustrate one data format and type of the present invention. In actual applications, the attributes of data are usually more than 10 attributes, and the number of attributes of data may reach dozens or even hundreds.
[0093] Step 2: Convert the labeled data into a quantum state, use quantum gates to quantum encode the labeled data, map the labeled data to a quantum feature space, and use quantum measurement to obtain a quantum feature representation of the labeled data to obtain quantum encoded data.
[0094] Preferably, in step 2.1, the labeled data is converted into quantum state initialization as follows:
[0095]
[0096] Where |ψ> is the quantum state after initialization, H i represents the Hadamard gate applied to each qubit to put the qubit into a superposition state, is n cs The initial state of the qubit, n cs is the number of qubits;
[0097] Step 2.2: Use quantum gates to quantum encode the labeled data and map the labeled data to the quantum feature space, including:
[0098] |φ enc >=U enc (θ c )|ψ>
[0099] Where U enc Encode quantum gates for labeling data; φ enc is the encoded quantum state; θ c Parameters representing quantum operations;
[0100] Step 2.3: Use quantum measurement to obtain the quantum feature representation of the labeled data, and obtain the quantum encoded data as follows:
[0101] x out =Tr(ρM c )
[0102] Where x out is the numerical matrix after measurement, ρ is the density matrix of quantum state, M c is the measurement operator, and Tr() is the trace operation of the matrix.
[0103] Step 3: Using quantum coded data as input, train a generative adversarial network (GAN), which includes a generator and a discriminator. The GAN uses an entangled state feedback mechanism to optimize the generator parameters and obtain new fault data. The new fault data and quantum coded data are input into a 6-layer fully connected neural network to extract feature vectors. The feature vectors are then screened and sorted, and the fault feature data is output.
[0104] It is understandable that the acquisition, labeling, and preprocessing of training data in the present invention are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization and affect model accuracy. The present invention uses a quantum-coded generative adversarial network to generate samples and thereby achieve data augmentation. Building on the traditional generative adversarial network, the present invention utilizes quantum coding to encode and process information, thereby improving the efficiency of the generative model and the diversity of the output data.
[0105] Preferably, the generative adversarial network includes a generator and a discriminator, including:
[0106] The generator generates new fault data based on quantum coded data:
[0107] |φ gen >=U gen (G c ,θ c )|φ enc >
[0108] The discriminator evaluates the similarity between the generated new fault data and the real device fault data;
[0109] D c (|φ gen >)=<φ gen |I+M c |φ gen >
[0110]
[0111] Where U gen () is the quantum operation of the generator, θ c is the parameter of the quantum operation; |φ> is the quantum state output by the generator, |φ gen > represents the left vector of the quantum state output by the generator; I is the identity matrix; G c Denotes the generator, D c represents the discriminator; D c () represents the discriminator function, G c () represents a generator function;
[0112] M c is the constructed quantum measurement operator; j,c represents the eigenvalue of the jth measurement result, |u j,c > is the characteristic state of the jth measurement result; j,c | is the left vector of the quantum state of the j-th measurement result.
[0113] Preferably, the step of training a generative adversarial network using quantum coded data as input comprises:
[0114] The generator parameters are optimized as follows to construct the Hamiltonian operator:
[0115]
[0116] Where, and are the Pauli X and Z gates acting on the k-th qubit; and are the Pauli X and Z gates acting on the k+1th quantum bit; H c represents the Hamiltonian operator;
[0117] During adversarial training, the generator attempts to generate new data that is as close to the real data as possible, while the discriminator attempts to distinguish between real data and generated data. The optimization of the generator and discriminator can be performed using the following loss function:
[0118] The adversarial training loss is calculated as follows:
[0119]
[0120] Where, L c represents the loss function of adversarial training, is the expected operation, p data is the true data distribution, p z is the input noise distribution of the generator, ~ indicates that it obeys a specific distribution; x ds is the input data of the discriminator; z ds is the input noise of the generator;
[0121] The generator parameters are optimized using the entangled state feedback mechanism as follows:
[0122] E c (|ψ>)=-Tr(ρ A logρ A )
[0123] Where, E c (|ψ>) represents the entanglement degree of the quantum state; ρ A is the density matrix of the partial qubits of the quantum state |ψ〉;
[0124] The quantum gate parameters are optimized as follows:
[0125]
[0126] Where, is the updated quantum operation parameter, α c is the learning rate of the generative adversarial network,
[0127] is about the parameter θ c The loss function L c The gradient of η c is the learning rate of entanglement feedback, which is used to control the contribution of entanglement to parameter adjustment; is the gradient of the entanglement with respect to the parameter.
[0128] like Figure 1 As shown, preferably, the step of inputting the new fault data and quantum coded data into a 6-layer fully connected neural network to extract feature vectors includes:
[0129] A 6-layer fully connected neural network is trained based on dynamic swarm evolution optimization, including:
[0130] Use the bionic algorithm to initialize the population, each individual represents a neural network configuration, and the individual weights and biases are initialized through normal distribution;
[0131] The configuration calculates the output of the new fault data input, evaluates the performance of each individual according to the loss function, and optimizes using a composite loss function that includes mean squared error and regularization terms;
[0132] According to the evaluation results of the loss function, individuals with higher fitness are selected from the population as candidate solutions for the next generation;
[0133] Perform crossover and mutation operations on the population to generate new individuals. The crossover operation exchanges some genes of two individuals.
[0134] Repeat the selection, crossover and mutation operations to optimize the weights and biases of the neural network until the stopping condition is met; and extract the feature vector of the new fault data input.
[0135] Preferably, the configuration calculates the output of inputting new fault data, evaluates the performance of each individual according to a loss function, and optimizes using a composite loss function, the loss function including a mean square error and a regularization term, including:
[0136] The composite loss function is calculated as follows:
[0137]
[0138] Where, MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter; W pi,k is the kth weight of the neural network corresponding to the i-th individual; l( ) represents the composite loss function, fsig( ) represents the neural network model function; Represents the characteristics of the j-th sample; represents the label of the jth sample.
[0139] Specifically, according to the initialization method of the bionic algorithm, an initial population is generated in the initialization stage, and each individual represents a configuration of network weights. Specifically, let the population size be N p , initialize the weights and biases for the i-th individual, expressed as:
[0140]
[0141] Where W pi is the weight of the neural network corresponding to the i-th individual, b pi is the bias of the neural network corresponding to the i-th individual, Represents the weight matrix of the i-th individual in the initial state; represents the bias of the i-th individual in the initial state; σ 2 represents the variance of the initialization; Indicates that the mean is 0 and the variance is σ 2 Normal distribution; is a normal distribution. Preferably, σ 2 Set to 0.01.
[0142] For each individual in the population, its corresponding neural network configuration is used to process the input training data, calculate the output of the model, and evaluate its performance according to the predetermined loss function. Specifically, for the i-th individual, its weight and bias are used to calculate the loss on the training data set, which is expressed as:
[0143]
[0144] Where, L pi is the loss of the neural network corresponding to the i-th individual; mps represents the number of samples input in the current batch; l( ) represents the composite loss function, and fsig( ) represents the neural network model function; Represents the characteristics of the j-th sample; represents the label of the jth sample.
[0145] According to the individual's fitness, the best performing individual is selected from the current population and retained as the candidate solution for the next generation. Specifically, based on the individual's fitness, excellent individuals have a higher probability of being selected. The calculation method of the probability of an individual being selected is expressed as:
[0146]
[0147] Where, P select (i) represents the probability of the i-th individual being selected; γ pse is the parameter that controls the selection pressure; L pk is the loss of the neural network corresponding to the kth individual. Preferably, γ pse Set to 2.
[0148] New individuals are generated through crossover and mutation operations. The crossover operation allows two excellent individuals to exchange some genes to generate new offspring; the mutation operation randomly changes some genes in an individual to increase the diversity of the population. Specifically, the crossover operation randomly selects two individuals for gene exchange, which is expressed as:
[0149] W′ pi =α pcs W p1 +(1-α pcs )W p2
[0150] b′ pi =α pcs b p1 +(1-α pcs )b p2
[0151] Where, α pcs is the crossover rate, W p1 is the weight of the neural network corresponding to the first individual selected, b p1 is the bias of the neural network corresponding to the first individual selected, W p2 is the weight of the neural network corresponding to the second individual selected, b p2 is the bias of the neural network corresponding to the second individual selected, W′ pi is the weight of the neural network corresponding to the individual after the crossover operation, b′ pi is the bias of the neural network corresponding to the individual after the crossover operation. Preferably, α pcs Set to 0.3.
[0152] Moreover, the mutation operation performs a small random perturbation on the newly generated individual weights, which can be expressed as:
[0153]
[0154] Where, τ 2 represents the variance of variation, W″ pi is the weight of the neural network corresponding to the individual after the mutation operation, b″ pi is the bias of the neural network corresponding to the individual after the mutation operation. Preferably, τ 2 Set to 0.04.
[0155] Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.
[0156] Step 4: Reduce the dimension and classify the fault feature data, output the fault status, generate a diagnostic report based on the fault status, and output the classification result of the electrical equipment operating status.
[0157] Preferably, step 4 includes:
[0158] The fault feature data is trained with a feature-refinement-based autoencoding neural network for dimensionality reduction. The feature-refinement-based autoencoding neural network includes an encoder, a decoder, and a feature adjustment module.
[0159] like Figure 2As shown in Figure 2, the training process of the autoencoder neural network algorithm based on feature refinement is as follows:
[0160] The encoder uses a multi-layer nonlinear mapping structure to reduce the dimension of the fault feature data. The decoder is used to remap the reduced-dimensional fault feature data back to the original fault feature data. The feature adjustment module adjusts the reduced-dimensional fault feature data through recursive optimization.
[0161] Suppose the data input to the autoencoder neural network is X r ,The encoder adopts a multi-layer nonlinear mapping structure to map the high-dimensional data to the initial low-dimensional feature space, and reduces the dimension of the fault feature data as follows:
[0162] Z r =Sig enc (W r X r +b r )
[0163] Where Z r represents the initial low-dimensional features, W r is the weight matrix of the encoder, b r is the bias vector of the encoder, Sig enc () is the multi-layer Sigmoid activation function of the encoder;
[0164] After low-dimensional features are generated, the feature adjustment module automatically generates feature weights based on the feature importance in the current feature space. When the module is initialized, it assigns the same initial weight to all features so that they can be gradually adjusted according to the feature contribution in subsequent steps. The fault feature data after dimensionality reduction is recursively optimized and adjusted as follows:
[0165] Z′ r =A r Z r
[0166] A r =diag(α r )
[0167] Where Z′ r is the feature representation after feature weight adjustment; A r is the initial weight matrix; α r is the feature weight vector, α r Each element α in r,i Initialized to the same value, it means that all features have the same importance in the initial stage; diag() is a function that extracts the diagonal elements of the matrix.
[0168] Specifically, the feature adjustment module recursively optimizes the initially generated low-dimensional features. In each iteration, the module adjusts the weights of each feature based on the performance of the previous round of features, gradually enhancing those with important influences and gradually weakening redundant or noisy features. Suppose that in the tth round of iteration, the weight update rule is as follows:
[0169]
[0170] Where, represents the feature weight of the t+1th iteration, represents the feature weight of the t-th iteration, η r is the learning rate of the autoencoder neural network, L r () is the loss function of the autoencoder neural network, Y r is the label data, Represents the gradient of the loss function with respect to the feature weight. Preferably, the loss function of the autoencoder neural network is the reconstruction error loss function. Preferably, η r Set to 0.01.
[0171] In order to ensure the effectiveness of the dimensionality reduction process, the decoder remaps the low-dimensional features back to the high-dimensional space to ensure that the dimensionality reduction process does not lose important information. The reconstruction process of the decoder is expressed as:
[0172] X′ r =Sig dec (W′ r Z′ r +b′ r )
[0173] Where X′ r is the reconstructed high-dimensional data, W′ r is the weight matrix of the decoder, b′ r is the bias vector of the decoder, Sig dec () is the multi-layer Sigmoid activation function of the decoder.
[0174] Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.
[0175] Preferably, the fault feature data after dimensionality reduction is input into a classifier model, wherein the classifier model is constructed based on a fractional-order neural network of a differential operator, and the classification result is optimized through collaborative robustness constraints;
[0176] Based on the fractional-order neural network, the fault feature data after dimensionality reduction is transformed nonlinearly to extract the representation vector for classification as follows:
[0177]
[0178] Where, represents the fractional-order neural network output of the lth layer; is the weight matrix of the lth layer of the fractional-order neural network; It is the output or input data of the l-1th layer of the fractional-order neural network; is the bias of the lth layer of the fractional-order neural network; Sig() is the Sigmoid activation function; δ is the fractional-order differential operator;
[0179] The classification results are optimized as follows:
[0180]
[0181] Where, L u is the loss function of the collaborative robustness constraint, which includes the cross entropy loss and the collaborative robustness constraint; is the true label of the i-th sample; is the label predicted by the model; m u is the sample size; λ u is the regularization parameter that controls the strength of the collaborative robustness constraint; R u represents the regularization term; β u is a tuning parameter that determines the sensitivity of the prediction differences.
[0182] Specifically, during the training process, network parameters are continuously adjusted through the backpropagation algorithm and gradient descent method. The characteristics of fractional-order differential operators are taken into account in each parameter update step to ensure that the gradient calculation and parameter update can reflect the inherent dynamic characteristics of the data. The gradient update rule is expressed as:
[0183]
[0184] Where, and are the weights and biases of the updated fractional-order neural network respectively; η u is the learning rate of the fractional-order neural network, which is used to control the learning step size; and They are the loss function L u About weight and bias gradient.
[0185] Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.
[0186] Example 2 of the present invention provides an electrical equipment fault diagnosis system based on quantum coding generative adversarial network, comprising: a data acquisition module, a quantum coding module, a generative adversarial network module, a feature extraction module, and a fault diagnosis module;
[0187] A data acquisition module is used to collect operating data of electrical equipment through a distributed sensor network, and to annotate the collected operating data based on the equipment status to obtain annotated data;
[0188] The quantum coding module converts the labeled data into a quantum state, uses quantum gates to quantum encode the labeled data, maps the labeled data into a quantum feature space, and uses quantum measurement to obtain the quantum feature representation of the labeled data and obtain quantum encoded data;
[0189] The generative adversarial network module uses quantum-encoded data as input to train a generative adversarial network, which includes a generator and a discriminator. The generator optimizes parameters through an entangled state feedback mechanism to generate new fault data.
[0190] The feature extraction module inputs the new fault data and quantum coded data into a 6-layer fully connected neural network, extracts the fault feature vector, filters and sorts the feature vector, and outputs the fault feature data;
[0191] The fault diagnosis module reduces the dimension and classifies the fault feature data, outputs the fault status, generates a diagnostic report for the electrical equipment based on the fault status, and outputs the classification results of the equipment operating status.
[0192] Compared with existing technologies, the present invention offers at least the following advantages: By combining quantum coding and generative adversarial network (GAN) technology, it addresses the challenges of insufficient data samples, high feature complexity, noise interference, and difficulty capturing nonlinear features in traditional electrical equipment fault diagnosis methods. First, quantum coding is used to convert electrical equipment operating data into quantum states, improving data representation and processing accuracy. Then, a generative adversarial network is used to expand the training dataset, addressing the bottleneck of training with small sample data, effectively increasing data diversity, and enhancing the model's generalization capabilities. Specifically, when processing complex features, a neural network algorithm based on dynamic population evolutionary optimization is employed to optimize the feature extraction process, enhance adaptability to nonlinear and complex features, and improve fault diagnosis accuracy and training efficiency. Furthermore, by extracting data features through a six-layer fully connected neural network and combining dimensionality reduction and classification optimization of fault feature data, the present invention effectively improves the ability to identify fault states, particularly in identifying subtle differences between minor faults and fault warnings, significantly enhancing diagnostic accuracy. Overall, the present invention not only overcomes the limitations of traditional technologies for electrical equipment fault diagnosis but also provides an efficient and accurate solution that can better address the various challenges and demands of practical applications. The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A method for fault diagnosis of electrical equipment based on quantum coding generative adversarial network, characterized in that: The following steps are involved: Collecting the operating data of electrical equipment through a distributed sensor network, annotating the operating data of electrical equipment based on the equipment status, and obtaining annotated data; Convert the labeled data into a quantum state, use quantum gates to quantum encode the labeled data, map the labeled data to a quantum feature space, use quantum measurement to obtain the quantum feature representation of the labeled data, and obtain quantum encoded data; Using quantum-encoded data as input, a generative adversarial network (GAN) is trained. The GAN consists of a generator and a discriminator. The entangled state feedback mechanism is used to optimize the generator parameters and obtain new fault data. The new fault data and quantum-encoded data are input into a 6-layer fully connected neural network to extract feature vectors. The feature vectors are then screened and sorted, and the fault feature data is output. Perform dimensionality reduction and classification on fault feature data, output fault status, generate diagnostic report based on fault status, and output classification results of electrical equipment operating status.
2. The method for diagnosing electrical equipment faults based on quantum coding generative adversarial networks according to claim 1 is characterized by: Collect the operating data of electrical equipment through a distributed sensor network, annotate the operating data of electrical equipment based on the equipment status, and obtain annotated data, including: The collected operating data of electrical equipment is filtered out of noise and stored in a cloud server in a standardized JSON format; The collected operating data of electrical equipment is manually labeled, and the labeled categories include: normal operation, minor fault, serious fault and equipment fault warning.
3. The method for electrical equipment fault diagnosis based on quantum coding generative adversarial network according to claim 1 is characterized in that: The labeled data is converted into quantum state initialization as follows: Where |ψ> is the quantum state after initialization, H i represents the Hadamard gate applied to each qubit to put the qubit into a superposition state, is n cs The initial state of the qubit, n cs is the number of qubits; Quantum gates are used to quantum encode the labeled data and map the labeled data into the quantum feature space, including: |f enc >=U enc (i c )|ψ> Where U enc Encoding quantum gates for labeling data; φ enc is the encoded quantum state; θ c Parameters representing quantum operations; Quantum measurement is used to obtain the quantum feature representation of the labeled data, and the quantum coded data is obtained as follows: x out =Tr(ρM c ) Where x out is the numerical matrix after measurement, ρ is the density matrix of quantum state, M c is the measurement operator, and Tr() is the trace operation of the matrix.
4. A method for diagnosing electrical equipment faults based on quantum coding generative adversarial networks according to claim 1 or 3, characterized in that: Generative adversarial networks include generators and discriminators, including: The generator generates new fault data based on quantum coded data: |f gen >=U gen (G c ,i c )|φ enc > The discriminator evaluates the similarity between the generated new fault data and the real device fault data; D c (|φ gen >)=<φ gen |I+M c |f gen > Where U gen () is the quantum operation of the generator, θ c is the parameter of the quantum operation; |φ< is the quantum state output by the generator, |φ gen > represents the left vector of the quantum state output by the generator; I is the identity matrix; G c Denotes the generator, D c represents the discriminator; D c () represents the discriminator function, G c () represents a generator function; M c is the constructed quantum measurement operator; j,c represents the eigenvalue of the jth measurement result, |u j,c > is the characteristic state of the jth measurement result; j,c | is the left vector of the quantum state of the j-th measurement result. 5. The method for diagnosing electrical equipment faults based on quantum coding generative adversarial networks according to claim 4 is characterized in that: The method of training a generative adversarial network using quantum coded data as input includes: The generator parameters are optimized as follows to construct the Hamiltonian operator: Where, and are the Pauli X and Z gates acting on the k-th qubit; and are the Pauli X and Z gates acting on the k+1th quantum bit; H c represents the Hamiltonian operator; The adversarial training loss is calculated as follows: Where, L c represents the loss function of adversarial training, is the expected operation, p data is the true data distribution, p z is the input noise distribution of the generator, ~ indicates that it obeys a specific distribution; x ds is the input data of the discriminator; z ds is the input noise of the generator; The generator parameters are optimized using the entangled state feedback mechanism as follows: E c (|ψ>)=-Tr(ρ A log A ) Where, E c (|ψ>) represents the entanglement degree of the quantum state; ρ A is the density matrix of the partial qubits of the quantum state |ψ〉; The quantum gate parameters are optimized as follows: Where, is the updated quantum operation parameter, α c is the learning rate of the generative adversarial network, is about the parameter θ c The loss function L c The gradient of η c is the learning rate of entanglement feedback, which is used to control the contribution of entanglement to parameter adjustment; is the gradient of the entanglement with respect to the parameter.
6. The method for diagnosing electrical equipment faults based on quantum coding generative adversarial networks according to claim 1, characterized in that: The new fault data and quantum coded data are input into a 6-layer fully connected neural network to extract feature vectors, including: A 6-layer fully connected neural network is trained based on dynamic swarm evolution optimization, including: Use the bionic algorithm to initialize the population, each individual represents a neural network configuration, and the individual weights and biases are initialized through normal distribution; The configuration calculates the output of the new fault data input, evaluates the performance of each individual according to the loss function, and optimizes using a composite loss function that includes mean squared error and regularization terms; According to the evaluation results of the loss function, individuals with higher fitness are selected from the population as candidate solutions for the next generation; Perform crossover and mutation operations on the population to generate new individuals. The crossover operation exchanges some genes of two individuals. Repeat the selection, crossover and mutation operations to optimize the weights and biases of the neural network until the stopping condition is met; and extract the feature vector of the new fault data input.
7. The method for diagnosing electrical equipment faults based on quantum coding generative adversarial networks according to claim 6 is characterized by: The configuration calculates the output of the new fault data input, evaluates the performance of each individual according to the loss function, and optimizes using a composite loss function that contains the mean squared error and a regularization term, including: The composite loss function is calculated as follows: Where, MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter; W pi,k is the kth weight of the neural network corresponding to the i-th individual; l() represents the composite loss function, and fsig() represents the neural network model function; Represents the characteristics of the j-th sample; represents the label of the jth sample.
8. The method for electrical equipment fault diagnosis based on quantum coding generative adversarial network according to claim 1 is characterized in that: Perform dimensionality reduction and classification on fault feature data, output fault status, generate diagnostic reports based on the fault status, and output classification results of electrical equipment operating status, including: The fault feature data is trained with a feature-refinement-based autoencoding neural network for dimensionality reduction. The feature-refinement-based autoencoding neural network includes an encoder, a decoder, and a feature adjustment module. The encoder uses a multi-layer nonlinear mapping structure to reduce the dimension of the fault feature data. The decoder is used to remap the reduced-dimensional fault feature data back to the original fault feature data. The feature adjustment module adjusts the reduced-dimensional fault feature data through recursive optimization. The fault feature data is reduced in dimension using the following formula: Z r =Sig enc (W r X r +b r ) Where Z r represents the initial low-dimensional features, W r is the weight matrix of the encoder, b r is the bias vector of the encoder, Sig enc () is the multi-layer Sigmoid activation function of the encoder; The fault feature data after dimensionality reduction is recursively optimized and adjusted using the following formula: Z′ r =A r From r A r =diag(a r ) Where Z′ r is the feature representation after feature weight adjustment; A r is the initial weight matrix; α r is the feature weight vector, α r Each element α in r,i Initialized to the same value, it means that all features have the same importance in the initial stage; diag() is a function that extracts the diagonal elements of the matrix.
9. The method for diagnosing electrical equipment faults based on quantum coding generative adversarial networks according to claim 8, characterized in that: Inputting the fault feature data after dimensionality reduction into a classifier model, wherein the classifier model is constructed based on a fractional-order neural network of a differential operator and optimizes the classification result through collaborative robustness constraints; Based on the fractional-order neural network, the fault feature data after dimensionality reduction is nonlinearly transformed to extract the representation vector for classification as follows: Where, represents the fractional-order neural network output of the lth layer; is the weight matrix of the lth layer of the fractional-order neural network; It is the output or input data of the l-1th layer of the fractional-order neural network; is the bias of the lth layer of the fractional-order neural network; Sig() is the Sigmoid activation function; δ is the fractional-order differential operator; The classification results are optimized as follows: Where, L u is the loss function of the collaborative robustness constraint, which includes the cross entropy loss and the collaborative robustness constraint; is the true label of the i-th sample; is the label predicted by the model; m u is the sample size; λ u is the regularization parameter that controls the strength of the collaborative robustness constraint; R u represents the regularization term; β u is a tuning parameter that determines the sensitivity of the prediction differences.
10. A system for fault diagnosis of electrical equipment based on quantum coding generative adversarial networks, comprising: Data acquisition module, quantum coding module, generative adversarial network module, feature extraction module and fault diagnosis module; characterized by: A data acquisition module is used to collect operating data of electrical equipment through a distributed sensor network, and to annotate the collected operating data based on the equipment status to obtain annotated data; The quantum coding module converts the labeled data into a quantum state, uses quantum gates to quantum encode the labeled data, maps the labeled data into a quantum feature space, and uses quantum measurement to obtain the quantum feature representation of the labeled data and obtain quantum encoded data; The generative adversarial network module uses quantum-encoded data as input to train a generative adversarial network, which includes a generator and a discriminator. The generator optimizes parameters through an entangled state feedback mechanism to generate new fault data. The feature extraction module inputs the new fault data and quantum coded data into a 6-layer fully connected neural network, extracts the fault feature vector, filters and sorts the feature vector, and outputs the fault feature data; The fault diagnosis module reduces the dimension and classifies the fault feature data, outputs the fault status, generates a diagnostic report for the electrical equipment based on the fault status, and outputs the classification results of the equipment operating status.
Citation Information
Patent Citations
Base station fault diagnosis method and device based on neural network
CN118797431A
Cited By
Well drilling leakage identification method based on artificial intelligence
CN121434938A