LHS-GRU-based wind and light scene generation method
Through the landscape scene generation method based on LHS-GRU, the problems of insufficient description of short-term data correlation and difficult to obtain atypical scenarios in the prior art are solved, and the set of landscape scenes that meet the real output situation is realized, which improves the accuracy of grid scheduling.
Patent Information
- Application Number
- CN202411872005.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In the existing landscape scene generation technology, statistical methods are difficult to accurately show the correlation between short-term data, resulting in the power points between different moments of the generated scene concentration that do not conform to the real output situation; time series methods are difficult to obtain atypical output scenarios, making it difficult to obtain atypical scenarios.
The landscape scene generation method based on LHS-GRU is adopted, and the initial scene set is generated by establishing a wind light output probability model, Latin hypercube sampling is performed to generate the initial scene set, and the output correlation between wind power and photovoltaic moments is learned by using the GRU model to learn the output correlation between wind power and photovoltaic moments, and the scene set is corrected to enhance the correlation between different moments.
The ability to generate typical and extreme daily scenarios is realized, ensuring that the scene set can accurately reflect the output of new energy, and improving the accuracy and robustness of power grid scheduling.
Smart Images

Figure CN119940086A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, in particular to a new energy grid connection technology, and specifically to a wind-solar scene generation method based on LHS-GRU. Background Art
[0002] Although a large number of research papers on renewable energy output prediction have emerged in recent years, few people have studied a universal algorithm to improve prediction accuracy. Large-scale renewable energy grid connection will bring a greater impact on the power grid, and conventional deterministic optimization scheduling methods are no longer able to adapt to large-scale renewable energy grid connection.
[0003] Scenario analysis is one of the methods suitable for dealing with the uncertainty of renewable energy. By analyzing the historical data of renewable energy output, a probability model of output is established, and a large number of random scenario sets that conform to historical data are generated, which are applied to the robust optimization and random optimization of power grid dispatching. Scenario analysis converts the uncertainty of renewable energy output into multiple deterministic scenario sets for calculation. For this reason, scenario analysis has been widely used and developed in uncertainty analysis.
[0004] There are two main methods to generate scenario sets in scenario analysis, namely statistical method and time series method. Statistical method refers to the probability modeling of historical output data of new energy, obtaining the probability density function of the model, and randomly sampling the model, and randomly combining the sampling results to form a scenario set. The time series method is mainly based on historical output data, and characterizes the changing trend of time series data by analyzing the historical time data series, and generates future scenario sets by analyzing the changing trend data of time series.
[0005] In the existing technology, the statistical method adopted in the "Non-parametric Kernel Density Estimation Model of Photovoltaic Power Output Power" provided by Yan Wei, Ren Zhouyang, Zhao Xia, et al. has a good description of the statistical distribution laws of a large amount of long-term data, and also covers the description of the output distribution under extreme meteorological conditions, but lacks a description of the correlation between short-term data (between intraday data); the time series method adopted in the "Bidirectional Optimization Technology for Generating Wind Power Time Series Scenarios" provided by Li Jinghua, Sun Haishun, Wen Jinyu, et al. can reflect the correlation between short-term data by analyzing the trends and relationships between historical data. However, since the amount of typical day data in historical data is far greater than that of extreme day data, this will result in the data generated by the time series method being able to fit the situation on typical days well, but difficult to accurately fit the situation on extreme days. Summary of the invention
[0006] The objective of the present invention is to provide a method for generating wind-solar scenarios based on LHS-GRU to solve the technical problems in the existing wind-solar scenario generation technology. When using the statistical method, it is difficult to accurately represent the correlation between short-term data, resulting in the power points between different moments in the generated scenario set not conforming to the actual output situation. When using the time series method, it is difficult to obtain atypical output scenarios, resulting in the difficulty in obtaining atypical scenarios.
[0007] To solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0008] A method for generating wind-solar scenarios based on LHS-GRU, comprising the following steps:
[0009] Step 1: Establish a wind-solar output probability model based on historical wind-solar data, and perform Latin hypercube sampling according to the obtained wind-solar output probability model to obtain an initial wind-solar scenario set;
[0010] Step 2: Use a neural network model to learn the output correlation between each moment of wind power and photovoltaic power respectively, and establish correlation limitation models for wind power and photovoltaic power respectively;
[0011] Step 3: Import the initial scenario set into the model to generate a corrected scenario set, that is, the corrected scenario set.
[0012] In Step 1, it specifically includes the following sub-steps:
[0013] Step 1-1: Build a wind-solar output probability model;
[0014] Step 1-2: Determine the bandwidth of the non-parametric kernel density estimation of wind-solar;
[0015] Step 1-3: Generate a wind-solar scenario set based on Latin hypercube sampling.
[0016] In Step 1-1, specifically:
[0017] Assume that the output situation P of new energy has a probability density function f(p), then assume that F(p) is the distribution function of the overall output P of new energy, and its samples P1, P2,..., P n The empirical distribution function is:
[0018]
[0019] where n refers to the number of samples; P i refers to the sample data; I(P i <p) refers to the indicator function of the set P;
[0020]
[0021] h refers to the size of the window width, so from equations (12) and (13), we can derive a natural estimate of the density function f(p):
[0022]
[0023] Approximately:
[0024]
[0025] Let K(·)=2 -1 I(·), and then we have:
[0026]
[0027] Formula (5) is the probability model of wind and solar power output, and can also be called the kernel density estimation of f(p), where Refers to the sample P i The increase in the density function when it falls within the interval (ph, p+h), and K(·) is called its corresponding weight function, that is, the kernel function, h n Refers to the window width for n samples.
[0028] In step 1-2, specifically:
[0029] First, the integral squared error (ISE) is used as the loss function, and the expression is:
[0030]
[0031] For formula (17), consider The relevant terms are sufficient, and formula (17) can be transformed into:
[0032]
[0033] in, It refers to the estimate after removing the i-th data point, specifically:
[0034]
[0035] For the convenience of calculation, (n-1) in formula (19) is approximated as n, and a loss function equivalent to formula (17) can be obtained:
[0036]
[0037] Its optimal bandwidth is expressed as h opt =argminM1(h n ).
[0038] In steps 1-3, specifically:
[0039] (1) First, for each moment t of wind and solar power output, where t = 1, 2, ..., 96, kernel density estimation is performed to obtain the output probability density estimation function f at moment t. t (p);
[0040] (2) Calculate the cumulative probability density function F according to the kernel density estimation function obtained at each moment t (P), and the cumulative probability density function F t (P) is divided into N t equal and non-overlapping intervals, where the length of each interval is 1 / N t ;
[0041] (3) According to the probability sub-intervals obtained by division, a random sampling is performed in each probability sub-interval, that is:
[0042]
[0043] Where i refers to the i-th subinterval, i = 1, 2, ..., N t ;f t,i Refers to the cumulative probability density of the ith subinterval at time t; random refers to a random number between 0 and 1;
[0044] (4) Substitute the obtained value into its inverse function to obtain the Latin hypercube sampling value P of the wind power in the i-th subinterval at time t: t,i , which can be expressed as:
[0045]
[0046] in, Refers to the inverse function of the cumulative probability density function at time t;
[0047] After steps (1)-(4), the sampling of LHS can be completed once;
[0048] The above method is used to sample the probability density function of wind power output and the probability density function of photovoltaic output at each moment to generate data of the wind power initial scenario set and the photovoltaic initial scenario set.
[0049] In step 2, the revised model established includes:
[0050] Establish a GRU correction model for wind power output;
[0051] Establish a GRU correction model for photovoltaic output.
[0052] When establishing the GRU correction model for wind power output, it includes:
[0053] (1) The wind power output sample data W is divided horizontally from the left to the right of the timeline. One of the sample data has k power points, which can be divided into wind power output sample data W(t, t+k / 16), wind power output sample data W(t, t+k / 8), wind power output sample data W(t, t+k / 4), wind power output sample data W(t, t+k / 2), and wind power output sample data W(t, t+k), which are the training sets of the wind power correction model GRU3-3, wind power correction model GRU6-6, wind power correction model GRU12-12, wind power correction model GRU24-24, and wind power correction model GRU48-48, respectively.
[0054] (2) The wind power output sample data W(t, t+k / 16) is divided into W(t, t+k / 32) and W(t+k / 32+1, t+k / 16) and used as the input and output of the wind power correction model GRU3-3 for training respectively;
[0055] (3) The wind power output sample data W(t, t+k / 8) is divided into wind power output sample data W(t, t+k / 16) and wind power output sample data W(t+k / 16+1, t+k / 8) and used as the input and output of the wind power correction model GRU6-6 for training respectively;
[0056] (4) The wind power output sample data W(t, t+k / 4) is divided into the wind power output sample data W(t, t+k / 8) and the wind power output sample data W(t+k / 8+1, t+k / 4), which are used as the input and output of the wind power correction model GRU12-12 for training respectively;
[0057] (5) Divide the wind power output sample data W(t, t+k / 2) into wind power output sample data W(t, t+k / 4) and wind power output sample data W(t+k / 4+1, t+k / 2), which are used as the input and output of the wind power correction model GRU24-24 for training respectively;
[0058] (6) The wind power output sample data W(t, t+k) is divided into the wind power output sample data W(t, t+k / 2) and the wind power output sample data W(t+k / 2+1, t+k), which are used as the input and output of the wind power correction model GRU48-48 for training respectively;
[0059] When establishing the GRU correction model for photovoltaic output, it includes:
[0060] (1) The photovoltaic output sample data V is divided horizontally from the middle of the timeline to both sides. One sample data has k power points, which can be divided into photovoltaic output sample data V(l-7*k / 96,l), photovoltaic output sample data V(l-3*k / 96,l+4*k / 96), photovoltaic output sample data V(l-19*k / 96,l+4*k / 96), photovoltaic output sample data V(l-7*k / 96,l+16*k / 96), photovoltaic The output sample data V(l-33*k / 96,l+16*k / 96) and photovoltaic output sample data V(l-19*k / 96,l+30*k / 96) are the training sets of 6 correction models, namely, photovoltaic correction model GRU4-4L, photovoltaic correction model GRU4-4R, photovoltaic correction model GRU12-12L, photovoltaic correction model GRU12-12R, photovoltaic correction model GRU36-14L, and photovoltaic correction model GRU36-14R;
[0061] (2) The photovoltaic output sample data V(l-7*k / 96,l) can be divided into photovoltaic output sample data V(l-3*k / 96,l) and photovoltaic output sample data V(l-7*k / 96,l-4*k / 96), which are used as the input and output of the photovoltaic correction model GRU4-4L for training respectively;
[0062] (3) The photovoltaic output sample data V(l-3*k / 96,l+4*k / 96) can be divided into photovoltaic output sample data V(l-3*k / 96,l) and photovoltaic output sample data V(l+*k / 96,l+4*k / 96), which are used as the input and output of the photovoltaic correction model GRU4-4R for training respectively;
[0063] (4) The photovoltaic output sample data V(l-19*k / 96,l+4*k / 96) can be divided into photovoltaic output sample data V(l-7*k / 96,l+4*k / 96) and photovoltaic output sample data V(l-19*k / 96,l-8*k / 96) which are respectively used as the input and output of the photovoltaic correction model GRU12-12L for training;
[0064] (5) The photovoltaic output sample data V(l-7*k / 96,l+16*k / 96) can be divided into photovoltaic output sample data V(l-7*k / 96,l+4*k / 96) and photovoltaic output sample data V(l+5*k / 96,l+16*k / 96), which are used as the input and output of the photovoltaic correction model GRU12-12R for training respectively;
[0065] (6) The photovoltaic output sample data V(l-33*k / 96,l+16*k / 96) can be divided into photovoltaic output sample data V(l-19*k / 96,l+16*k / 96) and photovoltaic output sample data V(l-33*k / 96,l-18*k / 96) which are respectively used as the input and output of the photovoltaic correction model GRU36-14L for training;
[0066] (7) The photovoltaic output sample data V(l-19*k / 96,l+30*k / 96) can be divided into photovoltaic output sample data V(l-19*k / 96,l+16*k / 96) and photovoltaic output sample data V(l+17*k / 96,l+30*k / 96), which are respectively used as the input and output of the photovoltaic correction model GRU36-14R for training.
[0067] In step 3, the following sub-steps are specifically included:
[0068] Step 3-1: splice the trained wind power correction model GRU3-3, wind power correction model GRU6-6, wind power correction model GRU12-12, wind power correction model GRU24-24, and wind power correction model GRU48-48 in the established GRU correction model of wind power output in chronological order to form a complete wind power correction model, and import the wind power initial scenario set obtained in step 1 into the wind power correction model;
[0069] Step 3-2: Splice the photovoltaic correction model GRU4-4L, photovoltaic correction model GRU4-4R, photovoltaic correction model GRU12-12L, photovoltaic correction model GRU12-12R, photovoltaic correction model GRU36-14L, and photovoltaic correction model GRU36-14R trained in step 2 in the form of expanding from the middle to both sides to form a complete photovoltaic correction model, and import the photovoltaic initial scene set obtained in step 1 into the photovoltaic correction model.
[0070] In step 3-1, the following steps are included:
[0071] Step 3-1-1) splicing the wind power correction model into a new wind power correction model in the form of GRU3-3-GRU6-6-GRU12-12-GRU24-24-GRU 48-48 in chronological order;
[0072] Step 3-1-2) The wind power correction model GRU3-3 generates the values of the next 3a moments within ±m% from the values of the previous 3a moments, and selects the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set, where a is a positive integer and m is a real number;
[0073] Step 3-1-3) The wind power correction model GRU6-6 can generate the values of the next 6a moments within ±m% from the values of the first 6a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set in a non-replacement form as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±5%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set;
[0074] Step 3-1-4) The wind power correction model GRU12-12 can generate the values of the next 12a moments within ±m% from the values of the previous 12a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set in a non-replacement form as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set;
[0075] 3-1-5) The wind power correction model GRU24-24 can generate the values of the next 24a moments within ±m% from the values of the previous 24a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%. When there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%. When there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set;
[0076] 3-1-6) The wind power correction model GRU48-48 can generate the values within ±m% for the next 48a moments from the values of the previous 48a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%. When there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%. When there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set.
[0077] Through the above steps, the revised wind power scenario set can be obtained.
[0078] In step 3-2, the following steps are included:
[0079] Step 3-2-1) splicing the photovoltaic correction model into a new photovoltaic correction model in the form of GRU36-14L-GRU12-12L-GRU4-4L-GRU4-4R-GRU12-12R-GRU36-14R in chronological order;
[0080] Step 3-2-2) The photovoltaic correction model GRU4-4L can generate the values of the left 4b moments within ±m% from the values of the middle 4b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0081] Step 3-2-3) The photovoltaic correction model GRU4-4R can generate the values of the right 4b moments within ±m% from the values of the middle 4b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0082] Step 3-2-4) The photovoltaic correction model GRU12-12L can generate the values of the left 12b moments within ±m% from the values of the middle 12b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0083] Step 3-2-5) The photovoltaic correction model GRU12-12R can generate the values of the 12b moments on the right within ±m% from the values of the middle 12b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0084] Step 3-2-6) The photovoltaic correction model GRU36-14L can generate the values of the left 14b moments within ±m% from the values of the middle 36b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0085] Step 3-2-7) The photovoltaic correction model GRU36-14R can generate the values of the 14b moments on the right within ±m% from the values of the middle 36b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0086] Through the above steps, the corrected photovoltaic scene set can be obtained.
[0087] Compared with the prior art, the present invention has the following technical effects:
[0088] 1) In order to accurately reflect the output of renewable energy on typical days and extreme days, the present invention proposes a method that can simultaneously generate typical day scenes and extreme day scenes, which can ensure the superiority of statistical methods and time series methods while avoiding the shortcomings of both, so that the generated scene set can accurately reflect various situations in the dispatch of wind and solar power systems, and better promote the consumption of renewable energy by the power system;
[0089] 2) The present invention uses kernel density estimation to model the cumulative probability density of wind and solar power output data at 96 moments (one moment every 15 minutes) in the past year, and forms 96 cumulative probability density functions. This method can reconstruct the output probability density model of 96 moments in a year, ensuring that the model can contain both typical day data and extreme day data, thereby ensuring the authenticity of the constructed model;
[0090] 3) The present invention constructs and trains a gated recurrent unit (GRU) model to fit the trend relationship between 96 moments, find the best match between adjacent moments, enhance the correlation between adjacent moments, and thus ensure that the correlation between adjacent moments conforms to the actual wind and solar output curve. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0092] Figure 1 is a flow chart of the present invention;
[0093] Figure 2 It is the GRU forward propagation diagram at time t;
[0094] Figure 3 It is a schematic diagram of the expanded form of the GRU neural network;
[0095] Figure 4 This is a schematic diagram of the GRU model training direction for wind power;
[0096] Figure 5 This is a schematic diagram of the GRU model training direction for photovoltaics;
[0097] Figure 6 A schematic diagram of the BS index comparison between the wind power scenario set generated under event 1 and the real scenario set in 2022;
[0098] Figure 7 Schematic diagram of BS index comparison between the wind power scenario set generated under event 1 and the real scenario set in 2023;
[0099] Figure 8A schematic diagram of the BS index comparison between the wind power scenario set generated under event 2 and the real scenario set in 2022;
[0100] Fig. 9 A schematic diagram of the comparison of BS indicators between the wind power scenario set generated under event 2 and the real scenario set in 2023;
[0101] Fig.10 Schematic diagram of BS index comparison between the PV scenario set generated under event 1 and the real scenario set in 2022;
[0102] Fig.11 Schematic diagram of BS index comparison between the PV scenario set generated under event 1 and the real scenario set in 2023;
[0103] Fig.12 Schematic diagram of BS index comparison between the PV scenario set generated under event 2 and the real scenario set in 2022;
[0104] Fig.13 Schematic diagram of BS index comparison between the photovoltaic scenario set generated under event 2 and the real scenario set in 2023;
[0105] Fig.14 A schematic diagram of the comparison of BS indicators between the wind power scenario set generated under event 3 and the real scenario set in 2022;
[0106] Fig.15 A schematic diagram of BS index comparison between the wind power scenario set generated under event 3 and the real scenario set in 2023;
[0107] Fig.16 A schematic diagram of the BS index comparison between the wind power scenario set generated under event 4 and the real scenario set in 2022;
[0108] Fig.17 A schematic diagram of the BS index comparison between the wind power scenario set generated under event 4 and the real scenario set in 2023;
[0109] Fig.18 A schematic diagram of the BS index comparison between the wind power scenario set generated under event 5 and the real scenario set in 2022;
[0110] Fig.19 A schematic diagram of the BS index comparison between the wind power scenario set generated under event 5 and the real scenario set in 2023;
[0111] Fig. 20 Schematic diagram of BS index comparison between the PV scenario set generated under event 4 and the real scenario set in 2022;
[0112] Fig.21 Schematic diagram of BS index comparison obtained by comparing the photovoltaic scenario set generated under Event 4 with the real scenario set in 2023;
[0113] Fig. 22 Schematic diagram of BS index comparison obtained by comparing the photovoltaic scenario set generated under Event 5 with the real scenario set in 2022;
[0114] Fig.23 Schematic diagram of BS index comparison obtained by comparing the photovoltaic scenario set generated under Event 5 with the real scenario set in 2023. Detailed implementation method
[0115] A method for generating wind-solar scenarios based on LHS-GRU, comprising the following steps:
[0116] Step 1: Establish a wind-solar output probability model based on historical wind-solar data, and perform Latin hypercube sampling according to the obtained wind-solar output probability model to obtain an initial wind-solar scenario set;
[0117] Step 2: Use a neural network model to learn the output correlation between each moment of wind power and photovoltaic power respectively, and establish a correlation limitation model for wind power and photovoltaic power respectively;
[0118] Step 3: Import the initial scenario set into the model to generate a corrected scenario set, that is, a corrected scenario set.
[0119] In Step 1, it specifically includes the following sub-steps:
[0120] Step 1-1: Model the wind-solar output probability model;
[0121] Step 1-2: Determine the bandwidth of the non-parametric kernel density estimation of wind-solar;
[0122] Step 1-3: Generate a wind-solar scenario set based on Latin hypercube sampling.
[0123] In Step 1-1, specifically:
[0124] Let the output situation P of new energy have a distribution density function f(p), then let F(p) be the distribution function of the overall new energy output P, and its samples P1, P2,..., P n The empirical distribution function of is:
[0125]
[0126] where n refers to the number of samples; P i refers to the sample data; I(P i <p) refers to the indicator function of the set P;
[0127]
[0128] h refers to the size of the window width, so from equations (12) and (13), we can derive a natural estimate of the density function f(p):
[0129]
[0130] Approximately:
[0131]
[0132] Let K(·)=2 -1 I(·), and then we have:
[0133]
[0134] Formula (16) is the probability model of wind and solar power output, and Formula (16) can also be called the kernel density estimation of f(p), where Refers to the sample P i The increase in the density function when it falls within the interval (ph, p+h), and K(·) is called its corresponding weight function, that is, the kernel function, h n Refers to the window width for n samples.
[0135] In step 1-2, specifically:
[0136] First, the integral squared error (ISE) is used as the loss function, and the expression is:
[0137]
[0138] For formula (17), consider The relevant terms are sufficient, and formula (17) can be transformed into:
[0139]
[0140] in, It refers to the estimate after removing the i-th data point, specifically:
[0141]
[0142] For the convenience of calculation, (n-1) in formula (19) is approximated as n, and a loss function equivalent to formula (17) can be obtained:
[0143]
[0144] Its optimal bandwidth is expressed as h opt=argminM1(h n ).
[0145] In kernel density estimation, it is necessary to select a kernel function and determine the optimal bandwidth, wherein the optimal bandwidth determines the fitting effect of the kernel density estimation. If the bandwidth is too large, the fitting curve will be too smooth and cannot reflect the detailed characteristics of the data; if the bandwidth is too small, the fitting curve will contain too much noise and also cannot accurately reflect the characteristics of the data. The methods for determining the optimal bandwidth mainly include the reference standard distribution method, the thumb rule and the cross-validation method. Among them, cross-validation can effectively avoid the problem of over-fitting or under-fitting of the probability density function in kernel density estimation. Therefore, the present invention uses a cross-validation method to determine the optimal bandwidth.
[0146] In steps 1-3, specifically:
[0147] (1) First, for each moment t of wind and solar power output, where t = 1, 2, ..., 96, kernel density estimation is performed to obtain f t (p);
[0148] (2) Calculate the cumulative probability density function F according to the kernel density estimation function obtained at each moment t (P), and the cumulative probability density function F t (P) is divided into N t equal and non-overlapping intervals, where the length of each interval is 1 / N t ;
[0149] (3) According to the probability sub-intervals obtained by division, a random sampling is performed in each probability sub-interval, that is:
[0150]
[0151] Where i refers to the i-th subinterval, i = 1, 2, ..., N t ;f t,i Refers to the cumulative probability density of the ith subinterval at time t; random refers to a random number between 0 and 1;
[0152] (4) Substitute the obtained value into its inverse function to obtain the Latin hypercube sampling value P of the wind power in the i-th subinterval at time t: t,i , which can be expressed as:
[0153]
[0154] in, Refers to the inverse function of the cumulative probability density function at time t;
[0155] After steps (1)-(4), the sampling of LHS can be completed once;
[0156] The above method is used to sample the probability density function of wind power output and the probability density function of photovoltaic output at each moment to generate data of the wind power initial scenario set and the photovoltaic initial scenario set.
[0157] Latin Hypercube Sampling (LHS) is developed from Monte Carlo sampling. Monte Carlo sampling refers to a method of randomly sampling from a probability distribution. This method can generate a large number of random samples that conform to the sample distribution. The disadvantage of this method is that within the distribution range, random sampling will cause the sampling results to cluster. At the same time, when the number of samplings is small, some low-probability results cannot be accurately reflected. However, in the wind and solar scene, some low-probability scenes, that is, extreme scenes, are extremely important in the power system. The Latin Hypercube Sampling method can reflect the low-probability results, thereby ensuring that the sampling results can contain both low-probability results and high-probability results. LHS divides the cumulative probability density from 0 to 1.0 into multiple non-overlapping sub-intervals through the idea of stratified dimension fracturing, and uniformly randomly samples in different sub-intervals.
[0158] In the above steps, the kernel density estimation method is used to perform probability modeling on the historical data of each moment of the wind and solar samples, and the probability density function of each moment is sampled by LHS to generate the initial scene data of the wind and solar. However, these generated data have no correlation between each moment. If these data are randomly combined, the correlation between the data will be weak, which will cause a large deviation between the generated scene data and the actual scene data, and thus cannot reflect the real wind and solar output scene. For this reason, this paper uses the gated recurrent unit (GRU) model in the recurrent neural network (RNN) model to correct the generated initial scene set, that is, to enhance the correlation between different moments, so that the final generated scene set can reflect the real wind and solar output.
[0159] GRU is a type of RNN. GRU combines the forget gate and the input gate into an update gate. The structure of GRU is simpler than that of long short-term memory network, but its effect is almost the same as LSTM and it is relatively easy to train.
[0160] like Figure 2 As shown, r t Represents the reset gate. The function of the reset gate is to combine the input at this moment with the input at the previous moment. Its expression is:
[0161] r t =σ(W r ·[ht-1 ,x t ])
[0162] z t Represents the update gate, which is used to control how much information the current moment and the previous moment need to retain for the next moment. Its expression is:
[0163] z t =σ(W z ·[h t-1 ,x t ])
[0164] represents the candidate hidden state at time t, and the expression is:
[0165]
[0166] Among them, h t-1 It represents the hidden state at time t-1, and contains all the data information before time t, which acts as the memory of the neural network; h t It indicates the hidden state that needs to be transferred to time t+1, and its expression is:
[0167]
[0168] GRU can not only expand horizontally according to the length of the time series, but also expand vertically, forming a deep GRU network, such as Figure 3 As shown in Figure 3, the GRU's fitting effect on the data can be further enhanced by increasing the number of network layers.
[0169] In scenario generation, random combinations are generally performed after generation to form a new scenario set. However, this method has large errors that make the generated scenario set unable to accurately reflect the actual wind and solar power output scenarios, making the generated scenarios difficult to apply to the optimal scheduling of the power grid.
[0170] The present invention learns the correlation between different moments in the wind and solar scenes from historical data based on the principle of GRU, and then corrects the generated initial wind and solar scene set to a scene set that meets historical expectations. The present invention gradually generates a complete wind and solar output scene set by training multiple GRU neural network models. For wind power, first, the wind power of the first six moments (00:00-1:15) is used to train the GRU model, that is, the possible values of the wind power of the last three moments are limited according to the wind power of the first three moments. Secondly, the wind power of the first twelve moments (00:00-3:00) is used to train the GRU model, that is, the wind power of the last six moments is limited according to the wind power of the first six moments, and so on. Finally, 5 GRU models are trained for the recombination of the initial scene set of wind power. Its training direction is as follows: Figure 4 shown.
[0171] For the photovoltaic output scenario, since there is a boundary for photovoltaic output, that is, photovoltaic output does not work at night, there are boundary conditions for photovoltaic output during the day, but the photovoltaic output boundary varies with time. The general method is to define a fixed boundary stipulated by humans, but this does not conform to the laws of nature. Based on this, when generating photovoltaic scenarios, this paper expands to both sides from 11:30-12:15, and uses the GRU model to learn and analyze the trend of historical data, so as to obtain a photovoltaic boundary condition that conforms to the laws of nature. Its training direction is as follows: Figure 5 shown.
[0172] In step 2, the revised model established includes:
[0173] Establish a GRU correction model for wind power output;
[0174] Establish a GRU correction model for photovoltaic output.
[0175] When establishing the GRU correction model for wind power output, it includes:
[0176] (1) The wind power output sample data W is divided horizontally from the left to the right of the timeline. One of the sample data has k power points, which can be divided into wind power output sample data W(t, t+k / 16), wind power output sample data W(t, t+k / 8), wind power output sample data W(t, t+k / 4), wind power output sample data W(t, t+k / 2), and wind power output sample data W(t, t+k), which are the training sets of the wind power correction model GRU3-3, wind power correction model GRU6-6, wind power correction model GRU12-12, wind power correction model GRU24-24, and wind power correction model GRU48-48, respectively.
[0177] (2) The wind power output sample data W(t, t+k / 16) is divided into W(t, t+k / 32) and W(t+k / 32+1, t+k / 16) and used as the input and output of the wind power correction model GRU3-3 for training respectively;
[0178] (3) The wind power output sample data W(t, t+k / 8) is divided into wind power output sample data W(t, t+k / 16) and wind power output sample data W(t+k / 16+1, t+k / 8) and used as the input and output of the wind power correction model GRU6-6 for training respectively;
[0179] (4) The wind power output sample data W(t, t+k / 4) is divided into the wind power output sample data W(t, t+k / 8) and the wind power output sample data W(t+k / 8+1, t+k / 4), which are used as the input and output of the wind power correction model GRU12-12 for training respectively;
[0180] (5) Divide the wind power output sample data W(t, t+k / 2) into wind power output sample data W(t, t+k / 4) and wind power output sample data W(t+k / 4+1, t+k / 2), which are used as the input and output of the wind power correction model GRU24-24 for training respectively;
[0181] (6) The wind power output sample data W(t, t+k) is divided into the wind power output sample data W(t, t+k / 2) and the wind power output sample data W(t+k / 2+1, t+k), which are used as the input and output of the wind power correction model GRU48-48 for training respectively;
[0182] When establishing the GRU correction model for photovoltaic output, it includes:
[0183] (1) The photovoltaic output sample data V is divided horizontally from the middle of the timeline to both sides. One sample data has k power points, which can be divided into photovoltaic output sample data V(l-7*k / 96,l), photovoltaic output sample data V(l-3*k / 96,l+4*k / 96), photovoltaic output sample data V(l-19*k / 96,l+4*k / 96), photovoltaic output sample data V(l-7*k / 96,l+16*k / 96), photovoltaic The output sample data V(l-33*k / 96,l+16*k / 96) and photovoltaic output sample data V(l-19*k / 96,l+30*k / 96) are the training sets of 6 correction models, namely, photovoltaic correction model GRU4-4L, photovoltaic correction model GRU4-4R, photovoltaic correction model GRU12-12L, photovoltaic correction model GRU12-12R, photovoltaic correction model GRU36-14L, and photovoltaic correction model GRU36-14R;
[0184] (2) The photovoltaic output sample data V(l-7*k / 96,l) can be divided into photovoltaic output sample data V(l-3*k / 96,l) and photovoltaic output sample data V(l-7*k / 96,l-4*k / 96), which are used as the input and output of the photovoltaic correction model GRU4-4L for training respectively;
[0185] (3) The photovoltaic output sample data V(l-3*k / 96,l+4*k / 96) can be divided into photovoltaic output sample data V(l-3*k / 96,l) and photovoltaic output sample data V(l+*k / 96,l+4*k / 96), which are used as the input and output of the photovoltaic correction model GRU4-4R for training respectively;
[0186] (4) The photovoltaic output sample data V(l-19*k / 96,l+4*k / 96) can be divided into photovoltaic output sample data V(l-7*k / 96,l+4*k / 96) and photovoltaic output sample data V(l-19*k / 96,l-8*k / 96) which are respectively used as the input and output of the photovoltaic correction model GRU12-12L for training;
[0187] (5) The photovoltaic output sample data V(l-7*k / 96,l+16*k / 96) can be divided into photovoltaic output sample data V(l-7*k / 96,l+4*k / 96) and photovoltaic output sample data V(l+5*k / 96,l+16*k / 96), which are used as the input and output of the photovoltaic correction model GRU12-12R for training respectively;
[0188] (6) The photovoltaic output sample data V(l-33*k / 96,l+16*k / 96) can be divided into photovoltaic output sample data V(l-19*k / 96,l+16*k / 96) and photovoltaic output sample data V(l-33*k / 96,l-18*k / 96) which are respectively used as the input and output of the photovoltaic correction model GRU36-14L for training;
[0189] (7) The photovoltaic output sample data V(l-19*k / 96,l+30*k / 96) can be divided into photovoltaic output sample data V(l-19*k / 96,l+16*k / 96) and photovoltaic output sample data V(l+17*k / 96,l+30*k / 96), which are respectively used as the input and output of the photovoltaic correction model GRU36-14R for training.
[0190] In step 3, the following sub-steps are specifically included:
[0191] Step 3-1: splice the trained wind power correction model GRU3-3, wind power correction model GRU6-6, wind power correction model GRU12-12, wind power correction model GRU24-24, and wind power correction model GRU48-48 in the established GRU correction model of wind power output in chronological order to form a complete wind power correction model, and import the wind power initial scenario set obtained in step 1 into the wind power correction model;
[0192] Step 3-2: Splice the photovoltaic correction model GRU4-4L, photovoltaic correction model GRU4-4R, photovoltaic correction model GRU12-12L, photovoltaic correction model GRU12-12R, photovoltaic correction model GRU36-14L, and photovoltaic correction model GRU36-14R trained in step 2 in the form of expanding from the middle to both sides to form a complete photovoltaic correction model, and import the photovoltaic initial scene set obtained in step 1 into the photovoltaic correction model.
[0193] In step 3-1, the following steps are included:
[0194] Step 3-1-1) splicing the wind power correction model into a new wind power correction model in the form of GRU3-3-GRU6-6-GRU12-12-GRU24-24-GRU 48-48 in chronological order;
[0195] Step 3-1-2) The wind power correction model GRU3-3 generates the values of the next 3a moments within ±m% from the values of the previous 3a moments, and selects the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set, where a is a positive integer; m is a real number;
[0196] Step 3-1-3) The wind power correction model GRU6-6 can generate the values of the next 6a moments within ±m% from the values of the first 6a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set in a non-replacement form as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±5%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set;
[0197] Step 3-1-4) The wind power correction model GRU12-12 can generate the values of the next 12a moments within ±m% from the values of the previous 12a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set in a non-replacement form as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set;
[0198] 3-1-5) The wind power correction model GRU24-24 can generate the values of the next 24a moments within ±m% from the values of the previous 24a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%. When there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%. When there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set;
[0199] 3-1-6) The wind power correction model GRU48-48 can generate the values within ±m% for the next 48a moments from the values of the previous 48a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%. When there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%. When there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set.
[0200] Through the above steps, the revised wind power scenario set can be obtained.
[0201] In step 3-2, the following steps are included:
[0202] Step 3-2-1) splicing the photovoltaic correction model into a new photovoltaic correction model in the form of GRU36-14L-GRU12-12L-GRU4-4L-GRU4-4R-GRU12-12R-GRU36-14R in chronological order;
[0203] Step 3-2-2) The photovoltaic correction model GRU4-4L can generate the values of the left 4b moments within ±m% from the values of the middle 4b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0204] Step 3-2-3) The photovoltaic correction model GRU4-4R can generate the values of the right 4b moments within ±m% from the values of the middle 4b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0205] Step 3-2-4) The photovoltaic correction model GRU12-12L can generate the values of the left 12b moments within ±m% from the values of the middle 12b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0206] Step 3-2-5) The photovoltaic correction model GRU12-12R can generate the values of the 12b moments on the right within ±m% from the values of the middle 12b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0207] Step 3-2-6) The photovoltaic correction model GRU36-14L can generate the values of the left 14b moments within ±m% from the values of the middle 36b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0208] Step 3-2-7) The photovoltaic correction model GRU36-14R can generate the values of the 14b moments on the right within ±m% from the values of the middle 36b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set;
[0209] Through the above steps, the corrected photovoltaic scene set can be obtained.
[0210] In order to verify the effectiveness of the proposed method, the three indicators of average daily output (Average Daily Output, ADO), energy score (Energy Score, ES) and Brier Score (Brier Score, BS) are used to evaluate the scenario set generated in this paper.
[0211] Among them, the calculation method of ADO indicator and ES indicator is as follows:
[0212]
[0213] Where J is the number of scene sets, t is the time, P i,t represents the output at time t in scene i, z is a specific scene, represents the jth scene, ||·||2 is the L2 norm, and I represents the actual number of scenes in a year.
[0214] The BS index is also known as the scenario evaluation method based on diagnostic events, which focuses on the details of the scenario set;
[0215] The specific calculation process of the BS indicator is as follows: first, define the diagnostic events; second, calculate the occurrence probability of each diagnostic event in the generated scenario set and the actual scenario respectively; finally, calculate the probability difference between the actual scenario and the generated scenario set under different diagnostic events. It can be seen that the BS indicator is also a negative indicator.
[0216] Based on this, the present invention defines 5 diagnostic events:
[0217] (1) Event 1: The output power fluctuation within 1 hour is greater than 10% of the capacity.
[0218] (2) Event 2: the output power is continuously greater than 30% of the capacity for 4 hours.
[0219] (3) Event 3: The output power fluctuation within 1 hour is greater than 30% of the capacity.
[0220] (4) Event 4: the output power is continuously greater than 60% of the capacity for 4 hours.
[0221] (5) Event 5: the output power is continuously less than 10% of the capacity for 4 hours.
[0222] Result analysis:
[0223] ADO indicator analysis:
[0224] Table 1 shows the ADO indicators of the four schemes in wind power scene generation and photovoltaic scene generation. Compared with the real scene set, it can be seen from the table that Scheme 1 and Scheme 3 are close to the ADO indicators of the real scene in both wind power scene generation and photovoltaic scene generation, while Scheme 2 performs poorly, and Scheme 4 performs poorly in wind power scene generation but shows relatively excellent results in photovoltaic.
[0225] Table 1 ADO indicators under different scenario generation methods
[0226]
[0227] It can be seen from Table 1 that the scenario sets generated by Scheme 1, Scheme 3 and Scheme 4 are better than the scenario set generated by Scheme 2. The reason is that Scheme 2 only uses the correlation coefficient and regression analysis method to generate the scenario set, and the generated scenario set does not conform to the probability distribution of the real scenario set, resulting in its ADO index seriously deviating from the ADO index of the real scenario set; while the initial scenario sets obtained by Scheme 1, Scheme 3 and Scheme 4 are all obtained by LHS sampling from the cumulative probability density function of the original data to conform to the probability distribution of the real scenario set, so the ADO indicators of Scheme 1, Scheme 3 and Scheme 4 are closer to the ADO index of the real scenario set.
[0228] ES indicator analysis:
[0229] Table 2 shows the ES indicators obtained by comparing the four schemes when generating wind power and photovoltaic scenarios with the actual scenarios in 2022. The relevant values are normalized before calculation to obtain the ES indicators. As can be seen from the table, when generating wind power and photovoltaic scenarios, Schemes 1, 3 and 4 have little difference from the scenarios in 2022, and can more accurately reflect the output scenarios of historical wind power and photovoltaics; while the ES indicator of Scheme 2 shows that it cannot accurately reflect the output scenarios of historical wind power and photovoltaics. In addition, the ES indicator of Scheme 3 shows that compared with the other three schemes, both the generated wind power scenario set and the photovoltaic scenario set are closer to the actual scenario set in 2022.
[0230] Table 2 ES indicators calculated with real scenarios in 2022
[0231]
[0232] In addition to being able to accurately reflect the historical output scenario, the generated scenario also needs to be able to predict the future output scenario to a certain extent. Therefore, this paper uses the real scenario set of 2023 to compare with the generated scenario set. As shown in Table 3, the wind power scenario generated by Scheme 3 is closer to the real scenario, and the wind power scenarios generated by Schemes 1 and 4 are better than Scheme 2 and weaker than Scheme 3. In terms of photovoltaic scenario generation, the scenarios generated by the four schemes are relatively close to the real photovoltaic scenario, among which Scheme 2 is better than the other three schemes, and Scheme 3 is better than Scheme 1 and Scheme 4.
[0233] Table 3 ES indicators calculated with real scenarios in 2023
[0234]
[0235] According to the above analysis, among the four schemes, the scene set generated by Scheme 3 is better than the other three schemes in general. The scene sets generated by Schemes 1 and 4 are weaker than Scheme 3 but better than Scheme 2.
[0236] As can be seen from Tables 2 and 3, Scheme 3 is more superior. This is because the ES indicator calculates the difference between each generated scene and the real scene at the same time. Since the scene sets obtained by Schemes 1 and 3 are obtained through LHS sampling, this can keep the output probability density of the scene set consistent with the real scene set. Scheme 2 determines the output value at each moment through the correlation coefficient, which will make the scenes it generates have a strong linear relationship between different moments, while the linear relationship of the real scene is not strong, which makes the output probability density of the scene set generated by Scheme 2 not consistent with the real scene; Schemes 3 and 4 can be better than Scheme 2 (although they perform generally in photovoltaic scene generation, there is little difference between the four schemes). This is because Schemes 3 and 4 can fit the output trend of the real scene through the GRU machine learning model, and the GRU machine learning model has the ability to fit nonlinear relationships, which can make the scene sets it generates fit the real scene as much as possible.
[0237] BS indicator analysis:
[0238] Figure 6 , Figure 7 , Figure 8 , Fig. 9 , Fig.10 , Fig.11 , Fig.12 and Fig.13 The BS index diagrams calculated by comparing the generated wind power and photovoltaic scenarios with the real scenario sets in 2022 and 2023 for their typical events are shown in the figure. It can be seen from the figure that whether it is the fitting of the 22-year scenario or the fitting of the 23-year scenario, Scheme 3 is better than the other three schemes.
[0239] Specifically, in the case of event 1, whether it is the generated wind scene set or the photovoltaic scene set, the BS index obtained by scheme 1 is significantly higher than that of the other three schemes. This is because scheme 3 adopts a random combination method, which leads to no correlation between the power values before and after the moment, and then the values of adjacent moments have a large deviation, which causes the BS value to rise. At the same time, according to the index diagram of comprehensive event 1, the wind power scene set generated by scheme 3 is closer to the real scene set. In the case of event 2, for the generated wind power scene set, scheme 2 is the least close to the real scene set, followed by scheme 1, scheme 3 is the closest to the real scene set, and scheme 4 is between scheme 1 and scheme 2. In the case of event 2, for the generated photovoltaic scene set, schemes 1 and 2 are the least close to the real scene set, while schemes 3 and 4 are the closest to the real scene set compared with schemes 1 and 2. In general, the BS values obtained by schemes 1 and 2 are significantly higher than those of the other two schemes. For Scheme 1, the random combination between adjacent moments in Scheme 1 makes it difficult to maintain a certain power continuously, which makes the probability of continuous power much lower than the probability of occurrence in the real scene; for Scheme 2, Scheme 2 strictly selects the power values of adjacent moments according to the linear relationship between the regression equations, so that there is no certain randomness between adjacent moments, resulting in an increase in the probability of maintaining the power within a certain range and causing an increase in the BS value; at the same time, since Schemes 3 and 4 use the GRU machine learning model, they can fit some nonlinear situations in the scene set well, making the scene set they generate more in line with the actual scene, so the BS values obtained by Schemes 3 and 4 are smaller than those of Schemes 1 and 2.
[0240] Fig.14 , Fig.15 , Fig.16 , Fig.17 , Fig.18 , Fig.19 , Fig. 20 , Fig.21 , Fig. 22 and Fig.23 The BS indicator diagram under extreme events is shown in Figure 1. Since photovoltaic power itself has a very clear volatility (low output at night, early morning and dusk, high output at noon), the photovoltaic scenario does not perform BS calculation for event 3. From the figure, we can see that the BS value of the wind power scenario in Scheme 1 under event 3 is much higher than the BS values of other scenarios, while the BS values of the other three scenarios are at a lower level. In event 4, for the generated wind power scenario, Figure 8From the above, Scheme 2 is the least close to the real scene set, followed by Scheme 1 and Scheme 4, and Scheme 3 is the closest to the real scene set. Among them, Scheme 1 overlaps with Scheme 4. The reason is that event 4 does not occur in the scenes generated by Schemes 1 and 4, which makes the obtained BS value the probability value of event 4 occurring in the real scene set. For the generated photovoltaic scenes, the BS values obtained by Schemes 1 and 2 are higher than those of Schemes 3 and 4, which shows that Schemes 3 and 4 are closer to the real scene set. In event 5, the BS value obtained by the scene set generated by Scheme 3 is lower than that of other schemes, especially the wind power scene set generated by it is closer to the real scene; at the same time, when evaluating the generated photovoltaic scenes based on event 5, it can be found that Schemes 1 and 2 present a double peak feature at the beginning and end. This is because Scheme 1 performs a random combination and does not consider the natural process of photovoltaic at the beginning and end, that is, the process of gradually approaching the state of 0 power at the beginning and end should be; Scheme 2 presents a double peak feature because its directionality is not considered when performing linear regression, that is, the photovoltaic power should be gradually increasing in the morning period and gradually decreasing in the afternoon period. The scenario generation methods of Scheme 1 and Scheme 2 will result in a phenomenon that the power of photovoltaic power generation continuously decreases in the morning and continuously increases in the afternoon, which violates the laws of nature.
[0241] According to the analysis results, it can be found that the BS index of scheme 3 is better than the other three schemes. The reason is that the GRU correction model of scheme 3 provides redundancy for the connection between different moments, which allows the connection between adjacent moments to no longer be a fixed value, but allows the value between adjacent moments to fluctuate within a certain range. This fluctuation can be expected or unexpected. It is this fluctuation that allows the generated scene set to be diverse and can generate some extreme scenes that are allowed to appear in reality.
Claims
1. A scenery scene generation method based on LHS-GRU, characterized in that: The following steps are involved: Step 1: Establish a wind-solar output probability model based on historical wind-solar data, and perform Latin hypercube sampling based on the obtained wind-solar output probability model to obtain a wind-solar initial scene set; Step 2: Use the neural network model to learn the output correlation between wind power and photovoltaic power at each time, and establish the correlation limitation model of wind power and photovoltaic power respectively; Step 3: Import the initial scene set into the model to generate a revised scene set, also known as the revised scene set.
2. The method according to claim 1, characterized in that In step 1, the following sub-steps are specifically included: Step 1-1: Model the wind and solar power output probability model; Step 1-2: Determine the bandwidth of the non-parametric kernel density estimation of wind and solar power; Step 1-3: Generate a scenery scene set based on Latin hypercube sampling.
3. The method according to claim 2, characterized in that In step 1-1, specifically: Assume that the output of new energy P has a distribution density function f(p), then let F(p) be the distribution function of the total output of new energy P, and its samples P1, P2, ..., P n The empirical distribution function of is: where n refers to the number of samples; P i refers to the sample data; I(P i <p) refers to the indicator function of the set P; h refers to the size of the window width, so from equations (12) and (13), we can derive a natural estimate of the density function f(p): Approximately: Let K(·)=2 -1 I(·), and then we have: Formula (5) is the probability model of wind and solar power output, and can also be called the kernel density estimation of f(p), where Refers to the sample P i The increase in the density function when it falls within the interval (ph, p+h), and K(·) is called its corresponding weight function, that is, the kernel function, h n Refers to the window width for n samples.
4. The method according to claim 2, characterized in that: In step 1-2, specifically: First, the integrated square error ISE is used as the loss function, and the expression is: For formula (17), consider The relevant terms are sufficient, and formula (17) can be transformed into: in, It refers to the estimate after removing the i-th data point, specifically: For the convenience of calculation, (n-1) in formula (19) is approximated as n, and a loss function equivalent to formula (17) can be obtained: Its optimal bandwidth is expressed as h opt =argminM1(h n ).
5. The method according to claim 2, characterized in that: In steps 1-3, specifically: (1) First, for each moment t of wind and solar power output, where t = 1, 2, ..., 96, kernel density estimation is performed to obtain the output probability density estimation function f at moment t. t (p); (2) Calculate the cumulative probability density function F according to the kernel density estimation function obtained at each moment t (P), and the cumulative probability density function F t (P) is divided into N t equal and non-overlapping intervals, where the length of each interval is 1 / N t ; (3) According to the probability sub-intervals obtained by division, a random sampling is performed in each probability sub-interval, that is: Where i refers to the i-th subinterval, i = 1, 2, ..., N t ;f t,i Refers to the cumulative probability density of the ith subinterval at time t; random refers to a random number between 0 and 1; (4) Substitute the obtained value into its inverse function to obtain the Latin hypercube sampling value P of the wind power in the i-th subinterval at time t: t,i , which can be expressed as: in, Refers to the inverse function of the cumulative probability density function at time t; After steps (1)-(4), the sampling of LHS can be completed once; The above method is used to sample the probability density function of wind power output and the probability density function of photovoltaic output at each moment to generate data of the wind power initial scenario set and the photovoltaic initial scenario set.
6. The method according to any one of claims 1 to 6, characterized in that: In step 2, the revised model established includes: Establish a GRU correction model for wind power output; Establish a GRU correction model for photovoltaic output.
7. The method according to claim 6, characterized in that When establishing the GRU correction model for wind power output, it includes: (1) The wind power output sample data W is divided horizontally from the left to the right of the timeline. One of the sample data has k power points, which can be divided into wind power output sample data W(t, t+k / 16), wind power output sample data W(t, t+k / 8), wind power output sample data W(t, t+k / 4), wind power output sample data W(t, t+k / 2), and wind power output sample data W(t, t+k), which are the training sets of the wind power correction model GRU3-3, wind power correction model GRU6-6, wind power correction model GRU12-12, wind power correction model GRU24-24, and wind power correction model GRU48-48, respectively. (2) The wind power output sample data W(t, t+k / 16) is divided into W(t, t+k / 32) and W(t+k / 32+1, t+k / 16) and used as the input and output of the wind power correction model GRU3-3 for training respectively; (3) The wind power output sample data W(t, t+k / 8) is divided into wind power output sample data W(t, t+k / 16) and wind power output sample data W(t+k / 16+1, t+k / 8) and used as the input and output of the wind power correction model GRU6-6 for training respectively; (4) The wind power output sample data W(t, t+k / 4) is divided into the wind power output sample data W(t, t+k / 8) and the wind power output sample data W(t+k / 8+1, t+k / 4), which are used as the input and output of the wind power correction model GRU12-12 for training respectively; (5) Divide the wind power output sample data W(t, t+k / 2) into wind power output sample data W(t, t+k / 4) and wind power output sample data W(t+k / 4+1, t+k / 2), which are used as the input and output of the wind power correction model GRU24-24 for training respectively; (6) The wind power output sample data W(t, t+k) is divided into the wind power output sample data W(t, t+k / 2) and the wind power output sample data W(t+k / 2+1, t+k), which are used as the input and output of the wind power correction model GRU48-48 for training respectively; When establishing the GRU correction model for photovoltaic output, it includes: (1) The photovoltaic output sample data V is divided horizontally from the middle of the timeline to both sides. One sample data has k power points, which can be divided into photovoltaic output sample data V(l-7*k / 96,l), photovoltaic output sample data V(l-3*k / 96,l+4*k / 96), photovoltaic output sample data V(l-19*k / 96,l+4*k / 96), photovoltaic output sample data V(l-7*k / 96,l+16*k / 96), photovoltaic The output sample data V(l-33*k / 96,l+16*k / 96) and photovoltaic output sample data V(l-19*k / 96,l+30*k / 96) are the training sets of 6 correction models, namely, photovoltaic correction model GRU4-4L, photovoltaic correction model GRU4-4R, photovoltaic correction model GRU12-12L, photovoltaic correction model GRU12-12R, photovoltaic correction model GRU36-14L, and photovoltaic correction model GRU36-14R; (2) The photovoltaic output sample data V(l-7*k / 96,l) can be divided into photovoltaic output sample data V(l-3*k / 96,l) and photovoltaic output sample data V(l-7*k / 96,l-4*k / 96), which are used as the input and output of the photovoltaic correction model GRU4-4L for training respectively; (3) The photovoltaic output sample data V(l-3*k / 96,l+4*k / 96) can be divided into photovoltaic output sample data V(l-3*k / 96,l) and photovoltaic output sample data V(l+*k / 96,l+4*k / 96), which are used as the input and output of the photovoltaic correction model GRU4-4R for training respectively; (4) The photovoltaic output sample data V(l-19*k / 96,l+4*k / 96) can be divided into photovoltaic output sample data V(l-7*k / 96,l+4*k / 96) and photovoltaic output sample data V(l-19*k / 96,l-8*k / 96) which are respectively used as the input and output of the photovoltaic correction model GRU12-12L for training; (5) The photovoltaic output sample data V(l-7*k / 96,l+16*k / 96) can be divided into photovoltaic output sample data V(l-7*k / 96,l+4*k / 96) and photovoltaic output sample data V(l+5*k / 96,l+16*k / 96), which are used as the input and output of the photovoltaic correction model GRU12-12R for training respectively; (6) The photovoltaic output sample data V(l-33*k / 96,l+16*k / 96) can be divided into photovoltaic output sample data V(l-19*k / 96,l+16*k / 96) and photovoltaic output sample data V(l-33*k / 96,l-18*k / 96) which are respectively used as the input and output of the photovoltaic correction model GRU36-14L for training; (7) The photovoltaic output sample data V(l-19*k / 96,l+30*k / 96) can be divided into photovoltaic output sample data V(l-19*k / 96,l+16*k / 96) and photovoltaic output sample data V(l+17*k / 96,l+30*k / 96), which are respectively used as the input and output of the photovoltaic correction model GRU36-14R for training.
8. The method according to claim 7, characterized in that In step 3, the following sub-steps are specifically included: Step 3-1: splice the trained wind power correction model GRU3-3, wind power correction model GRU6-6, wind power correction model GRU12-12, wind power correction model GRU24-24, and wind power correction model GRU48-48 in the established GRU correction model of wind power output in chronological order to form a complete wind power correction model, and import the wind power initial scenario set obtained in step 1 into the wind power correction model; Step 3-2: Splice the photovoltaic correction model GRU4-4L, photovoltaic correction model GRU4-4R, photovoltaic correction model GRU12-12L, photovoltaic correction model GRU12-12R, photovoltaic correction model GRU36-14L, and photovoltaic correction model GRU36-14R trained in step 2 in the form of expanding from the middle to both sides to form a complete photovoltaic correction model, and import the photovoltaic initial scene set obtained in step 1 into the photovoltaic correction model.
9. The method according to claim 8, characterized in that In step 3-1, the following steps are included: Step 3-1-1) splicing the wind power correction model into a new wind power correction model in the form of GRU3-3-GRU6-6-GRU12-12-GRU24-24-GRU 48-48 in chronological order; Step 3-1-2) The wind power correction model GRU3-3 generates the values of the next 3a moments within ±m% from the values of the previous 3a moments, and selects the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set, where a is a positive integer and m is a real number; Step 3-1-3) The wind power correction model GRU6-6 can generate the values of the next 6a moments within ±m% from the values of the first 6a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set in a non-replacement form as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±5%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set; Step 3-1-4) The wind power correction model GRU12-12 can generate the values of the next 12a moments within ±m% from the values of the previous 12a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set in a non-replacement form as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set; 3-1-5) The wind power correction model GRU24-24 can generate the values of the next 24a moments within ±m% from the values of the previous 24a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%. When there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%. When there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set; 3-1-6) The wind power correction model GRU48-48 can generate the values within ±m% for the next 48a moments from the values of the previous 48a moments, and select the appropriate value from the corresponding moment in the wind power initial scenario set without replacement as the wind power output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%. When there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%. When there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the wind power initial scenario set. Through the above steps, the revised wind power scenario set can be obtained.
10. The method according to claim 8 or 9, characterized in that: In step 3-2, the following steps are included: Step 3-2-1) splicing the photovoltaic correction model into a new photovoltaic correction model in the form of GRU36-14L-GRU12-12L-GRU4-4L-GRU4-4R-GRU12-12R-GRU36-14R in chronological order; Step 3-2-2) The photovoltaic correction model GRU4-4L can generate the values of the left 4b moments within ±m% from the values of the middle 4b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set; Step 3-2-3) The photovoltaic correction model GRU4-4R can generate the values of the right 4b moments within ±m% from the values of the middle 4b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set; Step 3-2-4) The photovoltaic correction model GRU12-12L can generate the values of the left 12b moments within ±m% from the values of the middle 12b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set; Step 3-2-5) The photovoltaic correction model GRU12-12R can generate the values of the 12b moments on the right within ±m% from the values of the middle 12b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set; Step 3-2-6) The photovoltaic correction model GRU36-14L can generate the values of the left 14b moments within ±m% from the values of the middle 36b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set; Step 3-2-7) The photovoltaic correction model GRU36-14R can generate the values of the 14b moments on the right within ±m% from the values of the middle 36b moments, and select the appropriate value from the corresponding moment in the photovoltaic initial scene set in a non-replacement form as the photovoltaic output value at the corresponding moment. When there is no value that meets the conditions within the range of ±m%, the range is expanded to ±2m%, when there is no value that meets the conditions within the range of ±2m%, the range is expanded to ±4m%, when there is no value that meets the conditions within the range of ±4m%, a random selection with replacement is performed from the photovoltaic initial scene set; Through the above steps, the corrected photovoltaic scene set can be obtained.
Citation Information
Patent Citations
Generation method and system based on wind power / photovoltaic classic scene set
CN110807554A
Short-term photovoltaic output probability prediction method based on simplest gated neural network
CN112465251A
Photovoltaic power station typical scene generation method based on multi-scene model
CN112541546A
Typical scene generation method considering wind-solar power generation correlation
CN118643353A
Wind power output interval prediction method
WO2023004838A1
Cited By
Wind-light-load combined typical scheduling operation scene extraction method and system
CN122292333A
A wind-solar load combined typical dispatching operation scenario extraction method and system
CN122292333B