Harmonic voltage data super-resolution sensing method and device based on Lmla-GAN
By combining the Lmla-GAN generator and discriminator, and utilizing deep residual networks and multi-scale linear attention mechanisms, the problem of low resolution of harmonic voltage data is solved, achieving efficient high-resolution reconstruction and improving the analysis and management capabilities of power systems.
Patent Information
- Application Number
- CN202511708281.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-17
AI Technical Summary
Existing harmonic voltage data has low resolution, making it difficult to meet the needs of accurate analysis in power systems. Traditional super-resolution techniques are rarely used in power data processing, and there is a lack of effective high-resolution reconstruction methods.
A super-resolution sensing method for harmonic voltage data based on Lmla-GAN is adopted. By combining the generator G and the discriminator D, pseudo data is generated using a deep residual network and a multi-scale linear attention mechanism. The data distribution is learned through adversarial training to generate high-resolution harmonic voltage signals.
This technology enables efficient reconstruction of high-resolution harmonic voltage signals from low-resolution data, improving the accuracy and reliability of data analysis, preserving the high-frequency components of the signal, and providing support for the stable operation and efficient management of power systems.
Smart Images

Figure CN121542569A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power big data processing technology, and in particular to a method and device for super-resolution sensing of harmonic voltage data based on Lmla-GAN. Background Technology
[0002] In the field of power big data processing technology, super-resolution sensing of harmonic voltage data is a key technology. It involves recovering high-resolution voltage signals from low-resolution power data, which is of great significance for power system stability analysis, fault diagnosis, and energy efficiency management. The following is a detailed explanation of the background of this technology: Power systems generate massive amounts of data, including real-time measurements of parameters such as voltage, current, and power. This data is crucial for the operation and maintenance of power systems, enabling the prediction of electricity demand, optimization of grid operation, improvement of energy efficiency, and detection and prevention of potential faults. However, due to technological limitations and cost considerations, traditional power data acquisition systems often provide only low-resolution data, which limits the depth and breadth of data analysis.
[0003] Harmonic voltage is a crucial parameter in power systems, reflecting the degree of voltage waveform distortion. The presence of harmonics can affect the efficiency and lifespan of power equipment, and may even lead to equipment damage. Therefore, accurate analysis of harmonic voltage data is an important task in power system management. However, due to limitations in data acquisition, existing harmonic voltage data often has low resolution, making it difficult to meet the needs of precise analysis.
[0004] Super-resolution technology aims to recover high-resolution signals from low-resolution data. While significant progress has been made in image processing, its application in power data processing is relatively new. Super-resolution technology allows for the recovery of more detailed information from existing low-resolution power data, thereby improving the accuracy and reliability of data analysis.
[0005] Super-resolution technology initially referred to techniques that could improve the resolution of optical imaging systems. Now, it generally refers to methods that can process single or multiple low-resolution images to convert them into high-resolution images. Based on current research and the application of related methods, early image super-resolution sensing can be divided into interpolation-based, reconstruction-based, and learning-based methods. Interpolation-based methods effectively utilize the correlation between adjacent pixels in the original image to achieve image super-resolution sensing. This method can achieve good results even with insufficient training samples. Reconstruction-based methods model the acquisition process of low-resolution images, constructing prior constraints for the super-resolution image, transforming super-resolution sensing into a cost function optimization with constraints, and converting an ill-conditioned problem into a well-conditioned one.Artificially defined smoothness constraints on super-resolution images are typically considered prior knowledge. With the advent of convolutional neural networks (CNNs), deep learning-based image super-resolution sensing can adaptively learn deep image features from the training set. Super-Resolution Convolutional Neural Network (SRCNN) is a simple algorithm, but it cannot retain many high-frequency details. Subsequent advancements, such as Deep Residual Network Super-Resolution, Enhanced Deep Super-Resolution (EDSR), Deep Recursive Convolutional Network (DRCN), and Deep Recursive Convolutional Network (DRRN), addressed the need for multi-scale super-resolution sensing and achieved good reconstruction performance with fewer parameters. Later advancements included Densely Connected Convolutional Network (DenseNet), Residual Dense Network (RDN), and Generative Adversarial Network (GAN). Generative adversarial networks (GANs) combining receptive field blocks (RFB-GAN) and other technologies have shown progressively improved image super-resolution perception performance at large magnification scales. Furthermore, new neural network structures have emerged, such as Adaptive Deep Depth Regression (ADDR) and Cross Multi-Path Integration (CROSS-MPI), improving super-resolution networks in terms of algorithm energy consumption, speed, and the inability to handle arbitrary magnification scales. However, analysis of existing literature and application results reveals a limited number of research findings specifically targeting power quality harmonic super-resolution perception.
[0006] With the development of big data technology, the power industry is increasingly utilizing it to optimize power grid operation and management. Against this backdrop, super-resolution sensing methods for harmonic voltage data have become an important research direction. This method can effectively improve the resolution of power data, providing support for the stable operation and efficient management of the power system. Summary of the Invention
[0007] The purpose of this invention is to provide a method and device for super-resolution sensing of harmonic voltage data based on Lmla-GAN, which enables effective up-frequency reconstruction of low-frequency data.
[0008] The objective of this invention can be achieved through the following technical solutions: A super-resolution sensing method for harmonic voltage data based on Lmla-GAN includes the following steps: The low-resolution harmonic voltage signal is acquired, converted into a low-resolution image, input into a pre-trained Lmla-GAN-based super-resolution reconstruction model for image reconstruction, outputs a super-resolution image, and then converts it back into a super-resolution harmonic voltage signal. The Lmla-GAN-based super-resolution reconstruction model includes a generator G and a discriminator D. During training, the generator G combines a deep residual network structure with a multi-scale linear attention mechanism module to generate pseudo data. The discriminator D introduces a dual attention module to distinguish between the pseudo data and the corresponding real data.
[0009] Furthermore, the training steps of the Lmla-GAN-based super-resolution reconstruction model include: The high-resolution harmonic voltage signal collected within the first set time interval is acquired, preprocessed, and converted into a two-dimensional high-resolution image as real data. The preprocessed harmonic voltage signal is downsampled to obtain a low-resolution harmonic voltage signal, which is then converted into a two-dimensional low-resolution image. This image is combined with the high-resolution image to form a dataset, which is then divided into a training set and a test set. An Lmla-GAN is constructed and trained using the training set to obtain a super-resolution reconstruction model based on Lmla-GAN.
[0010] Furthermore, the preprocessing steps include: Based on the acquired high-resolution harmonic voltage signal, empty and invalid data are first removed, and then normalization is performed using the max-min normalization method to complete the preprocessing process.
[0011] Furthermore, the step of generator G generating pseudo-data includes: Using a low-resolution image as input, upsampling is performed using micro-stride convolution to extract initial features. Normalization is performed at each layer, and the intermediate layers are activated using a dynamically learnable linear rectified unit function (AReLU). The AReLU function is a combination of the ELSA attention mechanism and the ReLU function. The ELSA attention mechanism is expressed as follows: , The ReLU function is expressed as: , In the formula, The output of the ELSA attention mechanism It is a piecewise function. For input elements, θ ={ α , β} represents learnable parameters. The function is used to restrict input variables. It is the sigmoid activation function. It is the ReLU activation function; The linear rectifier unit function AReLU is expressed as: , In the formula, Use the AReLU activation function; The linear rectified unit function AReLU uses an asymmetric gradient scaling mechanism to scale the gradient, which is expressed as: , Based on the multi-scale linear attention mechanism module, a linear transformation is first performed using a linear layer to obtain vectors of value Q, key K, and value V, respectively expressed as: Q = xW Q K= xW k V= xWv , x This serves as the input to the multi-scale linear attention mechanism module. W Q , W k , Wv It is a learnable linear projection matrix; The value Q, key K, and value V vectors are fed into multiple parallel branches. Each branch uses depthwise separable convolutions of different sizes for information aggregation and performs self-attention calculation using a self-attention mechanism. The output features of each branch are then concatenated and fused to form a comprehensive feature representation. Finally, a linear transformation is performed through a linear layer to output pseudo-data. The self-attention mechanism is expressed as follows: , In the formula, For the first i The output results for each query The number of candidate key-value pairs. For similarity function, For query vector, For key vectors, It is a value vector.
[0012] Furthermore, the similarity function is expressed as: , In the formula, for Activation function.
[0013] Furthermore, the execution steps of the discriminator D include: The pseudo data and the corresponding real data are used as input, and a two-layer convolutional neural network is used for processing. Normalization is performed in each layer, and the middle layer is activated by the LeakyReLU activation function. Then, the data is processed by a dual attention module that combines self-attention mechanism and channel-enhanced attention mechanism to obtain the fusion feature that combines self-attention and channel-enhanced attention. Based on the fusion features, a fully connected and sigmoid activation function is used to output the judgment probability corresponding to each input. When the input is real data, the judgment probability of discriminator D is 1, and when the input is pseudo data, the judgment probability of discriminator D is 0.
[0014] Furthermore, the operational expression for the channel-enhanced attention mechanism is: , In the formula, The computational operations for enhancing the attention mechanism of the channel. For the input feature tensor, It is the Sigmoid activation function. This is the weight matrix. For average pooling operation, This is a max pooling operation.
[0015] Furthermore, the loss function used in the training process of the Lmla-GAN-based super-resolution reconstruction model is: , in: , , In the formula, For the total loss function, To counteract the loss, a measure is used to evaluate the difference between the discriminator's judgment of the image generated by the generator and the real image. Perceptual loss is used to measure the difference between the generated image and the real image in the feature space. These are weighting coefficients used to balance the contributions of the two types of losses. E Expressing expectations, I hr It is a true high-resolution image. For the input distribution of low-resolution images, For the input distribution of low-resolution images, I lr For low-resolution images, G It is a generator. D It is a discriminator. for, ϕ The feature extraction function for VGG19. ϕ gram It is the function for calculating the Gram matrix. λ These are the weights for texture loss.
[0016] Furthermore, the quality of the super-resolution image is evaluated using peak signal-to-noise ratio (PSNR) and structural similarity index, wherein the expression for calculating the PSNR is: , In the formula, PSNR Peak signal-to-noise ratio, MAX The maximum value, MSE To reconstruct the mean square error between the data and the real data; The formula for calculating the structural similarity index is: , In the formula, SSIM It is a structural similarity index. For low-resolution data, For high-resolution data, , To avoid setting a constant in the denominator to zero, Cov This indicates the calculation of the covariance of two data points. Var This indicates the calculation of the variance of the data.
[0017] The present invention also provides an electronic device comprising: one or more processors; a memory; and one or more programs stored in the memory, said one or more programs including instructions for executing the harmonic voltage data super-resolution sensing method based on Lmla-GAN as described above.
[0018] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention converts one-dimensional electrical data into two-dimensional grayscale images, enabling generative adversarial networks to efficiently learn the trend of power data changes. Using generative adversarial Lmla-GAN technology, the generator mines the temporal features of power data, and the discriminator optimizes the authenticity of the generated images, thus realizing effective upsampling reconstruction from low-frequency data. It has the advantages of simplicity, speed and high accuracy.
[0019] (2) The generator of this invention combines a deep residual network structure with a multi-scale linear attention mechanism module, which can effectively solve the gradient vanishing problem in deep networks, while paying attention to the different scale features of power data and improving reconstruction accuracy. Combined with the dynamically learnable linear rectified unit function AReLU, the network is guaranteed to converge quickly with a very small learning rate, dynamically learn the characteristics of power data, and improve the efficiency and quality of super-resolution reconstruction.
[0020] (3) The discriminator of this invention incorporates a dual attention module that integrates self-attention and channel-enhanced attention. By focusing on the features of key regions, the discriminator can more accurately distinguish subtle differences between real and fake samples, thereby enhancing its discrimination ability and outputting the true probability of the image. At the same time, it can also reduce memory usage and computational complexity.
[0021] (4) This invention learns the data distribution through adversarial training. The generator network generates high-resolution signals, and the discriminator network distinguishes between real signals and generated signals, thereby improving data resolution and maintaining the high-frequency components of the signals, providing the possibility for in-depth analysis and precise control of power systems. This invention is entirely data-driven, avoiding the need for explicit modeling of data distribution assumptions and features based on a large amount of prior knowledge in the traditional missing data reconstruction process, and has high data super-resolution reconstruction accuracy.
[0022] (5) The present invention can fully utilize the steady-state harmonic low-frequency data in the monitoring system to reconstruct high-precision harmonic voltage data without affecting the transmission and storage performance of the existing system or adding system monitoring equipment, so as to meet the high requirements of power system modeling and analysis. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the Lmla-GAN generator structure of the present invention; Figure 3 This is a schematic diagram of the Lmla-GAN discriminator structure of the present invention; Figure 4 This is a schematic diagram of the multi-scale linear attention module structure of the present invention; Figure 5 This is a schematic diagram of the dual attention module structure of the present invention; Figure 6 This is a comparison of the measured SR data and the initial HR data of this invention. Detailed Implementation
[0024] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0025] Example 1 This embodiment provides a super-resolution sensing method for harmonic voltage data based on Lmla-GAN. The aim is to reconstruct high-precision harmonic voltage data by fully utilizing steady-state low-frequency harmonic data in the monitoring system without affecting the transmission and storage performance of the existing system or adding monitoring equipment. This overcomes the limitations of existing technologies by using advanced machine learning techniques, particularly generative adversarial networks (GANs), to achieve the goal of recovering high-resolution harmonic voltage signals from low-resolution power data. It learns the data distribution through adversarial training. In the field of super-resolution, Lmla-GAN is used to generate high-resolution images. It trains a generator network to produce high-resolution signals and simultaneously trains a discriminator network to distinguish between real and generated signals. This method can generate high-quality high-resolution signals and has good generalization ability. This method not only improves the resolution of the data but also preserves the high-frequency components of the signal, providing possibilities for in-depth analysis and precise control of power systems. Specifically, as... Figure 1 As shown, the method includes the following steps: Step 1: Prepare the super-resolution sensing dataset of power harmonic state data. For a power station in a certain city, the power quality monitoring equipment reads data every 3 minutes. The power station's harmonic voltage data is used as high-resolution data every 3 minutes. One day is one row, that is, one row has 480 time points. The one-dimensional data is transformed into a two-dimensional grayscale image dataset. The intelligent measurement system takes data every 15 minutes and uses the harmonic voltage data that occurs every 15 minutes for the corresponding time as low-resolution data. It then converts the one-dimensional data into a two-dimensional grayscale image dataset by dividing the data into rows of one day, with each row containing 96 time points.
[0026] The high- and low-resolution data are subjected to maximal normalization. Then, the training and test sets are divided according to a 7:3 ratio between the test and training sets for subsequent model training and validation.
[0027] Step 2: Generator G generates pseudo data The generator G takes low-resolution data as input and extracts features from the low-resolution image using 9×9 convolutional kernels. These features are then processed through residual blocks and a multi-scale linear attention mechanism module. Residual learning helps train deeper networks. Subpixel convolutional layers (PixelShuffle) are then used for upsampling to enlarge the feature map size to the target size. Finally, 9×9 convolutional kernels are used to reconstruct the final high-resolution image.
[0028] Combination Figure 2 The network structure of generator G shown is as follows: Generator G generates pseudo-data, and the input is low-resolution data. It extracts features from the low-resolution image using 9×9 convolutional kernels, and then passes them through residual blocks, multi-scale linear attention mechanism modules, etc. Residual learning helps to train deeper networks. Then, sub-pixel convolutional layers (PixelShuffle) are used for upsampling to enlarge the feature map size to the target size. Finally, 9×9 convolutional kernels are used to reconstruct the final high-resolution image. The steps for the generator to generate pseudo-data G(z) are as follows: Step 2.1: Input low-resolution data into the generator; Step 2.2: Upsampling is performed using micro-stride convolutions to extract initial features from the data. Normalization is applied to each layer to accelerate convergence and mitigate overfitting. Intermediate layers are activated using the ReLU linear rectified unit function. The ELSA attention mechanism is combined with the ReLU function to create a dynamically learnable ReLU linear rectified unit function, which ensures rapid convergence of the network with a very small learning rate. ELSA is a fine-grained attention mechanism, and its specific formula is as follows: , In the formula: x i For input elements, θ ={ α , β} represents a learnable parameter; the C(·) function restricts the input variable to 0.01-0.99. σ It is the sigmoid activation function.
[0029] The formula for the ReLU activation function is: , Combining Equations 3 and 4, we obtain the learnable activation function AReLU, as shown in the following formula: , Starting from equation (5), we finally obtain equation (6). The ReLU function works through an asymmetric gradient scaling mechanism: when the input is positive (i.e., the traditional "activation" region), it amplifies the gradient; while when the input is negative (usually considered the "non-activation" region), it suppresses the gradient. This directional gradient adjustment mechanism allows the neural network to retain key information while effectively suppressing redundant parameter fluctuations. Therefore, even with a low learning rate, the network can still achieve fast and stable convergence, thus significantly improving the overall training efficiency.
[0030] , Step 2.3: Then, the multi-scale linear attention mechanism module (Lite Multi-scale LinearAttention, LiteMLA) is implemented. Combined with... Figure 5 As shown, after data input, it first enters a linear layer. After linear transformation, the input data yields three vectors: value Q, key K, and value V. These vectors then enter three different branches. Each branch uses depthwise separable convolutions of different sizes for information aggregation to extract spatial context information at different scales from Q, K, and V. A self-attention mechanism is then used for computation to reduce complexity. Subsequently, a concatenation operation merges the multi-scale attention features output from all branches to form a comprehensive feature representation. Finally, this is passed through a linear layer and linearly transformed to obtain the model's final output. Multi-scale token aggregation performs independent information aggregation for each Q, K, and V in each head, using only small-kernel convolutions to reduce the time spent on model training. Where Q = xW Q , K= xW k V= xWv , W Q , W k and Wv Both are learnable linear projection matrices, and the self-attention mechanism formula is shown below: , ReLU global attention is used to implement the global receptive field and linear computation. The similarity function is defined as follows: , Step 2.4: The output layer of G uses the tanh activation function to generate pseudo-data with 1 channel and a size of 1*480. The tanh activation function used is also called the double tangent function, and the final result will fall between [-1, 1].
[0031] Step 3: Discriminator D judges whether the data is genuine or fake. Input the pseudo-data G(z) generated by the generator in step 1 and the real data into the discriminator. For example... Figure 3 As shown, the discriminator D includes a series of convolutional layers, batch normalization layers, and LeakyReLU activation functions. Finally, it outputs the authenticity probability of the image through a dual attention module, a fully connected layer, and a sigmoid activation function.
[0032] The discriminator's steps for determining whether data is genuine or fake include the following: Step 3.1: Input the pseudo-data G(z) generated by the generator and the real data into the discriminator; Step 3.2: Use a two-layer convolutional neural network and perform normalization operations in each layer, with LeakyReLU activation in the intermediate layer; Step 3.3: Then, through a dual attention module (such as...) Figure 4 As shown, this approach combines self-attention (SA) and channel-enhanced attention (CEA). The self-attention mechanism first enables each spatial location to directly interact with global information, thus modeling long-range dependencies. Subsequently, the channel-enhanced attention mechanism uses 1×1 convolutions to expand and compress feature channels, extracting rich texture details while simultaneously reducing the number of parameters. Spatial statistics are further aggregated through average pooling and max pooling to capture high-frequency information and generate a more refined channel-level attention map. The outputs of the two branches are then concatenated and fused using 1×1 convolutions. The formula for channel-enhanced attention is as follows: , Where X avg For average pooling, X max This is for max pooling.
[0033] Step 3.4: Finally, use a fully connected layer and the sigmoid activation function to output the probability. The sigmoid function, also known as the logistic function, is used for the output of hidden layer neurons. Its value range is (0,1), and it can map a real number to the interval (0,1). Ideally, when the input is real data, the discriminator outputs 1, and when the input is pseudo-data, the discriminator outputs 0.
[0034] Step 4: Train the model Training Lmla-GAN involves multiple loss functions, including perceptual loss (such as feature loss, based on feature similarity from the VGG network) and adversarial loss (to make the generated images visually more realistic). These loss functions work together to optimize and improve the quality of the generated images. A suitable optimizer, such as Adam or SGD, is chosen to train the model. The optimizer is responsible for tuning the network parameters to minimize the loss function. The model is then trained using a prepared dataset. This process can require significant computational resources and time, especially for large datasets and complex models.
[0035] Adversarial Loss: Adversarial loss primarily measures the difference between the discriminator's judgment of the image generated by the generator and the real image. The goal of adversarial loss is to encourage the generator to produce images that can deceive the discriminator. In Lmla-GAN, cross-entropy loss is used as the adversarial loss, and its formula is as follows: , Where: E represents expectation, G is generator, and D is discriminator. I hr It is a true high-resolution image. I lr It is a low-resolution image.
[0036] Perceptual Loss: Perceptual loss measures the difference between the generated and real images in the feature space. In Lmla-GAN, perceptual loss includes content loss and texture loss. Content loss is the Euclidean distance between feature maps extracted by the pre-trained VGG19 network, while texture loss is the difference between the Gram matrices of the generated and real images. The formula for perceptual loss is as follows: , in: ϕ It is the feature extraction function of VGG19. ϕ gram yes gram Matrix calculation functions λ These are the weights for texture loss.
[0037] The overall loss function is the weighted sum of these two parts: , in: α It is a weighting coefficient used to balance the contributions of the two types of losses.
[0038] Step 5: Model Validation and Evaluation Based on the performance of the trained model on the validation set, the existing network model is evaluated, and adjustments are made accordingly. Metrics such as Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) are used to quantitatively evaluate the quality of the super-resolution image.
[0039] PSNR is a metric for measuring the quality of image reconstruction, commonly used to evaluate the performance of image compression, transmission, or reconstruction algorithms. PSNR assesses data quality by quantifying the mean squared error (MSE) between the reconstructed and ground truth data. Its value is expressed in decibels (dB); a higher value indicates a higher similarity between the reconstructed and ground truth data. The formula for calculating PSNR is: , In the formula: MAX Represents the maximum possible value of the data. MSE It is the mean square error between the reconstructed data and the real data.
[0040] SSIM is a metric used to measure the similarity between two images, primarily for image quality assessment. It better aligns with the perceptual characteristics of the human visual system. SSIM values range from -1 to 1; the closer the value is to 1, the higher the visual structural similarity between the two images. The formula for calculating SSIM is: , In the formula: Var This indicates calculating the variance of the data. Cov This indicates the calculation of the covariance of two data points. C 1 and C 2 is a small constant set to avoid the denominator being zero, and it is set to 0.01.
[0041] Step 6: Model fine-tuning Based on the results of the validation set, the model may need to be fine-tuned to improve performance for specific types of images or under specific conditions.
[0042] The trained Lmla-GAN-based super-resolution reconstruction model acquires low-resolution harmonic voltage signals, converts them into low-resolution images, and then uses a trained generator G to reconstruct the images, outputting a super-resolution image, which is then converted back into a super-resolution harmonic voltage signal. The high-resolution harmonic voltage data generated by this model is richer and more realistic in texture and detail, thanks to improvements in GAN Loss and the use of perceptual Loss, resulting in visually clearer data with sharper edges. Figure 6As shown, the results obtained from the predicted SR (low resolution) data and the initial HR (high resolution) data in this embodiment are basically consistent.
[0043] In summary, this embodiment utilizes Lmla-GAN to fully exploit the temporal features of power data, enabling the acquisition, transmission, and storage of low-frequency data. When needed, the Lmla-GAN generator is used for upsampling and reconstruction to obtain high-frequency data for analysis or prediction. Specifically, the method includes: Generator G uses 9×9 convolutional kernels to extract features from low-resolution images, combining a deep residual network structure (Conv) with a multi-scale linear attention mechanism (Lite Multi-scale Linear Attention, LiteMLA) to effectively solve the gradient vanishing problem in deep networks, while simultaneously focusing on different scale features of power data to improve reconstruction accuracy. Combined with a dynamically learnable linear rectified unit function (AReLU), the network converges quickly with a very small learning rate, dynamically learning the characteristics of power data to improve the efficiency and quality of super-resolution reconstruction. Discriminator D embeds a dual-attention module (DAM) through convolutional layers, batch normalization layers, and the LeakyReLU activation function: by focusing on features in key regions, it enables the discriminator to more accurately distinguish subtle differences between real and fake samples, thereby enhancing its discrimination ability. The method outputs the probability of the image's authenticity. It learns the data distribution through adversarial training. A generator network produces high-resolution signals, while a discriminator network distinguishes between real and generated signals, thereby improving data resolution and preserving high-frequency components of the signal. This provides possibilities for in-depth analysis and precise control of power systems. This invention is entirely data-driven, avoiding the need for explicit modeling of data distribution assumptions and features based on extensive prior knowledge in traditional missing data reconstruction processes, resulting in high data super-resolution reconstruction accuracy.
[0044] Example 2 This embodiment provides an electronic device, including: one or more processors; a memory; and one or more programs stored in the memory, said one or more programs including instructions for executing as described in Embodiment 1 above.
[0045] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0046] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0047] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0048] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0049] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0050] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0051] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A super-resolution sensing method for harmonic voltage data based on Lmla-GAN, characterized in that, Includes the following steps: The low-resolution harmonic voltage signal is acquired, converted into a low-resolution image, input into a pre-trained Lmla-GAN-based super-resolution reconstruction model for image reconstruction, outputs a super-resolution image, and then converts it back into a super-resolution harmonic voltage signal. The Lmla-GAN-based super-resolution reconstruction model includes a generator G and a discriminator D. During training, the generator G combines a deep residual network structure with a multi-scale linear attention mechanism module to generate pseudo data. The discriminator D introduces a dual attention module to distinguish between the pseudo data and the corresponding real data.
2. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 1, characterized in that, The training steps of the Lmla-GAN-based super-resolution reconstruction model include: The high-resolution harmonic voltage signal collected within the first set time interval is acquired, preprocessed, and converted into a two-dimensional high-resolution image as real data. The preprocessed harmonic voltage signal is downsampled to obtain a low-resolution harmonic voltage signal, which is then converted into a two-dimensional low-resolution image. This image is combined with the high-resolution image to form a dataset, which is then divided into a training set and a test set. An Lmla-GAN is constructed and trained using the training set to obtain a super-resolution reconstruction model based on Lmla-GAN.
3. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 2, characterized in that, The preprocessing steps include: Based on the acquired high-resolution harmonic voltage signal, empty and invalid data are first removed, and then normalization is performed using the max-min normalization method to complete the preprocessing process.
4. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 1, characterized in that, The steps for generator G to generate pseudo-data include: Using a low-resolution image as input, upsampling is performed using micro-stride convolution to extract initial features. Normalization is performed at each layer, and the intermediate layers are activated using a dynamically learnable linear rectified unit function (AReLU). The AReLU function is a combination of the ELSA attention mechanism and the ReLU function. The ELSA attention mechanism is expressed as follows: , The ReLU function is expressed as: , In the formula, The output of the ELSA attention mechanism It is a piecewise function. For input elements, θ ={ α , β } represents learnable parameters. The function is used to restrict input variables. It is the sigmoid activation function. It is the ReLU activation function; The linear rectifier unit function AReLU is expressed as: , In the formula, Use the AReLU activation function; The linear rectified unit function AReLU uses an asymmetric gradient scaling mechanism to scale the gradient, which is expressed as: , Based on the multi-scale linear attention mechanism module, a linear transformation is first performed using a linear layer to obtain vectors of value Q, key K, and value V, respectively expressed as: Q = xW Q K= xW k V= xWv , x This serves as the input to the multi-scale linear attention mechanism module. W Q , W k , Wv It is a learnable linear projection matrix; The value Q, key K, and value V vectors are fed into multiple parallel branches. Each branch uses depthwise separable convolutions of different sizes for information aggregation and performs self-attention calculation using a self-attention mechanism. The output features of each branch are then concatenated and fused to form a comprehensive feature representation. Finally, a linear transformation is performed through a linear layer to output pseudo-data. The self-attention mechanism is expressed as follows: , In the formula, For the first i The output results for each query The number of candidate key-value pairs. For similarity function, For query vector, For key vectors, It is a value vector.
5. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 4, characterized in that, The similarity function is expressed as follows: , In the formula, for Activation function.
6. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 1, characterized in that, The execution steps of the discriminator D include: The pseudo data and the corresponding real data are used as input, and a two-layer convolutional neural network is used for processing. Normalization is performed in each layer, and the middle layer is activated by the LeakyReLU activation function. Then, the data is processed by a dual attention module that combines self-attention mechanism and channel-enhanced attention mechanism to obtain the fusion feature that combines self-attention and channel-enhanced attention. Based on the fusion features, a fully connected and sigmoid activation function is used to output the judgment probability corresponding to each input. When the input is real data, the judgment probability of discriminator D is 1, and when the input is pseudo data, the judgment probability of discriminator D is 0.
7. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 6, characterized in that, The operational expression for the channel-enhanced attention mechanism is: , In the formula, The computational operations for enhancing the attention mechanism of the channel. For the input feature tensor, It is the Sigmoid activation function. This is the weight matrix. For average pooling operation, This is a max pooling operation.
8. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 1, characterized in that, The loss function used in the training process of the Lmla-GAN-based super-resolution reconstruction model is: in: In the formula, For the total loss function, To counteract the loss, a measure is used to evaluate the difference between the discriminator's judgment of the image generated by the generator and the real image. Perceptual loss is used to measure the difference between the generated image and the real image in the feature space. These are weighting coefficients used to balance the contributions of the two types of losses. E Expressing expectations, I hr It is a true high-resolution image. The true distribution of high-resolution images in the training set. For the input distribution of low-resolution images, I lr For low-resolution images, G It is a generator. D It is a discriminator. for, ϕ The feature extraction function for VGG19. ϕ gram It is the function for calculating the Gram matrix. λ These are the weights for texture loss.
9. The method for super-resolution sensing of harmonic voltage data based on Lm1a-GAN according to claim 1, characterized in that, The quality of the super-resolution image is evaluated using peak signal-to-noise ratio (PSNR) and structural similarity index, wherein the expression for calculating the PSNR is: In the formula, PSNR Peak signal-to-noise ratio, MAX The maximum value, MSE To reconstruct the mean square error between the data and the real data; The formula for calculating the structural similarity index is: In the formula, SSIM It is a structural similarity index. For low-resolution data, For high-resolution data, , To avoid setting a constant in the denominator to zero, Cov This indicates the calculation of the covariance of two data points. Var This indicates the calculation of the variance of the data.
10. An electronic device, characterized in that, include: One or more processors; Memory; and one or more programs stored in memory, the one or more programs including instructions for executing the harmonic voltage data super-resolution sensing method based on Lmla-GAN as described in any one of claims 1-9.