Method and device for extracting extreme scene of power grid operation and related product
By obtaining the sample set of grid operation scenarios and using an isolated forest algorithm to extract abnormal sample points, the problem of insufficient flexibility of the power system in extreme scenarios is solved, fast and accurate extraction of extreme scenarios is achieved, and the planning and optimization capabilities of the power system are improved.
Patent Information
- Application Number
- CN202411594731.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-10
- Publication Date
- 2025-04-11
AI Technical Summary
The existing technology is difficult to effectively deal with the flexibility shortcomings such as rapid fluctuations in net load, power shortage and new energy power abandonment in power systems, especially in extreme scenarios, where insufficient system flexibility leads to insufficient climbing capabilities.
By obtaining the grid operation scenario sample set of the target power system within the preset period, and using the isolated forest algorithm to extract abnormal sample points from the grid operation scenario sample set, obtaining flexible limit-absence extreme scenarios. This method directly characterizes the degree of alienation between sample points without using distance and other indicators, improving the objectivity and speed of the extraction process.
It realizes rapid, accurate and comprehensive extraction of flexible extremist scenarios in power grid operation, reduces the computational burden, enhances the accuracy and efficiency of extraction, and can better guide the planning and optimization of the power system.
Smart Images

Figure CN119807938A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of power system technology and machine learning technology, and in particular to a method, device and related products for extracting extreme scenarios of power grid operation. Background Art
[0002] Under the background of the "dual carbon" goal, my country's power installed capacity structure has accelerated its transformation, with new energy power generation units becoming the main force, and the proportion of coal-fired power units continuing to decline. The adjustable resources in the system face more severe challenges, and it is difficult to effectively cope with the rapid fluctuations in net load. The flexibility shortcomings such as power shortages and new energy abandonment are becoming more prominent. In this context, although the stochastic optimization method based on typical scenarios can alleviate the computational pressure to a certain extent, it ignores those more severe extreme scenarios that pose major challenges to system flexibility, including insufficient system upward flexibility, insufficient downward flexibility, and insufficient climbing ability. Therefore, how to effectively generate extreme scenarios with insufficient flexibility to guide future power system planning and optimization has become an urgent problem to be solved.
[0003] Mi Yang, Li Haipeng, Chen Boyang, et al., in their paper “Two-stage Optimal Configuration of Microgrids Based on Fuzzy Scenario Clustering” published in Journal of Shanghai Jiao Tong University (2023, 57(9): 1137-1145), adopted the method of fuzzy scenario clustering to select extreme weather and construct extreme scenarios. However, the method of selecting extreme weather is subjective, which leads to the subjective and incomplete extreme scenarios constructed. Summary of the invention
[0004] In view of the above situation, the embodiments of the present disclosure provide a method, device and related products for extracting extreme scenarios of power grid operation, aiming to solve the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for extracting extreme scenarios of power grid operation, the method comprising:
[0006] Acquire a grid operation scenario sample set of a target power system within a preset period, wherein each sample in the grid operation scenario sample set includes multiple groups of sampling data, and each group of sampling data includes total load data of the target power system and total power generation data of a new energy generator set;
[0007] The isolation forest algorithm is used to extract abnormal sample points from the power grid operation scenario sample set to obtain extreme flexibility shortage scenarios.
[0008] In a second aspect, an embodiment of the present disclosure further provides a device for extracting extreme scenarios of power grid operation, the device comprising:
[0009] An acquisition module is used to acquire a grid operation scenario sample set of a target power system within a preset period, wherein each sample in the grid operation scenario sample set includes multiple groups of sampling data, and each group of sampling data includes total load data of the target power system and total power generation data of a new energy generator set;
[0010] The extraction module is used to extract abnormal sample points from the power grid operation scenario sample set using an isolation forest algorithm to obtain extreme flexibility shortage scenarios.
[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, which, when executed, cause the processor to execute the steps of the above-mentioned method for extracting extreme power grid operation scenarios.
[0012] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the steps of the above-mentioned method for extracting extreme power grid operation scenarios.
[0013] Through the above technical solutions, the extraction method, device and related products of extreme power grid operation scenarios provided by the embodiments of the present disclosure, compared with the prior art, eliminate the influence of human factors on the extraction of extreme scenarios of flexibility shortage, by obtaining a sample set of power grid operation scenarios of the target power system within a certain period of time. Among them, the samples include the total load data of the system and the total power generation data of the new energy generator sets; then, the isolation forest algorithm is used to extract abnormal sample points from the power grid operation scenario sample set. Here, the isolation forest algorithm does not need to use indicators such as distance to describe the differences between sample points, but directly characterizes the degree of alienation between sample points. Therefore, it can not only make the extraction process objective and reliable, but also greatly improve the extraction speed and reduce calculations, so that extreme scenarios of power grid operation flexibility shortage can be obtained quickly, accurately and comprehensively.
[0014] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0016] Figure 1A schematic diagram showing a flow chart of a method for extracting extreme power grid operation scenarios provided by an embodiment of the present disclosure;
[0017] Figure 2 The abnormal scores of each sample point in the typical scenario 1 provided by the embodiment of the present disclosure are shown;
[0018] Figure 3 The abnormal scores of each sample point in the typical scenario 2 provided by the embodiment of the present disclosure are shown;
[0019] Figure 4 The abnormal scores of each sample point in the typical scenario 3 provided by the embodiment of the present disclosure are shown;
[0020] Figure 5 The abnormal scores of each sample point in the typical scenario 4 provided by the embodiment of the present disclosure are shown;
[0021] Figure 6 The extreme scenario 1 of flexibility shortage provided by the embodiment of the present disclosure is shown;
[0022] Figure 7 The extreme scenario 2 of flexibility shortage provided by the embodiment of the present disclosure is shown;
[0023] Figure 8 A schematic diagram of the structure of an extraction device for extreme power grid operation scenarios provided by an embodiment of the present disclosure is shown;
[0024] Fig. 9 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below in combination with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0026] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 such usage is interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".
[0028] As mentioned above, the method of generating extreme scenarios in the prior art is to use fuzzy scenario clustering to select extreme weather and construct extreme scenarios. The method of selecting extreme weather is subjective, which leads to the subjective and incomplete constructed extreme scenarios. Based on this, the present invention proposes a method, device and related products for extracting extreme scenarios of power grid operation. The present disclosure is described in detail below through specific embodiments.
[0029] To facilitate understanding of this embodiment, a method for extracting extreme power grid operation scenarios disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for extracting extreme power grid operation scenarios provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, etc. In some possible implementations, the method for extracting extreme power grid operation scenarios can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0030] Figure 1 A schematic diagram of a process for extracting extreme power grid operation scenarios provided by an embodiment of the present disclosure is shown. Figure 1 It can be seen that the embodiment of the present disclosure at least includes steps S101-S102:
[0031] S101: Obtain a grid operation scenario sample set of a target power system within a preset period, wherein each sample in the grid operation scenario sample set includes multiple groups of sampling data, and each group of sampling data includes total load data of the target power system and total power generation data of new energy power generation groups.
[0032] In this embodiment, the preset period, the time scale corresponding to each sample, the sampling frequency of the sampled data in each sample, etc. can be set according to the needs of the actual application scenario, and this embodiment does not limit this. For example, if it is necessary to extract the extreme scenarios of the power grid operation of the target power system within 1 year, the preset period can be set to 1 year, the time scale corresponding to each sample can be set to 1 day, and the sampling frequency of the sampled data in each sample can be set to 4 times / hour. For another example, if it is necessary to extract the extreme scenarios of the power grid operation of the target power system during high temperatures in summer, the preset period can be set to June-September, the time scale corresponding to each sample can be set to 1 day, and the sampling frequency of the sampled data in each sample can be set to 6 times / hour.
[0033] In a possible implementation, the new energy generator set includes at least one of the following: a wind generator set, a photovoltaic generator set, a biomass generator set, an ocean generator set, and a geothermal generator set. In a possible implementation, each set of sampled data also includes at least one of the following: total power generation data of a traditional generator set, and total power generation data of an energy storage device. Traditional generator sets include but are not limited to thermal generator sets, hydroelectric generator sets, and the like.
[0034] Exemplarily, sample point 1 = [wind power 1, photovoltaic 1, load 1, wind power 2, photovoltaic 2, load 2, ..., wind power 96, photovoltaic 96, load 96]. The time scale corresponding to sample point 1 is 1 day, wind power represents the total power generation data of all wind turbines in the target power system, photovoltaic represents the total power generation data of all photovoltaic power generation units in the target power system, and load represents the total load data of the target power system. Sample point 1 includes 96 groups of sampled data, that is, the sampling frequency is 4 times / hour. Here, the total power generation data can be, for example, the total active power.
[0035] This embodiment does not limit the means of obtaining the sample set of extreme scenarios for power grid operation. Exemplarily, a data push mechanism is configured at the data acquisition end to transmit the collected total load data of the target power system and the total active power of the new energy generator set in real time to the execution subject of this embodiment, such as the port specified by the server, through a network communication protocol (such as TCP / IP). The server side sets up a data receiving service, continuously monitors the port, and immediately receives and stores new data once it is received.
[0036] S102: Using the isolation forest algorithm, extract abnormal sample points from the power grid operation scenario sample set to obtain extreme flexibility shortage scenarios.
[0037] In the isolation forest algorithm, outlier sample points can be distinguished by fewer division times compared to other sample points.
[0038] It can be seen that compared with the prior art, the disclosed embodiment eliminates the influence of human factors on the extraction of extreme scenarios of flexibility shortage, by obtaining a sample set of grid operation scenarios of the target power system within a certain period of time. Among them, the samples include the total load data of the system and the total power generation data of the new energy generator sets; then, the isolation forest algorithm is used to extract abnormal sample points from the grid operation scenario sample set. Here, the isolation forest algorithm does not need to use indicators such as distance to describe the differences between sample points, but directly characterizes the degree of alienation between sample points. Therefore, it can not only make the extraction process objective and reliable, but also greatly improve the extraction speed and reduce calculations, so that extreme scenarios of grid operation flexibility shortage can be obtained quickly, accurately and comprehensively.
[0039] Further, in order to better illustrate the process of the above-mentioned method for extracting the extreme scenarios of power grid operation, as a refinement and extension of the above-mentioned embodiment, the embodiment of the present invention provides several optional embodiments, but is not limited thereto, which are specifically as follows:
[0040] In a possible implementation manner, the method further includes: for any target sample in the power grid operation scenario sample set, calculating the net load change value between adjacent time periods in the target sample to form a net load change value vector; using the sampling data corresponding to each time period in the target sample as feature data, and using the net load change value vector as a label to obtain a sample to be fitted; each of the samples to be fitted constitutes a set of samples to be fitted; using a preset fitting algorithm to process the set of samples to be fitted to obtain weight data corresponding to each time period; using a preset time period screening rule, based on each of the weight data, screening each time period to obtain a key time. segment; the use of the isolation forest algorithm to extract abnormal sample points from the power grid operation scenario sample set to obtain extreme flexibility shortage scenarios, including: by using the isolation forest algorithm, based on the sampling data corresponding to each of the key time periods, the samples in the power grid operation scenario sample set are divided, and an isolation forest model including multiple isolated trees is constructed; for any sample to be evaluated in the power grid operation scenario sample set, the depth data of the sample to be evaluated on each isolated tree is calculated; based on each of the depth data, the abnormal score of the sample to be evaluated is calculated; based on each of the abnormal scores, each of the samples to be evaluated is screened to obtain extreme flexibility shortage scenarios.
[0041] In this embodiment, the samples in the grid operation scenario sample set can be used to construct a set of samples to be fitted. Taking the aforementioned sample point 1 = [wind power 1, photovoltaic 1, load 1, wind power 2, photovoltaic 2, load 2, ..., wind power 96, photovoltaic 96, load 96] as an example, the specific process of generating a sample to be fitted is described. Specifically, the net load corresponding to each time period in sample point 1 can be calculated first: net load 1 (load 1-wind power 1-photovoltaic 1), net load 2 (load 2-wind power 2-photovoltaic 2), ..., net load 96 (load 96-wind power 96-photovoltaic 96). Then calculate the net load change value between adjacent time periods: net load change value 1 (net load 2-net load 1), ..., net load change value 95 (net load 96-net load 95). Each net load change value constitutes a net load change value vector. This net load change value vector is used as a sample label, and the sampling data corresponding to the 96 time periods in the sample point is used as 96 feature data. The feature data and the sample label constitute the sample to be fitted corresponding to sample point 1. By analogy, the samples to be fitted corresponding to other sample points in the power grid operation scenario sample set can be obtained. Finally, the samples to be fitted constitute a set of samples to be fitted.
[0042] Then, the preset fitting algorithm can be used to fit the relationship between the net load change value vector representing the flexibility deficit of the target power system and the sampled data of each time period based on the sample set to be fitted, so as to obtain the weight data corresponding to each time period. During implementation, the preset fitting algorithm can be ordinary least squares method, partial least squares estimation method, etc., which is not limited in this disclosure. Exemplarily, the preset fitting algorithm is partial least squares estimation method, and the formula of partial least squares estimation method is as follows:
[0043] X=TP T +E,Y=UQ T +F
[0044] Among them, X represents the matrix composed of sampling data corresponding to each time period, Y represents the net load change value vector, T represents the latent variable of X, U represents the latent variable of Y, P represents the weight matrix of X, Q represents the weight matrix of Y, E represents the residual matrix of X, and F represents the residual matrix of Y.
[0045] The preset fitting algorithm can fit the relationship between the net load change value vector and the sampled data of each time period. Each independent variable (sampled data of a time period) has a corresponding weight data. The larger the weight, the greater the contribution of the sampled data of the time period to the potential variable. Therefore, the preset time period screening rules can be used to screen each time period based on each weight data to obtain a key time period. The preset time period screening rules can be set according to actual needs, and the embodiments of the present disclosure are not limited to this. For example, a weight threshold can be set. For example, if the absolute value of the weight corresponding to a time period is greater than 0.5, it is determined as a key time period. The weights can also be sorted, and the top 5 time periods in weight ranking are selected as key time periods.
[0046] After screening out the time periods that have a greater impact on the flexibility deficit, the samples in the grid operation scenario sample set can be divided to construct an isolation forest model. Specifically, for example, a key time period can be randomly selected as the starting root node; the comprehensive characteristic value of each sample in the key time period is calculated. For example, (wind power + photovoltaic power) / load can be used to represent the comprehensive characteristic value. A value is randomly selected between the maximum comprehensive characteristic value and the minimum comprehensive characteristic value as the basis for division, and each sample is divided; the above steps are repeated for the left and right branches until one of the following conditions is met: the data cannot be divided any further; the isolated tree reaches the specified maximum depth. Repeat the above steps to complete the construction of the isolation forest model (ensuring that all key time periods have corresponding isolated trees).
[0047] For any sample to be evaluated in the power grid operation scenario sample set, the depth data of the sample to be evaluated on each isolated tree can be calculated; based on each depth data, the abnormal score of the sample to be evaluated is calculated. In specific implementation, for example, the abnormal score of the sample to be evaluated can be calculated by the following formula:
[0048]
[0049] h(m)=n+H(m size )
[0050]
[0051] Among them, Score(m) represents the abnormal score of the sample m to be evaluated, E(h(m)) represents the average depth of the sample m to be evaluated on all isolated trees, h(m) represents the depth data of the sample m to be evaluated on a single isolated tree, n represents the path length of the leaf node where the sample m to be evaluated is located, and H(m size ) represents the number of samples in the same leaf node as the sample m to be evaluated, which can be regarded as the correction value of the depth. express The average depth of the binary tree of the isolation forest model constructed by samples, γ is the Euler constant.
[0052] Finally, based on the abnormal scores of each sample to be evaluated, each sample to be evaluated is screened to obtain extreme scenarios of flexibility deficiency. The closer Score (m) is to 1, the smaller the depth of the sample m to be evaluated, and the greater the abnormality of the sample m to be evaluated. Therefore, by comparing the abnormal scores of each sample to be evaluated with the preset thresholds, extreme scenarios of flexibility deficiency can be screened. Here, the preset threshold can be set according to actual conditions. In another possible implementation, based on each of the abnormal scores, each of the samples to be evaluated is screened to obtain extreme scenarios of flexibility deficiency, including: for any target abnormal score among the abnormal scores, if the target abnormal score does not belong to the preset normal range, the sample to be evaluated corresponding to the target abnormal score is determined as an extreme scenario of flexibility deficiency; wherein, the preset normal range is obtained based on the interquartile range method.
[0053] In this embodiment, in order to calculate the preset normal range based on the interquartile range method, specifically, for example, the abnormal score of each sample to be evaluated can be sorted in ascending order; the first quartile (Q1) is calculated, that is, 25% of the data points in the data are less than this value; the third quartile (Q3) is calculated, that is, 75% of the data points in the data are less than this value; the interquartile range IQR = Q3-Q1 is calculated to obtain the range of the middle 50% of the data; the lower limit of the preset normal range is: Q1-1.5×IQR, and the upper limit of the preset normal range is: Q3+1.5×IQR.
[0054] This embodiment can effectively reduce the complexity and redundancy of data by selecting time periods with larger weights as key time periods, and focus on the sampled data in time periods that have a more significant impact on the flexibility shortage. This can not only improve the efficiency of building the isolation forest model and avoid increasing the computational burden due to too much sampling data in irrelevant or minor time periods, but also enhance the accuracy of model training, so that it can more accurately capture the core information closely related to the flexibility shortage in the power system, thereby providing strong support for more accurate and effective extraction of extreme scenarios from historical scenario data.
[0055] In a possible implementation, the method further includes: labeling the attribute value of each of the flexibility deficiency extreme scenarios under the flexibility deficiency attribute to obtain a labeling result; wherein the flexibility deficiency attribute includes directionality; and classifying each of the flexibility deficiency extreme scenarios according to the labeling result to obtain a plurality of extreme scenario sets.
[0056] In a possible implementation of the present embodiment, the attribute value of each of the extreme flexibility shortage scenarios under the flexibility shortage attribute is labeled to obtain a labeling result, including: for any target scenario in the extreme flexibility shortage scenarios, the net load corresponding to each sampling data in the target scenario is used as the flexibility shortage value; based on each of the flexibility shortage values, a comprehensive index value reflecting the overall level of flexibility shortage of the target scenario is calculated; based on the comprehensive index value, the value of the target scenario under the directional attribute is labeled to obtain a directional labeling result; and the directional labeling result is used as the labeling result.
[0057] In this embodiment, the net load corresponding to the sampled data in the target scene can be calculated as the flexibility deficit value. After the flexibility deficit value of the target scene is obtained, the comprehensive index value of the target scene is calculated based on each flexibility deficit value; then, based on the comprehensive index value, the directional attribute of the flexibility deficit of the target scene is annotated with an attribute value to obtain an annotation result.
[0058] In specific implementation, for example, the average value of each flexibility deficit value can be calculated and the average value can be used as the comprehensive index value; if the comprehensive index value is greater than 0, the directionality of the flexibility deficit of the target scenario is marked as "insufficient supply"; if the comprehensive index value is less than 0, the directionality of the flexibility deficit of the target scenario is marked as "oversupply"; if the comprehensive index value is equal to 0, the directionality of the flexibility deficit of the target scenario is marked as "balance between supply and demand". For another example, the median of each flexibility deficit value can be calculated and the median can be used as the comprehensive index value; if the comprehensive index value is greater than 0, the directionality of the flexibility deficit of the target scenario is marked as "insufficient supply"; if the comprehensive index value is less than 0, the directionality of the flexibility deficit of the target scenario is marked as "oversupply"; if the comprehensive index value is equal to 0, the directionality of the flexibility deficit of the target scenario is marked as "balance between supply and demand".
[0059] Finally, according to the directional labeling results of flexibility deficiency, each extreme scenario of flexibility deficiency can be classified to obtain two extreme scenario sets.
[0060] In one possible implementation, the flexibility shortage attribute also includes the attribute value of each flexibility shortage extreme scenario under the flexibility shortage attribute under the time scale, and the labeling result is obtained, including: determining the maximum duration according to the directional labeling result, and the directionality of the flexibility shortage value within the maximum duration is consistent with the directional labeling result; labeling the attribute value of the target scenario under the time scale attribute based on the maximum duration and the preset scale division rule to obtain the time scale labeling result; obtaining the labeling result according to the directional labeling result and the time scale labeling result.
[0061] In this embodiment, the preset scale division rule can be set as needed. For example, the preset scale division rule is: if the longest duration belongs to the interval [0,2], the flexibility shortage time scale of the target scene is short time; if the longest duration belongs to the interval [2,5], the flexibility shortage time scale of the target scene is medium time; if the longest duration belongs to the interval [5,24], the flexibility shortage time scale of the target scene is long time. Here, the unit of the value in the interval is hour.
[0062] Finally, according to the directional labeling results and time scale labeling results of flexibility deficiency (if the time scale attribute value includes short time scale and long time scale), each flexibility deficiency extreme scenario can be classified to obtain four extreme scenario sets.
[0063] This embodiment can mark the attribute values of each flexibility shortage extreme scenario under the flexibility shortage attribute to obtain the marking results; and according to the marking results, classify each flexibility shortage extreme scenario to obtain multiple extreme scenario sets. Such marking and classification methods can meet the specific needs of planning, so that the entire processing flow is closely aligned with the planning goals, and the resulting response strategies are more targeted, further helping to accurately and efficiently solve various problems caused by flexibility shortage extreme scenarios, and ensure the stability, reliability and efficient operation of related systems or businesses when facing these extreme situations.
[0064] The embodiment of the present disclosure also provides a method for extracting extreme scenarios of power grid operation, comprising the following steps:
[0065] Step S1: Obtain a grid operation scenario sample set of a provincial or municipal power system within one year. Each sample in the grid operation scenario sample set includes multiple groups of sampling data. Each group of sampling data includes the total load data of the target power system, the total active power of the wind turbine generator set, and the total active power of the photovoltaic generator set. The sampling frequency is 4 times / hour.
[0066] Step S2: for any target sample in the power grid operation scenario sample set, calculate the net load change value between adjacent time periods in the target sample to form a net load change value vector.
[0067] Step S3: Taking the sampling data corresponding to each time period in the target sample as feature data and the net load change value vector as a label, the samples to be fitted are obtained; each sample to be fitted constitutes a set of samples to be fitted.
[0068] Step S4: Use the partial least squares estimation method to process the sample set to be fitted to obtain the weight data corresponding to each time period.
[0069] Step S5: Using the preset time period screening rules, based on each weight data, screen each time period to obtain a key time period. For example, the key time period is the time period corresponding to the 8th to 16th, 24th to 36th, 52nd to 60th and 88th to 96th dimensional features.
[0070] Step S6: By using the isolation forest algorithm, based on the sampling data corresponding to each key time period, the samples in the power grid operation scenario sample set are divided to construct an isolation forest model including multiple isolated trees.
[0071] Step S7: for any sample to be evaluated in the power grid operation scenario sample set, calculate the depth data of the sample to be evaluated on each isolated tree.
[0072] Step S8: Calculate the abnormality score of the sample to be evaluated based on each depth data.
[0073] Step S9: For any target abnormal score among the abnormal scores, if the target abnormal score does not belong to the preset normal range, the sample to be evaluated corresponding to the target abnormal score is determined as an extreme scenario of flexibility deficiency; wherein the preset normal range is obtained based on the interquartile range method.
[0074] Figure 2 The abnormal scores of each sample point in the typical scenario 1 provided by the embodiment of the present disclosure are shown. Figure 3 The abnormal scores of each sample point in the typical scenario 2 provided by the embodiment of the present disclosure are shown. Figure 4 The abnormal scores of each sample point in the typical scenario 3 provided by the embodiment of the present disclosure are shown. Figure 5 The abnormal scores of each sample point in the typical scenario 4 provided by the embodiment of the present disclosure are shown. Figure 6 An extreme scenario 1 of flexibility shortage provided by an embodiment of the present disclosure is shown. Figure 7 An extreme scenario 2 of flexibility shortage provided by an embodiment of the present disclosure is shown.
[0075] Step S10: For any target scenario in the extreme flexibility shortage scenario, the net load corresponding to each sampled data in the target scenario is used as the flexibility shortage value.
[0076] Step S11: Based on each flexibility deficit value, calculate a comprehensive index value reflecting the overall level of flexibility deficit of the target scenario.
[0077] Step S12: Based on the comprehensive index value, the attribute value of the target scene under the directional attribute is labeled to obtain a directional labeling result.
[0078] Step S13: Determine the longest duration according to the directional marking result, and the directionality of the flexibility shortage value within the longest duration is consistent with the directional marking result.
[0079] Step S14: Based on the longest duration and the preset scale division rule, the attribute value of the target scene under the time scale attribute is labeled to obtain the time scale labeling result.
[0080] Step S15: Obtaining a labeling result according to the directional labeling result and the time scale labeling result.
[0081] Table 1 below shows the performance of relevant flexibility indicators for extreme scenarios selected using the interquartile range method. It can be seen that the interquartile range method is a more suitable method for selecting extreme abnormal scores.
[0082] Table 1 Verification of extreme scenario flexibility indicators under different threshold settings
[0083]
[0084] Then the grid operation scenario sample set can be imported into the conventional K-means algorithm to generate a typical scenario set. Table 2-4 gives the difference indicators between the sample data set with only typical scenarios, typical scenarios and extreme scenarios, and the original data set. It can be seen that the data set constructed by extreme scenarios and typical scenarios is closer to the original scenario.
[0085] Table 2 Comparison of wind power output indicators
[0086]
[0087] Table 3 Comparison of photovoltaic output indicators
[0088]
[0089] Table 4 Comparison of load output indicators
[0090]
[0091] It can be seen from the solution results of the embodiment that the power system flexibility shortage extreme scenario extraction method based on key time period selection and isolation forest algorithm provided in the embodiment of the present disclosure can generate flexibility shortage scenarios in a targeted manner, making the scenario set more consistent with the original scenario.
[0092] Those skilled in the art will appreciate that, in the above method of the specific implementation manner, the writing order of the steps does not mean a strict execution order, but does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0093] It should be noted that, in practical applications, all possible implementations described above can be combined in any manner to form possible embodiments of the present disclosure, which will not be described one by one here.
[0094] Based on the same concept, the embodiment of the present disclosure also provides a device for extracting extreme scenarios of power grid operation. Figure 8 A schematic diagram showing the structure of an extraction device for extreme power grid operation scenarios provided by an embodiment of the present disclosure is shown. Figure 8 As shown, the extraction device 800 for extreme power grid operation scenarios provided by the embodiment of the present disclosure includes:
[0095] An acquisition module 801 is used to acquire a grid operation scenario sample set of a target power system within a preset period, wherein each sample in the grid operation scenario sample set includes multiple groups of sampling data, and each group of sampling data includes total load data of the target power system and total power generation data of a new energy generator set;
[0096] The extraction module 802 is used to extract abnormal sample points from the power grid operation scenario sample set using an isolation forest algorithm to obtain extreme flexibility shortage scenarios.
[0097] In a possible implementation, in the above device, the new energy generator set includes at least one of the following: a wind generator set, a photovoltaic generator set, a biomass generator set, an ocean generator set and a geothermal generator set.
[0098] In a possible implementation, in the above device, each set of sampled data further includes at least one of the following: total power generation data of a conventional power generation set, and total power generation data of an energy storage device.
[0099] In a possible implementation manner, the device further includes a feature screening module, which is used to: for any target sample in the power grid operation scenario sample set, calculate the net load change value between adjacent time periods in the target sample to form a net load change value vector; use the sampling data corresponding to each time period in the target sample as feature data, and use the net load change value vector as a label to obtain a sample to be fitted; each of the samples to be fitted constitutes a set of samples to be fitted; use a preset fitting algorithm to process the set of samples to be fitted to obtain weight data corresponding to each time period; use a preset time period screening rule to screen each time period based on each weight data to obtain a key time period; the extraction module is used to: divide the samples in the power grid operation scenario sample set based on the sampling data corresponding to each key time period by using an isolation forest algorithm, and construct an isolation forest model including multiple isolated trees; for any sample to be evaluated in the power grid operation scenario sample set, calculate the depth data of the sample to be evaluated on each isolated tree; based on each of the depth data, calculate the abnormal score of the sample to be evaluated; based on each of the abnormal scores, screen each of the samples to be evaluated to obtain an extreme scenario of flexibility shortage.
[0100] In one possible implementation, in the above-mentioned device, the feature screening module is used to: for any target abnormal score among the abnormal scores, if the target abnormal score does not belong to a preset normal range, determine the sample to be evaluated corresponding to the target abnormal score as an extreme scenario of flexibility deficiency; wherein the preset normal range is obtained based on the interquartile range method.
[0101] In a possible implementation, the device also includes a classification module, which is used to: label the attribute value of each of the flexibility deficiency extreme scenarios under the flexibility deficiency attribute to obtain a labeling result; wherein the flexibility deficiency attribute includes directionality; and classify each of the flexibility deficiency extreme scenarios according to the labeling result to obtain a plurality of extreme scenario sets.
[0102] In a possible implementation, in the above-mentioned device, the classification module is used to: for any target scenario in the extreme flexibility shortage scenario, use the net load corresponding to each sampling data in the target scenario as the flexibility shortage value; based on each flexibility shortage value, calculate a comprehensive index value reflecting the overall level of flexibility shortage of the target scenario; based on the comprehensive index value, label the attribute value of the target scenario under the directional attribute to obtain a directional labeling result; and use the directional labeling result as the labeling result.
[0103] In a possible implementation, in the above-mentioned device, the flexibility deficiency attribute also includes a time scale; the classification module is further used to: determine a maximum duration based on the directional labeling result, and the directionality of the flexibility deficiency value within the maximum duration is consistent with the directional labeling result; based on the maximum duration and a preset scale division rule, label the attribute value of the target scene under the time scale attribute to obtain a time scale labeling result; obtain the labeling result based on the directional labeling result and the time scale labeling result.
[0104] It should be noted that any of the above-mentioned devices for extracting extreme power grid operation scenarios can implement the above-mentioned methods for extracting extreme power grid operation scenarios in a one-to-one correspondence manner, which will not be repeated here.
[0105] Fig. 9 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig. 9As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0106] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0107] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0108] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an extraction device for extreme power grid operation scenarios at the logical level. The processor executes the program stored in the memory and is specifically used to execute the above method.
[0109] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0110] The electronic device can execute the method for extracting extreme power grid operation scenarios provided by the embodiments of the present disclosure, and realize the extraction device for extracting extreme power grid operation scenarios in Figure 8 The functions of the illustrated embodiments will not be described in detail in the embodiments of the present disclosure.
[0111] The embodiments of the present disclosure also provide a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by an electronic device including multiple application programs, the electronic device can execute the method for extracting extreme power grid operation scenarios provided by multiple embodiments of the present disclosure.
[0112] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0113] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0117] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0118] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0119] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0120] It will be appreciated by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0121] The above are only embodiments of the present disclosure and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A method for extracting extreme scenarios of power grid operation, characterized in that: The method comprises: Acquire a grid operation scenario sample set of a target power system within a preset period, wherein each sample in the grid operation scenario sample set includes multiple groups of sampling data, and each group of sampling data includes total load data of the target power system and total power generation data of a new energy generator set; The isolation forest algorithm is used to extract abnormal sample points from the power grid operation scenario sample set to obtain extreme flexibility shortage scenarios.
2. The method according to claim 1, characterized in that The new energy generator set includes at least one of the following: a wind generator set, a photovoltaic generator set, a biomass generator set, an ocean generator set and a geothermal generator set.
3. The method according to claim 1, characterized in that Each set of sampling data also includes at least one of the following: total power generation data of a traditional power generation set, and total power generation data of an energy storage device.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: For any target sample in the power grid operation scenario sample set, calculate the net load change value between adjacent time periods in the target sample to form a net load change value vector; Taking the sampling data corresponding to each time period in the target sample as feature data and the net load change value vector as a label, a sample to be fitted is obtained; each of the samples to be fitted constitutes a set of samples to be fitted; Using a preset fitting algorithm, the sample set to be fitted is processed to obtain weight data corresponding to each time period; Using the preset time period screening rules, based on the weight data, each time period is screened to obtain the key time period; The isolation forest algorithm is used to extract abnormal sample points from the power grid operation scenario sample set to obtain extreme flexibility shortage scenarios, including: By using an isolation forest algorithm, based on the sampling data corresponding to each of the key time periods, the samples in the power grid operation scenario sample set are divided to construct an isolation forest model including a plurality of isolated trees; For any sample to be evaluated in the power grid operation scenario sample set, calculate the depth data of the sample to be evaluated on each isolated tree; Based on each of the depth data, calculating the abnormality score of the sample to be evaluated; Based on the abnormal scores, the samples to be evaluated are screened to obtain extreme scenarios of flexibility deficiency.
5. The method according to claim 4, characterized in that Based on the abnormal scores, the samples to be evaluated are screened to obtain extreme scenarios of flexibility shortage, including: For any target abnormal score among the abnormal scores, if the target abnormal score does not fall within the preset normal range, the sample to be evaluated corresponding to the target abnormal score is determined as an extreme scenario of flexibility deficiency; wherein the preset normal range is obtained based on the interquartile range method.
6. The method according to claim 5, characterized in that The method further comprises: Annotating the attribute value of each of the extreme flexibility deficiency scenarios under the flexibility deficiency attribute to obtain an annotation result; wherein the flexibility deficiency attribute includes directionality; According to the labeling results, each of the flexibility deficiency extreme scenarios is classified to obtain a plurality of extreme scenario sets.
7. The method according to claim 6, characterized in that The attribute values of each flexibility deficiency extreme scenario under the flexibility deficiency attribute are marked to obtain a marking result, including: For any target scenario in the flexibility shortage extreme scenario, the net load corresponding to each sampled data in the target scenario is used as the flexibility shortage value; Based on each of the flexibility deficit values, a comprehensive index value reflecting the overall level of flexibility deficit of the target scenario is calculated; Based on the comprehensive index value, the attribute value of the target scene under the directional attribute is labeled to obtain a directional labeling result; and the directional labeling result is used as the labeling result.
8. The method according to claim 7, characterized in that The flexibility shortage attribute also includes a time scale; the labeling of the attribute value of each flexibility shortage extreme scenario under the flexibility shortage attribute to obtain a labeling result includes: According to the directional labeling result, the maximum duration is determined, and the directionality of the flexibility shortage value within the maximum duration is consistent with the directional labeling result; based on the maximum duration and the preset scale division rule, the attribute value of the target scene under the time scale attribute is labeled to obtain the time scale labeling result; The labeling result is obtained according to the directional labeling result and the time scale labeling result.
9. A device for extracting extreme scenarios of power grid operation, characterized in that: The device comprises: An acquisition module is used to acquire a grid operation scenario sample set of a target power system within a preset period, wherein each sample in the grid operation scenario sample set includes multiple groups of sampling data, and each group of sampling data includes total load data of the target power system and total power generation data of a new energy generator set; The extraction module is used to extract abnormal sample points from the power grid operation scenario sample set using an isolation forest algorithm to obtain extreme flexibility shortage scenarios.
10. An electronic device comprising: processor; as well as A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.