Residual current detection method, electronic equipment and storage medium
Through the combination of variational modal decomposition method and dynamic fuzzy neural network, the problems of slow detection speed and low accuracy of traditional RCD are solved, efficient and accurate residual current detection is achieved, and the ability of electrical safety protection is improved.
Patent Information
- Application Number
- CN202411665623.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional residual current protection devices (RCDs) have insufficient detection speed and accuracy, resulting in electric shock accidents and electrical fires.
The residual current signal is decomposed into several intrinsic modal functions IMFs by using the variational modal decomposition method, and the IMFs are classified by cross-correlation coefficient and time-domain energy entropy ratio. After denoising, it is superimposed with the effective IMFs to reconstruct the signal. The reconstructed signal is then detected based on the pre-constructed dynamic fuzzy neural network.
It significantly improves the speed and accuracy of residual current detection, and is suitable for real-time online monitoring and rapid response, providing more efficient technical support for electrical safety protection.
Smart Images

Figure CN119598100A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of current detection, and in particular to a residual current detection method, electronic equipment and storage medium. Background Art
[0002] With the widespread use of electrical equipment, traditional residual current devices (RCDs) have been unable to cope with complex electrical environments and the public's growing demand for electrical safety. The insufficient detection capabilities of traditional RCDs have led to many electric shock accidents and electrical fires. When a person accidentally touches a live conductor, the fast and accurate action of the RCD can effectively prevent electric shock accidents. However, due to the influence of impedance, if the short-circuit current does not reach the overcurrent action value of the RCD, the arc may exist for a long time, causing high temperatures and causing fires. Therefore, improving the detection accuracy and speed of RCDs for residual current is the direction of future development.
[0003] The current residual current signal is a weak singular signal and is seriously interfered by noise. Therefore, it is necessary to achieve fast and accurate residual current detection while ensuring the effectiveness of the signal. Accurately extracting the effective components in the residual current signal is the basis for ensuring that the RCD operates quickly and correctly.
[0004] The development of modern signal processing technology has gradually applied relevant technologies to residual current detection, such as wavelet analysis, neural networks, and empirical mode decomposition (EMD). However, although these methods have improved the detection accuracy of residual current to varying degrees, they also have some limitations. EMD is prone to endpoint effects, and noise can cause mode aliasing and pseudo components, reducing detection accuracy; wavelet transform requires preset fundamental waves, decomposition levels, and thresholds, which reduces the adaptability of the algorithm; BP neural network training time is long and parameter settings are complex. Summary of the invention
[0005] The invention provides a residual current detection method, electronic equipment and storage medium to solve the problems of slow detection speed and low detection accuracy.
[0006] According to one aspect of the present invention, there is provided a residual current detection method, comprising:
[0007] The residual current signal is decomposed into several intrinsic mode functions (IMFs) using variational mode decomposition method.
[0008] The IMFs are classified into valid IMFs, aliased IMFs and noise IMFs according to the cross-correlation coefficient and the time-domain energy entropy ratio;
[0009] De-noising the aliased IMFs, and superimposing the de-noised IMFs with the effective IMFs to obtain a reconstructed signal;
[0010] The reconstructed signal is detected based on a pre-built dynamic fuzzy neural network.
[0011] Optionally, the variational mode decomposition method is used to decompose the residual current signal into a number of intrinsic mode functions IMFs, including:
[0012] The signal is decomposed by minimizing the bandwidth of each IMFs. The input original signal x(t) is decomposed into K IMFs, u k (t) is expressed as:
[0013]
[0014] Among them, u k (t) is the kth IMFs, A k (t) is the amplitude, is the phase function, and the objective function is:
[0015]
[0016] Among them, ω k (t) is the center frequency corresponding to the kth IMFs, x(t) is the original input signal, δ(t) is the Dirac function, j / πt is the Hilbert transform kernel, is the partial derivative operator with respect to time t, and st represents the constraint condition.
[0017] Introduce the Lagrangian multiplier λ and the sub-penalty term α to establish the Lagrangian enhancement matrix L(u k (t),w k (t),λ):
[0018]
[0019] Among them, α is the weight factor of the secondary penalty term, is the partial derivative operator with respect to time t, δ(t)+j / πt is the expression after Hilbert transformation of IMFs, and λ(t) is the Lagrange multiplier;
[0020] IMFs are obtained by iteratively updating the following formula:
[0021]
[0022] in, represents the updated value of the kth IMFs in the frequency domain in the n+1th iteration, represents the updated center frequency of the kth IMFs in the n+1th iteration, Represents the updated value of the Lagrange multiplier in the frequency domain in the n+1th iteration.
[0023] Optionally, the condition for stopping the iteration is that the convergence accuracy ζ satisfies the following formula:
[0024]
[0025] in, represents the updated value of the kth IMFs in the frequency domain in the n+1th iteration, It represents the updated value of the kth IMFs in the frequency domain in the nth iteration. When the convergence condition is met, the iteration stops, and the variational mode decomposition method outputs the K IMFs finally decomposed.
[0026] Optionally, the IMFs are classified according to the cross-correlation coefficient and the time-domain energy entropy ratio into valid IMFs, aliased IMFs and noise IMFs, including:
[0027] Calculate the cross-correlation coefficient R between each IMFs and the original signal;
[0028] According to the time domain energy entropy ratio E k The noise IMFs and the aliasing IMFs are further distinguished.
[0029] Optionally, calculating the cross-correlation coefficient R between each IMFs and the original signal includes:
[0030]
[0031] Among them, IMF k (t) is the kth IMFs, x(t) is the original signal, Cov represents the covariance, and Var represents the variance.
[0032] Optionally, the time domain energy entropy ratio E k Further distinctions between noise IMFs and aliasing IMFs include:
[0033] When E k ≥10%, the IMFs are classified as aliased IMFs. k When <10%, the IMFs are classified as noise IMFs;
[0034] in,
[0035]
[0036] IMF k (t) is the kth IMFs, and x(t) is the original signal.
[0037] Optionally, denoising the aliased IMFs and superimposing the denoised IMFs with the valid IMFs to obtain the most reconstructed signal, including:
[0038] Set the initial weight vector, error estimation function, and forgetting factor of the recursive filter;
[0039] Calculate the error estimation function and calculate the output signal according to the weight vector for the current aliased IMFs;
[0040] Update the weight vector according to the error estimation function and the current IMFs signal;
[0041] Calculate the minimum cost function at the current moment by minimizing the sum of squared errors;
[0042] The denoised IMFs are extracted and added to the effective IMFs to form a more accurate signal. Then all the denoised aliased IMFs are superimposed with the effective IMFs to generate the reconstructed signal.
[0043] Optionally, the structure of the dynamic fuzzy neural network includes an input layer, a fuzzification layer, a rule layer, a normalization layer and an output layer; based on the pre-constructed dynamic fuzzy neural network structure, the reconstructed signal detection includes:
[0044] The input layer receives sampling points from the reconstructed signal;
[0045] The fuzzification layer fuzzifies the input signal;
[0046] The rule layer determines different fuzzy rules; the normalization layer normalizes the output of the rule layer;
[0047] The output layer is used to output the processed reconstructed signal.
[0048] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0049] at least one processor; and
[0050] a memory communicatively connected to the at least one processor; wherein,
[0051] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the residual current detection method described in any embodiment of the present invention.
[0052] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the residual current detection method described in any embodiment of the present invention when executed.
[0053] The technical solution of the embodiment of the present invention decomposes the residual current signal by using the variational mode decomposition method, and reconstructs the aliased IMFs in the residual current signal with the effective IMFs after denoising according to the cross-correlation coefficient and the time-domain energy entropy ratio, and introduces a dynamic fuzzy neural network, which can be adaptively adjusted according to the changes in the input signal. The technical solution of the embodiment of the present invention can significantly improve the detection speed while ensuring high detection accuracy, and is also suitable for online monitoring and rapid response to real-time residual current signals, providing more efficient technical support for electrical safety protection.
[0054] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 is a flow chart of a residual current detection method provided according to an embodiment of the present invention;
[0057] Figure 2 is a flow chart of aliased IMFs denoising in a residual current detection method provided in an embodiment of the present invention;
[0058] Figure 3 A structural diagram of a dynamic fuzzy neural network is provided according to an embodiment of the present invention;
[0059] Figure 4 is a flow chart of a residual current detection method provided according to an embodiment of the present invention;
[0060] Figure 5 It is a structural schematic diagram of an electronic device for implementing the residual current detection method of an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0063] Figure 1 A flowchart of a residual current detection method is provided for an embodiment of the present invention. This embodiment is applicable to current detection situations. The method can be performed by a residual current detection device. The device can be implemented in the form of hardware and / or software. The device can be configured in the field of detecting residual current in electrical circuits. Figure 1 As shown, the method includes:
[0064] S101. Decompose the residual current signal into a number of intrinsic mode functions (IMFs) using a variational mode decomposition method.
[0065] Among them, variational mode decomposition (VMD) is an adaptive signal processing method that can decompose the residual current signal containing noise into several intrinsic mode functions IMFs, each of which has an independent center frequency. VMD uses iterative calculations to find the variation model, optimize the amplitude and center frequency, and finally achieve signal decomposition. Compared with traditional empirical mode decomposition (EMD), VMD has higher computational efficiency in eliminating endpoint effects and pseudo components, avoiding repeated signal processing and subsequent correction steps, thereby improving detection speed.
[0066] S102. Classify the IMFs according to the cross-correlation coefficient and the time-domain energy entropy ratio into valid IMFs, aliased IMFs, and noise IMFs.
[0067] Among them, the cross-correlation coefficient is used to measure the correlation between two signals. The cross-correlation coefficient is used to preliminarily classify the IMFs, and the cross-correlation coefficient between each IMFs and the original signal is calculated. Then, the time-domain energy entropy ratio is used to further distinguish the noise IMFs and aliasing IMFs. For IMFs that are initially judged to contain noise or aliasing, it is necessary to further calculate their time-domain energy entropy ratio to distinguish between noise and aliasing components.
[0068] S103, denoising the aliased IMFs, and superimposing the denoised IMFs with the valid IMFs to obtain a reconstructed signal.
[0069] Among them, since effective information also exists in the aliased IMFs, the aliased IMFs need to be further denoised, and the recursive least squares method (RSL) can be used to denoise the aliased IMFs. RLS is an adaptive filtering algorithm that can quickly update the filter coefficients and remove noise in real time. Compared with traditional denoising methods, RLS can process aliased signals in a shorter time, effectively reducing the calculation delay. RLS has the advantages of simple calculation, fast convergence speed, and adaptive parameter adjustment.
[0070] S104. Detect the reconstructed signal based on the pre-built dynamic fuzzy neural network.
[0071] Dynamic fuzzy neural network (DFNN) combines the fast processing capability of fuzzy reasoning system and the powerful self-learning ability of neural network. It is suitable for processing complex nonlinear signals, such as residual current signal. The network structure of DFNN is not pre-set, but dynamically adjusts the fuzzy rule function and the number of neurons according to the input data. After training, DFNN can process complex nonlinear signals in real time and realize accurate detection and prediction of reconstructed signals. Compared with the traditional BP neural network that requires longer training time and complex parameter adjustment, DFNN is more suitable for real-time application and can make judgments quickly, thereby improving the overall detection speed.
[0072] The technical solution of the embodiment of the present invention decomposes the residual current signal by using the variational mode decomposition method, and reconstructs the aliased IMFs in the residual current signal with the effective IMFs after denoising according to the cross-correlation coefficient and the time-domain energy entropy ratio, and introduces a dynamic fuzzy neural network, which can be adaptively adjusted according to the changes in the input signal. The technical solution of the embodiment of the present invention can significantly improve the detection speed while ensuring high detection accuracy, and is also suitable for online monitoring and rapid response to real-time residual current signals, providing more efficient technical support for electrical safety protection.
[0073] In some optional embodiments of the present invention, the residual current signal is decomposed into a number of intrinsic mode functions IMFs using a variational mode decomposition method, including:
[0074] The signal is decomposed by minimizing the bandwidth of each IMFs. The input original signal x(t) is decomposed into K IMFs, u k (t) is expressed as:
[0075]
[0076] where u k (t) is the kth IMFs, Ak (t) is the amplitude, is the phase function, and the objective function is:
[0077]
[0078] Among them, ω k (t) is the center frequency corresponding to the kth IMFs, x(t) is the original input signal, δ(t) is the Dirac function, j / πt is the Hilbert transform kernel, is the partial derivative operator with respect to time t, and st represents the constraint condition.
[0079] Introduce the Lagrangian multiplier λ and the sub-penalty term α to establish the Lagrangian enhancement matrix L(u k (t),w k (t),λ):
[0080]
[0081] Among them, α is the weight factor of the secondary penalty term, is the partial derivative operator with respect to time t, δ(t)+j / πt is the expression after Hilbert transformation of IMFs, and λ(t) is the Lagrange multiplier;
[0082] IMFs are obtained by iteratively updating the following formula:
[0083]
[0084] in, represents the updated value of the kth IMFs in the frequency domain in the n+1th iteration, represents the updated center frequency of the kth IMFs in the n+1th iteration, Represents the updated value of the Lagrange multiplier in the frequency domain in the n+1th iteration.
[0085] In some optional embodiments of the present invention, the condition for stopping the iteration is that the convergence accuracy ζ satisfies the following formula:
[0086]
[0087] in, represents the updated value of the kth IMFs in the frequency domain in the n+1th iteration, It represents the updated value of the kth IMFs in the frequency domain in the nth iteration. When the convergence condition is met, the iteration stops, and the variational mode decomposition method outputs the final decomposed K IMFs. The variational mode decomposition method realizes the adaptive decomposition of complex signals through the Lagrange multiplier method and the alternating direction multiplier method. The key is to ensure that each IMF has an independent center frequency by minimizing the bandwidth, and continuously optimize the decomposition effect through iterative updates. The advantage of the variational mode decomposition method is that it can accurately separate the different frequency components of the signal, and is suitable for processing non-stationary signals, such as residual current signals in distribution networks.
[0088] In some optional embodiments of the present invention, IMFs are classified into valid IMFs, aliased IMFs and noise IMFs according to the cross-correlation coefficient and the time-domain energy entropy ratio, including:
[0089] Calculate the cross-correlation coefficient R between each IMFs and the original signal;
[0090] According to the time domain energy entropy ratio E k A further distinction is made between noise IMFs and aliasing IMFs.
[0091] In some optional embodiments of the present invention, calculating the cross-correlation coefficient R between each IMFs and the original signal includes:
[0092]
[0093] Among them, IMF k (t) is the kth IMFs, x(t) is the original signal, Cov is the covariance, and Var is the variance. When R≥0.8, the IMFs are classified as valid IMFs. When R<0.8, the IMFs may contain noise or aliasing components and need to be further analyzed based on the time domain energy entropy ratio E k distinguish.
[0094] In some optional embodiments of the present invention, according to the time domain energy entropy ratio E k Further distinctions between noise IMFs and aliasing IMFs include:
[0095] When E k ≥10%, the IMFs are classified as aliased IMFs. k When <10%, the IMFs are classified as noise IMFs;
[0096] in,
[0097]
[0098] IMF k(t) is the kth IMFs, and x(t) is the original signal. For IMFs that are initially judged to contain noise or aliasing, it is necessary to further calculate their time domain energy entropy ratio E k , to distinguish noise and aliasing components. k When E ≥ 10%, the IMFs contain effective components and noise, and are classified as aliased IMFs. k When the value is less than 10%, the IMFs are mainly high-frequency noise, and they are classified as noise IMFs. Specifically, effective IMFs refer to IMFs with high correlation and high energy, which are directly used to reconstruct signals; aliased IMFs refer to IMFs that are superimposed on effective IMFs after denoising, and are used for signal reconstruction; noise IMFs are mainly high-frequency noise IMFs, which are directly discarded and do not participate in signal reconstruction.
[0099] Figure 2 A flowchart of denoising aliased IMFs in a residual current detection method according to an embodiment of the present invention is provided. Since effective information also exists in aliased IMFs, it is necessary to further denoise the aliased IMFs. The recursive least squares method (RLS) can quickly update the filter coefficients and remove noise in real time. It has the advantages of simple calculation, fast convergence speed, and adaptive parameter adjustment. Therefore, RLS is used to denoise the aliased IMFs. In some optional embodiments of the present invention, such as Figure 2 As shown, the aliased IMFs are denoised, and the denoised IMFs are superimposed with the effective IMFs to obtain the most reconstructed signal, including:
[0100] S201, setting an initial weight vector, an error estimation function, and a forgetting factor of a recursive filter.
[0101] Among them, the initial weight vector W(t) is set to a zero vector so that the weights can be updated in the least squares method. The error estimation function e(t) is defined to measure the difference between the current IMFs and the target signal. The forgetting factor μ of the recursive filter is set, which is usually a constant close to 1 and is used to balance the weights between historical data and current data.
[0102] S202: Calculate an error estimation function, and calculate an output signal for the current aliased IMFs according to a weight vector.
[0103] Among them, the output signal of the current aliased IMFs is calculated according to the weight vector:
[0104] y(t)=W(t-1)·IMF alias (t);
[0105] Among them, y(t) is the output signal, W(t-1) is the weight vector at the previous moment, and IMF alias (t) is the current aliased IMFs.
[0106] Calculate the error estimate function e(t), which is the difference between the output signal y(t) and the original signal x(t):
[0107] e(t)=x(t)-y(t);
[0108] S203: Update the weight vector according to the error estimation function and the current IMFs signal.
[0109] Among them, according to the error estimation function e(t) and the current IMFs signal, the weight vector W(t) is updated:
[0110] W(t)=W(t-1)+k(t)·e(t);
[0111] Where k(t) is the adaptive adjustment step size, which is calculated by the following formula:
[0112]
[0113] Among them, P(t-1) is the covariance matrix of the previous moment, IMF alias (t) is the current aliased IMFs, and λ is the attenuation factor in RSL, which is used to control the importance the algorithm attaches to past data.
[0114] The covariance matrix is also updated in each iteration to reflect the current data:
[0115]
[0116] Among them, P(t) is the covariance matrix at the current moment, λ is the attenuation factor in RSL, P(t-1) is the covariance matrix at the previous moment, k(t) is the adaptive adjustment step size, and IMF alias (t) is the current aliased IMFs.
[0117] S204: Calculate the minimum cost function at the current moment by minimizing the sum of squared errors.
[0118] Among them, the minimum cost function at the current moment is calculated by the formula:
[0119]
[0120] In the formula, C(t) is the minimum cost function at the current moment, C(t-1) is the minimum cost function at the previous moment, and IMF alias (t) is the current aliasing IMFs, It is the IMF alias The conjugate transpose of (t) represents the complex conjugate and transposed matrix of the matrix.
[0121] S205, extracting the denoised IMFs, adding the denoised IMFs to the effective IMFs to form a more accurate signal, and then superimposing all the denoised aliased IMFs with the effective IMFs to generate a reconstructed signal.
[0122] Among them, the denoised IMFs are extracted, and the aliased IMFs after RLS processing are recorded as IMF denoised (t), the denoised IMFs are added to the effective IMFs to form a more accurate signal, and then all the denoised aliased IMFs are superimposed with the effective IMFs to generate the final reconstructed signal:
[0123]
[0124] Among them, x reconstructed (t) is the reconstructed signal, IMF k (t) is the aliased IMFs and effective IMFs after denoising, x reconstructed (t) is highly consistent with the original signal x(t), but its noise component has been effectively removed.
[0125] Figure 3 A structural diagram of a dynamic fuzzy neural network is provided for an embodiment of the present invention. In some optional embodiments of the present invention, for example Figure 3 As shown, the structure of the dynamic fuzzy neural network includes an input layer, a fuzzification layer, a rule layer, a normalization layer and an output layer; based on the pre-built dynamic fuzzy neural network structure, the reconstructed signal detection includes:
[0126] The input layer receives sampling points from the reconstructed signal; the fuzzification layer fuzzifies the input signal; the rule layer determines different fuzzy rules; the normalization layer normalizes the output of the rule layer; and the output layer is used to output the processed reconstructed signal.
[0127] The input layer receives the sampling point x from the residual current signal. i , each node represents a sampling point of the signal; each node in the fuzzification layer represents a Gaussian membership function G ij (x i ), used to fuzzify the input signal:
[0128]
[0129] Among them, c ij and σ j are the center and width parameters of the Gaussian function respectively;
[0130] Each node in the rule layer represents a fuzzy rule
[0131]
[0132] Where X is the input vector, C j is the center vector of the regular layer;
[0133] The normalization layer normalizes the output of the rule layer and outputs the value of the i-th node as:
[0134]
[0135] Where u is the number of nodes in the rule layer;
[0136] The output layer is based on the normalized value and weight w k Calculate the final output:
[0137]
[0138] Among them, y(X) is the processed residual current signal.
[0139] Dynamic adjustment of fuzzy rules and training of neural networks: Every time new data is input, the system calculates the current error || e i ||, and compared with the preset accuracy error threshold k e For comparison, when ||e i ||Greater than k e When adding new fuzzy rules To adapt to the new input data, the DFNN is trained using the minimum output method, dynamically adjusting the fuzzy rule function and network structure until the error || e i || is less than the set threshold, and the network parameters (such as weights and center vectors) are iteratively optimized to ensure that the network can detect the residual current signal quickly and accurately. Finally, when the output error of DFNN reaches the set accuracy requirement and the network structure is stable and no new fuzzy rules are needed, the training process is terminated.
[0140] Figure 4 A flow chart of a residual current detection method is provided according to an embodiment of the present invention. First, the original signal x(t) is decomposed into a number of intrinsic mode functions IMFs by using the variational mode decomposition method, and then the IMFs are classified into effective IMFs, aliased IMFs and noise IMFs according to the cross-correlation coefficient R and the time-domain energy entropy ratio E, and the aliased IMFs are denoised by the recursive least squares method, and the denoised IMFs are superimposed with the effective IMFs to obtain a reconstructed signal, and then based on a pre-constructed dynamic fuzzy neural network, according to the dynamic adjustment of fuzzy rules, the neural network is trained to detect the reconstructed signal, and finally the signal y(t) is output.
[0141] Figure 5A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0142] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0143] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0144] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a residual current detection method.
[0145] In some embodiments, the residual current detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method XXX described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the residual current detection method in any other appropriate manner (e.g., by means of firmware).
[0146] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0147] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0148] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0149] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0150] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0151] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0152] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0153] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A residual current detection method, characterized in that: include: The residual current signal is decomposed into several intrinsic mode functions (IMFs) using variational mode decomposition method. The IMFs are classified into valid IMFs, aliased IMFs and noise IMFs according to the cross-correlation coefficient and the time-domain energy entropy ratio; De-noising the aliased IMFs, and superimposing the de-noised IMFs with the effective IMFs to obtain a reconstructed signal; The reconstructed signal is detected based on a pre-built dynamic fuzzy neural network.
2. The method according to claim 1, characterized in that: The variational mode decomposition method is used to decompose the residual current signal into several intrinsic mode functions IMFs, including: The signal is decomposed by minimizing the bandwidth of each IMFs. The input original signal x(t) is decomposed into K IMFs, u k (t) is expressed as: Among them, u k (t) is the kth IMFs, A k (t) is the amplitude, is the phase function, and the objective function is: Among them, ω k (t) is the center frequency corresponding to the kth IMFs, x(t) is the original input signal, δ(t) is the Dirac function, j / πt is the Hilbert transform kernel, is the partial derivative operator with respect to time t, and st represents the constraint condition. Introduce the Lagrangian multiplier λ and the sub-penalty term α to establish the Lagrangian enhancement matrix L(u k (t),w k (t),λ) Among them, α is the weight factor of the secondary penalty term, is the partial derivative operator with respect to time t, δ(t)+j / πt is the expression after Hilbert transformation of IMFs, and λ(t) is the Lagrange multiplier; IMFs are obtained by iteratively updating the following formula: in, represents the updated value of the kth IMFs in the frequency domain in the n+1th iteration, represents the updated center frequency of the kth IMFs in the n+1th iteration, Represents the updated value of the Lagrange multiplier in the frequency domain in the n+1th iteration.
3. The method according to claim 2, characterized in that The condition for stopping the iteration is that the convergence accuracy ζ satisfies the following formula: in, represents the updated value of the kth IMFs in the frequency domain in the n+1th iteration, It represents the updated value of the kth IMFs in the frequency domain in the nth iteration. When the convergence condition is met, the iteration stops, and the variational mode decomposition method outputs the K IMFs finally decomposed.
4. The method according to claim 1, characterized in that: The IMFs are classified according to the cross-correlation coefficient and the time-domain energy entropy ratio into effective IMFs, aliased IMFs and noise IMFs, including: Calculate the cross-correlation coefficient R between each IMFs and the original signal; According to the time domain energy entropy ratio E k The noise IMFs and the aliasing IMFs are further distinguished.
5. The method according to claim 4, characterized in that The calculation of the cross-correlation coefficient R between each IMFs and the original signal includes: Among them, IMF k (t) is the kth IMFs, x(t) is the original signal, Cov represents the covariance, and Var represents the variance.
6. The method according to claim 4, characterized in that According to the time domain energy entropy ratio E k Further distinctions between noise IMFs and aliasing IMFs include: When E k ≥10%, the IMFs are classified as aliased IMFs. k When <10%, the IMFs are classified as noise IMFs; in, IMF k (t) is the kth IMFs, and x(t) is the original signal.
7. The method according to claim 1, characterized in that De-noising the aliased IMFs, and superimposing the de-noised IMFs with the effective IMFs to obtain the most reconstructed signal, including: Set the initial weight vector, error estimation function, and forgetting factor of the recursive filter; Calculate the error estimation function and calculate the output signal according to the weight vector for the current aliased IMFs; Update the weight vector according to the error estimation function and the current IMFs signal; Calculate the minimum cost function at the current moment by minimizing the sum of squared errors; The denoised IMFs are extracted and added to the effective IMFs to form a more accurate signal. Then all the denoised aliased IMFs are superimposed with the effective IMFs to generate the reconstructed signal.
8. The method according to claim 1, characterized in that: The structure of the dynamic fuzzy neural network includes an input layer, a fuzzification layer, a rule layer, a normalization layer and an output layer; Based on the pre-built dynamic fuzzy neural network structure, the reconstructed signal detection includes: The input layer receives sampling points from the reconstructed signal; The fuzzification layer fuzzifies the input signal; The rule layer determines different fuzzy rules; the normalization layer normalizes the output of the rule layer; The output layer is used to output the processed reconstructed signal.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the residual current detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the residual current detection method according to any one of claims 1 to 8 when executed.