Methods, systems, equipment, and media for repairing broadband oscillation data of new energy grid-connected systems.
Through the local-global two-stage correlation learning repair model, combined with the U-Net structure and multi-scale features fusion spatial attention mechanism, the problem of repairing missing and abnormal data in broadband oscillation data is solved, efficient and accurate data repair is achieved, and the accuracy and reliability of oscillation source positioning is improved.
Patent Information
- Application Number
- CN202411756381.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The prior art is difficult to effectively repair the missing and abnormal data in broadband oscillation data, resulting in the accuracy and effectiveness of oscillation source positioning.
The local-global two-stage correlation learning repair model is adopted, and local correlation learning is performed through the U-Net structure combined with the Inception module and the multi-scale feature fusion spatial attention mechanism. Then, the global sequence correlation learning is performed using the bidirectional long and short-term memory network and the multi-head attention mechanism to achieve efficient repair of broadband oscillating data.
It significantly improves the accuracy and efficiency of broadband oscillation data repair, enhances the correlation between data, and thus improves the accuracy and reliability of oscillation source positioning.
Smart Images

Figure CN119249358B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a method, system, equipment and medium for repairing broadband oscillation data of new energy grid-connected power systems. Background Art
[0002] In modern power systems, with the rapid development of new energy technologies, especially in the Shagohuang area, the construction of large-scale new energy bases is gradually increasing. However, these areas are often faced with the challenge of weak AC system support or even no AC system support at all. Especially when adopting new transmission technologies such as flexible direct current transmission, flexible direct current transmission systems under weak AC support conditions are prone to broadband oscillations in actual applications. Broadband oscillations refer to power system oscillations that occur over a wide range of frequencies. This phenomenon can cause system instability and affect the safety and reliability of the power system. Research on broadband oscillations mainly focuses on how to accurately locate the oscillation source in order to intervene in time. In order to effectively deal with this problem, data-driven broadband oscillation source positioning technology has emerged. Broadband oscillation source positioning technology relies on high-precision oscillation sample data. , and accurately locates the oscillation through nonlinear fitting. Although this method has strong capabilities in analyzing oscillation problems, in practical applications, due to the interference of multiple factors such as communication interaction failures and data storage failures, the collected broadband oscillation sample data often have data missing and abnormal problems, which directly leads to the problem that the "high-precision" sample conditions required by data-driven technology are difficult to meet. Traditional data repair methods use methods such as linear interpolation to repair these missing and abnormal data, but for broadband oscillation samples with complex feature associations and high-dimensional data, linear interpolation methods cannot fully capture the nonlinear relationship and complex patterns between data, resulting in the repaired data cannot accurately reflect the true situation of the original data. Therefore, the repair effect of traditional data repair methods is often limited and cannot meet the requirements of high precision.
[0003] In recent years, deep learning technology has been increasingly used in the power field. It constructs a nonlinear mapping between features and targets through deep neural networks, showing higher fitting accuracy than traditional methods. However, the complexity and high-dimensional characteristics of broadband oscillation data make data repair methods based on deep learning face great challenges in practical applications. Missing and abnormal data in broadband oscillation data are difficult to repair with high precision, affecting the accuracy and effectiveness of oscillation source positioning technology. Therefore, there is an urgent need for a method that can fully analyze the characteristics of broadband oscillation data and effectively repair broadband oscillation data based on deep learning technology, so as to improve the repair effect of broadband oscillation samples containing missing and abnormal data, thereby better solving the oscillation problem in the power system, ensuring the stable operation of the power system and the effective utilization of new energy, which is of great significance to improving the stability and safety of grid connection and transmission of new energy bases. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system, device and medium for repairing broadband oscillation data of new energy grid-connected power grid, which fully considers the characteristics of the main body and detail components of the data through a step-by-step feature coding repair method, significantly improves the accuracy of data repair, and enhances the correlation between data, thereby improving the accuracy and reliability of broadband oscillation source positioning.
[0005] In order to solve the above technical problems, the present invention provides a method, system, device and medium for repairing broadband oscillation data of new energy grid-connected power system.
[0006] In a first aspect, the present invention provides a method for repairing broadband oscillation data of a new energy grid-connected system, the method comprising the following steps:
[0007] Simulating a new energy grid-connected system using a simulation model to obtain an original broadband oscillation data set, and preprocessing the original broadband oscillation data set to obtain a preprocessed broadband oscillation data set;
[0008] According to the pre-processed broadband oscillation data set, a broadband oscillation missing and abnormal data set is simulated and generated; wherein the broadband oscillation missing and abnormal data set includes random point missing broadband oscillation data, random continuous missing broadband oscillation data and simulated abnormal broadband oscillation data;
[0009] The broadband oscillation missing and abnormal data set is repaired using a local-global two-stage association learning repair model to obtain broadband oscillation repair data.
[0010] In a further embodiment, the local-global two-stage association learning and repair model uses the U-Net structure as the basic network architecture, and the local-global two-stage association learning and repair model includes a local association learning stage and a global sequence association learning stage;
[0011] The local association learning stage includes an Inception module embedded in each downsampling layer of the U-Net structure, an Inception module embedded in each upsampling layer of the U-Net structure, and a multi-scale feature fusion spatial attention mechanism set at the jump connection between the upsampling and downsampling layers of the U-Net structure; the Inception module includes multiple parallel convolutional layers, each convolutional layer has convolution kernels of different scales;
[0012] The global sequence association learning stage includes a bidirectional long short-term memory network located in the last downsampling layer of the U-Net structure, a bidirectional long short-term memory network located in the first upsampling layer of the U-Net structure, and a multi-head attention mechanism introduced at the jump connection between the last downsampling layer and the first upsampling layer of the U-Net structure.
[0013] In a further embodiment, the step of repairing the broadband oscillation missing and abnormal data set using the local-global two-stage association learning repair model to obtain broadband oscillation repair data includes:
[0014] Input the broadband oscillation missing and abnormal data set into the Inception module in the first downsampling layer of the U-Net structure to extract multi-scale local detail features, and obtain a maximum pooling result and a multi-scale feature map;
[0015] The multi-scale feature map is transferred to the multi-scale feature fusion spatial attention mechanism through a jump connection, and the multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result;
[0016] In each downsampling layer of the local association learning stage, the Inception module is used to perform spatial feature association learning of different convolutional scales on the maximum pooling result output by the previous downsampling layer to obtain the local association learning spatial features;
[0017] Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result;
[0018] The global sequence association learning result is subjected to a deconvolution operation to obtain an upsampled feature map, and the upsampled feature map is upsampled step by step through multiple upsampling layers in the local association learning stage, and at each upsampling level, it is connected with the multi-scale feature fusion encoding result of the corresponding level to output broadband oscillation repair data.
[0019] In a further embodiment, in each downsampling layer in the local association learning stage, the convolution scale of the Inception module in the next downsampling layer is larger than the convolution scale of the Inception module in the previous downsampling layer.
[0020] In a further embodiment, the multi-scale feature fusion spatial attention mechanism includes a feature input layer, a convolution module, a feature reshaping layer, a pooling module, a weight initialization layer, a detail preference learning module, a multi-channel spatial attention mechanism, a nonlinear conversion layer and a fully connected layer connected in sequence;
[0021] The convolution module includes a plurality of convolution layers connected in parallel; the convolution kernel size of each convolution layer is different;
[0022] The pooling module includes an average pooling layer, a mixed pooling layer and a maximum pooling layer corresponding to convolutional layers of different sizes; wherein the mixed pooling layer includes an average pooling operation and a maximum pooling operation;
[0023] The detail preference learning module includes a local detail preference learning layer, a baseline detail preference learning layer and a global detail preference learning layer; different channel spatial attention mechanisms of the multi-channel spatial attention mechanism are connected to the local detail preference learning layer, the baseline detail preference learning layer and the global detail preference learning layer in a one-to-one correspondence, and each channel spatial attention mechanism is connected to the baseline detail preference learning layer to correct and balance the detail preference features output by the local detail preference learning layer and the global detail preference learning layer through the baseline detail preference learning layer.
[0024] In a further embodiment, the step of performing different scale detail preference learning on the multi-scale feature map through the multi-scale feature fusion spatial attention mechanism to obtain a multi-scale feature fusion encoding result comprises:
[0025] The multi-scale feature maps are convolved in parallel through multiple convolution kernels of different sizes in each convolution layer of the convolution module to obtain a broadband oscillating convolution result output by each convolution layer;
[0026] Reshape different broadband oscillation convolution results into multiple parallel reshape feature matrices, and perform pooling operations on the reshape feature matrices using maximum pooling, mixed pooling and average pooling methods to obtain multi-scale pooling feature maps;
[0027] Assigning different weights to the multi-scale pooling feature map to obtain broadband oscillation preference information of different convolution scales;
[0028] Different types of detail preference learning are performed on broadband oscillation preference information of different convolution scales to obtain corresponding local detail preference features, baseline detail preference features and global detail preference features;
[0029] The local detail preference feature, the baseline detail preference feature and the global detail preference feature are respectively input into the corresponding channel space attention mechanism, and the baseline detail preference feature is input into all channel space attention mechanisms as supplementary information, and the local detail preference learning result and the global detail preference learning result are corrected to obtain a multi-channel fusion encoding result;
[0030] The multi-channel fusion coding results are nonlinearly transformed and skip-layer connection coding is performed through a fully connected layer to obtain a multi-scale feature fusion coding result.
[0031] In a further embodiment, the step of inputting the local association learning space features into the global sequence association learning stage to perform global sequence association learning and obtain the global sequence association learning result comprises:
[0032] A bidirectional long short-term memory network at the end of the downsampling layer is used to establish a forward and backward sequence representation of the local association learning space feature to obtain a broadband oscillation bidirectional sequence feature map;
[0033] The broadband oscillation bidirectional sequence feature map is transmitted to the multi-head attention mechanism through a skip connection, and the multi-head attention mechanism is used to strengthen the time association establishment process of the skip layer connection to obtain a weighted sequence feature map;
[0034] The weighted sequence feature map is input into the bidirectional long short-term memory network of the first upsampling layer of the U-Net structure, and an upsampling operation is performed through the bidirectional long short-term memory network of the first upsampling layer to generate a global sequence association learning result.
[0035] In a second aspect, the present invention provides a system for repairing broadband oscillation data of a new energy grid-connected system, the system comprising:
[0036] A data acquisition module, used for simulating a new energy grid-connected system using a simulation model to obtain an original broadband oscillation data set, and preprocessing the original broadband oscillation data set to obtain a preprocessed broadband oscillation data set;
[0037] A data generation module, used for simulating and generating a broadband oscillation missing and abnormal data set according to the pre-processed broadband oscillation data set; wherein the broadband oscillation missing and abnormal data set includes random point missing broadband oscillation data, random continuous missing broadband oscillation data and simulated abnormal broadband oscillation data;
[0038] The data repair module is used to repair the broadband oscillation missing and abnormal data set by using a local-global two-stage association learning repair model to obtain broadband oscillation repair data.
[0039] In a further embodiment, the local-global two-stage association learning and repair model uses the U-Net structure as the basic network architecture, and the local-global two-stage association learning and repair model includes a local association learning stage and a global sequence association learning stage;
[0040] The local association learning stage includes an Inception module embedded in each downsampling layer of the U-Net structure, an Inception module embedded in each upsampling layer of the U-Net structure, and a multi-scale feature fusion spatial attention mechanism set at the jump connection between the upsampling and downsampling layers of the U-Net structure; the Inception module includes multiple parallel convolutional layers, each convolutional layer has convolution kernels of different scales;
[0041] The global sequence association learning stage includes a bidirectional long short-term memory network located in the last downsampling layer of the U-Net structure, a bidirectional long short-term memory network located in the first upsampling layer of the U-Net structure, and a multi-head attention mechanism introduced at the jump connection between the last downsampling layer and the first upsampling layer of the U-Net structure.
[0042] In a further embodiment, the data repair module is specifically used to:
[0043] Input the broadband oscillation missing and abnormal data set into the Inception module in the first downsampling layer of the U-Net structure to extract multi-scale local detail features, and obtain a maximum pooling result and a multi-scale feature map;
[0044] The multi-scale feature map is transferred to the multi-scale feature fusion spatial attention mechanism through a jump connection, and the multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result;
[0045] In each downsampling layer of the local association learning stage, the Inception module is used to perform spatial feature association learning of different convolutional scales on the maximum pooling result output by the previous downsampling layer to obtain the local association learning spatial features;
[0046] Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result;
[0047] The global sequence association learning result is subjected to a deconvolution operation to obtain an upsampled feature map, and the upsampled feature map is upsampled step by step through multiple upsampling layers in the local association learning stage, and at each upsampling level, it is connected with the multi-scale feature fusion encoding result of the corresponding level to output broadband oscillation repair data.
[0048] In a further embodiment, in each downsampling layer in the local association learning stage, the convolution scale of the Inception module in the next downsampling layer is larger than the convolution scale of the Inception module in the previous downsampling layer.
[0049] In a further embodiment, the multi-scale feature fusion spatial attention mechanism includes a feature input layer, a convolution module, a feature reshaping layer, a pooling module, a weight initialization layer, a detail preference learning module, a multi-channel spatial attention mechanism, a nonlinear conversion layer and a fully connected layer connected in sequence;
[0050] The convolution module includes a plurality of convolution layers connected in parallel; the convolution kernel size of each convolution layer is different;
[0051] The pooling module includes an average pooling layer, a mixed pooling layer and a maximum pooling layer corresponding to convolutional layers of different sizes; wherein the mixed pooling layer includes an average pooling operation and a maximum pooling operation;
[0052] The detail preference learning module includes a local detail preference learning layer, a baseline detail preference learning layer and a global detail preference learning layer; different channel spatial attention mechanisms of the multi-channel spatial attention mechanism are connected to the local detail preference learning layer, the baseline detail preference learning layer and the global detail preference learning layer in a one-to-one correspondence, and each channel spatial attention mechanism is connected to the baseline detail preference learning layer to correct and balance the detail preference features output by the local detail preference learning layer and the global detail preference learning layer through the baseline detail preference learning layer.
[0053] In a further implementation scheme, the multi-scale feature fusion spatial attention mechanism is used to perform detail preference learning of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result, specifically including:
[0054] The multi-scale feature maps are convolved in parallel through multiple convolution kernels of different sizes in each convolution layer of the convolution module to obtain a broadband oscillating convolution result output by each convolution layer;
[0055] Reshape different broadband oscillation convolution results into multiple parallel reshape feature matrices, and use maximum pooling, mixed pooling and average pooling methods to perform pooling operations on the reshape feature matrices in parallel to obtain multi-scale pooling feature maps;
[0056] Assigning different weights to the multi-scale pooling feature map to obtain broadband oscillation preference information of different convolution scales;
[0057] Different types of detail preference learning are performed on broadband oscillation preference information of different convolution scales to obtain corresponding local detail preference features, baseline detail preference features and global detail preference features;
[0058] The local detail preference feature, the baseline detail preference feature and the global detail preference feature are respectively input into the corresponding channel space attention mechanism, and the baseline detail preference feature is input into all channel space attention mechanisms as supplementary information, and the local detail preference learning result and the global detail preference learning result are corrected to obtain a multi-channel fusion encoding result;
[0059] The multi-channel fusion coding results are nonlinearly transformed and skip-layer connection coding is performed through a fully connected layer to obtain a multi-scale feature fusion coding result.
[0060] In a further implementation scheme, the local association learning space feature is input into the global sequence association learning stage to perform global sequence association learning, and obtain a global sequence association learning result, which specifically includes:
[0061] A bidirectional long short-term memory network at the end of the downsampling layer is used to establish a forward and backward sequence representation of the local association learning space feature to obtain a broadband oscillation bidirectional sequence feature map;
[0062] The broadband oscillation bidirectional sequence feature map is transmitted to the multi-head attention mechanism through a skip connection, and the multi-head attention mechanism is used to strengthen the time association establishment process of the skip layer connection to obtain a weighted sequence feature map;
[0063] The weighted sequence feature map is input into the bidirectional long short-term memory network of the first upsampling layer of the U-Net structure, and an upsampling operation is performed through the bidirectional long short-term memory network of the first upsampling layer to generate a global sequence association learning result.
[0064] In a third aspect, the present invention further provides a computer device, comprising a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory so that the computer device performs the steps of implementing the above method.
[0065] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0066] The present invention provides a method, system, device and medium for repairing broadband oscillation data of new energy grid-connected. The method uses a simulation model to simulate the new energy grid-connected system to obtain an original broadband oscillation data set, and pre-processes the original broadband oscillation data set to obtain a pre-processed broadband oscillation data set; based on the pre-processed broadband oscillation data set, simulate and generate a broadband oscillation missing and abnormal data set; use a local-global two-stage association learning repair model to repair the broadband oscillation missing and abnormal data set to obtain broadband oscillation repair data. Compared with the prior art, the method is based on a two-stage repair strategy of deep learning, which realizes efficient and accurate repair of missing and abnormal values in broadband oscillation data of new energy grid-connected, can effectively solve the problem of inaccurate positioning caused by missing and abnormal broadband oscillation data, ensure the stable operation of the grid-connected and external transmission systems of new energy bases, and improve the safety and reliability of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a schematic flow chart of a method for repairing broadband oscillation data of a new energy grid-connected system provided by an embodiment of the present invention;
[0068] Figure 2 is a schematic diagram of a traditional U-Net structure provided by an embodiment of the present invention;
[0069] Figure 3 It is a schematic diagram of the structure of a local-global two-stage association learning repair model provided by an embodiment of the present invention;
[0070] Figure 4 It is a schematic diagram of the structure of the multi-scale feature fusion spatial attention mechanism provided by an embodiment of the present invention;
[0071] Figure 5 is a schematic diagram comparing mean square errors of different schemes when random points are missing provided by an embodiment of the present invention;
[0072] Figure 6 is a schematic diagram comparing mean square errors of different schemes when random points are missing continuously provided by an embodiment of the present invention;
[0073] Figure 7 It is a block diagram of a repair system for broadband oscillation data of a new energy grid-connected system provided by an embodiment of the present invention;
[0074] Figure 8 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0075] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and cannot be understood as limiting the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0076] refer to Figure 1 , the embodiment of the present invention provides a method for repairing broadband oscillation data of a new energy grid-connected system, such as Figure 1 As shown, the method comprises the following steps:
[0077] S1. Using a simulation model to simulate a new energy grid-connected system to obtain an original broadband oscillation data set, and preprocessing the original broadband oscillation data set to obtain a preprocessed broadband oscillation data set.
[0078] This embodiment simulates the new energy grid-connected system through a simulation model to obtain original broadband oscillation data. At the same time, in order to eliminate the influence of different dimensions on data model training and reduce the complexity of model fitting, this embodiment normalizes the original broadband oscillation data and evenly maps the values of all data points to the range of (0, 1). The mathematical expression of the normalization process is:
[0079]
[0080] In the formula, represents the preprocessed broadband oscillation data set; represents the original broadband oscillation data set; represents the characteristic minimum of the original broadband oscillation data set; Represents the characteristic maximum value of the original broadband oscillation data set.
[0081] S2. According to the pre-processed broadband oscillation data set, simulate and generate a broadband oscillation missing and abnormal data set; wherein the broadband oscillation missing and abnormal data set includes random point missing broadband oscillation data, random continuous missing broadband oscillation data and simulated abnormal broadband oscillation data.
[0082] This embodiment simulates and generates two types of missing data, namely, random point missing broadband oscillation data and random continuous missing broadband oscillation data, based on the pre-processed broadband oscillation data set. At the same time, it simulates and generates the simulated abnormal broadband oscillation data, such as abnormal broadband oscillation data such as noise and mutation. It should be noted that data missing and abnormal data can be divided into two situations: missing and abnormal data points, and missing and abnormal data points. The missing and abnormal data points refer to the fact that in the process of collecting or transmitting broadband oscillation data, due to occasional factors such as communication interaction failures and instantaneous equipment failures, there are scattered, single missing values or abnormal values randomly scattered in the broadband oscillation samples. These values deviate from the normal data distribution range and cannot be accurately classified. Analysis data; while the missing and abnormalities of random continuous data are usually caused by persistent problems such as data storage system failure, file damage or transmission interruption. In this case, the missing values do not exist in isolation, but appear continuously in multiple continuous intervals of the data sequence to form blank data segments, and continuous data gaps will cover up important dynamic change information. Therefore, this form of missing not only increases the difficulty of data recovery, but also has a serious impact on the broadband oscillation analysis based on time series. For the broadband oscillation problem, the frequency of random point missing is higher, but the impact of random continuous missing is more serious. This embodiment can use a random discrete insertion method to replace the original normal data with discrete and continuous missing values and abnormal values to construct missing and abnormal data.
[0083] S3. Use the local-global two-stage association learning repair model to repair the broadband oscillation missing and abnormal data set to obtain broadband oscillation repair data.
[0084] In this embodiment, the local-global two-stage association learning and repair model uses the U-Net structure as the basic network architecture. Figure 2 It is a traditional U-Net structure. The classic traditional U-Net structure is a symmetric U-shaped deep neural network. It can achieve continuous multiple downsampling during the encoding process, and can obtain more abstract and essential global features and more detailed local features. Therefore, the feature expression is richer. In addition, U-Net fuses symmetric position information through skip-layer links, retains the edge information lost by downsampling, and is insensitive to the missing length, so that the decoding part can freely choose between features of different dimensions. For broadband oscillation data, the sub-synchronous oscillation component constitutes the backbone of the broadband oscillation data, and the super-synchronous oscillation component constitutes the detail of the broadband oscillation data. In view of this feature, this embodiment is based on the classic U-Net and adopts a local-global two-stage association learning and repair model constructed by local association learning and backbone association features to realize the missing and abnormal data repair of broadband oscillation samples.
[0085] In some embodiments of the present invention, Figure 3As shown, the local-global two-stage association learning and repair model includes a local association learning stage and a global sequence association learning stage; in this embodiment, the local association learning stage includes an Inception module embedded in each downsampling layer of the U-Net structure, an Inception module embedded in each upsampling layer of the U-Net structure, and a multi-scale feature fusion spatial attention mechanism set at the jump connection between the upsampling layers of the U-Net structure, wherein the Inception module includes multiple parallel convolutional layers, each convolutional layer has a convolution kernel of different scales, and multiple convolution kernels of different scales are used to capture local detail features of different scales and generate a multi-scale feature map, and the size of the convolution kernel increases layer by layer as the number of downsampling layers increases; the global sequence association learning stage includes a bidirectional long short-term memory network located in the last downsampling layer of the U-Net structure, a bidirectional long short-term memory network located in the first upsampling layer of the U-Net structure, and a multi-head attention mechanism introduced at the jump connection between the last downsampling layer and the first upsampling layer of the U-Net structure.
[0086] In some embodiments of the present invention, the step of repairing the broadband oscillation missing and abnormal data set using the local-global two-stage association learning repair model to obtain broadband oscillation repair data includes:
[0087] Input the broadband oscillation missing and abnormal data set into the Inception module in the first downsampling layer of the U-Net structure to extract multi-scale local detail features, and obtain a maximum pooling result and a multi-scale feature map;
[0088] The multi-scale feature map is transferred to the multi-scale feature fusion spatial attention mechanism through a jump connection, and the multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result;
[0089] In each downsampling layer in the local association learning stage, the Inception module is used to perform spatial feature association learning of different convolutional scales on the maximum pooling result output by the previous downsampling layer to obtain the local association learning spatial features; in each downsampling layer in the local association learning stage, the convolution scale of the Inception module in the next downsampling layer is larger than the convolution scale of the Inception module in the previous downsampling layer;
[0090] Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result;
[0091] The global sequence association learning result is subjected to a deconvolution operation to obtain an upsampled feature map, and the upsampled feature map is upsampled step by step through multiple upsampling layers in the local association learning stage, and at each upsampling level, it is connected with the multi-scale feature fusion encoding result of the corresponding level to output broadband oscillation repair data.
[0092] Specifically, in the process of repairing the missing and abnormal data of broadband oscillation data, the local association learning stage adopted in this embodiment optimizes the learning process of local features by introducing the Inception structure and cooperating with the spatial attention mechanism of multi-channel feature fusion. The Inception structure is used to encode the multi-scale local detail features of the broadband oscillation missing and abnormal data set. This Inception structure design allows the model to capture details of different scales at the same time, so as to more effectively process and repair missing or abnormal data. In the local association learning stage, the Inception structure synchronously processes feature learning of different scales by using convolution kernels of different sizes (such as 1x1, 3x3, 5x5, etc.) in parallel, wherein a larger convolution kernel (such as 5x5) is used to capture the global spatial context, that is, the global detail preference, while a smaller convolution kernel (such as 1x1, 3x3) is used to learn finer local details. This multi-scale method not only solves the problem of traditional convolution kernel size selection, but also the Inception structure can synchronously pay attention to the association of broadband oscillation data at different spatial scales, and can simultaneously pay attention to the global and local features of the sample.
[0093] In the specific implementation process, this embodiment inputs the broadband oscillation missing and abnormal data set into the first Inception module of the local association learning stage. The first Inception module performs a convolution operation on the input broadband oscillation missing and abnormal data set through a smaller convolution kernel (such as 1x1, 3x3) to learn and capture small-scale spatial feature associations, that is, local detail preferences in the broadband oscillation missing and abnormal data set, and generates a corresponding feature map. Then, a larger convolution kernel (such as 5x5) is used to further learn and extract the spatial distribution characteristics of these local detail preferences, further enhancing the comprehensiveness of feature expression. In order to reduce the redundancy of the feature map and extract the most important features, the result of the convolution operation is subjected to maximum pooling, and the output result is divided into two parts: the first part is the convolution results of different convolution kernels (feature maps generated by different convolution kernels), and these convolution results are directly input into the skip layer connection part to retain and enhance the edge and detail information that may be lost during the network downsampling process; the second part is the result of the maximum pooling process, and the maximum pooling is used to reduce redundancy and interference and highlight the most important features. The specific calculation process can be expressed as the following formula:
[0094]
[0095]
[0096] In the formula, The multi-scale feature map output by the Inception module (the first Inception module) in the first downsampling layer; for The convolution operation of i=1, 3, 5 is 1*1, 1*3, 1*5 convolution operation; Is the input of the first Inception module; This is the maximum pooling result output by the first Inception module; It is the maximum pooling operation.
[0097] In this embodiment, the maximum pooling result output by the first Inception module in the local association learning stage is input into the second Inception module. The second Inception module is used to learn the larger scale spatial feature association of the input data. Compared with the first Inception module, the second Inception module uses a larger convolution kernel, so that it can better learn the larger size detail preference and its spatial distribution characteristics. The output mode of the second Inception module is the same as that of the first Inception module. The result output by the second Inception module also includes the convolution results of different convolution kernels and the maximum pooling result. The specific calculation process can be expressed as the following formula:
[0098]
[0099]
[0100] In the formula, The multi-scale feature map output by the Inception module (the second Inception module) in the second downsampling layer; This is the maximum pooling result output by the second Inception module.
[0101] It should be noted that in the local association learning stage, the Inception structure includes convolution kernels of different sizes. The generation results of different convolution kernels cannot correspond more efficiently to the two stages of local association learning. Therefore, in the global and detail preference learning stages, the input results of the skip-layer connection have certain redundancy, which increases the fitting difficulty and reduces the recovery effect of missing and abnormal data. In order to solve the feature redundancy problem generated by the above-mentioned convolution kernels of different scales and improve the effect of missing and abnormal data recovery, this embodiment introduces a spatial attention mechanism of multi-channel feature fusion in the local feature learning stage. This multi-channel feature fusion spatial attention mechanism learns the key information captured by the small, medium and large convolution kernels in the Inception structure through the upper, middle and lower three-layer channels, respectively, adopts a mixed pooling strategy to retain more diverse feature types, and optimizes the goals of different learning stages through the weight initialization and preference adjustment mechanism, which not only reduces the interference of redundant features, but also avoids the loss of detail information, thereby improving the overall data recovery performance. Figure 4 As shown, the multi-scale feature fusion spatial attention mechanism includes a feature input layer, a convolution module, a feature reshaping layer, a pooling module, a weight initialization layer, a detail preference learning module, a multi-channel spatial attention mechanism, a nonlinear transformation layer and a fully connected layer connected in sequence; in some embodiments of the present invention, the convolution module includes a plurality of convolution layers connected in parallel; the convolution kernel size of each convolution layer is different; the pooling module includes an average pooling layer, a mixed pooling layer and a maximum pooling layer corresponding to convolution layers of different sizes; wherein the mixed pooling layer includes an average pooling operation and a maximum pooling operation; the detail preference learning module includes a local detail preference learning layer, a baseline detail preference learning layer and a global detail preference learning layer; different channel spatial attention mechanisms of the multi-channel spatial attention mechanism are connected to the local detail preference learning layer, the baseline detail preference learning layer and the global detail preference learning layer in a one-to-one correspondence, and each channel spatial attention mechanism is connected to the baseline detail preference learning layer, so as to correct and balance the detail preference features output by the local detail preference learning layer and the global detail preference learning layer through the baseline detail preference learning layer.
[0102] In some embodiments of the present invention, the step of performing different scale detail preference learning on the multi-scale feature map through the multi-scale feature fusion spatial attention mechanism to obtain a multi-scale feature fusion encoding result includes:
[0103] The multi-scale feature maps are convolved in parallel through multiple convolution kernels of different sizes in each convolution layer of the convolution module to obtain a broadband oscillating convolution result output by each convolution layer;
[0104] Reshape different broadband oscillation convolution results into multiple parallel reshape feature matrices, and use maximum pooling, mixed pooling and average pooling methods to perform pooling operations on the reshape feature matrices in parallel to obtain multi-scale pooling feature maps;
[0105] Assigning different weights to the multi-scale pooling feature map to obtain broadband oscillation preference information of different convolution scales;
[0106] Different types of detail preference learning are performed on broadband oscillation preference information of different convolution scales to obtain corresponding local detail preference features, baseline detail preference features and global detail preference features;
[0107] The local detail preference feature, the baseline detail preference feature and the global detail preference feature are respectively input into the corresponding channel space attention mechanism, and the baseline detail preference feature is input into all channel space attention mechanisms as supplementary information, and the local detail preference learning result and the global detail preference learning result are corrected to obtain a multi-channel fusion encoding result;
[0108] The multi-channel fusion coding results are nonlinearly transformed and skip-layer connection coding is performed through a fully connected layer to obtain a multi-scale feature fusion coding result.
[0109] In order to clearly understand the multi-scale feature fusion spatial attention mechanism, the specific implementation process of the multi-scale feature fusion spatial attention mechanism is as follows:
[0110] Reshape the feature matrix: First, reshape the multi-scale feature maps output by convolution kernels of different sizes into multiple parallel feature matrices with fixed dimensions to ensure that the global and local detail preferences learned from different convolution kernels are evenly distributed in their respective feature matrices. The specific calculation process can be expressed as the following formula:
[0111]
[0112]
[0113] In the formula, is the result of broadband oscillation convolution; The multi-scale feature map output by the inception module of the corresponding layer; Reshape the result for the feature; For Perform one-dimensional processing.
[0114] Pooling operation: According to the characteristics of global and detail preferences (feature matrix), maximum pooling, hybrid pooling and average pooling methods are used respectively to balance the retention of global information and local details, while reducing the redundancy of the feature matrix. It should be noted that hybrid pooling combines the advantages of average pooling and maximum pooling, overcoming the disadvantages of possible feature loss caused by maximum pooling and easy introduction of noise by average pooling, thereby more effectively capturing and retaining key information.
[0115] Weight initialization: This embodiment uses the weight initialization layer to dynamically adjust the focus of different learning stages, according to the characteristics of different stages of the learning needs (for example, the first stage focuses more on local detail preferences, Set higher weights, and the second stage will focus more on global detail preferences. Set higher weights) to distribute weights to reduce the risk of overfitting. The specific calculation process can be expressed as the following formula:
[0116]
[0117] In the formula, For broadband oscillation preference information; Set function for weights; It is a multi-scale pooling feature map.
[0118] Channel spatial attention mechanism: The encoded different detail preferences are input into different channel spatial attention mechanisms, and the information weight of each position is dynamically adjusted through spatial transformation. A weight mask is generated and weighted output is performed to enhance key features and suppress redundant features. It should be noted that in order to solve the imbalance problem between local and global detail preferences in feature strength, a baseline detail preference is introduced for adjustment. The baseline detail preference is input into all spatial attention mechanism channels to suppress redundancy in local details and supplement possible missing information in global details, further improving the quality of data recovery.
[0119] Finally, nonlinear transformation and full connection operations are performed on the encoding results of different channels to complete the encoding process of all skip-layer connections. Through the above method, the local association learning stage uses the Inception structure to encode the multi-scale local detail features of the broadband oscillation samples, which can effectively extract rich multi-scale local features from the broadband oscillation samples, while reducing redundancy and improving the recovery of missing and abnormal data, laying a solid foundation for subsequent global sequence association learning and data repair.
[0120] In summary, in response to the missing and abnormal data problems existing in broadband oscillation data, this embodiment adopts a two-stage repair strategy based on the classic U-Net architecture. The two-stage strategy mainly repairs data through two different learning stages: the local association learning stage and the global sequence association learning stage. In the local association learning stage, the local association learning stage mainly focuses on learning local features from different scales, and captures local detail features of different scales by introducing the Inception structure. The spatial attention mechanism of multi-channel feature fusion enables the network to adaptively focus on the local details that are most critical to the repair task, so as to achieve preference learning for details of different scales, so that the model can better understand and repair missing or abnormal data in local areas.
[0121] On the basis of the local association learning stage, the global sequence association learning stage uses a bidirectional long short-term memory network (BiLSTM) to learn the trunk sequence change characteristics of broadband oscillation data in the time dimension. The bidirectional characteristics of BiLSTM can capture the forward and backward information of the data sequence, thereby more accurately capturing the periodicity, trend and potential mutation points of the oscillation. In addition, in order to further strengthen the establishment of time association, this embodiment introduces a multi-head attention mechanism to strengthen the time association establishment process of the skip-layer connection. The model can more accurately identify and repair outliers in the time series. In this embodiment, the step of inputting the local association learning space feature into the global sequence association learning stage for global sequence association learning to obtain the global sequence association learning result includes:
[0122] A bidirectional long short-term memory network at the end of the downsampling layer is used to establish a forward and backward sequence representation of the local association learning space feature to obtain a broadband oscillation bidirectional sequence feature map;
[0123] The broadband oscillation bidirectional sequence feature map is transmitted to the multi-head attention mechanism through a skip connection, and the multi-head attention mechanism is used to strengthen the time association establishment process of the skip layer connection to obtain a weighted sequence feature map;
[0124] The weighted sequence feature map is input into the bidirectional long short-term memory network of the first upsampling layer of the U-Net structure, and an upsampling operation is performed through the bidirectional long short-term memory network of the first upsampling layer to generate a global sequence association learning result.
[0125] Specifically, in the data repair problem of processing broadband oscillation samples, this embodiment adopts a bidirectional long short-term memory network (BiLSTM) structure in the global sequence association learning stage to encode the sequence characteristics of the sample. The BiLSTM structure establishes forward and backward representations of the sequence data through a bidirectional structure. The BiLSTM structure uses the maximum pooling result of the last Inception module in the local association learning stage as input, and then the BiLSTM encodes the input data through two independent long short-term memory networks (LSTM) to obtain the front and backward representations of the time series. One LSTM layer is used for forward sequence processing, and the other LSTM layer is used for backward sequence processing. This bidirectional processing method enables the network to simultaneously The context information in the sequence data is captured to output the feature construction results of the global sequence association. These results contain rich forward and backward representations of the time series data, reflecting the time series characteristics of the broadband oscillation samples. Although BiLSTM can effectively establish forward and backward representations of the time series data, it still cannot accurately identify the importance of features at different time steps. To solve this problem, this embodiment introduces a multi-head attention mechanism in the global sequence association learning stage. The multi-head attention mechanism can identify the key change points in the oscillation information by strengthening the time association establishment process of the skip-layer connection, and give higher weights to the time series change characteristics of these important moments, thereby improving the accuracy of the model in capturing trend changes during the recovery of missing and abnormal data.
[0126] It should be noted that the upsampling process is the inverse process of downsampling. The main difference is that the upsampling process uses a deconvolution operation instead of the maximum pooling process in the downsampling process. In the upsampling stage, local association learning and global sequence association learning are performed in the same way, which will not be repeated here. The upsampling stage restores the spatial resolution of the sample through a deconvolution operation, while maintaining the feature information obtained in the local and sequence association learning stages to restore the integrity of the broadband oscillation sample. Through the above method, this embodiment combines the BiLSTM structure and the multi-head attention mechanism, which not only improves the modeling ability of time series characteristics, but also enhances the recognition of major moments of changes in oscillation information, thereby significantly improving the accuracy and efficiency of data repair.
[0127] In summary, the two-stage method based on U-Net adopted in this embodiment not only retains the advantages of the classic U-Net structure, such as rich feature expression and insensitivity to missing length, but also improves the ability to repair missing and abnormal data in broadband oscillation samples through local and global learning. In particular, for the characteristics of broadband oscillation data, the sub-synchronous oscillation component is used as the backbone of the data, while the super-synchronous oscillation component is used as the detail of the data. According to the characteristics of broadband oscillation data, this embodiment combines local association learning and backbone association feature construction to effectively repair missing and abnormal data in broadband oscillation samples and improve data integrity and availability. In order to verify the repair effect of broadband oscillation missing and abnormal data proposed in this embodiment, the original broadband oscillation data is used as a comparison benchmark, and a comparative experiment with other data repair schemes is designed, including the mean method, linear interpolation method, mean regression method, k-Nearest Neighbor (kNN) algorithm, etc. The experimental hyperparameter settings are shown in Table 1:
[0128] Table 1
[0129]
[0130] The mean absolute error (MAE) is used as the evaluation index to measure the data repair differences of different schemes. The results are as follows: Figure 5 , Figure 6 As shown in the figure, the repair method proposed in this embodiment has the best MAE performance under different missing forms and missing rate backgrounds. Specifically, under the background of random point missing, the MAE average of the repair method proposed in this embodiment for a missing rate of 10% is only 0.051, which is at least 43.95% lower than other solutions. As the missing rate increases, the MAE of the repair method proposed in this embodiment increases less, and the MAE is only 0.085 under the background of a missing rate of 30%, which is at least 37.04% lower than other solutions. Under the background of random continuous missing, the repair method proposed in this embodiment also has a high repair accuracy: the MAE averages under the background of missing rates of 10%, 20%, and 30% are 0.065, 0.074, and 0.104, respectively, which are at least 13.26%, 30.28%, and 25.71% lower than traditional repair solutions, and the effect is very significant.
[0131] An embodiment of the present invention provides a method for repairing broadband oscillation data of a new energy grid-connected system. The method comprises simulating a new energy grid-connected system by using a simulation model to obtain an original broadband oscillation data set, and preprocessing the original broadband oscillation data set to obtain a preprocessed broadband oscillation data set; simulating and generating a broadband oscillation missing and abnormal data set based on the preprocessed broadband oscillation data set; and repairing the broadband oscillation missing and abnormal data set by using a local-global two-stage association learning repair model to obtain broadband oscillation repair data. Compared with the prior art, the repair method proposed in this embodiment introduces the U-Net structure into the field of broadband oscillation missing and abnormal data repair, obtains richer feature expression capabilities, and retains the edge information effect lost in the downsampling process. At the same time, the broadband oscillation missing and abnormal data repair is divided into two stages: detail feature learning and trunk feature learning. The Inception structure is introduced in the local association learning stage to realize the synchronous attention of spatial associations of different scales, and the multi-channel feature fusion spatial attention mechanism is introduced in the skip-layer connection process to enhance the coding efficiency; the BiLSTM structure is introduced in the sequence association learning stage to establish forward and backward representations of sequence data, and the multi-head attention mechanism is introduced in the skip-layer connection process to reasonably allocate weights for different time series change features, which jointly improves the accuracy of broadband oscillation sample missing and abnormal data repair, enhances the model's learning ability for complex spatial patterns in broadband oscillation data, and realizes an efficient and accurate broadband oscillation data repair method.
[0132] It should be noted that the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0133] In one embodiment, Figure 7 As shown, an embodiment of the present invention provides a system for repairing broadband oscillation data of a new energy grid-connected system, the system comprising:
[0134] The data acquisition module 101 is used to simulate the new energy grid-connected system using a simulation model to obtain an original broadband oscillation data set, and pre-process the original broadband oscillation data set to obtain a pre-processed broadband oscillation data set;
[0135] The data generation module 102 is used to simulate and generate a broadband oscillation missing and abnormal data set according to the pre-processed broadband oscillation data set; wherein the broadband oscillation missing and abnormal data set includes random point missing broadband oscillation data, random continuous missing broadband oscillation data and simulated abnormal broadband oscillation data;
[0136] The data repair module 103 is used to repair the broadband oscillation missing and abnormal data set by using a local-global two-stage association learning repair model to obtain broadband oscillation repair data.
[0137] In this embodiment, the local-global two-stage association learning and repair model uses the U-Net structure as the basic network architecture, and the local-global two-stage association learning and repair model includes a local association learning stage and a global sequence association learning stage;
[0138] The local association learning stage includes an Inception module embedded in each downsampling layer of the U-Net structure, an Inception module embedded in each upsampling layer of the U-Net structure, and a multi-scale feature fusion spatial attention mechanism set at the jump connection between the upsampling and downsampling layers of the U-Net structure; the Inception module includes multiple parallel convolutional layers, each convolutional layer has convolution kernels of different scales;
[0139] The global sequence association learning stage includes a bidirectional long short-term memory network located in the last downsampling layer of the U-Net structure, a bidirectional long short-term memory network located in the first upsampling layer of the U-Net structure, and a multi-head attention mechanism introduced at the jump connection between the last downsampling layer and the first upsampling layer of the U-Net structure.
[0140] In this embodiment, the data repair module is specifically used for:
[0141] Input the broadband oscillation missing and abnormal data set into the Inception module in the first downsampling layer of the U-Net structure to extract multi-scale local detail features, and obtain a maximum pooling result and a multi-scale feature map;
[0142] The multi-scale feature map is transferred to the multi-scale feature fusion spatial attention mechanism through a jump connection, and the multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result;
[0143] In each downsampling layer of the local association learning stage, the Inception module is used to perform spatial feature association learning of different convolutional scales on the maximum pooling result output by the previous downsampling layer to obtain the local association learning spatial features;
[0144] Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result;
[0145] The global sequence association learning result is subjected to a deconvolution operation to obtain an upsampled feature map, and the upsampled feature map is upsampled step by step through multiple upsampling layers in the local association learning stage, and at each upsampling level, it is connected with the multi-scale feature fusion encoding result of the corresponding level to output broadband oscillation repair data.
[0146] In this embodiment, in each downsampling layer in the local association learning stage, the convolution scale of the Inception module in the next downsampling layer is larger than the convolution scale of the Inception module in the previous downsampling layer.
[0147] In this embodiment, the multi-scale feature fusion spatial attention mechanism includes a feature input layer, a convolution module, a feature reshaping layer, a pooling module, a weight initialization layer, a detail preference learning module, a multi-channel spatial attention mechanism, a nonlinear conversion layer and a fully connected layer connected in sequence;
[0148] The convolution module includes a plurality of convolution layers connected in parallel; the convolution kernel size of each convolution layer is different;
[0149] The pooling module includes an average pooling layer, a mixed pooling layer and a maximum pooling layer corresponding to convolutional layers of different sizes; wherein the mixed pooling layer includes an average pooling operation and a maximum pooling operation;
[0150] The detail preference learning module includes a local detail preference learning layer, a baseline detail preference learning layer and a global detail preference learning layer; different channel spatial attention mechanisms of the multi-channel spatial attention mechanism are connected to the local detail preference learning layer, the baseline detail preference learning layer and the global detail preference learning layer in a one-to-one correspondence, and each channel spatial attention mechanism is connected to the baseline detail preference learning layer to correct and balance the detail preference features output by the local detail preference learning layer and the global detail preference learning layer through the baseline detail preference learning layer.
[0151] In this embodiment, the multi-scale feature fusion spatial attention mechanism is used to perform detail preference learning of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result, which specifically includes:
[0152] The multi-scale feature maps are convolved in parallel through multiple convolution kernels of different sizes in each convolution layer of the convolution module to obtain a broadband oscillating convolution result output by each convolution layer;
[0153] Reshape different broadband oscillation convolution results into multiple parallel reshape feature matrices, and use maximum pooling, mixed pooling and average pooling methods to perform pooling operations on the reshape feature matrices in parallel to obtain multi-scale pooling feature maps;
[0154] Assigning different weights to the multi-scale pooling feature map to obtain broadband oscillation preference information of different convolution scales;
[0155] Different types of detail preference learning are performed on broadband oscillation preference information of different convolution scales to obtain corresponding local detail preference features, baseline detail preference features and global detail preference features;
[0156] The local detail preference feature, the baseline detail preference feature and the global detail preference feature are respectively input into the corresponding channel space attention mechanism, and the baseline detail preference feature is input into all channel space attention mechanisms as supplementary information, and the local detail preference learning result and the global detail preference learning result are corrected to obtain a multi-channel fusion encoding result;
[0157] The multi-channel fusion coding results are nonlinearly transformed and skip-layer connection coding is performed through a fully connected layer to obtain a multi-scale feature fusion coding result.
[0158] In this embodiment, the local association learning space feature is input into the global sequence association learning stage to perform global sequence association learning, and a global sequence association learning result is obtained, which specifically includes:
[0159] A bidirectional long short-term memory network at the end of the downsampling layer is used to establish a forward and backward sequence representation of the local association learning space feature to obtain a broadband oscillation bidirectional sequence feature map;
[0160] The broadband oscillation bidirectional sequence feature map is transmitted to the multi-head attention mechanism through a skip connection, and the multi-head attention mechanism is used to strengthen the time association establishment process of the skip layer connection to obtain a weighted sequence feature map;
[0161] The weighted sequence feature map is input into the bidirectional long short-term memory network of the first upsampling layer of the U-Net structure, and an upsampling operation is performed through the bidirectional long short-term memory network of the first upsampling layer to generate a global sequence association learning result.
[0162] For the specific definition of a repair system for broadband oscillation data of a new energy grid-connected, please refer to the above-mentioned definition of a method for repairing broadband oscillation data of a new energy grid-connected, which will not be repeated here. A person of ordinary skill in the art can appreciate that the various modules and steps described in conjunction with the embodiments disclosed in this application can be implemented in hardware, software, or a combination of both. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0163] The embodiment of the present invention provides a repair system for broadband oscillation data of new energy grid-connected, wherein the system obtains an original broadband oscillation data set through a data acquisition module, and pre-processes the original broadband oscillation data set to obtain a pre-processed broadband oscillation data set; the data generation module simulates and generates a broadband oscillation missing and abnormal data set according to the pre-processed broadband oscillation data set; the data repair module repairs the broadband oscillation missing and abnormal data set using a local-global two-stage association learning repair model to obtain broadband oscillation repair data. Compared with the prior art, the repair system of this embodiment introduces a U-Net structure into the field of broadband oscillation missing and abnormal data repair, and divides the broadband oscillation missing and abnormal data repair into two stages: detail feature learning and trunk feature learning. In the local association learning stage, the Inception structure is introduced to realize the synchronous attention of spatial associations of different scales, and a multi-channel feature fusion spatial attention mechanism is introduced in the skip layer connection process to enhance the coding efficiency; in the sequence association learning stage, a BiLSTM structure is introduced to establish forward and backward representations of sequence data, and a multi-head attention mechanism is introduced in the skip layer connection process to reasonably allocate weights to different time series change features, thereby jointly improving the accuracy and efficiency of broadband oscillation missing and abnormal data repair.
[0164] Figure 8 A computer device provided by an embodiment of the present invention includes a memory, a processor and a transceiver, which are connected via a bus; the memory is used to store a set of computer program instructions and data, and can transmit the stored data to the processor, and the processor can execute the program instructions stored in the memory to perform the steps of the above method.
[0165] The memory may include a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories; the processor may be a central processing unit, a microprocessor, an application-specific integrated circuit, a programmable logic device, or a combination thereof. By way of example but not limitation, the programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0166] Additionally, the memory may be a physically separate unit or may be integrated with the processor.
[0167] It can be understood by those skilled in the art that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have the same component arrangement.
[0168] In one embodiment, the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0169] The embodiments of the present invention provide a method, system, device and medium for repairing broadband oscillation data of a new energy grid-connected system. The method for repairing broadband oscillation data of a new energy grid-connected system fully considers the characteristics of the main body and detail components of the broadband oscillation data, and designs a missing and abnormal repair method based on step-by-step feature coding to enhance the ability to build associations between missing and abnormal data, improve the accuracy of repairing missing and abnormal data, thereby improving the accuracy and reliability of locating broadband oscillation sources, and enhancing the stability of the power system when facing broadband oscillations and the grid-connected transmission efficiency of new energy bases.
[0170] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD), etc.
[0171] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0172] The above-mentioned embodiments only express several preferred implementation modes of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in the technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be regarded as the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be based on the protection scope of the claims.
Claims
1. A method for repairing broadband oscillation data of new energy grid-connected power, characterized in that: The following steps are involved: Simulating a new energy grid-connected system using a simulation model to obtain an original broadband oscillation data set, and preprocessing the original broadband oscillation data set to obtain a preprocessed broadband oscillation data set; According to the pre-processed broadband oscillation data set, a broadband oscillation missing and abnormal data set is simulated and generated; wherein the broadband oscillation missing and abnormal data set includes random point missing broadband oscillation data, random continuous missing broadband oscillation data and simulated abnormal broadband oscillation data; Using a local-global two-stage association learning repair model to repair the broadband oscillation missing and abnormal data set, to obtain broadband oscillation repair data; The local-global two-stage association learning and repair model uses the U-Net structure as the basic network architecture, and the local-global two-stage association learning and repair model includes a local association learning stage and a global sequence association learning stage; The local association learning stage includes an Inception module embedded in each downsampling layer of the U-Net structure, an Inception module embedded in each upsampling layer of the U-Net structure, and a multi-scale feature fusion spatial attention mechanism set at the jump connection between the upsampling and downsampling layers of the U-Net structure; the Inception module includes multiple parallel convolutional layers, each convolutional layer has convolution kernels of different scales; The global sequence association learning stage includes a bidirectional long short-term memory network located in the last downsampling layer of the U-Net structure, a bidirectional long short-term memory network located in the first upsampling layer of the U-Net structure, and a multi-head attention mechanism introduced at the jump connection between the last downsampling layer and the first upsampling layer of the U-Net structure.
2. A method for repairing broadband oscillation data of new energy grid-connected power as claimed in claim 1, characterized in that: The step of repairing the broadband oscillation missing and abnormal data set by using the local-global two-stage association learning repair model to obtain broadband oscillation repair data includes: Input the broadband oscillation missing and abnormal data set into the Inception module in the first downsampling layer of the U-Net structure to extract multi-scale local detail features, and obtain a maximum pooling result and a multi-scale feature map; The multi-scale feature map is transferred to the multi-scale feature fusion spatial attention mechanism through a jump connection, and the multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result; In each downsampling layer of the local association learning stage, the Inception module is used to perform spatial feature association learning of different convolutional scales on the maximum pooling result output by the previous downsampling layer to obtain the local association learning spatial features; Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result; The global sequence association learning result is subjected to a deconvolution operation to obtain an upsampled feature map, and the upsampled feature map is upsampled step by step through multiple upsampling layers in the local association learning stage, and at each upsampling level, it is connected with the multi-scale feature fusion encoding result of the corresponding level to output broadband oscillation repair data.
3. A method for repairing broadband oscillation data of a new energy grid-connected system as claimed in claim 2, characterized in that: In each downsampling layer in the local association learning stage, the convolution scale of the Inception module in the next downsampling layer is larger than the convolution scale of the Inception module in the previous downsampling layer.
4. A method for repairing broadband oscillation data of a new energy grid-connected system as claimed in claim 2, characterized in that: The multi-scale feature fusion spatial attention mechanism includes a feature input layer, a convolution module, a feature reshaping layer, a pooling module, a weight initialization layer, a detail preference learning module, a multi-channel spatial attention mechanism, a nonlinear conversion layer and a fully connected layer connected in sequence; The convolution module includes a plurality of convolution layers connected in parallel; the convolution kernel size of each convolution layer is different; The pooling module includes an average pooling layer, a mixed pooling layer and a maximum pooling layer corresponding to convolutional layers of different sizes; wherein the mixed pooling layer includes an average pooling operation and a maximum pooling operation; The detail preference learning module includes a local detail preference learning layer, a baseline detail preference learning layer and a global detail preference learning layer; different channel spatial attention mechanisms of the multi-channel spatial attention mechanism are connected to the local detail preference learning layer, the baseline detail preference learning layer and the global detail preference learning layer in a one-to-one correspondence, and each channel spatial attention mechanism is connected to the baseline detail preference learning layer to correct and balance the detail preference features output by the local detail preference learning layer and the global detail preference learning layer through the baseline detail preference learning layer.
5. A method for repairing broadband oscillation data of new energy grid-connected power as claimed in claim 4, characterized in that: The step of performing different scale detail preference learning on the multi-scale feature map through the multi-scale feature fusion spatial attention mechanism to obtain a multi-scale feature fusion encoding result comprises: The multi-scale feature maps are convolved in parallel through multiple convolution kernels of different sizes in each convolution layer of the convolution module to obtain a broadband oscillating convolution result output by each convolution layer; Reshape different broadband oscillation convolution results into multiple parallel reshape feature matrices, and use maximum pooling, mixed pooling and average pooling methods to perform pooling operations on the reshape feature matrices in parallel to obtain multi-scale pooling feature maps; Assigning different weights to the multi-scale pooling feature map to obtain broadband oscillation preference information of different convolution scales; Different types of detail preference learning are performed on broadband oscillation preference information of different convolution scales to obtain corresponding local detail preference features, baseline detail preference features and global detail preference features; The local detail preference feature, the baseline detail preference feature and the global detail preference feature are respectively input into the corresponding channel space attention mechanism, and the baseline detail preference feature is input into all channel space attention mechanisms as supplementary information, and the local detail preference learning result and the global detail preference learning result are corrected to obtain a multi-channel fusion encoding result; The multi-channel fusion coding results are nonlinearly transformed and skip-layer connection coding is performed through a fully connected layer to obtain a multi-scale feature fusion coding result.
6. A method for repairing broadband oscillation data of new energy grid-connected power as claimed in claim 2, characterized in that: The step of inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result comprises: A bidirectional long short-term memory network at the end of the downsampling layer is used to establish a forward and backward sequence representation of the local association learning space feature to obtain a broadband oscillation bidirectional sequence feature map; The broadband oscillation bidirectional sequence feature map is transmitted to the multi-head attention mechanism through a skip connection, and the multi-head attention mechanism is used to strengthen the time association establishment process of the skip layer connection to obtain a weighted sequence feature map; The weighted sequence feature map is input into the bidirectional long short-term memory network of the first upsampling layer of the U-Net structure, and an upsampling operation is performed through the bidirectional long short-term memory network of the first upsampling layer to generate a global sequence association learning result.
7. A repair system for broadband oscillation data of new energy grid-connected power, characterized in that: The system comprises: A data acquisition module, used for simulating a new energy grid-connected system using a simulation model to obtain an original broadband oscillation data set, and preprocessing the original broadband oscillation data set to obtain a preprocessed broadband oscillation data set; A data generation module, used for simulating and generating a broadband oscillation missing and abnormal data set according to the pre-processed broadband oscillation data set; wherein the broadband oscillation missing and abnormal data set includes random point missing broadband oscillation data, random continuous missing broadband oscillation data and simulated abnormal broadband oscillation data; A data repair module, used to repair the broadband oscillation missing and abnormal data set by using a local-global two-stage association learning repair model to obtain broadband oscillation repair data; The local-global two-stage association learning and repair model uses the U-Net structure as the basic network architecture, and the local-global two-stage association learning and repair model includes a local association learning stage and a global sequence association learning stage; The local association learning stage includes an Inception module embedded in each downsampling layer of the U-Net structure, an Inception module embedded in each upsampling layer of the U-Net structure, and a multi-scale feature fusion spatial attention mechanism set at the jump connection between the upsampling and downsampling layers of the U-Net structure; the Inception module includes multiple parallel convolutional layers, each convolutional layer has convolution kernels of different scales; The global sequence association learning stage includes a bidirectional long short-term memory network located in the last downsampling layer of the U-Net structure, a bidirectional long short-term memory network located in the first upsampling layer of the U-Net structure, and a multi-head attention mechanism introduced at the jump connection between the last downsampling layer and the first upsampling layer of the U-Net structure.
8. A repair system for broadband oscillation data of new energy grid-connected according to claim 7, characterized in that: The data repair module is specifically used for: Input the broadband oscillation missing and abnormal data set into the Inception module in the first downsampling layer of the U-Net structure to extract multi-scale local detail features, and obtain a maximum pooling result and a multi-scale feature map; The multi-scale feature map is transferred to the multi-scale feature fusion spatial attention mechanism through a jump connection, and the multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result; In each downsampling layer of the local association learning stage, the Inception module is used to perform spatial feature association learning of different convolutional scales on the maximum pooling result output by the previous downsampling layer to obtain the local association learning spatial features; Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning to obtain a global sequence association learning result; The global sequence association learning result is subjected to a deconvolution operation to obtain an upsampled feature map, and the upsampled feature map is upsampled step by step through multiple upsampling layers in the local association learning stage, and at each upsampling level, it is connected with the multi-scale feature fusion encoding result of the corresponding level to output broadband oscillation repair data.
9. A repair system for broadband oscillation data of new energy grid-connected power as claimed in claim 8, characterized in that: In each downsampling layer in the local association learning stage, the convolution scale of the Inception module in the next downsampling layer is larger than the convolution scale of the Inception module in the previous downsampling layer.
10. A repair system for broadband oscillation data of new energy grid-connected power as claimed in claim 8, characterized in that: The multi-scale feature fusion spatial attention mechanism includes a feature input layer, a convolution module, a feature reshaping layer, a pooling module, a weight initialization layer, a detail preference learning module, a multi-channel spatial attention mechanism, a nonlinear conversion layer and a fully connected layer connected in sequence; The convolution module includes a plurality of convolution layers connected in parallel; the convolution kernel size of each convolution layer is different; The pooling module includes an average pooling layer, a mixed pooling layer and a maximum pooling layer corresponding to convolutional layers of different sizes; wherein the mixed pooling layer includes an average pooling operation and a maximum pooling operation; The detail preference learning module includes a local detail preference learning layer, a baseline detail preference learning layer and a global detail preference learning layer; different channel spatial attention mechanisms of the multi-channel spatial attention mechanism are connected to the local detail preference learning layer, the baseline detail preference learning layer and the global detail preference learning layer in a one-to-one correspondence, and each channel spatial attention mechanism is connected to the baseline detail preference learning layer to correct and balance the detail preference features output by the local detail preference learning layer and the global detail preference learning layer through the baseline detail preference learning layer.
11. A repair system for broadband oscillation data of new energy grid-connected power as claimed in claim 10, characterized in that: The multi-scale feature fusion spatial attention mechanism is used to learn the preference of details of different scales on the multi-scale feature map to obtain a multi-scale feature fusion encoding result, which specifically includes: The multi-scale feature maps are convolved in parallel through multiple convolution kernels of different sizes in each convolution layer of the convolution module to obtain a broadband oscillating convolution result output by each convolution layer; Reshape different broadband oscillation convolution results into multiple parallel reshape feature matrices, and use maximum pooling, mixed pooling and average pooling methods to perform pooling operations on the reshape feature matrices in parallel to obtain multi-scale pooling feature maps; Assigning different weights to the multi-scale pooling feature map to obtain broadband oscillation preference information of different convolution scales; Different types of detail preference learning are performed on broadband oscillation preference information of different convolution scales to obtain corresponding local detail preference features, baseline detail preference features and global detail preference features; The local detail preference feature, the baseline detail preference feature and the global detail preference feature are respectively input into the corresponding channel space attention mechanism, and the baseline detail preference feature is input into all channel space attention mechanisms as supplementary information, and the local detail preference learning result and the global detail preference learning result are corrected to obtain a multi-channel fusion encoding result; The multi-channel fusion coding results are nonlinearly transformed and skip-layer connection coding is performed through a fully connected layer to obtain a multi-scale feature fusion coding result.
12. A repair system for broadband oscillation data of new energy grid-connected power as claimed in claim 8, characterized in that: Inputting the local association learning space feature into the global sequence association learning stage to perform global sequence association learning, and obtaining a global sequence association learning result, specifically includes: A bidirectional long short-term memory network at the end of the downsampling layer is used to establish a forward and backward sequence representation of the local association learning space feature to obtain a broadband oscillation bidirectional sequence feature map; The broadband oscillation bidirectional sequence feature map is transferred to the multi-head attention mechanism through a skip connection, and the multi-head attention mechanism is used to strengthen the time association establishment process of the skip layer connection to obtain a weighted sequence feature map; The weighted sequence feature map is input into the bidirectional long short-term memory network of the first upsampling layer of the U-Net structure, and an upsampling operation is performed through the bidirectional long short-term memory network of the first upsampling layer to generate a global sequence association learning result.
13. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the computer device executes the method according to any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Broadband oscillation data set enhancement method of double generative adversarial networks
CN115758149A
Multi-scale global information fusion neural network seismic data low-frequency reconstruction method
CN117631028A