Power grid consumption blocking factor identification method based on RNN-SHAP model
Through the method of identifying the obstructed factor of the power grid absorption based on the RNN-SHAP model, the problem of identifying the key factors of the new energy grid absorption in the prior art is solved, and higher prediction accuracy and key factor identification capabilities are achieved.
Patent Information
- Application Number
- CN202411856384.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-07
AI Technical Summary
It is difficult for the existing technology to effectively identify and analyze the key factors that have hindered the absorption of new energy power grids, especially in data processing and model construction.
The grid absorption barrier factor identification method based on the RNN-SHAP model is used to predict the amount of new energy barriers through the RNN neural network processing time sequence data, and the contribution of each barrier factor is analyzed using the SHAP algorithm to identify key factors.
The prediction accuracy and identification of key factors of the model are improved, and the degree of impact of the hindered factors in each period on the amount of new energy blocked is effectively estimated, and the key factors that lead to the hindered energy blocked at different periods are determined.
Smart Images

Figure CN119582205A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent identification, and in particular relates to a method for identifying factors hindering power grid consumption based on an RNN-SHAP model. Background Art
[0002] Developing the "Shagohuang" new energy base is an important measure to achieve "carbon peak and carbon neutrality" in the energy and power system. However, the output of new energy power generation is random and volatile, and the temporal and spatial distribution of electricity is extremely uneven. In addition, the installed capacity of new energy has grown rapidly in recent years, resulting in serious wind and solar power abandonment. Especially in the northwest region, where solar radiation is strong, land resources are rich, and wind resources are sufficient, as the region with the highest installed capacity of new energy, the local absorption level is low, and the abandonment of wind and solar power is higher than the national average. In order to reduce the level of wind and solar power abandonment, it is particularly important to study the influencing factors that lead to the abandonment of new energy power.
[0003] Artificial intelligence technology has been widely used in power systems due to its advantages in nonlinear fitting. With the development of smart grids, grid data has become richer, and various types of influencing factors require appropriate data selection methods and training models to process. Therefore, it is a worthy research direction to explore the influencing factors of new energy obstruction in a data-driven manner based on massive operating data. At present, some studies use the BP-MIV algorithm to calculate the contribution of the factors hindering the consumption of new energy in regional power grids to the amount of new energy obstruction, but there is still room for improvement in data processing and model construction. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method for identifying factors hindering power grid absorption based on the RNN-SHAP model. By using the RNN neural network and the SHAP algorithm, the influence of the hindering factors in each time period on the amount of new energy hindered can be effectively estimated, thereby determining the key factors that cause new energy hindered in different time periods.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A method for identifying factors hindering power grid consumption based on an RNN-SHAP model comprises the following steps:
[0007] Step S1: Determine the set of factors hindering the consumption of new energy based on on-site operation data and engineering experience;
[0008] Step S2: mining the relationship between the obstructing factors and using the Pearson correlation coefficient to perform feature decorrelation;
[0009] Step S3: Establish an RNN-SHAP model, take the specific line model and the time series data of the cross-section active power as the input of the neural network model, take the new energy obstruction amount as the output of the neural network model, and use the RNN to predict the new energy obstruction amount in different periods;
[0010] Step S4: Use the SHAP algorithm to analyze the contribution of each obstruction factor to the obstruction amount of new energy so as to identify the key obstruction factors in each period.
[0011] Furthermore, in step S1, the factors hindering the consumption of new energy are divided into two categories, namely, obstruction inside the new energy station and obstruction outside the new energy station. The off-site influencing factors of the obstruction outside the new energy station are divided into peak load obstruction, transmission obstruction and overall factors.
[0012] Furthermore, in step S3, the RNN neural network is composed of multiple input layers with the same weights and activation functions, and a single time step of input is given; first, the current state is calculated using the current input and the previous state output, and for the next time step, the current state becomes ,Right now:
[0013] ;
[0014] in, is the hidden state, is the previous state, is the input state, f is the mapping function, and t represents time;
[0015] Then apply the activation function After that, the current state becomes:
[0016] ;
[0017] in, refers to the weight of the recurrent neuron, refers to the weight of the input neuron;
[0018] The final output formula is:
[0019]
[0020] in, represents the weight of the output layer;
[0021] Taking the obstruction factors as the input of the neural network, the obstructed power in different time periods is output by processing the time series data through RNN.
[0022] Furthermore, in step S4, different features are selected for prediction, and the SHAP value of each influencing factor is:
[0023] ;
[0024] in, is the SHAP value of feature i, N is the total set of features, S is the feature subset, represents the feature subset that does not contain feature i, is the model prediction using only feature set S, is the model prediction using feature set S and eigenvalue i, Represent the sizes of sets S and N respectively.
[0025] Beneficial effects:
[0026] 1. The present invention uses the Pearson correlation coefficient to decorrelate the features of the data set. By calculating the correlation matrix, the original data is decorrelated and converted into a smaller number of unrelated data, which reduces the redundancy in the data set while ensuring the independence of the data features, making the data set easier to analyze and train.
[0027] 2. Establish an RNN-SHAP model, use the time series data of active power of specific lines and sections as the input of the neural network model, use the amount of new energy obstruction as the output of the neural network model, consider the influence of time series data to train the data, and use RNN to predict the amount of new energy obstruction in different periods, and use the SHAP algorithm to analyze the contribution of each obstruction factor to the amount of new energy obstruction, so as to identify the key factors of obstruction in each period. This combined application improves the prediction accuracy of the model and the ability to identify key factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The present invention is a flow chart of a method for identifying factors hindering power grid consumption based on the RNN-SHAP model.
[0029] Figure 2 This is the RNN schematic diagram. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0031] like Figure 1 A specific embodiment of the present invention is shown, which discloses a method for identifying factors hindering power grid consumption based on the RNN-SHAP model, comprising the following steps:
[0032] Step S1: Determine the set of factors hindering the consumption of new energy based on on-site operation data and engineering experience;
[0033] Step S2: mining the relationship between the obstructing factors and using the Pearson correlation coefficient to perform feature decorrelation;
[0034] Step S3: Establish an RNN-SHAP model, take the specific line model and the time series data of the cross-section active power as the input of the neural network model, take the new energy obstruction amount as the output of the neural network model, and use the RNN to predict the new energy obstruction amount in different periods;
[0035] Step S4: Use the SHAP algorithm to analyze the contribution of each obstruction factor to the obstruction amount of new energy so as to identify the key obstruction factors in each period.
[0036] Specifically, the step S1 includes:
[0037] The field operation data includes massive and complex data such as the power generation of the whole network, the power consumption of the whole network, the output of different energy sources, and the current of the interconnection line. In the process of determining the set of factors hindering the consumption of new energy, the hindering factors can be divided into two categories, namely, the hindering factors within the new energy station and the hindering factors outside the new energy station. The hindering factors within the new energy station refer to the power loss caused by the failure, maintenance and interruption of the power generation, transmission and conversion equipment of the new energy station. The size of the abandoned power within the field is an important indicator to measure the management level of the new energy power generation enterprise. If the abandoned power within the field is large, it means that the equipment operation and maintenance management level of the new energy power generation company and its power station needs to be improved. The hindering factors outside the new energy station refer to the power loss caused by insufficient transmission capacity of the power transmission channel of the power grid, insufficient peak-shaving capacity and power grid failure. Considering that the hindering factors within the field are related to the business strategy of the specific new energy station operator, the measured data are used to mainly analyze the hindering factors outside the field, and the influencing factors are divided into three categories: peak-shaving hindering, transmission hindering and overall factors.
[0038] As shown in Table 1 (Classification of Influencing Factors), the specific factors hindering peak load regulation are divided into wind power abandonment and solar power abandonment, and the corresponding time series measurement data are the wind power abandonment caused by insufficient system peak load regulation capacity and the solar power abandonment caused by insufficient system peak load regulation capacity; the specific factors hindering transmission are divided into main transformer, sending line, collecting line, transmission section, DC line, and the corresponding time series measurement data are main transformer active power, sending line active power, collecting line active power, specific transmission section active power, and specific DC line active power; the specific factors of overall factors include overall hydropower, overall thermal power, overall load, and overall power generation output, and the corresponding time series measurement data are overall hydropower online active power, overall thermal power online active power, dispatching caliber load active power, and overall power generation active power.
[0039] Table 1
[0040]
[0041] Specifically, the step S2 includes:
[0042] After obtaining the three types of influencing factors (peak shaving obstruction, transmission obstruction and overall factors), the Pearson correlation coefficient is used to perform feature decorrelation to eliminate any linear relationship for each pair of variables. and , calculate the Pearson correlation coefficient between them Calculated as:
[0043] ;
[0044] in, is the number of measurements, is a variable No. measurements, is a variable The average value of Similarly, i and j are the i-th and j-th features in the same set of samples, respectively.
[0045] Constructing the correlation matrix Make its elements , such a matrix is a The diagonal elements are autocorrelated, with a value of 1, because any variable is completely positively correlated with itself. The matrix R can be expressed as:
[0046] ;
[0047] This matrix shows the overall picture of the linear correlation between variables within a set of variables.
[0048] Specifically, step S3 includes:
[0049] Furthermore, the time series data of active power of specific lines and sections are used as the input of the neural network model, and the blocked power of new energy is used as the output of the neural network model. The key blocking influencing factors are identified by analyzing the correlation between input and output.
[0050] RNN is a neural network that maps from the input space of a sequence to the output space of a sequence in a stateful manner. That is, the output The prediction depends not only on the input , but also depends on the hidden state of the system , as the sequence is processed, it changes over time. Generally speaking, traditional neural networks cannot process sequential data, can only process the current input, and cannot remember the previous input. However, in time series data processing, it is necessary to understand the sequential characteristics of the data and use these patterns to predict the next possible situation. Figure 2 As shown in Figure 1, RNN can process sequential data and use its memory to remember previous inputs. RNN retains some information about the sequence using hidden states, which is the main and most important feature of RNN.
[0051] The RNN neural network consists of multiple input layers with the same weights and activation functions, and given a single time step of input. First, the current state is calculated using the current input and the previous state output. For the next time step, the current state becomes ,Right now:
[0052] ;
[0053] in, is the hidden state, is the previous state, is the input state, f is the mapping function, and t represents time.
[0054] Then apply the activation function After that, the current state becomes:
[0055] ;
[0056] in, refers to the weight of the recurrent neuron, Refers to the weights of the input neurons.
[0057] The final output formula is:
[0058] ;
[0059] in, represents the weight of the output layer, is the hidden state, is the previous state.
[0060] The SHAP algorithm can determine the weight of the influence of the input neurons of the neural network on the output neurons, and is considered to be an index for evaluating the correlation of the input parameters of the neural network. According to different training sample sets of the RNN neural network, the model generates a prediction value for each prediction sample, and the SHAP value is the value assigned to each feature in the sample.
[0061] First, the normalized input data is divided into multiple batches with a batch size of 64. The model contains two hidden layers, each with 32 units, and the activation function is tanh. In each training batch, the input data is forward propagated through the two-layer RNN model, the input data passes through the first hidden layer, the tanh activation function is applied to obtain the output of the hidden layer, and then the output is passed to the second hidden layer, and the ReLU activation function is continued. The network generates the predicted value and outputs the result.
[0062] Then, the MSE loss function is used to calculate the error between the predicted output and the true value. Next, backpropagation is performed: the loss value is backpropagated from the output layer, and the gradient of each neuron is calculated using the chain rule. The gradient of each layer is adjusted according to the contribution of the output of that layer to the loss. After the gradient is calculated, the Adam optimizer is used to update the gradient. The Adam optimizer updates the weights of the model based on a learning rate of 0.01, and optimizes using the gradient calculated in the current batch. Specifically, Adam adjusts the update amplitude of each parameter through momentum and adaptive learning rate, so that the weights iterate in the direction of reducing the loss. After the optimizer updates the weights, the gradients are reset (cleared) and ready to enter the next batch of training.
[0063] Finally, the entire dataset is looped for 500 iterations. At the end of each cycle, the model evaluates its performance on the validation set. If the loss on the validation set no longer decreases, the early stopping mechanism is activated to terminate the training to avoid overfitting.
[0064] Specifically, step S4 includes:
[0065] The SHAP algorithm is used to analyze the contribution of each obstruction factor to the obstruction of new energy in order to identify the key factors in each time period, thereby determining the key factors that cause the obstruction of new energy in different time periods.
[0066] Select different features for prediction, and the SHAP value of each influencing factor is:
[0067] ;
[0068] in, is the SHAP value of feature i, N is the total set of features, S is the feature subset, represents the feature subset that does not contain feature i, is the model prediction using only feature set S, is the model prediction using feature set S and eigenvalue i, Represent the sizes of sets S and N respectively.
[0069] A positive SHAP value indicates that the predicted value based on the corresponding influencing factor is higher than the average. A negative SHAP value indicates that the predicted value of the corresponding influencing factor is lower than the average. The relative importance of each feature is ranked by the size of its average absolute SHAP value. The SHAP value can be obtained by weighted averaging the contribution values of all feature subsets in the sample to obtain the total contribution value of each feature. The larger the SHAP value, the greater the contribution of the feature to the model prediction results. From the total SHAP value of all data, the positive and negative relationship between each variable and the prediction result can be identified, and by calculating their respective average absolute SHAP values, the global importance of different features can be obtained, which is the global interpretability.
[0070] According to the above steps, the contribution of various influencing factors can be calculated, and then the influence of each factor on the obstructed electricity consumption of new energy can be determined.
[0071] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for identifying factors hindering power grid consumption based on RNN-SHAP model, characterized in that: The steps include: Step S1: Determine the set of factors hindering the consumption of new energy based on on-site operation data and engineering experience; Step S2: mining the relationship between the obstructing factors and using the Pearson correlation coefficient to perform feature decorrelation; Step S3: Establish an RNN-SHAP model, take the specific line model and the time series data of the cross-section active power as the input of the neural network model, take the new energy obstruction amount as the output of the neural network model, and use the RNN to predict the new energy obstruction amount in different periods; Step S4: Use the SHAP algorithm to analyze the contribution of each obstruction factor to the obstruction amount of new energy so as to identify the key obstruction factors in each period.
2. The method for identifying factors hindering power grid absorption based on the RNN-SHAP model according to claim 1 is characterized in that: In step S1, since the factors hindering the consumption of new energy can be divided into two categories, namely, the obstacles inside the new energy station and the obstacles outside the new energy station, combined with engineering experience, considering that the obstacles inside the station are related to the business strategies of specific new energy station operators, the main analysis is on the obstacles outside the station. The off-site influencing factors are divided into three categories: peak load obstruction, transmission obstruction and overall factors.
3. The method for identifying factors hindering power grid absorption based on the RNN-SHAP model according to claim 1 is characterized in that: In step S2, feature decorrelation is performed using Pearson correlation sparsification. Multicollinearity can affect the accuracy of the decision boundary between features and labels. Decorrelation helps ensure that the predictors are independent of each other.
4. According to the method for identifying factors hindering power grid absorption based on the RNN-SHAP model in claim 1, in step S3, the RNN neural network is composed of multiple input layers with the same weights and activation functions, and a single time step of the input is given. First, the current state is calculated using the current input and the previous state output. For the next time step, the current state becomes ,Right now: ; in, is the hidden state, is the previous state, is the input state, f is the mapping function, and t represents time; Then apply the activation function After that, the current status becomes: ; in, refers to the weight of the recurrent neuron, refers to the weight of the input neuron; The final output formula is: in, represents the weight of the output layer; Taking the obstruction factors as the input of the neural network, the obstructed power in different time periods can be output by processing the time series data through RNN.
5. The method for identifying factors hindering power grid absorption based on the RNN-SHAP model according to claim 1 is characterized in that: In step S4, different features are selected for prediction, and the SHAP value of each influencing factor is: ; in, is the SHAP value of feature i, N is the total set of features, S is the feature subset, represents the feature subset that does not contain feature i, is the model prediction using only feature set S, is the model prediction using feature set S and eigenvalue i, Represent the sizes of sets S and N respectively.
Citation Information
Cited By
Braking intention recognition method, system and equipment and medium
CN119884983A