Power distribution network multi-time scale typical scene generation method based on data driving

Through the adversarial generation network and clustering algorithm, the uncertainty problem that traditional methods are difficult to fully consider renewable energy output is solved, and more accurate and comprehensive scenario simulation is achieved, which improves the reliability and prediction of distribution network decisions. Accuracy.

CN119150016APending Publication Date: 2024-12-17YANCHENG POWER SUPPLY CO STATE GRID JIANGSU ELECTRIC POWER CO
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411128807.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Traditional scenario generation methods are difficult to fully consider the uncertainty and complexity of renewable energy output, resulting in insufficient complexity and applicability of the model and difficult to provide reliable boundary conditions for system optimization decisions.

Method used

The adversarial generation network is used to generate sample data, combined with the Bagging algorithm, CLARA method and Markov chain method, scene clustering and transfer probability analysis are carried out on multiple time scales, and scene clustering is performed on short time scales using K-means++ algorithm. Form a set of typical scenes that are multi-stage and multi-dimensional.

Benefits of technology

The generated scenarios are more comprehensive and accurate, which can better simulate multi-stage scenarios of the distribution network, improve decision-making reliability and prediction accuracy, and reduce calculation complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150016A_ABST
    Figure CN119150016A_ABST
Patent Text Reader

Abstract

The invention provides a power distribution network multi-time scale typical scene generation method based on data driving. The method comprises the following steps: (1) generating sample data of regional load, new energy and historical electricity price by adopting a generative adversarial network through a data mining and feature extraction method; (2) generating medium and long term source charge electricity price prediction data; (3) scene clustering among different planning stages under a long time scale is carried out, and transition probability characteristics of different planning stages are determined; (4) denormalizing the source charge electricity price, matching a corresponding scene path probability, and generating a multi-stage scene tree; (5) performing scene clustering in a stage under a short time scale; and (6) combining the inter-stage typical scenes obtained in the step (3), and forming a multi-stage and multi-dimensional typical scene set by adopting a heuristic synchronous back substitution scene reduction method. According to the power distribution network multi-time-scale typical scene generation method, scene features among different planning stages can be analyzed more comprehensively, and a more complete scene is generated more comprehensively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distribution network operation planning, and in particular relates to a data-driven method for generating typical scenarios of multiple time scales in a distribution network. Background Art

[0002] In the new distribution network, as the proportion of renewable energy on the power supply side continues to increase, its randomness, volatility and intermittency will bring great challenges to the safe and stable operation of the distribution network. With the increase in power demand on the load side and the use of energy storage devices, the uncertainty of terminal loads is also increasing, which further increases the difficulty of regulating the distribution network. The traditional deterministic energy supply and demand balance is gradually shifting to a probabilistic balance. Therefore, it is necessary to describe the source-load uncertainty in the new distribution network in a probabilistic way to provide reliable boundary conditions for system optimization decisions.

[0003] In order to maximize the use of renewable energy and reduce its threat to the safe and stable operation of the power system, it is necessary to use scenario generation methods to generate scenarios that can accurately reflect the real regional load and the probability distribution characteristics of distributed renewable energy output. These scenarios can be used to describe the scenario set of renewable energy output in the optimal dispatch of the power system through scenario analysis.

[0004] Traditional scenario generation methods mainly include probabilistic model methods, such as Markov chain method, time series method and scenario tree generation method. These methods establish probabilistic models based on historical data, assume that random variables such as renewable energy output satisfy specific probability distributions, and use sampling methods to generate new scenarios. However, these methods often only model certain characteristics of the output, and it is difficult to fully consider the uncertainty of renewable energy output. Due to the complexity and diversity of the actual environment, it is difficult to find a widely applicable and easy-to-solve probabilistic model, so scenario reduction is needed to reduce the complexity of the model. The traditional probabilistic model method does not fully consider the various correlations and unknown relationships of renewable energy output. At the same time, the actual environment is complex and it is difficult to find a model with wide applicability, and the need for scenario reduction increases the complexity of the model. Summary of the invention

[0005] In order to solve the above problems, the present invention provides a data-driven method for generating typical scenarios of multiple time scales in distribution networks, which can more comprehensively analyze the scenario characteristics between different planning stages, provide more references for decision-making, and generate more complete scenarios more comprehensively.

[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:

[0007] A data-driven method for generating typical scenarios of multiple time scales in a distribution network comprises the following steps:

[0008] Step (1) based on the planned regional load, distributed renewable energy, and historical electricity price data, a generative adversarial network is used to generate sample data of regional load, renewable energy, and historical electricity prices through data mining and feature extraction methods;

[0009] Step (2) generates medium- and long-term source-load electricity price forecast data using a bagging algorithm based on the generated sample data;

[0010] Step (3) Use the CLARA method to cluster scenarios between different planning stages on a long time scale, and then determine the transition probability characteristics of different planning stages based on the Markov chain method (MC);

[0011] Step (4) denormalizes the source-charge price according to the Markov state transition matrix, matches the corresponding scenario path probability, and generates a multi-stage scenario tree;

[0012] Step (5) Use the k-means++ algorithm to cluster the scenes within the stage on a short time scale;

[0013] Step (6) combines the typical scenes between stages obtained in step (3) and adopts a heuristic synchronous back-generation scene reduction method to form a multi-stage and multi-dimensional typical scene set.

[0014] Furthermore, the specific process of step (1) is as follows:

[0015] First, the planning area load, distributed renewable energy, and electricity price historical data are preprocessed using the filling model to fill in missing values ​​and process outliers. The data is defined as X∈R T×3 is a multivariate time series consisting of multiple features:

[0016]

[0017] Where: T is the number of samples in a year, with an interval of hours T = 8760; X 1 , X 2 , X 3 is the value of load, renewable energy and electricity price at all times;

[0018] Introduce the mask matrix M, where the mask value of the f-th feature at the t-th timestamp is The calculation formula is:

[0019]

[0020] Use X and M to train and get a filling model to fill the original missing data X with complete data X imp :

[0021]

[0022] Then, a generative adversarial network is constructed, which includes a generator and a discriminator. The processed historical data of load, renewable energy power and electricity price are used as training sets to train the generative adversarial network model, learn the distribution characteristics of the data, and generate sample data that conforms to the characteristics of historical data.

[0023] Construct a generator model, take random noise as input, mine the intrinsic characteristics of real sample data, generate data closest to the real data, and get the maximum expected value. Define the generator model loss function L gen for

[0024]

[0025] In the formula, p z is the distribution relationship of the noise vector, z is the noise vector, is the expectation; G(z) is the output sample function of the generator; D(G(z)) is the output function of the discriminator when G(z) is input;

[0026] The discriminator model takes real data and generated data as input to distinguish between real data and generated data. Its loss function

[0027] L dis Defined as:

[0028]

[0029] In the formula, is the distribution relationship of the real sequence data, To satisfy The sample x of the distribution is the mathematical expectation function of the calculated variable;

[0030] Combining the loss functions of the above two models, the loss function of the adversarial generation network is defined as follows:

[0031]

[0032] During the training process, the generator and discriminator continuously reduce their loss functions. When the loss function is minimized, the generated data is extracted for further prediction and clustering.

[0033] The specific process of step (2) is as follows:

[0034] The sample data of historical electricity prices generated by the adversarial generative network and the real historical data are combined to form a comprehensive data set D;

[0035] In the model training phase, the Bagging method is used to randomly extract multiple training sets from the comprehensive data set with replacement through Bootstrap sampling. The size of each training set is the same as the original data set. Each sub-training set is used to train the base model separately, and all base models are combined to build a strong learner model.

[0036] These training sets will be used to train multiple base models. For each training set, a regression tree model will be used to train a base model. Each base model predicts the medium- and long-term electricity price. The prediction results of these base models will be summarized and the final medium- and long-term source-load electricity price prediction data will be obtained by taking the average value.

[0037] Bootstrap sampling is performed from the original training data to obtain B sampling sets D1, D2, ..., D of size N. B For each sampling set D b , use the decision tree algorithm to train a base model f b (x). For a new input sample x i , the prediction result of the Bagging algorithm is the average of the prediction results of all base models:

[0038]

[0039] Among them, fb(x) is the prediction result of the b-th base model (decision tree) for the input sample x, and B is the number of base learners.

[0040] The decision tree training process consists of the following steps:

[0041] 1) Feature selection: Based on different partitioning criteria (Gini index), determine the optimal features for node partitioning.

[0042] 2) Tree expansion: The data set is continuously subdivided into purer subsets through recursive methods until the termination condition is met (the preset maximum tree depth is reached and the number of samples in the child nodes is less than the set threshold).

[0043] 3) Tree pruning: Pruning the generated decision tree is done to avoid overfitting of the model and thus enhance the generalization ability of the model.

[0044] 4) Classification prediction: For a new data point, starting from the root node of the decision tree, decisions are made step by step according to the rules of the tree until a leaf node is reached. The category represented by the leaf node is the prediction result for the sample.

[0045] The Bagging algorithm is divided into three steps. Its base model is the decision tree, the number of trees is N, the number of samples is T, and the number of input features is P. The specific algorithm is as follows:

[0046] (21) Based on the comprehensive data set, the Bootstrap method is used for sampling to generate N data sets

[0047] Bootstrap is a sampling with replacement. There is a set of samples that have not been sampled, which is counted as the out-of-bag samples OOB of each data set:

[0048]

[0049] (22) Based on each Train an unpruned decision tree model h i (x), i = 1, 2, ..., N, at each node, randomly select p features from all P features, p < P, and then select the best split feature from the p features;

[0050] (23) For new samples, comprehensive N The output of the decision tree model is obtained, and the regression prediction is averaged O RF, O i is the decision tree model h i The corresponding output of (x) is:

[0051]

[0052] The specific process of step (3) is as follows:

[0053] A large number of generated scenarios will be used as the root node of the load change in the next stage in each stage. The generated load new energy sample data and source-to-charge electricity price forecast data are directly used as the scenario tree, and the number of scenario paths will increase exponentially. For many load scenarios in each stage, the Davies-Bouldin index is used to measure the appropriate number of clusters in each stage, and the CLARA method is used to cluster and reduce the number of scenarios. The scenario tree contains two important factors, namely leaf nodes and branch paths. Leaf nodes represent possible load scenarios in the planning area at different times in the future, and branch paths represent sequential paths connecting different load scenarios.

[0054] The CLARA algorithm specifically includes the following three steps:

[0055] (31) Multiple sampling: Repeated sampling of the load, new energy and predicted electricity price data sets to obtain multiple sets of sampled data, reduce the scale of processed data, and randomly extract data samples from the comprehensive data set according to a certain proportion. The sample scale of the extracted data is as follows:

[0056]

[0057] In the formula, A is the overall data sample size, and λ is the reduction factor of cluster data size;

[0058] Standardize the randomly selected data and map them to the range of 0 to 1 to eliminate the influence of the physical meaning and dimensional differences between different variables;

[0059]

[0060] In the formula, x is the data before standardization; is the standardized data; x max With x min Respectively represent the maximum and minimum values ​​of this type of data;

[0061] (32) PAM cluster analysis method: The PAM clustering algorithm is used to cluster the sample data obtained from each sampling, thereby obtaining multiple cluster center points. (NK) non-center data of the data set are selected and classified into clusters of K cluster centers. The classification basis is that the Euclidean distance between the non-center data and the cluster center is the shortest, and the calculation formula is as follows:

[0062]

[0063] In the formula, x n is the nth data vector, with dimension J, x nj is the data value of the j-th dimension of the n-th data vector; c k is the kth cluster center, c kj is the data value of the jth dimension in the kth data center; d(x n , c k ) is the non-central data vector x n With the cluster center data vector c k The Euclidean distance between

[0064] (33) Update cluster center: When non-central data replaces cluster center data, the replacement cost is calculated to determine whether the replacement helps improve clustering quality. The replacement cost is calculated as follows:

[0065]

[0066] In the formula, E(x n , c k ) is the non-central data x n Replace cluster center data c k The replacement cost; e ink For non-central data x n Replace cluster center data c k When the non-representative point x i The replacement cost is calculated as follows:

[0067] When x i Belongs to ck When the cluster class is:

[0068]

[0069] In the formula, is a non-representative point x i The secondary neighbor center data;

[0070] When x i Not c k When the cluster class is:

[0071]

[0072] Replacement cost E(x n , c k )<0, execute the non-central data x n Replace cluster center data c k Repeat the above steps to calculate the replacement cost and determine whether to perform the replacement operation until the replacement cost of replacing the cluster center data with all non-center data is greater than zero, and the final K-class typical scene between stages is obtained;

[0073] After the inter-stage scene clustering is completed, the number of paths in the scene is counted, the probability of each load path appearing is determined, and each branch path is calculated; the number of paths between leaf nodes after simplification It represents the probability of the branch path from the nth node of stage k to the mth node of the next stage k+1 in the scene tree. MC is used to form the state transfer matrix of each stage according to the scene path before simplification. The probability of the scene path can be obtained by statistical clustering to form a Markov state transfer matrix.

[0074]

[0075] Finally, the source-charge price is denormalized according to the Markov state transition matrix, and the corresponding scenario path probability is matched to generate a multi-stage scenario tree.

[0076] The specific process of step (4) is as follows:

[0077] (41) First, determine the normalized range of the source-load electricity price and normalize it to the interval [0, 1]; for the normalized electricity value, use denormalization to convert it into the actual electricity value;

[0078] (42) Using the above Markov chain state transition matrix and the denormalized electrical value, the matching scene path probability is calculated;

[0079] (43) For a given electricity value, the possible electricity price state at the next moment is calculated according to the transition probability of the Markov chain and converted into the actual electricity value;

[0080] (44) Repeat the above steps until the complete scenario path is constructed; in the process, consider the information such as the transition probability and historical state at different time points;

[0081] (45) The matched scenario path probabilities are combined into a multi-stage scenario tree; each node represents the state at a time point, each path represents a possible development path, and the weight on the path corresponds to the probability of the path; a tree structure is used to represent the state evolution at multiple time points, and each node contains the electricity price state and probability information at the corresponding time point;

[0082] (46) According to the Markov chain state transition matrix and the denormalized electrical value, a multi-stage scenario tree is gradually constructed to ensure that the probability of each node matches the transition probability.

[0083] The multi-stage scene tree is defined as follows:

[0084] (461)V={V1,V2,...,V n} represents a collection of scene tree nodes, and its numbering depends on the order in which the nodes are included in the scene tree;

[0085] (462) Single Node N i The status of Indicates that p(u) represents the node group at stage u. The number of dimensions of the state, the group node is recorded as The corresponding node group represented by the node set subscript number Where A is the number of transition states, B is the number of node group states, and P is the state dimension;

[0086] (463)Node N i The parent node is denoted as forw(N i )∈V, the child nodes are recorded as

[0087] The specific process of step (5) is as follows:

[0088] First, the optimal number of clusters K in different stages under short time scale is determined, and the elbow method is used to determine the K value for the data set of each planning stage; then K-mean is used for each stage s ++ algorithm for scene clustering;

[0089] The specific process of the algorithm is as follows:

[0090] (51) Randomly select a sample, which includes load, new energy and electricity price data, as the initial cluster center x1, that is, X = x1 ;

[0091] (52) Calculate the distance D(x) from each sample point x to its nearest cluster center:

[0092] Given two sample points x1(a1, b1, c1) and x2(a2, b2, c2), the distance D(x) between them is

[0093]

[0094] Among them, a1, b1, c1 represent the load, new energy and electricity price data of sample x1 respectively, and a2, b2, c2 represent the load, new energy and electricity price data of sample x2 respectively;

[0095] (53) The probability P of each sample point being selected as a new cluster center

[0096]

[0097] (54) Repeat steps (52) and (53) until K initial cluster centers are selected.

[0098] (55) Use the calculated K initial cluster centers to run the K-means clustering algorithm;

[0099] The K-means++ algorithm is used to initialize the cluster center, and then the scene data at a short time scale is clustered until the convergence condition is met;

[0100] Each cluster has three characteristic dimensions, namely load, new energy and electricity price data. The location of the cluster center is updated according to the data characteristics of the member samples of the current cluster;

[0101] Repeatedly perform clustering and cluster center updates until the cluster center no longer changes significantly or the maximum number of iterations is reached;

[0102] The final clustering result is obtained, which includes the cluster label to which each sample belongs and the cluster center of each cluster. Each cluster represents a typical scene in a stage.

[0103] The specific process of step (6) is as follows:

[0104] (61) Define the scene as V i and V j , the probability distance between scenes is:

[0105] c(V i , V j )=||V i -V j ||2

[0106] (62) Under the condition that the number of retained scenes is determined, the following result is minimized:

[0107]

[0108] Where: J is the set of scenes that are finally removed; p i For the scene V i The probability of

[0109] The specific steps for scene reduction are as follows:

[0110] (621) Define D as the initial scene set, set J to be an empty set, and the number of iterations u = 1;

[0111] (622) Calculate the scene V that needs to be cut in the uth iteration u So that the following formula takes the minimum value:

[0112]

[0113] Where: J u is the set J at the u-th iteration;

[0114] (623) Delete scene V from D u , V u Add to set J,

[0115] J u =J u-1 ∪{V u},u=u+1:

[0116] (624) Scene V will be cut u The probability of is added to the scenario closest to its probability;

[0117] (625) Repeat steps (622) to (624) until the number of scenes in D is equal to the number of scenes finally retained.

[0118] Compared with the prior art, the beneficial effects are:

[0119] (1) The present invention uses a generative adversarial network to generate sample data, which can effectively improve the authenticity and accuracy of the data and more accurately simulate the multi-stage scenarios of the distribution network.

[0120] (2) The present invention uses the Bagging algorithm to generate medium- and long-term source-load electricity price forecast data, which can effectively improve the accuracy and stability of the forecast and make the forecast more accurate.

[0121] (3) The present invention uses the CLARA method and the Markov chain method for scenario clustering and transition probability analysis, which can more comprehensively analyze the scenario characteristics between different planning stages, provide more references for decision-making, and generate more comprehensive scenarios.

[0122] (4) The present invention uses the K-means++ algorithm to cluster scenes on a short time scale. The algorithm is more robust and avoids the inconsistency of the K-means clustering results each time. At the same time, it has better processing effect on small data sets, can effectively reduce the computational complexity, and improve the algorithm operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0123] Figure 1 This is an overall flow chart of a data-driven method for generating typical scenarios of multiple time scales in distribution networks;

[0124] Figure 2 Generate network structure diagram for adversarial network;

[0125] Figure 3 This is the schematic diagram of Bagging;

[0126] Figure 4 This is the CLARA clustering flow chart;

[0127] Figure 5 This is the K-means++ algorithm framework diagram. DETAILED DESCRIPTION

[0128] The following is a detailed description of a specific implementation method of a data-driven typical scenario generation method for a distribution network at multiple time scales in conjunction with the accompanying drawings.

[0129] A data-driven method for generating typical scenarios of distribution networks at multiple time scales is proposed. First, based on regional historical data, an adversarial generative network is used to generate sample data of regional load, new energy power, and historical electricity prices. Based on the generated sample data, the Bagging algorithm is used to generate medium- and long-term source-load electricity price forecast data. The CLARA method is used to cluster scenarios between different planning stages at a long time scale, and then the transition probability characteristics of different planning stages are determined based on the Markov chain method to generate a multi-stage scenario tree. Finally, the K-means++ algorithm is used to cluster scenarios within stages at a short time scale, and a heuristic synchronous back-generation scenario reduction method is used to form a multi-stage and multi-dimensional typical scenario set.

[0130] like Figure 1 As shown, the data-driven method for generating typical scenarios of multiple time scales in a distribution network of the present invention comprises the following steps:

[0131] (1) Based on the planned regional load, distributed renewable energy, and historical electricity price data, a generative adversarial network is used to generate sample data of regional load, renewable energy, and historical electricity prices through data mining and feature extraction methods;

[0132] (2) Based on the generated sample data, the Bagging algorithm is used to generate medium- and long-term source-load electricity price forecast data;

[0133] (3) Use the CLARA method to cluster scenarios between different planning stages over a long time scale, and then determine the transition probability characteristics of different planning stages based on the Markov chain method;

[0134] (4) Denormalize the source-charge price according to the Markov state transition matrix, match the corresponding scenario path probability, and generate a multi-stage scenario tree;

[0135] (5) Use the k-means++ algorithm to cluster scenes within a stage on a short time scale.

[0136] (6) Combining the typical scenes between stages obtained in step (3), using a heuristic synchronous back-generation scene reduction method, to form a multi-stage and multi-dimensional typical scene set.

[0137] Furthermore, the specific process of step (1) is as follows:

[0138] First, the planning area load, distributed renewable energy, and electricity price historical data are preprocessed using the filling model to fill in missing values ​​and process outliers. The data is defined as X∈R T×3 is a multivariate time series consisting of multiple features:

[0139]

[0140] Where: T is the number of samples in a year, with an interval of hours T = 8760; X 1 , X 2 , X 3 is the value of load, renewable energy and electricity price at all times;

[0141] Introduce the mask matrix M, where the mask value of the f-th feature at the t-th timestamp is The calculation formula is:

[0142]

[0143] Use X and M to train and get a filling model to fill the original missing data X with complete data X imp :

[0144]

[0145] Then, a generative adversarial network is constructed, which includes a generator and a discriminator. The processed historical data of load, new energy power and electricity price are used as training sets to train the generative adversarial network model, learn the distribution characteristics of the data, and generate sample data that conforms to the characteristics of historical data, such as Figure 2 Generate network structure diagram for adversarial network;

[0146] Construct a generator model, take random noise as input, mine the intrinsic characteristics of real sample data, generate data closest to the real data, and get the maximum expected value. Define the generator model loss function L gen for

[0147]

[0148] In the formula, p z is the distribution relationship of the noise vector, z is the noise vector, is the expectation; G(z) is the output sample function of the generator; D(G(z)) is the output function of the discriminator when G(z) is input;

[0149] The discriminator model takes real data and generated data as input to distinguish between real data and generated data. Its loss function

[0150] L dis Defined as:

[0151]

[0152] In the formula, is the distribution relationship of the real sequence data, To satisfy The sample x of the distribution is the mathematical expectation function of the calculated variable;

[0153] Combining the loss functions of the above two models, the loss function of the adversarial generation network is defined as follows:

[0154]

[0155] During the training process, the generator and discriminator continuously reduce their loss functions. When the loss function is minimized, the generated data is extracted for further prediction and clustering.

[0156] The specific process of step (2) is as follows:

[0157] The sample data of historical electricity prices generated by the adversarial generative network and the real historical data are combined to form a comprehensive data set D;

[0158] In the model training stage, the Bagging method is used to randomly select multiple training sets from the comprehensive data set with replacement through Bootstrap sampling. The size of each training set is the same as the original data set.

[0159] These training sets will be used to train multiple base models. For each training set, a regression tree model is used to train a base model. Each base model predicts the medium- and long-term electricity price. The prediction results of these base models are summarized and the final medium- and long-term source-load electricity price prediction data is obtained by taking the average value, such as Figure 3 This is the schematic diagram of Bagging.

[0160] Bootstrap sampling is performed from the original training data to obtain B sampling sets D1, D2, ..., D of size N. B For each sampling set D b , use the decision tree algorithm to train a base model f b (x). For a new input sample x i , the prediction result of the Bagging algorithm is the average of the prediction results of all base models:

[0161]

[0162] Among them, f b (x) is the prediction result of the b-th base model (decision tree) for the input sample x, and B is the number of base learners.

[0163] The decision tree training process consists of the following steps:

[0164] Feature selection: Based on different partitioning criteria (Gini index), determine the optimal features for node partitioning.

[0165] Tree expansion: The data set is continuously subdivided into purer subsets through recursive methods until the termination condition is met (the preset maximum tree depth is reached and the number of samples in the child nodes is less than the set threshold).

[0166] Tree pruning: Pruning the generated decision tree is done to avoid overfitting of the model and thus enhance the generalization ability of the model.

[0167] Classification prediction: For a new data point, starting from the root node of the decision tree, decisions are made step by step according to the rules of the tree until a leaf node is reached. The category represented by the leaf node is the prediction result for the sample.

[0168] The Bagging algorithm is divided into three steps. Its base model is the decision tree, the number of trees is N, the number of samples is T, and the number of input features is P. The specific algorithm is as follows:

[0169] (21) Based on the comprehensive data set, the Bootstrap method is used for sampling to generate N data sets

[0170] Bootstrap is a sampling with replacement. There is a set of samples that have not been sampled, which is counted as the out-of-bag samples OOB of each data set:

[0171]

[0172] (22) Based on each Train a decision tree model without pruning

[0173] h i (x), i = 1, 2, …, N. At each node, randomly select p features from all P features, where p < P, and then select the best splitting feature from the p features.

[0174] (23) For new samples, after synthesizing the outputs of N decision tree models, the regression prediction takes the mean O RF , O i is the output corresponding to the decision tree model h i (x):

[0175]

[0176] The specific process of step (3) is as follows:

[0177] A large number of generated scenarios will be used as the root nodes for load changes in the next stage at each stage. The generated load new energy sample data and source-load electricity price prediction data are directly used as the scenario tree, and the number of scenario paths will increase geometrically; for many load scenarios at each stage, the Davies-Bouldin index is used to measure the appropriate number of clusters in each stage, and the CLARA method is used to cluster and reduce the number of scenarios; the scenario tree contains two important factors, namely leaf nodes and branch paths; leaf nodes represent the load scenarios that may occur in the future in different periods in the planning area, and branch paths represent the sequential paths connecting different load scenarios;

[0178] The CLARA algorithm specifically includes the following three steps:

[0179] (31) Multiple samplings: Repeatedly sample the load, new energy, and predicted electricity price data sets to obtain multiple groups of sampled data, reduce the data processing scale, and randomly extract data samples from the comprehensive data set at a certain ratio. The sample scale of the extracted data is as follows:

[0180]

[0181] In the formula, A is the overall data sample scale, λ is the reduction multiple of the clustering data scale;

[0182] Standardize the randomly extracted data and map it to the range of 0 to 1 to eliminate the influence of the physical meaning and dimension differences between different variables;

[0183]

[0184] In the formula, x is the data before standardization; is the standardized data; x max With x min Respectively represent the maximum and minimum values ​​of this type of data;

[0185] (32) PAM cluster analysis method: The PAM clustering algorithm is used to cluster the sample data obtained from each sampling, thereby obtaining multiple cluster center points. (NK) non-center data of the data set are selected and classified into clusters of K cluster centers. The classification basis is that the Euclidean distance between the non-center data and the cluster center is the shortest, and the calculation formula is as follows:

[0186]

[0187] In the formula, x n is the nth data vector, with dimension J, x nj is the data value of the j-th dimension of the n-th data vector; c k is the kth cluster center, c kj is the data value of the jth dimension in the kth data center; d(x n , c k ) is the non-central data vector x n With the cluster center data vector c k The Euclidean distance between

[0188] (33) Update cluster center: When non-central data replaces cluster center data, the replacement cost is calculated to determine whether the replacement helps improve clustering quality. The replacement cost is calculated as follows:

[0189]

[0190] In the formula, E(x n , c k ) is the non-central data x n Replace cluster center data c k The replacement cost; e ink For non-central data x n Replace cluster center data c k When the non-representative point x i The replacement cost is calculated as follows:

[0191] When x i Belongs to c k When the cluster class is:

[0192]

[0193] In the formula, is a non-representative point x i The secondary neighbor center data;

[0194] When x i Not ck When the cluster class is:

[0195]

[0196] Replacement cost E(x n ,c k )<0, execute the non-central data x n Replace cluster center data c k Repeat the above steps to calculate the replacement cost and determine whether to perform the replacement operation until the replacement cost of replacing the cluster center data with all non-center data is greater than zero, and the final K-class typical scenes between stages are obtained;

[0197] like Figure 4 This is the CLARA flow chart.

[0198] After the inter-stage scene clustering is completed, the number of paths in the scene is counted, the probability of each load path appearing is determined, and each branch path is calculated; the number of paths between leaf nodes after simplification It represents the probability of the branch path from the nth node of stage k to the mth node of the next stage k+1 in the scene tree. MC is used to form the state transition matrix of each stage according to the scene path before simplification. The probability of the scene path can be obtained by statistical clustering to form a Markov state transition matrix.

[0199]

[0200] Finally, the source-charge price is denormalized according to the Markov state transition matrix, and the corresponding scenario path probability is matched to generate a multi-stage scenario tree.

[0201] The specific process of step (4) is as follows:

[0202] (41) First, determine the normalized range of the source-load electricity price and normalize it to the interval [0, 1]; for the normalized electricity value, use denormalization to convert it into the actual electricity value;

[0203] (42) Using the above Markov chain state transition matrix and the denormalized electrical value, the matching scene path probability is calculated;

[0204] (43) For a given electricity value, the possible electricity price state at the next moment is calculated according to the transition probability of the Markov chain and converted into the actual electricity value;

[0205] (44) Repeat the above steps until the complete scenario path is constructed; in the process, consider the information such as the transition probability and historical state at different time points;

[0206] (45) The matched scenario path probabilities are combined into a multi-stage scenario tree; each node represents the state at a time point, each path represents a possible development path, and the weight on the path corresponds to the probability of the path; a tree structure is used to represent the state evolution at multiple time points, and each node contains the electricity price state and probability information at the corresponding time point;

[0207] (46) According to the Markov chain state transition matrix and the denormalized electrical value, a multi-stage scenario tree is gradually constructed to ensure that the probability of each node matches the transition probability.

[0208] The multi-stage scene tree is defined as follows:

[0209] (461)V={V1,V2,...,V n} represents a collection of scene tree nodes, and its numbering depends on the order in which the nodes are included in the scene tree;

[0210] (462) Single Node N i The status of Indicates that p(u) represents the node group at stage u. The number of dimensions of the state, the group node is recorded as The corresponding node group represented by the node set subscript number Where A is the number of transition states, B is the number of node group states, and P is the state dimension;

[0211] (463)Node N i The parent node is denoted as forw(N i )∈V, the child nodes are recorded as

[0212] The specific process of step (5) is as follows:

[0213] First, the optimal number of clusters K in different stages under short time scale is determined, and the elbow method is used to determine the K value for the data set of each planning stage; then the K-means++ algorithm is used to cluster the scenes in each stage;

[0214] The specific process of the algorithm is as follows:

[0215] (51) Randomly select a sample containing load, new energy and electricity price data as the initial cluster center x1, that is, X = x1;

[0216] (52) Calculate the distance D(x) from each sample point x to its nearest cluster center:

[0217] Given two sample points x1(a1, b1, c1) and x2(a2, b2, c2), the distance D(x) between them is

[0218]

[0219] Among them, a1, b1, c1 represent the load, new energy and electricity price data of sample x1 respectively, and a2, b2, c2 represent the load, new energy and electricity price data of sample x2 respectively;

[0220] (53) The probability P of each sample point being selected as a new cluster center

[0221]

[0222] (54) Repeat steps (52) and (53) until K initial cluster centers are selected.

[0223] (55) Use the calculated K initial cluster centers to run the K-means clustering algorithm;

[0224] The K-means++ algorithm is used to initialize the cluster center, and then the scene data at a short time scale is clustered until the convergence condition is met;

[0225] Each cluster has three characteristic dimensions, namely load, new energy and electricity price data. The location of the cluster center is updated according to the data characteristics of the member samples of the current cluster;

[0226] Repeatedly perform clustering and cluster center updates until the cluster center no longer changes significantly or the maximum number of iterations is reached;

[0227] The final clustering result is obtained, which includes the cluster label to which each sample belongs and the cluster center of each cluster. Each cluster represents a typical scene in a stage.

[0228] K-means++ algorithm framework Figure 5 shown.

[0229] The specific process of step (6) is as follows:

[0230] (61) Define the scene as V i and V j , the probability distance between scenes is:

[0231] c(V i , V j )=||V i -V j || 2

[0232] (62) Under the condition that the number of retained scenes is determined, the following result is minimized:

[0233]

[0234] Where: J is the set of scenes that are finally removed; p i For the scene V i The probability of

[0235] The specific steps for scene reduction are as follows:

[0236] (621) Define D as the initial scene set, set J to be an empty set, and the number of iterations u = 1;

[0237] (622) Calculate the scene V that needs to be cut in the uth iteration u So that the following formula takes the minimum value:

[0238]

[0239] Where: J u is the set J at the u-th iteration;

[0240] (623) Delete scene V from D u , V u Add to collection J,J u =J u-1 ∪{V u},u=u+1:

[0241] (624) Scene V will be cut u The probability of is added to the scenario closest to its probability;

[0242] (625) Repeat steps (622) to (624) until the number of scenes in D is equal to the number of scenes finally retained.

[0243] The typical scenes between stages obtained in step (3) are combined with the scenes within the stage under the short time scale obtained in step (6) to form a multi-stage and multi-dimensional typical scene set. The scenes within each stage are matched with the typical scenes in the next stage to form a multi-stage scene path.

[0244] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not intended to limit the present invention. A person skilled in the art should understand that the specific implementation of the present invention can be modified or replaced by equivalents, but these modifications or changes are within the scope of protection of the pending claims.

Claims

1. A data-driven method for generating typical scenarios of multiple time scales in a distribution network, characterized in that: The method for generating typical scenarios of multiple time scales in a distribution network comprises the following steps: Step (1) based on the planned regional load, distributed renewable energy, and historical electricity price data, a generative adversarial network is used to generate sample data of regional load, renewable energy, and historical electricity prices through data mining and feature extraction methods; Step (2) generates medium- and long-term source-load electricity price forecast data using a bagging algorithm based on the generated sample data; Step (3) Use the CLARA method to cluster scenarios between different planning stages on a long time scale, and then determine the transition probability characteristics of different planning stages based on the Markov chain method; Step (4) denormalizes the source-charge price according to the Markov state transition matrix, matches the corresponding scenario path probability, and generates a multi-stage scenario tree; Step (5) Use the k-means++ algorithm to cluster the scenes within the stage on a short time scale; Step (6) combines the typical scenes between stages obtained in step (3) and adopts a heuristic synchronous back-generation scene reduction method to form a multi-stage and multi-dimensional typical scene set.

2. According to claim 1, a data-driven method for generating typical multi-time-scale scenarios of a distribution network is characterized in that: The specific process of step (1) is as follows: First, the planning area load, distributed renewable energy, and electricity price historical data are preprocessed using the filling model to fill in missing values ​​and process outliers. The data is defined as X∈R T×3 is a multivariate time series consisting of multiple features: Where: T is the number of samples in a year, with an interval of hours T = 8760; X 1 , X 2 , X 3 is the value of load, renewable energy and electricity price at all times; Introduce the mask matrix M, where the mask value of the f-th feature at the t-th timestamp is The calculation formula is: Use X and M to train and get a filling model to fill the original missing data X with complete data X imp : Then, a generative adversarial network is constructed, which includes a generator and a discriminator. The processed historical data of load, renewable energy power and electricity price are used as training sets to train the generative adversarial network model, learn the distribution characteristics of the data, and generate sample data that conforms to the characteristics of historical data. Construct a generator model, take random noise as input, mine the intrinsic characteristics of real sample data, generate data closest to the real data, and get the maximum expected value. Define the generator model loss function L gen for In the formula, p z is the distribution relationship of the noise vector, z is the noise vector, is the expectation; G(z) is the output sample function of the generator; D(G(z)) is the output function of the discriminator when G(z) is input; The discriminator model takes real data and generated data as input to distinguish real data from generated data. Its loss function L dis Defined as: In the formula, is the distribution relationship of the real sequence data, To satisfy The sample x of the distribution is the mathematical expectation function of the calculated variable; Combining the loss functions of the generator model and the discriminator model, the loss function of the adversarial generation network is defined as follows: During the training process, the generator and the discriminator continuously reduce their loss functions. When the loss function is minimum, the generated data is extracted for further prediction and clustering.

3. The method for generating typical scenarios of multiple time scales in a distribution network based on data-driven according to claim 2, characterized in that: The specific process of step (2) is as follows: The sample data of historical electricity prices generated by the adversarial generative network and the real historical data are combined to form a comprehensive data set D; In the model training phase, the Bagging method is used to randomly extract multiple training sets from the comprehensive data set with replacement through Bootstrap sampling. Each sub-training set is used to train the base model separately, and all base models are combined to build a strong learner model. These training sets will be used to train multiple base models. For each training set, a regression tree model will be used to train a base model. Each base model will predict the medium- and long-term electricity price. The prediction results of these base models will be aggregated and the final medium- and long-term source-load electricity price prediction data will be obtained by taking the average value. Bootstrap sampling is performed from the original training data to obtain B sampling sets D1, D2, ..., D of size N. B ; For each sampling set D b , use the decision tree algorithm to train a base model f b (x); for a new input sample x i , the prediction result of the Bagging algorithm is the average of the prediction results of all base models: Among them, f b (x) is the prediction result of the b-th base model for the input sample x, and B is the number of base learners.

4. The method for generating typical scenarios of multiple time scales in a distribution network based on data-driven method according to claim 3, characterized in that: The decision tree training process consists of the following steps: Feature selection: Determine the optimal features to partition nodes based on different partitioning criteria; Tree expansion: The data set is continuously subdivided into purer subsets through recursive methods until the termination condition is met: the preset maximum tree depth is reached and the number of samples in the child nodes is less than the set threshold; Tree pruning: Pruning the generated decision tree is done to avoid overfitting of the model and thus enhance the generalization ability of the model; Classification prediction: For a new data point, starting from the root node of the decision tree, decisions are made step by step according to the rules of the tree until a leaf node is reached. The category represented by the leaf node is the prediction result for the sample.

5. The method for generating typical scenarios of multiple time scales in a distribution network based on data-driven according to claim 4, characterized in that: The Bagging algorithm is divided into three steps. Its base model is the decision tree, the number of trees is N, the number of samples is T, and the number of input features is P. The specific algorithm is as follows: (21) Based on the comprehensive data set, the Bootstrap method is used for sampling to generate N data sets Bootstrap is a sampling with replacement. There is a set of samples that have not been sampled, which is counted as the out-of-bag samples OOB of each data set: (22) Based on each Train a decision tree model h without pruning i (x), i = 1, 2, …, N. At each node, randomly select p features from all P features, where p < P, and then select the best splitting feature from the p features; (23) For new samples, the output of N decision tree models is combined to obtain the regression prediction with the mean value O RF , O i h is the decision tree model i The corresponding output of (x) is:

6. A data-driven method for generating typical multi-time-scale scenarios of a distribution network according to claim 5, characterized in that: In step (3), the CLARA method is used to cluster scenarios between different planning stages on a long time scale, and then the transition probability characteristics of different planning stages are determined based on the Markov chain method: A large number of generated scenarios will be used as the root node of the load change in the next stage in each stage. The generated load new energy sample data and source-to-charge electricity price forecast data are directly used as the scenario tree, and the number of scenario paths will increase exponentially. For many load scenarios in each stage, the Davies-Bouldin index is used to measure the appropriate number of clusters in each stage, and the CLARA method is used to cluster and reduce the number of scenarios. The scenario tree contains two important factors, namely leaf nodes and branch paths. Leaf nodes represent the load scenarios that will appear in the planning area in different periods in the future, and branch paths represent the sequential paths connecting different load scenarios. The CLARA algorithm specifically includes the following three steps: (31) Multiple sampling: Repeated sampling of the load, new energy and predicted electricity price data sets to obtain multiple sets of sampled data, reduce the scale of processed data, and randomly extract data samples from the comprehensive data set according to a certain proportion. The sample scale of the extracted data is as follows: In the formula, A is the overall data sample size, and λ is the reduction factor of cluster data size; Standardize the randomly selected data and map them to the range of 0 to 1 to eliminate the influence of the physical meaning and dimensional differences between different variables; In the formula, x is the data before standardization; is the standardized data; x max With x min Respectively represent the maximum and minimum values ​​of this type of data; (32) PAM cluster analysis method: The PAM clustering algorithm is used to cluster the sample data obtained from each sampling, thereby obtaining multiple cluster center points. (NK) non-center data of the data set are selected and classified into clusters of K cluster centers. The classification basis is that the Euclidean distance between the non-center data and the cluster center is the shortest, and the calculation formula is as follows: In the formula, x n is the nth data vector, with dimension J, x nj is the data value of the j-th dimension of the n-th data vector; c k is the kth cluster center, c kj is the data value of the jth dimension in the kth data center; d(x n , c k ) is the non-central data vector x n With the cluster center data vector c k The Euclidean distance between (33) Update cluster center: When non-central data replaces cluster center data, the replacement cost is calculated to determine whether the replacement helps improve clustering quality. The replacement cost is calculated as follows: In the formula, E(x n , c k ) is the non-central data x n Replace cluster center data c k The replacement cost; e ink For non-central data x n Replace cluster center data c k When the non-representative point x i The replacement cost is calculated as follows: When x i Belongs to c k When the cluster class is: In the formula, is a non-representative point x i The secondary neighbor center data; When x i Not c k When the cluster class is: Replacement cost E(x n , c k )<0, execute the non-central data x n Replace cluster center data c k Repeat the above steps to calculate the replacement cost and determine whether to perform the replacement operation until the replacement cost of replacing the cluster center data with all non-center data is greater than zero, and the final K-class typical scene between stages is obtained; After the clustering of the inter-stage scenarios is completed, the number of paths in the scenarios is counted, the probability of each load path appearing is determined, and each branch path is calculated; The number of paths between leaf nodes after simplification It represents the probability of the branch path from the nth node of stage k to the mth node of the next stage k+1 in the scene tree. MC is used to form the state transfer matrix of each stage according to the scene path before simplification. The probability of the scene path can be obtained by statistical clustering to form a Markov state transfer matrix. Finally, the source-charge price is denormalized according to the Markov state transition matrix, and the corresponding scenario path probability is matched to generate a multi-stage scenario tree.

7. The method for generating typical scenarios of multiple time scales in a distribution network based on data drive according to claim 6 is characterized in that: In step (4), based on the Markov chain state transfer matrix, the source-charge price is denormalized, the corresponding scenario path probability is matched, and a multi-stage scenario tree is constructed, which is specifically: (41) First, determine the normalized range of the source-load electricity price and normalize it to the interval [0,1]; for the normalized electricity value, use denormalization to convert it into the actual electricity value; (42) Using the above Markov chain state transition matrix and the denormalized electrical value, the matching scene path probability is calculated; (43) For a given electricity value, the possible electricity price state at the next moment is calculated according to the transition probability of the Markov chain and converted into the actual electricity value; (44) Repeat the above steps until the complete scenario path is constructed; in the process, the transition probability and historical state information at different time points are considered; (45) The matched scenario path probabilities are combined into a multi-stage scenario tree; each node represents the state at a time point, each path represents a possible development path, and the weight on the path corresponds to the probability of the path; a tree structure is used to represent the state evolution at multiple time points, and each node contains the electricity price state and probability information at the corresponding time point; (46) According to the Markov chain state transition matrix and the denormalized electrical value, a multi-stage scenario tree is gradually constructed to ensure that the probability of each node matches the transition probability; The multi-stage scene tree is defined as follows: (461)V={V1,V2,...,V n } represents a collection of scene tree nodes, and its numbering depends on the order in which the nodes are included in the scene tree; (462) Single Node N i The status of Indicates that p(u) represents the node group at stage u. The number of dimensions of the state, the group node is recorded as The corresponding node group represented by the node set subscript number Where A is the number of transition states, B is the number of node group states, and P is the state dimension; (463)Node N i The parent node is denoted as forw(N i )∈V, the child nodes are recorded as 8. The method for generating typical scenarios of multiple time scales in a distribution network based on data drive according to claim 7 is characterized in that: In step (5), the K-means++ algorithm is used to cluster the scenes within the stage in a short time scale: First, the optimal number of clusters K in different stages under short time scale is determined, and the elbow method is used to determine the K value for the data set of each planning stage; then the K-means++ algorithm is used to cluster the scenes in each stage; The specific process of the algorithm is as follows: (51) Randomly select a sample containing load, new energy and electricity price data as the initial cluster center x1, that is, X = x1; (52) Calculate the distance D(x) from each sample point x to its nearest cluster center: Given two sample points x1(a1,b1,c1) and x2(a2,b2,c2), the distance D(x) between them is Among them, a1, b1, c1 represent the load, new energy and electricity price data of sample x1 respectively, and a2, b2, c2 represent the load, new energy and electricity price data of sample x2 respectively; (53) The probability P of each sample point being selected as a new cluster center (54) Repeat steps (52) and (53) until K initial cluster centers are selected; (55) Use the calculated K initial cluster centers to run the K-means clustering algorithm; The k-means++ algorithm is used to initialize the cluster center, and then the scene data at a short time scale is clustered until the convergence condition is met; Each cluster has three characteristic dimensions, namely load, new energy and electricity price data. The location of the cluster center is updated according to the data characteristics of the member samples of the current cluster; Repeatedly perform clustering and cluster center updates until the cluster center no longer changes significantly or the maximum number of iterations is reached; The final clustering result is obtained, which includes the cluster label to which each sample belongs and the cluster center of each cluster. Each cluster represents a typical scene in a stage.

9. The method for generating typical scenarios of multiple time scales in a distribution network based on data drive according to claim 8, characterized in that: In step (6), a heuristic synchronous back-substitution method is used to reduce the scenarios to form a multi-stage and multi-dimensional typical scenario set. The specific steps are as follows: (61) Define the scene as V i and V j , the probability distance between scenes is: c(V i ,V j )=||V i -V j ||2 (62) Under the condition that the number of retained scenes is determined, the following result is minimized: Where: J is the set of scenes that are finally removed; p i For the scene v i The probability of The specific steps for scene reduction are as follows: (621) Define D as the initial scene set, set J to be an empty set, and the number of iterations u = 1; (622) Calculate the scene V that needs to be cut in the uth iteration u So that the following formula takes the minimum value: Where: J u is the set J at the u-th iteration; (623) Delete scene V from D u , V u Add to collection J,J u =J u-1 ∪{V u }, u=u+1; (624) Scene V will be cut u The probability of is added to the scenario closest to its probability; (625) Repeat steps (622) to (624) until the number of scenes in D is equal to the number of scenes finally retained.

Citation Information

Cited By

  • Water-wind-solar complementary energy scheduling method, device, equipment and storage medium

    CN120218496A

  • Hydro-wind complementary energy dispatching method, device and equipment and storage medium

    CN120218496B

  • Multi-scale large-scale power system scene simulation and generation method

    CN121211977A

  • A multi-scale large-scale power system scenario simulation and generation method

    CN121211977B