Harmonic detection model training method and harmonic detection method for low-voltage transformer area

By using wavelet transform in the low-voltage table area to extract the fundamental and harmonics of the current signal, the harmonic detection model is trained, and the problem of low-voltage table area is solved, and higher detection accuracy and reliability of electrical energy measurement are achieved.

CN119513545APending Publication Date: 2025-02-25CHINA SOUTHERN POWER GRID DIGITAL GRID GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411726149.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The accuracy of harmonic detection results in the medium and low voltage table areas in the prior art is not high, resulting in electrical energy metering errors, affecting power revenue and system stability.

Method used

By obtaining the historical current signal sequence of the metering device in the low-voltage table area, the fundamental wave signal and harmonic signals are extracted using wavelet transform, and as training samples, the pre-constructed harmonic detection model is iteratively trained, and the model parameters are adjusted until the preset training end condition is reached, and the trained harmonic detection model is obtained.

Benefits of technology

It improves the accuracy of harmonic detection in the low-voltage platform area, enhances the model's processing capability of complex and non-stationary signals, and is suitable for harmonic detection under the low-voltage platform area with distributed energy access. It can detect integral and non-integrated harmonics, ensuring the accuracy and reliability of power metering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513545A_ABST
    Figure CN119513545A_ABST
Patent Text Reader

Abstract

The invention relates to a low-voltage transformer area harmonic detection model training method and a harmonic detection method. The method comprises the following steps: acquiring a historical current signal sequence of a low-voltage transformer area metering device; extracting a fundamental wave signal and a harmonic wave signal of the current signal in the historical current signal sequence through wavelet transform to obtain a current signal sequence training sample; initializing model parameters of a pre-constructed initial harmonic detection model; taking the current signal sequence training sample as input, calling an initial harmonic detection model, predicting harmonic components of historical current signals in the historical current signal sequence, and obtaining harmonic component predicted values of the historical current signals; for each current signal, determining an error between a harmonic component predicted value and a harmonic component actual value of the historical current signal; and based on the error, adjusting model parameters of the initial harmonic detection model until a preset training ending condition is reached, and obtaining a trained harmonic detection model. The method is beneficial for improving the harmonic detection accuracy of the low-voltage transformer area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for training a harmonic detection model for a low-voltage substation, and a method, device, computer equipment, computer-readable storage medium and computer program product for harmonic detection in a low-voltage substation. Background Art

[0002] Harmonics refer to electrical signal components in the power grid whose frequencies are integer multiples of the fundamental frequency, which are mainly generated by nonlinear loads and power electronic equipment. In low-voltage areas, the connection of distributed energy to the grid increases the number and types of nonlinear loads, making the harmonic problem more prominent. Specifically, after the distributed energy is connected to the low-voltage area, the electric energy metering device will be interfered by harmonics, resulting in metering errors. These errors will lead to a decrease in metering accuracy, which will not only lead to a decrease or increase in electricity revenue, affecting the economic benefits of the enterprise, but also cause user interests and economic losses. Therefore, it is necessary to detect harmonics in electric energy in order to take corresponding measures to manage and ensure fair transactions in the electricity market and the stable operation of the power system.

[0003] At present, the traditional harmonic detection method has the problem that the harmonic detection results are not accurate enough. Summary of the invention

[0004] Based on this, it is necessary to provide a low-voltage substation harmonic detection model training method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of harmonic detection in low-voltage substations, as well as a low-voltage substation harmonic detection method, device, computer equipment, computer-readable storage medium and computer program product in response to the above-mentioned technical problems.

[0005] In a first aspect, the present application provides a low voltage area harmonic detection method, comprising:

[0006] Obtain the historical current signal sequence of the metering device in the low voltage area;

[0007] Through wavelet transform, the fundamental signal and harmonic signal of the current signal in the historical current signal sequence are extracted, and the current signal sequence training samples are obtained;

[0008] Initializing model parameters of a pre-built initial harmonic detection model;

[0009] Taking the current signal sequence training sample as input, calling the initial harmonic detection model, predicting the harmonic components of each historical current signal in the historical current signal sequence, and obtaining the predicted value of the harmonic components of each historical current signal;

[0010] For each current signal, determining the error between the predicted value of the harmonic component of the historical current signal and the actual value of the harmonic component;

[0011] Based on the error, the model parameters of the initial harmonic detection model are adjusted until a preset training end condition is reached to obtain a trained harmonic detection model.

[0012] In one embodiment, the fundamental signal and harmonic signal of the current signal in the historical current signal sequence are extracted by wavelet transform, including:

[0013] Determine the optimal wavelet transform order of the historical current signal sequence;

[0014] Performing wavelet transform on the current signal in the historical current signal sequence according to the optimal wavelet transform order, and decomposing the current signal into wavelet coefficients of multiple scales;

[0015] Based on the wavelet coefficients, the fundamental signal and harmonic signal of the current signal in the historical current signal sequence are extracted.

[0016] In one embodiment, adjusting the connection weights of the initial harmonic detection model based on the error includes:

[0017] Based on the error, the model parameters of the initial harmonic detection model are adjusted through the gradient descent algorithm.

[0018] In one embodiment, adjusting the model parameters of the initial harmonic detection model based on the error by a gradient descent algorithm includes:

[0019] Based on the error, the number of harmonics and the initial phase of harmonics in the activation function of the initial harmonic detection model are adjusted by the gradient descent algorithm;

[0020] Based on the error, the weight adjustment amount between the input layer and the hidden layer, and between the hidden layer and the output layer in the initial harmonic detection model is determined, and the connection weights between the input layer and the hidden layer, and between the hidden layer and the output layer are adjusted based on the weight adjustment amount.

[0021] In one embodiment, determining the optimal wavelet transform order of the historical current signal sequence includes:

[0022] Based on a preset transformation order step, the current signal in the historical current signal sequence is processed by wavelet transformation;

[0023] Performing inverse transformation on the current signal after wavelet transformation to obtain a restored signal of the current signal;

[0024] Compare the signal-to-noise ratio of the restored signal after wavelet transform processing under different transform orders;

[0025] The transform order with the largest signal-to-noise ratio is determined as the optimal wavelet transform order.

[0026] In one embodiment, extracting the fundamental signal of the current signal in the historical current signal sequence based on the wavelet coefficient includes:

[0027] For each current signal, filter out the wavelet coefficients of the low-frequency signal and the wavelet coefficients of the high-frequency signal in the current signal from the wavelet coefficients;

[0028] Based on the wavelet coefficient of the low-frequency signal, the current signal is inversely transformed to obtain the fundamental signal of the current signal;

[0029] Based on the wavelet coefficients of the high-frequency signal, the current signal is inversely transformed to obtain the harmonic signal of the current signal.

[0030] In a second aspect, the present application also provides a low voltage area harmonic detection method, comprising:

[0031] Obtaining the current signal sequence of the metering device in the low voltage area;

[0032] Taking the current signal sequence as input, the trained harmonic detection model is called to detect the harmonic components in the current signal sequence. The trained harmonic detection model is trained based on the above-mentioned low-voltage substation harmonic detection model training method.

[0033] In a third aspect, the present application also provides a low voltage area harmonic detection model training device, comprising:

[0034] A data acquisition module, used to acquire the historical current signal sequence of the metering device in the low-voltage area;

[0035] A signal extraction module is used to extract the fundamental signal and harmonic signal of the current signal in the historical current signal sequence through wavelet transformation to obtain a current signal sequence training sample;

[0036] An initialization module, used to initialize model parameters of a pre-built initial harmonic detection model;

[0037] A harmonic prediction module, used to take the current signal sequence training sample as input, call the initial harmonic detection model, predict the harmonic components of each historical current signal in the historical current signal sequence, and obtain the predicted value of the harmonic components of each historical current signal;

[0038] An error determination module, used to determine, for each current signal, an error between a predicted value of a harmonic component of the historical current signal and an actual value of the harmonic component;

[0039] The parameter adjustment module is used to adjust the model parameters of the initial harmonic detection model based on the error until a preset training end condition is reached to obtain a trained harmonic detection model.

[0040] In a fourth aspect, the present application further provides a low voltage area harmonic detection device, comprising:

[0041] A signal acquisition module, used to acquire the current signal sequence of the metering device in the low-voltage area;

[0042] The harmonic detection module is used to take the current signal sequence as input, call the trained harmonic detection model, and detect the harmonic components in the current signal sequence. The trained harmonic detection model is trained based on any of the above-mentioned low-voltage substation harmonic detection model training methods.

[0043] In a fifth aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps in any one of the above-mentioned low-voltage substation harmonic detection model training method embodiments and the steps in a low-voltage substation harmonic detection method embodiment.

[0044] In a sixth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in any one of the above-mentioned low-voltage substation harmonic detection model training method embodiments and the steps in a low-voltage substation harmonic detection method embodiment.

[0045] In the seventh aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned low-voltage substation harmonic detection model training method embodiments and the steps in a low-voltage substation harmonic detection method embodiment.

[0046] The above-mentioned low-voltage substation harmonic detection model training method, device, computer equipment, computer-readable storage medium and computer program product, on the one hand, obtain the historical current signal sequence of the metering device of the low-voltage substation and perform wavelet transform on the historical current signal, which can reduce the impact of interference in the signal on subsequent processing. At the same time, it captures the signal characteristics of the historical current signal at different scales, so as to accurately separate the fundamental signal and harmonic signal in the historical current signal, and obtains the training samples of the model according to the separated fundamental signal and harmonic signal, so as to iteratively train the pre-constructed harmonic detection model according to the current signal sequence training samples, which is beneficial to improve the quality of model training. On the other hand, the harmonic detection model obtains the harmonic component prediction value according to the training samples obtained by wavelet transform, calculates the error, and adjusts the model parameters of the model until the preset training end condition is reached, so as to obtain the trained harmonic detection model. Combined with the wavelet transform training model, the model's processing capability for complex and non-stationary signals is enhanced, thereby improving the model's harmonic detection accuracy.

[0047] The above-mentioned low-voltage substation harmonic detection method, device, computer equipment, computer-readable storage medium and computer program product obtain the current signal sequence of the metering device of the low-voltage substation, input it into the trained model obtained by the above-mentioned harmonic detection model training method, and detect the harmonic components in the power signal sequence. On the one hand, it can adapt to the harmonic detection under the access of distributed energy to the low-voltage substation, and improve the harmonic detection accuracy under this working condition. On the other hand, the model can not only detect integral harmonics, but also detect non-integral harmonics of electric energy measurement errors, which is conducive to comprehensive harmonic analysis based on the detected harmonic components. Further, it is conducive to taking corresponding measures according to the analysis results to ensure the accuracy and reliability of electric energy metering of distributed energy access to the low-voltage substation. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 This is an application environment diagram of a low voltage area harmonic detection model training method in an embodiment;

[0050] Figure 2 A schematic diagram of a flow chart of a low voltage area harmonic detection model training method in one embodiment;

[0051] Figure 3 A schematic diagram of a flow chart of a low voltage area harmonic detection model training method in another embodiment;

[0052] Figure 4 A schematic diagram of a flow chart of a low voltage area harmonic detection model training method in yet another embodiment;

[0053] Figure 5 A schematic diagram of a flow chart of a low voltage area harmonic detection model training method in yet another embodiment;

[0054] Figure 6 It is a structural block diagram of a low voltage area harmonic detection model training device in one embodiment;

[0055] Figure 7 It is a structural block diagram of a low voltage area harmonic detection device in one embodiment;

[0056] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] The low voltage area harmonic detection model training method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0059] Specifically, the operator may upload the collected historical current signal sequence of the metering device of the low-voltage substation to the server 104 through the terminal 102, and then send the harmonic detection model training message to the server 104 through the terminal 102. The server 104 obtains the historical current signal sequence of the metering device of the low-voltage substation. Secondly, the fundamental signal and the harmonic signal of the current signal in the historical current signal sequence are extracted through wavelet transform to obtain the current signal sequence training sample. Then, the model parameters of the pre-constructed initial harmonic detection model are initialized, and the current signal sequence training sample is used as input to call the initial harmonic detection model to predict the harmonic components of each historical current signal in the historical current signal sequence to obtain the harmonic component prediction value of each historical current signal. Thirdly, for each current signal, the error between the harmonic component prediction value of the historical current signal and the actual value of the harmonic component is determined. Finally, based on the error, the model parameters of the initial harmonic detection model are adjusted until the preset training end condition is reached to obtain the trained harmonic detection model.

[0060] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0061] In an exemplary embodiment, Figure 2 As shown in the figure, a low voltage area harmonic detection model training method is provided, and the method is applied to Figure 1The server 104 in the example is used for explanation, and includes the following S100 to 600. Among them:

[0062] S100, obtaining a historical current signal sequence of a metering device in a low voltage substation.

[0063] The low voltage distribution area is a local area of ​​the low voltage distribution network in the power system, which usually includes a transformer and the users within its power supply range. It is responsible for reducing the high voltage electricity to low voltage electricity through the transformer for users to use. The metering device is a device used to measure and record the consumption of electric energy.

[0064] In practical applications, the current signal of the low-voltage substation collected by the current transformer in the past six months when the metering device is in working state can be obtained to obtain a historical current signal sequence.

[0065] S200, extracting fundamental wave signals and harmonic wave signals of current signals in a historical current signal sequence through wavelet transformation, and obtaining current signal sequence training samples.

[0066] Among them, wavelet transform is a multi-scale analysis method used to analyze the characteristics of signals in the time and frequency domains, and can decompose signals into components of different frequencies. The current signal sequence training sample can be a current signal sequence containing a fundamental signal and a harmonic signal.

[0067] In practical applications, the historical current signal sequence can be subjected to wavelet transformation to decompose the historical current signal sequence into signal components of different frequencies, and the harmonic signal can be extracted based on other components. The fundamental signal and the harmonic signal are data labeled, and the harmonic frequency, amplitude and phase of the harmonic signal are labeled to obtain the current signal sequence training sample.

[0068] S300, initializing model parameters of a pre-built initial harmonic detection model.

[0069] The pre-built initial harmonic detection model is constructed based on a linear neural network. A linear neural network is a feed-forward neural network in which the activation function of each neuron is linear. Model parameters may include connection weights between layers and the activation function of the model.

[0070] In practical applications, the initial harmonic detection model can be constructed based on a linear neural network. Specifically, the number of nodes in the input layer, output layer, and hidden layer of the linear neural network is predefined to construct the initial harmonic detection model. The connection weights between the layers are initialized, and the sine trigonometric function is used as the activation function. The formula of the harmonic activation function is:

[0071]

[0072] In the formula, Indicates the number of harmonics; represents the initial phase of harmonics, .

[0073] S400, taking the current signal sequence training sample as input, calling the initial harmonic detection model, predicting the harmonic component of each historical current signal in the historical current signal sequence, and obtaining the predicted value of the harmonic component of each historical current signal.

[0074] The predicted value of harmonic components includes the frequency value, amplitude and phase of the harmonics.

[0075] In practical applications, the current signal sequence training samples are input into the initial harmonic detection model. The input data is passed from the input layer to the output layer. For each neuron, its weighted input is calculated, and a linear activation function is applied to predict the harmonic components of each historical current signal in the historical current signal sequence, and the frequency value of the harmonic of each historical current signal is obtained:

[0076]

[0077] In the formula, Represents the connection weight.

[0078] And the harmonic amplitude of each historical current signal and Phase :

[0079]

[0080]

[0081] In the formula, and They represent the cosine and sine components at the harmonics respectively.

[0082] S500, for each current signal, determining an error between a predicted value of a harmonic component of a historical current signal and an actual value of the harmonic component.

[0083] In practical applications, for each current signal, the error between the predicted value of the harmonic component of the historical current signal and the actual value of the harmonic component can be determined by a loss function. The loss function includes but is not limited to mean square error, mean absolute error, and cross entropy.

[0084] S600, based on the error, adjusting the model parameters of the initial harmonic detection model until a preset training end condition is reached, thereby obtaining a trained harmonic detection model.

[0085] In practical applications, after the error is determined, the error can be back-propagated through the network to calculate the contribution of each connection weight to the error. Specifically, the loss gradient relative to each connection weight can be calculated by the chain rule, so as to adjust the connection weights between the layers of the model to minimize the error. The preset training end condition can be that the error is continuously less than a preset error threshold within a preset number of iterations, and the training of the harmonic detection model is stopped to obtain a trained harmonic detection model.

[0086] In the above-mentioned low-voltage substation harmonic detection model training method, the historical current signal sequence of the metering device of the low-voltage substation is obtained. On the one hand, the historical current signal sequence of the metering device of the low-voltage substation is obtained, and the historical current signal is subjected to wavelet transform, which can reduce the influence of interference in the signal on subsequent processing. At the same time, the signal characteristics of the historical current signal at different scales are captured, so as to accurately separate the fundamental signal and harmonic signal in the historical current signal, and the training samples of the model are obtained according to the separated fundamental signal and harmonic signal, so as to iteratively train the pre-constructed harmonic detection model according to the current signal sequence training samples, which is beneficial to improve the quality of model training. On the other hand, the harmonic detection model obtains the harmonic component prediction value according to the training samples obtained by wavelet transform, calculates the error, and adjusts the model parameters of the model until the preset training end condition is reached, so as to obtain the trained harmonic detection model. Combined with the wavelet transform training model, the model's processing capability for complex and non-stationary signals is enhanced, thereby improving the model's harmonic detection accuracy.

[0087] In an exemplary embodiment, Figure 3 As shown, S200 includes S220 to S260. Among them:

[0088] S220, determining the optimal wavelet transform order of the historical current signal sequence.

[0089] Among them, the optimal wavelet transform order is the optimal transform order for wavelet transform of the historical current signal sequence.

[0090] In practical applications, in order to improve the multi-scale analysis effect of the historical current signal sequence and improve the accuracy of harmonic detection, the optimal transformation order of the wavelet transform of the historical current signal sequence can be determined. The optimal transformation order can be determined based on the fundamental frequency and the highest harmonic frequency. Specifically, the ratio of the highest harmonic frequency to the fundamental frequency is calculated, and the optimal wavelet transform order is determined based on the ratio. For example, if the fundamental frequency is 50 Hz and the highest harmonic frequency is 300 Hz, the ratio of the highest harmonic frequency to the fundamental frequency is 50 / 300=6. Usually, the transformation order L should satisfy 2 L ≥The ratio of the highest harmonic frequency to the fundamental frequency, therefore, the optimal wavelet transform order is determined to be 3.

[0091] S240, performing wavelet transform on the current signal in the historical current signal sequence according to the optimal wavelet transform order, and decomposing the current signal into wavelet coefficients of multiple scales.

[0092] Among them, wavelet coefficients are used to describe the characteristics of signals at different scales. Wavelet coefficients include approximate coefficients and detail coefficients, which are used to describe the information of the low-frequency and high-frequency parts of the signal respectively.

[0093] In practical applications, the current signal in the historical current signal sequence is transformed according to the optimal wavelet transform order. Perform wavelet transform using wavelet basis function bundle Transform the displacement and scale of the current signal:

[0094]

[0095] In the formula, represents the frequency wavelet transform scale factor; Represents the translation factor.

[0096] Get the j-layer approximate coefficients containing frequency information and detail factor :

[0097]

[0098] In the formula, and They represent the low-pass filter and high-pass filter generated by the algorithm respectively; represents any positive integer; and is discrete; and Respectively represent the first Layer approximation coefficient and detail coefficient; Indicates the total number of signal decomposition layers.

[0099] S260, extracting fundamental wave signals and harmonic wave signals of current signals in the historical current signal sequence based on the wavelet coefficients.

[0100] In practical applications, the fundamental signal can be extracted through wavelet reconstruction based on the approximate coefficients and detail coefficients with reduced decomposition levels, and the harmonic signal can be extracted through wavelet reconstruction based on the approximate coefficients and detail coefficients with increased decomposition levels.

[0101] In this embodiment, by determining the optimal wavelet transform order, wavelet transform is performed according to the optimal wavelet transform order to extract the fundamental signal and harmonic signal in the current signal, and a current signal sequence training sample is obtained, which improves the accuracy of signal extraction and is conducive to improving the accuracy of harmonic detection.

[0102] In order to quickly converge the model, in an exemplary embodiment, S600 includes S620. In which:

[0103] S620, adjusting the model parameters of the initial harmonic detection model through a gradient descent algorithm based on the error.

[0104] In practical applications, the gradient of the loss function with respect to the connection weights of the initial harmonic detection model may be calculated through back propagation, and the connection weights of the model may be updated according to the gradient and the learning rate.

[0105] In this embodiment, based on the error between the predicted value and the true value of the model, the model parameters of the initial harmonic detection model are adjusted through a gradient descent algorithm, which is conducive to rapid convergence of the model and improves the performance of the model.

[0106] In order to improve the detection performance of the model, in an exemplary embodiment, Figure 4 As shown, S620 includes S622 to S624. Among them:

[0107] S622, based on the error, adjusting the number of harmonics and the initial phase of the harmonics in the activation function of the initial harmonic detection model by a gradient descent algorithm.

[0108] In practical applications, the number of harmonics and the initial phase of harmonics in the activation function of the initial harmonic detection model are adjusted through the minimum mean square error and the gradient descent algorithm. Specifically, the minimum mean square error is:

[0109]

[0110] In the formula, Input to the model.

[0111] Based on inertia algorithm, combined The calculation results are used to adjust the harmonic number and initial phase of harmonics :

[0112]

[0113]

[0114] In the formula, represents partial derivative; Represents the inertia algorithm coefficient.

[0115] S624, based on the error, determine the weight adjustment amount of the input layer and the hidden layer, and the hidden layer and the output layer in the initial harmonic detection model, and adjust the connection weights between the input layer and the hidden layer, and the hidden layer and the output layer based on the weight adjustment amount.

[0116] In practical applications, the connection weights between the output layer and the hidden layer are adjusted according to the gradient descent method, and the weight adjustment between the input layer and the hidden layer is calculated. , and the weight adjustment between the hidden layer and the output layer :

[0117]

[0118]

[0119] After obtaining the weight adjustment amount, the connection weight is updated. The update amount is the sum of the new connection weight and the weight adjustment amount to update the connection weights between each layer.

[0120] In this embodiment, based on the error, the parameters of the activation function of the initial harmonic detection model are adjusted, and the connection weights between the output layer and the hidden layer are adjusted according to the error, which is conducive to rapid convergence of the model and improves the detection performance of the model.

[0121] In order to improve the accuracy of fundamental signal extraction, in an exemplary embodiment, Figure 5 As shown, S220 includes S222 to S228. Among them:

[0122] S222, performing wavelet transform processing on the current signal in the historical current signal sequence based on a preset transformation order step.

[0123] In order to determine the optimal wavelet transform order, the transform order is gradually increased and the transform results are compared to determine that the transform order step is the number of iteratively increased orders.

[0124] In practical applications, a preset transformation order step size is introduced Decompose the historical current signal sequence, such as transforming the order step size The initial transformation order is gradually increased according to the preset transformation order step size, and the historical current signal sequence is processed by wavelet transformation at different orders.

[0125] S224, performing inverse transformation on the current signal after wavelet transformation to obtain a restored signal of the current signal.

[0126] The restored signal may be a signal reconstructed from a signal decomposed by wavelet transform.

[0127] For each different transformation order, the current signal is inversely transformed according to the wavelet coefficients after the wavelet transformation corresponding to the transformation order to obtain a restored signal of the current signal.

[0128] S226, comparing the signal-to-noise ratios of the restored signals after wavelet transform processing at different transform orders.

[0129] In practical applications, the signal-to-noise ratio is calculated for the restored signal after wavelet transform processing under different transform orders:

[0130]

[0131] In the formula, and Represent the original current signal and the restored signal after inverse transformation. Compare the signal-to-noise ratio of the restored signal after wavelet transform processing under different transformation orders.

[0132] S228, determining the transformation order with the largest signal-to-noise ratio as the optimal wavelet transformation order.

[0133] In this embodiment, by comparing the signal-to-noise ratios of the restored signals under different transformation orders, the optimal wavelet transformation order is determined, which is beneficial to improving the accuracy of the extracted fundamental signal and reducing the computational complexity of the wavelet transformation of the current signal.

[0134] Extracting the fundamental wave signal from the current signal, in an exemplary embodiment, S260 includes S262 to S266. Wherein:

[0135] S262 , for each current signal, filter out the wavelet coefficients of the low-frequency signal and the wavelet coefficients of the high-frequency signal in the current signal from the wavelet coefficients.

[0136] S264, performing inverse wavelet transform on the current signal based on the wavelet coefficient of the low-frequency signal to obtain a fundamental wave signal of the current signal.

[0137] S266, performing inverse wavelet transform on the current signal based on the wavelet coefficient of the high-frequency signal to obtain a harmonic signal of the current signal.

[0138] In practical applications, the fundamental signal is usually the low-frequency part of the current signal, and the harmonic signal is usually the high-frequency part of the current signal. Therefore, for each current signal, the approximate coefficients can be screened out as the wavelet coefficients of the low-frequency signal in the current signal, and the detail coefficients can be screened out as the wavelet coefficients of the high-frequency signal in the current signal.

[0139] Perform inverse wavelet transform according to the approximate coefficients to obtain the fundamental signal of the current signal. Perform inverse wavelet transform according to the detail coefficients to obtain the harmonic signal of the current signal.

[0140] In this embodiment, based on the low-frequency and high-frequency wavelet coefficients of the current signal after wavelet transformation, the fundamental signal and harmonic signal of the current signal are extracted by inverse wavelet transformation, which is conducive to constructing training samples based on the extracted signals to train the harmonic detection model.

[0141] In order to make a clearer description of the low voltage area harmonic detection model training method provided by the present application, a specific embodiment is described below, and the specific embodiment includes the following steps:

[0142] S1, obtain the historical current signal sequence of the metering device in the low-voltage area.

[0143] S2, based on the preset transformation order step, the current signal in the historical current signal sequence is processed by wavelet transform, the current signal after wavelet transform is inversely transformed to obtain the restored signal of the current signal, the signal-to-noise ratio of the restored signal after wavelet transform processing under different transformation orders is compared, and the transformation order with the largest signal-to-noise ratio is determined as the optimal wavelet transform order.

[0144] S3, for each current signal, filter out the wavelet coefficients of the low-frequency signal and the wavelet coefficients of the high-frequency signal in the current signal from the approximate coefficients, perform inverse wavelet transform on the current signal based on the approximate coefficients of the low-frequency signal to obtain the fundamental signal of the current signal, perform inverse wavelet transform on the current signal based on the wavelet coefficients of the high-frequency signal to obtain the harmonic signal of the current signal, and obtain a current signal sequence training sample.

[0145] S4, initializing model parameters of a pre-built initial harmonic detection model.

[0146] S5, taking the current signal sequence training sample as input, calling the trained harmonic detection model, predicting the harmonic component of each historical current signal in the historical current signal sequence, and obtaining the predicted value of the harmonic component of each historical current signal.

[0147] S6, for each current signal, determining the error between the predicted value of the harmonic component of the historical current signal and the actual value of the harmonic component.

[0148] S7, based on the error, adjust the number of harmonics and the initial phase of the harmonics in the activation function of the initial harmonic detection model through the gradient descent algorithm, based on the error, determine the weight adjustment amount between the input layer and the hidden layer in the initial harmonic detection model, and adjust the connection weight between the output layer and the hidden layer based on the weight adjustment amount until the preset training end condition is reached to obtain the trained harmonic detection model.

[0149] The low voltage harmonic detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0150] Specifically, the operator may send a low-voltage substation harmonic detection message to the server 104 through the terminal. The server receives the low-voltage substation harmonic detection message, and then obtains the current signal sequence of the metering device of the low-voltage substation. With the current signal sequence as input, the trained harmonic detection model is called to detect the harmonic components in the current signal sequence.

[0151] In an exemplary embodiment, the present application also provides a low voltage area harmonic detection method, comprising the following S700 to S800. Wherein:

[0152] S700, obtaining a current signal sequence of a metering device in a low-voltage area.

[0153] In practical applications, the current signal sequence of the metering device in the low-voltage area can be obtained through a current sensor or a data acquisition system.

[0154] S800, taking the current signal sequence as input, calling the trained harmonic detection model to detect the harmonic components in the current signal sequence, the trained harmonic detection model is trained based on the above-mentioned low-voltage substation harmonic detection model training method.

[0155] In practical applications, the acquired current signal sequence is input into the trained harmonic detection model to detect the harmonic components in the current signal sequence. The harmonic detection model is obtained by training using the steps in any of the above-mentioned low-voltage substation harmonic detection model training method embodiments, and the specific model training process is not repeated here.

[0156] In this embodiment, by obtaining the current signal sequence of the metering device of the low-voltage substation and inputting it into the trained model obtained by the above-mentioned harmonic detection model training method, the harmonic components in the power signal sequence are detected. On the one hand, it can adapt to the harmonic detection under the access of distributed energy to the low-voltage substation, and improve the harmonic detection accuracy under this working condition. On the other hand, the model can not only detect integral harmonics, but also detect non-integral harmonics of electric energy measurement errors, which is conducive to comprehensive harmonic analysis based on the detected harmonic components. Further, it is conducive to taking corresponding measures according to the analysis results to ensure the accuracy and reliability of electric energy metering of distributed energy access to the low-voltage substation.

[0157] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0158] In an exemplary embodiment, Figure 6 As shown, a low voltage area harmonic detection model training device 600 is provided, comprising: a data acquisition module 610, a signal extraction module 620, a parameter initialization module 630, a harmonic prediction module 640, an error determination module 650 and a parameter adjustment module 660, wherein:

[0159] The data acquisition module 610 is used to acquire the current signal sequence of the metering device in the low voltage area.

[0160] The signal extraction module 620 is used to extract the fundamental signal and the harmonic signal of the current signal in the historical current signal sequence through wavelet transformation to obtain a current signal sequence training sample.

[0161] The initialization module 630 is used to initialize the model parameters of the pre-built initial harmonic detection model.

[0162] The harmonic prediction module 640 is used to take the current signal sequence training sample as input, call the initial harmonic detection model, predict the harmonic component of each historical current signal in the historical current signal sequence, and obtain the harmonic component prediction value of each historical current signal.

[0163] The error determination module 650 is used to determine, for each current signal, an error between a predicted value of a harmonic component of the historical current signal and an actual value of the harmonic component.

[0164] The parameter adjustment module 660 is used to adjust the model parameters of the initial harmonic detection model based on the error until a preset training end condition is reached to obtain a trained harmonic detection model.

[0165] In an exemplary embodiment, the signal extraction module 620 is also used to determine the optimal wavelet transform order of the historical current signal sequence; perform wavelet transform on the current signal in the historical current signal sequence according to the optimal wavelet transform order, and decompose the current signal into wavelet coefficients of multiple scales; based on the wavelet coefficients, extract the fundamental signal and harmonic signal of the current signal in the historical current signal sequence.

[0166] In an exemplary embodiment, the parameter adjustment module 660 is further configured to adjust the model parameters of the initial harmonic detection model based on the error by using a gradient descent algorithm.

[0167] In an exemplary embodiment, the parameter adjustment module 660 is also used to adjust the number of harmonics and the initial phase of the harmonics in the activation function of the initial harmonic detection model based on the error through a gradient descent algorithm; determine the weight adjustment amount between the input layer and the hidden layer, and between the hidden layer and the output layer in the initial harmonic detection model based on the error, and adjust the connection weights between the input layer and the hidden layer, and between the hidden layer and the output layer based on the weight adjustment amount.

[0168] In an exemplary embodiment, the signal extraction module 620 is also used to perform wavelet transform processing on the current signal in the current signal sequence based on a preset transformation order step; perform inverse transform on the current signal after wavelet transform processing to obtain a restored signal of the current signal; compare the signal-to-noise ratio of the restored signal after wavelet transform processing under different transformation orders; and determine the transformation order with the largest signal-to-noise ratio as the optimal wavelet transform order.

[0169] In an exemplary embodiment, the signal extraction module 640 is also used to filter out the wavelet coefficients of the low-frequency signal and the wavelet coefficients of the high-frequency signal in the current signal from the wavelet coefficients for each current signal; based on the wavelet coefficients of the low-frequency signal, perform an inverse wavelet transform on the current signal to obtain the fundamental signal of the current signal; based on the wavelet coefficients of the high-frequency signal, perform an inverse wavelet transform on the current signal to obtain the harmonic signal of the current signal.

[0170] Each module in the low voltage area harmonic detection device 600 can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0171] In an exemplary embodiment, Figure 7 As shown, a low voltage area harmonic detection device 700 is provided, comprising a signal acquisition module 710 and a harmonic detection module 720, wherein:

[0172] The signal acquisition module 710 is used to acquire the current signal sequence of the metering device in the low voltage area.

[0173] The harmonic detection module 720 is used to take the current signal sequence as input, call the trained harmonic detection model, and detect the harmonic components in the current signal sequence. The trained harmonic detection model is trained based on the steps in any of the above-mentioned low-voltage substation harmonic detection model training method embodiments.

[0174] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store current signal sequence data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a low-voltage substation harmonic detection model training method and a low-voltage substation harmonic detection method are implemented.

[0175] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0176] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the processor implements any one of the above-mentioned low-voltage substation harmonic detection model training methods and steps in an embodiment of a low-voltage substation harmonic detection method.

[0177] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements any one of the above-mentioned low-voltage substation harmonic detection model training methods and steps in an embodiment of a low-voltage substation harmonic detection method.

[0178] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned low-voltage substation harmonic detection model training methods and a low-voltage substation harmonic detection method embodiments.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0180] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0181] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0182] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A low voltage area harmonic detection model training method, characterized in that: The method comprises: Obtain the historical current signal sequence of the metering device in the low voltage area; Extracting fundamental wave signals and harmonic wave signals of current signals in the historical current signal sequence by wavelet transform to obtain current signal sequence training samples; Initializing model parameters of a pre-built initial harmonic detection model; Taking the current signal sequence training sample as input, calling the initial harmonic detection model, predicting the harmonic component of each historical current signal in the historical current signal sequence, and obtaining the predicted value of the harmonic component of each historical current signal; For each current signal, determining an error between a predicted value of a harmonic component of the historical current signal and an actual value of the harmonic component; Based on the error, the model parameters of the initial harmonic detection model are adjusted until a preset training end condition is reached to obtain a trained harmonic detection model.

2. The method according to claim 1, characterized in that: The extracting of fundamental wave signals and harmonic wave signals of current signals in the historical current signal sequence by wavelet transform comprises: Determining the optimal wavelet transform order of the historical current signal sequence; Performing wavelet transform on the current signal in the historical current signal sequence according to the optimal wavelet transform order, and decomposing the current signal into wavelet coefficients of multiple scales; Based on the wavelet coefficients, a fundamental signal and a harmonic signal of the current signal in the historical current signal sequence are extracted.

3. The method according to claim 2, characterized in that The step of adjusting the connection weight of the initial harmonic detection model based on the error includes: Based on the error, model parameters of the initial harmonic detection model are adjusted through a gradient descent algorithm.

4. The method according to claim 3, characterized in that The adjusting the model parameters of the initial harmonic detection model based on the error by a gradient descent algorithm includes: Based on the error, adjusting the number of harmonics and the initial phase of harmonics in the activation function of the initial harmonic detection model by a gradient descent algorithm; Based on the error, weight adjustment amounts between the input layer and the hidden layer, and between the hidden layer and the output layer in the initial harmonic detection model are determined, and connection weights between the input layer and the hidden layer, and between the hidden layer and the output layer are adjusted based on the weight adjustment amounts.

5. The method according to any one of claims 2 to 4, characterized in that: The determining of the optimal wavelet transform order of the historical current signal sequence comprises: Based on a preset transformation order step, performing wavelet transformation processing on the current signal in the historical current signal sequence; Performing an inverse transformation on the current signal after wavelet transformation to obtain a restored signal of the current signal; Comparing the signal-to-noise ratios of the restored signals after wavelet transform processing at different transform orders; The transform order with the largest signal-to-noise ratio is determined as the optimal wavelet transform order.

6. The method according to claim 5, characterized in that The extracting the fundamental signal and the harmonic signal of the current signal in the historical current signal sequence based on the wavelet coefficients includes: For each current signal, filter out the wavelet coefficients of the low-frequency signal and the wavelet coefficients of the high-frequency signal in the current signal from the wavelet coefficients; Based on the wavelet coefficients of the low-frequency signal, performing an inverse wavelet transform on the current signal to obtain a fundamental wave signal of the current signal; Based on the wavelet coefficients of the high-frequency signal, an inverse wavelet transform is performed on the current signal to obtain a harmonic signal of the current signal.

7. A low voltage area harmonic detection method, characterized in that: The method comprises: Obtaining the current signal sequence of the metering device in the low voltage area; Taking the current signal sequence as input, calling a trained harmonic detection model to detect the harmonic components in the current signal sequence, the trained harmonic detection model is trained based on the low-voltage substation harmonic detection model training method according to any one of claims 1 to 6.

8. A low voltage area harmonic detection device, characterized in that: The device comprises: A data acquisition module, used to acquire the historical current signal sequence of the metering device in the low-voltage area; A signal extraction module, used to extract the fundamental signal and the harmonic signal of the current signal in the historical current signal sequence through wavelet transformation to obtain a current signal sequence training sample; An initialization module, used to initialize model parameters of a pre-built initial harmonic detection model; A harmonic prediction module, used to take the current signal sequence training sample as input, call the initial harmonic detection model, predict the harmonic components of each historical current signal in the historical current signal sequence, and obtain the predicted value of the harmonic components of each historical current signal; An error determination module, used to determine, for each current signal, an error between a predicted value of a harmonic component of the historical current signal and an actual value of the harmonic component; The parameter adjustment module is used to adjust the model parameters of the initial harmonic detection model based on the error until a preset training end condition is reached to obtain a trained harmonic detection model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.