Wideband-domain harmonic power signal measurement method and system based on noise reduction self-coding
Through the method based on noise reduction self-coding, self-supervised learning and transfer learning technology, the noise removal problem in wide-band domain harmonic power signals is solved, and high-precision power measurement and powerful feature extraction capabilities are achieved.
Patent Information
- Application Number
- CN202411636837.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-07
AI Technical Summary
The prior art is difficult to effectively remove noise when processing wide-frequency domain harmonic power signals, resulting in inaccurate measurement, especially in the presence of multiple complex noise sources.
The self-coding method based on noise reduction is adopted, and self-supervised learning and transfer learning technology is used to self-supervised learning through a large amount of labelless data, and the voltage and current waveform features without noise are extracted, and a small amount of labeled data is fine-tuned to enhance the denoising ability of the model.
It realizes the precise extraction of voltage and current waveform features when waveforms are superimposed on environmental noise, improves the accuracy of electrical energy measurement, enhances the feature extraction capability of the model in complex environments, and reduces the computational complexity and storage requirements.
Smart Images

Figure CN119577332A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system detection, and in particular, relates to a wide-frequency domain harmonic power signal measurement method and system based on noise reduction autoencoding. Background Art
[0002] The number of power electronic equipment in the power grid has increased dramatically due to its unique impact, nonlinear and unbalanced characteristics, which not only aggravates the harmonic burden of the power grid, but also causes profound changes in the harmonic characteristics, which are specifically reflected in the significant widening of the harmonic spectrum and the significant increase of harmonic components in the medium and high frequency bands, which puts forward higher requirements for the accuracy of measurement equipment in the power system. Since the components such as sensors and ADC sampling of measurement equipment are affected by the environment or the performance of the device itself, there will be obvious differences before and after the voltage and current waveforms pass through the sampling circuit. Although they have been manually calibrated or the parameters of the components have been adjusted, there are still signal quality problems such as glitches and back grooves. The existence of these problems can easily lead to inaccurate measurement under wide-band harmonic conditions, especially the measurement accuracy of harmonics and interharmonics.
[0003] In the prior art, appropriate denoising methods are selected according to the nature of noise, the characteristics of the signal and the actual application requirements, including traditional filter methods, wavelet transform and machine learning-based methods. Wavelet transform can separate noise and useful signals at different frequency levels by performing multi-layer decomposition of the signal. By thresholding the high-frequency components of the high-frequency level, noise can be effectively removed while retaining the main features of the signal. Wavelet transform has multi-resolution analysis, non-stationary signal processing capabilities, strong denoising performance and computational efficiency. However, the threshold function and decomposition level of the wavelet denoising method are fixed and lack adaptive adjustment capabilities. In different noise environments, parameters need to be adjusted manually. The performance of the wavelet decomposition method depends on the selection of preset thresholds and wavelet bases, and it is difficult to cope with a variety of complex noise sources (such as high-order harmonics, interharmonics and nonlinear noise). In the denoising of power signals, the machine learning method uses the self-learning ability of the algorithm to improve the denoising effect, avoiding the complex preprocessing process of the signal in the traditional filter method and wavelet transform denoising algorithm. The overall structure process is simpler, the network calculation amount is small, and the denoising speed is faster. Although the Noise2Noise algorithm has been improved to handle power line signal noise, the complexity of power line noise may still pose modeling challenges, especially in real environments where the variability and uncertainty of noise sources may affect model performance. In addition, the method relies on sinusoidal wave data for network testing and model verification, which may limit its applicability to actual power line signals. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a wide-frequency domain harmonic power signal measurement method and system based on noise reduction autoencoder, which uses self-supervised learning technology and adopts noise reduction autoencoder network to learn through a large amount of unlabeled data in the case of waveform superimposed with environmental noise, and can effectively extract the voltage and current waveform characteristics without noise; adopts transfer learning method, through a small number of labeled voltage and current samples before and after the sampling circuit, fine-tunes the pre-training model, so that the model has stronger denoising ability in the real environment. Removing the noise in the waveform improves the accuracy of electric energy metering, and solves the signal quality problem caused by the influence of the environment or its own performance on components such as sensors and ADC sampling.
[0005] The present invention adopts the following technical solution.
[0006] The present invention proposes a wide-frequency domain harmonic power signal measurement method based on noise reduction autoencoding, and the wide-frequency domain harmonic power signal measurement device includes a meter cabinet and an electric energy meter. The original signals of voltage and current collected by the meter cabinet are output as voltage and current measurement signals through the electric energy meter; including:
[0007] The original signals of voltage and current collected by the meter cabinet are obtained, and noise and random outliers are added to the original signals of voltage and current to form first input data. The first input data and the original signals of voltage and current constitute a first training data set to perform the first training on the denoising autoencoder. When the first training meets the convergence condition, the number of parallel data channels of the denoising autoencoder and the size of the convolution kernel in each convolution layer are determined;
[0008] The voltage and current measurement signals output by the electric energy meter are obtained, and the voltage and current measurement signals are processed by the first trained denoising autoencoder to obtain second input data. The second input data and the voltage and current measurement signals constitute a second training data set to train the first trained denoising autoencoder for the second time. During the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization. The weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization. The historical data of the power system constitute a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain the first calibration output data and the second calibration output data respectively. When the convergence condition is met, the denoising autoencoder after integerization is used as the denoising autoencoder trained for the second time.
[0009] According to the voltage and current measurement signals output by the electric energy meter, the noise reduction autoencoder trained for the second time is used to obtain the wide-frequency domain harmonic power signal measurement results.
[0010] Preferably, the distribution probability of noise and random abnormal values in the original signals of voltage and current is determined based on the distribution probability of historical faults in the power system.
[0011] Preferably, the denoising autoencoder comprises an encoder and a decoder; the encoder maps the original signals, noise and random outliers of voltage and current to latent representations, using the measured signals of voltage and current as labels, and the decoder reconstructs output data from the latent representations.
[0012] Preferably, the encoder includes a plurality of parallel data channels; the number of cycles in the first input data is the number of parallel data channels, and the shape of the first input data is processed into the shape of the input data of each parallel data channel; wherein the shape of the first input data is batch×N×1, and the shape of the input data of each parallel data channel is batch is the batch, N is the number of sampling points, and τ is the number of parallel data channels.
[0013] Preferably, the encoder comprises a plurality of convolutional layers; the size of the convolution kernel in each convolutional layer decreases on the path from input to output;
[0014] The decoder consists of multiple convolutional layers; the size of the convolution kernel in each convolutional layer increases on the path from input to output.
[0015] Preferably, the second input data obtained by processing the voltage and current measurement signals using the first trained denoising autoencoder and the voltage and current measurement signals output by the electric energy meter each account for 50% of the second training data set.
[0016] Preferably, during the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate is optimized is used as the denoising autoencoder before integerization, including: taking 10% of the learning rate determined in the first training as the initial value of the learning rate in the second training, and adaptively adjusting the learning rate of the denoising autoencoder on the basis that the structure of the denoising autoencoder trained in the first training remains unchanged; and using the denoising autoencoder after the learning rate is optimized as the denoising autoencoder before integerization;
[0017] The weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization, including: converting the optimized values of the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization from 32-bit floating point numbers to 8-bit integers.
[0018] Preferably, the convergence conditions of the first training include:
[0019] The mean square error between input data and output data is no greater than 0.03.
[0020] Preferably, the convergence condition of the second training includes: the mean square error between the first calibration output data and the second calibration output data is not greater than 0.03.
[0021] Preferably, the second trained denoising autoencoder is converted into TensorFlowLite format.
[0022] The present invention also proposes a wide-frequency domain harmonic power signal measurement system based on noise reduction autoencoding, wherein the wide-frequency domain harmonic power signal measurement device comprises a meter cabinet and an electric energy meter, wherein the original signals of voltage and current collected by the meter cabinet are output as voltage and current measurement signals through the electric energy meter; the system comprises:
[0023] The model training module is used to obtain the original signals of voltage and current collected by the meter cabinet, and add noise and random outliers to the original signals of voltage and current to form the first input data. The first input data and the original signals of voltage and current constitute the first training data set to perform the first training on the denoising autoencoder. When the first training meets the convergence condition, the number of parallel data channels of the denoising autoencoder and the size of the convolution kernel in each convolution layer are determined; the measurement signals of voltage and current output by the electric energy meter are obtained, and the denoising autoencoder trained for the first time is used to process the measurement signals of voltage and current to obtain the second input data. The second input data and the measurement signals of voltage and current constitute the second training data set. The denoising autoencoder trained for the first time is trained for the second time according to the data set; during the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization; the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization; the historical data of the power system constitute a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain the first calibration output data and the second calibration output data respectively; when the convergence condition is met, the denoising autoencoder after integerization is used as the denoising autoencoder trained for the second time;
[0024] The signal measurement module is used to obtain the wide-frequency domain harmonic power signal measurement result by using the noise reduction autoencoder trained for the second time according to the voltage and current measurement signals output by the electric energy meter.
[0025] A terminal comprises a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0026] A computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.
[0027] The beneficial effects of the present invention are as follows:
[0028] The method proposed in the present invention applies self-supervised learning to electric energy metering, and uses a denoising autoencoder network to perform self-supervised learning through a large amount of unlabeled data. It can accurately extract pure voltage and current waveform features when the waveforms are superimposed with environmental noise. This method reduces the dependence on manually labeled data and enhances the model's feature extraction capability in complex environments.
[0029] The method proposed in the present invention fine-tunes the model with a small amount of labeled data. The pre-trained denoising autoencoder is fine-tuned through a small amount of real labeled voltage and current sampling data, so that the model can adapt to the specific noise pattern in the actual circuit, thereby improving the denoising effect in the real environment and ensuring higher accuracy and robustness.
[0030] The method proposed in the present invention implements full integer quantization (Fully Integer Quantization). Full integer quantization is used in the model reasoning process to convert both model weights and activation values into integer representations, so as to significantly reduce the computational complexity and storage requirements, thereby achieving efficient edge device deployment and improving the reasoning speed while ensuring denoising performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of a wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding proposed by the present invention;
[0032] Figure 2 is a schematic diagram of a wide frequency domain harmonic power signal measurement process in an embodiment of the present invention;
[0033] Figure 3 Schematic diagram of the size of convolution kernels of each convolution layer in the encoder in an embodiment of the present invention;
[0034] Figure 4 Schematic diagram of the size of convolution kernels of each convolution layer in the decoder in an embodiment of the present invention;
[0035] Figure 5 It is a schematic diagram of an application scenario for wide-frequency domain harmonic power signal measurement in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.
[0037] A denoising autoencoder is an unsupervised learning algorithm for denoising and restoring data based on an encoder-decoder neural network architecture. The denoising autoencoder removes noise and restores data by introducing noise into the input data and attempting to restore the original data from the noisy data. By introducing noise into the training data, the network learning is made robust to the input noise, so that the model can have a good denoising effect. When the denoising autoencoder is used in load identification of a power system, in order to obtain more reliable data features, multiple denoising autoencoders need to be stacked to form a multi-layer network, and the supervision and fine-tuning link of the BP neural network is added to supervise and fine-tune the feature information identified by the stacked DAE in real time. It can be seen that the model is complex and the amount of calculation is large when the denoising autoencoder is used in the power system. Moreover, since the cycles of the power signal are closely related, especially under the global trend of the power system, it is more necessary to pay attention to the relative changes between the cycles and the change trend across cycles, which makes it difficult to coordinate the learning rate and model convergence, which directly affects the efficiency of model training and the final performance. Therefore, the present invention proposes a wide-band harmonic power signal measurement method based on a denoising autoencoder, such as Figure 1 As shown, including:
[0038] Step 1, obtain the original signals of voltage and current collected by the meter cabinet, and add noise and random outliers to the original signals of voltage and current to form the first input data. The first input data and the original signals of voltage and current constitute the first training data set to perform the first training on the denoising autoencoder. When the first training meets the convergence condition, the number of parallel data channels of the denoising autoencoder and the size of the convolution kernel in each convolution layer are determined.
[0039] Embodiment Summary: A wide-frequency domain harmonic power signal measuring device comprises a meter cabinet and an electric energy meter, and the original signals of voltage and current collected by the meter cabinet are output as voltage and current measurement signals through the electric energy meter; Figure 2The middle is an electric energy meter. The waveform on the left side of the electric energy meter is the original signal of voltage and current collected by the metering cabinet, which has no burr phenomenon. However, after passing through the sampling circuit of the electric energy meter, the waveform on the right side of the electric energy meter, i.e., the measurement signal of voltage and current, is obtained. It can be seen that there are obvious burrs, back grooves and other signal quality problems in the inner area of the circle. The waveform output by such an electric energy meter will bring many error effects in subsequent use. The present invention applies the noise reduction autoencoder to the processing of the output waveform of the electric energy meter, so as to obtain an electric power signal that meets the needs of subsequent applications.
[0040] In the embodiment, a meter cabinet is used to conduct experiments to simulate a large amount of waveform data of various harmonics and interharmonic aliasing and different small frequency deviations under nonlinear load conditions as the original signals of voltage and current collected by the meter cabinet.
[0041] In the first training phase, two strategies are adopted to simulate the noise environment in actual applications to enhance the robustness of the denoising encoder, specifically:
[0042] 1) In the first training phase, noise is introduced into the input data. Common noise types include but are not limited to Gaussian noise and salt and pepper noise. By adding noise, the noise environment in actual applications can be simulated to improve the robustness of the encoder.
[0043] 2) In the first training phase, random outliers are introduced into the input data to simulate sudden failure events that may occur in the actual environment.
[0044] Based on the distribution probability of historical faults in the power system, the distribution probability of noise and random anomalies in the original signals of voltage and current is determined.
[0045] The first input data is constructed by adding noise and random outliers to the original signals of voltage and current.
[0046] The denoising autoencoder includes an encoder and a decoder; after adding noise and random outliers, the encoder maps the noise data and random outliers to a latent representation, and with the help of the decoder, reconstructs a result similar to the original data. Therefore, the goal of the denoising autoencoder is to restore the original data while minimizing noise interference. The original signal waveforms of the voltage and current with noise and random outliers are used as the first input data, and the original signal waveforms of the voltage and current without noise and random outliers are used as the target output data of the first training stage, i.e., the label, so that the first input data and the original signals of the voltage and current constitute the first training data set for the first training of the denoising autoencoder.
[0047] Specifically, the encoder includes a plurality of parallel data channels; the number of cycles in the first input data is the number of parallel data channels, and the shape of the first input data is processed into the shape of input data of each parallel data channel, thereby realizing parallel processing of multiple data channels; wherein the shape of the first input data is batch×N×1, and the shape of the input data of each parallel data channel is batch× N ×τ, batch is the batch, N is the number of sampling points,
[0048] ττ is the number of parallel data channels; in the embodiment, the sampling frequency is 12.8kHz and the working frequency is 50Hz as the basic data, and the sampling data of 5 cycles are taken, and each cycle has 256 sampling points. Therefore, the first input data is the original signal of voltage and current with added noise and random outliers of 1280 sampling points. The shape of the first input data is 1×1280×1, wherein the first "1" represents the batch, "1280" represents the number of sampling points, and the second "1" represents that there is only one data channel; the shape of the input data of each parallel data channel is 1×256×5, wherein "1" represents the batch, "256" represents the number of sampling points corresponding to each parallel data channel, and "5" represents that there are 5 Parallel data channels, each parallel data channel corresponds to a cycle; based on the structural requirements of multiple parallel data channels, the first input data is reorganized to obtain a new data shape. In the first training proposed by the present invention, each parallel data channel corresponds to a cycle, so that the machine learning model processes information of multiple cycles at the same time, and avoids the inefficiency of model training and processing real-time data by directly using long sequences. On the basis of better capturing the cross-cycle change trend, such a parallel data channel structure helps the model learn the relative changes between different cycles and the cross-cycle change trend, enhances the effective extraction of correlation features between adjacent cycles, and improves the accuracy of model noise recognition.
[0049] Specifically, the encoder further includes a plurality of convolutional layers; on the path from input to output, the size of the convolution kernel in each convolutional layer decreases; in an embodiment, as Figure 3As shown in the figure, the encoder uses convolution kernels of different sizes, such as 1×7, 1×5, and 1×3, from front to back, aiming to build an architecture that is both efficient and can effectively capture multi-level visual information. First, the use of convolution kernels of various sizes allows the network to capture feature information of different sizes at the same time, thereby improving the network's ability to express multi-scale features. Secondly, from shallow to deep layers, the size of the convolution kernel gradually decreases, allowing the network to first focus on a wide range of information, and then gradually focus on finer local features. This hierarchical learning process helps to build rich feature representations from global to local. Finally, the combination of convolution kernels of different sizes can improve the robustness of the model to different types of noise. Larger convolution kernels help smooth the input data and suppress random noise; while smaller convolution kernels retain more detailed information.
[0050] In the present invention, a larger convolution kernel (such as a convolution kernel size of 1×7) can capture macroscopic features in a wider range, which is crucial for understanding the overall structure of the voltage and current waveforms, and achieves the effect of 1 / 4 downsampling in the first layer; a medium-sized convolution kernel (such as a convolution kernel size of 1×5) can capture local details in the middle layer, which helps to identify important patterns in the voltage and current waveforms, and achieves the effect of 1 / 2 downsampling in the second layer; a smaller-sized convolution kernel (such as a convolution kernel size of 1×3) focuses on the high-frequency details of the deepest layer, further enhancing the fineness of the features, and achieving the effect of 1 / 2 downsampling in the third layer. As the size of the convolution kernel in each convolution layer decreases, the receptive field is gradually refined; from the shallow layer to the deep layer, the size of the convolution kernel gradually decreases, so that the network can first focus on a wide range of information, and then gradually focus on finer local features. This hierarchical learning process helps to build a rich feature representation from the global to the local. Although a larger-sized convolution kernel can capture a wider range of information, it will bring a higher computational cost; by using a smaller-sized convolution kernel in the later stage of the network, the computational burden can be reduced while maintaining good performance. Multi-scale convolution kernel design can also effectively reduce the number of model parameters, reduce the risk of overfitting, and improve overall computational efficiency.
[0051] In addition, the combination of convolution kernels of different sizes can improve the robustness of the model to different types of noise. Larger convolution kernels help smooth the input data and suppress random noise, while smaller convolution kernels retain more detailed information. Through multi-scale feature extraction, the model can better adapt to different types of electricity meters and application scenarios, thereby improving its generalization ability, which is beneficial for the decoder to improve its restoration ability during data reconstruction.
[0052] In an embodiment, the shape of the input data of each parallel data channel in the encoder is 1×256×5, and the shape of the output data obtained after the input data passes through convolutional layers of different scales in the encoder is 1×16×128, wherein "1" represents the batch, "16" represents the feature dimension of the output data, and "128" represents the length of the encoded data.
[0053] The decoder maps the latent representation of the encoder output back to the original input space and tries to restore the original data. The goal of the decoder is to minimize the interference of noise and restore the result similar to the original data. The decoder consists of multiple convolutional layers; the size of the convolution kernel in each convolutional layer increases on the path from input to output, such as Figure 4 As shown in the figure, a smaller convolution kernel (such as a transposed convolution kernel size of 1×3) achieves the effect of upsampling the first layer by 1 / 2; a medium-sized convolution kernel (such as a transposed convolution kernel size of 1×5) achieves the effect of upsampling the second layer by 1 / 2; a larger-sized convolution kernel (such as a transposed convolution kernel size of 1×7) achieves the effect of upsampling the third layer by 1 / 4. In the embodiment, the shape of the output data obtained after the convolution layers of different scales in the decoder is 1×256×5.
[0054] The input data shape and output data shape corresponding to each convolutional layer in the embodiment of the present invention are detailed in Table 1:
[0055] Table 1 Input data shape and output data shape corresponding to each convolutional layer
[0056] Layer Input data shape Output data shape Convolution kernel 1: conv1d_1 (None,256,5) (None,64,32) Convolution kernel 2: conv1d_2 (None,64,32) (None,64,32) Convolution kernel 3: conv1d_3 (None,64,32) (None,32,64) Convolution kernel 4: conv1d_4 (None,3264) (None,32,64) Convolution kernel 5: conv1d_5 (None,3264) (None,16,128) Transposed convolution kernel 1: conv1dTranspose_1 (None,16,128) (None,3264) Transposed convolution kernel 2: conv1dTranspose_2 (None,3264) (None,3264) Transposed convolution kernel 3: conv1dTranspose_3 (None,3264) (None,64,32) Transposed convolution kernel 4: conv1dTranspose_4 (None,64,32) (None,64,32) Transposed convolution kernel 5: conv1dTranspose_5 (None,64,32) (None,256,5)
[0057] Table 1 shows general expressions for input data shapes and output data shapes, using “None” to represent batches.
[0058] In the present invention, the end-to-end method of making full use of the denoising autoencoder can directly learn the mapping from noisy signals to clean signals, avoiding the manual feature engineering in the traditional method. The key to training the denoising autoencoder is to find a suitable method to balance noise and reconstruction error. Therefore, the present invention uses the mean square error to minimize the reconstruction error and the difference between the input data X and the restored data X'. In the embodiment, the condition for the first training convergence is that the mean square error between the input data and the output data is not greater than 0.03.
[0059] Step 2, obtaining the voltage and current measurement signals output by the electric energy meter, and using the first trained denoising autoencoder to process the voltage and current measurement signals to obtain second input data, the second input data and the voltage and current measurement signals constitute a second training data set to perform a second training on the first trained denoising autoencoder; during the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate is optimized is used as the denoising autoencoder before integerization; the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed as integers to obtain the denoising autoencoder after integerization; the historical data of the power system constitute a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain the first calibration output data and the second calibration output data respectively; when the convergence condition is met, the denoising autoencoder after integerization is used as the denoising autoencoder trained for the second time.
[0060] like Figure 5 As shown, in the application scenario of wide-frequency domain harmonic power signal measurement, the purpose of training the denoising autoencoder trained for the first time for the second time is to solve the signal quality problems such as burrs and grooves existing in the electric energy meter; therefore, the measurement signals of the voltage and current output by the electric energy meter are obtained, and the measurement signals of the voltage and current are processed to remove noise and outliers to form the second input data, and the measurement signals of the voltage and current are used as labels to train the denoising autoencoder trained for the first time for the second time.
[0061] In the embodiment, a meter cabinet experiment is used to simulate a large number of waveform data with various harmonics and interharmonics aliasing and different small frequency deviations under nonlinear load conditions, and these waveform data are output as voltage and current measurement signal waveforms after passing through the electric energy meter. Among them, the second input data obtained by processing the voltage and current measurement signals using the first trained denoising autoencoder is the voltage and current measurement signal waveform without signal quality problems, and the voltage and current measurement signal waveforms with signal quality problems and the voltage and current measurement signal waveforms without signal quality problems output after the electric energy meter each account for 50% of the second training data set.
[0062] In the second training phase, the structure of the denoising autoencoder trained in the first time is kept unchanged, that is, the number of parallel data channels and the size of the convolution kernel in each convolution layer remain unchanged, making full use of the feature representation learned in the pre-training phase, avoiding training from scratch, and saving computing resources and time.
[0063] During the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization, including:
[0064] 10% of the learning rate determined in the first training is used as the initial value of the learning rate in the second training. On the basis of keeping the structure of the denoising autoencoder trained in the first training unchanged, the learning rate of the denoising autoencoder is adaptively adjusted; the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization;
[0065] In the embodiment, in order to ensure that the fine-tuning of the model parameters is more refined during the fine-tuning process, a lower learning rate is required. The lower learning rate can prevent the model parameters from changing drastically and avoid a destructive impact on the features learned in the first training phase. Generally, the learning rate can be set to one tenth or less of the learning rate in the pre-training phase, for example, from 0.001 to 0.0001.
[0066] The weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization, including:
[0067] The optimized values of weights and activation values corresponding to neurons in each convolutional layer of the denoising autoencoder before integerization are converted from 32-bit floating point numbers (float32) to 8-bit integers (int8) to obtain the denoising autoencoder after integerization;
[0068] In the process of integerization, all operations of the denoising autoencoder are converted to integer execution. This conversion can significantly reduce the amount of calculation and memory usage during model inference, greatly reducing the model's storage space requirements and computing resource consumption. This process is particularly important because the target device is usually an embedded system or edge device with limited computing power.
[0069] 3) The historical data of the power system is used to form a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain the first calibration output data and the second calibration output data respectively; when the convergence condition is met, the denoising autoencoder after integerization is used as the second trained denoising autoencoder;
[0070] The convergence condition of the second training includes: the mean square error between the first calibration output data and the second calibration output data is not greater than 0.03.
[0071] During the integerization process, the calibration dataset is used to perform precision analysis on the model’s weights and activations to ensure that the quantized model is as close as possible in accuracy to the denoising autoencoder using floating point numbers before integerization.
[0072] Furthermore, after the integerization is completed, the denoising autoencoder trained for the second time is converted into the TensorFlowLite format so that it can run efficiently on mobile devices, microcontrollers and other low-power devices. In the embodiment, an on-site configuration combined with an electric energy meter is realized.
[0073] The storage requirements of the integerized model are greatly reduced, making it more suitable for deployment on resource-constrained devices. Since integer operations are faster, the inference speed of the integerized model is significantly improved, meeting the requirements of real-time applications. In embedded systems, integerized models can significantly reduce the power consumption of devices, thereby extending the battery life of devices. Through integerization after learning rate optimization, the model not only maintains a high level of accuracy, but also runs efficiently in actual deployment, greatly improving the practicality and reliability of the system in various application scenarios.
[0074] Step 3: Based on the voltage and current measurement signals output by the electric energy meter, the noise reduction autoencoder trained for the second time is used to obtain the wide-frequency domain harmonic power signal measurement results.
[0075] The present invention also proposes a wide-frequency domain harmonic power signal measurement system based on noise reduction autoencoding, wherein the wide-frequency domain harmonic power signal measurement device comprises a meter cabinet and an electric energy meter, wherein the original signals of voltage and current collected by the meter cabinet are output as voltage and current measurement signals through the electric energy meter; the system comprises:
[0076] The model training module is used to obtain the original signals of voltage and current collected by the meter cabinet, and add noise and random outliers to the original signals of voltage and current to form the first input data. The first input data and the original signals of voltage and current constitute the first training data set to perform the first training on the denoising autoencoder. When the first training meets the convergence condition, the number of parallel data channels of the denoising autoencoder and the size of the convolution kernel in each convolution layer are determined; the measurement signals of voltage and current output by the electric energy meter are obtained, and the denoising autoencoder trained for the first time is used to process the measurement signals of voltage and current to obtain the second input data. The second input data and the measurement signals of voltage and current constitute the second training data set. The denoising autoencoder trained for the first time is trained for the second time according to the data set; during the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization; the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization; the historical data of the power system constitute a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain the first calibration output data and the second calibration output data respectively; when the convergence condition is met, the denoising autoencoder after integerization is used as the denoising autoencoder trained for the second time;
[0077] The signal measurement module is used to obtain the wide-frequency domain harmonic power signal measurement result by using the noise reduction autoencoder trained for the second time according to the voltage and current measurement signals output by the electric energy meter.
[0078] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0079] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0080] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0081] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A wide-frequency domain harmonic power signal measurement method based on noise reduction autoencoding, wherein the wide-frequency domain harmonic power signal measurement device comprises a meter cabinet and an electric energy meter, and the original signals of voltage and current collected by the meter cabinet are output as voltage and current measurement signals through the electric energy meter; characterized in that: include: The original signals of voltage and current collected by the meter cabinet are obtained, and noise and random outliers are added to the original signals of voltage and current to form first input data. The first input data and the original signals of voltage and current constitute a first training data set to perform the first training on the denoising autoencoder. When the first training meets the convergence condition, the number of parallel data channels of the denoising autoencoder and the size of the convolution kernel in each convolution layer are determined; Acquire the voltage and current measurement signals output by the electric energy meter, and use the first trained denoising autoencoder to process the voltage and current measurement signals to obtain second input data, the second input data and the voltage and current measurement signals constitute a second training data set to perform a second training on the first trained denoising autoencoder; During the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization; the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization; The historical data of the power system is used to form a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain first calibration output data and second calibration output data respectively; When the convergence condition is met, the integerized denoising autoencoder is used as the second trained denoising autoencoder; According to the voltage and current measurement signals output by the electric energy meter, the noise reduction autoencoder trained for the second time is used to obtain the wide-frequency domain harmonic power signal measurement results.
2. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1 is characterized in that: Based on the distribution probability of historical faults in the power system, the distribution probability of noise and random anomalies in the original signals of voltage and current is determined.
3. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1 is characterized in that: The denoising autoencoder includes an encoder and a decoder; the encoder maps the original signals, noise and random outliers of voltage and current to latent representations, with the measured signals of voltage and current as labels, and the decoder reconstructs the output data from the latent representations.
4. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 3 is characterized in that: The encoder includes a plurality of parallel data channels; the number of cycles in the first input data is the number of parallel data channels, and the shape of the first input data is processed into the shape of the input data of each parallel data channel; wherein the shape of the first input data is batch×N×1, and the shape of the input data of each parallel data channel is batch is the batch, N is the number of sampling points, and τ is the number of parallel data channels.
5. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 3 is characterized in that: The encoder consists of multiple convolutional layers; the size of the convolution kernel in each convolutional layer decreases along the path from input to output; The decoder consists of multiple convolutional layers; the size of the convolution kernel in each convolutional layer increases on the path from input to output.
6. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1 is characterized in that: The second input data obtained by processing the voltage and current measurement signals using the first trained denoising autoencoder and the voltage and current measurement signals output by the electric energy meter each account for 50% of the second training data set.
7. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1 is characterized in that: During the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate is optimized is used as the denoising autoencoder before integerization, including: taking 10% of the learning rate determined in the first training as the initial value of the learning rate in the second training, and adaptively adjusting the learning rate of the denoising autoencoder on the basis that the structure of the denoising autoencoder trained in the first training remains unchanged; and using the denoising autoencoder after the learning rate is optimized as the denoising autoencoder before integerization; The weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization, including: converting the optimized values of the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization from 32-bit floating point numbers to 8-bit integers.
8. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1 is characterized in that: The convergence conditions for the first training include: The mean square error between input data and output data is no greater than 0.
03.
9. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1 is characterized in that: The convergence condition of the second training includes: the mean square error between the first calibration output data and the second calibration output data is not greater than 0.
03.
10. The wide frequency domain harmonic power signal measurement method based on noise reduction autoencoding according to claim 1, characterized in that: The second trained denoising autoencoder is converted to TensorFlow Lite format.
11. A wide-frequency domain harmonic power signal measurement system based on noise reduction autoencoding, the wide-frequency domain harmonic power signal measurement device includes a meter cabinet and an electric energy meter, the original signals of voltage and current collected by the meter cabinet are output as voltage and current measurement signals through the electric energy meter; characterized in that, include: A model training module is used to obtain the original signals of voltage and current collected by the meter cabinet, and add noise and random abnormal values to the original signals of voltage and current to form a first input data. The first input data and the original signals of voltage and current constitute a first training data set to perform a first training on the denoising autoencoder. When the first training meets the convergence condition, the number of parallel data channels of the denoising autoencoder and the size of the convolution kernel in each convolution layer are determined; Acquire the voltage and current measurement signals output by the electric energy meter, and use the first trained denoising autoencoder to process the voltage and current measurement signals to obtain second input data, the second input data and the voltage and current measurement signals constitute a second training data set to perform a second training on the first trained denoising autoencoder; During the second training process, the learning rate of the denoising autoencoder is adaptively adjusted, and the denoising autoencoder after the learning rate optimization is used as the denoising autoencoder before integerization; the weights and activation values corresponding to the neurons of each convolutional layer in the denoising autoencoder before integerization are processed into integers to obtain the denoising autoencoder after integerization; The historical data of the power system is used to form a calibration data set, and the denoising autoencoder before integerization and the denoising autoencoder after integerization are used to obtain the first calibration output data and the second calibration output data respectively; when the convergence condition is met, the denoising autoencoder after integerization is used as the denoising autoencoder trained for the second time; The signal measurement module is used to obtain the wide-frequency domain harmonic power signal measurement result by using the noise reduction autoencoder trained for the second time according to the voltage and current measurement signals output by the electric energy meter.
12. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.