A dynamic safety domain boundary fitting method based on transfer learning
By fitting the dynamic safety domain boundary of the power system based on transfer learning methods and support vector machine technology, it solves the problems of processing unlearned fault sample sets and non-observability problems in the existing technology, and achieves high-level processing of massive data. Accurate classification and accurate definition of safety domain boundaries are suitable for transient stability analysis and preventive correction of power systems.
Patent Information
- Application Number
- CN202111564577.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-12-20
AI Technical Summary
It is difficult to effectively mine transient stability-related knowledge from massive power system data with existing technology, especially when dealing with unlearned fault sample sets. Moreover, the non-observability of traditional methods makes classifiers unable to be used for optimization problems and cannot accurately fit dynamics. Security domain boundaries.
A method based on transfer learning is used to build a model by training labeled data that is different but related to the target set data distribution, and uses support vector machine technology to fit the linear dynamic safe domain boundary. Iteratively optimizes the joint distribution adaptive method and the maximum mean difference distance. Pseudo labels are generated to improve the accuracy of the classifier, and a hyperplane is constructed to divide the stable and unstable dynamic security domain boundaries.
It achieves high-precision classification of massive unlabeled data, provides a clear safety margin, can be used for transient power angle stability analysis and preventive correction of power systems, and provides a considerable dynamic safety domain boundary model to meet the needs of actual engineering. need.
Smart Images

Figure CN114358320B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system security domain theory, and in particular to a problem of fast fitting optimization of dynamic security domain boundaries based on transfer learning theory. Background Art
[0002] Due to the gradual maturity of wide-area measurement systems and the continuous development of big data theory, a large amount of power system data can be used to evaluate the transient stability of power systems. However, with the continuous increase in the scale and complexity of power systems, the development of the power industry faces new challenges. The continuous updating of smart grids has accumulated a large amount of dispatching and operation data for dispatching centers at all levels. Online safety and stability analysis is carried out every 15 minutes, and the amount of calculation data and result data can reach about 1G, and the amount of data per month exceeds 2T. Therefore, there is an urgent need for effective technology to mine knowledge related to transient stability from massive data to help operators judge the stability level and weak links. However, most mainstream studies use machine learning technology to train big data. Although this allows the daily accumulated power system data to be applied to future scenarios, on the one hand, the trained classifier is difficult to deal with unlearned fault sample sets, and on the other hand, its unobservability makes the trained classifier unusable for optimization problems. The main method of using data mining methods for power system stability analysis is classification, and its output is whether the system is stable. In fact, it estimates the dynamic safety domain boundary of the power system based on a large number of samples, and then judges whether the new input sample is within or outside the boundary, corresponding to the stability or instability of the operating point. Summary of the invention
[0003] In order to solve the shortcomings of the prior art, the present invention mainly studies the boundary fitting problem of the dynamic safety domain, and can quantitatively give the safety margin of the operating point. Based on the transfer learning theory, the model can be established by training the data with different but related labels (+1 represents a stable operating point, -1 represents an unstable operating point) from the target set data distribution, and then the target set data is labeled. Finally, based on the labeled data, the support vector machine technology is used to fit the linear dynamic safety domain boundary.
[0004] The present invention is implemented by adopting the following technical scheme:
[0005] A dynamic safety domain boundary fitting method based on transfer learning is provided. The method is to classify an untrained sample set by using a fault-trained classifier after obtaining a large amount of power grid operation data based on a dynamic safety domain boundary model, and to fit the boundary of the dynamic safety domain by using a support vector machine technology. The method specifically includes the following steps:
[0006] Step 1: Obtain the source domain sample set, target domain sample set, and active output upper limit and active output lower limit of the system nodes of the specified power system;
[0007] Step 2: Offline stage: obtain a transient stability classifier by training a source domain sample set with existing labels to filter out unknown fault sets;
[0008] Step 3: Online stage: Obtain labeled target domain samples, i.e., pseudo labels, by iteratively calculating the marginal distribution difference and conditional distribution difference between the source domain sample set and the target domain sample set;
[0009] The support vector machine method is used to find the boundary of the dynamic security domain that can be divided into stable and unstable in the labeled target domain sample space;
[0010] Step 4: Use the determined dynamic safety region boundary for the transient power angle stability classifier or subsequent preventive correction process.
[0011] Furthermore, the deviation of the marginal distribution and conditional distribution between the source domain sample set and the target domain sample set in step 3 is achieved by classifying the target domain samples using a joint distribution adaptive method, including the following steps:
[0012] The joint distribution adaptive method is to use P(X s ) and P(X t ), and P(y s |X s ) and P(y t |X t ) to approximate the difference between the two domains, that is
[0013] D(D s , D t )≈||P(X s )-P(X t )||+||P(y s |X s )-P(y t |X t )|| (1)
[0014] Among them, P(X s ) and P(X t ) is the marginal distribution, P(y s |X s ) and P(y t |X t ) is the conditional distribution, X represents the input sample, y represents the label of the sample set, s represents the source domain set, t represents the target domain set, D(D s ,D t ) represents the maximum mean difference;
[0015] By introducing the adaptive matrix A, the transformed P(A T X s ) and P(AT X t ) can be as close as possible, and at the same time, P(y s |A T X s ) and P(y t |A T X t ) should also be as small as possible;
[0016] (1) Edge distribution adaptation
[0017] As shown in formula (2), the maximum mean difference distance MMD is used to minimize the deviation between the source domain and the target domain. Then, by introducing the kernel method, formula (2) can be simplified to formula (3);
[0018]
[0019] MMD 1 =tr(A T XM1X T A) (3)
[0020] Where X = [X s ,X t ], M1 is the MMD matrix of the marginal distribution;
[0021]
[0022] (2) Conditional Distribution Adaptation
[0023] As shown in formula (5), the maximum mean difference distance MMD is also used to minimize the deviation between the source domain and the target domain. Then, by introducing the kernel method, formula (5) can be simplified to formula (6);
[0024]
[0025]
[0026] Among them, M2 is the MMD matrix of the conditional distribution;
[0027]
[0028] (3) Optimization solution
[0029] Then, combining these two distances, a generalized optimization problem can be obtained, as shown in equation (8), which can be further transformed into equations (9) and (10).
[0030] minD(D s ,D t )=MMD 1 +MMD 2 (8)
[0031]
[0032] sA T XHX T A=I (10)
[0033] Where I is the identity matrix, H is the center matrix, and λ is the regularization parameter.
[0034] By solving equation (11), the adaptive matrix A can be obtained.
[0035]
[0036] Among them, Φ is the Lagrange multiplier; in order to obtain better migration characteristics, the optimization problem needs to be solved iteratively, and then the labels generated by the previous iteration are used as pseudo labels. The accuracy can be improved after multiple iterations.
[0037] Furthermore, in step 3, the support vector machine method is used to find the boundary process of the dynamic security domain that can be divided into stable and unstable in the labeled target domain sample space:
[0038] Given a training sample set D = {(x1,y1),(x2,y2),…(x m ,y m )},y={-1,+1}, the core idea of classification learning is to find a hyperplane in the sample space based on the training set D, so as to separate samples of different categories; as shown in formula (12), it is the linear form of the hyperplane:
[0039] w T x+b=0 (12)
[0040] Where w=(w1;w2;…;w d ) is the normal vector of the hyperplane, which determines the direction of the hyperplane, and b is the distance between the hyperplane and the origin;
[0041] The maximum interval of heterogeneous support vectors is found by constructing equations (13) and (14), as follows:
[0042]
[0043] sty i (w T x i +b)≥1,i=1,2,…,m (14)
[0044] Among them, y i The label representing the sample;
[0045]
[0046] Since it is difficult to find a linearly separable hyperplane in practical applications, the slack variable ξ is introduced i , formula (13) can be rewritten as follows:
[0047]
[0048] sty i (w T x i +b)≥1-ξ i ,i=1,2,…,m (17)
[0049] ξ i ≥0 (18)
[0050] Among them, C>0 is the penalty factor.
[0051] Then, using the Lagrange multiplier method, equations (16)-(18) can be transformed into equations (19)-(21), which will be more conducive to solving the problem;
[0052]
[0053]
[0054] 0≤α i ≤C,i=1,2,…,m (21)
[0055] Among them, α i is the Lagrange multiplier;
[0056] Finally, the coefficients and displacement of the hyperplane can be calculated through equations (22) and (23);
[0057]
[0058]
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] First, based on the transfer learning technology, the classifier trained with labeled data is used to classify the unlabeled data, and the massive unlabeled data is classified. For the massive unlabeled data, the marginal distribution and conditional distribution deviation between the source domain and the target domain are minimized through multiple iterations, thereby giving a high-precision classification effect. Then, the linear dynamic safety domain boundary model is fitted using the obtained data set and label set, and the accuracy of the model is improved through a certain translation, giving a linear dynamic safety domain boundary suitable for actual engineering. However, the traditional safety domain fitting method cannot judge the stability of untrained faults, and cannot provide a better reference for subsequent preventive correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0062] Figure 1 A flow chart of the dynamic security zone boundary fitting method provided by the present invention;
[0063] Figure 2 Target domain data with different data distributions provided by the present invention; DETAILED DESCRIPTION
[0064] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0065] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0066] As introduced in the background technology, the transient stability classifier in the prior art fails to express the observability of the safety domain, and the traditional method is difficult to use for actual prevention and correction. In order to solve the above technical problems, this application proposes a dynamic safety domain boundary fitting method based on transfer learning, which applies a classifier trained based on one fault set to different fault sets, and is explicitly observable.
[0067] The core content of the invention can be summarized as follows:
[0068] (1) A dynamic safety domain boundary fitting method based on transfer learning is proposed. This method uses the trained model to label unknown fault set samples, iteratively minimizes the marginal distribution difference and conditional distribution difference between source domain samples and target domain samples, and then obtains new samples with small labels.
[0069] (2) In order to construct the boundary of the dynamic safety domain in the form of a hyperplane, which is convenient for subsequent preventive correction, the present invention uses a support vector machine to fit the boundary of the dynamic safety domain. The active power output of the generator and the active power of the load are selected as the main features, and then mapped to the transient power angle stability of the power system. Although the linear dynamic safety domain boundary cannot 100% determine whether the operating point in the critical state is stable, its error can meet the requirements within the range allowed by the actual project.
[0070] The dynamic security domain boundary fitting method based on transfer learning can be divided into the following parts:
[0071] (1) Constructing a joint distribution adaptive expression. The goal of the joint distribution adaptive method is to reduce the distance between the joint probability distribution of the source domain and the target domain, thereby completing transfer learning;
[0072] (2) By iteratively minimizing the joint distribution adaptive distance, we obtain labeled target domain samples. Then, based on the optimization idea, we maximize the sum of the distances from heterogeneous support vectors to the hyperplane and find a partitioning hyperplane in the sample space.
[0073] For the convenience of readers’ understanding, the method is described as follows:
[0074]
[0075]
[0076] In order to better introduce the boundary method mechanism proposed in this invention, the following introduces the migration characteristics of the sample set and the boundary fitting of the security domain respectively. Figure 1 , Figure 2 shown.
[0077] 1. Migration characteristics of sample sets
[0078] The goal of the joint distribution adaptation method is to reduce the distance between the joint probability distribution of the source domain and the target domain, thereby completing transfer learning. Formally speaking, the joint distribution adaptation method is to use P(X s ) and P(X t ), and P(y s |X s ) and P(y t |X t ) to approximate the difference between the two domains, that is
[0079] D(D s , D t )≈||P(X s )-P(X t )||+||P(y s |Xs )-p(y t |X t )|| (1)
[0080] Among them, P(X s ) and P(X t ) is the marginal distribution, P(y s |X s ) and P(y t |X t ) is the conditional distribution, X represents the input sample, y represents the label of the sample set, s represents the source domain set, t represents the target domain set, D(D s ,D t ) represents the maximum mean difference.
[0081] By introducing the adaptive matrix A, the transformed P(A T X s ) and P(A T X t ) can be as close as possible, and at the same time, P(y s |A T X s ) and P(y t |A T X t ) should also be as small as possible.
[0082] (1) Edge distribution adaptation
[0083] As shown in formula (2), the maximum mean difference distance (MMD) is used to minimize the deviation between the source domain and the target domain. Then, by introducing the kernel method, formula (2) can be simplified to formula (3).
[0084]
[0085] MMD 1 =tr(A T XM1X T A) (3)
[0086] Where X = [X s ,X t ], M1 is the MMD matrix of the marginal distribution.
[0087]
[0088] (2) Conditional Distribution Adaptation
[0089] As shown in formula (5), the maximum mean difference distance MMD is also used to minimize the deviation between the source domain and the target domain. Then, by introducing the kernel method, formula (5) can be simplified to formula (6).
[0090]
[0091]
[0092] Where M2 is the MMD matrix of the conditional distribution.
[0093]
[0094] (3) Optimization solution
[0095] Then, combining these two distances, a generalized optimization problem can be obtained, as shown in equation (8), which can be further transformed into equations (9) and (10).
[0096] minD(D s ,D t )=MMD 1 +MMD 2 (8)
[0097]
[0098] sA T XHX T A=I (10)
[0099] Where I is the identity matrix, H is the center matrix, and λ is the regularization parameter.
[0100] By solving equation (11), the adaptive matrix A can be obtained.
[0101]
[0102] Among them, Φ is the Lagrange multiplier. In order to obtain better migration characteristics, the optimization problem needs to be solved iteratively, and then the labels generated by the previous iteration are used as pseudo labels. After multiple iterations, the accuracy can be improved.
[0103] 2. Boundary Fitting of Security Domain
[0104] Given a training sample set D = {(x1,y1),(x2,y2),…(x m ,y m )},y={-1,+1}, the core idea of classification learning is to find a hyperplane in the sample space based on the training set D, so as to separate samples of different categories. As shown in formula (12), it is the linear form of the hyperplane.
[0105] w T x+b=0 (12)
[0106] Where w=(w1;w2;…;w d) is the normal vector of the hyperplane, which determines the direction of the hyperplane, and b is the distance between the hyperplane and the origin. In order to be similar to the safety domain construction form of this major, the hyperplane coefficient of the safety domain is solved by a=-w / b.
[0107] The maximum interval of heterogeneous support vectors is found by constructing equations (13) and (14), as follows:
[0108]
[0109] sty i (w T x i +b)≥1,i=1,2,…,m (14)
[0110] Among them, y i Represents the label of the sample.
[0111]
[0112] Since it is difficult to find a linearly separable hyperplane in practical applications, the slack variable ξ is introduced i , formula (13) can be rewritten as follows:
[0113]
[0114] sty i (w T x i +b)≥1-ξ i ,i=1,2,…,m (17)
[0115] ξ i ≥0 (18)
[0116] Among them, C>0 is the penalty factor.
[0117] Then, using the Lagrange multiplier method, equations (16)-(18) can be transformed into equations (19)-(21), which will be more conducive to solving the problem.
[0118]
[0119]
[0120] 0≤α i ≤C,i=1,2,…,m (21)
[0121] Among them, α i is the Lagrange multiplier.
[0122] Finally, the coefficients and displacement of the hyperplane can be calculated through equations (22) and (23).
[0123]
[0124]
Claims
1. A dynamic security domain boundary fitting method based on transfer learning, characterized in that: The method is based on a dynamic safety domain boundary model to obtain a large amount of power grid operation data and use a fault-trained classifier to classify an untrained sample set, and at the same time use a support vector machine technology to fit the boundary of the dynamic safety domain, specifically including the following steps: Step 1: Obtain the source domain sample set, target domain sample set, and active output upper limit and active output lower limit of the system nodes of the specified power system; Step 2: Offline stage: The unknown fault set samples are labeled by the new samples in the trained model, and the transient stability classifier is obtained from the labeled source domain sample set to screen the unknown fault set; Step 3: Online stage: Obtain labeled target domain samples, i.e., pseudo labels, by iteratively calculating the marginal distribution difference and conditional distribution difference between the source domain sample set and the target domain sample set; including: The joint distribution adaptive method is to use P(X s ) and P(X t ), and P(y s |X s ) and P(y t |X t ) to approximate the difference between the two domains, that is D(D s ,D t )≈||P(X s )-P(X t ||+||P(y s |X s )-P(y t |X t )|| (1) Among them, P(X s ) and P(X t ) is the marginal distribution, P(y s |X s ) and P(y t |X t ) is the conditional distribution, X represents the input sample, y represents the label of the sample set, s represents the source domain set, t represents the target domain set, D(D s , D t ) represents the maximum mean difference; By introducing the adaptive matrix A, the transformed P(A T X s ) and P(A T X t ) can be as close as possible, and at the same time, P(y s |A T X s ) and P(y t |A T X t ) should also be as small as possible; (1) Edge distribution adaptation As shown in formula (2), the maximum mean difference distance MMD is used to minimize the deviation between the source domain and the target domain. Then, by introducing the kernel method, formula (2) can be simplified to formula (3); MMD 1 =tr(A T XM1X T A) (3) Where X = [X s , X t ], M1 is the MMD matrix of the marginal distribution; (2) Conditional Distribution Adaptation As shown in formula (5), the maximum mean difference distance MMD is also used to minimize the deviation between the source domain and the target domain. Then, by introducing the kernel method, formula (5) can be simplified to formula (6); Where M2 is the MMD matrix of the conditional distribution; (3) Optimization solution Then, combining these two distances, a generalized optimization problem can be obtained, as shown in formula (8), which is further transformed into formulas (9) and (10); myD(D s ,D t )=MMD 1 +MMD 2 (8) s.t.A T XHX T A=I (10) Where I is the unit matrix, H is the center matrix, and θ is the regularization parameter. By solving equation (11), the adaptive matrix A can be obtained. Among them, Φ is the Lagrange multiplier. In order to obtain better migration characteristics, the optimization problem needs to be solved iteratively, and then the labels generated by the previous iteration are used as pseudo labels. The accuracy can be improved after multiple iterations. The support vector machine method is used to find the boundary of the dynamic security domain that can be divided into stable and unstable in the labeled target domain sample space; Step 4: Use the determined dynamic safety region boundary for the transient power angle stability classifier or subsequent preventive correction process.
2. According to the method for fitting dynamic security domain boundaries based on transfer learning in claim 1, it is characterized in that: In step 3, the support vector machine method is used to find the boundary process of the dynamic security domain that can be divided into stable and unstable in the labeled target domain sample space: Given a training sample set D = {(x1, y1), (x2, y2), ... (x m ,y m )}, y = {-1, +1}, the core idea of classification learning is to find a hyperplane in the sample space based on the training set D, so as to separate samples of different categories; As shown in formula (12), it is the linear form of the hyperplane: w T x+b=0 (12) Where w=(w1;w2;...;w d ) is the normal vector of the hyperplane, which determines the direction of the hyperplane, and b is the distance between the hyperplane and the origin; The maximum interval of heterogeneous support vectors is found by constructing equations (13) and (14), as follows: s.t.y i (w T x i +b)≥1,i=1,2,...,m (14) Among them, y i The label representing the sample; Since it is difficult to find a linearly separable hyperplane in practical applications, the slack variable ξ is introduced i , formula (13) can be rewritten as follows: s.t.y i (w T x i +b)≥1-ξ i ,i=1,2,...,m (17) ξ i ≥0 (18) Where C>0 is the penalty factor; Then, using the Lagrange multiplier method, equations (16)-(18) can be transformed into equations (19)-(21), which will be more conducive to solving the problem; 0≤α i ≤C,i=1,2,...,m (21) Among them, α i is the Lagrange multiplier; Finally, the coefficients and displacement of the hyperplane can be calculated through equations (22) and (23);
