CN117175595B - Power grid regulation and control method and system based on multi-level data - Google Patents

Power grid regulation and control method and system based on multi-level data Download PDF

Info

Publication number
CN117175595B
CN117175595B CN202311407380.6A CN202311407380A CN117175595B CN 117175595 B CN117175595 B CN 117175595B CN 202311407380 A CN202311407380 A CN 202311407380A CN 117175595 B CN117175595 B CN 117175595B
Authority
CN
China
Prior art keywords
load
data
power grid
load prediction
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311407380.6A
Other languages
Chinese (zh)
Other versions
CN117175595A (en
Inventor
周飞
俞佳捷
章杜锡
叶夏明
张勇
徐红泉
周洋
余佳音
陈天华
吕世斌
吴昱浩
杨淇
陈超
曹坚成
郑东亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
Ningbo Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Power Supply Co of State Grid Zhejiang Electric Power Co Ltd filed Critical Ningbo Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Priority to CN202311407380.6A priority Critical patent/CN117175595B/en
Publication of CN117175595A publication Critical patent/CN117175595A/en
Application granted granted Critical
Publication of CN117175595B publication Critical patent/CN117175595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention provides a power grid regulation and control method and system based on multistage data, which relate to the technical field of power grid regulation and control and comprise the following steps: acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input; according to the second load input, combining a preset second load prediction model, transmitting the second load input into the second load prediction model in the sequence from the root node to the leaf node to obtain second load output, and according to the second load output, combining a preset result optimization algorithm to determine a load prediction result; according to the load prediction result, combining with the initial data of the power grid, constructing an energy action space, and according to the energy action space, determining a regulation and control optimization strategy through a preset strategy optimization algorithm.

Description

Power grid regulation and control method and system based on multi-level data
Technical Field
The invention relates to the technical field of power grid regulation and control, in particular to a power grid regulation and control method and system based on multistage data.
Background
The power grid regulation is basic data required by the software application system in the power system dispatching operation field for monitoring, analyzing and calculating the power grid operation, but with the increasing power consumption demand, the power grid load is increased increasingly, so that the power grid regulation strategy needs to be updated and optimized in real time.
In the prior art, CN114548653a, a method, a system and an electronic device for collecting data of a power grid load regulation platform are provided, and by means of a mechanism and a means for integrating the data, the data is comprehensively utilized, so that support can be provided for decision analysis, the return rate of system investment is improved, the data of each service system can be effectively fused, centralized and unified managed, and converted into valuable information, unified data support is provided for related service applications, one data, one entry, unified exit and multi-stage application are truly realized, related data is automatically obtained from various heterogeneous data sources, validity verification is performed according to attribute relations of the data, automatic calculation, statistics, summarization and automatic meaning operation modes are realized, and different service scenario applications and different service fields are satisfied.
CN107451188A, a method and a system for publishing a multi-level node combination of power grid regulation model data, disclose a method and a system for publishing a multi-level node combination of power grid regulation model data, and set a range of the multi-level node combination of the power grid regulation model; establishing configuration files of the multilevel nodes related to the container object in the range of the multilevel node combination of the power grid regulation model; the technical scheme provided by the invention combines object data hierarchy definition under a specific container, and provides a method for integrally accessing the whole data of the power grid regulation model in the equipment container by setting a special characteristic identifier. The method does not change the definition of the OPCUA object access service, and only adds layering arrangement of objects and attributes in the equipment container at the service realization end, so that the application can quickly acquire the required power grid regulation model data.
In summary, in the prior art, although the existing equipment data in the power grid can be read and the power grid regulation strategy can be regulated according to the preset mode, the power grid cannot be adaptively regulated according to the real-time load, and the influence of time and historical electricity utilization strategies on the power grid regulation strategy is not considered, so that at least a part of the existing problems can be solved by the scheme.
Disclosure of Invention
The embodiment of the invention provides a power grid regulation and control method and system based on multistage data, which are used for dynamically regulating a power grid regulation and control strategy according to the real-time state of a power grid.
In a first aspect of the embodiment of the present invention, a power grid regulation method based on multi-level data includes:
acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input;
according to the second load input, a preset second load prediction model is combined, the second load input is transmitted in the second load prediction model in the sequence from a root node to a leaf node to obtain second load output, and according to the second load output, a load prediction result is determined by combining a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm;
and according to the load prediction result, combining with power grid initial data, constructing an energy action space, and determining a regulation and control optimization strategy through a preset strategy optimization algorithm according to the energy action space, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm.
In an alternative embodiment of the present invention,
inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining a first load input, combining the first load prediction model according to the first load input, and obtaining a second load input comprises the following steps:
acquiring historical electricity utilization data through a database, acquiring power grid state data according to an intelligent sensor arranged in a power grid node, adding the historical electricity utilization data and the power grid state data into the same set, and recording the historical electricity utilization data and the power grid state data as initial power grid data;
performing data cleaning and feature selection operation on the initial data of the power grid through the first load prediction model to obtain the first load input;
determining a forward hidden state and a backward hidden state through a bidirectional state network in the first load prediction model according to the first load input;
and according to the forward hiding state and the backward hiding state, combining a preset residual error module and a self-attention mechanism, directly adding input data of a specific layer in the bidirectional state network into output data of the bidirectional state network, and determining the second load input.
In an alternative embodiment of the present invention,
transmitting the second load input in the second load prediction model according to the second load input and a preset second load prediction model, and obtaining a second load output, and determining a load prediction result according to the second load output and a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm and comprises:
acquiring the second load input, adding the second load input to the second load prediction model, transmitting the second load input downwards from a root node of the second load prediction model, judging a transmission direction at each leaf node according to a preset node splitting condition, transmitting leftwards if the preset node splitting condition is met, and transmitting rightwards until the transmission is completed, so as to obtain the second load output;
and according to the output of the second load, removing abnormal values in the second load and correcting according to data trend by combining the result optimization algorithm, and determining the load prediction result.
In an alternative embodiment, the method further comprises training the second load prediction model:
obtaining a second load input, converting the second load input into a feature vector, dividing a continuous feature value into discrete intervals by an equal-frequency division barrel strategy for the continuous feature value, discretizing to obtain a feature value range, and constructing a histogram by a lightweight gradient lifting algorithm according to the feature value range;
determining a first gain value of a current leaf node through a node gain function based on a leaf node preferential growth strategy, selecting a node with the maximum gain in the current leaf node for splitting to obtain the maximum gain value, constructing a loss function according to the maximum gain value, calculating gradient and second derivative of the current leaf node according to the loss function, and constructing second Taylor expansion of an objective function;
and traversing the characteristic values of all the leaf nodes for each leaf node, determining the leaf node with the minimum loss function value after splitting by combining the gradient and the second derivative of the current leaf node, marking the leaf node as a split leaf node, splitting the split leaf node into two leaf nodes, calculating the gradient and the second derivative of the split leaf node, and repeating the operation until the stopping condition is met.
In an alternative embodiment of the present invention,
determining a first gain value of a current leaf node through a node gain function, selecting a node with the maximum gain in the current leaf node for splitting, obtaining the maximum gain value, and constructing a loss function according to the maximum gain value, wherein the loss function is represented by the following formula:
;
wherein,Da data set representing the current node is displayed,Loss(D)the loss function is represented by a function of the loss,y i representing a sampleiIs a real tag of the (c) in the (c),y avg representing the mean value of the current node,y split representing the mean value of the nodes after the splitting,max split ()representing the choice of split mode among all possible modes that maximizes the loss function.
In an alternative embodiment of the present invention,
the step of constructing an energy action space according to the load prediction result and combining with power grid initial data, and the step of determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm comprises the following steps:
acquiring the load prediction result and the power grid initial data, defining a state space according to the load prediction result and the power grid initial data, determining a first adjustment range and a second adjustment range according to the state space, and determining the energy action space according to the first adjustment range and the second adjustment range and combining the power supply unit characteristics acquired in advance;
Determining a reward function according to the energy action space and combining system loss and grid stability, selecting grid action according to the strategy optimization algorithm at each time step according to the reward function, iterating the state space and the energy action space according to the grid action, and determining the regulation and control optimization strategy according to the iterated state space and energy action space and combining a preset strategy optimization algorithm.
In an alternative embodiment of the present invention,
and determining a reward function according to the energy action space and combining system loss and grid stability, wherein the reward function is shown in the following formula:
wherein,R(s,a)indicating the value of the prize,sthe state of the system is indicated and,aindicating the action of the power grid,Loss(s,a)indicating the loss of the system and,αthe weight coefficient is represented by a number of weight coefficients,VoltageStability(s,a)indicating voltage stability.
In a second aspect of the embodiment of the present invention, there is provided a power grid regulation system based on multi-level data, including:
the first unit is used for acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input;
The second unit is used for transmitting the second load input in the second load prediction model in the sequence from a root node to a leaf node according to the second load input and combining a preset second load prediction model to obtain second load output, and determining a load prediction result according to the second load output and combining a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm;
and the third unit is used for constructing an energy action space according to the load prediction result and combining with the initial data of the power grid, and determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm.
In a third aspect of an embodiment of the present invention,
there is provided an electronic device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method described previously.
In a fourth aspect of an embodiment of the present invention,
there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method as described above.
According to the embodiment of the invention, through the preset first and second load prediction models, the load of the power grid can be accurately predicted by the scheme. The system is helpful to better know the future electricity demand, so that a more effective regulation strategy is formulated, and a complex relationship between loads can be better captured by adopting a tree model constructed based on an extreme gradient lifting algorithm. The model can provide a more accurate second load prediction result, is helpful for improving the understanding of the state of the power grid, and can construct an energy action space by combining the load prediction result and the initial data of the power grid. The space reflects available energy regulation and control options in the system, provides a basis for subsequent strategy optimization, and in conclusion, the scheme can better adapt to the complexity of power grid operation through load prediction and strategy optimization algorithm, and improves the regulation and control capability of the power grid.
Drawings
FIG. 1 is a schematic flow chart of a power grid regulation method based on multistage data according to an embodiment of the invention;
fig. 2 is a schematic structural diagram of a power grid regulation system based on multi-level data according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 is a flow chart of a power grid regulation method based on multi-level data according to an embodiment of the present invention, as shown in fig. 1, the method includes:
s1, acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input;
the power grid initial data specifically refer to historical power consumption data, distributed energy data and power grid state data, wherein the historical power consumption data refers to power consumption data in unit time in the past, the distributed energy data refers to real-time or historical power generation data of distributed energy sources such as photovoltaic power generation, wind power generation, hydropower and the like, and the power grid state data refers to information such as voltage, frequency and equipment running state of each node in the power grid.
The first load input is a result of inputting initial data of the power grid into a first load prediction model for processing, and the preprocessing specifically includes performing data cleaning and feature selection on the initial data of the power grid by using the first load prediction model, and may include processing missing values and abnormal values, selecting the most relevant features, and the like.
In an alternative embodiment of the present invention,
inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining a first load input, combining the first load prediction model according to the first load input, and obtaining a second load input comprises the following steps:
acquiring historical electricity utilization data through a database, acquiring power grid state data according to an intelligent sensor arranged in a power grid node, adding the historical electricity utilization data and the power grid state data into the same set, and recording the historical electricity utilization data and the power grid state data as initial data of a power grid;
performing data cleaning and feature selection operation on the initial data of the power grid through a first load prediction model to obtain the first load input;
determining a forward hidden state and a backward hidden state through a bidirectional state network in the first load prediction model according to the first load input;
And according to the forward hiding state and the backward hiding state, combining a preset residual error module and a self-attention mechanism, directly adding input data of a specific layer in the bidirectional state network into output data of the bidirectional state network, and determining the second load input.
And acquiring data from the historical electricity utilization database, wherein the data comprise a time stamp and corresponding electricity utilization amount information, acquiring power grid state data comprising information such as current, voltage, frequency and the like through an intelligent sensor arranged in a power grid node, and combining the historical electricity utilization data and the power grid state data into a data set, wherein the time stamp is used for aligning the data.
Performing data cleaning and feature selection by using a first load prediction model, including processing missing values and abnormal values, selecting the most relevant features and the like, generating a first load input according to the cleaned and feature-selected data, and taking the first load input as an input value of the first load prediction model;
illustratively, assuming a grid, it is desirable to predict the power load for a future day. Historical electricity utilization data and power grid state data related to intelligent sensors in power grid nodes are collected, the missing time points are filled with average values of data before and after the missing time points, data exceeding a reasonable range are treated as abnormal values and processed through a method based on a threshold value, the correlation between each feature and a target (load) is calculated, the feature with high correlation is selected, and the first load input is obtained through the operation.
The reasonable range data can be determined according to historical electricity data, and can also be correspondingly adjusted according to date and time, for example, in summer, the power grid load can be increased due to the use of an air conditioner, so that the reasonable range in the scheme can be determined according to the historical average load in summer.
Using a deep learning framework, importing required layers, optimizers and other tools, loading a pre-trained first load prediction model, wherein the model comprises a bidirectional state network, acquiring the first load input data, ensuring that the format and structure are matched with model inputs, adding the first load input data into the loaded first load prediction model, and acquiring forward and backward hidden states through the output of the model.
The forward hidden state is information reserved from the beginning to the end of the sequence when the model processes the input sequence, the forward hidden state comprises all information before the current time step in the sequence and is a representation learned by the model before the current time step, the backward hidden state is information reserved from the end to the beginning of the sequence when the model processes the input sequence, and the backward hidden state comprises all information after the current time step in the sequence and is a representation learned by the model after the current time step.
Acquiring a forward hidden state and a backward hidden state of a specific layer in a bidirectional state network, carrying out residual connection on the forward hidden state and the backward hidden state with an original input through corresponding element addition, selecting different residual connection strategies, such as direct addition connection or weighted addition connection, calculating attention weights by using a self-attention mechanism, applying the attention weights to weighted combination of the hidden states, adjusting the bidirectional hidden state, determining the hidden state processed by a residual module and the self-attention mechanism, and inputting the hidden state as a second load;
for example, assuming that there is a task of predicting the load condition of the power grid, defining a prediction model including a plurality of computing layers, each computing layer having a corresponding forward hidden state and backward hidden state, setting a residual module at a specific layer to perform residual connection, extracting the corresponding forward hidden state and backward hidden state in each computing layer, dynamically adjusting weights of the extracted forward hidden state and backward hidden state according to a self-attention mechanism, adjusting the bidirectional state network through the attention weights, and determining the second load input.
In the step, by integrating historical electricity utilization data and power grid state data, the initial power grid data form a comprehensive data set containing rich information, so that comprehensive cognition on the overall state of the power grid is improved, and a more comprehensive and accurate load prediction model is facilitated to be established; the first load prediction model performs data cleaning and feature selection on the initial data of the power grid, extracts key load prediction features, improves understanding and expression capacity of the model on input data by removing noise and selecting important features, and enhances generalization capacity of the model; the forward and backward hidden states of each time step are extracted by utilizing a bidirectional state network, so that the information related to the front and back in the time sequence can be captured, the dynamic change of the load is better reflected, and the modeling capability of the model on the sequence is improved; the residual error module and the self-attention mechanism are introduced into the specific layer, so that the processing capacity of the model on the sequence information is enhanced, and the model better retains the original input information through residual error connection; the self-attention mechanism enhances the attention of the model to different time steps in the sequence, and improves the capturing capability of key information.
In conclusion, the embodiment effectively improves the capacity of power grid load prediction by integrating multi-source data and introducing a complex model structure and a processing mechanism, and provides more intelligent support for power grid regulation.
S2, according to the second load input, a preset second load prediction model is combined, the second load input is transmitted in the second load prediction model in the sequence from a root node to a leaf node, second load output is obtained, according to the second load output, a load prediction result is determined by combining a preset result optimization algorithm, and the second load model is a tree model constructed based on an extreme gradient lifting algorithm;
the tree model is a machine learning model based on a tree structure, and a tree structure is constructed to predict or classify through recursion binary division of input data; the root node is the starting node of the decision tree or tree model, and is positioned at the top of the tree. It is an entry into the tree, starting with a root node, each level of nodes of the tree being connected by edges to the next level of nodes, the task of the root node being to select a feature from which the input data is then partitioned, the leaf node being the end node of the tree, which has no child nodes. At the leaf nodes, the model gives the final output or predicted result, and the leaf nodes contain an output value that is determined by the leaf node that the input data finally arrives at after the decision condition has been made on each branch of the tree. The extreme gradient lifting is a gradient lifting algorithm, and belongs to the field of integrated learning.
In an alternative embodiment of the present invention,
transmitting the second load input in the second load prediction model according to the second load input and a preset second load prediction model, and obtaining a second load output, and determining a load prediction result according to the second load output and a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm and comprises the following steps:
acquiring the second load input, adding the second load input to the second load prediction model, transmitting the second load input downwards from a root node of the second load prediction model, judging a transmission direction at each leaf node according to a preset node splitting condition, transmitting leftwards if the preset node splitting condition is met, and transmitting rightwards until the transmission is completed, so as to obtain the second load output;
and according to the output of the second load, removing abnormal values in the second load and correcting according to data trend by combining the result optimization algorithm, and determining the load prediction result.
Recursively transferring the second load input to each node of the tree, starting from the root node of the tree model, according to a preset node splitting condition, and for each node, judging the transfer direction: if the node splitting condition is met, transmitting leftwards, otherwise, transmitting rightwards, repeating the process until the leaf node is reached, and acquiring an output value of the node, namely a predicted value of the second load, at the leaf node, wherein the output value is output as a final second load;
the node splitting condition is set according to a specific node, and there is an eigenvector (x, y) by way of example, and the splitting condition of the first node is that x is greater than 1, if the splitting condition is met, the left subtree is entered, and if the splitting condition is not met, the right subtree is entered.
Optimizing the second load output by using a result optimization algorithm, and identifying and removing abnormal values in the second load output by using an abnormal value detection algorithm; analyzing the trend of the second load output, and correcting possible abnormal values according to past observed values by using methods such as sliding windows, exponential smoothing and the like so as to enable the possible abnormal values to accord with the overall trend of the data; and combining the abnormal value removal and the trend corrected second load output to determine a final load prediction result.
Illustratively, assuming a time series containing historical load data, wherein each time point has a corresponding second load value, using statistical methods such as Z-score or IQR, and assuming that the second load value at a certain time point exceeds a certain threshold, the data points detected as outliers are removed from the second load output, the trend of the second load output may be analyzed by sliding window, exponential smoothing, etc., if the second load value at a certain time point deviates significantly from the trend, it may be an outlier, and correction is required; the average or median of the adjacent time points at each time point is calculated by using a sliding window average or median method and the like, and the second load value at the current time point is compared with the calculated value to carry out correction. And combining the corrected second load output with the result of removing the abnormal value to obtain a final load prediction result.
In the embodiment, the second load input is transmitted to the leaf nodes of the tree model layer by layer, and the model can be finely divided according to different characteristics and conditions, so that the accuracy of load prediction is improved; through preset node splitting conditions, the model can adaptively divide different types according to the characteristics of input data, so that the model can adapt to complex power grid load change rules; the result optimization algorithm combines outlier detection and correction strategies to help remove outliers in the second load output. The robustness of load prediction is improved, the model can be better adapted and predicted when the model faces abnormal conditions, and the change trend of data can be better captured and corrected by analyzing the trend of second load output and adopting methods such as sliding window, exponential smoothing and the like. This helps to make the load prediction result smoother and more realistic.
In an alternative embodiment, the method further comprises training a second load prediction model:
obtaining a second load input, converting the second load input into a feature vector, dividing a continuous feature value into discrete intervals by an equal-frequency division barrel strategy for the continuous feature value, discretizing to obtain a feature value range, and constructing a histogram by a lightweight gradient lifting algorithm according to the feature value range;
determining a first gain value of a current leaf node through a node gain function based on a leaf node preferential growth strategy, selecting a node with the maximum gain in the current leaf node for splitting to obtain the maximum gain value, constructing a loss function according to the maximum gain value, calculating gradient and second derivative of the current leaf node according to the loss function, and constructing second Taylor expansion of an objective function;
and traversing the characteristic values of all the leaf nodes for each leaf node, determining the leaf node with the minimum loss function value after splitting by combining the gradient and the second derivative of the current leaf node, marking the leaf node as a split leaf node, splitting the split leaf node into two leaf nodes, calculating the gradient and the second derivative of the split leaf node, and repeating the operation until the stopping condition is met.
Historical data of the second load is obtained, including various characteristics such as temperature, season, time, etc., and the second load input is converted into a feature vector. And discretizing the continuous features by using an equal-frequency division bucket strategy to obtain discrete values of the features. Each sample is converted into a feature vector containing each feature, a tree model is initialized, super parameters such as maximum depth and learning rate of the tree are set, discretization is carried out on each feature, and then a histogram is built based on a lightweight gradient lifting algorithm.
The whole tree is initialized from the root node, each leaf node is traversed, the first gain value of the current leaf node is determined by a node gain function, illustratively, from the root node, the whole tree is empty, and for each leaf node, the first gain value is calculated, which is determined by the node gain function, which is generally an index representing the fitting quality of the model, such as square loss, absolute loss, etc. Which represents the degree of performance improvement of the model at the current node. In the case of square loss, the gain may be the mean square error reduction before and after node splitting, and for each leaf node, the node gain values for its left and right child nodes after splitting are calculated.
The leaf node with the largest gain is selected for splitting, a loss function is constructed from the largest gain value, typically using either squared or absolute loss, the gradient and second derivative of the current leaf node are calculated from the loss function, and the second taylor expansion of the objective function is constructed.
Traversing the characteristic values of the current leaf nodes, carrying out splitting test on each characteristic value, and determining the leaf node with the minimum splitting loss function value by combining the gradient and the second derivative of the current leaf node. And taking the characteristic value meeting the condition as a splitting point, splitting the current leaf node into two leaf nodes, calculating the gradient and the second derivative of the split leaf nodes, and repeating the operation until the depth of the tree reaches a set value or the number of samples in the nodes is smaller than a certain threshold value.
The equal-frequency barrel dividing strategy is a method for dividing a continuous characteristic value into discrete intervals, ensures that each interval contains the same number of samples, simplifies complexity by segmenting data, reduces sensitivity to abnormal values and improves robustness of a model. The equal frequency division strategy specifically includes ascending order of the eigenvalues, determining the number of sub-buckets according to the need, for example, if the eigenvalues are desired to be divided into 10 buckets, dividing the data into 10 equal divisions, calculating corresponding quantiles according to the number of sub-buckets, and dividing the eigenvalues into corresponding buckets according to the quantiles obtained by calculation. Each bucket contains the same number of samples, and each bucket is discretized with a label or value representing the bucket.
In the embodiment, the tree model can be more efficiently constructed by adopting a lightweight gradient lifting algorithm and a node priority growth strategy, the calculation complexity is reduced, the training speed of the model is improved, the robustness of the model is improved, the sensitivity to abnormal values is reduced by performing characteristic discretization through an equal-frequency division bucket strategy, the model is better adapted to different data distribution, the nonlinear relation of the data can be better captured by the tree model through node splitting and optimizing operation, and the prediction performance of the model is improved.
In an alternative embodiment, a first gain value of a current leaf node is determined through a node gain function, a node with the maximum gain in the current leaf node is selected for splitting, the maximum gain value is obtained, and a loss function is constructed according to the maximum gain value, wherein the formula is as follows:
;
wherein,Da data set representing the current node is displayed,Loss(D)the loss function is represented by a function of the loss,y i representing a sampleiIs a real tag of the (c) in the (c),y avg representing the mean value of the current node,y split representing the mean value of the nodes after the splitting,max split ()representing the choice of split mode among all possible modes that maximizes the loss function.
The function selects the node with the maximum gain in the current leaf nodes for splitting by calculating the loss function. This means that when the model selects split nodes, the model focuses more on improving the fitting effect of the whole model, so that the split child nodes are more likely to contain more information, the difference between samples can be captured better, the split mode is selected through maximization of the loss function, the model focuses more on improving the fitting effect of the training set, and the prediction performance of the model is hopefully improved. This is particularly important in grid regulation, because accurate load prediction is critical to reasonable scheduling of the grid, and meanwhile, because the loss function considers the mean square error of the nodes after splitting, the model is more suitable for data with different distributions, and in conclusion, the function can enable the lightweight gradient lifting algorithm to more effectively construct a tree model, improve the performance and robustness of the model, and further realize more accurate and reliable load prediction in grid regulation.
S3, constructing an energy action space according to the load prediction result and combining with power grid initial data, and determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm.
The energy action space refers to a set of energy scheduling schemes which can be selected by a system in power grid regulation and control. It describes various energy scheduling decisions that the system can take given certain grid initial data and load prediction results; the policy optimization algorithm is a near-end method for optimizing policies by performing multiple policy update steps in each iteration, ensuring conservation of the updates by minimizing the relative probability proportion of the policy updates.
In an alternative embodiment of the present invention,
according to the load prediction result, combining with power grid initial data, constructing an energy action space, and determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm and comprises the following steps:
acquiring the load prediction result and the power grid initial data, defining a state space according to the load prediction result and the power grid initial data, determining a first adjustment range and a second adjustment range according to the state space, and determining the energy action space according to the first adjustment range and the second adjustment range and combining the power supply unit characteristics acquired in advance;
Determining a reward function according to the energy action space and combining system loss and grid stability, selecting grid action according to the strategy optimization algorithm at each time step according to the reward function, iterating the state space and the energy action space according to the grid action, and determining the regulation and control optimization strategy according to the iterated state space and energy action space and combining a preset strategy optimization algorithm.
And acquiring a load prediction result and power grid initial data from a database or other data sources, and defining a state space by combining the load prediction result and the power grid initial data. The state space may include a power grid node state, a load demand, an energy supply state, and the like, and according to the defined state space, the energy action space is defined in combination with the characteristics of the power supply unit, including the start-stop characteristic of the generator and the charge-discharge characteristic of the energy storage system, including the adjustment of active power, the adjustment of reactive power, the electric power market transaction, and the like.
Illustratively, the generator maximum active power: 1000 kW, minimum active power output (Pmin): 100 kW, active power adjustment granularity: 50 kW, maximum reactive power output (Qmax): 300 kVAR, minimum reactive power output (Qmin): 200 kVAR, then the active power range of the energy action space of the generator: 100 kW-1000 kW, with 50 kW as the adjustment granularity, reactive power range: -200 kVAR-300 kVAR, with 50 kVAR as the adjustment particle size.
According to the power grid state and the output of the power supply unit, calculating the system loss, considering factors such as voltage stability, frequency stability and the like, defining a power grid stability index, combining the system loss with the power grid stability index, and constructing a reward function, wherein the reward function can be a negative value of the system loss, and is smaller and better because the influence of the power grid stability is considered, and according to the state space and the energy action space defined in the previous steps, the system loss is used as a search space of an optimization algorithm.
And searching optimal actions in the defined state space and the energy action space by using a strategy optimization algorithm in each time step, generating new power grid actions by using the optimization algorithm, updating the output of the power supply unit, simulating the response of the power grid, calculating rewards of the current time step according to the current power grid state, the output of the power supply unit and the defined rewarding function, updating parameters or models in the strategy optimization algorithm by using rewards information, repeating the steps until the maximum iteration times or preset stopping conditions are reached, such as iteration 50 times, and determining a regulation and control optimization strategy, namely the power supply unit actions to be adopted in the given power grid state according to the final strategy model.
The first adjusting range specifically refers to the reactive power adjusting range, the second adjusting range specifically refers to the active power adjusting range, the state space is a set describing the power grid and the system state, including but not limited to the power grid state such as the power grid node voltage, the frequency and the like, the system load demand, the energy source action space specifically refers to the action range of the power supply unit, including the active power and the reactive power adjusting range, the generator start-stop state, the charging and discharging state of the energy storage system and the actions of other power supply units, and the power supply unit characteristics refer to the energy source devices such as the generator, the energy storage system and the like in the power supply system.
In this embodiment, by defining a state space, determining the first adjustment range and the second adjustment range, the system is able to consider grid states and adjustment requirements in a higher level, more comprehensive dimension. The method is beneficial to improving the flexibility and accuracy of regulation and control, and is beneficial to building an energy action space which is more in line with reality by considering the characteristics of a power supply unit, such as the start-stop characteristic of a generator, the charge-discharge efficiency of an energy storage system and the like, and can make a system more intelligently make regulation and control decisions by carefully designing a reward function and selecting a strategy optimization algorithm suitable for the problem of regulating and controlling the power grid, and the regulation and control decisions based on the energy action space not only consider the optimization of system loss, but also comprehensively consider the stability of the power grid, so that the safe operation of the power grid is maintained and the economic utilization efficiency of electric energy is improved.
In summary, the embodiment makes real-time decisions and iterative optimization in an intelligent manner by comprehensively considering the system state, the energy characteristics and the regulation and control requirements, so that the efficiency of power grid regulation and control is comprehensively improved, and the power grid is safer, more stable and more efficient.
In an alternative embodiment, the determining the reward function according to the energy action space, in combination with the system loss and the grid stability, is as follows:
wherein,R(s,a)indicating the value of the prize,sthe state of the system is indicated and,aindicating the action of the power grid,Loss(s,a)indicating the loss of the system and,αthe weight coefficient is represented by a number of weight coefficients,VoltageStability(s,a)indicating voltage stability.
By using the function, the regulation and control system tends to improve the effective utilization rate of electric energy and reduce energy loss by minimizing the system loss, so that the economy of the power grid is promoted, and the stability of the power grid is more concerned by the regulation and control of the system by introducing a voltage stability term and rewarding the function. The method is helpful for preventing the voltage instability problem caused by regulation and control decisions, improving the reliability of the power grid, and comprehensively considering two important factors of system loss and voltage stability by using a reward function. By adjusting the weight coefficients, the trade-off between economy and stability can be balanced. The comprehensive optimization target is favorable for realizing multi-target optimization of the regulation and control decision of the power grid, and in sum, two aspects of economy and stability are fully considered by using the function, and the regulation and control decision of the power grid regulation and control system is more intelligently and comprehensively carried out under the support of multi-stage data by balancing the relation between the two aspects, so that the regulation and control efficiency of the power grid is further improved.
Fig. 2 is a schematic structural diagram of a power grid regulation system based on multi-level data according to an embodiment of the present invention, as shown in fig. 2, the system includes:
the first unit is used for acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input;
the second unit is used for transmitting the second load input in the second load prediction model in the sequence from a root node to a leaf node according to the second load input and combining a preset second load prediction model to obtain second load output, and determining a load prediction result according to the second load output and combining a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm;
and the third unit is used for constructing an energy action space according to the load prediction result and combining with the initial data of the power grid, and determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm.
The present invention may be a method, apparatus, system, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for performing various aspects of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (7)

1. A multi-level data-based power grid regulation method, comprising:
acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input;
Inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining a first load input, combining the first load prediction model according to the first load input, and obtaining a second load input comprises the following steps:
acquiring historical electricity utilization data through a database, acquiring power grid state data according to an intelligent sensor arranged in a power grid node, adding the historical electricity utilization data and the power grid state data into the same set, and recording the historical electricity utilization data and the power grid state data as initial power grid data;
performing data cleaning and feature selection operation on the initial data of the power grid through the first load prediction model to obtain the first load input;
determining a forward hidden state and a backward hidden state through a bidirectional state network in the first load prediction model according to the first load input;
according to the forward hiding state and the backward hiding state, combining a preset residual error module and a self-attention mechanism, directly adding input data of a specific layer in the bidirectional state network into output data of the bidirectional state network, and determining the second load input;
According to the second load input, a preset second load prediction model is combined, the second load input is transmitted in the second load prediction model in the sequence from a root node to a leaf node to obtain second load output, and according to the second load output, a load prediction result is determined by combining a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm;
transmitting the second load input in the second load prediction model according to the second load input and a preset second load prediction model, and obtaining a second load output, and determining a load prediction result according to the second load output and a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm and comprises:
acquiring the second load input, adding the second load input to the second load prediction model, transmitting the second load input downwards from a root node of the second load prediction model, judging a transmission direction at each leaf node according to a preset node splitting condition, transmitting leftwards if the preset node splitting condition is met, and transmitting rightwards until the transmission is completed, so as to obtain the second load output;
Removing abnormal values in the second load output according to the second load output and combining the result optimization algorithm, correcting according to data trend, and determining the load prediction result; according to the load prediction result, combining with power grid initial data, constructing an energy action space, and determining a regulation and control optimization strategy through a preset strategy optimization algorithm according to the energy action space, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm;
the step of constructing an energy action space according to the load prediction result and combining with power grid initial data, and the step of determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm comprises the following steps:
acquiring the load prediction result and the power grid initial data, defining a state space according to the load prediction result and the power grid initial data, determining a first adjustment range and a second adjustment range according to the state space, and determining the energy action space according to the first adjustment range and the second adjustment range and the power unit characteristics acquired in advance;
determining a reward function according to the energy action space and combining system loss and grid stability, selecting grid action according to the strategy optimization algorithm at each time step according to the reward function, iterating the state space and the energy action space according to the grid action, and determining the regulation and control optimization strategy according to the iterated state space and energy action space and combining a preset strategy optimization algorithm.
2. The method of claim 1, further comprising training the second load prediction model:
obtaining a second load input, converting the second load input into a feature vector, dividing a continuous feature value into discrete intervals by an equal-frequency division barrel strategy for the continuous feature value, discretizing to obtain a feature value range, and constructing a histogram by a lightweight gradient lifting algorithm according to the feature value range;
determining a first gain value of a current leaf node through a node gain function based on a leaf node preferential growth strategy, selecting a node with the maximum gain in the current leaf node for splitting to obtain the maximum gain value, constructing a loss function according to the maximum gain value, calculating gradient and second derivative of the current leaf node according to the loss function, and constructing second Taylor expansion of an objective function;
and traversing the characteristic values of all the leaf nodes for each leaf node, determining the leaf node with the minimum loss function value after splitting by combining the gradient and the second derivative of the current leaf node, marking the leaf node as a split leaf node, splitting the split leaf node into two leaf nodes, calculating the gradient and the second derivative of the split leaf node, and repeating the operation until the stopping condition is met.
3. The method according to claim 2, wherein the determining the first gain value of the current leaf node by the node gain function selects a node having the maximum gain in the current leaf node for splitting, obtains the maximum gain value, and constructs the loss function according to the maximum gain value as shown in the following formula:
;
wherein,Da data set representing the current node is displayed,Loss(D)the loss function is represented by a function of the loss,y i representing a sampleiIs a real tag of the (c) in the (c),y avg representing the mean value of the current node,y split representing the mean value of the nodes after the splitting,max split ()representing the choice of split mode among all possible modes that maximizes the loss function.
4. The method of claim 1, wherein determining the bonus function based on the energy motion space in combination with system loss and grid stability is as follows:
wherein,R(s,a)indicating the value of the prize,sthe state of the system is indicated and,aindicating the action of the power grid,Loss(s,a)indicating the loss of the system and,αthe weight coefficient is represented by a number of weight coefficients,VoltageStability(s,a)indicating voltage stability.
5. A multi-level data based grid conditioning system for implementing the multi-level data based grid conditioning method of any of the preceding claims 1-4, comprising:
The first unit is used for acquiring initial power grid data, inputting the initial power grid data into a preset first load prediction model, preprocessing the initial power grid data through the first load prediction model, determining first load input, and combining the first load prediction model according to the first load input to obtain second load input;
the second unit is used for transmitting the second load input in the second load prediction model in the sequence from a root node to a leaf node according to the second load input and combining a preset second load prediction model to obtain second load output, and determining a load prediction result according to the second load output and combining a preset result optimization algorithm, wherein the second load model is a tree model constructed based on an extreme gradient lifting algorithm;
and the third unit is used for constructing an energy action space according to the load prediction result and combining with the initial data of the power grid, and determining a regulation and control optimization strategy according to the energy action space through a preset strategy optimization algorithm, wherein the strategy optimization algorithm is constructed according to an improved near-end strategy optimization algorithm.
6. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of claims 1 to 4.
7. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 4.
CN202311407380.6A 2023-10-27 2023-10-27 Power grid regulation and control method and system based on multi-level data Active CN117175595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311407380.6A CN117175595B (en) 2023-10-27 2023-10-27 Power grid regulation and control method and system based on multi-level data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311407380.6A CN117175595B (en) 2023-10-27 2023-10-27 Power grid regulation and control method and system based on multi-level data

Publications (2)

Publication Number Publication Date
CN117175595A CN117175595A (en) 2023-12-05
CN117175595B true CN117175595B (en) 2024-03-15

Family

ID=88941619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311407380.6A Active CN117175595B (en) 2023-10-27 2023-10-27 Power grid regulation and control method and system based on multi-level data

Country Status (1)

Country Link
CN (1) CN117175595B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451188A (en) * 2017-06-26 2017-12-08 中国电力科学研究院 A kind of dissemination method and system of power grid regulation model data multistage combination of nodes
CN113783179A (en) * 2020-06-09 2021-12-10 北京映翰通网络技术股份有限公司 Power grid load prediction and optimization method
EP3968247A1 (en) * 2019-06-21 2022-03-16 Siemens Aktiengesellschaft Power load data prediction method and device, and storage medium
CN114548653A (en) * 2021-12-30 2022-05-27 国网宁夏电力有限公司 Power grid load regulation and control platform data acquisition method and system and electronic equipment
CN115952928A (en) * 2023-03-13 2023-04-11 广东电网有限责任公司佛山供电局 Short-term power load prediction method, device, equipment and storage medium
CN115994314A (en) * 2022-08-26 2023-04-21 上海市建筑科学研究院有限公司 Load prediction method
CN116187601A (en) * 2023-05-04 2023-05-30 华北理工大学 Comprehensive energy system operation optimization method based on load prediction
CN116316599A (en) * 2023-03-28 2023-06-23 广东电网有限责任公司东莞供电局 Intelligent electricity load prediction method
CN116646933A (en) * 2023-07-24 2023-08-25 北京中能亿信软件有限公司 Big data-based power load scheduling method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275240B (en) * 2019-12-27 2023-06-09 华北电力大学 Load prediction method based on multi-energy coupling scene

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451188A (en) * 2017-06-26 2017-12-08 中国电力科学研究院 A kind of dissemination method and system of power grid regulation model data multistage combination of nodes
EP3968247A1 (en) * 2019-06-21 2022-03-16 Siemens Aktiengesellschaft Power load data prediction method and device, and storage medium
CN113783179A (en) * 2020-06-09 2021-12-10 北京映翰通网络技术股份有限公司 Power grid load prediction and optimization method
CN114548653A (en) * 2021-12-30 2022-05-27 国网宁夏电力有限公司 Power grid load regulation and control platform data acquisition method and system and electronic equipment
CN115994314A (en) * 2022-08-26 2023-04-21 上海市建筑科学研究院有限公司 Load prediction method
CN115952928A (en) * 2023-03-13 2023-04-11 广东电网有限责任公司佛山供电局 Short-term power load prediction method, device, equipment and storage medium
CN116316599A (en) * 2023-03-28 2023-06-23 广东电网有限责任公司东莞供电局 Intelligent electricity load prediction method
CN116187601A (en) * 2023-05-04 2023-05-30 华北理工大学 Comprehensive energy system operation optimization method based on load prediction
CN116646933A (en) * 2023-07-24 2023-08-25 北京中能亿信软件有限公司 Big data-based power load scheduling method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于梯度提升决策树的电力短期负荷预测模型;毕云帆等;《青岛大学学报(工程技术版)》;全文 *
基于深度强化学习近端策略优化的电网无功优化方法;张沛等;《电网技术》;全文 *
基于近端策略优化算法的新能源电力系统安全约束经济调度方法;杨志学等;《电网技术》;全文 *

Also Published As

Publication number Publication date
CN117175595A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
Song et al. Hourly heat load prediction model based on temporal convolutional neural network
CN110969290B (en) Runoff probability prediction method and system based on deep learning
CN112131733B (en) Distributed power supply planning method considering influence of charging load of electric automobile
CN111414717A (en) XGboost-L ightGBM-based unit power prediction method
CN111401755B (en) Multi-new-energy output scene generation method, device and system based on Markov chain
CN105631528B (en) Multi-target dynamic optimal power flow solving method based on NSGA-II and approximate dynamic programming
CN110380444B (en) Capacity planning method for distributed wind power orderly access to power grid under multiple scenes based on variable structure Copula
CN110889603A (en) Power system economic dispatching method considering wind power correlation based on PCA-Copula theory
CN111079989A (en) Water supply company water supply amount prediction device based on DWT-PCA-LSTM
CN111461404A (en) Short-term load and hydropower prediction method based on neural network prediction interval
CN112186761A (en) Wind power scene generation method and system based on probability distribution
CN111311001B (en) Bi-LSTM network short-term load prediction method based on DBSCAN algorithm and feature selection
CN116796141A (en) GBDT regression model-based office building energy consumption prediction method
CN117175595B (en) Power grid regulation and control method and system based on multi-level data
CN117113086A (en) Energy storage unit load prediction method, system, electronic equipment and medium
CN109586309B (en) Power distribution network reactive power optimization method based on big data free entropy theory and scene matching
CN115616333A (en) Power distribution network line loss prediction method and system
CN116108982A (en) Reservoir group multi-target scheduling collaborative searching method and system
Mahootchi et al. Opposition-based reinforcement learning in the management of water resources
CN115564139A (en) Energy value evaluation-based energy system running state optimization method and device
CN114266186B (en) Air conditioner energy consumption data missing value filling method, equipment and medium
CN114091767A (en) Method and system for robust random planning of data-driven comprehensive energy system
CN112183814A (en) Short-term wind speed prediction method
CN116842855B (en) Distributed photovoltaic power distribution network output prediction method and device, electronic equipment and medium
CN112801388B (en) Power load prediction method and system based on nonlinear time series algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant