Sample set determination method and device, electronic equipment and computer program product

By determining the correlation probability distribution and empirical distribution of historical observations in a multi-energy microgrid, and selecting historical observations that meet a specific distance threshold, the problem of inaccurate sample set selection in the existing technology is solved, and more accurate distribution robust optimization scheduling is achieved.

CN119719772APending Publication Date: 2025-03-28STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411754429.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to accurately select sample sets, resulting in robust distribution optimization that produces overly conservative scheduling results in the face of new energy uncertainty and is sensitive to abnormal data and extreme data samples.

Method used

By obtaining the historical observation data set of multi-energy microgrids, the univariate probability distribution and empirical distribution of each historical observation are determined, the correlation probability distribution and empirical distribution are established using the preset joint distribution function, and historical observations that meet a specific distance threshold are selected to form a sample set.

Benefits of technology

It realizes that the sample set is accurately selected while keeping the correlation information of historical observations distribution unchanged, reducing the conservatism of scheduling results and improving the robustness of abnormal data and extreme data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719772A_ABST
    Figure CN119719772A_ABST
Patent Text Reader

Abstract

The invention discloses a sample set determination method and device, electronic equipment and a computer program product. The method comprises the steps that a historical observation data set of the multi-energy microgrid is acquired, and the historical observation data set comprises historical observation values with uncertainty of a plurality of new energy units; determining univariate probability distribution and univariate empirical distribution of each historical observation value according to the historical observation data set; determining correlation probability distribution corresponding to the single-variable probability distribution and correlation empirical distribution corresponding to the single-variable empirical distribution by using a preset joint distribution function; and in the historical observation data set, selecting historical observation values in which a first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than a first preset distance threshold and a second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than a second preset distance threshold to obtain a sample set. The technical problem that the sample set cannot be accurately selected is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power, and in particular to a method, device, electronic equipment and computer program product for determining a sample set. Background Art

[0002] With the proposal of the "dual carbon" goal, new energy sources such as wind and light have been rapidly developed in the power grid. However, new energy sources are characterized by volatility and randomness, which seriously endanger the safe operation of the distribution network. To meet this challenge, microgrids, as an effective solution to improve the consumption of new energy, are attracting more and more attention from researchers. Compared with traditional microgrids, multi-energy microgrids (MEMGs) can integrate multiple energy carriers such as electricity, heat and cold energy to achieve higher energy efficiency and help achieve the "dual carbon" goal.

[0003] In order to deal with the uncertainty of new energy in MEMG, distributionally robust optimization (DRO) is a method that takes both economy and reliability into consideration and is widely used in current research. DRO deals with the uncertainty of new energy by applying a set of fuzzy sets that consider a set of potential distributions. The common method for defining fuzzy sets is the fuzzy set based on moment information and the optimal transmission distance (i.e., Wasserstein distance).

[0004] In recent years, with the development of measurement equipment in power grids, a large amount of renewable energy generation data has been accumulated, and data-driven DRO based on Wasserstein distance has attracted the attention of researchers. However, although this method takes into account potential prediction errors, there may still be unrealistic distributions. For example, in actual scheduling, different renewable energy outputs in MEMG are affected by the same weather and have significant correlations. However, the fuzzy set based on Wasserstein distance cannot identify all potential dependencies between uncertain parameters, which may lead to overly conservative scheduling results.

[0005] In addition, although data-driven distributional robustness can make full use of massive sample data, it is very sensitive to abnormal data and extreme data samples in the data set. Abnormal data and extreme data samples may reduce the performance of distributional robustness and lead to overly conservative decisions. Abnormal data samples are data points that are significantly different from most data points in the data set, which may come from sources such as measurement errors, data input or processing errors, and non-representative sampling. Extreme data samples are data values ​​that seem reasonable but are extremely high or low. In other words, although extreme samples are not outliers, they may still be different from the trend of most samples in the data sample because they are in extreme positions in the sample data. Although various extreme value detection methods have been proposed in the literature, these methods cannot accurately locate extreme samples, resulting in a decrease in the quality of distributional robustness solutions, and thus there is a problem of being unable to accurately select sample sets.

[0006] Currently, no effective solution has been proposed to the above-mentioned problem of being unable to accurately select sample sets. Summary of the invention

[0007] The embodiments of the present invention provide a method, device, electronic device and computer program product for determining a sample set, so as to at least solve the technical problem that the sample set cannot be accurately selected.

[0008] According to one aspect of an embodiment of the present invention, a method for determining a sample set is provided, comprising: obtaining a historical observation data set of a multi-energy microgrid, wherein the historical observation data set comprises: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; determining the univariate probability distribution and the univariate empirical distribution of each of the historical observation values ​​according to the historical observation data set; using a preset joint distribution function to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each of the historical observation values, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, selecting the historical observation value whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0009] Optionally, the method also includes: using a preset microgrid distributed Brubang scheduling model to analyze the sample set to obtain scheduling instructions, wherein the preset microgrid distributed Brubang scheduling model aims to minimize the worst case scenario of the multi-energy microgrid, determines the target observation value from the multiple historical observation values ​​in the sample set, and the scheduling instructions are used to instruct the multi-energy microgrid to operate according to the target observation value.

[0010] Optionally, before using a preset microgrid distributed robust scheduling model to analyze the sample set and obtain a scheduling instruction, the method also includes: obtaining at least one constraint condition of the preset microgrid distributed robust scheduling model; setting the first preset distance threshold and the second preset distance threshold so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than a preset probability threshold, wherein the constraint violation probability is used to represent the probability of violating the constraint condition after the sample set is input into the preset microgrid distributed robust scheduling model.

[0011] Optionally, the method further includes: clustering the multiple historical observation values ​​in the sample set for a preset number of times according to a preset number of clusters to obtain multiple groups of pre-selected clustering results, wherein each group of the pre-selected clustering results includes: multiple cluster centers that meet the preset number of clusters, each cluster center is determined based on at least one historical observation value of the same cluster cluster; among the multiple groups of the pre-selected clustering results, selecting the pre-selected clustering result with the smallest sum of distances between the historical observation values ​​and the corresponding cluster centers as the target clustering result; and determining a sample subset based on the cluster centers in the target clustering result.

[0012] Optionally, the method also includes: inputting the sample subset into the preset microgrid distribution robust scheduling model to determine the constraint violation probability of the sample subset; when the constraint violation probability of the sample subset is not greater than the preset probability threshold, using the preset microgrid distribution robust scheduling model to analyze the sample subset to obtain the scheduling instruction.

[0013] Optionally, the method further includes: when the constraint violation probability of the sample subset is greater than the preset probability threshold, determining the historical observation values ​​in the sample set that cause the constraint violation times of the sample subset to be not less than a preset number threshold, to obtain a set to be pruned; pruning the sample set based on the set to be pruned to obtain a pruned sample set; and clustering the multiple historical observation values ​​in the pruned sample set for a preset number of times according to the preset clustering number, to obtain the sample subset of the pruned sample set.

[0014] Optionally, pruning the sample set based on the set to be pruned to obtain the pruned sample set includes: sorting the multiple historical observations in the set to be pruned according to the number of items that violate the constraint conditions to obtain a sequence of observations to be pruned; intercepting multiple historical observations that meet preset conditions from the sequence of observations to be pruned in descending order of the number of items that violate the constraint conditions to obtain an abnormal sample set, wherein the preset condition is a preset interception number or a preset interception ratio; and deleting the abnormal sample set from the sample set.

[0015] According to another aspect of an embodiment of the present invention, a device for determining a sample set is also provided, including: an acquisition module, used to acquire a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; a first determination module, used to determine the univariate probability distribution and the univariate empirical distribution of each of the historical observation values ​​according to the historical observation data set; a second determination module, used to use a preset joint distribution function to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish an association relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each of the historical observation values, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; a selection module, used to select the historical observation value in the historical observation data set whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0016] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned method for determining a sample set through the computer program.

[0017] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, which implement the steps of the above-mentioned method for determining a sample set when executed by a processor.

[0018] In an embodiment of the present invention, a historical observation data set of a multi-energy microgrid is obtained, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; according to the historical observation data set, a univariate probability distribution and a univariate empirical distribution of each historical observation value are determined; a preset joint distribution function is used to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold are selected to obtain a sample set, thereby ensuring that the correlation information of the historical observation value distribution in the fuzzy set is kept close to the correlation of the historical observation value distribution in the historical observation data set, thereby achieving the technical effect of accurately selecting the sample set, and thus solving the technical problem of being unable to accurately select the sample set. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0020] Figure 1 is a flow chart of a method for determining a sample set according to an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of a transmission and distribution scheduling process considering uncertain unimodal-skewness information according to an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of a device for determining a sample set according to an embodiment of the present invention;

[0023] Figure 4 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] According to an embodiment of the present invention, an embodiment of a method for determining a sample set is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0027] Figure 1 is a flow chart of a method for determining a sample set according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0028] Step S102, obtaining a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution;

[0029] Step S104, determining the univariate probability distribution and univariate empirical distribution of each historical observation value based on the historical observation data set;

[0030] Step S106, using a preset joint distribution function to determine a correlation probability distribution corresponding to a univariate probability distribution and a correlation empirical distribution corresponding to a univariate empirical distribution, wherein the preset joint distribution function is used to establish an association relationship between a joint distribution of multiple historical observations in a historical observation data set and a marginal distribution of each historical observation, and the marginal distribution is an integral of a univariate probability distribution of the same historical observation;

[0031] Step S108, in the historical observation data set, select historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0032] In an embodiment of the present invention, a historical observation data set of a multi-energy microgrid is obtained, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; according to the historical observation data set, a univariate probability distribution and a univariate empirical distribution of each historical observation value are determined; a preset joint distribution function is used to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold are selected to obtain a sample set, thereby ensuring that the correlation information of the historical observation value distribution in the fuzzy set is kept close to the correlation of the historical observation value distribution in the historical observation data set, thereby achieving the technical effect of accurately selecting the sample set, and thus solving the technical problem of being unable to accurately select the sample set.

[0033] In the above step S102, the historical observation values ​​in the historical observation data set may be operating parameter values ​​observed during the historical operation of the new energy units in the multi-energy microgrid.

[0034] Optionally, the historical observation dataset can be Traditional fuzzy set based on Wasserstein distance (i.e. optimal transmission distance) is defined as: Among them, ε 1 is the fuzzy set radius (i.e., the first preset distance threshold); for all distributions in space; is the univariate empirical distribution; d W (·,·) is the Wasserstein distance between two distributions; d W The definitions of (·,·) are: in, For The Dirac distribution centered at ξ 1 , 2 Obey and A random variable.

[0035] In the above step S106, the preset joint distribution function is a Copula function, which is a special function that can link the marginal distribution of multiple random variables (such as historical observations) (i.e., the distribution of each random variable itself) with their joint distribution. In short, the Copula function describes the dependencies between random variables (such as historical observations) without caring about their specific distribution forms.

[0036] Optionally, this application gives a univariate probability distribution Copula Function The mathematical definition of . is the collection of new energy units in the multi-energy microgrid. With univariate probability distribution Related, is the prediction error of the new energy unit k.

[0037] It should be noted that in this application, Corresponding to the historical observation data sample (i.e. historical observation value), it is a superscript corresponds to the uncertain parameter.

[0038] Optionally, a univariate probability distribution Copula Function The mathematical definition of a random variable is: The cumulative distribution function is: function, in, is a univariate probability distribution The cumulative distribution function of .

[0039] Optionally, the marginal distribution of the historical observations is the cumulative distribution CDF of the historical observations.

[0040] It should be noted that due to is the marginal distribution function of the random variable, so Defines a random variable that is uniformly distributed on the interval [0,1].

[0041] Through the above function, we can get The distribution of has uniformly distributed edges on the interval [0,1] and has The characteristics of the correlation between the components. In other words, the information contained in any multivariate distribution function (such as the preset joint distribution function) can be decomposed into a set of marginal distributions (containing univariate information) and Copula functions (containing correlation information). Therefore, the correlation information is separated from the univariate information by the Copula function, and the univariate probability distribution and univariate empirical distribution of each historical observation value in the historical observation data set, as well as the correlation probability distribution and correlation empirical distribution can be obtained.

[0042] Based on the above definition, in order to consider the correlation of uncertainty in the sample set, a fuzzy set containing uncertainty correlation information can be established based on the Copula function: (ie sample set):

[0043]

[0044] In the fuzzy set In the first constraint and fuzzy set The constraints in are the same, thus maintaining the expected properties of the classical definition of the traditional basic Wasserstein set; the newly added second constraint restricts the univariate probability distribution Copula Function (i.e., probability distribution of correlation) and univariate empirical distribution Empirical Copula Function (i.e., the Wasserstein distance between the empirical distribution of correlations) Less than or equal to ε 2 . With parameter ε 1 Same, ε 2 It is also a parameter that needs to be set by the scheduler, which also determines the fuzzy set The degree of conservatism, the larger the ε 2 Produces fuzzy sets that contain more distributions.

[0045] In the above embodiment of the present application, the fuzzy set (i.e., sample set) by restricting the univariate probability distribution within the fuzzy set Copula Function (i.e., correlation probability distribution) ensures that the correlation information of the distribution of historical observations in the sample set remains close to the correlation information of the distribution of historical observations in the historical observation data set, thereby considering the uncertainty of correlation information in scheduling.

[0046] In the above step S108, the larger the first preset distance threshold and the second preset distance threshold are, the more historical observation values ​​are selected from the historical observation data set as the sample set.

[0047] As an optional embodiment, the method also includes: using a preset microgrid distributed Brubang scheduling model to analyze the sample set to obtain scheduling instructions, wherein the preset microgrid distributed Brubang scheduling model aims to minimize the worst case scenario of the multi-energy microgrid, determines the target observation value from multiple historical observation values ​​in the sample set, and the scheduling instructions are used to instruct the multi-energy microgrid to operate according to the target observation value.

[0048] In the above-mentioned embodiment of the present application, a preset microgrid distributed robust scheduling model is used to analyze the sample set. The goal is to minimize the worst-case scenario of the multi-energy microgrid, determine the historical observation values ​​of the multi-energy microgrid when the goal is achieved, and use the historical observation values ​​as the target observation values ​​to generate scheduling instructions that enable the multi-energy microgrid to operate according to the target observation values. Since the sample set reflects the correlation information of uncertainty, scheduling is performed based on the sample set, thereby achieving scheduling that takes the correlation information of uncertainty into consideration.

[0049] Optionally, the preset microgrid distributed robust scheduling model may be:

[0050]

[0051] in, ρ LHV All are energy efficiency coefficients of MT; are the cost coefficients of MEMG electricity purchase and sales respectively; P t B , P t S They are the power purchased and sold by the system respectively; is the actual electric power of the MT unit in CCHP at time t; Assemble for CCHP units; A collection of scheduling times.

[0052] As an optional embodiment, before using a preset microgrid distributed robust scheduling model to analyze the sample set and obtain a scheduling instruction, the method also includes: obtaining at least one constraint condition of the preset microgrid distributed robust scheduling model; setting a first preset distance threshold and a second preset distance threshold so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than a preset probability threshold, wherein the constraint violation probability is used to represent the probability of violating the constraint condition after the sample set is input into the preset microgrid distributed robust scheduling model.

[0053] In the above-mentioned embodiments of the present application, considering that not all abnormal samples (such as abnormal historical observations) and extreme samples (such as extreme historical observations) will have a negative impact on the scheduling results of distributed robust optimization, a suitable first preset distance threshold and a second preset distance threshold are set so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than the preset probability threshold, so that abnormal samples and extreme samples that do not have a negative impact on the scheduling results can be retained.

[0054] Optionally, the constraints include at least: linear decision rule constraints, CCHP unit operation constraints, EB unit operation constraints, EC unit operation constraints, BS operation constraints, TS operation constraints, MEMG power purchase constraints, electric power balance constraints, thermal power balance constraints and cooling power balance constraints.

[0055] As an optional embodiment, the method also includes: clustering multiple historical observations in the sample set for a preset number of times according to a preset number of clusters to obtain multiple groups of pre-selected clustering results, wherein each group of pre-selected clustering results includes: multiple cluster centers that meet the preset number of clusters, each cluster center is determined based on at least one historical observation value of the same cluster cluster; among the multiple groups of pre-selected clustering results, selecting the pre-selected clustering result with the smallest sum of distances between the historical observations and the corresponding cluster centers as the target clustering result; and determining the sample subset based on the cluster centers in the target clustering result.

[0056] The above-mentioned embodiment of the present application selects a smaller and more representative sample subset from the sample set by clustering, and uses the sample subset instead of the superset to solve the DRCCP, which can ensure high computational efficiency while retaining most of the important information.

[0057] As an optional embodiment, the method also includes: inputting the sample subset into a preset microgrid distributed robust scheduling model to determine the constraint violation probability of the sample subset; when the constraint violation probability of the sample subset is not greater than a preset probability threshold, using the preset microgrid distributed robust scheduling model to analyze the sample subset to obtain a scheduling instruction.

[0058] In the above-mentioned embodiment of the present application, the constraint violation probability is used as the stopping criterion for sample pruning of the sample set. When the constraint violation probability of the sample subset is not greater than the preset probability threshold, it indicates that the sample subset has been pruned. Then, the preset microgrid distributed robust scheduling model can be used to analyze the sample subset, thereby generating scheduling instructions using historical observation values ​​with smaller scale and strong representativeness, thereby improving the efficiency and accuracy of generating scheduling instructions.

[0059] As an optional embodiment, the method also includes: when the constraint violation probability of the sample subset is greater than a preset probability threshold, determining historical observations in the sample set that cause the constraint violation number of the sample subset to be not less than a preset number threshold, to obtain a set to be pruned; pruning the sample set based on the set to be pruned to obtain a pruned sample set; and clustering multiple historical observations in the pruned sample set a preset number of times according to a preset number of clusters to obtain a sample subset of the pruned sample set.

[0060] In the above-mentioned embodiment of the present application, the constraint violation probability is used as the stopping criterion for sample pruning of the sample set. When the constraint violation probability of the sample subset is greater than the preset probability threshold, the historical observations in the sample subset can be screened to obtain historical observations with a large number of constraint violations, and a pruned sample set is generated. The sample set is then pruned based on the pruned sample set to eliminate historical observations in the sample set that have a negative impact on the scheduling results of the distributed robust optimization to obtain a pruned sample set. The pruned sample set is then used as the sample set, and a sample subset is generated again using a clustering method until the constraint violation probability of the regenerated sample subset is greater than the preset probability threshold.

[0061] As an optional embodiment, pruning the sample set based on the set to be pruned to obtain the pruned sample set includes: sorting multiple historical observations in the set to be pruned according to the number of items that violate the constraint conditions to obtain a sequence of observations to be pruned; intercepting multiple historical observations that meet preset conditions from the sequence of observations to be pruned in descending order of the number of items that violate the constraint conditions to obtain an abnormal sample set, wherein the preset condition is a preset interception number or a preset interception ratio; and deleting the abnormal sample set from the sample set.

[0062] In the above-mentioned embodiments of the present application, considering that not all abnormal samples (such as abnormal historical observations) and extreme samples (such as extreme historical observations) will have a negative impact on the scheduling results of distributed robust optimization, when the sample set is pruned based on the set to be pruned, the historical observations in the set to be pruned can be screened to find out the historical observations with a large number of violations of the constraints, generate an abnormal sample set, and then delete the historical observations in the abnormal sample set from the sample set to achieve pruning of the sample set.

[0063] The present invention also provides a preferred embodiment, which provides a multi-energy microgrid scheduling method considering uncertain correlation and abnormal data, aiming to reduce the conservatism of the scheduling results in the distributed robust scheduling method and realize the optimized scheduling of the multi-energy microgrid while considering abnormal data samples.

[0064] Figure 2 is a schematic diagram of a transmission and distribution scheduling process considering uncertain unimodal-skewness information according to an embodiment of the present invention, such as Figure 2As shown, the device may include:

[0065] Step S201, based on historical data samples (such as historical observation data sets), construct a fuzzy set containing uncertainty-related information.

[0066] Step S202, establishing a multi-energy microgrid scheduling model considering uncertain correlations.

[0067] Step S203, transforming the solvability of the distributed robust model considering the uncertainty correlation.

[0068] Step S204: performing abnormal data and extreme data detection based on a sample pruning algorithm.

[0069] Step S205, system scheduling: MEMG issues scheduling instructions to each unit of the system according to the optimization results to achieve the optimal scheduling of MEMG.

[0070] In the above step S201, based on the historical data samples, a fuzzy set containing uncertainty-related information is constructed, which specifically includes the following steps:

[0071] Step S2011, establishing a fuzzy set based on Wasserstein distance.

[0072] As an optional example, in practice, there are usually N equally probable historical observations with uncertainties, that is, Traditional fuzzy sets based on Wasserstein distance is defined as: Among them, ε 1 is the fuzzy set radius (such as the first preset distance threshold); for all distributions in space; For the empirical distribution For The Dirac distribution centered at d W (·,·) is the Wasserstein distance between the two distributions ξ 1 , 2 Obey and A random variable.

[0073] Optionally, the fuzzy set Included in the empirical distribution The Wasserstein distance is less than or equal to the radius ε 1 All distributions with radius ε 1 Set by the scheduler, this parameter determines the number of distributions included in the fuzzy set, which can be intuitively interpreted as a larger ε 1Producing fuzzy sets that contain more distributions will produce more conservative scheduling results.

[0074] It should be noted that the fuzzy set Although it can take into account potential prediction errors, it cannot reflect the correlation of the distribution within the fuzzy set. However, in practice, the uncertainty of new energy units has obvious correlation, so the traditional Wasserstein fuzzy set may contain unrealistic distribution information, which will generate uneconomical scheduling costs. Therefore, in this paper, the traditional Wasserstein metric-based fuzzy set is enhanced based on the Copula function to prevent unrealistic uncertainty distribution from appearing in the fuzzy set.

[0075] Step S2012, embedding the uncertainty correlation information in the fuzzy set of Wasserstein distance.

[0076] As an optional example, this application gives the probability distribution Copula Function The mathematical definition of . It is the collection of new energy units in multi-energy microgrid. and distribution Related, is the prediction error of the new energy unit k. Distribution Copula Function The mathematical definition of a random variable is The cumulative distribution function is: function in, is the probability distribution The cumulative distribution function of .

[0077] It should be noted that the superscript Corresponding to historical observation data samples (such as historical observation values), it is a superscript corresponds to the uncertain parameter.

[0078] It should be noted that due to is the marginal distribution function of the random variable, so Defines a random variable that is uniformly distributed on the interval [0,1].

[0079] As an alternative example, The distribution of has uniformly distributed edges on the interval [0,1] and has In other words, the information contained in any multivariate distribution function (such as the preset joint distribution function) can be decomposed into a set of marginal distributions (containing univariate information, such as univariate probability distribution) and copula functions (containing correlation information, such as correlation probability distribution). Therefore, the correlation information is separated from the univariate information by the copula function.

[0080] Based on the above definition, in order to consider the correlation of uncertainty in fuzzy sets, this application establishes fuzzy sets containing uncertainty correlation information based on Copula functions.

[0081]

[0082] It should be noted that in the fuzzy set In the example, the first constraint (e.g., the constraint based on the first preset distance threshold) and the fuzzy set The constraints in are the same, thereby maintaining the desired properties of the classical definition of the traditional basic Wasserstein set; the newly added second constraint (such as the constraint based on the second preset distance threshold) restricts the distribution Copula Function Distribution with experience Empirical Copula Function Wasserstein distance Less than or equal to ε 2 (such as the first preset distance threshold). 1 Same, ε 2 It is also a parameter that needs to be set by the scheduler, which also determines the fuzzy set The degree of conservatism, the larger the ε 2 Produces fuzzy sets that contain more distributions.

[0083] In the above embodiment of the present application, the fuzzy set By restricting the distribution within the fuzzy set Copula Function Ensure that the correlation information of the distribution in the fuzzy set remains close to the correlation in the historical samples, so that the correlation information of uncertainty is considered in scheduling.

[0084] It should be noted that the method for describing uncertainty correlation is the second-order moment information in the fuzzy set. However, this method can only describe linear correlation information. The method based on Copula function proposed in this application allows the description of any type of correlation information and is therefore more general.

[0085] In the above step S202, a multi-energy microgrid scheduling model considering uncertain correlation is established, which specifically includes the following steps:

[0086] Step S2021, establishing a multi-energy microgrid scheduling objective function.

[0087] As an optional embodiment, the objective function of the MEMG system is to minimize the worst-case expected operating cost, that is:

[0088]

[0089] in, ρ LHV All are the energy efficiency coefficients of micro gas turbine MT; are the cost coefficients of MEMG electricity purchase and sales respectively; P t B , P t S They are the power purchased and sold by the system respectively; is the actual electric power of the MT unit in the Combined Cooling, Heating and Power (CCHP) system at time t; For CCHP unit set; is the scheduling time set.

[0090] Step S2022: Establish multi-energy microgrid constraint conditions.

[0091] As an optional example, the multi-energy microgrid constraints include at least: linear decision rule constraints, CCHP unit operation constraints, electric boiler (EB) equipment unit operation constraints, electric chiller (EC) equipment unit operation constraints, battery storage (BS) equipment operation constraints, thermal storage (TS) equipment operation constraints, MEMG power purchase constraints, electric power balance constraints, thermal power balance constraints, and cold power balance constraints.

[0092] As an optional example, linear decision rules are widely used in DRO decision making, which utilizes various flexible resources in MEMG to alleviate the uncertainty of new energy. The linear decision rule constraints are:

[0093]

[0094] in, and They are the adjustment coefficients of MT, EB, EC, BS energy storage and BS energy release at time t respectively.

[0095] As an optional example, the CCHP unit operation constraints include: MT unit operation constraints in CCHP, heat recovery (HR) unit operation constraints in CCHP, and absorption chiller (AC) unit operation constraints in CCHP.

[0096] Optionally, the operating constraints of the MT units in CCHP are:

[0097]

[0098] in, is the electric power of the MT unit in CCHP at time t when there is no prediction error; P i MT , They are the lower and upper limits of the electric power of the MT unit respectively; are the upper limits of the upward and downward rotation reserve capacity of the MT unit respectively; γ MT , γ RD Both are risk factors set in the opportunity constraints of the MT unit.

[0099] Optionally, the operating constraints of the HR units in CCHP are:

[0100]

[0101] in, is the thermal power of the HR unit at time t; is the heat loss coefficient; θ heat is the heating efficiency coefficient.

[0102] Optionally, AC unit operation constraints in CCHP:

[0103]

[0104] in, They are the AC unit’s thermal power without prediction error and actual thermal power at time t respectively; is the regulation coefficient of the AC unit at time t; is the upper limit of AC unit output; γ AC It is the risk factor set in the AC unit opportunity constraint.

[0105] As an optional example, the EB unit operation constraints include:

[0106]

[0107]

[0108] in, They are respectively the power consumption without prediction error and actual power consumption of EB unit at time t; is the thermal power of the EB unit at time t; is the energy efficiency coefficient of the EB unit; is the upper limit of EB unit output; γ EB It is the risk factor set in the opportunity constraint of the EB unit.

[0109] As an optional example, the EC unit operation constraints are:

[0110]

[0111] in, They are the EC unit’s power consumption without prediction error and actual power consumption at time t respectively; is the actual cooling power of the EC unit; is the energy efficiency coefficient of the EC unit; is the upper limit of EC unit output; γ EC is the risk factor set in the EC unit opportunity constraint.

[0112] As an optional example, the BS operation constraints are:

[0113]

[0114] in, are the charging and discharging power of BS when there is no prediction error; The actual charging and discharging power of BS respectively; They are the energy storage of BS without prediction error and actual BS at time t respectively; is the adjustment coefficient of BS at time t; are the lower and upper limits of BS energy storage, respectively; point

[0115] γ BS γ BSC γ BSD

[0116] are the upper limits of BS charging and discharging power respectively; , , and are the risk factors set in the opportunity constraints of BS units.

[0117] As an optional example, the TS running constraints are:

[0118]

[0119] in, They are respectively the charging and discharging power of TS when there is no prediction error at time t; The actual charging and discharging power of TS at time t respectively; They are the energy storage of BS without prediction error and actual BS at time t respectively; is the adjustment coefficient of TS at time t; The upper limit of energy storage for TS units; are the upper limits of heat charging and heat dissipation power of TS units respectively; γ TS , γ TSC , γ TSD Both are risk factors set in the TS unit opportunity constraints.

[0120] As an optional example, the MEMG electricity purchase constraint is:

[0121]

[0122] in, It is the transmission limit of the communication line.

[0123] As an optional example, the electric power balance constraint is:

[0124]

[0125] Where P t L is the electrical load power in MEMG.

[0126] As an optional example, the thermal power balance constraint is:

[0127]

[0128] in, is the heat load power in MEMG.

[0129] It should be noted that since the thermal power balance constraint contains uncertainty, it can be divided into two parts:

[0130]

[0131] As an optional example, the cold power balance constraint is:

[0132]

[0133] Optionally, the cold power balance constraint can also be split into:

[0134]

[0135] In the above step S203, since the objective function of MEMG is a linear objective function, the general form of the expected term containing uncertainty is: Among them, x is the decision vector in scheduling; is the feasible domain of the decision vector; a(x) and b(x) are coefficient matrices, which are both linear functions of the decision vector x.

[0136] It should be noted that the key step of the above transformation is to establish the Copula function With its distribution function The relationship between them should theoretically be through step S2012 Function implementation, that is and By marginal cumulative distribution function However, in practice, the Copula function of a random variable is related to the distribution The relationship between them cannot be accurately known, so this application uses the empirical marginal cumulative distribution function A tractable reformulation of the expected term of the objective function is derived.

[0137] It should be noted that, in the following text, for the convenience of expression, F k express And let η be the value of the independent variable of the function, that is, F k (η).

[0138] Alternatively, since the probability of each historical sample in the empirical distribution is the same, the empirical marginal cumulative distribution function of the new energy unit k is written as:

[0139]

[0140] in, is the indicator function, which is defined as: , its value is 1; otherwise, its value is 0.

[0141] Optionally, based on the above analysis, the fuzzy set The worst-case expectation can be expressed as:

[0142]

[0143] Among them, α and β are auxiliary variables introduced, and F(ξ) is defined as:

[0144]

[0145] 0≤z kjn ≤1.

[0146] It should be noted that in Both ξ and F(ξ) contain maximization operators and cannot be calculated directly. Therefore, this application is based on the duality theory and is converted into a deterministic model in two steps.

[0147] As an optional example, the deterministic model is transformed based on the duality theory, and the specific steps include the following:

[0148] Step S2031, eliminate the maximization operator in F(ξ). According to the duality theorem, the necessary and sufficient conditions for the optimality of the kth element of the optimization vector F(ξ) are composed of the original constraint, the dual constraint and the strong dual equation, and its mathematical form is:

[0149]

[0150] 0≤z kjn ≤1;

[0151]

[0152] σ kjn ≥0,π kjn ≥0;

[0153]

[0154] Optionally, Translates to:

[0155]

[0156] Cξ≤D;

[0157]

[0158] 0≤z kjn ≤1;

[0159]

[0160] σ kjn ≥0,π kjn ≥0;

[0161]

[0162] Based on the above transformation, the internal maximization operator of F(ξ) has been eliminated.

[0163] Step S2032, eliminate constraint y n The maximization operator in , specifically includes the following steps:

[0164] Step S20321, due to the constraint and There are bilinear terms in , and this application converts them into linear constraints based on McCormick relaxation, then and can be transformed into:

[0165]

[0166] where t jki 、v jki is the introduced auxiliary variable.

[0167] Step S20322, through duality theory, the optimization problem is transformed into a minimization problem, and the maximization operator is deleted from the constraints.

[0168] Step S20323, optimization problem The converted form is the objective function:

[0169]

[0170] The constraints are:

[0171]

[0172] in, and They are all auxiliary variables introduced by the Bruno transformation.

[0173] It should be noted that in data-driven distributed robust optimization scheduling, abnormal samples and extreme samples in the sample set tend to make the optimal decision more conservative, which has an adverse impact on the economic efficiency of MEMG. For example, assume that the lower limit of the reliability of the opportunity constraint acceptable to the MEMG operator is 95% (that is, the risk factor is set to 5%), but except for a few extreme data values, the sample ensures that the reliability of the opportunity constraint is higher than 98%. This means that the final decision may be too conservative. For economic reasons, MEMG operators may tend to ignore some extreme data in the sample to obtain a reasonable trade-off between risk and economy.

[0174] To solve the above problems, this application proposes a sample pruning algorithm, which generates a representative subset of the original data set and eliminates abnormal and extreme samples in the sample, in order to improve the economy and reliability of the distributed robust scheduling results. Unlike the commonly used outlier detection method, this algorithm has almost no requirements for the distributed robust model, showing its excellent compatibility.

[0175] In the above step S204, the abnormal data and extreme data detection based on the sample pruning algorithm specifically includes the following steps:

[0176] Step S2041, algorithm initialization. Input the original data set N (such as a historical observation data set or a sample set), set hyperparameters, where the hyperparameters include at least: a preset number of clusters I, a preset number of times B, T and 1-γ, where I is less than the sample size of N (such as when the original data set is a sample set, the preset number of clusters is less than the number of historical observations in the sample set). Create a copy N of N T is used for sample pruning, while N is used to evaluate the constraint violation probability of the optimal DRCCP decision, which is used as the stopping criterion of the sample pruning algorithm.

[0177] Step S2042, adjust the fuzzy set radius ε 1 With ε 2 , so that the first iteration satisfies the constraint violation probability ≥ 1-γ.

[0178] Step S2043, sample clustering. First, k-means clustering is performed B times by looping B times, and k=I. For each iteration of the for loop, the k cluster center sets obtained from the k-means clustering are stored as elements C in C. b Since the initialization of k-means clustering involves randomness, the center sets obtained in B clusterings are not exactly the same. For the B sets of clustering results, the group with the smallest distance sum (i.e., the sum of distances between all data points and their designated cluster centers) is selected as the subset S. After multiple k-means clustering, S containing I samples is regarded as the set N. T The most representative subset.

[0179] Step S2044, solve DRCC using the generated sample subset S. Since S containing N samples is regarded as a set N T The most representative subset, so the optimal solution x is obtained by solving the transformed DRO problem based on the subset S * Since the subset is small and representative, solving DRCCP with a subset instead of a superset can ensure high computational efficiency while retaining most of the important information in I′. In addition, solving DRCCP with a subset helps prevent the influence of abnormal and extreme data on the distributed robust scheduling results, because the subset usually does not contain these types of data samples.

[0180] It should be noted that DRCC stands for distributionally robust chance constraint.

[0181] It should be noted that the constraint violation probability in DRCCP (Distributionally Robust Chance Constrained Program) is a key concept, which involves the possibility of constraints being violated when optimizing decisions in an uncertain environment.

[0182] It should be noted that in DRCCP, the constraint violation probability refers to the probability that a decision solution does not satisfy one or more constraints under the realization of a given set of uncertain parameters (such as random variables). These constraints are usually functions of decision variables and are used to ensure the feasibility and effectiveness of the decision solution. Due to the existence of uncertain parameters, the decision solution may face the risk of violating constraints in practical applications.

[0183] Step S2045, evaluate the scheduling result. Get x * After that, if the chance constraint violation probability δ≤1-γ, the algorithm stops; otherwise, the worst chance constraint violation amplitude of all data points in S is evaluated.

[0184] Step S2046: Sample pruning. In this step, find the set N T The number of constraint violations equals or exceeds the threshold (such as a preset probability threshold). The set of these selected samples is denoted as R. Then, from R, T%N T N T Select the previous samples that cause more constraint violations and delete them from them to obtain updated ones. Return to step S2043 to continue iteration.

[0185] In the above-mentioned embodiments of the present application, the sample pruning algorithm improves the solution quality of the model by eliminating samples that may reduce the effectiveness of the distributed robustness model. Given that not all abnormal samples and extreme samples will have a negative impact on the scheduling results of distributed robustness optimization, the algorithm only eliminates those abnormal and extreme samples that lead to overly conservative decisions. The core idea of ​​the sample pruning algorithm is: in each iteration, through the violation test of the distributed robustness opportunity constraint, the samples that are more likely to cause opportunity constraint violations are gradually eliminated from the original sample set. In this process, the conservatism of the scheduling results gradually decreases until it exceeds the set risk factor, which indicates that the economic efficiency of distributed robustness has been maximized.

[0186] The above-mentioned embodiment of the present application proposes a fuzzy set considering uncertainty correlation based on the Copula function, and establishes a distributed robust opportunity constrained optimization scheduling model of a multi-energy microgrid considering uncertainty correlation based on this fuzzy set and chance constraints; since the distributed robust optimization model cannot be solved directly, the present application derives a worst-case transformation method of the proposed fuzzy set based on duality theory, McCormick relaxation, and conditional value at risk (Condition Value at Risk, CVaR) approximation, thereby converting the distributed robust model into a linear deterministic linear model, so as to facilitate efficient solution using a solver; and the present application proposes a sample pruning algorithm, which generates a sub-sample representing the original data set by iterative calculation, eliminating abnormal data and extreme data, so as to eliminate the negative impact of abnormal values ​​and extreme values ​​in the data sample on the distributed robust opportunity constrained scheduling results.

[0187] According to an embodiment of the present invention, an embodiment of a device for determining a sample set is also provided. It should be noted that the device for determining a sample set can be used to execute the method for determining a sample set in an embodiment of the present invention, and the method for determining a sample set in an embodiment of the present invention can be executed in the device for determining a sample set.

[0188] Figure 3 is a schematic diagram of a device for determining a sample set according to an embodiment of the present invention, such as Figure 3 As shown, the device may include:

[0189] An acquisition module 32 is used to acquire a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​are equally distributed;

[0190] A first determination module 34, configured to determine a univariate probability distribution and a univariate empirical distribution of each of the historical observation values ​​according to the historical observation data set;

[0191] A second determination module 36 is used to determine the correlation probability distribution corresponding to the univariate probability distribution and the correlation empirical distribution corresponding to the univariate empirical distribution using a preset joint distribution function, wherein the preset joint distribution function is used to establish an association relationship between the joint distribution of multiple historical observations in the historical observation data set and the marginal distribution of each of the historical observations, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation;

[0192] The selection module 38 is used to select the historical observation values ​​in the historical observation data set, whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0193] It should be noted that the acquisition module 32 in this embodiment can be used to execute step S102 in the embodiment of the present application, the first determination module 34 in this embodiment can be used to execute step S104 in the embodiment of the present application, the second determination module 36 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the selection module 38 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0194] In an embodiment of the present invention, a historical observation data set of a multi-energy microgrid is obtained, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; according to the historical observation data set, a univariate probability distribution and a univariate empirical distribution of each historical observation value are determined; a preset joint distribution function is used to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold are selected to obtain a sample set, thereby ensuring that the correlation information of the historical observation value distribution in the fuzzy set is kept close to the correlation of the historical observation value distribution in the historical observation data set, thereby achieving the technical effect of accurately selecting the sample set, and thus solving the technical problem of being unable to accurately select the sample set.

[0195] As an optional embodiment, the device also includes: an analysis module, used to use a preset microgrid distributed Brubang scheduling model to analyze the sample set to obtain scheduling instructions, wherein the preset microgrid distributed Brubang scheduling model aims to minimize the worst case scenario of the multi-energy microgrid, determines the target observation value from the multiple historical observation values ​​in the sample set, and the scheduling instructions are used to instruct the multi-energy microgrid to operate according to the target observation value.

[0196] As an optional embodiment, the device also includes: an acquisition submodule, used to analyze the sample set using the preset microgrid distributed robust scheduling model to obtain at least one constraint of the preset microgrid distributed robust scheduling model before obtaining a scheduling instruction; a setting submodule, used to set the first preset distance threshold and the second preset distance threshold so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than a preset probability threshold, wherein the constraint violation probability is used to represent the probability of violating the constraint after the sample set is input into the preset microgrid distributed robust scheduling model.

[0197] As an optional embodiment, the device also includes: a first clustering submodule, used to cluster the multiple historical observation values ​​in the sample set for a preset number of times according to a preset number of clusters to obtain multiple groups of pre-selected clustering results, wherein each group of the pre-selected clustering results includes: multiple cluster centers that meet the preset number of clusters, each of the cluster centers is determined based on at least one of the historical observation values ​​of the same cluster cluster; a selection submodule, used to select the pre-selected clustering result with the smallest sum of distances between the historical observation values ​​and the corresponding cluster centers as the target clustering result from the multiple groups of the pre-selected clustering results; a first determination submodule, used to determine a sample subset based on the cluster centers in the target clustering result.

[0198] As an optional embodiment, the device also includes: a second determination submodule, used to input the sample subset into the preset microgrid distribution robust scheduling model to determine the constraint violation probability of the sample subset; an analysis submodule, used to use the preset microgrid distribution robust scheduling model to analyze the sample subset to obtain the scheduling instruction when the constraint violation probability of the sample subset is not greater than the preset probability threshold.

[0199] As an optional embodiment, the device also includes: a third determination submodule, used to determine the historical observation values ​​in the sample set that cause the number of constraint violations of the sample subset to be not less than a preset number threshold when the constraint violation probability of the sample subset is greater than the preset probability threshold, so as to obtain a set to be pruned; a pruning submodule, used to prune the sample set based on the set to be pruned, so as to obtain a pruned sample set; and a second clustering submodule, used to cluster multiple historical observation values ​​in the pruned sample set for a preset number of times according to the preset clustering number, so as to obtain the sample subset of the pruned sample set.

[0200] As an optional embodiment, the pruning submodule includes: a sorting unit, used to sort the multiple historical observations in the to-be-pruned set according to the number of items that violate the constraint conditions, so as to obtain a sequence of observations to be pruned; a truncation unit, used to truncate the multiple historical observations that meet preset conditions from the to-be-pruned sequence of observations in descending order of the number of items that violate the constraint conditions, so as to obtain an abnormal sample set, wherein the preset condition is a preset truncation number or a preset truncation ratio; and a deletion unit, used to delete the abnormal sample set from the sample set.

[0201] An embodiment of the present invention may provide an electronic device, which may be a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0202] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0203] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for determining the sample set: obtaining a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; determining the univariate probability distribution and the univariate empirical distribution of each historical observation value based on the historical observation data set; using a preset joint distribution function to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, selecting historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0204] Figure 4 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 4 As shown, the computer terminal 40 may include: one or more (only one is shown in the figure) processors 42 , and a memory 44 .

[0205] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for determining the sample set in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the above-mentioned method for determining the sample set is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal 40 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0206] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; determine the univariate probability distribution and univariate empirical distribution of each historical observation value based on the historical observation data set; use a preset joint distribution function to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, select historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0207] Optionally, the processor may also execute the program code of the following steps: use a preset microgrid distributed Brubang scheduling model to analyze the sample set to obtain scheduling instructions, wherein the preset microgrid distributed Brubang scheduling model aims to minimize the worst case scenario of the multi-energy microgrid, determines the target observation value from multiple historical observation values ​​in the sample set, and the scheduling instructions are used to instruct the multi-energy microgrid to operate according to the target observation value.

[0208] Optionally, the processor may also execute the program code of the following steps: obtaining at least one constraint condition of a preset microgrid distributed robust scheduling model; setting a first preset distance threshold and a second preset distance threshold so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than a preset probability threshold, wherein the constraint violation probability is used to represent the probability of violating the constraint condition after the sample set is input into the preset microgrid distributed robust scheduling model.

[0209] Optionally, the processor may also execute the program code of the following steps: clustering multiple historical observations in the sample set for a preset number of times according to a preset number of clusters to obtain multiple groups of pre-selected clustering results, wherein each group of pre-selected clustering results includes: multiple cluster centers that meet the preset number of clusters, each cluster center is determined based on at least one historical observation value of the same cluster cluster; among the multiple groups of pre-selected clustering results, selecting the pre-selected clustering result with the smallest sum of distances between the historical observations and the corresponding cluster centers as the target clustering result; and determining the sample subset based on the cluster centers in the target clustering result.

[0210] Optionally, the processor may also execute the program code of the following steps: inputting the sample subset into a preset microgrid distributed robust scheduling model to determine the constraint violation probability of the sample subset; when the constraint violation probability of the sample subset is not greater than a preset probability threshold, using the preset microgrid distributed robust scheduling model to analyze the sample subset to obtain a scheduling instruction.

[0211] Optionally, the processor may also execute the program code of the following steps: when the constraint violation probability of a sample subset is greater than a preset probability threshold, determining historical observations in the sample set that cause the constraint violation times of the sample subset to be not less than a preset number threshold, and obtaining a set to be pruned; pruning the sample set based on the set to be pruned, and obtaining a pruned sample set; and clustering multiple historical observations in the pruned sample set a preset number of times according to a preset number of clusters, and obtaining a sample subset of the pruned sample set.

[0212] Optionally, the processor may also execute the following program code: sorting multiple historical observations in the set to be pruned according to the number of items that violate constraints to obtain a sequence of observations to be pruned; intercepting multiple historical observations that meet preset conditions from the sequence of observations to be pruned in descending order of the number of items that violate constraints to obtain an abnormal sample set, wherein the preset condition is a preset interception number or a preset interception ratio; and deleting the abnormal sample set from the sample set.

[0213] In an embodiment of the present invention, a historical observation data set of a multi-energy microgrid is obtained, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​with equal probability distribution; according to the historical observation data set, a univariate probability distribution and a univariate empirical distribution of each historical observation value are determined; a preset joint distribution function is used to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold are selected to obtain a sample set, thereby ensuring that the correlation information of the historical observation value distribution in the fuzzy set is kept close to the correlation of the historical observation value distribution in the historical observation data set, thereby achieving the technical effect of accurately selecting the sample set, and thus solving the technical problem of being unable to accurately select the sample set.

[0214] It can be understood by those skilled in the art that Figure 4The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 4 The structure of the electronic device is not limited. For example, the computer terminal 40 may also include Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations are shown.

[0215] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a computer program. The computer program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0216] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the method for determining the sample set provided in the embodiment.

[0217] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0218] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: obtaining a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty for multiple new energy units, and multiple historical observation values ​​with equal probability distribution; determining the univariate probability distribution and the univariate empirical distribution of each historical observation value based on the historical observation data set; using a preset joint distribution function to determine the correlation probability distribution corresponding to the univariate probability distribution, and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish a correlation relationship between the joint distribution of multiple historical observation values ​​in the historical observation data set and the marginal distribution of each historical observation value, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation value; in the historical observation data set, selecting historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold, to obtain a sample set.

[0219] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: using a preset microgrid distributed Brubang scheduling model to analyze the sample set to obtain scheduling instructions, wherein the preset microgrid distributed Brubang scheduling model aims to minimize the worst case scenario of the multi-energy microgrid, determines the target observation value from multiple historical observation values ​​in the sample set, and the scheduling instructions are used to instruct the multi-energy microgrid to operate according to the target observation value.

[0220] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining at least one constraint condition of a preset microgrid distributed robust scheduling model; setting a first preset distance threshold and a second preset distance threshold so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than a preset probability threshold, wherein the constraint violation probability is used to represent the probability of violating the constraint condition after the sample set is input into the preset microgrid distributed robust scheduling model.

[0221] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: clustering multiple historical observations in a sample set for a preset number of times according to a preset number of clusters to obtain multiple groups of pre-selected clustering results, wherein each group of pre-selected clustering results includes: multiple cluster centers that meet the preset number of clusters, each cluster center is determined based on at least one historical observation value of the same cluster cluster; among the multiple groups of pre-selected clustering results, selecting the pre-selected clustering result with the smallest sum of distances between the historical observations and the corresponding cluster centers as the target clustering result; and determining the sample subset based on the cluster centers in the target clustering result.

[0222] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: inputting a sample subset into a preset microgrid distributed robust scheduling model to determine the constraint violation probability of the sample subset; when the constraint violation probability of the sample subset is not greater than a preset probability threshold, using the preset microgrid distributed robust scheduling model to analyze the sample subset to obtain a scheduling instruction.

[0223] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: when the constraint violation probability of a sample subset is greater than a preset probability threshold, determining historical observations in the sample set that cause the constraint violation number of the sample subset to be not less than a preset number threshold, to obtain a set to be pruned; pruning the sample set based on the set to be pruned to obtain a pruned sample set; clustering multiple historical observations in the pruned sample set a preset number of times according to a preset number of clusters to obtain a sample subset of the pruned sample set.

[0224] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: sorting multiple historical observations in the set to be pruned according to the number of items that violate constraints to obtain a sequence of observations to be pruned; intercepting multiple historical observations that meet preset conditions from the sequence of observations to be pruned in order from high to low of the number of items that violate constraints to obtain an abnormal sample set, wherein the preset condition is a preset interception number or a preset interception ratio; and deleting the abnormal sample set from the sample set.

[0225] The embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the method for determining a sample set provided in the above embodiment are implemented.

[0226] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0227] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0228] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0230] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0231] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0232] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for determining a sample set, characterized in that: include: Acquire a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​of multiple new energy units with uncertainty, and multiple historical observation values ​​are equally distributed; Determine, based on the historical observation data set, a univariate probability distribution and a univariate empirical distribution of each of the historical observation values; Using a preset joint distribution function, determine the correlation probability distribution corresponding to the univariate probability distribution and the correlation empirical distribution corresponding to the univariate empirical distribution, wherein the preset joint distribution function is used to establish an association relationship between the joint distribution of multiple historical observations in the historical observation data set and the marginal distribution of each of the historical observations, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation; In the historical observation data set, the historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than the first preset distance threshold and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than the second preset distance threshold are selected to obtain a sample set.

2. The method according to claim 1, characterized in that The method further comprises: The sample set is analyzed using a preset microgrid distributed Brubang scheduling model to obtain a scheduling instruction, wherein the preset microgrid distributed Brubang scheduling model aims to minimize the worst-case scenario of the multi-energy microgrid, determines a target observation value from multiple historical observation values ​​in the sample set, and the scheduling instruction is used to instruct the multi-energy microgrid to operate according to the target observation value.

3. The method according to claim 2, characterized in that Before analyzing the sample set using the preset microgrid distributed robust scheduling model to obtain a scheduling instruction, the method further includes: Obtain at least one constraint condition of the preset microgrid distributed robust scheduling model; The first preset distance threshold and the second preset distance threshold are set so that the constraint violation probability of the sample set determined based on the first preset distance threshold and the second preset distance threshold is greater than a preset probability threshold, wherein the constraint violation probability is used to represent the probability of violating the constraint condition after the sample set is input into the preset microgrid distributed robust scheduling model.

4. The method according to claim 3, characterized in that The method further comprises: According to a preset number of clusters, clustering is performed a preset number of times on the plurality of historical observations in the sample set to obtain a plurality of groups of pre-selected clustering results, wherein each group of the pre-selected clustering results includes: a plurality of cluster centers that meet the preset number of clusters, each of the cluster centers being determined based on at least one of the historical observations of the same cluster cluster; Among the multiple groups of pre-selected clustering results, the pre-selected clustering result with the smallest sum of distances between the historical observation value and the corresponding cluster center is selected as the target clustering result; A sample subset is determined according to the cluster center in the target clustering result.

5. The method according to claim 4, characterized in that The method further comprises: Inputting the sample subset into the preset microgrid distributed robust scheduling model to determine the constraint violation probability of the sample subset; When the constraint violation probability of the sample subset is not greater than the preset probability threshold, the sample subset is analyzed using the preset microgrid distribution robust scheduling model to obtain the scheduling instruction.

6. The method according to claim 5, characterized in that The method further comprises: In the case where the constraint violation probability of the sample subset is greater than the preset probability threshold, determining the historical observation values ​​in the sample set that cause the number of constraint violations of the sample subset to be not less than the preset number threshold, and obtaining a set to be pruned; Pruning the sample set based on the set to be pruned to obtain a pruned sample set; According to the preset number of clustering, a plurality of the historical observation values ​​in the pruned sample set are clustered a preset number of times to obtain the sample subset of the pruned sample set.

7. The method according to claim 6, characterized in that Pruning the sample set based on the set to be pruned to obtain the pruned sample set includes: Sort the plurality of historical observations in the set to be pruned according to the number of items that violate constraint conditions to obtain a sequence of observations to be pruned; According to the order of the number of violation of constraint conditions from high to low, a plurality of the historical observation values ​​meeting the preset conditions are intercepted from the sequence of observation values ​​to be pruned to obtain an abnormal sample set, wherein the preset condition is a preset interception number or a preset interception ratio; The abnormal sample set is deleted from the sample set.

8. A device for determining a sample set, characterized in that: include: An acquisition module is used to acquire a historical observation data set of a multi-energy microgrid, wherein the historical observation data set includes: historical observation values ​​with uncertainty of multiple new energy units, and multiple historical observation values ​​are equally distributed; A first determination module, configured to determine a univariate probability distribution and a univariate empirical distribution of each of the historical observation values ​​according to the historical observation data set; A second determination module is used to determine the correlation probability distribution corresponding to the univariate probability distribution and the correlation empirical distribution corresponding to the univariate empirical distribution using a preset joint distribution function, wherein the preset joint distribution function is used to establish an association relationship between the joint distribution of multiple historical observations in the historical observation data set and the marginal distribution of each of the historical observations, and the marginal distribution is the integral of the univariate probability distribution of the same historical observation; A selection module is used to select, from the historical observation data set, the historical observation values ​​whose first optimal transmission distance between the univariate probability distribution and the univariate empirical distribution is not greater than a first preset distance threshold, and whose second optimal transmission distance between the correlation probability distribution and the correlation empirical distribution is not greater than a second preset distance threshold, to obtain a sample set.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the method for determining a sample set according to any one of claims 1 to 7 through the computer program.

10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method for determining a sample set described in any one of claims 1 to 7 are implemented.