A distribution network topology identification method and device based on improved SVM algorithm

By applying the topological identification method based on SVM improved algorithm in the distribution network, using the dual-parameter kernel function and penalty parameter optimization, the problems of low accuracy and high cost of traditional methods are solved, and the accurate identification and dynamic reconstruction of the distribution network topological structure are achieved.

CN117436212BActive Publication Date: 2025-04-08WUHAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311309029.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-04-08
Estimated Expiration
2043-10-10

AI Technical Summary

Technical Problem

Traditional distribution network modeling methods have low accuracy and high cost, and are difficult to cope with the topological changes and uncertainties caused by distributed power access.

Method used

The distribution network topology identification method based on SVM improved algorithm is adopted. By designing a dual-parameter kernel function, the sensitivity of the kernel function to the kernel parameters is reduced, the accuracy of classification results is improved, and the kernel function parameters are optimized through the penalty parameters and grid search method.

Benefits of technology

It improves the accuracy and intelligence of the topological parameters verification of distribution networks, reduces the verification cost, solves the problem of "blind adjustment", and adapts to the needs of expanding the scale of distribution networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117436212B_ABST
    Figure CN117436212B_ABST
Patent Text Reader

Abstract

The present invention relates to a power system topology identification technology, and specifically to a distribution network topology identification method and device based on an improved SVM algorithm. The method comprises the following steps: using historical measurement data of the distribution network and its corresponding topology structure to perform offline training to obtain an SVM training model; using real-time measurement data of the distribution network to drive the SVM classification model to achieve online classification of the distribution network topology structure. The SVM algorithm is introduced into the distribution network topology identification, so that the subsequent identification of specific parameters of the distribution network is based on a more accurate topology structure, which can significantly improve the speed and accuracy of distribution network parameter identification and state estimation; and the SVM algorithm is improved, and on the basis of the Laplace kernel function and the Gaussian kernel function, an SVM kernel function with better application effect is found. The new kernel function can achieve the optimal classification effect for different types of data sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power system topology identification, and in particular relates to a distribution network topology identification method and equipment based on an improved SVM algorithm. Background Art

[0002] Accurate topology and line parameters are the basis for power system state estimation, power flow calculation, setting calculation and other analysis methods, and are the prerequisites for power grid planning, optimized operation and stable control. However, in actual scenarios, due to the lack of real-time measurement equipment, line aging, access to distributed power sources and other reasons, topology changes and deviations from theoretical values ​​often occur. The traditional distribution network modeling method is single, low in precision, and the cost of manual parameter verification is high. Especially with the access of distributed power sources in the distribution network, in order to cope with the impact of its uncertainty on the reliability and safety of system operation, it is necessary to rely on accurate topology and line parameters to dynamically reconstruct and intelligently control the network topology. The data-driven topology identification method based on the SVM kernel function can not only improve the accuracy and intelligence of the distribution network topology parameter verification, solve the "blind adjustment" problem, but also reduce the verification cost and promote the economic operation of the distribution network.

[0003] Kernel function is the core method of support vector machine (SVM) to achieve classification goals. Currently, commonly used kernel functions include Gaussian kernel function and Laplace kernel function. For a single Gaussian kernel function, the method of improving kernel parameters is usually used to select the optimal kernel parameters for different data sets. However, although the improved kernel function enhances its generalization ability, it is more dependent on and sensitive to kernel parameters. This may lead to a lot of time spent on finding the value of kernel parameters and overfitting when learning different data sets. The Laplace kernel function has low sensitivity to kernel parameters, but there are problems such as inaccurate calculation results. Therefore, it is necessary to design a new kernel function to weaken the sensitivity of the Gaussian kernel function to kernel parameters and improve the accuracy of the calculation results of the Laplace kernel function. Summary of the invention

[0004] The present invention proposes a topological structure identification method with higher accuracy based on SVM classifier. The method reduces the sensitivity of kernel function to kernel parameters, thereby avoiding overfitting and improving the accuracy of classification results. In the topological identification process of the distribution network, the values ​​of p, q and v of each node are obtained and form a data set. After the data set is normalized, the data is mapped to a high-dimensional space through a kernel function, and the label value of the data is combined to find the classification hyperplane, that is, the topological structure of the distribution network is jointly identified based on the label of the SVM multi-classification model.

[0005] The present invention provides a distribution network topology identification method based on an improved SVM algorithm, comprising the following steps:

[0006] Step 1: Preprocess the known data set;

[0007] Step 2: Based on the data set obtained by preprocessing, the designed dual-parameter kernel function is used to classify it and obtain the optimal kernel function;

[0008] Step 3: Use the classified data to identify the topology of the distribution network.

[0009] According to a distribution network topology identification method based on an improved SVM algorithm provided by the present invention, step 1 is based on the SVM multi-classification principle, and the maximum margin classifier model is obtained as a convex optimization problem containing n constraints; in order to make the model simpler, the Lagrangian function is introduced to further simplify it; the simplified model contains complex inner product operations, and for this purpose, a kernel function is used to simplify the inner product operation, and at the same time, the related parameters of the improved kernel function are added to the optimization process to obtain the best classification effect. However, for practical applications, it is still necessary to consider the existence of noise in the sample points or the inability of the actual data to be completely clearly separated. For this reason, a penalty parameter c is introduced to represent the error value allowed in the experimental results. In addition, in the program design, in order to make the classification results clearer, new feature values ​​are added to the data set to draw a 3D visualization image. Based on the use of the SVM multi-classification model labels, the distribution network topology structure is jointly identified.

[0010] The implementation of step 1 includes the following steps:

[0011] (a) SVM multi-classification principle;

[0012] SVM is a generalized linear classifier that performs binary classification of data in a supervised learning manner. Its decision boundary is the maximum margin hyperplane solved for the learning samples.

[0013] The SVM method can be used to build a classification model based on sample points of known classification, and use the model to classify points of unknown categories.

[0014] The equation of the hyperplane is w T x+b=0, which is used to distinguish the sample points into two categories. Define the margin as margin=mindistance, where the margin is represented by the minimum distance from all sample points to the hyperplane. Samples are represented by x i Indicates that the label is y i Indicates. Label y i =1,y i =0 and y i =-1 respectively represent the three categories in the sample, where y i =1 means that the sample points are distributed above the hyperplane, yi = 0 means the sample point falls on the hyperplane, y i =-1 means that the sample points are distributed below the hyperplane.

[0015] Then the maximum margin classifier model is:

[0016]

[0017] Where w is the normal vector of the hyperplane, its size is the distance from [0, 0] to the separating hyperplane, b is a constant, y i is the label value of the sample. Label y i =1,y i =0 and y i =-1 respectively represent the three categories in the sample, where y i =1 means that the sample points are distributed above the hyperplane, y i = 0 means the sample point falls on the hyperplane, y i =-1 means that the sample points are distributed below the hyperplane. Since in practical applications, the interval between the sample points falling on the hyperplane and the hyperplane is 0, this can be ignored when seeking the minimum interval. After simplification, we can get:

[0018] where i=1,2,...,n (13)

[0020] Since the SVM binary classification model is a convex optimization problem with n constraints, the binary classification problem can be transformed into a quadratic optimization problem with constraints by introducing the Lagrangian function.

[0021] (ii) Introducing Lagrangian function;

[0022] The Lagrangian function is introduced as follows:

[0023]

[0024] λ i ≥0,1-y i (ω T x i +b)≤0 (14)

[0025] where λ i is the Lagrange multiplier corresponding to each constraint in the original model.

[0026] Introducing the Lagrangian function into the SVM binary classification model yields:

[0027]

[0028] If 1-y i (w T xi +b)>0, then If 1-y i (w T x i +b)≤0, then

[0029] so

[0030] The model can be transformed from the strong duality relationship into:

[0031]

[0032] Calculate the partial derivatives of L(ω,b,λ) with respect to b and w to make them always equal to 0, and substitute the relationship into L(ω,b,λ), we can get

[0033]

[0034] Where: N is the total number of samples; λ i and i are the Lagrange multiplier and topological label of the i-th sample respectively.

[0035] It can be seen from the above formula that the simplified model contains a large number of complex inner product operations. In order to simplify this operation, the kernel function is introduced; at the same time, the data of the data set is processed to reduce the weight of abnormal data.

[0036] (3) Data processing and kernel functions;

[0037] The present invention uses the values ​​of p, q and v of each node as input samples and forms a data set. In order to minimize the impact of abnormal data in the data set on the experimental results, the data set is zero-normalized to reduce the weight of abnormal data:

[0038]

[0039] Where x is the original value of a feature, μ is the average value of the feature in all samples, σ is the standard deviation of the feature in all samples, and x * is the eigenvalue after standardization ~ N (0, 1).

[0040] After standardization, the features of different dimensions are numerically comparable, and the size of the obtained parameter value can reflect the contribution of different features to the sample, thereby improving the accuracy of the classifier. After the data set is zero-standardized, the distance between points is reduced, and the weight assigned to abnormal data is reduced, so overfitting will not occur.

[0041] Through the kernel function K(x i ,x j) Input the data set into the high-dimensional space, where the kernel function uses the improved SVM kernel function, which is expressed as:

[0042]

[0043] In the formula, σ is the kernel parameter, x i and x j are the i-th and j-th input samples, respectively, and α and β are the parameters corresponding to the Gaussian kernel function and the Laplace kernel function, respectively. However, in practical applications, it is still necessary to consider the existence of noise in the sample points or the inability of the actual data to be completely clearly separated. For this reason, the penalty parameter c is introduced to represent the error value allowed in the experimental results.

[0044] Therefore, two loop algorithms are introduced. The outer loop algorithm optimizes the penalty parameter c, which represents the threshold of the error rate, while the inner loop optimizes the parameters α and β to obtain the maximum accuracy.

[0045] (iv) Introducing the penalty parameter c;

[0046] When there is noise in the sample points or the actual data cannot be completely clearly separated, the classification effect of the hard margin SVM binary classification model will be affected. Therefore, the penalty parameter is introduced to transform the hard margin SVM binary classification model into a soft margin SVM binary classification model. The soft margin means that a small error in the classification is allowed. Corresponding to the model, it means allowing There is an error, which is represented by the loss function.

[0047] If y i (w T x i +b)-1≥0, then loss=0;

[0048] If y i (w T x i +b)-1<0, then loss=1-y i (w T x i + b);

[0049] Then there is

[0050] Let ξ i =1-y i (w T x i +b),ξ i ≥0, then

[0051] After introducing the loss function, the SVM two-classification model is transformed into:

[0052]

[0053] Introduce the Lagrangian function:

[0054]

[0055] Taking partial derivatives of ξ, w, and b respectively, we get:

[0056]

[0057] From the KKT complementary condition, we know that:

[0058] λ i *(y i (w T x i +b)-1+ξ i )=0

[0059] r i ξ i =0

[0060] Substitute into the SVM two-classification model:

[0061]

[0062] Among them, λ i is the Lagrange multiplier corresponding to each constraint, x i represents the sample, y i Indicates a label. Label y i =1 and y i = -1 represents two categories in the sample. C is a penalty parameter, which is used to characterize the degree of error allowed when noise or actual data cannot be completely clearly separated. As a kernel function, the data set can be input into a high-dimensional space to simplify the inner product operation.

[0063] In order to make the application of the kernel function better and obtain higher accuracy, the optimal solution of α and β is calculated.

[0064] According to a distribution network topology identification method based on an improved SVM algorithm provided by the present invention, the method for finding the optimal solution of α and β in step 2 includes a traditional manual random parameter adjustment method, a grid search method, a random search method, and a Bayesian optimization method. The present invention uses a grid search method to find the best solution, that is, to establish a model for each arrangement of all given hyperparameter values ​​specified in the grid, and to evaluate and select the best model using a cross-validation method:

[0065] The optimal kernel function is a combination of the Gaussian kernel function and the Laplace kernel function, which contains two parameters, α and β. By setting a loop to find the optimal solution of its parameters, the optimal kernel function is as follows:

[0066]

[0067] Among them, σ is the kernel parameter, x i and x j are the i-th and j-th input samples respectively, α and β are the parameters corresponding to the Gaussian kernel function and the Laplace kernel function respectively.

[0068] In order to make the kernel function obtain a higher accuracy, α and β are iterated from 0 to 1 with a step size of 0.1 respectively, and the error rate of each iteration is obtained, so as to obtain the values ​​of α and β when the error rate is minimum, which is the optimal solution of α and β.

[0069] According to a distribution network topology identification method based on an improved SVM algorithm provided by the present invention, step 3 uses the classified data to perform topology identification on the distribution network, including the following steps:

[0070] An SVM training model is created based on the historical measurement data of the distribution network and the corresponding topological structure. The input of the training model is the measurement data, and the output is the corresponding topological structure. Based on this model, fast and accurate topological identification of real-time measurement data can be achieved. The real-time measurement data is input into the constructed SVM training model to obtain the corresponding output topological structure. Further identification and correction are performed on the basis of the original topology output by the SVM training model to obtain accurate topological identification results. Including:

[0071] 3.1 Based on the improved SVM algorithm, an offline training model is constructed. The historical measurement data of multiple nodes in the distribution network are used as input. The data is trained by constructing a four-layer neural network model to obtain the node admittance matrix function of multiple nodes, that is, the corresponding topological structure. Then, the grid search method is used to optimize the classification kernel function, and the cross-validation method is used to optimize the parameters of the SVM classification model and test the classification performance of the SVM. Finally, multiple corresponding topological structures, that is, multiple SVM multi-classification models, are output. The early stopping setting is used. When the classification performance reaches the expected level, the training is automatically stopped to prevent the occurrence of model overfitting, which ensures the good classification performance of the SVM while improving the training speed. The node admittance matrix function is derived as follows:

[0072] The polar coordinate equation of the power of the distribution network node is as follows:

[0073]

[0074] Among them, i and j are the numbers of the distribution network nodes, p i and q i are respectively the active injection power and reactive injection power of the ith node in the distribution network, v i and v j are the voltage amplitudes of the i-th node and the j-th node, θij is the voltage phase difference between the i-th node and the j-th node, g ij and b ij are the real and imaginary parts of the admittance matrix between the i-th node and the j-th node, respectively.

[0075] Since the voltage phase angle difference between adjacent nodes in the distribution network is very small, that is, θ ij ≈0, and since resistance is generally approximately equal to reactance, equation (1) can be transformed into:

[0076]

[0077] in, and are the approximate values ​​of the real and imaginary parts of the admittance matrix between the i-th node and the j-th node, respectively.

[0078] The distribution network node admittance matrix function can be obtained from formula (2):

[0079]

[0080] Where G and B are the approximate values ​​of the conductance matrix and the susceptance matrix, respectively, v is the voltage amplitude vector of the distribution network node, and v j is the voltage amplitude of the jth node, p and q are the injected active power vector and injected reactive power vector of the distribution network node, respectively.

[0081] 3.2 In the real-time operation of the distribution network, the real-time measurement data of the distribution network is trained based on the SVM multi-classification model to obtain the corresponding topological structure, and further identification and correction are made to obtain more accurate topological identification results. The topological identification correction equation is:

[0082]

[0083] Among them, Δp and Δq are active and reactive unbalanced quantities, Δg, Δb and Δθ are correction quantities of conductance, susceptance and voltage phase angle respectively, and H, I, E and F are element matrices in the Jacobian matrix.

[0084] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a distribution network topology identification method based on the SVM improved algorithm as described above is implemented.

[0085] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the distribution network topology identification method based on any one of the above-mentioned improved SVM algorithms is implemented.

[0086] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned distribution network topology identification methods based on the improved SVM algorithm.

[0087] Compared with the prior art, the present invention has the following beneficial effects:

[0088] The improvement of the kernel function of support vector machine is a topic with both practical value and theoretical significance. This scheme proposes a distribution network topology identification method based on the improved SVM algorithm, which solves the current problems of low recognition and slow recognition speed, and realizes accurate identification of the dynamic topology and line parameters of the distribution network, so as to understand the real-time operation of the distribution network, and can effectively solve the problem of "blind adjustment" of the distribution network. Experiments show that this method also solves the problem of the decrease in the recognition of topology and line parameters after the current distribution network scale is expanded, and adapts to the current reality of the large power grid as the main structure.

[0089] Regarding the processing of kernel functions to simplify complex inner product operations, the present invention adopts an improved kernel function instead of the Gaussian kernel function in the traditional kernel function, and also uses a grid search method to obtain the optimal solution of the kernel parameters α and β in the improved kernel function, so that the kernel function effect can be best. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0091] Figure 1 It is a summary diagram of comparison diagrams of processing results of different kernel functions in the embodiments of the present invention;

[0092] Figure 2 is a flow chart of distribution network topology identification based on an improved SVM algorithm according to an embodiment of the present invention;

[0093] Figure 3 This is a structural diagram of the Conghua network according to an embodiment of the present invention;

[0094] Figure 4 This is a structural diagram of the oasis network according to an embodiment of the present invention;

[0095] Figure 5 This is a structural diagram of a forest network frame according to an embodiment of the present invention;

[0096] Figure 6 is the topology identification result of the third network of the embodiment of the present invention at 2022-06-17T00:00:08;

[0097] Figure 7 is the topology identification result of the third network of the embodiment of the present invention at 2022-06-17T00:01:08;

[0098] Figure 8 is the topology identification result of the third network of the embodiment of the present invention at 2022-06-17T00:02:08;

[0099] Fig. 9 is the topology identification result of the third network of the embodiment of the present invention at 2022-06-25T18:28:08;

[0100] Fig.10 is a schematic diagram of the structure of an electronic device provided by the present invention;

[0101] Reference numerals:

[0102] Among them: 810 - processor, 820 - communication interface, 830 - memory, 840 - communication bus. DETAILED DESCRIPTION

[0103] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0104] like Figure 2 As shown, this embodiment is a distribution network topology identification method based on an improved SVM algorithm. The historical measurement data of the distribution network and its corresponding topological structure are used to perform offline training to obtain an SVM training model; the real-time measurement data of the distribution network is used to drive the SVM classification model to achieve online classification of the distribution network topological structure. The method introduces the SVM algorithm into the distribution network topology identification, so that the subsequent identification of specific parameters of the distribution network is based on a more accurate topological structure, which can significantly improve the speed and accuracy of distribution network parameter identification and state estimation; and the SVM algorithm is improved. On the basis of the Laplace kernel function and the Gaussian kernel function, an SVM kernel function with better application effect is found. The new kernel function can achieve the optimal classification effect for different types of data sets.

[0105] This embodiment is implemented by the following technical solution, a distribution network topology identification method based on an improved SVM algorithm, including:

[0106] Step 1: Preprocess the known data set.

[0107] Step 2: Based on the data set obtained by preprocessing, the designed dual-parameter kernel function is used to classify it and obtain the optimal kernel function.

[0108] Step 3: Use the classified data to identify the topology of the distribution network.

[0109] Step 1: Using the SVM method, a classification model can be constructed based on the known classified sample points, and the model can be used to classify the points of unknown categories. The SVM classification model formula is as follows:

[0110]

[0111] Among them, λ i is the Lagrange multiplier corresponding to each constraint, x i represents the sample, y i Indicates a label. Label y i =1 and y i = -1 represents two categories in the sample. C is a penalty parameter, which is used to characterize the degree of error allowed when noise or actual data cannot be completely clearly separated. As a kernel function, the data set can be input into a high-dimensional space to simplify the inner product operation.

[0112] The optimal kernel function in step 2 is a combination of a Gaussian kernel function and a Laplace kernel function, including two parameters α and β. By setting a loop to find the optimal solution of its parameters, the optimal kernel function obtained is as follows:

[0113]

[0114] Among them, σ is the kernel parameter, x i and x j are the i-th and j-th input samples respectively, α and β are the parameters corresponding to the Gaussian kernel function and the Laplace kernel function respectively.

[0115] Step 3 includes the following steps:

[0116] 3.1 Based on the improved SVM algorithm, an offline training model is constructed. The historical measurement data of multiple nodes in the distribution network are used as input. The data is trained by constructing a four-layer neural network model to obtain the node admittance matrix function of multiple nodes, that is, the corresponding topological structure. Then the cross-validation method is used to optimize the parameters of the SVM classification model and detect the classification performance of the SVM. Finally, multiple corresponding topological structures, that is, multiple SVM multi-classification models, are output. The early stopping setting is used. When the classification performance reaches the expected level, the training is automatically stopped to prevent the occurrence of model overfitting, which ensures the good classification performance of the SVM while improving the training speed. The node admittance matrix function is derived as follows:

[0117] The polar coordinate equation of the power of the distribution network node is as follows:

[0118]

[0119] Among them, i and j are the numbers of the distribution network nodes, p i and q i are respectively the active injection power and reactive injection power of the ith node in the distribution network, v i and v j are the voltage amplitudes of the i-th node and the j-th node, θ ij is the voltage phase difference between the i-th node and the j-th node, g ij and b ij are the real and imaginary parts of the admittance matrix between the i-th node and the j-th node, respectively.

[0120] Since the voltage phase angle difference between adjacent nodes in the distribution network is very small, that is, θ ij ≈0, and since resistance is generally approximately equal to reactance, equation (1) can be transformed into:

[0121]

[0122] in, and are the approximate values ​​of the real and imaginary parts of the admittance matrix between the i-th node and the j-th node, respectively.

[0123] The distribution network node admittance matrix function can be obtained from formula (2):

[0124]

[0125] Where G and B are the approximate values ​​of the conductance matrix and the susceptance matrix, respectively, v is the voltage amplitude vector of the distribution network node, and v j is the voltage amplitude of the jth node, p and q are the injected active power vector and injected reactive power vector of the distribution network node, respectively.

[0126] 3.2 In the real-time operation of the distribution network, the real-time measurement data of the distribution network is trained based on the SVM multi-classification model to obtain the corresponding topological structure, and further identification and correction are made to obtain more accurate topological identification results. The topological identification correction equation is:

[0127]

[0128] Among them, Δp and Δq are active and reactive unbalanced quantities, Δg, Δb and Δθ are correction quantities of conductance, susceptance and voltage phase angle respectively, and H, I, E and F are element matrices in the Jacobian matrix.

[0129] Example

[0130] The three areas of a power grid company are taken as the research objects, and the active power and reactive power data of each bus node in the three areas are used. The data format is detailed in Appendix 2. Combined with the topological structure of each area under normal operation, such as Figure 3 , Figure 4 , Figure 5 As shown in the figure, the real-time identification of single network topology and triple network topology is completed. In order to realize topology identification, each node has been labeled according to the requirements (including 33 nodes). At the same time, in order to verify the accuracy of the proposed topology identification method, the identification model program is built using Python.

[0131] During the operation of the distribution network, its topology will change. This example will classify the measurement data based on the SVM multi-classification model to determine the topological category of the real-time measurement data. The node voltage amplitude v, node injected active power p, node injected reactive power q and corresponding topological labels under different topological structures are used to form the SVM sample data set. The input of the SVM training model is the measurement data p, q and v, and the output is the corresponding topological label.

[0132] In order to obtain the corresponding topological labels, it is necessary to transform the input samples into a high-dimensional feature space through a kernel function. Traditional kernel functions include Gaussian kernel function, radial basis kernel function, Laplace kernel function, etc. However, the effect of applying a single kernel function cannot meet expectations. Therefore, a kernel function that combines the Gaussian kernel function with the Laplace kernel function and contains two unknown parameters α and β is designed. The corresponding values ​​of the two unknown parameters when the error rate of the result is minimized are obtained by traversal, so that the effect of the kernel function can be optimized for different data sets.

[0133]

[0134] The test shows that compared with a single Gaussian kernel function or a Laplace kernel function, the classification accuracy of this kernel function is higher when α=0.4 and β=0.6.

[0135] In order to make the experimental results more visual, a third eigenvalue z is added to the data set of the kernel function and a 3D plot is performed on the data.

[0136]

[0137] In the formula, z is the added feature value, and x and y are the values ​​in the initial data set. Through this transformation, points far from the center can be more dispersed and concentrated at the bottom of the three-dimensional image.

[0138] Error rate of different kernel function processing results and classification image comparison Figure 1 shown.

[0139] Figure 1In the above example, α=1, β=0 means that only Gaussian kernel function is used to classify data, α=0, β=1 means that only Laplace kernel function is used to classify data, and α=0.2, β=0.6 are the optimal solutions of α and β when the error rate is minimized through optimization.

[0140] The SVM binary classification model obtained by offline training is used to correct the initial model. Based on the initial model of topology and line parameter identification, the historical p, q and v measurement data under different topological structures are used to obtain the initial values ​​of topology and line parameters under different topological structures. Then, the collected real-time measurement data of the distribution network is input into the SVM multi-classification model to determine the topological category of the current time section measurement data, combined with the initial values ​​of the topology and line parameters under the corresponding category, and the real-time identification results of the distribution network topology and line parameters are output through the topology and line parameter identification correction model.

[0141] The initial identification model condition is θ ij =0, given p i ,q i ,v i , solve for the real and imaginary parts of the admittance matrix and The linear least squares method can be used to solve it. The initial identification results are as follows:

[0142]

[0143] In order to make the topology and line parameter identification results more accurate, θ ij This is also the quantity to be solved. This is a nonlinear least squares problem. It can be solved using an iterative method.

[0144] The polar coordinate form of the node power equation is obtained as follows:

[0145]

[0146] Combining the physical meaning to process the diagonal elements and non-diagonal elements of the admittance matrix, the admittance matrix G, B is decomposed as follows:

[0147]

[0148] g ii Represents the sum of the conductances of all lines connected to node i.

[0149] The polar coordinate form of the node power equation can be converted into the power flow equation represented by line conductance and line susceptance as follows:

[0150]

[0151] Given p, q, v, solving g, b, θ requires building a nonlinear least squares model based on the above formula.

[0152] First, the correction equation is established based on the power flow equation represented by the line admittance matrix:

[0153]

[0154] Among them, D, E, F, H, J, and S can be obtained by derivative calculation:

[0155]

[0156]

[0157] In order to make the equation solvable, it is necessary to constrain the number of measurement data sets. The number of quantities to be determined is 2m+n-1, and the number of equations is 2n. Therefore, there must be M sets of measurement data that satisfy:

[0158] 2Mn≥2m+M(n-1)

[0159] Finally, the modified model is solved iteratively.

[0160] The iterative solution process is as follows:

[0161] The first step is to obtain the initial value of the iteration g (0) ,b (0) ,θ (0) .

[0162] From the initial identification results The initial values ​​of g and b can be obtained, denoted as g (0) ,b (0) , put g (0) ,b (0) Substituting the line conductance and line susceptance into the power flow equation (18), we can get g (0) ,b (0) ,θ (0) .

[0163] The second step is to solve the correction equation to find the imbalance Δp, Δq.

[0164] The initial value of the iteration g (0) ,b (0) ,θ (0) Substituting the calculated values ​​p and q into the power flow equation, the calculated values ​​of p and q are subtracted from the given measured values ​​to obtain the unbalanced values ​​Δp and Δq in the modified equation.

[0165] The third step is to solve the g, b, and θ values ​​for the next iteration.

[0166] Substituting the imbalance values ​​Δp and Δq into the correction equation, the deviation values ​​Δg, Δb and Δθ can be obtained. The sum of the most recent iteration g, b, θ and Δg, Δb, Δθ can be used to obtain the new iteration g, b, θ.

[0167] The above iterative process is repeated until Δg, Δb, Δθ are lower than the set iteration threshold, and the iteration is terminated to finally obtain the accurate distribution network topology line parameters g, b, θ.

[0168] Finally, the topology identification results of the three-network power grid in the demonstration area are obtained as follows: Figure 6 , Figure 7 As shown, in order to better reflect the effectiveness of the identification algorithm for topology changes, the connection between nodes is reflected by the change of node power, and finally the distribution network topology is visualized. By establishing a topology drawing program, the input active and reactive data of the power grid are read and analyzed, the connection between nodes is judged, and finally the function of drawing the distribution network topology can be realized.

[0169] from Figure 6 , Figure 7 The three-network topology diagram and comparison show that at the first moment of power sampling, Figure 5 It reflects the connection mode of the actual topology of the three-network overall network very well; at the second moment, by changing the power of the nodes (node ​​2, node 13, node 18, node 23, node 24), Figure 7 It shows that the connection mode between the corresponding nodes has changed. The connection status between node 1 and node 2, node 13 and node 18, and node 23 and node 24 have all changed from connected to disconnected. Similarly, the corresponding operations are performed on other nodes, and the results are as follows Figure 8 , as shown in 9.

[0170] Depend on Figure 6 , Figure 7 , Figure 8 , Fig. 9 The results of the three-network topology identification show that when the node power changes, this topology identification program can accurately determine the connection status between related nodes and visualize the actual topological connection status of the single network and the three networks. In the test experiments that have been conducted, there was no misjudgment and the accuracy rate was very high.

[0171] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the distribution network topology identification method based on the SVM improved algorithm.

[0172] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0173] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the distribution network topology identification method based on the SVM improved algorithm provided by the above methods.

[0174] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the distribution network topology identification method based on the SVM improved algorithm provided by the above methods.

[0175] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0176] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A distribution network topology identification method based on an improved SVM algorithm, characterized in that: The following steps are involved: Perform data preprocessing on known data sets; including the following steps: S1.

1. Based on the SVM multi-classification principle, the maximum margin classifier model is a convex optimization problem with n constraints. S1.

2. Introduce the Lagrangian function to transform the binary classification problem into a quadratic optimization with constraints; S1.3.Introduce the kernel function and process the data of the data set at the same time; S1.

4. Introduce the penalty parameter c to indicate the error value allowed in the experimental results; According to the data set obtained by preprocessing, a dual-parameter kernel function is used for classification processing to obtain the optimal kernel function, including the following steps: The optimal kernel function is a combination of the Gaussian kernel function and the Laplace kernel function, which contains two parameters, α and β. By setting a loop to find the optimal solution of its parameters, the optimal kernel function is as follows: Among them, σ is the kernel parameter, x i and x j are the i-th and j-th input samples, respectively, α and β are the parameters corresponding to the Gaussian kernel function and the Laplace kernel function, respectively; Find the optimal solution of α and β: iterate α and β from 0 to 1 with a step size of 0.1, and get the error rate of each iteration. The values ​​of α and β when the error rate is minimum are the optimal solutions of α and β. Using the classified data to identify the topology of the distribution network includes the following steps: S3.

1. An offline training model is constructed based on the improved SVM algorithm. The historical measurement data of multiple nodes in the distribution network are used as input. The data is trained by constructing a four-layer neural network model to obtain the node admittance matrix functions of multiple nodes, i.e., the corresponding topological structures. Then, the cross-validation method is used to optimize the parameters of the SVM classification model and test the classification performance of the SVM. Finally, multiple corresponding topological structures, i.e., multiple SVM multi-classification models, are output. S3.

2. In the real-time operation of the distribution network, the real-time measurement data of the distribution network is trained based on the SVM multi-classification model to obtain the corresponding topological structure, which is further identified and corrected to obtain the topological identification correction equation.

2. The distribution network topology identification method based on the improved SVM algorithm according to claim 1 is characterized by: The implementation of S1.1 is as follows: The equation of the hyperplane is w T x+b=0, used to distinguish the sample points into two categories; define the margin as margin=min distance, where the margin is represented by the minimum distance from all sample points to the hyperplane; the sample is represented by x i Indicates that the label is y i Represents; label y i =1,y i =0 and y i =-1 respectively represent the three categories in the sample, where y i =1 means that the sample points are distributed above the hyperplane, y i = 0 means the sample point falls on the hyperplane, y i =-1 means that the sample points are distributed below the hyperplane; Then the maximum margin classifier model is: Where w is the normal vector of the hyperplane, its size is the distance from [0, 0] to the separating hyperplane, b is a constant, y i is the label value of the sample; label y i =1,y i =0 and y i =-1 respectively represent the three categories in the sample, where y i =1 means that the sample points are distributed above the hyperplane, y i = 0 means the sample point falls on the hyperplane, y i =-1 means that the sample points are distributed below the hyperplane; after simplification, we can get: Where i = 1, 2, ..., n; The implementation of S1.2 is as follows: The Lagrangian function is introduced as follows: where λ i is the Lagrange multiplier corresponding to each constraint in the original model; Introducing the Lagrangian function into the SVM binary classification model yields: If 1-y i (w T x i +b)>0, then If 1-y i (w T x i +b)≤0, then The model can be transformed from the strong duality relationship into: Calculate the partial derivatives of L(ω,b,λ) with respect to b and w to make them always equal to 0, and substitute the relationship into L(ω,b,λ), we can get Where: N is the total number of samples; λ i and i are the Lagrange multiplier and topological label of the i-th sample respectively; The implementation of S1.3 is as follows: The p, q and v values ​​of each node are used as input samples to form a data set; the data set is zero-normalized: Where x is the original value of a feature, μ is the average value of the feature in all samples, σ is the standard deviation of the feature in all samples, and x * is the eigenvalue after standardization ~ N (0, 1); Through the kernel function K(x i ,x j ) Input the data set into the high-dimensional space, where the kernel function uses the improved SVM kernel function, which is expressed as: In the formula, σ is the kernel parameter, x i and x j are the i-th and j-th input samples, respectively, α and β are the parameters corresponding to the Gaussian kernel function and the Laplace kernel function, respectively; The implementation of S1.4 is as follows: The penalty parameter is introduced to transform the hard margin SVM binary classification model into a soft margin SVM binary classification model; the soft margin means that errors in classification are allowed; corresponding to the model, it is allowed There is an error, which is represented by the loss function; If y i (w T x i +b)-1≥0, then loss=0; If y i (w T x i +b)-1<0, then loss=1-y i (w T x i + b); Then there is Let ξ i = 1 - y i (w T x i + b), ξ i ≥ 0, then After introducing the loss function, the SVM two-classification model is transformed into: Introduce the Lagrangian function: Taking partial derivatives of ξ, w, and b respectively, we get: From the KKT complementary condition, we know that: l i *(y i (w T x i +b)-1+ξ i )=0 r i x i =0 Substitute into the SVM two-classification model: Among them, λ i is the Lagrange multiplier corresponding to each constraint, x i represents the sample, y i Indicates label; label y i =1 and y i = -1 represents the two categories in the sample respectively; C is the penalty parameter, which is used to characterize the degree of error allowed when noise or actual data cannot be completely clearly separated; As a kernel function, the data set can be input into a high-dimensional space to simplify the inner product operation.

3. The distribution network topology identification method based on the improved SVM algorithm according to claim 1 is characterized in that: The implementation of S3.1 uses the early stopping setting, which automatically stops training when the classification performance reaches the expected level; the node admittance matrix function is derived as follows: The polar coordinate equation of the power of the distribution network node is as follows: Among them, i and j are the numbers of the distribution network nodes, p i and q i are respectively the active injection power and reactive injection power of the ith node in the distribution network, v i and v j are the voltage amplitudes of the i-th node and the j-th node, θ ij is the voltage phase difference between the i-th node and the j-th node, g ij and b ij are the real and imaginary parts of the admittance matrix between the i-th node and the j-th node respectively; θ ij ≈0, the resistance is approximately equal to the reactance, then equation (1) can be transformed into: in, and are the approximate values ​​of the real and imaginary parts of the admittance matrix between the i-th node and the j-th node respectively; The distribution network node admittance matrix function can be obtained from formula (2): Where G and B are the approximate values ​​of the conductance matrix and the susceptance matrix, respectively, v is the voltage amplitude vector of the distribution network node, and v j is the voltage amplitude of the jth node, p and q are the injected active power vector and injected reactive power vector of the distribution network node respectively; The topology identification correction equation obtained in S3.2 is: Among them, Δp and Δq are active and reactive unbalanced quantities, Δg, Δb and Δθ are correction quantities of conductance, susceptance and voltage phase angle respectively, and H, I, E and F are element matrices in the Jacobian matrix.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the distribution network topology identification method based on the improved SVM algorithm as described in any one of claims 1 to 3 is implemented.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the distribution network topology identification method based on the improved SVM algorithm as claimed in any one of claims 1 to 3 is implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the distribution network topology identification method based on the improved SVM algorithm as claimed in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Power distribution network topology and line parameter joint identification method and device and electronic equipment

    CN116090154A