Disclosure of Invention
In order to solve the technical problems that the electric quantity of the energy storage power station is wasted and the operation cost is high, the invention provides the following technical scheme:
An energy storage power station electric quantity optimization method based on graph calculation comprises the following steps:
Step S1, calculating and predicting future power generation capacity and load demand of an energy storage power station based on a graph, namely acquiring historical power generation data and load data of a distributed power station in a grid-connected area of the energy storage power station and external influence data, constructing a power grid topological graph structure, constructing a space-time diagram neural network model based on the power grid topological graph structure, and predicting the prediction result of the power generation capacity and the load demand of each hour of 24 hours in the future through the space-time diagram neural network model;
And S2, acquiring technical parameters and real-time operation data of the power distribution network in the power grid topological graph structure, calculating power and load values of all nodes in the power grid through power flow analysis, outputting the power and voltage of all the nodes in the power grid as power flow analysis results, and calculating to obtain the electric quantity required to be provided or consumed by the energy storage power station according to the predicted future power generation capacity and load requirements.
Further, step S1 specifically includes the following steps:
s11, data collection and preprocessing, namely acquiring historical power generation data of the energy storage power station grid-connected area, power grid load data, holiday data, weather data and equipment running state data of the energy storage power station grid-connected area, wherein the distributed power station comprises solar power and wind power stations;
Step S12, a power grid topological graph structure is built, namely the time sequence data processed in the step S11 are converted into a graph structure, time stamps and attribute information in the time sequence data are mapped to nodes and edges in the graph structure, the nodes, the edges and the attributes thereof are defined, the nodes represent power stations, substations and load points, and the edges represent paths of electric power flow, including power transmission lines or distribution lines and distribution line roadsides, and the power grid topological graph structure is obtained;
step S13, inputting the power grid topological graph structure in the step S12 as a graph neural network model, and constructing a space-time graph neural network model;
Step S14, training and verifying the space-time diagram neural network model by using the historical data of the step S11, and evaluating the performance of the space-time diagram neural network model and adjusting and optimizing by comparing the difference between the prediction result of the space-time diagram neural network model and the actual power grid state;
s15, predicting and verifying, namely predicting future power generation capacity and load demand by using a trained space-time diagram neural network model, and evaluating the accuracy and generalization capacity of the dynamic relation diagram model by cross verification or a leave-out method
Further, constructing a space-time diagram neural network model in step S13 includes:
Calculating the change trend and the spatial distribution characteristics of the power grid topological graph structure on a time sequence to obtain embedded representation of the graph, inputting the embedded representation to an encoder, extracting the characteristics by the encoder, outputting a dynamic graph of the power grid state at a preset time in the future at the decoder by combining an attention mechanism, and finally obtaining a space-time graph neural network model.
Further, step S13 is more specific and includes:
Firstly, capturing the change trend of each node and the attribute thereof along with time in a power grid topological graph structure by utilizing a time sequence analysis technology, and converting the power grid topological structure and time sequence data into an embedded representation of the graph to obtain the embedded representation of the graph;
Inputting the embedded representation of the graph to an encoder;
And (3) feature extraction is carried out by combining an attention mechanism, namely the attention mechanism is introduced into the encoder, key changes in the power grid are captured, the extracted features are input into the decoder after being processed by the encoder, and a dynamic map of the power grid state within a preset time period in the future is output by the decoder, so that a space-time map neural network model is obtained.
Further, step S2 includes obtaining technical parameters and real-time operation data of the power distribution network in the power grid topological graph structure, wherein the technical parameters and the real-time operation data comprise loads and voltages of all nodes, inputting the power grid topological graph structure and the real-time operation data into a power flow calculation tool, obtaining a power flow analysis result of the power distribution network by using a power flow calculation method, and outputting the power and the voltages of all nodes in the power grid as the power flow analysis result.
Further, specifically, step S2 includes:
step S21, obtaining the power generation capacity and the load demand of each hour period in the future day predicted by the space-time diagram neural network model, and obtaining the power value of each intermediate node in the circuit through load flow calculation:
Predicting the power generation capacity and the load demand of each small period of a future day by utilizing a space-time diagram neural network model, inputting the predicted power generation capacity and load demand as a power flow calculation tool, carrying out power flow calculation again, and outputting the power and voltage of each node in a power grid as a power flow analysis result so as to calculate the power value of each intermediate node in the circuit;
step S22, obtaining a load predicted value of the intermediate node and a load value calculated based on a load flow analysis result, and calculating to obtain the electric quantity required to be provided or consumed by the energy storage power station:
Based on the power flow analysis result, calculating to obtain an actual load value of the intermediate node, and comparing the load predicted value of the intermediate node with the power flow analysis load value to obtain the electric quantity required to be provided or consumed by the energy storage power station.
Further, the method further comprises the following steps:
Step S3, a profit maximization model is established according to a tide analysis result, and an optimal profit mode is output, wherein the optimal profit mode comprises a mode that a power storage station participates in an electric power market activity, charging power and discharging power in each small period, and charging duration and discharging duration;
The step S3 specifically comprises the following steps:
calculating the full life cycle cost of energy storage, namely leveling energy storage cost LCOS;
Determining an objective function and constraint conditions of energy storage power station economic benefit maximization by utilizing full life cycle cost LCOS of energy storage;
and the optimal combination of the energy storage participating in battery leasing, electric power market buying and selling and electric power auxiliary service, and the optimal charge and discharge power, the charge and discharge small period and the charge and discharge duration are solved by using an optimization method, so that the economic income of the energy storage power station is maximized.
Further, the full life cycle cost of the energy storage is calculated, namely the normalized energy storage cost LCOS is calculated according to the following specific calculation formula,
Wherein, the discharge time length under d rated power, the circulation efficiency of the eta energy storage station, the service life of the T system, the circulation times of n (T) years, the r discount rate, the operation and maintenance cost of Q & M (T) th year, the installation cost of CE along with the change of the capacity and the installation cost of CP along with the change of the power.
Further, the objective function of maximizing the economic benefit of the energy storage power station is expressed as:
P is the price of the price per unit time,Representing the price of the sold power in the w-th power market activity mode in the d1 th hour period,Representing the price of purchased power in the w-th power market activity mode in the d1 th hour period;
S is the power of the power source,The discharge power of the mode participating in the w-th electric market activity in the d1 th hour is represented, and the negative sign represents discharge; the charging power of the mode participating in the w-th electric power market activity in the d1 th hour is represented, and the positive sign represents charging;
The discharge duration of the mode participating in the w-th electric market activity in the d1 hour period is represented, and the negative sign represents discharge; The charging duration of the mode participating in the w-th power market activity in the d1 th hour period is represented, and the positive sign represents charging;
Incomerent is rental revenue for τ cycles.
Further, constraint conditions of the objective function include energy storage capacity constraint, charging power and discharging power constraint, energy storage energy balance constraint and initial and final energy level constraint of the energy storage system, and the specific formula of the energy storage capacity constraint is as follows:
Emin-Erent<Ed1<Emax-Erent
Wherein Emin represents the stored energy minimum energy level, Emax represents the stored energy maximum energy level, Erent represents the rented-out energy storage battery capacity, Ed1 represents the energy at time d1 of the stored energy, and d1=1, 2, 3.
Compared with the prior art, the invention has the following beneficial effects:
1. According to the method, the power grid topological graph structure is constructed by acquiring historical power generation data and load data of the distributed power station in the grid-connected area of the energy storage power station and external influence data such as holidays and weather data, the prediction result of the power generation data and the load data of each small period of time in the future 24 hours is obtained, the power flow analysis result of the power distribution network is obtained, the power and the voltage of each node in the power grid are output as the power flow analysis result, the electric quantity of the energy storage power station is distributed according to the requirement, the electric quantity of the energy storage power station is saved, and the electric quantity operation cost of the energy storage power station is reduced.
2. And establishing a profit maximization model according to the tide analysis result, and outputting an optimal profit mode which comprises a participation mode, the power of charging and discharging in each small period and the sufficient duration. The invention realizes the optimization of energy sources and reduces the cost of the power storage station.
Detailed Description
The technical solutions of the present invention will be clearly described below with reference to the accompanying drawings, and it is obvious that the described embodiments are not all embodiments of the present invention, and all other embodiments obtained by a person skilled in the art without making any inventive effort are within the scope of protection of the present invention.
The peak-to-valley electricity price difference refers to the difference in electricity price between the peak and the valley of electricity consumption. The energy storage power station can store energy when the electricity price is low and release energy when the electricity price is high, so that the difference income is obtained.
The auxiliary service refers to paid value-increasing service provided by the electric company to the user, such as peak regulation (peak-to-valley electricity price difference), frequency modulation, reactive power regulation and the like. The energy storage power station may receive revenue by providing these ancillary services.
Tidal current calculation is an electro-mechanical noun, which refers to calculating the distribution of active power, reactive power and voltage in a power grid under the conditions of given power system network topology, element parameters and power generation and load parameters. The tide calculation is to determine the steady state operation state parameters of each part of the power system according to the given power grid structure, parameters, the operation conditions of the generator, the load and other elements. Typically given operating conditions include power at various power and load points in the system, pivot point voltage, balance point voltage and phase angle. The operation state parameters to be solved comprise the voltage amplitude and phase angle of each bus node of the power grid, the power distribution of each branch, the power loss of the network and the like.
As shown in fig. 1, the invention provides a method for optimizing the electric quantity of an energy storage power station based on graph calculation, which comprises the following steps:
step S1, calculating and predicting future power generation capacity and load demand of the energy storage power station based on the graph:
And acquiring historical power generation data and load data of the distributed power station in the grid-connected area of the energy storage power station, and external influence data, constructing a power grid topological graph structure, constructing a space-time diagram neural network model based on the power grid topological graph structure, and predicting the power generation requirement and the prediction result of the load requirement of each hour of 24 hours in the future through the space-time diagram neural network model.
And the power generation capacity prediction is to consider the influence of weather forecast (especially for solar energy and wind energy), seasonal variation and other factors on renewable energy power generation. And load demand prediction, namely analyzing historical data, and considering the influence of factors such as workdays, holidays, air temperature changes and the like on the load demand.
Step S1, specifically comprising the following steps:
step S11, data collection and pretreatment:
The distributed power station for acquiring the grid-connected area of the energy storage power station comprises historical power generation data of solar power stations and wind power stations, power grid load data, holiday data, weather data and equipment running state data of the grid-connected area of the energy storage power station. Preprocessing the collected data, including cleaning the data, processing the missing values and the abnormal values, and normalizing the data.
Step S12, constructing a power grid topological graph structure:
and (3) converting the time series data processed in the step (S11) into a graph structure, and mapping the time stamp and the attribute information in the time series data to nodes and edges in the graph structure.
Nodes are defined, wherein in the figure, the nodes represent power stations, substations and load points. The definition edge represents the path of electric power flow, which can be a transmission line or a distribution line, wherein the transmission line edge is an electric power transmission path connecting a power station and a transformer substation or between the transformer substations, and the distribution line edge is an electric power distribution path from the transformer substation to a load point. Attribute node and edge assignment, node attributes such as power generation capacity, load level, holiday data, weather data and weather. Edge attributes such as line capacity, etc.
The graph neural network (GraphNeuralNetworks, GNNs) can be used as a new neural network model to process data of non-Euclidean structures, such as graphs, networks and the like. By converting the time series data into a graph structure and using a graph neural network to perform feature extraction and prediction, nonlinear relations and complex time series data can be processed, so that the accuracy of time series prediction is improved.
Step S13, inputting the power grid topological graph structure in the step S12 as a graph neural network model, and constructing a space-time graph neural network model:
Calculating the change trend and the spatial distribution characteristics of the power grid topological graph structure on a time sequence to obtain embedded representation of the graph, inputting the embedded representation to an encoder, extracting the characteristics by the encoder, outputting a dynamic graph of the power grid state at a preset time in the future at the decoder by combining an attention mechanism, and finally obtaining a space-time graph neural network model. Specific:
Firstly, capturing the change trend of each node (such as a power station, a transformer substation and a load point) and the attribute (such as power generation capacity, load level, weather condition and the like) of a power grid topological graph structure along with time by using a time sequence analysis technology (such as difference, moving average, autoregressive model and the like). Meanwhile, spatial relations among nodes, such as similarity of adjacent nodes, power flow conditions among nodes and the like, are analyzed to capture spatial distribution characteristics of a power grid, and power grid topological structure and time sequence data are converted into embedded representations of the graphs to obtain the embedded representations of the graphs.
The embedded representation of the graph is input to the encoder, and the resulting embedded representation of the graph is taken as the input to the encoder. The encoder is typically a graph neural network model for extracting characteristic information of the graph. In the encoder, graph structure data can be processed using graph neural network models such as graph roll-up network (GCN), graph annotation force network (GAT), etc., and high-level features thereof can be extracted.
Feature extraction is performed in conjunction with an attention mechanism that is introduced in the encoder to dynamically focus on important nodes and edges in the graph during feature extraction. The attention mechanism can assign different weights according to the attribute information of the nodes and edges and the relationships between them, thereby capturing key changes in the grid. And outputting a dynamic graph of the power grid state within a preset small time period in the future by the decoder, namely inputting the extracted characteristics into the decoder after the dynamic graph is processed by the encoder. The decoder is also typically a neural network model for predicting future grid conditions based on the extracted features.
The decoder may generate dynamic maps over a period of time in the future that reflect the changes in the properties of nodes and edges in the grid over time. Finally, a space-time diagram neural network model is obtained.
And step S14, model training, namely dividing the history data preprocessed in the step S11 into a training set, a verification set and a test set. The time space diagram neural network model is trained and validated using the historical data. By comparing the difference between the prediction result of the space-time diagram neural network model and the actual power grid state, the performance of the space-time diagram neural network model can be estimated, and necessary adjustment and optimization can be performed.
The loss function and optimizer are selected, defining a loss function (e.g., mean square error) and an optimizer (e.g., adam).
In the power prediction task, a commonly used loss function is Mean Square Error (MSE). The MSE calculates the average of the squares of the differences between the predicted and actual values, reflecting the accuracy of the model predictions. For each time step or period, the MSE between the predicted load or power generation and the actual load or power generation is calculated. During training, the goal is to minimize MSE to improve the prediction accuracy of the model.
Common optimizers are random gradient descent (SGD), adam, etc.
And continuously updating the parameters of the model in an iterative training mode. In each iteration, the predicted values of the model are calculated by first propagating forward, then the values of the loss function are calculated, then the gradient is calculated by propagating backward, and the parameters are updated using an optimizer.
During the training process, the values of the loss function and the performance variation of the model over the validation set are monitored.
When performance on the validation set is no longer improved, training may be stopped to avoid overfitting.
And S15, predicting and verifying, namely predicting the future power generation capacity and the load demand by using the trained space-time diagram neural network model, and evaluating the accuracy and the generalization capacity of the model by cross verification or a leave-out method.
And predicting the power generation capacity and the load demand for a period of time in the future by using a trained space-time diagram neural network model.
The accuracy and generalization ability of the model were evaluated by cross-validation or leave-on methods. Commonly used evaluation indexes include accuracy, recall, F1 score, MSE, MAE, etc.
And S2, acquiring technical parameters and real-time operation data of the power distribution network in the power grid topological graph structure, calculating power and load values of all nodes in the power grid through power flow analysis, outputting power and voltage of all nodes in the power grid as power flow analysis results, and calculating to obtain the electric quantity required to be provided or consumed by the energy storage power station according to future power generation capacity and load requirements predicted by the space-time diagram neural network model. Specific:
the method comprises the steps of obtaining technical parameters and real-time operation data of a power distribution network in a power grid topological graph, inputting the power grid topological graph structure and the real-time operation data into a power flow calculation tool, obtaining a power flow analysis result of the power distribution network by using a power flow calculation method, and outputting power and voltage of each node in the power grid as the power flow analysis result. The real-time operational data includes power injection (or load), voltage, etc. of each node.
Trend analysis is an important task in electrical power systems, which aims at calculating the power and voltage distribution of nodes in the electrical network. By acquiring the power grid topological graph, the technical parameters of the power distribution network and the real-time operation data, the power flow calculation tool can be utilized to obtain the power flow analysis result of the power grid. The results have important significance in the aspects of stable operation, optimal scheduling, fault analysis and the like of the power system.
More specifically, step S2 includes:
1) And obtaining the power generation capacity and the load demand of each small period of the future day predicted by graph calculation, and obtaining the power value of each intermediate node in the circuit through tide calculation.
Specifically, graph calculation technology (such as a space-time graph neural network model and the like) is utilized to predict the power generation capacity and the load demand of each hour of the future day. And inputting the predicted power generation capacity and load demand as a power flow calculation tool, carrying out power flow calculation again, and outputting the power and voltage of each node in the power grid as a power flow analysis result to obtain the power value of each intermediate node in the circuit.
2) And obtaining a load predicted value of the intermediate node and a load value calculated based on a tide analysis result, and calculating to obtain the electric quantity required to be provided or consumed by the energy storage power station.
And calculating an actual load value of the intermediate node based on the tide analysis result. And comparing the load predicted value of the intermediate node with the load value of the tide analysis, and calculating to obtain the electric quantity required to be provided or consumed by the energy storage power station. This may be achieved by calculating the difference between the two, a positive value indicating that the energy storage station needs to provide power and a negative value indicating that the energy storage station needs to consume power.
Through the steps, the power and the voltage of each node in the power grid can be calculated by using a tide analysis technology, and the electric quantity required to be provided or consumed by the energy storage power station is calculated according to the predicted future power generation capacity and the load demand. This will provide a powerful support for stable operation and optimal scheduling of the power system.
And S3, establishing a profit maximization model, and outputting an optimal profit mode, wherein the profit maximization model is established according to a tide analysis result, and the optimal profit mode is output, and comprises a mode of participation of a power storage station in an electric power market activity, charging power and discharging power in each small period, charging duration and discharging duration. The step S3 specifically comprises the following steps:
1) Calculating the full life cycle cost of energy storage, namely leveling energy storage cost:
The full life cycle cost of the stored energy is the normalized energy storage cost (LevelizedCostofStorage, LCOS). LCOS can be summarized as the full life cycle cost of an energy storage technology divided by its cumulative transmitted electrical energy or power, reflecting the internal average power price when the net present value is zero, i.e., the profitability point of the investment. The flattening energy storage cost (LCOS) quantifies the discount cost of unit discharge capacity under specific energy storage technology and application scenes, and considers all technical and economic parameters affecting the discharge life cost. The specific calculation formula and related indexes are as follows:
The definition of each parameter is shown in table 1:
TABLE 1
| Parameters (parameters) | Unit (B) | Definition of the definition |
| d | Hours of | Discharge duration at rated power |
| η | % | Cycle efficiency of energy storage station |
| T | Year of life | System life |
| n(t) | Times/year | Number of annual cycles |
| r | % | Rate of discount |
| Q&M(t) | % | Operation and maintenance expense (installation ratio) of the t th year |
| CE | Yuan/kWh | Cost of installation as a function of capacity |
| CP | Yuan/kW | Cost of installation as a function of power |
Leveling energy storage costs (LCOS) are key indicators for assessing energy storage technology economics. The calculation formula considers the total life cycle cost of the energy storage system, including the factors of installation cost, operation and maintenance cost, system life and the like.
The total cost includes the installed cost with capacity, the installed cost with power, and the operation and maintenance cost (installed ratio) of each year, and the discount rate is considered. The accumulated transmitted electrical energy is the total electrical energy transmitted by the energy storage system over its lifetime. Specific definitions and calculation methods for the parameters have been given in the description of the problem.
2) The full life cycle cost LCOS of energy storage is utilized to determine an objective function and constraint conditions of energy storage power station economic benefit maximization, and the energy storage power station economic benefit maximization is realized under the condition that the operation of a power grid and the safety of the energy storage power station are not influenced. Thus, the objective function to achieve maximization of the economic benefit of an energy storage power station is expressed as:
Incomerent in the formula represents rental benefits,
Representing revenue gained from participation in the electricity market (e.g., wind power, solar, frequency modulation, peak shaving, etc.).
Where τ is the total duration of the cycle, d1 is a small period, e.g., the period of τ is 24 hours, d1 is each hour of the cycle, n is the total number of energy storage plant participation power market activity patterns, w represents energy storage plant participation power market activity patterns, e.g., w=1 represents energy storage plant participation power market activity is wind power pattern, w=2 represents energy storage plant participation power market activity is solar power pattern, w=3 represents energy storage plant participation power market activity is frequency modulation pattern, w=4 represents energy storage plant participation power market activity is peak shaving.
P is the price of the price per unit time,Representing the price of the sold power in the w-th power market activity mode in the d1 th hour period,Representing the price of purchased power in the w-th power market activity mode in the d1 th hour period;
S is the power of the power source,The discharge power of the mode participating in the w-th electric market activity in the d1 th hour is represented, and the negative sign represents discharge; the charging power of the mode participating in the w-th electric power market activity in the d1 th hour is represented, and the positive sign represents charging;
The discharge duration of the mode participating in the w-th electric market activity in the d1 hour period is represented, and the negative sign represents discharge; the charging duration in the mode of participating in the w-th power market activity in the d1 th hour is represented, and the positive sign represents charging.
Incomerent in the objective function maxProfi reflects a capacity lease, which refers to leasing the capacity of the energy storage power station to other users for use, so as to obtain lease benefits.
Incomerent is rental income of τ period, and the formula is:
Wherein the method comprises the steps ofIndicating the rental price of the energy storage battery during the τ period, and Erent indicates the rented-out capacity of the energy storage battery.
Constraints of the objective function include energy storage capacity constraints, charge power and discharge power constraints, energy storage energy balance constraints, initial and final energy level constraints of the energy storage system.
(1) And the energy storage capacity constraint is that the energy storage has a maximum energy storage capacity, so that the electric energy cannot be stored without limitation, and the rented capacity cannot exceed the maximum energy storage capacity, so that the energy storage capacity is realized.
The specific formula of the constraint is as follows:
Emin-Erent<Ed1<Emax-Erent
Where Emin represents the stored energy minimum energy level, Emax represents the stored energy maximum energy level, Erent represents the rented-out storage battery capacity, Ed1 represents the energy at time d1 of the storage, and d1=1, 2, 3.
The minimum energy level of the stored energy means that the continuous discharge is stopped when the residual capacity of the stored energy is reduced to 5% of the rated capacity after the discharge of the stored energy, and the maximum energy level of the stored energy means that the continuous charge is stopped when the capacity of the stored energy is increased to 95% of the rated capacity after the charge of the stored energy.
(2) Charging power and discharging power constraint the charging and discharging efficiency constraint requires that the charging power and discharging power of the stored energy must be within the allowable range, the specific formulas are as follows:
Representing the maximum discharge power of the energy storage power station,Representing the maximum charging power of the energy storage power station.
(3) Stored energy balance constraint:
And Ed1,power represents a load value obtained by d 1-hour tide calculation.
Ed1,predict denotes a load predicted value of the node of the d1 hour period.
(4) Initial and final energy level constraints of the energy storage system:
meaning that the energy state of the energy storage battery should remain balanced over a period of time, i.e. the total charge and discharge of the energy storage battery should be equal over a period of time.
3) And (3) solving an optimal profit mode, namely inputting known parameters of an objective function, such as installed capacity, participation modes, electricity prices, actual loads obtained by calculation of electricity loads and power flows predicted by each node, and the like, and solving optimal combinations of modes of energy storage participation in battery leasing, power market buying and selling, power auxiliary service and the like, and optimal charging and discharging power, charging and discharging time periods and charging and discharging time periods by using an optimization method to realize the maximization of the economic income of the energy storage power station.
And solving by using an optimization method, namely adopting linear programming, nonlinear programming or heuristic algorithms (such as genetic algorithm, particle swarm algorithm and the like) to solve the objective function and the optimal solution under constraint conditions. The solving result comprises the optimal combination of the energy storage power station in various profit modes, the optimal charge and discharge power, the charge and discharge small time period and the charge and discharge time length.
And outputting the optimal profit mode, namely outputting the optimal profit mode of the energy storage power station according to the solving result, wherein the optimal profit mode comprises information such as a mode of participating in the electric power market activity, the charge and discharge power and the charge and discharge time length of each small period. This will provide an unequivocal operational strategy and economic benefit maximization scheme for the operators of energy storage power stations.
Through the steps, a profit maximization model of the energy storage power station can be established, and an optimal profit mode is output, so that economic profit maximization of the energy storage power station is realized. The technical characteristics form the optimal embodiment of the invention, have stronger adaptability and optimal implementation effect, and can increase or decrease unnecessary technical characteristics according to actual needs so as to meet the needs of different situations.
Finally, it should be noted that the above description is only for illustrating the technical solution of the present invention, and not for limiting the scope of the present invention, and that the simple modification and equivalent substitution of the technical solution of the present invention can be made by those skilled in the art without departing from the spirit and scope of the technical solution of the present invention.