Power system probabilistic load flow calculation method and system based on R-vine Copula

The wind farm prediction error data is modeled through the R-vian Copula model and the grouping algorithm. Combined with the trend approximation algorithm that retains nonlinear terms and the wait-and-see model, the shortcomings of the traditional Copula function in multi-dimensional correlation structure are solved, and the efficiency and accuracy of the probability flow calculation of the power system are improved.

CN120449381APending Publication Date: 2025-08-08GUIZHOU POWER GRID CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510200868.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Traditional Copula functions are not flexible enough when portraying complex multi-dimensional correlation structures, and the probability flow calculation efficiency of large-scale power systems still needs to be further improved.

Method used

The R-Vine Copula model is used to model the wind farm prediction error data, combined with the K-means grouping algorithm with distance constraints and the trend approximation algorithm that retains nonlinear terms, the optimal trend calculation is performed through the wait-and-see model.

Benefits of technology

It improves the accuracy and calculation efficiency of wind farm output scenario generation, reduces the calculation amount, enhances the adaptability to uncertainty, and ensures the engineering achievement of optimization results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449381A_ABST
    Figure CN120449381A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power grids, in particular to an R-vine Copula-based probabilistic load flow calculation method and system for a power system. According to the method, wind power plant prediction error data including short-term, medium-term and long-term prediction errors and actual output data in a power system are obtained, and an R-vine Copula model is used for modeling to generate a wind power plant output scene; secondly, grouping the wind power plant output scenes by adopting a K-means grouping algorithm containing distance constraints to obtain a group center scene and corresponding group members, and performing probabilistic load flow calculation through a load flow approximation algorithm retaining nonlinear terms; and finally, performing optimal power flow calculation based on a wait-and-tree model, directly reflecting a wind power plant output scene in an economic dispatching model, and simultaneously satisfying constraint conditions such as a system power flow equation, line power, node voltage and the like by minimizing prediction scene fuel cost and the sum of fuel cost and punishment cost of each scene. The problem that a traditional Copula function is insufficient in flexibility when depicting a complex multi-dimensional correlation structure is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power grid technology, and in particular to a method and system for calculating probabilistic power flow in a power system based on R-vine Copula. Background Art

[0002] As the proportion of renewable energy in the power system continues to increase, the uncertainty of the power system is increasing. However, the randomness, volatility, and intermittency of renewable energy generation pose a huge challenge to the safe and stable operation of the power grid.

[0003] Probabilistic power flow calculations, as an important tool for analyzing power system uncertainties, have been extensively studied. Currently, simulation, approximate, and analytical methods are primarily used. Simulation methods offer advantages such as wide application, high accuracy, and simple principles, but they are computationally intensive. Approximate and analytical methods are computationally efficient but have limitations, such as the limited ability of the semi-invariant method to handle random variable correlations and the applicability of the fast Fourier transform to small-scale systems.

[0004] To obtain high-quality samples that take correlation into account, existing technologies primarily employ methods such as correlation coefficient and covariance measurement, Nataf transform and Cholesky decomposition modeling, and Copula function modeling. Furthermore, to reduce the computational complexity of simulation methods, sampling is often performed using methods such as the Latin hypercube method, quasi-Monte Carlo method, and importance sampling.

[0005] However, existing methods still have shortcomings in modeling and computational efficiency for the correlations of renewable energy generation, such as wind power. On the one hand, traditional Copula functions lack flexibility in characterizing complex multidimensional correlation structures; on the other hand, the computational efficiency of probabilistic power flow calculations for large-scale systems needs to be further improved. Therefore, a probabilistic power flow calculation method that accurately describes multidimensional correlations and is computationally efficient is urgently needed. Summary of the Invention

[0006] In view of the problems existing in the prior art, the inventor proposed the present invention.

[0007] Therefore, the problem to be solved by the present invention is that, on the one hand, the traditional Copula function is not flexible enough in describing complex multi-dimensional correlation structures; on the other hand, the efficiency of probabilistic power flow calculation of large-scale systems still needs to be further improved.

[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0009] In a first aspect, an embodiment of the present invention provides a method for calculating a probabilistic power flow in a power system based on R-vine Copula, which includes obtaining wind farm prediction error data in the power system and modeling the prediction error data using an R-vine Copula model to generate a wind farm output scenario;

[0010] Performing probabilistic power flow calculation on the wind farm output scenario using a clustering-based power flow estimation algorithm that retains nonlinear terms;

[0011] An optimal power flow calculation is performed based on the result of the probabilistic power flow calculation.

[0012] As an optimal solution of the power system probabilistic power flow calculation method based on R-vine Copula described in the present invention, the power flow estimation algorithm based on clustering and retaining nonlinear terms includes: using the K-means clustering algorithm with distance constraints to group the wind farm output scenarios to obtain the group center scenario and the corresponding group members; using the Newton-Raphson method to calculate the power flow solution of the group center scenario and the inverse matrix of the Jacobian matrix; using the power flow approximation algorithm that retains nonlinear terms to calculate the power flow solution of the group members.

[0013] As an optimal solution of the power system probabilistic power flow calculation method based on R-vine Copula described in the present invention, the K-means clustering algorithm with distance constraints includes: setting distance constraints between group members and group centers; classifying samples that do not meet the distance constraints into new groups; and repeatedly calculating the group centers until the distances between all group members and their corresponding group centers meet the constraints.

[0014] As an optimal solution of the power system probabilistic power flow calculation method based on R-vine Copula described in the present invention, the power flow approximation algorithm that retains nonlinear terms includes: keeping the Jacobian matrix at the group center scene unchanged; only updating the nonlinear terms during each iteration; and obtaining the approximate power flow solution of the group members after a preset number of iterations.

[0015] As a preferred solution of the power system probabilistic power flow calculation method based on R-vine Copula described in the present invention, the optimal power flow calculation adopts a wait-and-see model, including: reflecting the wind farm output scenario in the economic dispatch model; taking the minimum sum of the predicted scenario fuel cost, the fuel cost of each scenario and the penalty cost as the objective function; ensuring that each scenario meets physical constraints and safety constraints.

[0016] As an optimal solution for the power system probabilistic power flow calculation method based on R-vine Copula described in the present invention, the penalty fee includes the traditional unit output adjustment fee, and each scenario must meet the following: system power flow equation constraints; line power constraints; node voltage amplitude constraints; generator output upper and lower limit constraints; scenario transfer constraints.

[0017] As an optimal solution of the power system probabilistic power flow calculation method based on R-vine Copula described in the present invention, the scenario transfer constraint indicates that the conventional unit adjusts the output from the predicted scenario to the error scenario within a specified time, and the adjustment amount is limited by the unit's climbing rate.

[0018] In a second aspect, an embodiment of the present invention provides a power system probabilistic power flow calculation system based on R-vine Copula, which includes a data acquisition module for acquiring wind farm prediction error data in the power system and modeling the prediction error data using an R-vine Copula model to generate a wind farm output scenario;

[0019] an estimation module, performing a probabilistic power flow calculation on the wind farm output scenario using a power flow estimation algorithm based on clustering and retaining nonlinear terms;

[0020] The data calculation module performs optimal power flow calculation according to the result of the probabilistic power flow calculation.

[0021] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the power system probabilistic flow calculation method based on R-vine Copula as described in the first aspect of the present invention are implemented.

[0022] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the power system probabilistic flow calculation method based on R-vine Copula as described in the first aspect of the present invention are implemented.

[0023] The beneficial effects of the present invention are as follows: the proposed method for calculating probabilistic power flow in a power system based on R-vine Copula models models wind farm forecast error data, effectively resolving the inflexibility of traditional Copula functions in characterizing complex multidimensional correlation structures. Furthermore, by introducing a K-means clustering algorithm with distance constraints, adaptive clustering of scenarios is achieved, avoiding the limitation of the traditional K-means algorithm requiring a pre-specified number of clusters and improving the accuracy of scenario classification.

[0024] On this basis, the present invention adopts a power flow approximation algorithm that retains nonlinear terms. By fixing the Jacobian matrix of the cluster center scenario and updating only the nonlinear terms, this strategy significantly reduces the computational effort while ensuring accuracy. Furthermore, by performing optimal power flow calculations using a wait-and-see model, the wind farm output scenario is directly reflected in the economic dispatch model, and scenario transfer constraints that consider unit ramping constraints are introduced. This not only ensures the engineering feasibility of the optimization results, but also improves the dispatch scheme's adaptability to uncertainty. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 This is a flow chart of the power system probabilistic power flow calculation method based on R-vine Copula;

[0027] Figure 2 This is a computer equipment diagram for the power system probabilistic power flow calculation method based on R-vine Copula;

[0028] Figure 3 This is the probabilistic power flow calculation flow chart of the power system probabilistic power flow calculation method based on R-vine Copula;

[0029] Figure 4 This is a comparison chart of the clustering results under the prediction error distance constraint of the power system probabilistic power flow calculation method based on R-vine Copula;

[0030] Figure 5 This is a comparison chart of the relationship between the maximum voltage error value and the number of clusters for the power system probabilistic power flow calculation method based on R-vine Copula;

[0031] Figure 6 This is a line chart of the mean voltage error in all scenarios of the power system probabilistic power flow calculation method based on R-vine Copula;

[0032] Figure 7 The following is a comparison graph of the power distribution probability density curve of line 10-22 based on the power system probabilistic power flow calculation method based on R-vine Copula;

[0033] Figure 8 The power probability density distribution curve of line 98-100 based on the power system probabilistic power flow calculation method of Rvine Copula is shown;

[0034] Figure 9This is a diagram of line power standard deviation under different models of the power system probabilistic power flow calculation method based on R-vine Copula. DETAILED DESCRIPTION

[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0036] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0037] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it designate a separate or selective embodiment that is mutually exclusive with other embodiments.

[0038] Example 1

[0039] Reference Figures 1 and 2 , which is the first embodiment of the present invention, provides a method for calculating the probabilistic power flow of a power system based on R-vine Copula, including:

[0040] S100: Obtain wind farm prediction error data in the power system, and use the R-vine Copula model to model the prediction error data to generate a wind farm output scenario;

[0041] Specifically, wind farm forecast error data primarily includes short-term power forecast error data, medium-term power forecast error data, long-term power forecast error data, and actual output data. Wind farm forecast error data is historical data collected from multiple sources, including power forecast systems, SCADA systems, and energy management systems.

[0042] In an optional embodiment, the short-term power forecast error data, the medium-term power forecast error data, the long-term power forecast error data, and the actual output data can be any combination of data acquired by the power forecasting system at different time scales. For example, when the short-term power forecast error data is error data for a 0-4 hour forecast period, the long-term power forecast error data can be error data for a 24-168 hour forecast period.

[0043] In an optional embodiment, the short-term power prediction error data, medium-term power prediction error data, long-term power prediction error data, and actual output data may also be increased or decreased with other error data according to different prediction algorithms. For example, when more refined modeling is required, ultra-short-term prediction error data (i.e., the fifth type of prediction error data) may be added to capture the instantaneous change characteristics of the wind farm output. In addition, considering the impact of weather conditions on prediction accuracy, an adaptive meteorological correction algorithm may also be introduced to dynamically adjust the collected prediction error data.

[0044] It should be noted that the collection of the above prediction error data can comprehensively cover the output characteristics of the wind farm at different time scales, including but not limited to ultra-short-term, short-term, medium-term, and long-term prediction errors, thus ensuring the accuracy and comprehensiveness of the R vine Copula modeling. At the same time, by introducing multiple data collection systems, such as power prediction systems, SCADA systems, and energy management systems, the advantages of various types of data can be fully utilized, complementing each other to improve the efficiency and accuracy of modeling.

[0045] S200: Perform probabilistic power flow calculation on the wind farm output scenarios using a power flow estimation algorithm based on clustering and retaining nonlinear terms;

[0046] In the embodiment of the present application, the power flow estimation algorithm based on clustering and retaining nonlinear terms includes three main steps:

[0047] Cluster the wind farm output scenarios using the K-means clustering algorithm with distance constraints to obtain the cluster center scenarios and the corresponding cluster members;

[0048] Calculate the power flow solution and the inverse matrix of the Jacobian matrix of the cluster center scenarios using the Newton-Raphson method;

[0049] Calculate the power flow solutions of the cluster members using the power flow approximation algorithm that retains nonlinear terms.

[0050] In a preferred embodiment, clustering can be performed based on different scenario characteristics according to the needs of power flow calculation. For example, for wind farm scenarios in voltage-sensitive areas, more detailed clustering may be required to ensure the accuracy of voltage calculation; for lines with heavy power flow, the clustering characteristics of power distribution may need to be concerned. The scenarios after clustering not only maintain the main characteristics of the original data but also significantly reduce the computational amount.

[0051] It should be noted that the clustering algorithm takes into account the similarities and differences between scenarios. By setting reasonable distance constraints, it not only ensures the uniformity of clustering but also avoids excessive dispersion. At the same time, the Newton-Raphson method is used to solve the exact power flow solution of the cluster center scenarios, providing a reliable reference point for subsequent approximate calculations.

[0052] In an optional embodiment, the distance-constrained K-means clustering algorithm can employ different distance metrics for different scene characteristics. For example, Euclidean distance can be used to measure the overall differences between scenes, while Mahalanobis distance can be used to consider the correlation structure between scenes. This flexible distance metric allows the clustering results to better reflect actual physical meaning.

[0053] For example, when the system has five wind farms, the scene grouping can be performed according to the following steps:

[0054] First, a scenario vector is constructed, which contains the output value of each wind farm. The number of initial cluster centers is set to 10, and the distance constraint threshold is set to 20% of the overall variance. The improved K-means algorithm is executed until all scenarios are reasonably assigned to the corresponding clusters.

[0055] For the power flow approximation algorithm that retains nonlinear terms, the following steps are performed within each group:

[0056] The Jacobian matrix of the group center is used as the initial Jacobian matrix of all members of the group; the Jacobian matrix is kept unchanged during the iterative calculation, and only the nonlinear terms of the equation are updated; the maximum number of iterations is set, generally no more than 3 times to obtain results that meet engineering accuracy.

[0057] S201: A clustering-based power flow estimation algorithm that retains nonlinear terms includes: clustering wind farm output scenarios using a K-means clustering algorithm with distance constraints to obtain a cluster center scenario and corresponding cluster members; calculating the power flow solution of the cluster center scenario and the inverse matrix of the Jacobian matrix using the Newton-Raphson method; and calculating the power flow solution of the group members using a power flow approximation algorithm that retains nonlinear terms.

[0058] S202: The K-means clustering algorithm with distance constraints includes: setting distance constraints between group members and group centers; classifying samples that do not meet the distance constraints into new groups; and repeatedly calculating group centers until the distances between all group members and their corresponding group centers meet the constraints.

[0059] S203: The power flow approximation algorithm retaining the nonlinear term includes: keeping the Jacobian matrix at the group center scene unchanged; updating only the nonlinear term in each iteration process; and obtaining the approximate power flow solution of the group members after a preset number of iterations.

[0060] S204: The optimal power flow calculation adopts a wait-and-see model, including: reflecting the wind farm output scenario in the economic dispatch model; taking the minimum sum of the predicted scenario fuel cost, the fuel cost of each scenario and the penalty cost as the objective function; and ensuring that each scenario meets the physical constraints and safety constraints.

[0061] S205: Penalty costs include traditional unit output adjustment costs, and each scenario must meet the following: system power flow equation constraints; line power constraints; node voltage amplitude constraints; generator output upper and lower limit constraints; scenario transfer constraints.

[0062] S206: The scenario transfer constraint indicates that the conventional unit is adjusted from the output under the predicted scenario to the output under the error scenario within a specified time, and the adjustment amount is limited by the unit's ramp rate.

[0063] S300: performing optimal power flow calculation according to the result of the probabilistic power flow calculation.

[0064] In the embodiment of the present application, the wait-and-see model is used to calculate the optimal power flow. The model has the following characteristics:

[0065] The wind farm output scenario is directly reflected in the economic dispatch model; the objective function is to minimize the sum of the predicted scenario fuel cost, the fuel cost of each scenario and the penalty cost; and ensure that each scenario meets the physical constraints and safety constraints.

[0066] In an optional embodiment, the penalty fee includes the cost of adjusting the output of traditional units, and each scenario must meet multiple constraints:

[0067] System power flow equation constraints ensure power balance; line power constraints prevent line overload; node voltage amplitude constraints maintain voltage stability; generator output upper and lower limit constraints comply with equipment capabilities; scenario transfer constraints take into account unit regulation characteristics.

[0068] For example, for a system with 100 nodes, the optimal power flow calculation can be performed as follows:

[0069] Preprocessing stage: Organize various constraints and establish a standardized optimization model; Solution stage: Use the interior point method to solve the nonlinear programming problem, setting the convergence accuracy to 10^-4; Post-processing stage: Analyze the system operation status under various scenarios and evaluate economic and safety indicators.

[0070] It should be noted that the optimal power flow model fully accounts for the uncertainty of wind farm output. Furthermore, by appropriately setting penalty fees, it balances economic and safety requirements. Furthermore, the introduction of scenario transition constraints ensures the feasibility of the scheduling solution and avoids overly idealistic optimization results.

[0071] Furthermore, this embodiment also provides a power system probabilistic power flow calculation system based on R-vine Copula, including:

[0072] The data acquisition module obtains the wind farm prediction error data in the power system, and uses the R-vine Copula model to model the prediction error data to generate the wind farm output scenario;

[0073] The estimation module uses a cluster-based power flow estimation algorithm that retains nonlinear terms to perform probabilistic power flow calculations for wind farm output scenarios.

[0074] The data calculation module performs optimal power flow calculation based on the results of probabilistic power flow calculation.

[0075] In summary, by using the R-vine Copula model to model wind farm prediction error data, the nonlinear correlation structure between the outputs of multiple wind farms can be captured more accurately. Compared with the traditional Gaussian Copula and C-vine Copula models, the generation quality of wind farm output scenarios is significantly improved, thereby providing more reliable input data for subsequent probabilistic power flow calculations.

[0076] The adaptive determination of the number of clusters avoids the limitation of the traditional K-means algorithm that requires the pre-specified number of clusters; the distance constraint ensures the similarity of scenes within the group, improving the accuracy of subsequent approximate calculations; and the state quantity deviation between group members and the group center is effectively reduced, significantly reducing calculation errors.

[0077] Keeping the Jacobian matrix of the cluster center scene unchanged avoids the large computational overhead of repeatedly calculating and updating the Jacobian matrix; only updating the nonlinear terms greatly improves computational efficiency while ensuring computational accuracy; an approximate solution that meets engineering requirements can be obtained through a finite number of iterations, significantly reducing calculation time.

[0078] Directly reflecting the wind farm output scenario in the economic dispatch model improves the model's adaptability to uncertainty; by introducing penalty fees, a reasonable balance is achieved between the needs of economy and safety; and considering the scenario transfer constraints of the unit climbing constraints ensures the engineering feasibility of the optimization results.

[0079] By combining R-vine Copula modeling with clustering algorithms, the accuracy of scenario generation is guaranteed while the computational efficiency is improved. By combining power flow calculations that retain nonlinear terms with the wait-and-see model, the computational accuracy is guaranteed while the organic coordination of various technical links ultimately achieves an efficient solution to the probabilistic power flow calculation of large-scale power systems.

[0080] Example 2

[0081] Reference Figure 2 - Figure 9This is the second embodiment of the present invention, which provides a method for calculating the probabilistic power flow of a power system based on R-vine Copula. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0082] Probabilistic power flow calculation with nonlinear terms preserved based on clustering

[0083] The probabilistic power flow calculation process based on the R-vine model is as follows: Figure 3 The input data includes historical forecast errors, system topology, power generation, load, and other related data. The specific implementation steps are: first, use R-vine Copula to generate sampling samples; then use the improved K-means method to cluster the samples; finally, use an approximate power flow solution algorithm that retains nonlinear terms to estimate state variables and output system statistical characteristics such as expected value, variance, and probability distribution function.

[0084] The general idea of the probability power flow calculation based on clustering involved in this patent is: first calculate the cluster center scene The accurate power flow solution of the scene near the center scene s k,j j=1,...n to perform an approximate solution. Because the distance between group members and their respective group centers is The distance is close, so there is reason to believe The power flow solution is a good starting point for the power flow calculation of the group members and can reduce the number of iterations of the power flow calculation. The approximate solution idea of retaining the quadratic term involved in this patent is: Jacobian matrix obtained from power flow solution As a group member k,j The Jacobian matrix is kept constant during the iterative calculation, and only the nonlinear term is updated at each iteration. This method avoids the Jacobian update and inversion operation, reducing the amount of calculation, and the number of iterations T can be set according to the accuracy requirements.

[0085] Approximate solution method that retains nonlinear terms

[0086] The currently commonly used Newton-Raphson method ignores the quadratic terms of the Taylor series expansion when solving the tidal current equation. The correction amount is obtained by repeatedly solving the linear equation system, and the state quantity and Jacobian matrix are updated until the convergence conditions are met. A fast tidal current calculation method based on a rectangular coordinate system model that retains the quadratic terms keeps the Jacobian matrix unchanged during the iteration process, and only updates the quadratic terms in each iteration, thereby improving the convergence and calculation speed. This patent will use the tidal current calculation method that retains the quadratic terms to estimate a high-precision tidal current solution after a finite number of iterations. The expression of the tidal current equation in the rectangular coordinate system is

[0087]

[0088] Among them, P i ,Q i It is the node injection power, V i is the node voltage, e i ,f i is the real and imaginary part of the voltage at node i, G ij ,B ij is the element in the i-th row and j-th column of the admittance matrix.

[0089] Expand the tidal flow equation according to Taylor series,

[0090]

[0091] Among them, sP i ,sQ i ,sV i is a second-order term. Because the tidal current equation in rectangular coordinates is a homogeneous quadratic form, the Taylor expansion has only three terms, namely the constant term, the first-order term, and the second-order term.

[0092] Write (2) in matrix form. For PQ nodes,

[0093]

[0094] in, For PV nodes, there are

[0095]

[0096] in, S=2f i 0 .

[0097] Quadratic term sP i ,sQ i ,sV i It has a similar form to (1), except that the variables are changed from e and f to Δe and Δf. The specific form is

[0098]

[0099] (3) and (5) can be written as the iterative formula for integrating nonlinear quadratic terms:

[0100]

[0101] in, is the Jacobian matrix at the reference point x0.

[0102] Solving group members k,j The state quantity method is: (1) Calculate the group center power flow solution (2) Then calculate the inverse matrix of the Jacobian matrix of the power flow equation at this point (3) Update P in equation (6) to scene s k,j The corresponding P k,j , calculate Δe according to formula (6) (1) ,Δf (1) , for sP i ,sQ i ,sV i Update; (4) Calculate the correction amount Δe (2) ,Δf (2) and sP i ,sQ i ,sV i ; Repeat this process until the convergence condition is met.

[0103] The power flow calculation method that retains the quadratic term does not need to update the Jacobian matrix, so the amount of calculation is small. The group center is close to the group members, With high precision. In fact, s k,j The state quantity does not need high precision, so it can be iterated T times to reach sufficient precision.

[0104] K-means clustering algorithm with distance constraints

[0105] The accuracy of the solution of the power flow algorithm taking into account nonlinear terms after finite iterations is affected by ΔP WG The influence of ΔP WG The larger the value, the greater the error. To address the above problem, this patent uses the K-means algorithm to cluster the scenes. This method can effectively reduce ΔP WG The specific approach is to add the distance constraint between group members and group center to the K-means algorithm so that ΔP WG The range of change is limited to a certain predefined range.

[0106] The K-means algorithm divides data into predetermined K groups based on minimizing the error distance and uses distance as the evaluation index of similarity, that is, the closer the distance between two objects, the greater their similarity.

[0107] The objective function to minimize the error distance is:

[0108]

[0109] Among them, n k represents the number of samples in the kth group, x kjrepresents the jth sample in the kth group, and mk represents the cluster center (cluster center) of the kth group. In the traditional K-means algorithm, samples are assigned to the cluster with the closest cluster center. This judgment method may cause the clustering results to appear striped and the distance between the group members and the cluster center may be too large, resulting in a large error in the approximate algorithm. In order to make the clustering results help to approximate the algorithm accuracy, we customize the K-means algorithm and assign the group member x to the cluster center. kj and group center m k Distance constraint||x kj -m k || ∞ ≤d max Add it to the K-means algorithm. In this way, the K-means clustering algorithm with distance constraint is as follows:

[0110] Input: Scene Sets i ∈S scn ,i=1,...N, distance constraint vector d max , the set of scenes V←φ that does not satisfy the distance constraint.

[0111] Output items: group members and group centers.

[0112] From the dataset S cn Randomly select K objects as the initial cluster centers;

[0113] Let V←φ and calculate each sample s separately i To each cluster center m k If s i The nearest group center m k Satisfaction||s i -m k || ∞ ≤d max , then s i into the kth group; otherwise, s i Classified into set V;

[0114] If V is an empty set, go to step 4; otherwise, use set V as a new group. Let K = K + 1 and use the following formula to calculate the center of the group again:

[0115] Among them, n k is the number of scenes in the kth group, x kj is the scene in the kth group;

[0116] Compare with the K cluster centers calculated last time. If the cluster centers have changed, go to step 2, otherwise go to step 5.

[0117] Stop calculation and output group center mk ,k=1,...K and the group members they belong to.

[0118] The clustering algorithm does not require a given number of clusters. It automatically increases the number of clusters based on whether the distance constraint is met, and ultimately makes each cluster satisfy the distance between the group members and the group center less than a given value d. max .

[0119] The probabilistic power flow algorithm based on the clustering algorithm and taking into account the uncertainty of wind power is:

[0120] Input items: system topology information, scenario set S generated by Rvine Copula scn , the maximum distance deviation allowed between group members and group center is d max .

[0121] Output items: state quantity statistics of each scene.

[0122] Use the improved K-menas method in Section 5.2.2 to analyze the scene S scn Perform grouping and obtain K group centers m k ,k=1,...K and the group members sk,j corresponding to each group k;

[0123] Let k←1, and use the Newton-Raphson method to calculate the power flow solution of the cluster center scenario as x k,0 and the inverse of the Jacobian matrix

[0124] Use the DC power flow quadratic term approximation algorithm in Section 5.2.1 to calculate the approximate power flow solution for the kth group member and set k = k + 1;

[0125] If k=K+1, go to step 5, otherwise go to step 2;

[0126] Output the state quantity of each scene and count the distribution.

[0127] 5.1 IEEE-30 Node Example

[0128] First, a case study was conducted on the IEEE-30 node system. The prediction error data of wind farms #03559 and #03493 were used to test the effectiveness of the distance-constrained clustering algorithm. 431 prediction error points with similar prediction values in the same period of history were selected as input data. Assuming = 30, the clustering results are as follows: Figure 4 As shown in the figure, all the data is divided into 16 clusters, with adjacent clusters marked in different colors and cluster centers indicated by a '+'. The figure shows that the clustering results are relatively uniform, and the distances between cluster members and cluster centers are within the allowable range.

[0129] The IEEE-30 node system in MatPower was used to test the effectiveness of the proposed method. The traditional generators at nodes 22 and 23 were replaced by wind farms. The prediction errors of these two wind farms were 10% of the predicted values (21.59MW and 19.2MW) and the distribution was the same as that of the prediction errors of wind farms #03559 and #03493. Copula was used to generate 2000 scenarios, and the number of iterations T of the approximation algorithm for retaining nonlinear terms was set to 2. When d max The number of clusters and the calculation time are shown in Table 1.

[0130] Table 1 Time comparison under different numbers of clusters

[0131]

[0132]

[0133] As can be seen from Table 1, d max The smaller the value, the more groups there are, and the more accurate power flow calculations are required, which increases the total calculation time. However, compared with running 2000 power flow calculations, the algorithm time is significantly shortened. The relationship between the maximum and mean voltage errors of the approximate solution and the exact solution for 2000 scenarios and the number of groups is shown in the figure below: Figure 5 and 6 As shown, the PV node voltage value is omitted.

[0134] from Figure 5 and 6 It can be seen that as the number of clusters increases from 1 to 46, the accuracy of the approximate calculation gradually improves. When the number of clusters is 14, the maximum error is 2e -4 , the average error is 5e -5 , which has high accuracy and can be used as the number of groups used in the calculation. The calculation time is only 1 / 36 of the exact calculation time.

[0135] Figure 7 The power distribution of line 10-22 is given. As can be seen from the figure, the results obtained by the approximate method and the exact solution method are almost consistent.

[0136] 5.2 IEEE-118 Node Example

[0137] Next, we tested the probabilistic power flow effects of multiple wind farms on a 118-bus system. We replaced the traditional generators on buses 61, 80, 100, 103, and 111 with wind farms. The predicted power outputs of each wind farm were 160 MW, 477 MW, 252 MW, 40 MW, and 36 MW, respectively, and they were modeled as constant voltage nodes. The prediction error distribution was identical to that of predictions #03579, #03693, #03902, #03945, and #03978.

[0138] The data are modeled using R-vine Copula, C-vine Copula, and Gaussian Copula functions, scenarios are generated, and probability power flow calculations are performed. Finally, the distribution of state variables is statistically analyzed. The probability density distribution of line 98-100 power is as follows: Figure 8 shown.

[0139] It can be seen from the figure that the results of the R-vine Copula modeling sampling calculation are closer to the empirical distribution than those of the C-vine Copula and Gaussian Copula, which means that the R-vine Copula has a higher fitting accuracy.

[0140] The original data calculation results are used as the basis for judging the accuracy of the model. Use Rvine Copula, Cvine Copula, and Gaussian Copula functions to model and generate 2000 scenarios respectively, use the algorithm in 5.2.2 to calculate the probability flow, and calculate the expected value E(S) of the state quantity. his ) and standard deviation std(S γ Table 2 shows the deviation of the power of lines 69-75 and 56-59 from the reference value. and Where γ represents the copula model used, and his represents the calculation using the original data.

[0141] From Table 2 and Figure 7 As can be seen from the figure, the R-vine Copula model's standard deviation is closest to the benchmark value, demonstrating a better data fit. In the Gaussian model results, the mean power of lines 56-59 is slightly better than the R-vine Copula model, but its standard deviation is much greater than the R-vine model, indicating a stability bias. Overall, the R-vine Copula model provides a better fit than both the C-vine and Gaussian Copula models.

[0142] Table 2 Mean and standard deviation of power calculation results of lines 69-75 and 56-59 and historical data

[0143]

[0144] Scenario-based optimal power flow calculation

[0145] The wait-and-see model incorporates wind power output scenarios into the economic dispatch model and uses this scenario information to make decisions. Compared to the here-and-now model, the wait-and-see model can more effectively achieve safe and stable grid operation. This patent establishes a scenario-based optimal power flow model based on the wait-and-see concept.

[0146] This patent establishes a scenario-based optimal power flow model. The model takes the minimum sum of the predicted scenario fuel cost, each scenario fuel cost, and penalty cost as the objective function, and each scenario must meet physical constraints and safety constraints to establish the model. The objective function is:

[0147]

[0148] Among them, the first term in the objective function is the total fuel cost at the reference operating point, the second term is the weighted sum of the fuel costs in each scenario, and the third term is the weighted sum of the output adjustment costs of traditional units. The expression is:

[0149]

[0150] Among them, P CG,i is the power generation power of unit i, K is the number of random scenarios, p k is the probability of scene k, is the active power output of conventional unit i in scenario k.

[0151] Each scenario k = 0, 1, ...K must satisfy the following set of constraints:

[0152]

[0153] Among them, S B is the set of all nodes, S CG is the collection of all traditional generators, S WG is the set of all wind turbines, S G is the set of all reactive sources in the system, S L is the set of all branches. The constraints include system power flow equations (a)-(b), line power constraints (c), node voltage amplitude constraints (d), and motor output upper and lower limits (e)-(f). Constraint (g) is the transition constraint between the error scenario and the predicted scenario, indicating that conventional units must adjust their output from the predicted scenario to the error scenario within a specified time. where r ug and r dg It represents the upward and downward climbing rate of the unit, and ΔT represents the time interval for scenario transfer and rescheduling.

[0154] Formulas (15) and (17) can be simplified as:

[0155]

[0156] Wherein, subscript 0 represents the benchmark scenario, f0(·), g0(·), h0(·) represent the objective function, equality constraint and inequality constraint of the benchmark state respectively, k represents the scenario number, p k Represents the probability of each scene, f k (·),gk (·),h k (·) denote the objective function, equality constraint and inequality constraint of each scenario respectively.

[0157] The third term of the objective function (a) is not differentiable due to the absolute value operation. In order to apply the interior point method to solve it, the absolute value is replaced by the following equivalent form:

[0158] |ΔP CG,i,k |=r i,k +v i,k

[0159] P CG,i,k =P CG,i,0 +(r i,k -v i,k )

[0160] 0≤r i,k ≤ΔP up,max

[0161] 0≤v i,k ≤ΔP down,max

[0162] r i,k ·v i,k =0 (19)

[0163] Among them, r i,k ,v i,k They represent the upward and downward adjustment amounts of the i-th traditional unit in scenario k respectively.

[0164] Numerical Examples

[0165] The above model was tested using a 23-node example provided by PSS / E software. The system consists of 6 generators. The traditional generators at nodes 101 and 211 are now modified into wind turbines, and a new wind farm is connected to nodes 201 and 206. The output forecast values are 550MW, 566MW, 50MW, and 40MW. The forecast error distribution is the same as the forecast distribution of wind farms #03579, #03902, #03945, and #03978. The adjustable capacity of the traditional generator is ±85MW, ±90MW, ±50MW, and ±50MW, respectively. k Set to 28. Using R-vine Copula modeling, 10,000 error scenarios were generated and then reduced to 8 scenarios using the synchronous back-substitution scenario reduction method. The resulting 8 scenarios are shown in Table 3.

[0166] Table 3 Eight wind farm output scenarios

[0167] Scene number 1 2 3 4 5 6 7 8 Probability 0.11 0.09 0.14 0.13 0.10 0.05 0.25 0.13 <![CDATA[ΔP1(MW)]]> 41.34 -3.77 -44.74 84.28 -20.79 23.17 4.41 -73.80 <![CDATA[ΔP2(MW)]]> 6.99 17.10 -3.68 43.68 -45.67 55.48 -15.23 -51.12 <![CDATA[ΔP3(MW)]]> 1.52 1.04 -1.12 3.76 -2.35 2.91 -0.78 -3.32 <![CDATA[ΔP4(MW)]]> 1.95 0.61 -1.57 4.73 -2.16 2.91 -0.33 -4.39

[0168] The second row shows the probability values for each scenario, and the third to sixth rows show the power prediction error values for each wind farm under each scenario. Table 4 shows the output and cost results of traditional units for the prediction scenario and the multi-scenario model under the baseline scenario.

[0169] Table 4 Comparison of unit output and cost under the prediction scenario and the reference case of the multi-scenario model

[0170]

[0171]

[0172] Table 4 shows that while the outputs of units 102 and 206 are similar when compared to the multi-scenario model and the predicted scenario model, there is a significant difference in the outputs of units 3011 and 3018. The multi-scenario model output of unit 3011 is 72 MW higher than the predicted scenario model output, while the output of unit 3018 is 50 MW lower. This significant difference in output between units 3011 and 3018 is due to the fact that when scenario 7 occurs, to balance the power deviation in scenario 7, the four units must generate outputs of 690 MW, 834 MW, 332 MW, and 116 MW, respectively. If unit 3018 operates at 194.2 MW, as predicted by the scenario model, it will be limited by the 50 MW downward ramping capability and will drop to a maximum of 144.2 MW, still significantly below 116 MW and unable to balance the upward ramping of wind power. If unit 3018 operates at 144.2 MW, as predicted by the multi-scenario model, it can be adjusted downward to 116 MW, meeting the power balance requirement, but this comes at the cost of increasing the output of the more expensive units. Therefore, the multi-scenario model sacrifices economic efficiency in exchange for system security and provides greater resilience to uncertainty.

[0173] This patent applies the scenario method to the calculation of probabilistic power flow and optimal power flow problems. In order to solve the problem of high computational complexity of repeatedly calculating the power flow solution for each scenario, an approximate solution algorithm that retains nonlinear terms is proposed. In addition, the traditional K-means algorithm is improved by adding a distance constraint between group members and group centers, which helps to improve the accuracy of the approximate calculation method. When using the rectangular coordinate power flow model to approximate the power flow, the purpose of increasing the calculation speed is achieved by fixing the Jacobian matrix and a finite number of iterative calculations. In addition, this patent also establishes a scenario-based optimal power flow model. The results of the case analysis show that it is more accurate than the optimal power flow model based on the prediction scenario.

[0174] Example 3

[0175] This embodiment also provides a computer device, which is applicable to a method for calculating the probabilistic power flow of a power system based on R-vine Copula, and includes a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement a forced oscillation detection and positioning method for a distribution network as proposed in the above embodiment.

[0176] This embodiment further provides a storage medium storing a computer program, which, when executed by a processor, implements a forced oscillation detection and positioning method for a distribution network as proposed in the above embodiment.

[0177] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0178] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0179] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0180] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for calculating probabilistic power flow in a power system based on R-vine Copula, characterized by: The method includes obtaining wind farm prediction error data in the power system, and modeling the prediction error data using an R-vine Copula model to generate a wind farm output scenario; Performing probabilistic power flow calculation on the wind farm output scenario using a clustering-based power flow estimation algorithm that retains nonlinear terms; An optimal power flow calculation is performed based on the result of the probabilistic power flow calculation.

2. The method for calculating probabilistic power flow in a power system based on R-copula according to claim 1, wherein: The clustering-based power flow estimation algorithm that retains nonlinear terms includes: using a K-means clustering algorithm with distance constraints to cluster the wind farm output scenarios to obtain a cluster center scenario and corresponding group members; using the Newton-Raphson method to calculate the power flow solution of the cluster center scenario and the inverse matrix of the Jacobian matrix; and using a power flow approximation algorithm that retains nonlinear terms to calculate the power flow solution of the group members.

3. The method for calculating probabilistic power flow in a power system based on R-copula according to claim 2, wherein: The K-means clustering algorithm with distance constraint includes: setting distance constraints between group members and group centers; classifying samples that do not meet the distance constraints into new groups; and repeatedly calculating group centers until the distances between all group members and their corresponding group centers meet the constraint conditions.

4. The method for calculating probabilistic power flow in a power system based on R-copula according to claim 3, wherein: The power flow approximation algorithm retaining nonlinear terms includes: keeping the Jacobian matrix at the group center scene unchanged; updating only the nonlinear terms in each iteration process; and obtaining the approximate power flow solution of the group members after a preset number of iterations.

5. The method for calculating probabilistic power flow in a power system based on R-copula according to claim 4, characterized in that: The optimal power flow calculation adopts a wait-and-see model, including: reflecting the wind farm output scenario in the economic dispatch model; taking the minimum sum of the predicted scenario fuel cost, the fuel cost of each scenario and the penalty cost as the objective function; and ensuring that each scenario meets physical constraints and safety constraints.

6. The method for calculating probabilistic power flow in a power system based on R-copula according to claim 5, characterized in that: The penalty fee includes the traditional unit output adjustment fee, and each scenario must meet the following: system power flow equation constraints; line power constraints; node voltage amplitude constraints; generator output upper and lower limit constraints; scenario transfer constraints.

7. The method for calculating probabilistic power flow in a power system based on R-copula according to claim 6, characterized in that: The scenario transfer constraint indicates that the conventional unit is adjusted from the output under the predicted scenario to the output under the error scenario within a specified time, and the adjustment amount is limited by the unit's ramp rate.

8. A power system probabilistic power flow calculation system based on R-vine Copula, based on the power system probabilistic power flow calculation method based on R-vine Copula according to any one of claims 1 to 7, characterized in that: It also includes a data acquisition module for acquiring wind farm prediction error data in the power system and modeling the prediction error data using an R-vine Copula model to generate a wind farm output scenario; an estimation module, performing a probabilistic power flow calculation on the wind farm output scenario using a power flow estimation algorithm based on clustering and retaining nonlinear terms; The data calculation module performs optimal power flow calculation according to the result of the probabilistic power flow calculation.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the power system probabilistic power flow calculation method based on R-vine Copula according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the power system probabilistic power flow calculation method based on R-vine Copula according to any one of claims 1 to 7 are implemented.