New energy typical scene construction method based on improved FCM clustering algorithm
The technical field is as follows:
the invention relates to a construction method of a new energy typical output scene, in particular to a construction method of a new energy typical scene based on an improved FCM clustering algorithm.
Background
With the large-scale development and utilization of new energy in China, the power generation of the new energy is continuously and rapidly developed, and the increase scale of installed capacity is continuously enlarged. With the continuous increase of the installed capacity of new energy, the proportion of the new energy in the power supply of the power grid is continuously improved, and the consumption demand of the new energy puts higher requirements on the economic operation of the power system, the consumption capacity evaluation of the new energy of the power grid, the formulation of a power grid dispatching plan and the like. Therefore, considering the seasonality and periodicity of new energy output such as wind power, photoelectricity and the like, representative typical output scenes are extracted from historical output data, the typical output scenes are used for reflecting the new energy output characteristics in medium and long periods, and the method has important significance for power supply planning of a power system containing high-proportion new energy.
In recent years, researchers at home and abroad research and study the construction of a new energy typical output scene. At present, the selection methods of medium-and-long-term new energy output scenes or load characteristics which are widely applied generally include three types: a typical daily method, a time sequence simulation method and a clustering algorithm. The typical daily method generally refers to taking the output characteristic of the day closest to the average value in a certain period as a typical daily output scene, or selecting the representative day in a certain period as a typical daily output scene. The output characteristics of the new energy are obtained simply and quickly through a typical daily method, but the variation characteristics of the output of the new energy all year around cannot be reflected due to insufficient abundant scenes, and the error is large in medium-term and long-term power supply planning calculation. The time sequence simulation method is to obtain a simulated output time sequence by adjusting the actual output time sequence data of the historical new energy according to the change of the installed capacity and other factors. The annual output time sequence obtained by the time sequence simulation method is close to the actual output characteristics of new energy such as wind power, photovoltaic and the like every day, the result is accurate and reliable, and the defect is low calculation efficiency. The clustering algorithm is used for extracting, classifying and simplifying information of a new energy actual output scene of a long time sequence by a clustering analysis method so as to obtain a typical scene set. The clustering algorithm not only ensures the original characteristics of the output data, but also considers the calculation efficiency. At present, most researches analyze a large amount of actual loads or wind power data through a classical clustering algorithm to obtain a user load and wind power output scene set capable of accurately reflecting actual characteristics, but the selection of the number of clusters and the correlation among multiple types of new energy resources in the same region are not deeply discussed.
In view of this, it is necessary to improve and optimize the conventional FCM clustering algorithm, so as to perform clustering analysis on historical time-series output data of new energy in a certain new energy-rich area, generate a new energy typical output scene set of the area, and verify the validity of the method in an actual problem.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a new energy typical scene construction method based on an improved FCM clustering algorithm, which can solve the defects in the prior art.
The technical scheme is as follows: in order to achieve the purpose, the invention adopts the following technical scheme:
a new energy typical scene construction method based on an improved FCM clustering algorithm comprises the following steps:
s1: improving an FCM clustering algorithm by establishing a clustering effectiveness index function;
s2: clustering and dividing the new energy output historical data by using an improved FCM clustering algorithm;
s3: and selecting a typical scene of the new energy output in each category after clustering.
The new energy typical scene construction method based on the improved FCM clustering algorithm comprises a clustering effectiveness index function CH in step S1(+)Comprises the following steps:
wherein c is the number of clusters, n is the number of samples, Tc、PcThe sum of squares of inter-class and intra-class dispersion.
In the method for constructing the new energy typical scene based on the improved FCM clustering algorithm, the improved FCM clustering algorithm process by establishing the clustering effectiveness index function in the step S1 is as follows:
1) setting the variation range of the cluster number c
2) Calling an FCM clustering algorithm, and updating a clustering center until a target function converges;
3) calculating CH(+)Indexes;
4) c +1, go to step 2) until
5) Comparing CH at different c values(+)Determining the size of the index, and determining the optimal clustering number;
6) and outputting the clustering result under the optimal clustering number.
The new energy typical scene construction method based on the improved FCM clustering algorithm comprises the steps that the new energy comprises wind energy and light energy, and the process of clustering and dividing the historical data of the new energy output by using the improved FCM clustering algorithm in the step S2 comprises the following steps:
1) collecting historical output data of wind power and photoelectric new energy;
2) preprocessing historical output data of the new energy, including correction of lost data and mutation data and the like, to obtain a set of output data of the wind power plant at n continuous days and m equal time intervals each dayThe photovoltaic power station output data set of the photovoltaic power station corresponding to the time interval isWherein,representing the wind power output data of the nth day,representing photoelectric output data of the nth day;
3) historical data X of wind power and photoelectric output by using the improved FCM clustering algorithm provided in the step S1w、XsAnd performing cluster division.
In the new energy typical scene construction method based on the improved FCM clustering algorithm, the selection process of the new energy output typical scene in each category after clustering in step S3 is as follows:
1) reading the output data of each historical day in the class;
2) calculating the average of all historical solar output powers that would belong to that classj is the total number of the historical days belonging to the class, PiThe solar output power of the historical day i;
3) calculating the distance d between the output power and the average power of each historical dayi=|Pi-Pavg|;
4) To diAnd performing ascending sorting, and taking the historical sunrise curve closest to the selection as a typical scene of the type.
Has the advantages that: the invention provides a new energy typical scene set construction method based on an improved FCM clustering algorithm and an operation cost optimization model of a power system containing high-proportion new energy by taking the new energy output characteristic of a new energy rich area as a research object. And performing cluster analysis on historical time sequence output data of the new energy source by using a typical scene set construction method based on an improved FCM clustering algorithm to generate a typical output scene set of the site. Simulation results of the specific implementation mode show that annual features of wind power and photoelectric typical scenes generated by the new energy typical scene set construction method based on the improved FCM clustering algorithm are obvious, actual output conditions are met, and the method has the advantages of high calculation efficiency and small error in actual engineering application.
Drawings
FIG. 1 is a clustering validity index of a wind power output scene in an embodiment of the present invention;
FIG. 2 is a typical output curve of a wind-powered spring in autumn according to an embodiment of the present invention;
FIG. 3 is a typical output curve of wind power in summer according to an embodiment of the present invention;
FIG. 4 is a typical wind-powered winter output curve according to an embodiment of the present invention;
FIG. 5 is a typical photoelectric spring and autumn output curve in accordance with an embodiment of the present invention;
FIG. 6 is a graph of typical photovoltaic summer output curves in accordance with an embodiment of the present invention;
fig. 7 is a typical output curve of a photovoltaic winter season in an embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be further described with reference to the following embodiments.
The invention discloses a new energy typical scene construction method based on an improved FCM clustering algorithm, which comprises the following steps:
s1: improving an FCM clustering algorithm by establishing a clustering effectiveness index function;
s2: clustering and dividing the new energy output historical data by using an improved FCM clustering algorithm;
s3: and selecting a typical scene of the new energy output in each category after clustering.
Further, the FCM clustering algorithm in step S1 is a clustering algorithm based on partitioning, and by introducing the concept of membership function, the relationship between the object and the class cluster is expanded to be described by an arbitrary value on the [0,1] closed interval, and by determining the value of the membership function, the object is partitioned to which class cluster it is more inclined to belong.
First, the concept of fuzzy subsets is defined as:
for any x ∈ U, a number μ can be determinedA(x)∈[0,1]To describe the degree to which x belongs to A, defined as the membership function of A, the membership of the element in U to the fuzzy subset A is given by a constant μA(x) A description is given. Mu.sA(x) The closer the membership is to 0, the smaller the degree to which x belongs to a; mu.sA(x) Closer to 1, the greater the degree to which x belongs to a.
For a data set X ═ X1,x2,x3,…,xnUsing FCM clustering to divide the data set X into c classes (2 ≦ c ≦ n), where the set of cluster centers may be denoted as V ≦ V ≦ n1,v2,…,vcIn fuzzy partition, each data object is described to belong to a certain class by a certain membership value, but is not strictly divided into a certain class.
Ith data sample X in dataset XiMembership mu belonging to class jijExpressed by the following numerical relationship:
with a value of [0,1]Random number initialization membership matrix U in interval ═ mui,jSolving the minimum value of the objective function on the basis that the minimum value satisfies the constraint condition in the above formula:
membership value muijThe calculation is as follows:
wherein F (X, V) represents the weighted sum of squares of distances from the data sample to the cluster center, and the weight is the data sample XiMembership mu belonging to class jijThe power f of (1), the smoothing factor (fuzzy weighting parameter) f ∈ [1, + ∞ ]), and the exponent for adjusting the membership can be used to control the smoothing degree for adjusting the membership, and in general embodiments, the smoothing factor f is generally 2 if there is no special requirement. U ═ μi,jIs the fuzzy membership matrix. dij=||xi-vjAnd | | l represents the Euclidean distance from the ith data sample to the jth cluster center.
The FCM clustering algorithm flow can be summarized as follows:
1) setting clustering number c, iteration number k equal to 0, maximum iteration number T and termination error epsilon, and initializing clusteringCenter V0;
2) Updating membership matrix U with equation (4)k;
3) Updating the next clustering center V by using the formula (3) and the formula (4)k+1;
4) If | | | Uk+1-UkIf | < epsilon, the algorithm is ended. Otherwise, let k be k +1, return to step 2).
Further, the cluster validity index function CH in step S1(+)Comprises the following steps:
wherein, Tc、PcIs the sum of squared deviations between classes and within classes. The sum of squared differences between classes can reflect the differences between classes, and the larger the value is, the better the difference is; the intra-class dispersion square sum reflects the difference between samples of the same class, and the smaller the value, the better. Finding the best cluster number c can be converted to maximizing the index.
Further, the FCM clustering algorithm flow improved by establishing the clustering validity index function in step S1 is summarized as follows:
1) setting the variation range of the cluster number c
2) Calling an FCM clustering algorithm, and updating a clustering center until a target function converges;
3) calculating CH(+)Indexes;
4) c +1, go to step 2) until
5) Comparing CH at different c values(+)Index size, determining optimal clusteringCounting;
6) and outputting the clustering result under the optimal clustering number.
Further, the new energy in step S2 includes wind energy and light energy, and the process of clustering and dividing the historical data of new energy output by using the improved FCM clustering algorithm includes:
1) collecting historical output data of wind power and photoelectric new energy;
2) preprocessing historical output data of the new energy, including correction of lost data and mutation data and the like, to obtain a set of output data of the wind power plant at n continuous days and m equal time intervals each dayThe photovoltaic power station output data set of the photovoltaic power station corresponding to the time interval isWherein,representing the wind power output data of the nth day,representing photoelectric output data of the nth day;
3) historical data X of wind power and photoelectric output by using the improved FCM clustering algorithm provided in the step S1w、XsAnd performing cluster division.
Further, the selecting process of the new energy output typical scene in each category after clustering in step S3 is as follows:
1) reading the output data of each historical day in the class;
2) calculating the average of all historical solar output powers that would belong to that classj is the same asTotal number of class history days, PiThe solar output power of the historical day i;
3) calculating the distance d between the output power and the average power of each historical dayi=|Pi-Pavg|;
4) To diAnd performing ascending sorting, and taking the historical sunrise curve closest to the selection as a typical scene of the type.
Taking a new energy enrichment area in Zhejiang province as an example, the new energy output typical scene set is constructed by using the construction method of the new energy output typical scene set based on the improved FCM algorithm. The method is characterized in that the wind power installation machine is 50MW and the photovoltaic power generation installation machine is 320MW in the region, the output data of the wind power and the photovoltaic power generation from 6 months and 1 days in 2017 to 5 months and 5 months in 2018 in the region are selected as samples, the wind power and the photovoltaic power output have periodicity related to seasons, typical scene construction is carried out after the wind power and the photovoltaic historical output data samples are divided into three types of spring, autumn, summer and winter, the constructed typical scene set of the new energy is applied to the actual problem of medium-long term operation cost optimization of a high-proportion new energy power system, and the actual application value of the method is evaluated.
Example 1:
in the embodiment 1, the wind power and photoelectric historical output data are subjected to scene division by using an improved FCM clustering algorithm, clustering effectiveness index operation is firstly carried out in a clustering process, and then scene division is carried out after an optimal clustering number is obtained. Taking the wind power of the region as an example, the clustering effectiveness CH of the wind power output scene of each season is calculated(+)Index, using extremum normalization to CH(+)The index is processed as shown in the following formula:
clustering validity CH of processed wind power output scene(+)The index is shown in FIG. 1.
As can be seen from FIG. 1, the clustering effectiveness index CH of each wind power season(+)And taking the maximum value when the number of the clusters is 2, namely the optimal cluster number of the wind power output scene in each season is 2. Similarly, the optimal clustering number of the photoelectric seasonal output scene is 2. Fig. 2 to 4 show typical output curves after wind power is grouped into two types, namely spring and autumn, summer and winter, and fig. 5 to 7 show typical output curves after photoelectric wind power is grouped into two types, namely spring and autumn, summer and winter. It can be seen from the above-mentioned output curve graph that the clustering results are roughly divided according to the output level. The probability distribution conditions of the typical wind power and photoelectric output scene in each season are respectively shown in the table 1 and the table 2.
TABLE 1 wind power output typical scene probability distribution situation in each season
TABLE 2 typical scene probability distribution of photoelectric output in each season
The output curves of fig. 2 to 7 visually represent typical output sizes and variation trends of wind power and photoelectric seasons. The wind power has stronger volatility, and the peak and valley change process and the anti-peak regulation characteristic are obvious. The photoelectric output also has certain fluctuation, the output intensity is closely related to the illumination intensity, and the maximum value is taken at about 13 hours per day. It can be seen from the above output curve graph that the clustering results are roughly divided according to the output level, and table 1 and table 2 respectively show the probability distribution of typical output scenes of wind power and photoelectric power in each season.
Example 2:
the embodiment 2 applies a typical wind power/photoelectric output scene to the operation cost optimization field of a high-proportion new energy power system, in order to reduce the phenomenon of wind abandonment and light abandonment in a region, the sum of the punishment cost of the electric quantity of the wind abandonment and the light abandonment and the operation cost of all units is the lowest as an optimization target, the maximum consumption of new energy is considered while the economic operation is carried out, and the objective function is as follows:
wherein T represents the total number of simulation periods, cwAs a wind power penalty coefficient, csAs a result of the photoelectric penalty factor,representing the predicted output of the wind power in the time period t,representing the actual output of the wind power in the time period t,representing the predicted output of the photo-electricity over time t,represents the actual contribution of the photo-electricity during the time period t,representing the actual output of thermal power in the time period t, ath,bth,cthFor the thermal power generation cost coefficient, as,bs,csFor the cost coefficient of wind power generation, aw,bw,cwIs a photoelectric power generation cost coefficient.
The constraints considered by the optimization model include:
1) and electric quantity balance constraint: the total power generation amount of regional thermal power, wind power and photoelectricity is balanced with the load of a user.
Where u represents the user load in that area.
2) And (3) generating power constraint: the generated energy of each type of unit meets the maximum and minimum generated energy constraints.
Wherein q isthminRepresenting the minimum power generation of the thermal power plant, qthmaxRepresents the maximum power generation amount of the thermal power station, and q is the samewmin、qwmax、qwmin、qwmaxAnd the maximum and minimum power generation quantities of wind power and photoelectricity are represented.
3) And (3) climbing restraint of the thermal power generating unit:
wherein, γdownAnd gammaupRespectively representing the downward climbing speed and the upward climbing speed of the thermal power generating unit,andrepresenting the power generation of the thermal power plant during the t-1 and t periods, respectively.
And verifying and comparing scenes constructed by a year-round time sequence method, an improved FCM algorithm and a typical daily method by using the power system operation cost optimization model, wherein the typical daily method selects the daily output of wind power and photoelectric power which is closest to the average value in spring and autumn, summer and winter as a typical scene. The performance comparison conditions of the three scene construction methods are obtained by taking the annual output scene constructed by the annual time sequence method as a comparison standard, and are shown in table 3.
TABLE 3 Scenario construction method Performance comparison
It can be seen that the operation efficiency is remarkably improved due to the large reduction of the number of scenes in the scene construction method based on the improved FCM clustering algorithm and the typical daily method. However, compared with the wind power and photoelectric annual output scenes constructed by the annual time sequence method, the scenes constructed by improving the FCM clustering algorithm and the typical daily method have certain errors. Compared with a scene construction method based on a whole-year time sequence method, the improved FCM clustering algorithm has the advantages that the error rates of wind power and photoelectric prediction results are respectively 33.4% and 27.1%, and compared with a scene construction method based on a whole-year time sequence method, the error rates of wind power and photoelectric prediction results are respectively 49.8% and 51.9%.