Segmented power flow linearization of power distribution network based on data driving
By establishing data-driven power flow equations based on physical models in medium and low-voltage distribution networks, and using k-plane regression algorithm for data clustering and model training, the nonlinear problem of power flow calculation is solved, and accurate and efficient calculation of power flow is achieved, which is applicable in medium and low voltage distribution networks.
Patent Information
- Application Number
- CN202410590660.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-09-06
AI Technical Summary
It is difficult to accurately calculate power flow in medium and low-voltage distribution networks with existing technology, especially due to the difficulty in obtaining 10kV electrical parameters and the low accuracy due to the nonlinear nature of the power flow equation. Existing data-driven methods are also difficult to effectively solve this problem.
Based on the physical model, data-driven power flow equations under different bus types are established, and the improved k-plane regression algorithm is used for data clustering and power flow model training to achieve offline mapping and online calculation of power flow and solve the nonlinear problem of power flow.
Through offline learning and online mapping, accurate calculation of power flow is achieved, the accuracy and efficiency of power flow calculation in medium and low-voltage distribution networks are improved, and the problem of infeasibility of the power flow physical model is solved.
Smart Images

Figure CN118611068A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of distribution network operation and optimization, and in particular relates to a data-driven distribution network segmented power flow linearization. Background Art
[0002] Power flow calculation is the basis for the operation and planning of distribution network voltage control, fault handling, reactive power optimization, state estimation, etc. Nowadays, the distribution network is connected to a large number of distributed photovoltaics, electric vehicle charging piles, and energy storage. The distribution network is changing from a single power supply network to a multi-power supply network, and the power flow distribution is changing from the original one-way flow to a two-way flow, which makes the distribution network power flow uneven and voltage over-limit problems frequently appear. Therefore, many new automatic distribution management technologies have been developed, such as new energy absorption capacity assessment, distribution network carrying capacity assessment, fault identification, etc., all of which require accurate power flow calculation models.
[0003] The power flow equation is established through the knowledge of system topology and line parameters. However, it is difficult to obtain the electrical parameters of 10kV and 400V distribution networks. There is no readily available power flow primary wiring diagram, and the topological information is difficult to sort out. Since the 400V low-voltage distribution network focuses on the identification of household-transformer relationships, this article focuses on the 10kV medium-voltage distribution network. Even if the topological relationships of many 10kV branch lines are clarified, the electrical parameters converted by model and length are only theoretical values, and the actual values are unclear. Therefore, it is difficult to apply the power flow method based on the admittance matrix to medium and low voltage distribution networks in practice.
[0004] With the development of phasor measurement units (PMUs), smart meters, sensors and other measurement devices in power systems, reliable acquisition of historical and real-time data of power flow synchronized electrical quantities (active power, reactive power, voltage and phase) has become a reality. These measurement data are sufficient for power flow mapping, and these methods are called data-driven methods.
[0005] Existing data-driven power flow methods can be divided into two categories from the perspective of mathematical structure: 1) Linear models. This is achieved by simplifying the power flow equation. Since the simplified linear model has different characteristics from the original nonlinear model, the accuracy will be very poor. 2) Nonlinear models based on reselecting the state space, however, it is difficult to obtain a concise and accurate analytical formula.
[0006] In summary, the physical power flow calculation model is no longer feasible, and the existing methods cannot solve the nonlinear problems of power flow well. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a data-driven distribution network segmented power flow linearization, and establish a data-driven distribution network segmented power flow linearization model. Firstly, based on the power flow calculation equation based on the physical model, the data-driven power flow equation under different bus types is established, and then the improved k-plane regression algorithm is used to cluster the data, and the data with similar features are classified as one class, and then the power flow models are trained separately to realize the offline mapping of the power flow; finally, when there is a new sample, it is first classified and then the power flow mapping is performed, thereby realizing the online power flow calculation.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: A data-driven distribution network segmented power flow linearization method, the steps are: Step 1: Establish data-driven power flow equations for different bus types; Step 1.1: Establish a data-driven power flow equation based on the traditional physical power flow equation; Step 1.2: Establish the power flow equations for different busbar types Step 2: Offline learning using the improved k-plane regression algorithm Step 2.1 Initialization definition and selection of k Step 2.2: Obtain parameters; Step 3: Establish an online power flow regression model; In step 1.1, for the traditional physical model power flow calculation, the power equation of the node is written by Kirchhoff's theorem, where the physical model power equation in polar coordinate form is shown as (1): (1); In the formula, and For bus real power and reactive power injection on It is a busbar The voltage value, It is a busbar Voltage value; is the admittance matrix In ( ) elements, where is an imaginary unit. It is a busbar and busbar The phase angle difference between them.
[0009] Taking the independent variables and dependent variables of formula (1) as reference, the mapping relationship between active power and reactive power and voltage amplitude and voltage phase angle is first established, as shown in formula (2): (2); In the formula, is the regression parameter matrix; and is a constant term, which enhances the regression ability of the model.
[0010] In step 1.2, the known and unknown variables of the distribution network are divided according to the different bus types. Table 1 shows the bus types in the distribution network and their corresponding known and unknown variables.
[0011] Table 1 Busbar types of distribution network
[0012] When considering different bus types, according to the power flow equation (1), the active and reactive power of different bus types are first taken as dependent variables, and the different types of bus and phase angle are taken as independent variables. Considering that there is generally only one bus in the distribution network, The busbar is a (balanced busbar), whose voltage is given, the phase angle is generally set to 0, and the active power can be almost determined by the active power injection of other buses; regardless of Busbar or The active power of the bus is an independent variable, and The active power of the bus is the dependent variable. If it is added, it will lead to regression collinearity. In summary, this paper will The mother line is removed from the regression, so equation (2) can be transformed into equation (3): (3); In the formula, the subscript Respectively represent Busbar, Busbar, is the regression parameter matrix. The main task of power flow analysis is to calculate unknown variables based on known variables. and All parameters in the , so that power flow mapping can be performed.
[0013] make , .in, and is a known quantity, and is an unknown quantity. Therefore, the equation in formula (3) can be written as (4): (4); In the formula, is the simplified regression parameter matrix. Formula (5) is the calculation process of unknown variables: (5); In step 2.1, the improved k-plane regression algorithm is initialized and defined, and the k value is solved as follows: 1) Simplify formula (3): (6); In the formula, , , , They represent the regression parameter matrix, independent variable matrix, dependent variable matrix and constant term in the k partitions, corresponding to the formula (4) Regression parameter matrix, dependent variable, independent variable, and constant term In the data-driven trend of returning, and is a matrix rather than a vector.
[0014] 2) The k-segment mapping function is defined, The hyperplane is parameterized by and Parameterization. If there are k hyperplanes , the parameters are , and set , then the function It is called segment mapping. as well as , then the k-segment mapping can be written as .
[0015] 3) Definition As the training data set, , is the vector of input variables, Is the output variable. The minimum error function of the improved k-plane regression algorithm: (7); In the formula, as well as is the hyperplane parameter for each cluster k and cluster centers A collection of .
[0016] 4) The goal of regression is to minimize the error function in (7) so that the hyperplane Approaching output variables value, and make the point Close to the center of the kth partition . Penalty This avoids the computation of singular matrix inverses that would otherwise be required when computing parameters based on collinear data. The inverse of the singular matrix is calculated when . In this equation, N is the number of data, k is the number of clusters, and are given parameters that determine the relative weights of the terms. Distribution networks that experience more variability in operating conditions, for example, due to larger variations in solar PV output, may require more clusters k. Increasing the number of clusters k will improve the accuracy of the method, but will also increase the computational burden. However, a large number of clusters increases the computational burden for both offline training and online computation. Therefore, it is important to determine the trade-off between accuracy and efficiency. We observe that the regression error decreases with increasing values of the number of clusters k. However, after k increases to a certain value, the accuracy improves slowly. Therefore, the number of clusters k does not need to be large. In practice, we determine the parameters k and .
[0017] In step 2.2, the parameters of the improved k-plane regression algorithm are solved as follows: 1) Given ,set up Defined as: (8); In the formula, is put into a set with k In this collection, Minimize, then the error function can be written as: (9); 2) The parameter set after the cth iteration is , the training data is clustered into sets ,Keep Fixed, the error function becomes (10); 3) In order to minimize the above error function after the cth iteration, the new parameter It can be estimated as: (11); (12); In the formula, and Separately middle , The matrix form of and; is the identity matrix. Choose the parameters The value of is small enough to ensure that the penalty term does not become very large, but large enough to ensure that the matrix The absolute value of the smallest eigenvalue of is greater than the given value , to ensure the reversibility of the matrix, it can be expressed as: (13); In the formula, when the data When collinear, the matrix is singular and irreversible. By adding a penalty term , introduce Item, so that the matrix It is full rank and reversible, thus avoiding the problems caused by data collinearity.
[0018] 4) Once the parameters are obtained ,Keep unchanged, then the set can be written as: (14); In the formula, data Gathered into a collection ,make minimize.
[0019] when At the end of the iteration, the next iteration is continued in the same way until the error function does not decrease significantly.
[0020] In step 3, an online power flow regression model is established as follows: 1) Generate data samples. In the distribution network, active power, reactive power, voltage amplitude and phase angle can be obtained through smart meters and phasor measurement units (PMU).
[0021] 2) Determine the partition of each data sample. In each data sample, use formula (15) to determine its nearest partition j.
[0022] (15); In the formula, is the input variable, For the district center.
[0023] 3) After the partition is determined, use formula (16) for regression.
[0024] (16); In the formula, for The regression parameters of the partitions, For the collected data samples, the corresponding unknown quantities can be calculated through the collected data samples and the offline learned parameters.
[0025] The present invention can achieve the following beneficial effects: Based on the power flow calculation equation based on the physical model, the data-driven power flow equation under different bus types is established. The improved k-plane regression algorithm is used to cluster the data, and the data with similar characteristics are classified as one class. Then the power flow model is trained separately to realize the offline learning of the power flow. When there are new samples, they are classified first, and then the power flow mapping is performed, so as to realize the online power flow calculation. It not only solves the infeasibility of the power flow physical model, but also solves the nonlinear problem of the power flow, which has important practical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention will be further described below in conjunction with the accompanying drawings and embodiments: Figure 1 It is a schematic diagram of the process of the present invention.
[0027] Figure 2 It is a schematic diagram of the improved IEEE33 node calculation example in the embodiment.
[0028] Figure 3 Graphs showing the PQ node voltage regression accuracy of the four methods in the embodiment.
[0029] Figure 4 Graphs showing the PQ node phase angle regression accuracy of the four methods in the embodiment. DETAILED DESCRIPTION
[0030] A data-driven distribution network segmented power flow linearization method, such as Figure 1 As shown in the figure, data-driven power flow equations of different types of buses are established, and the improved k-plane regression algorithm is used to cluster data samples, and power flow mapping is performed on different categories to obtain the parameters of each partition, thereby completing offline learning. When there are new samples, partitioning is performed first, and then the parameters of the zone learned offline are used to calculate the power flow, thereby completing online power flow mapping.
[0031] like Figure 2 As shown, the embodiment is to perform simulation analysis on the improved IEEE33 node example, add PV type distributed photovoltaics to the 5, 11, and 27 buses on the IEEE33 node system, and the simulation platform is MATLAB. The data used is the historical load and photovoltaic power generation data of a company, which contains smart meter and PMU readings from April to May 2022. The data is sampled every fifteen minutes to generate 2688 sets of power flow sections as data sets. The prepared data is divided into 70% for training the model and 10% for verifying the model's hyperparameters (k and ), 20% for testing. The improved k-plane regression algorithm proposed in the present invention is compared with the following three linearization methods: 1) using partial least squares method to approximate the power flow with a single hyperplane, which combines principal component analysis and canonical correlation analysis. 2) Non-segmented regression algorithm, the number of clusters of the method proposed in the present invention is set to 1 to verify the superiority of the segmented method. 3) Neural network regression algorithm, a 3-layer multilayer perceptron with ReLu activation function is used. Due to the unobservability problem of the distribution network, this paper selects 10% of the buses to be unmeasurable (no voltage and power measurement) during the learning process. In addition, in order to consider the measurement error, random noise with a Gaussian distribution (mean value of zero and relative standard deviation of 1%) is added to the data. 1% of the data is randomly changed to anomalies, increasing its value by 5-10 times. The present invention uses the mean absolute error MAE to evaluate the power flow regression results of a single bus node, and the root mean square error RMSE to evaluate the power flow regression results of the entire node system, where the lower the MAE and RMSE, the higher the accuracy.
[0032] The specific implementation process is as follows: In step 1.1, for the traditional physical model power flow calculation, the power equation of the node is written by Kirchhoff's theorem, where the physical model power equation in polar coordinate form is shown as (1): (1); In the formula, and For bus real power and reactive power injection on It is a busbar The voltage value, It is a busbar Voltage value; is the admittance matrix In ( ) elements, where Is an imaginary unit. It is a busbar and busbar The phase angle difference between them.
[0033] Taking the independent variables and dependent variables of formula (1) as reference, the mapping relationship between active power and reactive power and voltage amplitude and voltage phase angle is first established, as shown in formula (2): (2); In the formula, is the regression parameter matrix; and is a constant term, which enhances the regression ability of the model.
[0034] In step 1.2, the known and unknown variables of the distribution network are divided according to the different bus types. Table 1 shows the bus types in the distribution network and their corresponding known and unknown variables.
[0035] Table 1 Busbar types of distribution network
[0036] When considering different bus types, according to the power flow equation (33), the active and reactive power of different bus types are first taken as dependent variables, and the different types of bus and phase angle are taken as independent variables. Considering that there is generally only one bus in the distribution network, The busbar is a (balanced busbar), whose voltage is given, the phase angle is generally set to 0, and the active power can be almost determined by the active power injection of other buses; regardless of Busbar or The active power of the bus is an independent variable, and The active power of the bus is the dependent variable. If it is added, it will lead to regression collinearity. In summary, this paper will The mother line is removed from the regression, so equation (2) can be transformed into equation (3): (3); In the formula, the subscript Respectively represent Busbar, Busbar, is the regression parameter matrix. The main task of power flow analysis is to calculate unknown variables based on known variables. and All parameters in the , so that power flow mapping can be performed.
[0037] make , .in, and is a known quantity, and is an unknown quantity. Therefore, the equation in formula (3) can be written as (4): (4); In the formula, is the simplified regression parameter matrix. Formula (5) is the calculation process of unknown variables: (5); In step 2.1, the improved k-plane regression algorithm is initialized and defined, and the k value is solved as follows: 1) Simplify formula (36): (6); In the formula, , , , They represent the regression parameter matrix, independent variable matrix, dependent variable matrix and constant term in the k partitions, corresponding to the formula (4) Regression parameter matrix, dependent variable, independent variable, and constant term In the data-driven trend of returning, and is a matrix rather than a vector.
[0038] 2) The k-segment mapping function is defined, The hyperplane is parameterized by and Parameterization. If there are k hyperplanes , the parameters are , and set , then the function It is called segment mapping. as well as , then the k-segment mapping can be written as .
[0039] 3) Definition As the training data set, , is the vector of input variables, is the output variable. Improved k-plane regression algorithm minimum error function (7); In the formula, as well as is the hyperplane parameter for each cluster k and cluster centers A collection of .
[0040] 4) The goal of regression is to minimize the error function in (7) so that the hyperplane Approaching output variables value, and make the point Close to the center of the kth partition . Penalty Item This avoids the computation of singular matrix inverses that would otherwise be required when computing parameters based on collinear data. The inverse of the singular matrix is calculated when . In this equation, N is the number of data, k is the number of clusters, and are given parameters that determine the relative weights of the terms. Distribution networks that experience more variability in operating conditions, for example, due to larger variations in solar PV output, may require more clusters k. Increasing the number of clusters k will improve the accuracy of the method, but will also increase the computational burden. However, a large number of clusters increases the computational burden for both offline training and online computation. Therefore, it is important to determine the trade-off between accuracy and efficiency. We observe that the regression error decreases with increasing values of the number of clusters k. However, after k increases to a certain value, the accuracy improves slowly. Therefore, the number of clusters k does not need to be large. In practice, we determine the parameters k and .
[0041] In step 2.2, the parameters of the improved k-plane regression algorithm are solved as follows: 1) Given ,set up Defined as: (8); In the formula, is put into a set with k In this collection, Minimize, then the error function can be written as: (9); 2) The parameter set after the cth iteration is , the training data is clustered into sets ,Keep Fixed, the error function becomes (10); 3) In order to minimize the above error function after the cth iteration, the new parameter It can be estimated as: (11); (12); In the formula, and Separately middle , The matrix form of and; is the identity matrix. Choose the parameters The value of is small enough to ensure that the penalty term does not become very large, but large enough to ensure that the matrix The absolute value of the smallest eigenvalue of is greater than the given value , to ensure the reversibility of the matrix, it can be expressed as: (13); In the formula, when the data When collinear, the matrix is singular and irreversible. By adding a penalty term , introduce Item, so that the matrix It is full rank and reversible, thus avoiding the problems caused by data collinearity.
[0042] 4) Once the parameters are obtained ,Keep unchanged, then the set can be written as: (14); In the formula, data Gathered into a collection ,make minimize.
[0043] when At the end of the iteration, the next iteration is continued in the same way until the error function does not decrease significantly.
[0044] In step 3, an online power flow regression model is established as follows: 1) Generate data samples. In the distribution network, active power, reactive power, voltage amplitude and phase angle can be obtained through smart meters and phasor measurement units (PMU).
[0045] 2) Determine the partition of each data sample. In each data sample, use formula (15) to determine its nearest partition j.
[0046] (15); In the formula, is the input variable, For the district center.
[0047] 3) After the partition is determined, use formula (16) for regression.
[0048] (16); In the formula, for The regression parameters of the partitions, For the collected data samples, the corresponding unknown quantities can be calculated through the collected data samples and the offline learned parameters.
[0049] Under the same data set, the proposed method is compared with three linearization methods in MATLAB. The voltage and phase angle regression accuracies of the PQ load nodes are shown in Table 4 and Table 5, respectively. Figure 4 shown.
[0050] It can be seen from Table 2 that, compared with the three linearization methods, the improved k-plane power flow regression method proposed in the present invention has higher accuracy overall; Figure 4 The regression accuracy MAE of the voltage and phase of all 29 PQ load nodes in the IEEE33 node system is given. It can be found that the improved k-plane power flow regression method can not only accurately regress the voltage and phase of the node, but also has a relatively stable accuracy. The above shows that the method proposed in the present invention is effective in power flow regression calculation, and the regression results of the overall power flow of the power grid and the power flow of each node show high accuracy, and show good adaptability to different power grids, which has obvious advantages.
[0051] Table 2 Voltage phase angle accuracy RMSE of different power flow regression methods (unit: 10 -3 )
[0052] The above embodiments are only preferred technical solutions of the present invention and should not be regarded as limiting the present invention. The protection scope of the present invention shall be the technical solutions recorded in the claims, including equivalent replacement solutions of the technical features in the technical solutions recorded in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present invention.
Claims
1. A data-driven distribution network segmented power flow linearization method, characterized in that The following steps are involved: Step 1: Establish data-driven power flow equations for different bus types; Step 1.1: Establish a data-driven power flow equation based on the traditional physical power flow equation; Step 1.2: Establish the power flow equations under different bus types; Step 2: Use the improved k-plane regression algorithm for offline learning; Step 2.1 Initialization definition and selection of k; Step 2.2: Obtain parameters; Step 3: Establish an online power flow regression model.
2. According to claim 1, a data-driven distribution network segmented power flow linearization method, characterized in that: In step 1.1, for the traditional physical model power flow calculation, the power equation of the node is written by Kirchhoff's theorem, where the physical model power equation in polar coordinate form is shown as (1): (1); In the formula, and For bus Real power and reactive power injection on It is a busbar The voltage value, It is a busbar Voltage value; is the admittance matrix In ( ) elements, where is an imaginary unit; It is a busbar and busbar The phase angle difference between Taking the independent variables and dependent variables of formula (1) as reference, the mapping relationship between active power and reactive power and voltage amplitude and voltage phase angle is first established, as shown in formula (2): (2); In the formula, is the regression parameter matrix; and is a constant term, which enhances the regression ability of the model.
3. The data-driven distribution network segmented power flow linearization according to claim 2, characterized in that: In step 1.2, the known and unknown variables of the distribution network are divided according to the different bus types. The bus types in the distribution network and their corresponding known and unknown variables are shown in Table 1: Table 1 Busbar types of distribution network 4. The mother line is removed from the regression, so equation (2) is transformed into equation (3): (3); In the formula, the subscript Respectively represent Busbar, Busbar, is the regression parameter matrix; the task of power flow analysis is to calculate the unknown variables based on the known variables, and the goal is to find and All parameters in Then carry out power flow mapping; make , ; in, and is a known quantity, and is an unknown quantity; therefore, the equation in (3) can be written as (4): (4); In the formula, is the simplified regression parameter matrix; Formula (5) is the calculation process of unknown variables: (5)。 5. The data-driven distribution network segmented power flow linearization according to claim 3, characterized in that: In step 2.1, the improved k-plane regression algorithm is initialized and defined and the k value is solved as follows: 1) Simplify formula (3): (6); In the formula, , , , They represent the regression parameter matrix, independent variable matrix, dependent variable matrix and constant term in the k partitions, corresponding to the formula (4) Regression parameter matrix, dependent variable, independent variable, and constant term ; In the data-driven trend of returning, and It is a matrix rather than a vector; 2) The k-segment mapping function is defined, The hyperplane is parameterized by and Parameterization; If there are k hyperplanes , The parameters are , and set , Then the function It is called segment mapping; set up as well as , Then the k-segment mapping can be written as ; 3) Definition As the training data set, , is the vector of input variables, is the output variable; the minimum error function of the improved k-plane regression algorithm; (7); In the formula, as well as is the hyperplane parameter for each cluster k and cluster centers A collection of; 4) The goal of regression is to minimize the error function in equation (7) so that the hyperplane Approaching output variables value, and make the point Close to the center of the kth partition ; Penalty item This avoids the computation of singular matrix inverses that would otherwise be required when computing parameters based on collinear data. The inverse of the singular matrix will be calculated when In equation (7), N is the number of data, k is the number of clusters, and is a given parameter, N, which determines the relative weight of the terms.
6. The data-driven distribution network segmented power flow linearization according to claim 1, characterized in that: In step 2.2, the parameters of the improved k-plane regression algorithm are solved as follows: 1) Given ,set up Defined as: (8); . In the formula, is put into a set with k In this collection, Minimize, then the error function can be written as: (9); 2) The parameter set after the cth iteration is , the training data is clustered into sets ,Keep Fixed, the error function becomes: (10); 3) In order to minimize the above error function after the cth iteration, the new parameter It can be estimated as: (11); (12); In the formula, and Separately middle , in matrix form; is the identity matrix; choose the parameter The value of is small enough to ensure that the penalty term does not become very large, but large enough to ensure that the matrix The absolute value of the smallest eigenvalue of is greater than the given value , to ensure the reversibility of the matrix, it can be expressed as: (13); In the formula, when the data When collinear, the matrix is singular and irreversible. By adding a penalty term , introduce Item, so that the matrix Full rank and reversible, thus avoiding the problems caused by data collinearity; 4) Once the parameters are obtained ,Keep unchanged, then the set can be written as: (14); In the formula, data Gathered into a collection make minimize; when At the end of the iteration, the next iteration is continued in the same way until the error function does not decrease significantly.
7. The data-driven distribution network piecewise power flow linearization according to claim 1, characterized in that: In step 3, an online power flow regression model is established. The steps are as follows: 1) Generate data samples: In the distribution network, active power, reactive power, voltage amplitude and phase angle are obtained through smart meters and phasor measurement units; 2) Determine the partition of each data sample: In each data sample, use formula (15) to determine its nearest partition j; (15); In the formula, is the input variable, It is a sub-district center; 3) After determining the partition, use formula (16) for regression: (16); In the formula, for The regression parameters of the partitions, For the collected data samples, the corresponding unknown quantities can be calculated through the collected data samples and the offline learned parameters.
