Denoising method and device for partial discharge signal and electronic equipment

Through the combination of sparse dictionary and generative adversarial network model, local discharge signals are denoised, which solves the problems of reduced signal fidelity and insufficient computing efficiency in the prior art, and achieves efficient and accurate signal denoising effect.

CN120086503APending Publication Date: 2025-06-03BEIJING SUNLANDA TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411300081.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

In the denoising process of partial discharge signals, the prior art problems of reduced signal fidelity, poor robustness to complex background noise, and insufficient real-time and computational efficiency.

Method used

The initial local discharge signal is sparsely decomposed through a pre-constructed sparse dictionary, and the frequency domain features and sparse features are extracted, and input them into the preset denoising signal generation model. The signal is denoised using the generative adversarial network model.

Benefits of technology

It realizes efficient and accurate denoising signal processing, improves signal fidelity and robustness, and improves the real-time and computing efficiency of the denoising process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086503A_ABST
    Figure CN120086503A_ABST
Patent Text Reader

Abstract

The invention provides a partial discharge signal denoising method, a partial discharge signal denoising device and electronic equipment. The method comprises the following steps: acquiring an initial partial discharge signal of power equipment; extracting frequency domain characteristics of the initial partial discharge signal; based on a pre-constructed sparse dictionary, performing sparse decomposition on the initial partial discharge signal to obtain a sparse feature and a reconstructed signal of the initial partial discharge signal; inputting the frequency domain feature, the sparse feature and the reconstruction signal into a preset de-noised signal generation model to obtain a de-noised partial discharge signal output by the de-noised signal generation model; wherein the de-noised signal generation model is obtained by training the generative adversarial network model according to the frequency domain features, the sparse features and the reconstructed signals of the plurality of historical partial discharge signals and the plurality of real de-noised partial discharge signals. According to the invention, high-fidelity partial discharge detection signals can be accurately and reliably obtained in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of discharge detection, and in particular, to a denoising method, device, and electronic device for partial discharge signals. Background Art

[0002] The partial discharge phenomenon is usually caused by local defects inside or on the surface of the insulating material of power equipment. Its long-term existence will lead to the gradual deterioration of the insulating material and may ultimately cause the failure or even shutdown of power equipment. Therefore, partial discharge detection is of great significance in the insulation condition monitoring of power equipment.

[0003] Due to its advantages such as non-contact, high sensitivity, and accurate positioning, ultrasonic detection technology is widely used in the detection of partial discharge signals. In practical applications, ultrasonic partial discharge signals are easily affected by periodic narrowband interference, white noise interference, and environmental noise, making it difficult to accurately obtain ultrasonic partial discharge signals.

[0004] In related technologies, signal denoising methods such as frequency domain filtering, time domain averaging, wavelet transform, and adaptive noise cancellation are usually used to process the collected partial discharge signals, which can suppress the noise interference in the partial discharge signals to a certain extent. However, these signal denoising methods also have problems such as reducing signal fidelity, weak robustness to complex background noise, and insufficient real-time performance and computational efficiency, making it difficult to obtain high-fidelity partial discharge detection signals in real time, accurately, and reliably. Summary of the Invention

[0005] Embodiments of the present invention provide a denoising method, device, and electronic device for partial discharge signals to obtain high-fidelity partial discharge detection signals in real time, accurately, and reliably.

[0006] In a first aspect, embodiments of the present invention provide a denoising method for partial discharge signals, including:

[0007] Obtain an initial partial discharge signal of a power equipment;

[0008] Extract the frequency domain features of the initial partial discharge signal;

[0009] Based on a pre-constructed sparse dictionary, perform sparse decomposition on the initial partial discharge signal to obtain the sparse features and reconstructed signal of the initial partial discharge signal;

[0010] Input the frequency domain features, the sparse features, and the reconstructed signal into a preset denoising signal generation model to obtain a denoised partial discharge signal output by the denoising signal generation model; wherein, the denoising signal generation model is trained on a generative adversarial network model according to the frequency domain features, sparse features, and reconstructed signals of multiple historical partial discharge signals, and multiple true denoised partial discharge signals.

[0011] In a possible implementation, before performing sparse decomposition on the initial partial discharge signal based on a pre-constructed sparse dictionary to obtain the sparse features and reconstructed signal of the initial partial discharge signal, it further includes:

[0012] Obtain a plurality of historical partial discharge signals and an initial dictionary;

[0013] Select a historical partial discharge signal from the plurality of historical partial discharge signals and use it as the current signal, and use the initial dictionary as the current dictionary;

[0014] Based on the current dictionary, perform sparse coding on the current signal to determine the sparse features of the current signal and the dictionary matrix related to the current signal in the current dictionary;

[0015] Determine the sparse dictionary according to the current signal, the current dictionary, the sparse features of the current signal, and the dictionary matrix.

[0016] In a possible implementation, the determining the sparse dictionary according to the current signal, the current dictionary, the sparse features of the current signal, and the dictionary matrix includes:

[0017] Determine the residual for the sparse representation of the current signal according to the current signal, the current dictionary, and the sparse features of the current signal;

[0018] Based on the sparse features and residual of the current signal, and the dictionary matrix, obtain the updated dictionary;

[0019] Determine whether the change between the current dictionary and the updated dictionary is less than a preset threshold;

[0020] If the change between the current dictionary and the updated dictionary is greater than or equal to the preset threshold, then use the updated dictionary as the current dictionary, select a historical partial discharge signal from the remaining plurality of historical partial discharge signals as the current signal, and re-execute the steps of "Based on the current dictionary, perform sparse coding on the current signal to determine the sparse features of the current signal and the dictionary matrix related to the current signal in the current dictionary" and subsequent steps until the change between the current dictionary and the updated dictionary is less than the preset threshold, and use the updated dictionary as the sparse dictionary.

[0021] In a possible implementation, based on the current dictionary, performing sparse coding on the current signal to determine the sparse features of the current signal and the dictionary matrix related to the current signal in the current dictionary includes:

[0022] Set the relevant parameters for sparse coding; wherein, the relevant parameters include the current sparse features, the current residual, the preset residual threshold, the inactive set, the active set, the preset number of elements, the current iteration number, and the maximum iteration number;

[0023] Take the current signal as the initialized current residual, take each dictionary column in the current dictionary as an element in the initialized inactive set, and set the initialized active set to an empty set;

[0024] Determine the element in the inactive set that has the greatest correlation with the current residual;

[0025] Add this element to the active set and remove this element from the inactive set to obtain an updated active set and an updated inactive set;

[0026] Determine the direction vector and step size for adjusting the sparse feature based on the updated active set and the updated inactive set;

[0027] Adjust the sparse feature based on the current sparse feature, the direction vector, and the step size to obtain an updated sparse feature, and take the updated sparse feature as the current sparse feature;

[0028] Update the residual based on the current sparse feature and the current dictionary, and take the updated residual as the current residual;

[0029] Judge whether the current residual is less than a preset residual threshold, whether the current iteration number is less than the maximum iteration number, and whether the number of elements in the active set is less than a preset number of elements;

[0030] If the current residual is equal to or greater than the preset residual threshold, and the current iteration number is less than the maximum iteration number, and the number of elements in the active set is less than the preset number of elements, then update the current iteration number and re - execute the step of "determine the element in the inactive set that has the greatest correlation with the current residual" and subsequent steps until the current residual is less than the preset residual threshold, or the current iteration number is equal to or greater than the maximum iteration number, or the number of elements in the active set is equal to or greater than the preset number of elements. Take the current sparse feature as the sparse feature for determining the current signal, and determine the dictionary matrix in the current dictionary related to the current signal according to the elements in the active set.

[0031] In a possible implementation, before inputting the frequency - domain feature, the sparse feature, and the reconstructed signal into a preset denoising signal generation model to obtain the denoised partial discharge signal output by the denoising signal generation model, it further includes:

[0032] Obtain a plurality of historical partial discharge signals and a plurality of true denoised partial discharge signals;

[0033] Extract the frequency - domain feature of each historical partial discharge signal respectively, and perform sparse decomposition on each historical partial discharge signal based on a pre - constructed sparse dictionary to obtain the sparse feature and the reconstructed signal of each historical partial discharge signal;

[0034] Input the frequency-domain features, sparse features, and reconstructed signals of each historical partial discharge signal into the generator of the generative adversarial network to obtain the noise-free generated signal output by the generator;

[0035] Input multiple real denoised partial discharge signals and the noise-free generated signal into the discriminator of the generative adversarial network to obtain the probability that each noise-free generated signal and each real denoised partial discharge signal output by the discriminator are real signals;

[0036] Adjust the model parameters of the discriminator and the model parameters of the generator according to the probability to obtain a denoised signal generation model.

[0037] In a possible implementation manner, adjusting the model parameters of the discriminator and the model parameters of the generator according to the probability to obtain a denoised signal generation model includes:

[0038] Calculate the first loss function value of the discriminator according to the probability;

[0039] Calculate the second loss function value of the generator according to the probability, the noise-free generated signal, and the real denoised partial discharge signal;

[0040] Based on the first loss function value, adjust the model parameters of the discriminator, and based on the second loss function value, adjust the model parameters of the generator to obtain a trained generative adversarial network model, and based on the trained generative adversarial network model, obtain a denoised signal generation model.

[0041] In a possible implementation manner, the second loss function corresponding to the second loss function value includes an adversarial loss function, a feature matching loss function, and a spectrum reconstruction loss function;

[0042] Calculating the second loss function value of the generator according to the probability, the noise-free generated signal, and the real denoised partial discharge signal includes:

[0043] Calculate the adversarial loss function value of the generator according to the probability;

[0044] Calculate the feature matching loss function value of the generator according to the intermediate features of the noise-free generated signal in the discriminator and the intermediate features of the real denoised partial discharge signal in the discriminator;

[0045] Calculate the spectrum reconstruction loss function value of the generator according to the spectrogram of the noise-free generated signal and the spectrogram of the real denoised partial discharge signal;

[0046] Calculate a second loss function value of the generator based on the adversarial loss function value, the feature matching loss function value, and the spectrum reconstruction loss function value.

[0047] In a possible implementation, after inputting the frequency domain features, sparse features, and reconstructed signals of each historical partial discharge signal into the generator of the generative adversarial network to obtain a noise-free generated signal output by the generator, it further includes:

[0048] Extract a first feature of the noise-free generated signal and a second feature of the true denoised partial discharge signal based on a preset feature extraction network model;

[0049] Determine a perceptual loss function value of the generator according to the first feature and the second feature;

[0050] After calculating the second loss function value of the generator according to the probability, the noise-free generated signal, and the true denoised partial discharge signal, it further includes:

[0051] Update the second loss function value according to the perceptual loss function value.

[0052] In a second aspect, an embodiment of the present invention provides a device for denoising partial discharge signals, including:

[0053] An acquisition module, configured to acquire an initial partial discharge signal of a power device;

[0054] An extraction module, configured to extract the frequency domain features of the initial partial discharge signal;

[0055] A reconstruction module, configured to perform sparse decomposition on the initial partial discharge signal based on a pre-constructed sparse dictionary to obtain sparse features and a reconstructed signal of the initial partial discharge signal;

[0056] A denoising module, configured to input the frequency domain features, the sparse features, and the reconstructed signal into a preset denoising signal generation model to obtain a denoised partial discharge signal output by the denoising signal generation model; wherein, the denoising signal generation model is trained based on the frequency domain features, sparse features, and reconstructed signals of multiple historical partial discharge signals, and multiple true denoised partial discharge signals for a generative adversarial network model.

[0057] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect above.

[0058] Fourthly, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above or any possible implementation manner of the first aspect are implemented.

[0059] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0060] In the embodiments of the present invention, the initial partial discharge signal is sparsely decomposed through a pre-constructed sparse dictionary to obtain the sparse features and the reconstructed signal of the initial partial discharge signal, so that the important features of the initial partial discharge signal can be extracted, dimensionality reduction can be achieved, and the denoising effect of the signal can be improved. Moreover, by inputting the frequency domain features, sparse features, and reconstructed signal of the extracted initial partial discharge signal into a preset denoising signal generation model, the denoised partial discharge signal output by the denoising signal generation model can be obtained, enabling the denoising signal generation model to focus more on the key parts of the initial partial discharge signal during processing, effectively restoring the high-fidelity signal, improving the generation effect of the denoised signal, and achieving efficient and accurate denoising of the signal. And, in the embodiments of the present invention, by determining the frequency domain features, sparse features, and reconstructed signal of the initial partial discharge signal and inputting them into the denoising signal generation model, the denoised partial discharge signal can be obtained, redundant information in the signal can be removed, unnecessary computational complexity can be reduced, the signal can be generated conveniently and efficiently, and the speed and efficiency of generating the denoised partial discharge signal can be improved. Description of the Drawings

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0062] Figure 1 is the implementation flowchart of the method for denoising partial discharge signals provided by the embodiments of the present invention;

[0063] Figure 2 is the implementation flowchart of constructing a sparse dictionary provided by the embodiments of the present invention;

[0064] Figure 3 is the structural schematic diagram of the generative adversarial network provided by the embodiments of the present invention;

[0065] Figure 4 is the structural schematic diagram of the device for denoising partial discharge signals provided by the embodiments of the present invention;

[0066] Figure 5It is a schematic diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0067] In the following description, specific details such as specific system architectures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.

[0068] The inventor of the present invention found that in order to denoise the collected partial discharge signals, signal denoising methods such as frequency domain filtering, time domain averaging, wavelet transform, and adaptive noise cancellation are usually used, which will reduce the signal fidelity, have weak robustness to complex background noise, and have insufficient denoising real-time performance and computational efficiency. Therefore, it is necessary to consider a method that can obtain high-fidelity partial discharge detection signals in real time, accurately, and reliably.

[0069] With the idea of obtaining high-fidelity partial discharge detection signals in real time, accurately, and reliably, in the embodiments of the present invention, by determining the sparse features and reconstructed signals of the partial discharge signals through a sparse dictionary, important features of the partial discharge signals can be extracted to preliminarily denoise the signals; then, the frequency domain features, sparse features, and reconstructed signals of the initial partial discharge signals are input into a denoised signal generation model, which can effectively restore high-fidelity partial discharge signals and denoise the signals in real time, efficiently, and accurately.

[0070] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will be described through specific embodiments with reference to the accompanying drawings.

[0071] Figure 1 The following is a flowchart for implementing the denoising method of the partial discharge signal provided by the embodiment of the present invention, which is described in detail as follows:

[0072] Step S101, obtain the initial partial discharge signal of the power equipment.

[0073] In this embodiment, the initial partial discharge signal may be the partial discharge signal collected when the power equipment has a partial discharge.

[0074] Step S102, extract the frequency domain features of the initial partial discharge signal.

[0075] In this embodiment, the collected initial partial discharge signal is a time domain signal. The initial partial discharge signal can be subjected to a frequency domain transformation to convert the time domain signal to the frequency domain, so as to extract the frequency domain features of the initial partial discharge signal.

[0076] Here, the time-domain signal can be transformed into the frequency domain through the short-time Fourier transform, or the frequency-domain transformation can be performed by means of wavelet transform or the like.

[0077] For example, through the expression: perform frequency-domain transformation. In the formula, X(f,t) represents the frequency-domain representation of the initial partial discharge signal, ω(n-t) represents the window function, x(n) represents the original signal, which is a discrete signal varying with time n, f represents the frequency variable, the frequency component of the Fourier transform, n represents the discrete time index, traversing all points of the signal x(n), and t represents the time variable, indicating the position of the center of the window function.

[0078] Step S103, based on the pre-constructed sparse dictionary, perform sparse decomposition on the initial partial discharge signal to obtain the sparse features and the reconstructed signal of the initial partial discharge signal.

[0079] In this embodiment, by performing sparse decomposition on the initial partial discharge signal through the sparse dictionary, sparse features can be obtained, and then using the sparse features and the sparse dictionary, the signal can be reconstructed to obtain the reconstructed signal of the initial partial discharge signal.

[0080] Among them, the sparse dictionary is a frequency-domain dictionary constructed using the frequency-domain features of historical partial discharge signals.

[0081] Optionally, this embodiment can determine the sparse features according to the expression: Determine the reconstructed signal according to the expression: In the formula, α i represents the sparse features corresponding to the initial partial discharge signal, x i represents the initial partial discharge signal, D represents the sparse dictionary, α represents the sparse representation, represents the reconstructed signal, represents the reconstruction error.

[0082] Step S104, input the frequency-domain features, sparse features, and reconstructed signal into a preset denoising signal generation model to obtain the denoised partial discharge signal output by the denoising signal generation model; among them, the denoising signal generation model is trained on a generative adversarial network model according to the frequency-domain features, sparse features, and reconstructed signal of multiple historical partial discharge signals, and multiple true denoised partial discharge signals.

[0083] In this embodiment, the preset denoising signal generation model can be a Generative Adversarial Networks (GAN), or a Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis (HiFi-GAN).

[0084] In the embodiment of the present invention, the initial partial discharge signal is sparsely decomposed through a pre-constructed sparse dictionary to obtain the sparse features and the reconstructed signal of the initial partial discharge signal, so that the important features of the initial partial discharge signal can be extracted, dimensionality reduction can be achieved, and the denoising effect of the signal can be improved; by inputting the frequency domain features, sparse features and reconstructed signal of the extracted initial partial discharge signal into the preset denoising signal generation model, the denoised partial discharge signal output by the denoising signal generation model can be obtained, so that when the denoising signal generation model processes, it can focus more on the key part of the initial partial discharge signal, effectively restore the high-fidelity signal, improve the generation effect of the denoised signal, and achieve efficient and accurate denoising of the signal. Moreover, by determining the frequency domain features, sparse features and reconstructed signal of the initial partial discharge signal, and inputting them into the denoising signal generation model, the denoised partial discharge signal can be obtained, redundant information in the signal can be removed, unnecessary computational complexity can be reduced, the signal can be generated conveniently and efficiently, and the speed and efficiency of generating the denoised partial discharge signal can be improved.

[0085] In some embodiments, before sparsely decomposing the initial partial discharge signal through a pre-constructed sparse dictionary to obtain the sparse features and the reconstructed signal of the initial partial discharge signal, it may also be to first obtain a plurality of historical partial discharge signals and an initial dictionary; select a historical partial discharge signal from the plurality of historical partial discharge signals and use it as the current signal, and use the initial dictionary as the current dictionary; then, based on the current dictionary, perform sparse coding on the current signal to determine the sparse features of the current signal and the dictionary matrix related to the current signal in the current dictionary; finally, determine the sparse dictionary according to the current signal, the current dictionary, the sparse features of the current signal and the dictionary matrix.

[0086] In this embodiment, the dictionary is updated using the historical partial discharge signals. When updating the dictionary, the frequency domain features and instantaneous features of the historical partial discharge signals are considered, and the elements that can capture these features are preferentially selected.

[0087] Using the given current dictionary, by solving the sparse features corresponding to the selected historical partial discharge ultrasonic signals, the historical partial discharge signals can be represented using the current dictionary. Furthermore, the elements in the current dictionary that are most relevant to the historical partial discharge signals, i.e., the dictionary matrix, can be found, thereby determining the sparse dictionary.

[0088] Here, the initial dictionary can be constructed by introducing prior knowledge, such as the frequency domain features and transient features of partial discharge signals, to ensure that the initial dictionary can effectively represent the main components of the signals.

[0089] The initial dictionary can be expressed as: D 0 =[d 1 ,d 2 ,...,d j ,...,d K , where D 0 represents the initial dictionary, d j represents the j-th element in the initial dictionary, and K represents the total number of all elements in the initial dictionary.

[0090] Optionally, in this embodiment, the sparse dictionary is determined based on the current signal, the current dictionary, the sparse features of the current signal, and the dictionary matrix, which can be: first, the residual of the sparse representation of the current signal is determined according to the current signal, the current dictionary, and the sparse features of the current signal; then, based on the sparse features and the residual of the current signal, and the dictionary matrix, an updated dictionary is obtained; then, it is judged whether the change between the current dictionary and the updated dictionary is less than a preset threshold; if the change between the current dictionary and the updated dictionary is greater than or equal to the preset threshold, the updated dictionary is used as the current dictionary, a historical partial discharge signal is selected from the remaining multiple historical partial discharge signals as the current signal, and the steps of "performing sparse coding on the current signal based on the current dictionary, determining the sparse features of the current signal, and the dictionary matrix in the current dictionary related to the current signal" and subsequent steps are re-executed until the change between the current dictionary and the updated dictionary is less than the preset threshold, and the updated dictionary is used as the sparse dictionary.

[0091] In this embodiment, the residual of the sparse representation of the current signal, that is, the difference between the current signal and the sparse representation of the current signal, can indicate the error of reconstructing the current signal using the current dictionary. By using the sparse features and the residual of the current signal to update the dictionary matrix, the transient features and frequency domain characteristics of the signal can be considered, and the elements that can capture these features are preferentially selected for dictionary update.

[0092] If the change between the current dictionary and the updated dictionary is greater than or equal to a preset threshold, it indicates that there is still room for updating the current dictionary, and other historical partial discharge signals can be used to continue updating the current dictionary; if the change between the current dictionary and the updated dictionary is less than the preset threshold, it means that the elements in the current dictionary can fully represent the historical partial discharge signals, and then the update can be stopped, and the updated dictionary at this time is used as the sparse dictionary.

[0093] In addition, the current dictionary can also be updated using a preset number of historical partial discharge signals.

[0094] In some embodiments, referring to Figure 2 the implementation flowchart of constructing the sparse dictionary shown, the process of constructing the sparse dictionary can be described in detail as follows:

[0095] Step S201, obtain a plurality of historical partial discharge signals and an initial dictionary.

[0096] Here, the historical partial discharge signal can be expressed as x i , where represents the i-th one. The initial dictionary can be expressed as D 0 =[d 1 , d 2 ,..., d j ,..., d K .

[0097] Step S202, select a historical partial discharge signal from the plurality of historical partial discharge signals, and use it as the current signal, and use the initial dictionary as the current dictionary.

[0098] Step S203, based on the current dictionary, perform sparse coding on the current signal to determine the sparse feature of the current signal and the dictionary matrix in the current dictionary related to the current signal.

[0099] In this embodiment, performing sparse coding on the current signal, that is, using the current dictionary to represent the current signal, and then the sparse feature of the current signal can be determined. During the sparse coding process, the dictionary matrix in the current dictionary related to the current signal can be determined through the elements in the current dictionary used to represent the current signal.

[0100] Optionally, the sparse feature of the current signal can be solved through the expression: . In the formula, α i represents the sparse feature corresponding to the initial partial discharge signal, x i represents the current signal, that is, the selected historical partial discharge signal, D represents the current dictionary, α represents the sparse representation, represents the reconstruction error, that is, the gap between the current signal and the signal Dα reconstructed using the current dictionary, which can be calculated using the Euclidean distance, ||α||1 represents the sparse regularization term, which is used to encourage sparsity, and λ represents the regularization parameter, which is used to balance the reconstruction error and sparsity.

[0101] Step S204: Determine the residual for sparse representation of the current signal according to the current signal, the current dictionary, and the sparse feature of the current signal.

[0102] Step S205: Obtain the updated dictionary based on the sparse feature and residual of the current signal, as well as the dictionary matrix.

[0103] In this embodiment, the dictionary matrix can be used to update the sparse feature and residual, and then the updated dictionary can be determined by using the sparse feature and parameters.

[0104] Optionally, the current dictionary can be updated through the expression: where D t+1 represents the updated dictionary, that is, the current dictionary in the (t + 1)-th iteration, D t represents the current dictionary, that is, the current dictionary in the t-th iteration, η represents the learning rate, α t represents the sparse feature corresponding to the current signal, that is, the sparse feature obtained by sparsely encoding the current signal using the current dictionary in the t-th iteration, r t represents the residual corresponding to the current signal, that is, the residual after reconstructing the current signal in the t-th iteration, and T represents the transpose of the matrix.

[0105] Step S206: Determine whether the change between the current dictionary and the updated dictionary is less than a preset threshold.

[0106] Step S207: If the change between the current dictionary and the updated dictionary is greater than or equal to the preset threshold, then use the updated dictionary as the current dictionary, select one historical partial discharge signal from the remaining multiple historical partial discharge signals as the current signal, and re-execute the steps of "sparsely encoding the current signal based on the current dictionary, determining the sparse feature of the current signal, and the dictionary matrix related to the current signal in the current dictionary" and subsequent steps until the change between the current dictionary and the updated dictionary is less than the preset threshold, and use the updated dictionary as the sparse dictionary.

[0107] Optionally, in this embodiment, sparsely encoding the current signal based on the current dictionary, determining the sparse feature of the current signal, and the dictionary matrix related to the current signal in the current dictionary can be:

[0108] Step 1: Set the relevant parameters for sparse encoding; among them, the relevant parameters include the current sparse feature, the current residual, the preset residual threshold, the inactive set, the active set, the preset number of elements, the current iteration number, and the maximum iteration number.

[0109] Step 2: Take the current signal as the initialized current residual, take each dictionary column in the current dictionary as an element in the initialized inactive set, and set the initialized active set to be an empty set.

[0110] Here, the current residual r 0 = x i , the sparse feature α 0 = 0, the active set The inactive set Γ = {1, 2, …, K}. Wherein, x i represents the current signal.

[0111] Step 3: Determine the element in the inactive set that has the greatest correlation with the current residual.

[0112] In this embodiment, determining the dictionary column with the greatest correlation with the current residual is the element with the greatest correlation with the current residual. Here, the correlation coefficient c = D T r can be used for correlation calculation.

[0113] Correspondingly, the expression for determining the element in the inactive set that has the greatest correlation with the current residual can be: j = argmax k∈Γ |c k |, where j represents the element in the inactive set that has the greatest correlation with the current residual, k represents the elements in the inactive set, and c k represents the correlation between the k-th element in the inactive set and the current residual.

[0114] Step 4: Add this element to the active set and remove this element from the inactive set to obtain the updated active set and the updated inactive set.

[0115] Step 5: According to the updated active set and the updated inactive set, determine the direction vector and step size for adjusting the sparse feature.

[0116] Here, the direction vector can be calculated according to the expression: ; the step size along the direction can be calculated according to the expression: .

[0117] In the formula, u A represents the direction vector, indicating in which direction the value of the sparse feature should be adjusted in each step, D A represents the dictionary column corresponding to the active set Λ, 1 A represents a vector of all 1s, whose dimension is the same as the number of elements in the active set and is used for average calculation of the update direction, γ represents the step size, c jDenotes the correlation corresponding to the element with the greatest correlation with the current residual determined from the inactive set in the current iteration, that is, the correlation between the element added to the active set in the current iteration and the current residual, c k Denotes the correlation between each element in the inactive set and the current residual Denotes the direction for adjusting the step size

[0118] Step Six: Based on the current sparse feature, direction vector, and step size, adjust the sparse feature to obtain an updated sparse feature, and use the updated sparse feature as the current sparse feature

[0119] In this embodiment, it can be based on the expression: α A =α A +γu A , update the sparse feature corresponding to the active set, thereby obtaining the current sparse feature. In the formula, α A Denotes the sparse feature corresponding to the active set

[0120] Step Seven: Based on the current sparse feature and the current dictionary, update the residual, and use the updated residual as the current residual

[0121] In this embodiment, it can be based on the expression: r p+1 =x i -Dα p+1 , update the residual. In the formula, r p+1 Denotes the determined residual after update, that is, the current residual, D denotes the current dictionary, α p+1 Denotes the determined coefficient feature after update, that is, the current sparse feature, and p denotes the current iteration number

[0122] Step Eight: Determine whether the current residual is less than a preset residual threshold, whether the current iteration number is less than the maximum iteration number, and whether the number of elements in the active set is less than a preset number of elements

[0123] In this embodiment, it can be determined whether the loop iteration process reaches the end condition based on the current residual, the current iteration number, and the number of elements in the active set

[0124] Step Nine: If the current residual is equal to or greater than the preset residual threshold, and the current iteration number is less than the maximum iteration number, and the number of elements in the active set is less than the preset number of elements, then update the current iteration number and re - execute the step of "determining the element with the greatest correlation with the current residual in the inactive set" and subsequent steps until the current residual is less than the preset residual threshold, or the current iteration number is equal to or greater than the maximum iteration number, or the number of elements in the active set is equal to or greater than the preset number of elements. Use the current sparse feature as the sparse feature for determining the current signal, and determine the dictionary matrix related to the current signal in the current dictionary according to the elements in the active set

[0125] In this embodiment, if the current residual is equal to or greater than the preset residual threshold, and the current iteration number is less than the maximum iteration number, and the number of elements in the active set is less than the preset number of elements, it indicates that the sparse coding of the current signal has not been achieved yet, and thus the iteration can continue to update the sparse features. Here, updating the current iteration number can be incrementing the iteration number by 1.

[0126] If the current residual is less than the preset residual threshold, or the current iteration number is equal to or greater than the maximum iteration number, or the number of elements in the active set is equal to or greater than the preset number of elements, it indicates that the sparse decomposition of the current signal has been basically achieved, and the currently determined sparse features can be used to represent the current signal. Here, the elements in the active set are all the elements related to the current signal, so it can be determined that it is the dictionary matrix related to the current signal.

[0127] The process of constructing the sparse dictionary was introduced above. Next, the process of constructing the denoised signal generation model will be continued.

[0128] In some embodiments, referring to Figure 3 the structural schematic diagram of the generative adversarial network shown, the generative adversarial network includes a generator and a discriminator. The generator (Generator, G) can use the input data to generate a high-fidelity, noise-free signal, and improve the quality and consistency of the signal through residual connections, skip connections, and self-attention mechanisms. The discriminator (Discriminator) is used to distinguish the signal generated by the generator from the real signal to help the generator improve the authenticity of the generated signal.

[0129] Before this embodiment inputs the frequency-domain features, sparse features, and reconstructed signal into the preset denoised signal generation model to obtain the denoised partial discharge signal output by the denoised signal generation model, it can also first obtain multiple historical partial discharge signals and multiple real denoised partial discharge signals; respectively extract the frequency-domain features of each historical partial discharge signal, and based on the pre-constructed sparse dictionary, respectively perform sparse decomposition on each historical partial discharge signal to obtain the sparse features and reconstructed signal of each historical partial discharge signal; then input the frequency-domain features, sparse features, and reconstructed signal of each historical partial discharge signal into the generator of the generative adversarial network to obtain the noise-free generated signal output by the generator; afterwards, input the multiple real denoised partial discharge signals and the noise-free generated signal into the discriminator of the generative adversarial network to obtain the probability that each noise-free generated signal and each real denoised partial discharge signal are real signals output by the discriminator; finally, adjust the model parameters of the discriminator and the model parameters of the generator according to the probability to obtain the denoised signal generation model.

[0130] In this embodiment, by using the frequency-domain features, sparse features, and reconstructed signals of historical partial discharge signals, as well as real denoised partial discharge signals, to train the generative adversarial network model, the generator can capture the details in the signals and maintain the high fidelity of the signals, thereby generating high-fidelity noise-free generated signals. The discriminator focuses on the features in the signals to identify the noise-free generated signals and real denoised partial discharge signals, improving the quality of the generated signals.

[0131] The historical partial discharge signals here can be the same as or different from the historical partial discharge signals in the above embodiment. Additionally, the number of real denoised partial discharge signals can be the same as the number of noise-free generated signals.

[0132] Optionally, in this embodiment, according to probability, the model parameters of the discriminator and the generator are adjusted to obtain a denoised signal generation model. It can be to first calculate the first loss function value of the discriminator according to probability, then calculate the second loss function value of the generator according to probability, the noise-free generated signals, and the real denoised partial discharge signals. Finally, based on the first loss function value, the model parameters of the discriminator are adjusted, and based on the second loss function value, the model parameters of the generator are adjusted to obtain a trained generative adversarial network model, and based on the trained generative adversarial network model, a denoised signal generation model is obtained.

[0133] In this embodiment, the first loss function value of the discriminator can be calculated first, the generator is fixed, and the discriminator is trained. Then the second loss function value of the generator is calculated, the discriminator is fixed, and the generator is trained, so as to repeatedly perform adversarial training on the discriminator and the generator in turn to obtain a trained generative adversarial network model.

[0134] Here, the denoised signal generation model is used to obtain denoised generated signals, so the trained generator can be directly used as the denoised signal generation model.

[0135] In addition, the generative adversarial network can also adopt HiFi-GAN to improve the generator therein. The generator can include an input layer, a multi-scale convolutional layer, multiple residual blocks, and an output layer, and a self-attention mechanism and skip connections are also set in the generator.

[0136] In the generator, the input layer is used to receive the frequency-domain features, sparse features, and reconstructed signals of the input partial discharge signals. The multi-scale convolutional layer uses convolutional kernels of different sizes for multi-scale feature extraction to capture different frequency components and time-domain features of the reconstructed signals. Each residual block contains two convolutional layers, and after each convolutional layer, batch normalization (BatchNormalization) and an activation function (such as ReLU) are followed. The output layer is used to generate high-fidelity, noise-free signals.

[0137] Among them, the residual connection can directly add the input to the output through a skip connection to alleviate the vanishing gradient problem. The self-attention mechanism can also be introduced to capture long-range dependencies and enhance the generator's ability to model complex signal patterns.

[0138] The discriminator of the generative adversarial network can be a multi-scale discriminator, which can either use multiple discriminators independently or include time-domain and frequency-domain discriminators in one discriminator.

[0139] Here, the multi-scale discriminator can design multiple independent discriminators, and each discriminator focuses on signal features at different scales. For example, three discriminators can be designed to process the original signal and downsampled signals at different scales respectively. A frequency-domain discriminator can also be added to perform discrimination after performing STFT or wavelet transform on the input signal, enhancing the detection ability for time-domain and frequency-domain features.

[0140] The multi-scale discriminator can be expressed as: D m (x) = [D 1 (x), D 2 (x),..., D N (x)], where D i is the discriminator at the i-th scale. If the n-th one among them is a frequency-domain discriminator, its formula can be expressed as: D n (X(f,t)) = Discriminator(X(f,t)).

[0141] In the discriminator, each discriminator consists of multiple convolutional layers and fully connected layers. Different features of the signal are extracted through convolutional operations, and then classification judgment is performed through the fully connected layers.

[0142] In this embodiment, the multi-scale convolutional layer of the generator can perform multi-time-scale decomposition on the reconstructed signal to obtain decomposition features. Through the sparse features, frequency-domain features of the partial discharge signal, and the decomposition features of the reconstructed signal, the transient features, spectral characteristics, and non-stationary characteristics of the partial discharge signal can be captured. At the same time, the structure of the generator is improved: the residual network and skip connection are used in the generator to enhance the model's ability to capture signal details and maintain the high fidelity of the signal; the self-attention mechanism is introduced to enhance the model's ability to model long-range dependencies and improve the understanding of complex patterns of the partial discharge signal. Combining the characteristics of the partial discharge signal, the structure of the discriminator is improved: multiple discriminators are designed, and each discriminator focuses on signal features at different scales to enhance the discriminator's ability to detect various noises. In addition to the time-domain discriminator, a frequency-domain discriminator is introduced to specifically detect the authenticity of frequency-domain features and further improve the denoising effect.

[0143] Optionally, the second loss function corresponding to the second loss function value includes an adversarial loss function, a feature matching loss function, and a spectral reconstruction loss function.

[0144] In this embodiment, according to probability, noise-free generated signals, and real denoised partial discharge signals, the second loss function value of the generator is calculated. It can be to first calculate the adversarial loss function value of the generator according to probability; calculate the feature matching loss function value of the generator based on the intermediate features of the noise-free generated signals in the discriminator and the intermediate features of the real denoised partial discharge signals in the discriminator; calculate the spectral reconstruction loss function value of the generator based on the spectrograms of the noise-free generated signals and the real denoised partial discharge signals; and then calculate the second loss function value of the generator based on the adversarial loss function value, the feature matching loss function value, and the spectral reconstruction loss function value.

[0145] In this embodiment, the adversarial loss function, the feature matching loss function, and the spectral reconstruction loss function can form a weighted loss function.

[0146] The expression of the weighted loss function is:

[0147]

[0148] In the formula, L G represents the weighted loss function, L adv (G; D k ) represents the adversarial loss function when the discriminator is fixed and the generator is trained in the k-th training. λ fm represents the weight hyperparameter before the feature matching loss, which controls the importance of the feature matching loss in the total loss. L fm (G; D k ) represents the feature matching loss in the k-th training. λ mel represents the weight hyperparameter before the Mel spectrum loss, which controls the importance of the Mel spectrum loss in the total loss. L mel (G) represents the spectral reconstruction loss function in the k-th training. k represents the number of times of alternating training of the discriminator and the generator, and K represents the total number of times of alternating training of the discriminator and the generator.

[0149] Among them, the adversarial loss function when the discriminator is fixed and the generator is trained can be expressed as:

[0150] L adv (G; D) = E_x n [(D(G(x n )) - 1) 2 ;

[0151] In the formula, L adv (G; D) represents the adversarial loss function when the discriminator is fixed and the generator is trained. E_x n represents the mathematical expectation of all data samples x n , that is, the average value of the sample data. D(G(xn )) represents the output probability of the discriminator for the data G(x n ) generated by the generator.

[0152] In addition, when the generator is fixed, the adversarial loss function during the training of the discriminator, that is, the first loss function, can be expressed as:

[0153] L adv (D; G) = E(x r ,x n )[(D(x r ) - 1) 2 + (D(G(x n ))) 2 ;

[0154] In the formula, L adv (D; G) represents the adversarial loss function when the discriminator is fixed and the generator is trained. E(x r ,x n ) represents the mathematical expectation for all real data samples x r and noise data samples x n , that is, the average value of the sample data. D(x r ) represents the output probability of the discriminator for the real data sample x r . Ideally, this value should be close to 1 because the discriminator should recognize real data as true. D(G(x n )) represents the output probability of the discriminator for the generated data sample G(x n ). Ideally, this value should be close to 0 because the discriminator should recognize the generated data as false.

[0155] The feature matching loss function is a similarity measure learned by measuring the feature differences between the discriminator for real samples and generated samples. Each intermediate feature of the discriminator is extracted, and the L1 distance between the real samples and the conditionally generated samples in each feature space is calculated.

[0156] The expression of the feature matching loss function is:

[0157]

[0158] In the formula, L fm (G; D) represents the feature matching loss function, D i (x r ) represents the feature of the real sample in the i-th layer of the discriminator, D i (G(x n )) represents the feature of the generated sample in the i-th layer of the discriminator, i represents the i-th layer in the discriminator, T represents the total number of layers in the discriminator, N iRepresents the number of features of the discriminator in the i-th layer.

[0159] The Mel-spectrum loss function is the loss calculated by reconstructing the generated signal back to the Mel-spectrum.

[0160] The expression of the Mel-spectrum loss function is: L mel (G) = ||Mel(x r ) - Mel(G(x n ))|| 1 .

[0161] In the formula, L mel (G) represents the Mel-spectrum loss function, Mel(x r ) represents the Mel-spectrum corresponding to the real sample, and Mel(G(x n )) represents the Mel-spectrum corresponding to the generated sample.

[0162] In some embodiments, after inputting the frequency-domain features, sparse features, and reconstructed signals of each historical partial discharge signal into the generator of the generative adversarial network to obtain the noiseless generated signal output by the generator, the first feature of the noiseless generated signal and the second feature of the real denoised partial discharge signal can also be extracted based on a preset feature extraction network model; then, according to the first feature and the second feature, the perceptual loss function value of the generator is determined.

[0163] Correspondingly, after calculating the second loss function value of the generator according to the probability, the noiseless generated signal, and the real denoised partial discharge signal in this embodiment, the second loss function value can also be updated according to the perceptual loss function value.

[0164] In this embodiment, the loss function of the generator further includes a perceptual loss function. Through the perceptual loss function, the subjective quality of the generated samples can be improved, and the difference between the generated samples and the real samples in the feature space is calculated through a pre-trained feature extraction network to ensure that the generated samples are perceptually similar to the real samples.

[0165] Among them, the expression of the perceptual loss function is: In the formula, L p represents the perceptual loss function, φ i (x) represents the feature extracted from the real sample by the i-th layer of the feature extraction network model, and φ i (G(z)) represents the feature extracted from the generated sample G(z) by the i-th layer of the feature extraction network model.

[0166] Here, through optimization with the loss function, a weighted loss function is introduced in combination with the perceptual loss, and the perceptual difference between the generated signal and the real signal is calculated through the pre-trained feature extraction network VGG, which can improve the subjective quality of the generated signal.

[0167] In some embodiments, before extracting the frequency-domain features of the initial partial discharge signal, the initial partial discharge signal can also be processed to remove the DC component and normalized.

[0168] Correspondingly, after inputting the frequency-domain features, sparse features, and reconstructed signal into a preset denoising signal generation model to obtain the denoised partial discharge signal output by the denoising signal generation model, the denoised partial discharge signal can also be inverse-normalized.

[0169] Correspondingly, when constructing the sparse dictionary and the denoising signal generation model, the historical partial discharge signal and the true denoised partial discharge signal can also be processed to remove the DC component and normalized.

[0170] Here, the DC component can be removed through the expression: where \(x^{(1)}(t)\) represents the signal after removing the DC component, \(x(t)\) represents the original signal, \(x(i)\) represents, \(N\) represents the total number of signal samples, and \(i\) represents the \(i\)-th in the signal. d (t) represents the signal after removing the DC component, x(t) represents the original signal, x(i) represents, N represents the total number of signal samples, i represents the i-th in the signal.

[0171] Normalization can also be performed through the expression: where \(x^{(2)}(t)\) represents the normalized signal, \(x^{(1)}(t)\) represents the signal after removing the DC component, and \(\max(|x^{(1)}(t)|)\) represents the maximum value of the absolute value of the signal over the entire time range, which is used to represent the maximum amplitude of the signal in a certain time period. n (t) represents the normalized signal, x d (t) represents the signal after removing the DC component, max(|x d (t)|) represents the maximum value of the absolute value of the signal over the entire time range, which is used to represent the maximum amplitude of the signal in a certain time period.

[0172] In the embodiments of the present invention, the initial partial discharge signal is sparsely decomposed by a pre-constructed sparse dictionary to obtain the sparse features and the reconstructed signal of the initial partial discharge signal, so as to extract the important features of the initial partial discharge signal, achieve dimensionality reduction, and improve the denoising effect of the signal. By inputting the frequency-domain features, sparse features, and reconstructed signal of the extracted initial partial discharge signal into a preset denoising signal generation model, the denoised partial discharge signal output by the denoising signal generation model can be obtained. When the denoising signal generation model is processing, it can focus more on the key part of the initial partial discharge signal, effectively restore the high-fidelity signal, improve the generation effect of the denoised signal, and achieve efficient and accurate denoising of the signal. Moreover, by determining the frequency-domain features, sparse features, and reconstructed signal of the initial partial discharge signal and inputting them into the denoising signal generation model, the denoised partial discharge signal can be obtained, redundant information in the signal can be removed, unnecessary computational complexity can be reduced, the signal can be generated conveniently and efficiently, and the speed and efficiency of generating the denoised partial discharge signal can be improved. Among them, by combining sparse dictionary learning and a generative adversarial network model, a multi-level signal processing architecture can be formed, which can separate signals and noise more effectively and improve the denoising effect. Using the sparse dictionary to extract the sparse features of the signal and then inputting them into the generative adversarial network model can make the generative adversarial network model focus more on the key part of the signal, reduce unnecessary computational complexity, and improve the training efficiency and generation effect of the model. The partial discharge signal can also be processed by HiFi-GAN to remove noise, and the high-fidelity and high-quality partial discharge signal can be effectively restored. By dynamically adjusting the sparse coding strategy according to the characteristics of the input signal and combining with the generative adversarial network model, the adaptive learning ability of the generative adversarial network can be further utilized to perform precise denoising processing on different types of partial discharge signals. Using the sparse dictionary to perform efficient feature extraction and dimensionality reduction on the signal at the initial stage of signal processing, removing redundant information, makes the subsequent processing of the generative adversarial network model more simple and efficient. While ensuring the processing effect, the processing speed and efficiency can also be significantly improved.

[0173] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0174] The following are the device embodiments of the present invention. For the details not described in detail, reference can be made to the corresponding method embodiments above.

[0175] Figure 4 The structural schematic diagram of the denoising device for partial discharge signals provided by the embodiments of the present invention is shown. For the sake of convenience of description, only the parts related to the embodiments of the present invention are shown and are described in detail as follows:

[0176] As Figure 4As shown, the denoising device 40 for partial discharge signals includes:

[0177] An acquisition module 41, configured to acquire the initial partial discharge signal of the power equipment;

[0178] An extraction module 42, configured to extract the frequency domain features of the initial partial discharge signal;

[0179] A reconstruction module 43, configured to perform sparse decomposition on the initial partial discharge signal based on a pre-constructed sparse dictionary to obtain the sparse features and the reconstructed signal of the initial partial discharge signal;

[0180] A denoising module 44, configured to input the frequency domain features, sparse features, and reconstructed signal into a preset denoising signal generation model to obtain the denoised partial discharge signal output by the denoising signal generation model; wherein, the denoising signal generation model is obtained by training a generative adversarial network model according to the frequency domain features, sparse features, and reconstructed signal of multiple historical partial discharge signals, and multiple true denoised partial discharge signals.

[0181] In a possible implementation manner, the denoising device 40 for partial discharge signals further includes a construction module, configured to:

[0182] Acquire multiple historical partial discharge signals and an initial dictionary;

[0183] Select one historical partial discharge signal from the multiple historical partial discharge signals, and use it as the current signal, and use the initial dictionary as the current dictionary;

[0184] Based on the current dictionary, perform sparse coding on the current signal to determine the sparse features of the current signal and the dictionary matrix related to the current signal in the current dictionary;

[0185] Determine the sparse dictionary according to the current signal, current dictionary, sparse features of the current signal, and dictionary matrix.

[0186] In a possible implementation manner, the construction module is specifically configured to:

[0187] Determine the residual for sparse representation of the current signal according to the current signal, current dictionary, and sparse features of the current signal;

[0188] Based on the sparse features and residual of the current signal, and the dictionary matrix, obtain the updated dictionary;

[0189] Determine whether the change between the current dictionary and the updated dictionary is less than a preset threshold;

[0190] If the change between the current dictionary and the updated dictionary is greater than or equal to a preset threshold, then use the updated dictionary as the current dictionary, select a historical partial discharge signal from the remaining multiple historical partial discharge signals as the current signal, and re-execute the steps of "performing sparse coding on the current signal based on the current dictionary to determine the sparse features of the current signal and the dictionary matrix in the current dictionary related to the current signal" and subsequent steps until the change between the current dictionary and the updated dictionary is less than the preset threshold, and use the updated dictionary as the sparse dictionary.

[0191] In a possible implementation manner, the construction module is specifically configured to:

[0192] Set the relevant parameters of the sparse coding; where the relevant parameters include the current sparse features, the current residual, the preset residual threshold, the inactive set, the active set, the preset number of elements, the current iteration number, and the maximum iteration number;

[0193] Use the current signal as the initialized current residual, use each dictionary column in the current dictionary as an element in the initialized inactive set, and set the initialized active set to an empty set;

[0194] Determine the element in the inactive set that has the greatest correlation with the current residual;

[0195] Add this element to the active set and remove this element from the inactive set to obtain the updated active set and the updated inactive set;

[0196] According to the updated active set and the updated inactive set, determine the direction vector and step size for adjusting the sparse features;

[0197] Based on the current sparse features, the direction vector, and the step size, adjust the sparse features to obtain the updated sparse features, and use the updated sparse features as the current sparse features;

[0198] Based on the current sparse features and the current dictionary, update the residual, and use the updated residual as the current residual;

[0199] Judge whether the current residual is less than the preset residual threshold, whether the current iteration number is less than the maximum iteration number, and whether the number of elements in the active set is less than the preset number of elements;

[0200] If the current residual is equal to or greater than a preset residual threshold, and the current number of iterations is less than the maximum number of iterations, and the number of elements in the active set is less than a preset number of elements, update the current number of iterations, and re - execute the steps of "determining the element in the inactive set with the greatest correlation with the current residual" and subsequent steps until the current residual is less than the preset residual threshold, or the current number of iterations is equal to or greater than the maximum number of iterations, or the number of elements in the active set is equal to or greater than the preset number of elements. Then, use the current sparse feature as the sparse feature for determining the current signal, and determine the dictionary matrix in the current dictionary related to the current signal according to the elements in the active set.

[0201] In a possible implementation, the denoising device 40 for partial discharge signals further includes a training module, which is used for:

[0202] Obtain a plurality of historical partial discharge signals and a plurality of true denoised partial discharge signals;

[0203] Extract the frequency - domain features of each historical partial discharge signal respectively, and perform sparse decomposition on each historical partial discharge signal based on a pre - constructed sparse dictionary to obtain the sparse features and reconstructed signals of each historical partial discharge signal;

[0204] Input the frequency - domain features, sparse features, and reconstructed signals of each historical partial discharge signal into the generator of the generative adversarial network to obtain the noise - free generated signals output by the generator;

[0205] Input the plurality of true denoised partial discharge signals and the noise - free generated signals into the discriminator of the generative adversarial network to obtain the probabilities that each noise - free generated signal and each true denoised partial discharge signal output by the discriminator are real signals;

[0206] Adjust the model parameters of the discriminator and the model parameters of the generator according to the probabilities to obtain a denoising signal generation model.

[0207] In a possible implementation, the training module is specifically used for:

[0208] Calculate the first loss function value of the discriminator according to the probabilities;

[0209] Calculate the second loss function value of the generator according to the probabilities, the noise - free generated signals, and the true denoised partial discharge signals;

[0210] Based on the first loss function value, adjust the model parameters of the discriminator, and based on the second loss function value, adjust the model parameters of the generator to obtain a trained generative adversarial network model, and obtain a denoising signal generation model based on the trained generative adversarial network model.

[0211] In a possible implementation, the second loss function corresponding to the second loss function value includes an adversarial loss function, a feature matching loss function, and a spectrum reconstruction loss function;

[0212] The training module is specifically configured to:

[0213] Calculate the adversarial loss function value of the generator according to the probability;

[0214] Calculate the feature matching loss function value of the generator according to the intermediate features of the noise-free generated signal in the discriminator and the intermediate features of the real denoised partial discharge signal in the discriminator;

[0215] Calculate the spectrum reconstruction loss function value of the generator according to the spectrogram of the noise-free generated signal and the spectrogram of the real denoised partial discharge signal;

[0216] Calculate the second loss function value of the generator based on the adversarial loss function value, the feature matching loss function value, and the spectrum reconstruction loss function value.

[0217] In a possible implementation, the training module is further configured to:

[0218] Extract the first feature of the noise-free generated signal and the second feature of the real denoised partial discharge signal based on a preset feature extraction network model;

[0219] Determine the perceptual loss function value of the generator according to the first feature and the second feature;

[0220] The training module is further configured to:

[0221] Update the second loss function value according to the perceptual loss function value.

[0222] Figure 5 It is a schematic diagram of an electronic device provided by an embodiment of the present invention. As Figure 5 shown, the electronic device 50 of this embodiment includes: a processor 51, a memory 52, and a computer program 53 stored in the memory 52 and executable on the processor 51. When the processor 51 executes the computer program 53, it implements the steps in the embodiments of the above-mentioned denoising method for each partial discharge signal, such as Figure 1 the steps S101 to S104 shown. Alternatively, when the processor 51 executes the computer program 53, it implements the functions of each module in the above-mentioned device embodiments, such as Figure 4 the functions of the modules 41 to 44 shown.

[0223] Exemplarily, the computer program 53 can be divided into one or more modules / units. One or more modules / units are stored in the memory 52 and executed by the processor 51 to implement the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 53 in the electronic device 50. For example, the computer program 53 can be divided into Figure 4 the modules 41 to 44 shown.

[0224] The electronic device 50 may include, but is not limited to, a processor 51 and a memory 52. Those skilled in the art can understand that Figure 5 this is only an example of the electronic device 50 and does not constitute a limitation on the electronic device 50. It may include more or fewer components than shown in the figure, or combine certain components, or have different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0225] The so-called processor 51 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0226] The memory 52 may be an internal storage unit of the electronic device 50, such as the hard disk or memory of the electronic device 50. The memory 52 may also be an external storage device of the electronic device 50, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 50. Further, the memory 52 may also include both the internal storage unit and the external storage device of the electronic device 50. The memory 52 is used to store computer programs and other programs and data required by the electronic device. The memory 52 may also be used to temporarily store data that has been output or is to be output.

[0227] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0228] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0229] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in the form of hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0230] In the embodiments provided by the present invention, it should be understood that the disclosed device / electronic device and method can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the device or unit can be in electrical, mechanical or other forms.

[0231] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0232] In addition, in each embodiment of the present invention, the functional units may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above integrated units may be implemented in the form of hardware or in the form of software functional units.

[0233] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it may also be completed by instructing relevant hardware through a computer program. The computer program may be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments may be implemented. Among them, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium, etc.

[0234] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for denoising a partial discharge signal, characterized in that: include: Obtain initial partial discharge signals of power equipment; Extracting frequency domain features of the initial partial discharge signal; Based on a pre-constructed sparse dictionary, the initial partial discharge signal is sparsely decomposed to obtain sparse features and a reconstructed signal of the initial partial discharge signal; The frequency domain features, the sparse features and the reconstructed signal are input into a preset denoising signal generation model to obtain a denoised local discharge signal output by the denoising signal generation model; wherein the denoising signal generation model is obtained by training a generative adversarial network model based on the frequency domain features, sparse features and reconstructed signals of multiple historical local discharge signals and multiple real denoised local discharge signals.

2. The method for denoising partial discharge signals according to claim 1, characterized in that: Before sparsely decomposing the initial partial discharge signal based on the pre-built sparse dictionary to obtain the sparse features and reconstructed signal of the initial partial discharge signal, the method further includes: Acquire multiple historical partial discharge signals and an initial dictionary; Selecting a historical partial discharge signal from the plurality of historical partial discharge signals and using it as a current signal, and using the initial dictionary as a current dictionary; Based on the current dictionary, sparsely encode the current signal to determine the sparse features of the current signal and a dictionary matrix in the current dictionary related to the current signal; A sparse dictionary is determined according to a current signal, a current dictionary, a sparse feature of the current signal, and a dictionary matrix.

3. The method for denoising partial discharge signals according to claim 2, characterized in that: The step of determining a sparse dictionary according to the current signal, the current dictionary, the sparse features of the current signal and the dictionary matrix includes: Determine a residual for sparsely representing the current signal according to the current signal, the current dictionary and the sparse features of the current signal; Based on the sparse features and residuals of the current signal and the dictionary matrix, an updated dictionary is obtained; Determine whether the change between the current dictionary and the updated dictionary is less than a preset threshold; If the change between the current dictionary and the updated dictionary is greater than or equal to a preset threshold, the updated dictionary is used as the current dictionary, a historical partial discharge signal is selected from the remaining multiple historical partial discharge signals as the current signal, and the step of "sparsely encoding the current signal based on the current dictionary, determining the sparse features of the current signal, and the dictionary matrix related to the current signal in the current dictionary" and subsequent steps are re-executed until the change between the current dictionary and the updated dictionary is less than the preset threshold, and the updated dictionary is used as the sparse dictionary.

4. The method for denoising partial discharge signals according to claim 2, characterized in that: Based on the current dictionary, the current signal is sparsely encoded to determine the sparse features of the current signal and the dictionary matrix related to the current signal in the current dictionary, including: Setting relevant parameters of sparse coding; wherein the relevant parameters include current sparse features, current residual, preset residual threshold, inactive set, active set, preset number of elements, current number of iterations and maximum number of iterations; Use the current signal as the initialized current residual, use each dictionary column in the current dictionary as the element in the initialized inactive set, and set the initialized active set to the empty set; Determine the element in the inactive set that has the greatest correlation with the current residual; Add the element to the active set and remove the element from the inactive set to obtain an updated active set and an updated inactive set; Determine a direction vector and a step size for adjusting the sparse features according to the updated active set and the updated inactive set; Based on the current sparse feature, the direction vector and the step size, the sparse feature is adjusted to obtain an updated sparse feature, and the updated sparse feature is used as the current sparse feature; Based on the current sparse features and the current dictionary, the residual is updated, and the updated residual is used as the current residual; Determine whether the current residual is less than a preset residual threshold, whether the current number of iterations is less than a maximum number of iterations, and whether the number of elements in the active set is less than a preset number of elements; If the current residual is equal to or greater than a preset residual threshold, and the current number of iterations is less than the maximum number of iterations, and the number of elements in the active set is less than the preset number of elements, then the current number of iterations is updated, and the step of "determining the element in the inactive set that has the greatest correlation with the current residual" and subsequent steps are re-executed until the current residual is less than the preset residual threshold, or the current number of iterations is equal to or greater than the maximum number of iterations, or the number of elements in the active set is equal to or greater than the preset number of elements, the current sparse feature is used as the sparse feature for determining the current signal, and based on the elements in the active set, a dictionary matrix in the current dictionary that is related to the current signal is determined.

5. The method for denoising a partial discharge signal according to any one of claims 1 to 4, characterized in that: Before inputting the frequency domain features, the sparse features and the reconstructed signal into a preset denoising signal generation model to obtain a denoised partial discharge signal output by the denoising signal generation model, the method further includes: Acquire multiple historical partial discharge signals and multiple real denoised partial discharge signals; Extracting frequency domain features of each historical partial discharge signal respectively, and performing sparse decomposition on each historical partial discharge signal respectively based on a pre-built sparse dictionary, so as to obtain sparse features and a reconstructed signal of each historical partial discharge signal; Inputting the frequency domain features, sparse features and reconstructed signals of each historical partial discharge signal into a generator of a generative adversarial network to obtain a noise-free generated signal output by the generator; Inputting a plurality of real denoised partial discharge signals and the noise-free generated signal into the discriminator of the generative adversarial network, and obtaining the probability that each noise-free generated signal and each real denoised partial discharge signal output by the discriminator are real signals; According to the probability, the model parameters of the discriminator and the model parameters of the generator are adjusted to obtain a denoising signal generation model.

6. The method for denoising partial discharge signals according to claim 5, characterized in that: According to the probability, adjusting the model parameters of the discriminator and the model parameters of the generator to obtain a denoised signal generation model, including: According to the probability, calculating a first loss function value of the discriminator; Calculating a second loss function value of the generator according to the probability, the noise-free generated signal and the true denoised partial discharge signal; Based on the first loss function value, the model parameters of the discriminator are adjusted, and based on the second loss function value, the model parameters of the generator are adjusted to obtain a trained generative adversarial network model, and based on the trained generative adversarial network model, a denoised signal generation model is obtained.

7. The method for denoising partial discharge signals according to claim 6, characterized in that: The second loss function corresponding to the second loss function value includes an adversarial loss function, a feature matching loss function and a spectrum reconstruction loss function; Calculating a second loss function value of the generator according to the probability, the noise-free generated signal and the true denoised partial discharge signal, comprising: According to the probability, calculating the adversarial loss function value of the generator; Calculating a feature matching loss function value of the generator according to an intermediate feature of the noise-free generated signal in the discriminator and an intermediate feature of the true denoised partial discharge signal in the discriminator; Calculating a spectrum reconstruction loss function value of the generator according to the spectrum diagram of the noise-free generated signal and the spectrum diagram of the true denoised partial discharge signal; Based on the adversarial loss function value, the feature matching loss function value and the spectrum reconstruction loss function value, a second loss function value of the generator is calculated.

8. The method for denoising partial discharge signals according to claim 6, characterized in that: After inputting the frequency domain features, sparse features and reconstructed signals of each historical partial discharge signal into the generator of the generative adversarial network to obtain the noise-free generated signal output by the generator, the method further includes: Extracting a first feature of the noise-free generated signal and a second feature of the true denoised partial discharge signal based on a preset feature extraction network model; Determining a perceptual loss function value of the generator according to the first feature and the second feature; After calculating the second loss function value of the generator according to the probability, the noise-free generated signal and the true denoised partial discharge signal, the method further comprises: According to the perceptual loss function value, the second loss function value is updated.

9. A denoising device for partial discharge signals, characterized in that: include: An acquisition module, used for acquiring an initial partial discharge signal of an electric device; An extraction module, used for extracting frequency domain features of the initial partial discharge signal; A reconstruction module, used for performing sparse decomposition on the initial partial discharge signal based on a pre-constructed sparse dictionary to obtain sparse features of the initial partial discharge signal and a reconstructed signal; A denoising module is used to input the frequency domain features, the sparse features and the reconstructed signal into a preset denoising signal generation model to obtain a denoised local discharge signal output by the denoising signal generation model; wherein the denoising signal generation model is obtained by training a generative adversarial network model based on the frequency domain features, sparse features and reconstructed signals of multiple historical local discharge signals and multiple real denoised local discharge signals.

10. An electronic device comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Framing-adaptive-sparse-decomposition-based partial discharge signal interference suppression method

    CN107015124A

  • Early warning-oriented seismic signal sparse denoising method

    CN111458745A

  • Life detection method and device based on sparse reconstruction and neural network

    CN113050060A

  • Partial discharge signal denoising processing method and system

    CN113378614A

  • Electric energy quality disturbance identification and classification method

    CN113807446A