A high-dimensional static security region boundary fitting method for a power system
By combining Latin hypercube sampling and deep neural networks with a weighted skew decision tree algorithm based on information gain ratio, the accuracy problem of boundary fitting in high-dimensional static security domains of power systems was solved, achieving high-precision boundary fitting and improving the safety assessment and control capabilities of power systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2022-10-28
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional methods struggle to accurately fit the boundaries of high-dimensional static security domains in power systems, resulting in large errors and making them unsuitable for fitting high-dimensional boundaries, thus impacting security assessment and control.
The initial sample set is generated using the Latin hypercube sampling algorithm, transformed into the feature space through a deep neural network model, and the boundary is extracted by combining the weighted skew decision tree algorithm based on information gain ratio to optimize boundary performance.
It achieves high-precision fitting of the high-dimensional static security domain boundary, reduces the error, improves the accuracy of security domain boundary fitting, and provides better support for power system security assessment and control.
Smart Images

Figure CN115688572B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power industry security domain boundary fitting technology, and specifically relates to a method for fitting the high-dimensional static security domain boundary of a power system. Background Technology
[0002] With the integration of a high proportion of renewable energy and power electronic equipment into the power system, the uncertainty and volatility have increased dramatically, and the operating modes have become more varied, making the traditional point-by-point analysis method no longer applicable.
[0003] The static security region (SSRB) of a power system, as the set of all operating points in the power injection space that satisfy the power flow equations and system security constraints, provides strong support for the security assessment and control of power systems with high uncertainty and volatility. Based on different security constraints, the SSRB can be further subdivided into thermal stability security regions, static voltage security regions, etc., suitable for different application scenarios. However, due to the nonlinearity of the power flow equations and various security constraints, the boundary of the entire SSRB exhibits non-convex and nonlinear characteristics. Methods based on analytical derivation of the boundary expression often yield overly conservative results, while methods based on hyperplane coefficient fitting have large errors and are not suitable for fitting high-dimensional boundaries. Therefore, how to solve the SSRB with high accuracy has become a bottleneck restricting its application. Summary of the Invention
[0004] To address the problems existing in the background technology, the present invention provides a method for fitting the boundary of a high-dimensional static security domain in a power system.
[0005] To solve the above technical problems, the present invention adopts the following technical solution: a method for fitting the boundary of a high-dimensional static security domain in a power system, comprising the following steps:
[0006] Step 1: Generation of the initial sample set;
[0007] Step 2: For each sample x in the initial sample set i Find a sample x that is within the safe region s,i A sample x from outside the security domain u,i and satisfy ||x u,i -x s,i || 2 ≤ξ, where ξ is the distance threshold set by engineering requirements; forming the boundary sample set S. B ;
[0008] Step 3: Set the boundary sample set S B The original power injection space X in which the data is located is transformed into a new three-dimensional feature space Z through a deep neural network model;
[0009] Step 4: Extract the boundary in the feature space Z using the weighted skew decision tree algorithm based on information gain ratio, evaluate the boundary performance, and select the optimal boundary.
[0010] In the above-mentioned method for fitting the boundary of the high-dimensional static security domain of the power system, step 1 includes the following steps:
[0011] Step 1.1: Generate generator output data based on the Latin hypercube sampling algorithm;
[0012] Suppose there is an N-node power system containing N nodes. g There are N generator nodes. l For each load node, the upper and lower limits of generator output are:
[0013] [P g_min,j ,P g_max,j ],j∈1,2,...,N g (1)
[0014] In the formula, P g_min,j P is the lower limit of the output of the j-th generator. g_max,j This represents the upper limit of the output of the j-th generator;
[0015] Set the initial sample set size to N. init Then, based on the Latin hypercube sampling generator output data, the following is:
[0016]
[0017] In the formula, P g,i,j Let be the output of the j-th generator in the i-th sample, and:
[0018]
[0019] Step 1.2, the load node sampling method for generator output constraints includes the following steps:
[0020] Step 1.2.1: For the i-th sample, the sampled value of the total output of the generator set is P. g_out,i ,but The upper and lower limits of the system balancing machine output are [P] s_min ,P s_max Let N be the number of nodes in the N-axis. l The total demand sample value of each load node is Without considering network losses, in order to ensure that the output of the system balancing machine does not exceed the limit, P L,i Must meet:
[0021]
[0022] The constraints in equation (4) are in Nl A convex hyperpolyhedron is formed in 3D space; the problem is modeled as solving N hyperpolyhedrons in equation (5). l Sampling of dimensional vectors:
[0023] stA×P l ≤b (5)
[0024] In the formula, A∈(N) l +2)×N l P l ∈N l ×1, b∈(N) l +2)×1, which are all constraint coefficients in equation (4);
[0025] Step 1.2.2: Construct a linear objective function:
[0026]
[0027] In the formula, f(P) l ) is the variable P l A linear function;
[0028] The optimal solution P is obtained using linear programming. l,0 P l,0 Let be a vertex of the hyperpolyhedron represented by equation (5);
[0029] Steps 1, 2, and 3, with P l,0 Using initial values, find the center of the hyperpolyhedron; construct a nonlinear optimization problem:
[0030]
[0031] In the formula, A i,: Let P be the element in the i-th row of matrix A. l,cen The geometric center of the aforementioned convex hyperpolyhedron;
[0032] Step 1.2.4, with P l,cen Starting from the point of origin, randomly initialize the sampling direction. Solve for the point P l,cen And the two intersection points o1 and o2 of the line with direction u with the polyhedron:
[0033]
[0034] In the formula, z and c are intermediate calculation quantities, and c p c n Let o1 and o2 be the points where the line intersects the planes of the polyhedron, including the extended planes; o1 and o2 are the actual points where the line intersects the polyhedron.
[0035] Step 1.2.5: Perform uniform sampling between points o1 and o2, and randomly generate sampling coefficients λ∈[0,1] to obtain the sampling points:
[0036] P l,sam =P l,cen +λ·(ο1+(o2-o1))×u (9)
[0037] In the formula, P l,sam This is the last sampling point;
[0038] Step 1.3: Based on Step 1.2, adjust N. init Load node values are sampled from each sample, and AC power flow calculations and analyses are used to select sample points within the safe region, forming an initial sample set S = {(x i ,y i )}, i∈1,2,...,N S , y i ∈{0}, where S is the initial sample set, x i Inject a power vector into the node of the i-th sample, which is derived from the generator output vector P. g,i With node load vector P l,i Composition, N S Let y be the number of samples in set S. i ∈{0} is the sample label, where 0 means that the sample is within the safe region.
[0039] In the above-mentioned method for fitting the boundary of the high-dimensional static security domain of the power system, step 2 includes the following steps:
[0040] Step 2.1: Set the boundary distance threshold ξ and the initial search step size λ. r,set ;
[0041] Step 2.2: Based on the number of samples N in the sample set S s Sampling N based on Latin hypercube sampling algorithm s N p The power growth direction vector is calculated, and each direction vector is normalized to form a search direction vector matrix.
[0042] Step 2.3: For each x in the sample set S i The following algorithm is used to obtain the boundary sample set S. B , where x s,i For the boundary samples in the safe region of the sample pair, x u,i Let S be the boundary samples in a sample pair that are outside the safe region. B CCP 2N s One sample;
[0043]
[0044] In the above-mentioned method for fitting the boundary of the high-dimensional static security domain of the power system, step 3 includes the following steps:
[0045] Step 3.1: Based on the boundary sample set data size 2N s and data dimension N p Choose a neural network for nonlinear feature transformation; if the number of samples is less than 10,000 and the data dimension is less than 100, choose a fully connected neural network; otherwise, choose a convolutional neural network or a recurrent neural network.
[0046] Step 3.2: Select the adaptive moment estimation algorithm as the neural network optimizer, set the neural network hyperparameters, train the model, select the optimal model, and set the boundary sample set S. B The original power injection space X in which the data resides is transformed into a new three-dimensional feature space Z through a deep neural network model, resulting in the dataset S in the feature space. Z .
[0047] In the above-mentioned method for fitting the boundary of the high-dimensional static security domain of the power system, step 4 includes the following steps:
[0048] Step 4.1: In the weighted skewed decision tree model with information gain ratio, the input condition for each non-leaf node is the training dataset S. Z , (z i ,y i )∈S z i = 1, 2, 3, ..., 2N s Set the maximum depth of the model to D, and the depth of the current node to d;
[0049] The training dataset under the root node is the dataset S generated in step 3.2. Z The training datasets for other non-leaf nodes are the left subsets S' obtained by partitioning the training set of their parent nodes. L right subset S' R ;
[0050] Step 4.2, based on dataset S Z Create the root node G of the model and set the current node depth d = 0;
[0051] Step 4.3: If the current node depth d > the maximum model depth D, then node G is set as a leaf node, and its label is dataset S. Z The label k with the largest number of internal samples corresponds to the label k; otherwise, proceed to step 4.4.
[0052] Step 4.4, if dataset S ZIf all samples belong to the same category k, then node G is set as a leaf node with label k; otherwise, proceed to step 4.5.
[0053] Step 4.5: Randomly initialize model parameters θ0;
[0054] Step 4.6: Solve the minimum value equation (10) of the model objective function based on the quasi-Newton algorithm and the initial value θ0 to obtain the optimal parameters θ of the model. best ;
[0055]
[0056] Where L(θ) is the model objective function, λ is the L2 regularization coefficient, and θ is the training parameter at each node of the model, ||θ|| 2 Let H(S) be the 2-norm of θ. Z H(S) is the empirical entropy of the sample set S. Z |θ) represents the sample set S Z Conditional empirical entropy under θ;
[0057]
[0058] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample; |S k | is the sample set S Z The number of samples in the k-th class, |S Z | is the sample set S Z Total number of samples;
[0059]
[0060] Among them, W L W is the sum of the weights of all samples belonging to the left subset. R H is the sum of the weights of all samples belonging to the right subset. L H is the weighted information entropy of the left child node. R The weighted information entropy of the right child node is given by M, where M is the sample set S under that node. Z Total number of samples, θ represents the parameters to be trained at each node of the model;
[0061]
[0062] in, For sample (x) i ,y i The weight of the left child node, S L Each sample is associated with a set of weight information of its left child node;
[0063]
[0064] in, For sample (x) i ,y i The weight of the right child node, S R Each sample is associated with a set of weight information belonging to its right child node;
[0065]
[0066] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. W is the sum of the weights of samples belonging to the left subset under class k in the sample set. L For the sample set S Z The sum of the weights of all samples belonging to the left subset;
[0067]
[0068] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. W is the sum of the weights of samples belonging to the right subset under class k in the sample set; R For the sample set S Z The sum of the weights of all samples belonging to the right subset;
[0069]
[0070] Among them, (x i ,y i ) represents the sample set S Z The i-th sample, S L S is the set of weight information of each sample belonging to the left subset. R This is a set of weight information for each sample belonging to its right subset.
[0071]
[0072] in, Let be the weight of the i-th sample belonging to the left child node. Let σ(·) be the weight of the right child node of the i-th sample, and let σ(·) be the sigmoid function.
[0073]
[0074] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. This is the sum of the weights of samples belonging to the left subset under category k in the sample set;
[0075]
[0076] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. This is the sum of the weights of samples belonging to the right subset under category k in the sample set;
[0077] Step 4.7: Based on the optimal parameter θ best We obtain the left subset and the right subset, S' L ,S' R ;in,
[0078]
[0079] Among them, (x i ,y i ) represents the sample set S Z The i-th sample, S represents the weight of the i-th sample belonging to the left child node. L This is a set of weight information for each sample belonging to its left subset. S represents the weight of the i-th sample belonging to the right child node. R This is a set of weight information for each sample belonging to its right subset.
[0080] Step 4.8, if S' L The number of samples is less than the threshold N y Set the left child node to a leaf node and label it S'. L If the category has the most occurrences, then construct the left child node G; otherwise, construct the left child node G. L And let the training set under this node be S' L d = d + 1, proceed to step 4.3;
[0081] Step 4.9, if S' R The number of samples is less than the threshold N y Set the right child node to a leaf node and label it S'. R If the category has the most occurrences, then construct the right child node G; otherwise, construct the right child node G. R And let the training set under this node be S' R d = d + 1, proceed to step 4.3;
[0082] Step 4.10: Output the decision tree model and convert it into a boundary expression.
[0083] Compared with the prior art, the beneficial effects of the present invention are as follows: The method proposed in this invention, based on feature nonlinear transformation and skewed decision tree, can achieve boundary fitting of high-dimensional static security domain of power system, reduce the error with the actual boundary, improve the boundary fitting accuracy, and provide support for subsequent power system security assessment and control based on security domain. Attached Figure Description
[0084] Figure 1This is a schematic diagram of the high-dimensional static security domain boundary fitting method for power systems according to an embodiment of the present invention;
[0085] Figure 2 This is a schematic diagram of boundary sample search in an embodiment of the present invention. Detailed Implementation
[0086] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0087] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0088] The present invention will be further described below with reference to specific embodiments, but these are not intended to limit the scope of the invention.
[0089] This embodiment presents a method for fitting the high-dimensional static safety domain boundary of a power system, including sampling the generator output of the power system based on the Latin hypercube sampling algorithm. Considering the system generator output constraints, node load values are sampled, and samples within the safety domain are selected through power flow calculation to form an initial sample set. A boundary sample search algorithm is proposed to find one sample within the safety domain and one sample outside the safety domain for each sample in the initial sample set, satisfying that the distance between the two is less than a set distance threshold. The data in the boundary sample set of the original power injection space are transformed into a new three-dimensional feature space through a deep neural network model. The boundary is extracted in the feature space using a weighted skew decision tree algorithm based on information gain ratio, and the boundary performance is evaluated to select the optimal boundary. This embodiment's method can achieve fitting of the high-dimensional boundary of the power system safety domain and reduce the error with the actual boundary.
[0090] This embodiment is achieved through the following technical solution: a method for fitting the boundary of a high-dimensional static security domain in a power system, comprising the following steps:
[0091] S1: Generation of the initial sample set; First, the generator output of the power system is sampled based on the Latin hypercube sampling algorithm. Then, considering the generator output constraints of the system, the nodal load values are sampled; through power flow calculation, samples within the safe region are selected to form the initial sample set S = {(x i ,y i )}, i∈1,2,...,N S ,y i =0; where S is the initial sample set, x iInject power into the node in the i-th sample, y i For sample labels, 0 indicates that the sample is within the safe zone, and N... S The initial sample set contains the number of samples.
[0092] S2: For each sample x in the initial sample set. i Find a sample x that is within the safe region s,i A sample x from outside the security domain u,i and satisfy ||x u,i -x s,i || 2 ≤ξ, where ξ is the distance threshold, which can be set according to engineering requirements. Ultimately, this forms the boundary sample set S. B .
[0093] S3: Transfer the boundary sample set S B The original power injection space X in which the data is located is transformed into a new three-dimensional feature space Z through a deep neural network model.
[0094] S4: Extract the boundary in the feature space Z using a weighted skew decision tree algorithm based on information gain ratio, evaluate the boundary performance, and select the optimal boundary.
[0095] In specific implementation, such as Figure 1 As shown, the specific implementation of S1 includes:
[0096] S1.1: Generator output data is generated based on the Latin hypercube sampling algorithm. Specifically, consider an N-node power system containing N... g There are N generator nodes. l For each load node, the upper and lower limits of generator output are:
[0097] [P g_min,j ,P g_max,j ],j∈1,2,...,N g (1)
[0098] In the formula, P g_min,j P is the lower limit of the output of the j-th generator. g_max,j This represents the upper limit of the output of the j-th generator.
[0099] Set the initial sample set size to N. init Based on the power output data of the Latin hypercube sampling generator, it is denoted as:
[0100]
[0101] In the formula, P g,i,j Let be the output of the j-th generator in the i-th sample, and:
[0102]
[0103] S1.2: After sampling the generator output, considering that the proposed model needs to search for boundary samples based on a large number of initial samples within the safety region, it is necessary to improve the performance of samples within the safety region in N... init The proportion in the initial sample. Therefore, a load node sampling method considering generator output constraints is proposed. Specifically, for the i-th sample, the total generator output sampling value is P. g_out,i ,but The upper and lower limits of the system balancing machine output are [P] s_min ,P s_max Let N be the number of nodes in the N-axis. l The total demand sample value of each load node is Without considering network losses, in order to ensure that the output of the system balancing machine does not exceed the limit, P L,i Must meet:
[0104]
[0105] The constraints in equation (4) are in N l A convex hyperpoly is formed in 3D space. To achieve uniform sampling of load values within the hyperpoly, the problem is modeled as sampling N load values within the hyperpoly as shown in equation (5). l Sampling is performed on a dimensional vector.
[0106] stA×P l ≤b (5)
[0107] In the formula, A∈(N) l +2)×N l P l ∈N l ×1, b∈(N) l +2)×1, which are all constraint coefficients in equation (4).
[0108] S1.3: Construct a linear objective function:
[0109]
[0110] In the formula, f(P) l ) is the variable P l A linear function.
[0111] The optimal solution P is obtained using linear programming. l,0 P l,0 It is actually a vertex of the hyperpolyhedron represented by equation (5).
[0112] S1.4: with P l,0 Given initial values, we need to find the center of the hyperpolyhedron. To do this, we construct a nonlinear optimization problem:
[0113]
[0114] In the formula, A i,: Let P be the element in the i-th row of matrix A. l,cen It is the geometric center of the aforementioned convex hyperpolyhedron.
[0115] S1.5: with P l,cen Starting from the point of origin, randomly initialize the sampling direction. Solve for the point P l,cen And the two intersection points o1, o2 of the line with direction u and the polyhedron, specifically,
[0116]
[0117] In the formula, z and c are intermediate calculation quantities, and c p c n o1 and o2 are the intersection points of the line with each plane (including the extended plane) of the polyhedron, and o1 and o2 are the actual intersection points of the line with the polyhedron.
[0118] S1.6: Perform uniform sampling between points o1 and o2, that is, randomly generate sampling coefficients λ∈[0,1] to obtain sampling points:
[0119] P l,sam =P l,cen +λ·(ο1+(o2-o1))×u (9)
[0120] In the formula, P l,sam This is the final sampling point.
[0121] S1.7: Based on the above steps, for N init Load node values are sampled from each sample, and AC power flow calculations and analyses are used to select sample points within the safe region, forming an initial sample set S = {(x i ,y i )}, i∈1,2,...,N S , y i ∈{0}, where S is the initial sample set, x i Inject a power vector into the node of the i-th sample, which is derived from the generator output vector P. g,i With node load vector P l,i Composition, N S Let y be the number of samples in set S. i ∈{0} is the sample label, where 0 means that the sample is within the safe region.
[0122] like Figure 2 As shown, the specific implementation of S2 includes:
[0123] S2.1: Set the boundary distance threshold ξ and the initial search step size λ. r,set .
[0124] S2.2: Based on the number of samples N in the sample set S s Sampling N based on Latin hypercube sampling algorithm s N p The power growth direction vector is calculated, and each direction vector is normalized to form a search direction vector matrix.
[0125] S2.3: For each x in the sample set S i Execute the following algorithm:
[0126]
[0127] Finally, the boundary sample set S is obtained. B , where x s,i For the boundary samples in the safe region of the sample pair, x u,i Let S be the boundary samples in a sample pair that are outside the safe region. B CCP 2N s One sample.
[0128] like Figure 1 As shown, the specific implementation of S3 includes:
[0129] S3.1: Based on the boundary sample set data size 2N s and data dimension N p Choose a suitable neural network for nonlinear feature transformation. Generally, if the number of samples is less than 10,000 and the data dimension is less than 100, a fully connected neural network can be selected. Otherwise, other more complex neural networks such as convolutional neural networks and recurrent neural networks can be selected.
[0130] S3.2: Select the adaptive moment estimation algorithm as the neural network optimizer, set the neural network hyperparameters, train the model, select the optimal model, and set the boundary sample set S. B The original power injection space X in which the data resides is transformed into a new three-dimensional feature space Z through a deep neural network model, resulting in the dataset S in the feature space. Z .
[0131] like Figure 1 As shown, the specific implementation of S4 includes:
[0132] S4.1: In the weighted skewed decision tree model with a set information gain ratio, the input condition for each non-leaf node is the training dataset S. Z , (z i ,y i )∈S zi = 1, 2, 3, ..., 2N s Set the maximum depth of the model to D, and the depth of the current node to d;
[0133] The training dataset under the root node is the dataset S generated in step 3.2. Z The training datasets for other non-leaf nodes are the left subsets S' obtained by partitioning the training set of their parent nodes. L right subset S' R ;
[0134] S4.2: Based on dataset S Z Create the root node G of the model and set the current node depth d = 0;
[0135] S4.3: If the current node depth d > the maximum model depth D, then node G is set as a leaf node, and its label is dataset S. Z The label k with the largest number of internal samples corresponds to the label; otherwise, proceed to S4.4.
[0136] Step 4.4: If dataset S Z If all samples belong to the same category k, then node G is set as a leaf node with label k; otherwise, go to S4.5.
[0137] S4.5: Randomly initialize model parameters θ0;
[0138] S4.6: The minimum value of the objective function of the model is solved based on the quasi-Newton algorithm and the initial value θ0, as shown in Equation (10), and the optimal parameters θ of the model are obtained. best ;
[0139]
[0140] Where L(θ) is the model objective function, λ is the L2 regularization coefficient, and θ is the training parameter at each node of the model, ||θ|| 2 Let H(S) be the 2-norm of θ. Z H(S) is the empirical entropy of the sample set S. Z |θ) represents the sample set S Z Conditional empirical entropy under θ;
[0141]
[0142] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample; |S k | is the sample set S Z The number of samples in the k-th class, |S Z | is the sample set S Z Total number of samples;
[0143]
[0144] Among them, W L W is the sum of the weights of all samples belonging to the left subset. R H is the sum of the weights of all samples belonging to the right subset. L H is the weighted information entropy of the left child node. R The weighted information entropy of the right child node is given by M, where M is the sample set S under that node. Z Total number of samples, θ represents the parameters to be trained at each node of the model;
[0145]
[0146] in, For sample (x) i ,y i The weight of the left child node, S L Each sample is associated with a set of weight information of its left child node;
[0147]
[0148] in, For sample (x) i ,y i The weight of the right child node, S R Each sample is associated with a set of weight information belonging to its right child node;
[0149]
[0150] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. W is the sum of the weights of samples belonging to the left subset under class k in the sample set. L For the sample set S Z The sum of the weights of all samples belonging to the left subset;
[0151]
[0152] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. W is the sum of the weights of samples belonging to the right subset under class k in the sample set; R For the sample set S Z The sum of the weights of all samples belonging to the right subset;
[0153]
[0154] Among them, (x i ,y i ) represents the sample set S Z The i-th sample, S LS is the set of weight information of each sample belonging to the left subset. R This is a set of weight information for each sample belonging to its right subset.
[0155]
[0156] in, Let be the weight of the i-th sample belonging to the left child node. Let σ(·) be the weight of the right child node of the i-th sample, and let σ(·) be the sigmoid function.
[0157]
[0158] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. This is the sum of the weights of samples belonging to the left subset under category k in the sample set;
[0159]
[0160] Where K is the total number of categories in the sample; k represents the label of the k-th category sample in the sample. This is the sum of the weights of samples belonging to the right subset under category k in the sample set;
[0161] S4.7: Based on the optimal parameter θ best We obtain the left subset and the right subset, S' L ,S' R ;in,
[0162]
[0163] Among them, (x i ,y i ) represents the sample set S Z The i-th sample, S represents the weight of the i-th sample belonging to the left child node. L This is a set of weight information for each sample belonging to its left subset. S represents the weight of the i-th sample belonging to the right child node. R This is a set of weight information for each sample belonging to its right subset.
[0164] S4.8: If S' L The number of samples is less than the threshold N y Set the left child node to a leaf node and label it S'. L If the category has the most occurrences, then construct the left child node G; otherwise, construct the left child node G. L And let the training set under this node be S' L d = d + 1, proceed to step 4.3;
[0165] S4.9: If S'R The number of samples is less than the threshold N y Set the right child node to a leaf node and label it S'. R If the category has the most occurrences, then construct the right child node G; otherwise, construct the right child node G. R And let the training set under this node be S' R d = d + 1, then proceed to step 4.3.
[0166] S4.10: Output the decision tree model and convert it into a boundary expression.
[0167] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made based on the content of this specification should be included within the protection scope of the present invention.
Claims
1. A method for fitting the boundary of high-dimensional static security region of power system, characterized in that, Includes the following steps: Step 1: Generation of the initial sample set; Step 2, for each sample in the initial sample set Finding a sample within the security domain , a sample outside the security domain , and satisfying , is the distance threshold, set by engineering requirements; forming the boundary sample set ; Step 2.1, Set boundary distance threshold , search initial step size ; Step 2.2: Based on the sample set Number of samples Sampling based on Latin hypercube sampling algorithm indivual The power growth direction vector is calculated, and each direction vector is normalized to form a search direction vector matrix. ; Step 2.3: For each sample set In The following algorithm is used to obtain the boundary sample set. ,in For sample pairs, the boundary sample is the one that is in the safe region. For the boundary samples outside the safety region in a sample pair, the set CCP One sample; ; Step 3, the boundary sample set is constructed the original power injection space in which the data resides to a new three-dimensional feature space by a deep neural network model in which; Step 3.1, selecting a neural network for feature non-linear transformation according to the amount of data of the boundary sample set and the dimension of data ; If the number of samples is less than 10,000 and the data dimension is less than 100, choose a fully connected neural network; otherwise, choose a convolutional neural network or a recurrent neural network. Step 3.2: Select the adaptive moment estimation algorithm as the neural network optimizer, set the neural network hyperparameters, train the model, select the optimal model, and set the boundary sample set. The original power injection space where the data is located Transformed into a new three-dimensional feature space through a deep neural network model. In this process, the dataset in the feature space is obtained. ; Step 4, extracting the boundary in the feature space by the weighted skew decision tree algorithm based on information gain ratio, and evaluating the boundary performance to select the optimal boundary. Step 4, extracting the boundary in the feature space by the weighted skew decision tree algorithm based on information gain ratio, and evaluating the boundary performance to select the optimal boundary.
2. The method of claim 1, wherein the method further comprises: Step 1 includes the following steps: Step 1.1: Generate generator output data based on the Latin hypercube sampling algorithm; Set one In the power system of the node, containing A generator node, A load node, the upper and lower limits of the generator output are: (1) In the formula, For the first The lower limit of the output of a generator For the first The maximum output capacity of a single generator; The initial sample set sampling number is set as The generator output data based on the Latin hypercube sampling is: (2) wherein is the output of the jth generator in the ith sample, and is the output of the jth generator in the ith sample, and is the output of the jth generator in the ith sample, and (3) Step 1.2, the load node sampling method for generator output constraints includes the following steps: Step 1.2.1, regarding the first One sample, the total output of the generator set is sampled as follows: ,but The upper and lower limits of the system balancing machine output are: ,set up The total demand sample value of each load node is Without considering network losses, in order to ensure that the output of the system balancing machine does not exceed the limit, Must meet: (4) The constraint in equation (4) is that A convex hyper-polytope is formed in the space; the problem is modeled as sampling dimensional vectors in the hyper-polytope in equation (5): (5) wherein , , , are constraint coefficients in formula (4); Step 1.2.2: Construct a linear objective function: (6) In the formula, The variable is A linear function; The optimal solution is obtained according to a linear programming method , is a vertex of the hyperpolyhedron represented by formula (5); Step 1.2.3, solve the center of the hyper-polyhedron with as initial value; construct a non-linear optimization problem: (7) wherein is a matrix the element in the row, is the geometric center of the convex polytope. Step 1.2.4, with Starting from the point of origin, randomly initialize the sampling direction. Solve for the points that pass through. and with The two intersection points of the line with the direction and the polyhedron : (8) In the formula, , is an intermediate calculation amount, , is the intersection of the straight line and each plane of the polyhedron, including the extended plane, , is the actual intersection of the straight line and the polyhedron; Step 1.2.
5. Uniformly sampling at the points between the points, randomly generating sampling coefficients to obtain the sampling points: (9) In the formula, is the last sampling point; Step 1.3, based on step 1.2... Load node values are sampled from each sample, and AC power flow calculations and analyses are used to select sample points within the safe region, forming an initial sample set. , , ,in, For the initial sample set, For the first The node-injected power vector in each sample is derived from the generator output vector. With node load vector composition, For set Medium sample size The label is 0, which means that the sample is within the safe zone.
3. The method of claim 1, wherein the method further comprises: Step 4 includes the following steps: Step 4.1: In the weighted skewed decision tree model with information gain ratio, the input condition for each non-leaf node is the training dataset. , Set the maximum depth of the model to The current node depth is ; The training data set under the root node is the data set generated in step 3.2 The training data set under other non-leaf nodes is the left subset obtained by dividing the training set of the parent node The right subset ; Step 4.2, based on dataset Create model root node and let current node depth ; Step 4.3: If the current node depth Maximum depth of the model Then the node Let it be a leaf node, with its label being the dataset. The label with the most internal samples Otherwise, proceed to step 4.4; Step 4.4, if the dataset All samples belong to the same category Then the node Set it as a leaf node, and its label is Otherwise, proceed to step 4.5; Step 4.5, randomly initialize model parameters ; Step 4.6, based on a quasi-Newton algorithm and initial values Solving the model objective function minimum formula (10) to obtain the model optimal parameters ; (10) in, The objective function of the model is... for Regularization coefficient, These are the training parameters for each node of the model. for The 2-norm, For sample set empirical entropy, For sample set exist Conditional empirical entropy; (11) in, It is the total number of categories in the sample; Indicates the first in the sample Class sample labels; It is a sample set The Middle Number of class samples It is a sample set Total number of samples; (12) in, The sum of the weights of all samples belonging to the left subset. This is the sum of the weights of all samples belonging to the right subset. Weight the information entropy of the left child node. Weight the information entropy of the right child node. It is the set of samples under this node. Total sample size These are the parameters to be trained at each node of the model; (13) wherein, is a sample a weight belonging to a left child node, each sample is associated with a set of weight information belonging to a left child node; (14) wherein, is a sample a weight belonging to the right child node, each sample is associated with a set of weight information belonging to the right child node; (15) in, It is the total number of categories in the sample; Indicates the first in the sample Class sample labels, For the sample set The sum of the weights of samples belonging to the left subset under each category. For sample set The sum of the weights of all samples belonging to the left subset; (16) in, It is the total number of categories in the sample; Indicates the first in the sample Class sample labels, For the sample set The sum of the weights of samples belonging to the right subset under the category; For sample set The sum of the weights of all samples belonging to the right subset; (17) wherein, represents a set of samples in the set of samples, the i-th sample, is a set of left subset weight information associated with each sample, is a set of right subset weight information associated with each sample; (18) in, For the first i The weights of each sample belonging to its left child node, For the first i The weights of each sample belonging to its right child node It is the sigmoid function; (19) in, It is the total number of categories in the sample; Indicates the first in the sample Class sample labels, For the sample set The sum of the weights of samples belonging to the left subset under the category; (20) in, It is the total number of categories in the sample; Indicates the first in the sample Class sample labels, For the sample set The sum of the weights of samples belonging to the right subset under the category; Step 4.7, based on optimal parameters obtaining a left subset, a right subset, ; wherein, (21) in, Represents the sample set The Middle One sample, For the first i The weights of each sample belonging to its left child node, This is a set of weight information for each sample belonging to its left subset. For the first i The weights of each sample belonging to its right child node This is a set of weight information for each sample belonging to its right subset. Step 4.8, if The number of samples is less than the threshold Set the left child node as a leaf node, and label it as... If the category has the most occurrences, then construct the left child node; otherwise, construct the left child node. And let the training set under that node be , Proceed to step 4.3; Step 4.9, if the number of samples is less than a threshold , set the right child node as a leaf node, and the label is the most frequent class in the samples, otherwise, construct the right child node and let the training set under this node be , go to step 4.3; Step 4.10: Output the decision tree model and convert it into a boundary expression.