Disclosure of Invention
The invention aims to provide a method and a system for adjusting a power grid operation mode by considering uncertainty, which are used for solving the problems of balance and consumption caused by source-load bilateral uncertainty in a high-proportion new energy power system.
A method for adjusting a power grid operation mode considering uncertainty comprises the following steps:
s1, performing probability modeling on elements containing uncertainty according to historical data of all elements of a power grid, and fitting probability distribution of the elements containing uncertainty;
s2, obtaining typical scenes comprising specific numerical values of the elements according to the fitted probability distribution of the elements containing uncertainty, and debugging the operation modes of the typical scenes;
and S3, establishing a machine learning-based automatic power grid operation mode adjustment model, training the automatic adjustment model by using the debugged typical scene operation mode, and automatically processing any random scene with height uncertainty by using the trained automatic adjustment model so as to realize automatic adjustment of the power grid operation mode considering uncertainty.
Preferably, a single element probability distribution is fitted for single element uncertainty modeling from single element historical data using a single variable core density estimation method.
Preferably, a multivariate kernel density estimation method is used to fit the multi-element joint probability distribution for multi-element uncertainty modeling based on multi-element historical data.
Preferably, the bandwidth of the multivariate nuclear density estimation method is optimized based on two bandwidth evaluation indexes of Euclidean distance and maximum distance.
Preferably, the typical scene is a specific value set of each element with uncertainty, and the operation mode is a value set of each thermal power generator; sampling from the fitted probability distribution by using a Latin hypercube hierarchical sampling method to obtain a random scene;
and (3) using a clustering method based on Euclidean distance to eliminate the scenes of the obtained random scenes, and finally obtaining typical scenes with larger difference.
Preferably, the operation mode of the typical scene is set according to the knowledge of the domain expert.
Preferably, a plurality of supervised machine learning models are used for establishing a mapping relation from a scene to an operation mode; each supervised machine learning model is only responsible for learning the output of one thermal power generator, receives vector format scene data containing a plurality of element information and outputs scalar format thermal power generator output data; the number of the supervised machine learning models is equal to the number of the thermal generators in the system, and the outputs of the plurality of supervised machine learning models jointly form a complete operation mode.
Preferably, the obtained typical scene and the corresponding operation mode data are used for constructing a training set and a testing set, and a power grid operation mode automatic adjustment model is trained.
A power grid operation mode adjusting system considering uncertainty comprises an uncertainty modeling module, an optimizing module and an automatic adjusting module;
the uncertainty modeling module is used for carrying out probability modeling on elements containing uncertainty according to historical data of all elements of the power grid and fitting probability distribution of the elements containing uncertainty;
the optimization module is used for acquiring typical scenes comprising specific numerical values of all elements according to the fitted probability distribution of the elements containing uncertainty and debugging the operation modes of the typical scenes;
and the automatic adjustment module is used for establishing a machine learning-based automatic adjustment model of the power grid operation mode, training the automatic adjustment model by using the debugged typical scene operation mode, and automatically processing any random scene with high uncertainty by using the trained automatic adjustment model so as to realize the automatic adjustment of the power grid operation mode considering the uncertainty.
Preferably, a multivariate core density estimation method is adopted to obtain the probability density distribution of single elements and the joint probability density distribution of multiple elements according to historical time series data.
Compared with the prior art, the invention has the following beneficial technical effects:
the invention relates to a method for adjusting a power grid operation mode by considering uncertainty, which comprises the steps of carrying out probability modeling on elements containing uncertainty according to historical data of each element of a power grid, and fitting probability distribution of the elements containing uncertainty; the method can realize automatic adjustment of the power grid operation mode, effectively solves the problems of balance and consumption caused by source-load bilateral uncertainty in a high-proportion new energy power system, and realizes the maximum consumption of new energy under the condition of ensuring safe and stable operation of the power grid.
The method carries out uncertainty modeling on each element in the system, uses a nonparametric kernel density estimation method to fit the probability distribution of the element containing uncertainty, introduces probability parameters into a power grid operation mode automatic adjustment model, realizes quantitative description on the uncertainty of each element in the system, and helps a power enterprise mode calculation department to more intuitively know the influence of uncertainty factors in the system.
Preferably, the bandwidth optimization model based on two bandwidth evaluation indexes of Euclidean distance and maximum distance is adopted, and the accuracy and the smoothness of the model can be considered.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a method for automatically adjusting a power grid operation mode considering uncertainty, which is used for automatically adjusting the power grid operation mode considering the uncertainty according to a power grid operation mode automatic adjustment model based on machine learning, saving the labor cost and the operation cost of a power enterprise mode calculation department, and providing a new idea for solving the balance and absorption problems caused by source-load bilateral fluctuation in a high-proportion new energy power system, and specifically comprises the following steps of:
s1, performing probability modeling on elements containing uncertainty according to historical data of each element of a power grid, and fitting probability distribution of the elements containing uncertainty;
for single element uncertainty modeling, a single element probability distribution is fitted from single element historical data using a single variable core density estimation method.
And aiming at multi-element uncertainty modeling, fitting a multi-element joint probability distribution by using a multi-variable nuclear density estimation method according to multi-element historical data.
And the bandwidth optimization model optimizes the bandwidth of the multivariate core density estimation method based on two bandwidth evaluation indexes of Euclidean distance and maximum distance, and gives consideration to both the accuracy and the smoothness of the multivariate core density estimation method.
S2, obtaining typical scenes comprising specific numerical values of the elements according to the fitted probability distribution of the elements containing uncertainty, and debugging the operation modes of the typical scenes;
the specific steps of generating the typical scene operation mode are as follows:
the typical scene is a specific value set of each element containing uncertainty, namely the new energy generator and the load, and the operation mode is a value set of each thermal power generator.
Setting different sampling intervals: sampling from the fitted probability distribution by using a Latin hypercube hierarchical sampling method to obtain a large number of random scenes;
and (3) performing scene elimination on the obtained random scenes by using a clustering method based on Euclidean distance to finally obtain typical scenes with larger difference, and setting the operation mode of the typical scenes according to the typical scenes and domain expert knowledge.
And S3, establishing a machine learning-based automatic power grid operation mode adjustment model, training the automatic adjustment model by using the debugged typical scene operation mode, and automatically processing any random scene with height uncertainty by using the trained automatic adjustment model so as to realize automatic adjustment of the power grid operation mode considering uncertainty.
Establishing a mapping relation from a scene to a running mode by using a plurality of supervised machine learning models; each supervised machine learning model is only responsible for learning the output of one thermal power generator, receives vector format scene data containing a plurality of element information and outputs scalar format thermal power generator output data; the number of the supervision machine learning models is equal to the number of the fire generators in the system, and the outputs of a plurality of supervision machine learning models jointly form a complete operation mode.
And constructing a training set and a testing set by using the obtained typical scene and the corresponding operation mode data thereof, and training a power grid operation mode automatic adjustment model.
And (3) automatically adjusting the model of the trained power grid operation mode, receiving any random scene containing uncertain elements, and automatically outputting the scene operation mode.
Examples
1. The component uncertainty modeling method comprises the following steps:
the source-load uncertainty of the power system is increasingly aggravated due to the access of the massive renewable energy source units and the flexible load, so that a new challenge is brought to the adjustment of the operation mode of the power grid.
Aiming at source-load uncertainty factors in the power system, a multivariate core density estimation method is adopted, and probability density distribution of single elements and joint probability density distribution of multiple elements are obtained according to historical time series data, so that a foundation is provided for subsequent scene generation.
When the multivariate kernel density estimation method is used for probability distribution fitting, fitting can be completed only depending on historical data without any prior knowledge.
For a single element, namely a single variable X, the distribution is set as p (X), the distribution is observed, and a series of historical data X are collected 1 ,x 2 ,x 3 …x n Then at any point X, a kernel density estimate for univariate X is:
where n is the number of given samples, h is the bandwidth, and K is called the kernel function, which satisfies:
K(x)≥0,∫K(x)dx=1 (2)
substituting formula (2) into (1) to obtain:
equation (3) can prove that p (x) described in equation (1) conforms to the definition of the probability density function and is a reasonable probability density estimation.
And selecting a kernel function when the formula (2) is satisfied:
uniformly distributed kernel function
Trigonometric kernel function K (u) = (1- | u |) I (| u | ≦ 1) (7)
Exponential kernel function K (u) = exp (| u |) (8)
Where u is a given random variable, I is a constant, and exp is an exponential function with a natural constant e as the base.
Aiming at multivariable, w new energy machine sets/node loads are set, each new energy machine set/node load has n historical data samples, and the machine set output/load vector of the ith sample is X i =[X i1 ,X i2 ,…,X iw ]I =1,2, \ 8230n. The output change of the w new energy source units/node loads can be represented by a w-dimensional random vector x = [ x ] 1 ,x 2 ,…,x w ] T Expressed in terms of their joint probability density function, f (x) = f (x) 1 ,x 2 ,…,x w ) Then the multivariate kernel density estimate of this joint probability density function is
Wherein, H is a bandwidth matrix which is a w multiplied by w dimension symmetrical positive definite matrix; k (x) represents a multivariate kernel function, and satisfies the following condition:
in the case where the condition (10) is satisfied, a gaussian function is selected as the kernel function. Since the bandwidth matrix of multivariate kernel density estimation has a large number of elements, it is usually defined as a symmetric positive definite diagonal matrix, i.e. H = diag [ H ] to reduce the computational complexity 1 ,h 2 ,…,h w ]. Thus, equation (9) can be simplified to:
in the formula: h is a total of j Bandwidth for jth new energy cluster/node load
In multivariate kernel density estimation, the selection of the bandwidth matrix H is a key factor affecting the accuracy and smoothness of the model. When the selected H value is too large, the probability density function has too high smoothness and insufficient accuracy; when the selected H value is too small, the accuracy is improved, but the fluctuation of the probability density function is too high. The invention adopts a bandwidth optimization model based on two bandwidth evaluation indexes of Euclidean distance and maximum distance, and can give consideration to the accuracy and smoothness of the model:
min D(H)=d 2 (H)+d ∞ (H) (12)
wherein d is 2 (H) And d ∞ (H) Expressing the Euclidean distance and the maximum distance of the kernel density estimation model and the sample cumulative distribution function, respectively using 2 norm | · | | tormenti in the formulas (13) and (14) 2 And infinite norm | · | | non conducting phosphor ∞ And (4) form representation.
2. Scene generation and scene elimination method, generated typical scene and operation mode thereof
Scene generation:
on the basis of obtaining renewable energy output and node load probability distribution through multivariate kernel density estimation, random sampling is carried out by adopting a Latin hypercube hierarchical sampling method. As shown in fig. 1, the cumulative probability [0,1] of the probability distribution is divided into N equal intervals, then samples are randomly extracted from each layer and mapped to the horizontal axis to obtain required sample points, then the obtained sample points are sequenced to minimize the correlation between the sample points, and finally a large number of random scenes meeting the known probability distribution are formed.
Scene elimination:
a large number of scenes are generated by Latin hypercube sampling, but the scenes are generated randomly, and redundant scenes with high similarity inevitably occur. The direct use of a large number of random scenes generated by Latin hypercube sampling is a difficult task to manually debug the corresponding operation mode by means of expert knowledge. Even if a large amount of manpower is invested to debug the corresponding operation mode, the training set and the test set constructed according to the method not only can obviously increase the calculation amount of model training, but also can cause overfitting of the model. It is therefore desirable to perform scene reduction on a set of original scenes, representing the set of original scenes with as few scenes as possible. The method adopts a K-means clustering algorithm to reduce the scenes, the complexity of the K-means clustering algorithm is low, and the method has a good effect when the problem of reducing large-scale scenes is solved, and the method comprises the following specific steps:
(1) initializing k samples as initial clustering centers;
(2) aiming at each sample of the original scene set, distributing the sample to a class corresponding to a clustering center according to a minimum distance principle;
(3) for each category, recalculating its cluster center;
(4) and (4) repeating the step (2) and the step (3) until the variation value of the minimum error is smaller than a given threshold value, and obtaining a typical scene.
After a typical scene is obtained, a training set and a test set of each supervised machine learning model are respectively constructed by means of an expert knowledge manual debugging operation mode, the scene as an independent variable and the output of each thermal power generator as a target quantity.
3. Establishing a machine learning-based automatic power grid operation mode adjustment model:
and constructing a corresponding number of monitoring machine learning models according to the number of the thermal generators in the system, wherein each monitoring machine learning model is responsible for outputting the output of one thermal generator.
And training each monitoring machine learning model on the constructed training set and the constructed test set, wherein each monitoring machine learning model receives full-scene information in a vector format, outputs the power output of a thermal generator in a scalar format responsible for the monitoring machine learning model, learns the mapping relation from the vector to the scalar, and obtains a trained automatic power grid operation mode adjustment model.
The trained automatic adjustment model of the power grid operation mode can receive any random scene containing uncertain elements and automatically output the scene operation mode.
Because the output of a single thermal power generator is learned by each monitoring machine learning model and is a continuous quantity, the operation mode automatically generated by the trained power grid operation mode automatic adjustment model also consists of the output of each thermal power generator with continuous values, and through setting a shutdown threshold, when the output value of the thermal power generator in the operation mode automatically generated by the power grid operation mode automatic adjustment model is lower than the set threshold, the thermal power generator is shut down and the output of the thermal power generator is set to be 0. The shutdown threshold value can be selected independently according to actual requirements, and the reference shutdown threshold value set by the application is 4-6% of the capacity of the thermal power generator.
Aiming at the automatic adjustment method of the power grid operation mode, an IEEE standard case39 system network frame is used, the system comprises 39 nodes, 10 generator sets, 46 power transmission lines and 21 loads, and 7 of the generator sets are set as new energy source sets. Randomly simulating to generate new energy output and load data of 8760 hours as historical data according to the new energy output and load fluctuation characteristics; selecting a Gaussian kernel function in the multivariate kernel density estimation; latin hypercube hierarchical sampling to 10 4 Eliminating 30 random scenes into 30 typical scenes by a clustering method, and manually debugging; XGB is adopted for supervising machine learning modelAn oost regression tree; and (3) testing the trained power grid operation mode automatic adjustment model by using 579 random scenes.
Modeling component uncertainty:
FIG. 2 is a single element multivariate core density estimate fit probability distribution plot. The histogram is a discrete probability distribution directly plotted using historical data, and the curve is a continuous probability density distribution fitted from the historical data using univariate multivariate kernel density estimation. As can be seen from the figure, the curve and the histogram are well matched, which shows that the multivariate core density estimation method adopted by the invention can fit the probability distribution of the elements containing uncertainty from the historical data, and is an effective single-element uncertainty modeling method.
FIG. 3 is a multi-element multivariate nuclear density estimate fit probability distribution plot. The joint probability distribution curve of two loads is plotted, and the section lines of the curve in the coordinate axis direction are continuous probability distribution curves of the unit pieces shown in FIG. 2. As can be seen in fig. 3, when the load 1 output is around 200MW, the load 2 output tends to be distributed around 40 MW; at load 1 output forces around 300MW, the load 2 output force tends to be distributed around 140 MW. The random scene sampled from the joint distribution of multiple elements can describe the uncertainty characteristic of the whole system more than the single element probability distribution sampling which takes each element as an independent variable.
And (3) analyzing the effectiveness of the automatic adjustment model of the power grid operation mode:
fig. 3 is a graph of the average line loss rate of the operation mode. In an electric power system, electric energy is lost when passing through an electric power transmission line, and the loss rate of the electric energy on the electric power transmission line is called a line loss rate, which means that energy loss power on a line accounts for the total energy transmitted by the line. Under different operation modes, the moisture distribution in the power grid is different, and the line loss rate is also different. The dotted line in the figure is the average line loss rate in the case39 of the IEEE standard, and the average line loss rate of the operation mode automatically generated by the automatic adjustment model of the power grid operation mode in each random scene is realized. It can be seen from the figure that the operation mode line loss rate level generated by the automatic adjustment model of the operation mode of the power grid is slightly higher than that of the standard calculation example case39, and the optimization space still exists, but the level capable of being put into practical operation is already achieved overall.
The invention provides an automatic adjustment method of a power grid operation mode considering uncertainty, which can realize the automatic adjustment of the power grid operation mode, effectively solve the problems of balance and consumption caused by the uncertainty of two sides of a source load in a high-proportion new energy power system, and realize the maximum consumption of new energy under the condition of ensuring the safe and stable operation of a power grid. The method carries out uncertainty modeling on each element in the system, uses a multivariate kernel density estimation method to fit the probability distribution of the elements containing uncertainty, introduces probability parameters into an automatic adjustment model of the power grid operation mode, realizes quantitative description on the uncertainty of each element in the system, and helps a power enterprise mode calculation department to know the influence of uncertainty factors in the system more intuitively.