Source-charge extreme scene identification method based on deep learning feature extraction

Through the deep learning feature extraction method, a source-load extreme scene identification model based on GCNN-ResNet and multi-level attention mechanism was constructed, which solved the problem of insufficient timing and universality of extreme scene identification in the existing technology, and achieved high accuracy and universal extreme scene identification.

CN119089173APending Publication Date: 2024-12-06CHINA SOUTHERN POWER GRID COMPANY +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411211801.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology ignores the timing of the changes in the output and load magnitude of new energy in extreme scene identification. The scenes separated by clustering method do not necessarily reflect extremes. The threshold method is not universal and has artificial errors, and lacks reliable extreme scene identification. method.

Method used

Using a deep learning-based feature extraction method, the source-load extreme scene identification model is constructed through GCNN-ResNet and multi-level attention mechanism. Combining seasonal information, climate information and expert experience, the improved loss function and SGDM optimizer are used to train the model to Identify different types of extreme scenes.

Benefits of technology

Without presuming thresholds, different types of extreme scenes can be effectively identified, and multiple scene features can be fully extracted, solving the problem of coupling relationship between timing characteristics and source-load scenes, and improving identification accuracy and universality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089173A_ABST
    Figure CN119089173A_ABST
Patent Text Reader

Abstract

The invention discloses a source-charge extreme scene identification method based on deep learning feature extraction. The method comprises the following steps: acquiring historical output data of wind power, photovoltaic power and load, dividing a training set and a test set, and carrying out per-unit processing on the training set and the test set; information such as season information, weather information and expert experience is comprehensively considered, and corresponding labels are given to the scene; establishing a source charge extreme scene identification model, extracting wind-light-charge scene features by using a GCNN-ResNet network and accelerating the convergence speed of the extreme scene identification model, and highlighting the extracted features by using a multi-head attention mechanism; training an extreme scene identification model by using the training set; and testing the trained model based on the test set, and verifying the effectiveness of the method. According to the invention, multiple features of the scene can be comprehensively extracted by using the source-charge extreme scene identification model constructed based on the deep learning method, and full learning of the source-charge extreme scene features is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of extreme scene identification, and specifically relates to a source load extreme scene identification method based on deep learning feature extraction. Background Art

[0002] Driven by the goal of building a new power system and achieving "dual carbon", a high proportion of new energy access to the grid is one of the typical characteristics of the new power system. However, as the penetration rate of new energy continues to increase, the output of new energy shows strong volatility and intermittency under extreme weather conditions. Coupled with the uncertainty of changes in demand on the load side, the imbalance between supply and demand in the power system is becoming increasingly prominent, and it will face more severe challenges in supply and consumption, which are specifically manifested in large-scale load shedding and large-scale wind and solar abandonment. Therefore, it is necessary to consider extreme scenario identification methods that take into account both the source and the load, select the most extreme scenario set from the massive scenarios, and provide scenario input for the power and electricity balance analysis of the new power system.

[0003] After searching the literature on the prior art, it is found that the current identification methods for extreme scenarios are mainly based on the boundary method, clustering method and threshold method. The document "Heuristic Optimization Algorithm for Transmission Network Expansion Planning under Large-Scale Wind Power Access" (Zhou Jinhui, Yu Yixin, Zeng Yuan. Heuristic Optimization Algorithm for Transmission Network Expansion Planning under Large-Scale Wind Power Access [J]. Automation of Electric Power Systems, 2011, 35(22): 66-70.) selects the outermost points of the Pareto solution as extreme scenarios through multiple iterations and screening. Chinese invention patent CN115795328B proposes a method and system for simultaneously generating conventional scenarios and extreme scenarios of new energy output. All renewable energy output scenarios are clustered and analyzed through the DBSCAN clustering algorithm, and noise points that are not clustered are selected as extreme scenarios. The document "A new power system planning method considering the risk of long-term supply and demand imbalance" (Jiang Haiyang, Du Ershun, Ma Jiahao, et al. A new power system planning method considering the risk of long-term supply and demand imbalance [J / OL]. Proceedings of the CSEE, 1-14 [2024-03-03].) sets the identification threshold of the low output extreme scenario as the daily average output of renewable energy is 10% lower than the rated output and the continuous low output time exceeds 48 hours.

[0004] However, the boundary method ignores the temporal nature of changes in renewable energy output and load size; the scenarios separated by the clustering method do not necessarily reflect extremes, and it is impossible to determine the types of extreme scenarios; the threshold method is not universal and needs to be defined artificially according to the specific characteristics of different regions, which results in certain errors.

[0005] In general, there is a lack of a reliable and effective solution to the problem of identifying extreme source and load scenarios. Summary of the invention

[0006] The purpose of the present invention is to solve the deficiencies existing in the above-mentioned prior art and provide a source load extreme scene identification method based on deep learning feature extraction.

[0007] The purpose of the present invention is achieved by at least one of the following technical solutions.

[0008] A method for identifying extreme source load scenarios based on deep learning feature extraction includes the following steps:

[0009] S1. Collect historical data of wind power, photovoltaic power and load in a certain area, randomly divide the original data set into training set and test set in a ratio of 8:2, and standardize all data;

[0010] S2. Combining seasonal information, climate information, scene feature information and expert experience, set the label corresponding to each source load scene in the training set and test set;

[0011] S3, build a source-load extreme scene recognition model based on GCNN-ResNet and multi-level attention mechanism;

[0012] S4. Based on different types of extreme scene training sets, the recognition models corresponding to the extreme scenes are trained respectively;

[0013] S5. Calculate the training loss value of the model based on the improved loss function;

[0014] S6, update the network weights of the model, and repeat steps S4, S5 and S6 until the model loss function converges;

[0015] S7, save the network weights after the model training is completed;

[0016] S8. Take the historical source load scenario as input, load the model weight, and the model identifies and outputs the source load extreme scenario.

[0017] Furthermore, in step S1, the original data set consists of wind power, photovoltaic, and load historical data sets, and the formula for normalizing the wind power, photovoltaic, and load historical data sets is as follows:

[0018]

[0019] Among them, x wind-norm Represents the normalized value of wind power, P wind is the actual output of wind power, P wind-installed is the installed capacity of wind power; x PV-norm Represents the normalized value of photovoltaic power generation, P PV is the actual photovoltaic output, P PV-installed is the installed capacity of photovoltaic power generation; x load-norm Represents the value after load normalization, P load is the actual load size, Pload-peak This is the maximum load throughout the year.

[0020] Furthermore, in step S2, the source-load scenario consists of a wind power scenario, a photovoltaic scenario and a load scenario. The scenario represents the changes in wind power, photovoltaics and load over a period of time. The source-load scenario is usually represented by the change curves of wind power, photovoltaics and load over this period of time. The change curves of wind power, photovoltaics and load are derived from historical data.

[0021] Furthermore, in step S2, setting a label corresponding to the scene includes the following steps:

[0022] S2.1. According to the season when the extreme scenario occurs, the scenarios that do not belong to that season are set as non-extreme scenarios, and the remaining scenarios are retained as suspected extreme scenarios;

[0023] S2.2. Based on historical weather forecast information, select scenes without extreme weather from suspected extreme scenes, set them as non-extreme scenes, and remove these non-extreme scenes from suspected extreme scenes;

[0024] S2.3. Based on the characteristics of extreme scenes, select scenes that do not have the characteristics of extreme scenes from the suspected extreme scenes, set them as non-extreme scenes, and remove these non-extreme scenes from the suspected extreme scenes;

[0025] S2.4. Finally, grid experts with rich experience in identifying extreme scenarios are asked to manually screen out extreme scenarios from suspected extreme scenarios, set the extreme scenario label to "1", and the remaining non-extreme scenario labels to "0".

[0026] Further, in step S3, a source-load extreme scene recognition model constructed based on a GCNN-ResNet network and a multi-level attention mechanism includes a sequentially connected data preprocessing module, a plurality of sequentially connected feature extraction modules, a multi-head attention mechanism module, and a classification module;

[0027] The data preprocessing module receives the input source-load scene and performs preprocessing, and passes the source-load scene tensor after data preprocessing to the feature extraction module; the feature extraction module first extracts the feature information of the source-load scene tensor, and then assigns the feature weight of each channel based on the channel attention mechanism, and finally outputs the feature information to the next feature extraction module, or flattens the feature information into a one-dimensional feature sequence after one flattening layer and outputs it to the multi-head attention mechanism module; the multi-head attention mechanism module assigns different weights to features according to their importance to highlight the feature information, and outputs the feature information after the feature is highlighted to the classification module; the classification module outputs the category to which the scene belongs according to the feature information after the feature is highlighted, and completes the identification of extreme scenes.

[0028] Furthermore, in the data preprocessing module, the one-dimensional time series of wind power, photovoltaic power and load with a shape of 1×T are reshaped into tensors of shape H×W×1, and then the tensors of wind power, photovoltaic power and load are spliced ​​in the channel dimension to obtain a source-load scenario tensor of H×W×3, which is used as the input of the feature extraction module. T, H, and W satisfy the following relationship:

[0029] T=H×W

[0030] Where T represents the length of each time series, H is the height of the tensor, and W is the width of the tensor;

[0031] The third dimension of the source-load scene tensor shape represents the number of channels of the tensor. Different channels of the source-load scene tensor represent different scene feature information.

[0032] Furthermore, the feature extraction module includes a grouped convolution-residual module and a channel attention mechanism. The grouped convolution-residual module uses a grouped convolutional neural network GCNN to group the features of different channels of the source-load scene tensor; the grouped convolution-residual module uses a residual neural network ResNet structure to accelerate the convergence speed of the extreme scene recognition model; the channel attention mechanism adaptively adjusts the weights of different channels of the source-load scene tensor;

[0033] The grouped convolution-residual module adopts a ResNet-based structure, including a convolution layer and a short-circuit channel. The convolution layer is composed of GCNN. The input tensor of the feature extraction module is directly added to the output of GCNN through the short-circuit channel. The specific calculation formula of the grouped convolution-residual module is as follows:

[0034] X fe =X+f(X)

[0035] Among them, X fe is the output tensor of the grouped convolution-residual module, X is the input tensor of the grouped convolution-residual module, that is, the source-load scene tensor; f(X) is the tensor output after feature extraction of X by the grouped convolutional neural network GCNN;

[0036] The channel attention mechanism includes a global average pooling layer and two fully connected layers. The specific calculation formula is as follows:

[0037] w = σ(W2(ReLU(W1(δ(X fe )))))

[0038]

[0039] X SE =w·X fe

[0040] Among them, X feis the input tensor of the channel attention mechanism; δ is the global average pooling operation; W1 and W2 are the weight parameters of the two fully connected layers; C is the number of tensor channels, r is the channel attenuation coefficient, is a real number set; σ is the sigmoid activation function; w is the channel attention weight vector; r is the reduction coefficient; X SE is the weighted tensor, i.e., the output tensor of the channel attention mechanism; · represents the Hadamard product.

[0041] Furthermore, the multi-head attention mechanism module includes multiple independent attention heads. Each attention head can focus on different positions in the input tensor and generate corresponding attention weights. The outputs of multiple heads are weighted and summed to obtain the feature information after feature highlighting. The specific calculation formula is as follows:

[0042]

[0043] X MultiHead =Concat(head1,head2,…,head h )W O

[0044] Among them, X SE is the input feature of the i-th attention head in the multi-head attention mechanism module; W i Q , W i K and W i V are the linear transformation parameter matrices that map the i-th attention head to the query space, key space, and value space respectively; Q i , K i and V i are the output vectors that map the input features to the query space, key space, and value space respectively; d k is the dimension of query vector and key vector; d v is the dimension of the value vector; Softmax is a classification activation function; is the scaling factor; Concat is the concatenation operation; head i is the output of the i-th attention head, i ranges from 1 to h, and h is the total number of attention heads; W O X is a dimensionality reduction matrix used to project the concatenated outputs of multiple attention heads to the same dimension as the input features; MultiHead It is the final output of the multi-head attention mechanism.

[0045] Furthermore, the classification module includes four fully connected layer modules and a classification layer connected in sequence, each of which includes a fully connected layer, a ReLU activation function and a dropout layer; the classification layer selects the softmax function as the activation function to convert the original output into a probability distribution so that the predicted value of each category is between 0 and 1; the specific calculation formula is as follows:

[0046] Scenario label =Softmax(FC4(X MultiHead ))

[0047] Among them, Scenario label Represents the category to which each scene belongs; FC4(X MultiHead ) represents X MultiHead The output result after 4 fully connected layer modules.

[0048] Furthermore, in step S5, the problem of imbalance between positive and negative samples in the data set is solved by adjusting the weight of the loss function. The calculation formula of the improved loss function is as follows:

[0049]

[0050] Among them, y is the label value actually corresponding to the sample, and the label value is 0 or 1. The label prediction value output by the extreme scene recognition model; is the weight corresponding to the k-th label positive sample; is the weight corresponding to the kth label negative sample; N k,train is the sum of the number of positive and negative samples of the kth label; is the number of positive samples of the kth label; is the number of negative samples of the i-th label; N is the number of label categories.

[0051] Furthermore, in step S6, the SGDM optimizer is used to optimize the network weight parameters, and the initial learning rate is set to 0.001.

[0052] Compared with the prior art, the advantages of the present invention are:

[0053] The present invention does not need to assume a threshold in advance, thus avoiding the error of artificially selecting extreme scenes; different types of extreme scenes can be identified from historical scenes by simply replacing the training set labels; it can effectively solve the extreme scene identification problem that considers the scene timing characteristics and the internal coupling relationship between the source and load scenes; the source-load extreme scene identification model constructed based on the deep learning method can comprehensively extract multiple features of the scene and realize full learning of the source-load extreme scene characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 This is a flow chart of source-load extreme scenario identification in an embodiment of the present invention;

[0056] Figure 2 A flowchart of setting scene labels in an embodiment of the present invention;

[0057] Figure 3 4 is a network structure diagram of a source-load extreme scenario identification model in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Example:

[0060] This embodiment uses the historical data of wind power, photovoltaic power, and load in a certain province of my country (January 1, 2020-December 31, 2022) as the original data set.

[0061] The embodiment calls the GPU under the tensorflow2.6 deep learning framework to train the source load extreme scene recognition model in a CUDA parallel computing manner. The number of iterative training rounds is set to 40.

[0062] A method for identifying extreme source-load scenarios based on deep learning feature extraction, such as Figure 1 As shown, the following steps are included:

[0063] S1. Collect historical data of wind power, photovoltaic power and load in a certain area, randomly divide the original data set into training set and test set in a ratio of 8:2, and standardize all data;

[0064] The original data set consists of wind power, photovoltaic, and load historical data sets. The formula for normalizing the wind power, photovoltaic, and load historical data sets is as follows:

[0065]

[0066] Among them, xwind-norm Represents the normalized value of wind power, P wind is the actual output of wind power, P wind-installed is the installed capacity of wind power; x PV-norm Represents the normalized value of photovoltaic power generation, P PV is the actual photovoltaic output, P PV-installed is the installed capacity of photovoltaic power generation; x load-norm Represents the value after load normalization, P load is the actual load size, P load-peak This is the maximum load throughout the year.

[0067] S2. Combining seasonal information, climate information, scene feature information and expert experience, set the label corresponding to each source load scene in the training set and test set;

[0068] The source-load scenario consists of wind power scenarios, photovoltaic scenarios and load scenarios. The scenarios represent the changes in wind power, photovoltaics and load over a period of time. The change curves of wind power, photovoltaics and load over this period of time are usually used to represent the source-load scenario. The change curves of wind power, photovoltaics and load are derived from historical data.

[0069] Set the label corresponding to the scene, such as Figure 2 As shown, the following steps are included:

[0070] S2.1. According to the season when the extreme scenario occurs, the scenarios that do not belong to that season are set as non-extreme scenarios, and the remaining scenarios are retained as suspected extreme scenarios;

[0071] S2.2. Based on historical weather forecast information, select scenes without extreme weather from suspected extreme scenes, set them as non-extreme scenes, and remove these non-extreme scenes from suspected extreme scenes;

[0072] S2.3. Based on the characteristics of extreme scenes, select scenes that do not have the characteristics of extreme scenes from the suspected extreme scenes, set them as non-extreme scenes, and remove these non-extreme scenes from the suspected extreme scenes;

[0073] S2.4. Finally, grid experts with rich experience in identifying extreme scenarios are asked to manually screen out extreme scenarios from suspected extreme scenarios, set the extreme scenario label to "1", and the remaining non-extreme scenario labels to "0".

[0074] S3, based on GCNN-ResNet and multi-level attention mechanism, build a source-load extreme scene recognition model, such as Figure 3 As shown, it includes a sequentially connected data preprocessing module, a plurality of sequentially connected feature extraction modules, a multi-head attention mechanism module and a classification module;

[0075] The data preprocessing module receives the input source-load scene and performs preprocessing, and passes the source-load scene tensor after data preprocessing to the feature extraction module; the feature extraction module first extracts the feature information of the source-load scene tensor, and then assigns the feature weight of each channel based on the channel attention mechanism, and finally outputs the feature information to the next feature extraction module, or flattens the feature information into a one-dimensional feature sequence after one flattening layer and outputs it to the multi-head attention mechanism module; the multi-head attention mechanism module assigns different weights to features according to their importance to highlight the feature information, and outputs the feature information after the feature is highlighted to the classification module; the classification module outputs the category to which the scene belongs according to the feature information after the feature is highlighted, and completes the identification of extreme scenes.

[0076] In the data preprocessing module, the one-dimensional time series of wind power, photovoltaic power and load with a shape of 1×T are reshaped into tensors of shape H×W×1 respectively, and then the tensors of wind power, photovoltaic power and load are spliced ​​in the channel dimension to obtain the source-load scenario tensor of H×W×3, which is used as the input of the feature extraction module. T, H, and W satisfy the following relationship:

[0077] T=H×W

[0078] Where T represents the length of each time series, H is the height of the tensor, and W is the width of the tensor;

[0079] The third dimension of the source-load scene tensor shape represents the number of channels of the tensor. Different channels of the source-load scene tensor represent different scene feature information.

[0080] The feature extraction module includes a grouped convolution-residual module and a channel attention mechanism. The grouped convolution-residual module uses a grouped convolutional neural network (GCNN) to group the features of different channels of the source-load scene tensor. The grouped convolution-residual module uses a residual neural network (ResNet) structure to accelerate the convergence of the extreme scene recognition model. The channel attention mechanism adaptively adjusts the weights of different channels of the source-load scene tensor.

[0081] The grouped convolution-residual module adopts a ResNet-based structure, including a convolution layer and a short-circuit channel. The convolution layer is composed of GCNN. The input tensor of the feature extraction module is directly added to the output of GCNN through the short-circuit channel. The specific calculation formula of the grouped convolution-residual module is as follows:

[0082] X fe =X+f(X)

[0083] Among them, X fe is the output tensor of the grouped convolution-residual module, X is the input tensor of the grouped convolution-residual module, that is, the source-load scene tensor; f(X) is the tensor output after feature extraction of X by the grouped convolutional neural network GCNN;

[0084] The channel attention mechanism includes a global average pooling layer and two fully connected layers. The specific calculation formula is as follows:

[0085] w = σ(W2(ReLU(W1(δ(X fe )))))

[0086]

[0087] X SE =w·X fe

[0088] Among them, X fe is the input tensor of the channel attention mechanism; δ is the global average pooling operation; W1 and W2 are the weight parameters of the two fully connected layers; C is the number of tensor channels, r is the channel attenuation coefficient, is a real number set; σ is the sigmoid activation function; w is the channel attention weight vector; r is the reduction coefficient; X SE is the weighted tensor, i.e., the output tensor of the channel attention mechanism; · represents the Hadamard product.

[0089] The multi-head attention mechanism module includes multiple independent attention heads. Each attention head can focus on different positions in the input tensor and generate corresponding attention weights. The outputs of multiple heads are weighted and summed to obtain the feature information after feature highlighting. The specific calculation formula is as follows:

[0090]

[0091] X MultiHead =Concat(head1,head2,…,head h )W O

[0092] Among them, X SE is the input feature of the i-th attention head in the multi-head attention mechanism module; W i Q , W i K and W i V are the linear transformation parameter matrices that map the i-th attention head to the query space, key space, and value space respectively; Q i , K i and V i are the output vectors that map the input features to the query space, key space, and value space respectively; d k is the dimension of query vector and key vector; d v is the dimension of the value vector; Softmax is a classification activation function; is the scaling factor; Concat is the concatenation operation; head i is the output of the i-th attention head, i ranges from 1 to h, and h is the total number of attention heads; W O X is a dimensionality reduction matrix used to project the concatenated outputs of multiple attention heads to the same dimension as the input features; MultiHead It is the final output of the multi-head attention mechanism.

[0093] The classification module includes four fully connected layer modules and a classification layer connected in sequence. Each fully connected layer module includes a fully connected layer, a ReLU activation function, and a dropout layer. The classification layer selects the softmax function as the activation function to convert the original output into a probability distribution so that the predicted value of each category is between 0 and 1. The specific calculation formula is as follows:

[0094] Scenario label =Softmax(FC4(X MultiHead ))

[0095] Among them, Scenario label Represents the category to which each scene belongs; FC4(X MultiHead ) represents X MultiHead The output result after 4 fully connected layer modules.

[0096] In one embodiment, accuracy, precision, recall, F1 score (F 1-score ) is used as the evaluation index to verify the superiority of the extreme scenario identification model in identifying the extreme source and load scenarios. The calculation formula of the evaluation index is as follows:

[0097]

[0098] Among them, NC and CI are the number of samples classified correctly and incorrectly, respectively; TP and FP are the number of samples predicted to be positive but actually positive and predicted to be positive but actually negative, respectively; FN is the number of samples predicted to be negative but actually positive.

[0099] S4. Based on different types of extreme scene training sets, the recognition models corresponding to the extreme scenes are trained respectively;

[0100] S5. Calculate the training loss value of the model based on the improved loss function;

[0101] By adjusting the weight of the loss function, the problem of imbalance between positive and negative samples in the data set is solved. The calculation formula of the improved loss function is as follows:

[0102]

[0103] Among them, y is the label value actually corresponding to the sample, and the label value is 0 or 1. The label prediction value output by the extreme scene recognition model; is the weight corresponding to the k-th label positive sample; is the weight corresponding to the kth label negative sample; N k,train is the sum of the number of positive and negative samples of the kth label; is the number of positive samples of the kth label; is the number of negative samples of the i-th label; N is the number of label categories.

[0104] S6, update the network weights of the model, and repeat steps S4, S5 and S6 until the model loss function converges;

[0105] In one embodiment, the SGDM optimizer is used to optimize the network weight parameters, and the initial learning rate is set to 0.001.

[0106] S7, save the network weights after the model training is completed;

[0107] S8. Take the historical source load scenario as input, load the model weight, and the model identifies and outputs the source load extreme scenario.

[0108] In one embodiment, four types of extreme scenes are selected as scenes that the model needs to identify, namely cold wave, extremely hot and windless, typhoon, and Spring Festival.

[0109] The evaluation results of the extreme scene recognition model are shown in Table 1

[0110] Table 1 Evaluation indicators for extreme scene recognition

[0111]

[0112] It can be seen from Table 1 that the scene recognition accuracy is above 98%, and the recall rate of each extreme scene is above 95%, which proves that the present invention can effectively identify different types of extreme scenes.

[0113] It should be noted that, since the information interaction, execution process, etc. between the units in the above-mentioned devices and systems are based on the same concept as the embodiments of the method of the present invention, the specific contents can be found in the description of the embodiments of the method of the present invention and will not be repeated here.

[0114] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0115] The above is a detailed introduction to a source-load extreme scene identification method based on deep learning feature extraction provided by an embodiment of the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for identifying extreme source-load scenarios based on deep learning feature extraction, characterized in that: The following steps are involved: S1. Collect historical data of wind power, photovoltaic power and load in a certain area, randomly divide the original data set into training set and test set in a ratio of 8:2, and standardize all data; S2. Combining seasonal information, climate information, scene feature information and expert experience, set the label corresponding to each source load scene in the training set and test set; S3, build a source-load extreme scene recognition model based on GCNN-ResNet and multi-level attention mechanism; S4. Based on different types of extreme scene training sets, the recognition models corresponding to the extreme scenes are trained respectively; S5. Calculate the training loss value of the model based on the improved loss function; S6, update the network weights of the model, and repeat steps S4, S5 and S6 until the model loss function converges; S7, save the network weights after the model training is completed; S8. Take the historical source load scenario as input, load the model weight, and the model identifies and outputs the source load extreme scenario.

2. According to claim 1, a method for identifying extreme source-load scenarios based on deep learning feature extraction is characterized in that: In step S1, the original data set consists of wind power, photovoltaic, and load historical data sets. The formula for normalizing the wind power, photovoltaic, and load historical data sets is as follows: Among them, x wind-norm Represents the normalized value of wind power, P wind is the actual output of wind power, P wind-installed is the installed capacity of wind power; x PV-norm Represents the normalized value of photovoltaic power generation, P PV is the actual photovoltaic output, P PV-installed is the installed capacity of photovoltaic power generation; x load-norm Represents the value after load normalization, P load is the actual load size, P load-peak This is the maximum load throughout the year.

3. According to claim 1, a method for identifying extreme source-load scenarios based on deep learning feature extraction is characterized in that: In step S2, the source-load scenario consists of a wind power scenario, a photovoltaic scenario and a load scenario. The scenario represents the changes in wind power, photovoltaics and load over a period of time. The source-load scenario is usually represented by the change curves of wind power, photovoltaics and load during this period. The change curves of wind power, photovoltaics and load are derived from historical data.

4. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 1, characterized in that: In step S2, setting a label corresponding to the scene includes the following steps: S2.

1. According to the season when the extreme scenario occurs, the scenarios that do not belong to that season are set as non-extreme scenarios, and the remaining scenarios are retained as suspected extreme scenarios; S2.

2. Based on historical weather forecast information, select scenes without extreme weather from suspected extreme scenes, set them as non-extreme scenes, and remove these non-extreme scenes from suspected extreme scenes; S2.

3. Based on the characteristics of extreme scenes, select scenes that do not have the characteristics of extreme scenes from the suspected extreme scenes, set them as non-extreme scenes, and remove these non-extreme scenes from the suspected extreme scenes; S2.

4. Finally, grid experts with rich experience in identifying extreme scenarios are asked to manually screen out extreme scenarios from suspected extreme scenarios, set the extreme scenario label to "1", and the remaining non-extreme scenario labels to "0".

5. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 1, characterized in that: In step S3, a source-load extreme scene recognition model based on a GCNN-ResNet network and a multi-level attention mechanism is constructed, including a sequentially connected data preprocessing module, multiple sequentially connected feature extraction modules, a multi-head attention mechanism module, and a classification module; The data preprocessing module receives the input source-load scene and performs preprocessing, and transmits the source-load scene tensor after data preprocessing to the feature extraction module; The feature extraction module first extracts the feature information of the source-load scene tensor, then assigns the feature weight of each channel based on the channel attention mechanism, and finally outputs the feature information to the next feature extraction module, or flattens the feature information into a one-dimensional feature sequence after a flattening layer and outputs it to the multi-head attention mechanism module; the multi-head attention mechanism module assigns different weights to the features according to their importance to highlight the feature information, and outputs the highlighted feature information to the classification module; The classification module outputs the category to which the scene belongs based on the feature information after feature highlighting, thus completing the identification of extreme scenes.

6. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 5, characterized in that: In the data preprocessing module, the one-dimensional time series of wind power, photovoltaic power and load with a shape of 1×T are reshaped into tensors of shape H×W×1 respectively, and then the tensors of wind power, photovoltaic power and load are spliced ​​in the channel dimension to obtain the source-load scenario tensor of H×W×3, which is used as the input of the feature extraction module. T, H, and W satisfy the following relationship: T=H×W Where T represents the length of each time series, H is the height of the tensor, and W is the width of the tensor; The third dimension of the source-load scene tensor shape represents the number of channels of the tensor. Different channels of the source-load scene tensor represent different scene feature information.

7. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 5, characterized in that: The feature extraction module includes a grouped convolution-residual module and a channel attention mechanism. The grouped convolution-residual module uses a grouped convolutional neural network (GCNN) to group the features of different channels of the source-load scene tensor. The grouped convolution-residual module uses a residual neural network (ResNet) structure to accelerate the convergence of the extreme scene recognition model. The channel attention mechanism adaptively adjusts the weights of different channels of the source-load scene tensor. The grouped convolution-residual module adopts a ResNet-based structure, including a convolution layer and a short-circuit channel. The convolution layer is composed of GCNN. The input tensor of the feature extraction module is directly added to the output of GCNN through the short-circuit channel. The specific calculation formula of the grouped convolution-residual module is as follows: X fe =X+f(X) Among them, X fe is the output tensor of the grouped convolution-residual module, X is the input tensor of the grouped convolution-residual module, that is, the source-load scene tensor; f(X) is the tensor output after feature extraction of X by the grouped convolutional neural network GCNN; The channel attention mechanism includes a global average pooling layer and two fully connected layers. The specific calculation formula is as follows: w=σ(W2(ReLU(W1(δ(X fe )))))) X SE =w·X fe Among them, X fe is the input tensor of the channel attention mechanism; δ is the global average pooling operation; W1 and W2 are the weight parameters of the two fully connected layers; C is the number of tensor channels, r is the channel attenuation coefficient, is a real number set; σ is the sigmoid activation function; w is the channel attention weight vector; r is the reduction coefficient; X SE is the weighted tensor, i.e., the output tensor of the channel attention mechanism; · represents the Hadamard product.

8. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 5, characterized in that: The multi-head attention mechanism module includes multiple independent attention heads. Each attention head can focus on different positions in the input tensor and generate corresponding attention weights. The outputs of multiple heads are weighted and summed to obtain the feature information after feature highlighting. The specific calculation formula is as follows: X MultiHead =Concat(head1,head2,…,head h )W O Among them, X SE is the input feature of the i-th attention head in the multi-head attention mechanism module; W i Q , W i K and W i V are the linear transformation parameter matrices that map the i-th attention head to the query space, key space, and value space respectively; Q i , K i and V i are the output vectors that map the input features to the query space, key space, and value space respectively; d k is the dimension of query vector and key vector; d v is the dimension of the value vector; Softmax is a classification activation function; is the scaling factor; Concat is the concatenation operation; head i is the output of the i-th attention head, i ranges from 1 to h, and h is the total number of attention heads; W O X is a dimensionality reduction matrix used to project the concatenated outputs of multiple attention heads to the same dimension as the input features; MultiHead It is the final output of the multi-head attention mechanism.

9. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 5, characterized in that: The classification module includes four fully connected layer modules and a classification layer connected in sequence. Each fully connected layer module includes a fully connected layer, a ReLU activation function, and a dropout layer. The classification layer selects the softmax function as the activation function to convert the original output into a probability distribution so that the predicted value of each category is between 0 and 1. The specific calculation formula is as follows: Scenario label =Softmax(FC4(X MultiHead )) Among them, Scenario label Represents the category to which each scene belongs; FC4(X MultiHead ) represents X MultiHead The output result after 4 fully connected layer modules.

10. The method for identifying extreme source-load scenarios based on deep learning feature extraction according to claim 1, characterized in that: In step S5, the problem of imbalance between positive and negative samples in the data set is solved by adjusting the weight of the loss function. The calculation formula of the improved loss function is as follows: Among them, y is the label value actually corresponding to the sample, and the label value is 0 or 1. The label prediction value output by the extreme scene recognition model; is the weight corresponding to the k-th label positive sample; is the weight corresponding to the kth label negative sample; N k,train is the sum of the number of positive and negative samples of the kth label; is the number of positive samples of the kth label; is the number of negative samples of the i-th label; N is the number of label categories.

Citation Information

Patent Citations

  • A method and system for simultaneously generating both conventional and extreme scenarios for renewable energy output.

    CN115795328B

  • Electric power system operation scene identification method and system based on artificial intelligence identification

    CN115422844A

  • Multispectral image scene recognition method and device, electronic equipment and storage medium

    CN118097347A

  • Aggregation cross-entropy loss function-based sequence recognition method

    WO2020248471A1