Photovoltaic local consumption capability calculation method and system considering power grid constraint
By constructing and simplifying the calculation model of photovoltaic in-place absorption capacity and transforming the objective function into an obstacle function, the solution is solved by using the Lagrangian multiplier method, and the existing photovoltaic absorption capacity calculation method solves the problems of low efficiency and poor adaptability in large-scale power grids, achieving efficient and adaptive photovoltaic absorption capacity calculation.
Patent Information
- Application Number
- CN202411618235.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-04-15
AI Technical Summary
The existing calculation methods for photovoltaic absorption capacity are low in solution efficiency and poor in adaptability when facing large-scale power grids, making it difficult to effectively evaluate photovoltaic absorption capacity.
A method for calculating photovoltaic in-site absorption capacity considering the constraints of the power grid is proposed. By constructing a calculation model for photovoltaic in-site absorption capacity, the model is simplified into a general nonlinear model, and the objective function is transformed into an obstacle function, and the solution is performed using the Lagrangian multiplication method.
It improves the solution efficiency and adaptability of photovoltaic in-site consumption capacity calculation, can quickly converge to the optimal solution, and is suitable for large-scale power grid environments.
Smart Images

Figure CN119830512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for calculating photovoltaic local consumption capacity, and in particular to a method and system for calculating photovoltaic local consumption capacity taking grid constraints into consideration. Background Art
[0002] As photovoltaic power generation begins to develop towards large-scale centralized grid-connected type, it accounts for an increasing proportion in the system, and the safety and stability of system operation are becoming increasingly prominent. In addition, due to the limitation of resource distribution, large-scale photovoltaic power stations are mostly located at the end of the power grid, with relatively weak network structure and poor anti-disturbance ability, and the construction scale is greatly limited. Compared with conventional hydropower and thermal power units, the reactive output capacity of photovoltaic power stations is obviously insufficient, and they do not have the voltage and power factor adjustment capabilities of conventional units; in addition, conventional hydropower and thermal power units can achieve continuous regulation of active power and reactive power, while most photovoltaic power stations in China can only operate at a constant power factor, that is, they cannot achieve continuous regulation of active and reactive power. In the face of the development status and existing problems of photovoltaic power stations, it is necessary to further improve the full guaranteed purchase of wind power and photovoltaic power generation. A set of calculation methods to accurately evaluate the photovoltaic absorption capacity is necessary to guide the scientific and orderly construction of regional photovoltaic power stations and coordinate the sustainable development of power grids.
[0003] At present, some mature calculation methods have been formed in the calculation of photovoltaic absorption capacity, such as the unit combination technology that considers network security constraints. This technology uses mathematical optimization technology to simulate various links of power system operation. The optimization goal is to maximize the photovoltaic absorption capacity. The optimization model considers relevant constraints including load balance, unit output, line flow, etc., thereby constructing a large-scale, high-dimensional, nonlinear power system operation optimization model, and applying algorithms such as mixed integer programming to solve the model, and finally realizing the calculation of photovoltaic absorption capacity. Mixed integer programming usually uses branch and bound (B&B) method to implicitly enumerate all possible combination schemes, and theoretically can obtain the optimal solution to the problem.
[0004] Although this mixed integer programming method can implicitly enumerate all possible combinations and theoretically obtain the optimal solution to the problem, it still has the following defects:
[0005] 1. When facing the influence of complex models when the actual power grid is large in scale, the idea of iteratively seeking the optimal solution in the feasible domain adopted in the above solution method is usually inefficient.
[0006] 2. When the model is too complex, it may even be impossible to solve and its adaptability is poor.
[0007] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the application, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to ordinary technicians in this field. Summary of the invention
[0008] The purpose of the present invention is to overcome the shortcomings of low solution efficiency and poor adaptability in the prior art, and to provide a method and system for calculating photovoltaic local absorption capacity taking into account grid constraints with high solution efficiency and good adaptability.
[0009] To achieve the above objectives, the technical solution of the present invention is:
[0010] In a first aspect, the present invention proposes a method for calculating photovoltaic local consumption capacity considering grid constraints, the calculation method comprising:
[0011] S1. Constructing a photovoltaic local consumption capacity calculation model, wherein the photovoltaic local consumption capacity calculation model aims to maximize the photovoltaic local consumption capacity and considers equality constraints and inequality constraints;
[0012] S2, model simplification, simplifying the calculation model of photovoltaic local consumption capacity into a general nonlinear model, and transforming the objective function into a barrier function;
[0013] S3. Solve the calculation model of photovoltaic local absorption capacity and obtain the evaluation plan of photovoltaic local absorption capacity.
[0014] The photovoltaic local consumption capacity calculation model includes:
[0015] In the above formula, N DG is the number of distributed photovoltaics, P DG,i is the active power output by the distributed photovoltaic power source, and i is the serial number of the distributed photovoltaic power source.
[0016] The equality constraint condition is that the system includes n nodes, including non-engine nodes and generator nodes, each of the nodes includes an active power flow equation and a reactive power flow equation, and the power flow equation of the non-engine node includes:
[0017]
[0018] In the above formula, P Di is the active power injected into non-engine node i, Q Di is the reactive power injected into non-engine node i, G ij is the conductance between nodes ij, B ij is the susceptance V between nodes ij i represents the voltage of node i, i is the engine serial number, j is the node number, θij is the phase angle difference between nodes i and j;
[0019] The power flow equation of the generator node includes:
[0020]
[0021] In the above formula, k∈i means that the kth engine is connected to node i, P Gk is the active power injected into engine node i, Q Gk is the reactive power injected into engine node i;
[0022] The inequality constraints include:
[0023]
[0024] In the above formula, P ij =V i 2 G ij +V i V j (G ij cosθ ij +B ij sinθ ij ), P Gi is the active power output of the i-th unit, Q i is the reactive power output of the i-th unit, V i is the voltage at node i, P ij is the power between nodes i and j.
[0025] In S2, the objective function of the photovoltaic local consumption capacity calculation model is simplified to the following general nonlinear model:
[0026]
[0027] In the above formula, f(x) is the objective function, h(x) is the nonlinear equality constraint, and g is the nonlinear inequality constraint;
[0028] Convert inequality constraints in general nonlinear models into equality constraints:
[0029]
[0030] In the above formula, the slack variable l = [l 1 ,l 2 ,…,l r ] T and u=[u 1 ,u 2 ,…,u r ] T The following conditions are met:
[0031] u>0,l>0;
[0032] Therefore, the general nonlinear model is transformed into the following model:
[0033]
[0034] The objective function is further transformed into a barrier function, which is similar to the original objective function in the feasible domain:
[0035]
[0036] In the above formula, the disturbance factor or barrier factor μ>0. When l or u approaches the boundary, the above function tends to infinity. Therefore, the minimum solution that satisfies the above barrier function cannot be found on the boundary. The inequality restriction is converted into an equality restriction, and the Lagrange multiplier method can be used to solve it directly. The Lagrange function is:
[0037]
[0038] In the above formula, y=[y 1 ,y 2 ,…,y m ],z=[z 1 ,z 2 ,…,z m ],w=[w 1 ,w 2 ,…,w m ] are all Lagrange multipliers. The necessary condition for the existence of the minimum value of this problem is that the partial derivatives of the Lagrange function with respect to all variables and multipliers are 0:
[0039]
[0040]
[0041] In the above formula, L = diag (l 1 ,l 2 ,…,l r ), U = diag(u 1 ,u 2 ,…,u r ), Z = diag(z 1 ,z 2 ,…,z r ), W = diag(w 1 ,w 2 ,…,w r ), we can solve:
[0042] Define Gap = l T zuT w, called the complementary gap, we can get:
[0043] In the above formula, σ∈(0,1) is the central parameter, which is taken as 0.1 according to experience. In most cases, a good convergence effect can be obtained. The necessary condition for the extreme value is a nonlinear equation, which can be solved by the Newton-Raphson method and linearized to obtain the modified equation group:
[0044]
[0045] A simple transformation of the above formula can be expressed in matrix form as follows:
[0046]
[0047] In the above formula, the correction equation includes two parts: the coefficient matrix on the left side of the equation and the constant term on the right side of the equation;
[0048] The coefficient matrix of the modified system of equations includes the Jacobian matrix of the equality constraints Jacobian matrix of inequality constraints Diagonal matrix L -1 Z, diagonal matrix U -1 W and Heisenberg matrix H′;
[0049] The Jacobian matrix of the equality constraint include:
[0050]
[0051] In the above formula, the right side includes 3 sub-matrices:
[0052]
[0053] In the above formula, i is the engine number, j is the node number, i∈j means that the i-th engine is connected to the node j, and vice versa. Indicates that, let the number of engines be ng and the number of nodes be n;
[0054] The Jacobian matrix of the inequality constraint include:
[0055]
[0056] In the above formula, g 1 is the upper and lower bounds of the active power output of the power source, g 2 is the upper and lower bounds of the reactive power output of the reactive power source, g 3 are the upper and lower bounds of the node voltage amplitude, g 4 is the line flow constraint;
[0057]
[0058]
[0059] In the above formula, the number of branches is nbr, and the elements in the matrix are:
[0060]
[0061] The diagonal matrix L -1 Z includes: L -1 Z = diag(z 1 / l 1 ,…,z 2ng+n+nbr / l 2ng+n+nbr );
[0062] The diagonal matrix U -1 W includes: -1 W = diag(w 1 / u 1 ,…,w 2ng+n+nbr / u 2ng+n+nbr );
[0063] The Heisenberg matrix H′ comprises:
[0064]
[0065] a. Calculate H 1
[0066]
[0067] In the formula, A 2 It is a matrix with the coefficients of the quadratic terms of the function as its diagonal.
[0068] b. Calculate H 2
[0069]
[0070] in: y 2i-1 For the 2i-1 Lagrange multiplier y,y 2i For the 2i term Lagrange multiplier y;
[0071]
[0072] c. Calculate H 3
[0073]
[0074] In the above formula, c = z + w;
[0075] d. Calculate H 4
[0076] Obtained from the Jacobian matrix and diagonal matrix of the inequality constraints;
[0077] Finally, the node data, branch data, and power source data of the target power grid are substituted into the aforementioned photovoltaic local absorption capacity calculation model considering the power grid constraints for iterative calculation. When the maximum number of iterations is reached, the optimal solution is obtained after convergence.
[0078] In a second aspect, the present invention proposes a photovoltaic local consumption capacity calculation system considering grid constraints, the system comprising a model building module, a model simplification module and a model solving module;
[0079] The model building module is used to build a photovoltaic local consumption capacity calculation model, which aims to maximize the photovoltaic local consumption capacity and takes into account equality constraints and inequality constraints;
[0080] The model simplification module is used to simplify the photovoltaic local consumption capacity calculation model into a general nonlinear model, and transform the objective function into a barrier function;
[0081] The model solving module is used to solve the photovoltaic local absorption capacity calculation model to obtain the photovoltaic local absorption capacity evaluation plan.
[0082] Compared with the prior art, the present invention has the following beneficial effects:
[0083] 1. In a method for calculating the photovoltaic local consumption capacity considering grid constraints of the present invention, the original model is simplified into a general nonlinear model, and the objective function is further transformed into a barrier function. The disturbance factor or barrier factor μ>0 in the barrier function. When l or u approaches the boundary, the above function tends to infinity. Therefore, the minimum solution that satisfies the above barrier function cannot be found on the boundary, and the inequality restriction is converted into an equality restriction, which can be directly solved by the Lagrange multiplier method. In the process of iterative optimal solution, the slack variables and the Lagrange multiplier are taken as conditions to be greater than zero, so that the model converges quickly and the solution efficiency is high. Therefore, this design can transform the objective function into a barrier function that can be solved by the Lagrange multiplier method, effectively improving the solution efficiency of the algorithm.
[0084] 2. In the method for calculating the photovoltaic local absorption capacity considering the grid constraints of the present invention, the objective function is transformed into a barrier function, which replaces the more abstract process of iteratively solving the optimal solution in the feasible domain in the mixed integer programming, reduces the amount of calculation, reduces the number of iterations, and can obtain ideal results. It simulates the actual grid development process. Photovoltaic access needs to comprehensively consider factors such as the natural environment and lighting conditions, as well as whether the physical structure of the grid is qualified. Therefore, the photovoltaic access point is determined, and the photovoltaic power source that has been determined is considered according to the actual capacity. If it has the conditions for further grid connection, virtual power is used for simulation. Therefore, this design can simulate the complex factors in the actual grid development process and effectively improve the adaptability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 is a flow chart of the method of the present invention.
[0086] Figure 2 It is a structural diagram of the system described in the present invention.
[0087] Figure 3 It is a schematic diagram of the trend of on-site consumption of photovoltaic power.
[0088] Figure 4 It is a framework diagram of the solution steps.
[0089] Figure 5 It is the convergence plot of the in-situ solution procedure.
[0090] Figure 6 It is a structural diagram of the device described in Example 3. DETAILED DESCRIPTION
[0091] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0092] Embodiment 1:
[0093] See also Figure 1 , Figure 3 and Figure 4 , a method for calculating the photovoltaic local consumption capacity considering grid constraints, characterized by:
[0094] The calculation method includes:
[0095] S1. Constructing a photovoltaic local consumption capacity calculation model, wherein the photovoltaic local consumption capacity calculation model aims to maximize the photovoltaic local consumption capacity and considers equality constraints and inequality constraints;
[0096] S2, model simplification, simplifying the calculation model of photovoltaic local consumption capacity into a general nonlinear model, and transforming the objective function into a barrier function;
[0097] S3. Solve the calculation model of photovoltaic local absorption capacity and obtain the evaluation plan of photovoltaic local absorption capacity.
[0098] The photovoltaic local consumption capacity calculation model includes:
[0099] In the above formula, N DG is the number of distributed photovoltaics, P DG,i is the active power output by the distributed photovoltaic power source, and i is the serial number of the distributed photovoltaic power source.
[0100] The equality constraint condition is that the system includes n nodes, including non-engine nodes and generator nodes, each of the nodes includes an active power flow equation and a reactive power flow equation, and the power flow equation of the non-engine node includes:
[0101]
[0102] In the above formula, P Di is the active power injected into non-engine node i, Q Di is the reactive power injected into non-engine node i, G ij is the conductance between nodes ij, B ij is the susceptance V between nodes ij i represents the voltage of node i, i is the engine serial number, j is the node number, θ ij is the phase angle difference between nodes i and j;
[0103] The power flow equation of the generator node includes:
[0104]
[0105] In the above formula, k∈i means that the kth engine is connected to node i, P Gk is the active power injected into engine node i, Q Gk is the reactive power injected into engine node i;
[0106] The inequality constraints include:
[0107]
[0108] In the above formula, P ij =V i 2 G ij +V i V j (G ij cosθ ij +B ij sinθ ij ), P Gi is the active power output of the i-th unit, Qi is the reactive power output of the i-th unit, V i is the voltage at node i, P ij is the power between nodes i and j.
[0109] In S2, the objective function of the photovoltaic local consumption capacity calculation model is simplified to the following general nonlinear model:
[0110]
[0111] In the above formula, f(x) is the objective function, h(x) is the nonlinear equality constraint, and g is the nonlinear inequality constraint;
[0112] Convert inequality constraints in general nonlinear models into equality constraints:
[0113]
[0114] In the above formula, the slack variable l = [l 1 ,l 2 ,…,l r ] T and u=[u 1 ,u 2 ,…,u r ] T The following conditions are met:
[0115] u>0,l>0;
[0116] Therefore, the general nonlinear model is transformed into the following model:
[0117]
[0118] The objective function is further transformed into a barrier function, which is similar to the original objective function in the feasible domain:
[0119]
[0120] In the above formula, the disturbance factor or barrier factor μ>0. When l or u approaches the boundary, the above function tends to infinity. Therefore, the minimum solution that satisfies the above barrier function cannot be found on the boundary. The inequality restriction is converted into an equality restriction, and the Lagrange multiplier method can be used to solve it directly. The Lagrange function is:
[0121]
[0122] In the above formula, y=[y 1 ,y 2 ,…,y m ],z=[z 1 ,z 2 ,…,zm ],w=[w 1 ,w 2 ,…,w m ] are all Lagrange multipliers. The necessary condition for the existence of the minimum value of this problem is that the partial derivatives of the Lagrange function with respect to all variables and multipliers are 0:
[0123]
[0124]
[0125] In the above formula, L = diag (l 1 ,l 2 ,…,l r ), U = diag(u 1 ,u 2 ,…,u r ), Z = diag(z 1 ,z 2 ,…,z r ), W = diag(w 1 ,w 2 ,…,w r ), we can solve:
[0126] Define Gap = l T zu T w, called the complementary gap, we can get:
[0127] In the above formula, σ∈(0,1) is the central parameter, which is taken as 0.1 according to experience. In most cases, a good convergence effect can be obtained. The necessary condition for the extreme value is a nonlinear equation, which can be solved by the Newton-Raphson method and linearized to obtain the modified equation group:
[0128]
[0129] A simple transformation of the above formula can be expressed in matrix form as follows:
[0130]
[0131] In the above formula, the correction equation includes two parts: the coefficient matrix on the left side of the equation and the constant term on the right side of the equation;
[0132] The coefficient matrix of the modified system of equations includes the Jacobian matrix of the equality constraints Jacobian matrix of inequality constraints Diagonal matrix L -1 Z, diagonal matrix U -1 W and Heisenberg matrix H′;
[0133] The Jacobian matrix of the equality constraint include:
[0134]
[0135] In the above formula, the right side includes 3 sub-matrices:
[0136]
[0137] In the above formula, i is the engine number, j is the node number, i∈j means that the i-th engine is connected to the node j, and vice versa. Indicates that, let the number of engines be ng and the number of nodes be n;
[0138] The Jacobian matrix of the inequality constraint include:
[0139]
[0140] In the above formula, g 1 is the upper and lower bounds of the active power output of the power source, g 2 is the upper and lower bounds of the reactive power output of the reactive power source, g 3 are the upper and lower bounds of the node voltage amplitude, g 4 is the line flow constraint;
[0141]
[0142]
[0143] In the above formula, the number of branches is nbr, and the elements in the matrix are:
[0144]
[0145] The diagonal matrix L -1 Z includes: The diagonal matrix U -1 W includes: The Heisenberg matrix H′ comprises:
[0146]
[0147] a. Calculate H 1
[0148]
[0149] In the formula, A 2 It is a matrix with the coefficients of the quadratic terms of the function as its diagonal.
[0150] b. Calculate H 2
[0151]
[0152] in: y 2i-1 For the 2i-1 Lagrange multiplier y,y 2i For the 2i term Lagrange multiplier y;
[0153]
[0154] c. Calculate H 3
[0155]
[0156] In the above formula, c = z + w;
[0157] d. Calculate H 4 : Obtained from the Jacobian matrix and diagonal matrix of the inequality constraints;
[0158] Finally, the node data, branch data, and power source data of the target power grid are substituted into the aforementioned photovoltaic local absorption capacity calculation model considering the power grid constraints for iterative calculation. When the maximum number of iterations is reached, the optimal solution is obtained after convergence.
[0159] Embodiment 2:
[0160] See also Figure 2 , a photovoltaic local consumption capacity calculation system considering grid constraints, the system comprising a model building module, a model simplification module and a model solving module;
[0161] The model building module is used to build a photovoltaic local consumption capacity calculation model, which aims to maximize the photovoltaic local consumption capacity and takes into account equality constraints and inequality constraints;
[0162] The model simplification module is used to simplify the photovoltaic local consumption capacity calculation model into a general nonlinear model, and transform the objective function into a barrier function;
[0163] The model solving module is used to solve the photovoltaic local absorption capacity calculation model to obtain the photovoltaic local absorption capacity evaluation plan.
[0164] The photovoltaic local consumption capacity calculation model includes:
[0165] In the above formula, N DG is the number of distributed photovoltaics, P DG,i is the active power output by the distributed photovoltaic power source, and i is the serial number of the distributed photovoltaic power source.
[0166] The equality constraint condition is that the system includes n nodes, including non-engine nodes and generator nodes, each of the nodes includes an active power flow equation and a reactive power flow equation, and the power flow equation of the non-engine node includes:
[0167]
[0168] In the above formula, P Di is the active power injected into non-engine node i, Q Di is the reactive power injected into non-engine node i, G ij is the conductance between nodes ij, B ij is the susceptance V between nodes ij i represents the voltage of node i, i is the engine serial number, j is the node number, θ ij is the phase angle difference between nodes i and j;
[0169] The power flow equation of the generator node includes:
[0170]
[0171] In the above formula, k∈i means that the kth engine is connected to node i, P Gk is the active power injected into engine node i, Q Gk is the reactive power injected into engine node i;
[0172] The inequality constraints include:
[0173]
[0174] In the above formula, P ij =V i 2 G ij +V i V j (G ij cosθ ij +B ij sinθ ij ), P Gi is the active power output of the i-th unit, Q i is the reactive power output of the i-th unit, V i is the voltage at node i, P ij is the power between nodes i and j.
[0175] The specific operation steps of the model simplification module are: simplifying the objective function of the photovoltaic local consumption capacity calculation model into the following general nonlinear model:
[0176]
[0177] In the above formula, f(x) is the objective function, h(x) is the nonlinear equality constraint, and g is the nonlinear inequality constraint;
[0178] Convert inequality constraints in general nonlinear models into equality constraints:
[0179]
[0180] In the above formula, the slack variable l = [l 1 ,l 2 ,…,l r ] T and u=[u 1 ,u 2 ,…,u r ] T The following conditions are met:
[0181] u>0,l>0;
[0182] Therefore, the general nonlinear model is transformed into the following model:
[0183]
[0184] The objective function is further transformed into a barrier function, which is similar to the original objective function in the feasible domain:
[0185]
[0186] In the above formula, the disturbance factor or barrier factor μ>0. When l or u approaches the boundary, the above function tends to infinity. Therefore, the minimum solution that satisfies the above barrier function cannot be found on the boundary. The inequality restriction is converted into an equality restriction, and the Lagrange multiplier method can be used to solve it directly. The Lagrange function is:
[0187]
[0188] In the above formula, y=[y 1 ,y 2 ,…,y m ],z=[z 1 ,z 2 ,…,z m ],w=[w 1 ,w 2 ,…,w m ] are all Lagrange multipliers. The necessary condition for the existence of the minimum value of this problem is that the partial derivatives of the Lagrange function with respect to all variables and multipliers are 0:
[0189]
[0190] In the above formula, L = diag (l 1 ,l2 ,…,l r ), U = diag(u 1 ,u 2 ,…,u r ), Z = diag(z 1 ,z 2 ,…,z r ), W = diag(w 1 ,w 2 ,…,w r ), we can solve:
[0191] Define Gap = l T zu T w, called the complementary gap, we can get:
[0192] In the above formula, σ∈(0,1) is the central parameter, which is taken as 0.1 according to experience. In most cases, a good convergence effect can be obtained. The necessary condition for the extreme value is a nonlinear equation, which can be solved by the Newton-Raphson method and linearized to obtain the modified equation group:
[0193]
[0194] A simple transformation of the above formula can be expressed in matrix form as follows:
[0195]
[0196] In the above formula, the correction equation includes two parts: the coefficient matrix on the left side of the equation and the constant term on the right side of the equation;
[0197] The coefficient matrix of the modified system of equations includes the Jacobian matrix of the equality constraints Jacobian matrix of inequality constraints Diagonal matrix L -1 Z, diagonal matrix U -1 W and Heisenberg matrix H′;
[0198] The Jacobian matrix of the equality constraint include:
[0199]
[0200] In the above formula, the right side includes 3 sub-matrices:
[0201]
[0202] In the above formula, i is the engine number, j is the node number, i∈j means that the i-th engine is connected to the node j, and vice versa. Indicates that, let the number of engines be ng and the number of nodes be n;
[0203] The Jacobian matrix of the inequality constraint include:
[0204]
[0205] In the above formula, g 1 is the upper and lower bounds of the active power output of the power source, g 2 is the upper and lower bounds of the reactive power output of the reactive power source, g 3 are the upper and lower bounds of the node voltage amplitude, g 4 is the line flow constraint;
[0206]
[0207] In the above formula, the number of branches is nbr, and the elements in the matrix are:
[0208]
[0209] The diagonal matrix L -1 Z includes:
[0210] The diagonal matrix U -1 W includes:
[0211] The Heisenberg matrix H′ comprises:
[0212]
[0213] a. Calculate H 1
[0214]
[0215] In the formula, A 2 It is a matrix with the coefficients of the quadratic terms of the function as its diagonal.
[0216] b. Calculate H 2
[0217]
[0218] in: y 2i-1 For the 2i-1 Lagrange multiplier y,y 2i For the 2i term Lagrange multiplier y;
[0219]
[0220] c. Calculate H 3
[0221]
[0222] In the above formula, c = z + w;
[0223] d. Calculate H 4 : Obtained from the Jacobian matrix and diagonal matrix of the inequality constraints;
[0224] Finally, the node data, branch data, and power source data of the target power grid are substituted into the aforementioned photovoltaic local absorption capacity calculation model considering the power grid constraints for iterative calculation. When the maximum number of iterations is reached, the optimal solution is obtained after convergence.
[0225] Embodiment 3:
[0226] See also Figure 6 , a photovoltaic local consumption capacity calculation device considering grid constraints, the device comprising a processor and a memory;
[0227] The memory is used to store computer program code and transmit the computer program code to the processor;
[0228] The processor is used to execute the method for calculating the photovoltaic local absorption capacity considering grid constraints described in Example 1 according to the instructions in the computer program code.
[0229] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for calculating the photovoltaic local absorption capacity considering grid constraints described in Example 1 is implemented.
[0230] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A method for calculating photovoltaic local consumption capacity considering grid constraints, characterized by: The calculation method includes: S1. Constructing a photovoltaic local consumption capacity calculation model, wherein the photovoltaic local consumption capacity calculation model aims to maximize the photovoltaic local consumption capacity and considers equality constraints and inequality constraints; S2, model simplification, simplifying the calculation model of photovoltaic local consumption capacity into a general nonlinear model, and transforming the objective function into a barrier function; S3. Solve the calculation model of photovoltaic local absorption capacity and obtain the evaluation plan of photovoltaic local absorption capacity.
2. The method for calculating photovoltaic local consumption capacity considering grid constraints according to claim 1, characterized in that: The photovoltaic local consumption capacity calculation model includes: In the above formula, N DG is the number of distributed photovoltaics, P DG,i is the active power output by the distributed photovoltaic power source, and i is the serial number of the distributed photovoltaic power source.
3. A method for calculating photovoltaic local consumption capacity considering grid constraints according to claim 2, characterized in that: The equality constraint condition is that the system includes n nodes, including non-engine nodes and generator nodes, each of the nodes includes an active power flow equation and a reactive power flow equation, and the power flow equation of the non-engine node includes: In the above formula, P Di is the active power injected into non-engine node i, Q Di is the reactive power injected into non-engine node i, G ij is the conductance between nodes ij, B ij is the susceptance V between nodes ij i represents the voltage of node i, i is the engine serial number, j is the node number, θ ij is the phase angle difference between nodes i and j; The power flow equation of the generator node includes: In the above formula, k∈i means that the kth engine is connected to node i, P Gk is the active power injected into engine node i, Q Gk is the reactive power injected into engine node i; The inequality constraints include: In the above formula, P ij =V i 2 G ij +V i V j (G ij cosθ ij +B ij sinθ ij ), P Gi is the active power output of the i-th unit, Q i is the reactive power output of the i-th unit, V i is the voltage at node i, P ij is the power between nodes i and j.
4. The method for calculating photovoltaic local consumption capacity considering grid constraints according to claim 3 is characterized by: In S2, the objective function of the photovoltaic local consumption capacity calculation model is simplified to the following general nonlinear model: In the above formula, f(x) is the objective function, h(x) is the nonlinear equality constraint, and g is the nonlinear inequality constraint; Convert inequality constraints in general nonlinear models into equality constraints: In the above formula, the slack variable l=[l1,l2,…,l r ] T and u=[u1,u2,…,u r ] T The following conditions are met: u>0,l>0; Therefore, the general nonlinear model is transformed into the following model: The objective function is further transformed into a barrier function, which is similar to the original objective function in the feasible domain: In the above formula, the disturbance factor or barrier factor μ>0. When l or u approaches the boundary, the above function tends to infinity. Therefore, the minimum solution that satisfies the above barrier function cannot be found on the boundary. The inequality restriction is converted into an equality restriction, and the Lagrange multiplier method can be used to solve it directly. The Lagrange function is: In the above formula, y=[y1,y2,…,y m ],z=[z1,z2,…,z m ],w=[w1,w2,…,w m ] are all Lagrange multipliers. The necessary condition for the existence of the minimum value of this problem is that the partial derivatives of the Lagrange function with respect to all variables and multipliers are 0: In the above formula, L = diag (l1, l2, ..., l r ), U=diag(u1,u2,…,u r ), Z = diag(z1,z2,…,z r ), W = diag(w1,w2,…,w r ), we can solve: Define Gap = l T zu T w, called the complementary gap, we can get: In the above formula, σ∈(0,1) is the central parameter, which is taken as 0.1 according to experience. In most cases, a good convergence effect can be obtained. The necessary condition for the extreme value is a nonlinear equation, which can be solved by the Newton-Raphson method and linearized to obtain the modified equation group: A simple transformation of the above formula can be expressed in matrix form as follows: In the above formula, the correction equation includes two parts: the coefficient matrix on the left side of the equation and the constant term on the right side of the equation; The coefficient matrix of the modified system of equations includes the Jacobian matrix of the equality constraints Jacobian matrix of inequality constraints Diagonal matrix L -1 Z, diagonal matrix U -1 W and Heisenberg matrix H′; The Jacobian matrix of the equality constraint include: In the above formula, the right side includes 3 sub-matrices: In the above formula, i is the engine number, j is the node number, i∈j means that the i-th engine is connected to the node j, and vice versa. Indicates that, let the number of engines be ng and the number of nodes be n; The Jacobian matrix of the inequality constraint include: In the above formula, g1 is the upper and lower bounds of the active power output of the power source, g2 is the upper and lower bounds of the reactive power output of the reactive power source, g3 is the upper and lower bounds of the node voltage amplitude, and g4 is the line power flow constraint; In the above formula, the number of branches is nbr, and the elements in the matrix are: The diagonal matrix L -1 Z includes: L -1 Z=diag(z1 / l1,…,z 2ng+n+nbr / l 2ng+n+nbr ); The diagonal matrix U -1 W includes: U -1 W=diag(w1 / u1,…,w 2ng+n+nbr / u 2ng+n+nbr ); The Heisenberg matrix H′ comprises:
5. The method for calculating the photovoltaic local consumption capacity considering grid constraints according to claim 4 is characterized by: In S3, the calculation process includes: a. Calculate H1 Where A2 is a matrix with the coefficients of the quadratic terms of the function as the diagonal; b. Calculate H2 in: In the above formula, y 2i-1 is the 2i-1th Lagrange multiplier y, y 2i is the 2i-th Lagrange multiplier y; c. Calculate H3 In the above formula, c = z + w; d. Calculate H4 Obtained from the Jacobian matrix and diagonal matrix of the inequality constraints; Finally, the node data, branch data, and power source data of the target power grid are substituted into the aforementioned photovoltaic local absorption capacity calculation model considering the power grid constraints for iterative calculation. When the maximum number of iterations is reached, the optimal solution is obtained after convergence.
6. A photovoltaic local consumption capacity calculation system considering grid constraints, characterized by: The system includes a model building module, a model simplification module and a model solving module; The model building module is used to build a photovoltaic local consumption capacity calculation model, which aims to maximize the photovoltaic local consumption capacity and takes into account equality constraints and inequality constraints; The model simplification module is used to simplify the photovoltaic local consumption capacity calculation model into a general nonlinear model, and transform the objective function into a barrier function; The model solving module is used to solve the photovoltaic local absorption capacity calculation model to obtain the photovoltaic local absorption capacity evaluation plan.
7. A photovoltaic local consumption capacity calculation system considering grid constraints according to claim 6, characterized in that: The photovoltaic local consumption capacity calculation model includes: In the above formula, N DG is the number of distributed photovoltaics, P DG,i is the active power output by the distributed photovoltaic power source, and i is the serial number of the distributed photovoltaic power source.
8. The photovoltaic local consumption capacity calculation system considering grid constraints according to claim 7 is characterized by: The equality constraint condition is that the system includes n nodes, including non-engine nodes and generator nodes, each of the nodes includes an active power flow equation and a reactive power flow equation, and the power flow equation of the non-engine node includes: In the above formula, P Di is the active power injected into non-engine node i, Q Di is the reactive power injected into non-engine node i, G ij is the conductance between nodes ij, B ij is the susceptance V between nodes ij i represents the voltage of node i, i is the engine serial number, j is the node number, θ ij is the phase angle difference between nodes i and j; The power flow equation of the generator node includes: In the above formula, k∈i means that the kth engine is connected to node i, P Gk is the active power injected into engine node i, Q Gk is the reactive power injected into engine node i; The inequality constraints include: In the above formula, P ij =V i 2 G ij +V i V j (G ij cosθ ij +B ij sinθ ij ), P Gi is the active power output of the i-th unit, Q i is the reactive power output of the i-th unit, V i is the voltage at node i, P ij is the power between nodes i and j.
9. The method for calculating photovoltaic local consumption capacity considering grid constraints according to claim 8, characterized in that: The specific operation steps of the model simplification module are: simplifying the objective function of the photovoltaic local consumption capacity calculation model into the following general nonlinear model: In the above formula, f(x) is the objective function, h(x) is the nonlinear equality constraint, and g is the nonlinear inequality constraint; Convert inequality constraints in general nonlinear models into equality constraints: In the above formula, the slack variable l=[l1,l2,…,l r ] T and u=[u1,u2,…,u r ] T The following conditions are met: u>0,l>0; Therefore, the general nonlinear model is transformed into the following model: The objective function is further transformed into a barrier function, which is similar to the original objective function in the feasible domain: In the above formula, the disturbance factor or barrier factor μ>0. When l or u approaches the boundary, the above function tends to infinity. Therefore, the minimum solution that satisfies the above barrier function cannot be found on the boundary. The inequality restriction is converted into an equality restriction, and the Lagrange multiplier method can be used to solve it directly. The Lagrange function is: In the above formula, y=[y1,y2,…,y m ],z=[z1,z2,…,z m ],w=[w1,w2,…,w m ] are all Lagrange multipliers. The necessary condition for the existence of the minimum value of this problem is that the partial derivatives of the Lagrange function with respect to all variables and multipliers are 0: In the above formula, L = diag (l1, l2, ..., l r ), U=diag(u1,u2,…,u r ), Z = diag(z1,z2,…,z r ), W = diag(w1,w2,…,w r ), we can solve: Define Gap = l T zu T w, called the complementary gap, we can get: In the above formula, σ∈(0,1) is the central parameter, which is taken as 0.1 according to experience. In most cases, a good convergence effect can be obtained. The necessary condition for the extreme value is a nonlinear equation, which can be solved by the Newton-Raphson method and linearized to obtain the modified equation group: A simple transformation of the above formula can be expressed in matrix form as follows: In the above formula, the correction equation includes two parts: the coefficient matrix on the left side of the equation and the constant term on the right side of the equation; The coefficient matrix of the modified system of equations includes the Jacobian matrix of the equality constraints Jacobian matrix of inequality constraints Diagonal matrix L -1 Z, diagonal matrix U -1 W and Heisenberg matrix H′; The Jacobian matrix of the equality constraint include: In the above formula, the right side includes 3 sub-matrices: In the above formula, i is the engine number, j is the node number, i∈j means that the i-th engine is connected to the node j, and vice versa. Indicates that, let the number of engines be ng and the number of nodes be n; The Jacobian matrix of the inequality constraint include: In the above formula, g1 is the upper and lower bounds of the active power output of the power source, g2 is the upper and lower bounds of the reactive power output of the reactive power source, g3 is the upper and lower bounds of the node voltage amplitude, and g4 is the line power flow constraint; In the above formula, the number of branches is nbr, and the elements in the matrix are: The diagonal matrix L -1 Z includes: L -1 Z=diag(z1 / l1,…,z 2ng+n+nbr / l 2ng+n+nbr ); The diagonal matrix U -1 W includes: U -1 W=diag(w1 / u1,…,w 2ng+n+nbr / u 2ng+n+nbr ); The Heisenberg matrix H′ comprises:
10. A photovoltaic local consumption capacity calculation system considering grid constraints according to claim 9, characterized in that: The calculation process of the model solving module includes: a. Calculate H1 Where A2 is a matrix with the coefficients of the quadratic terms of the function as the diagonal; b. Calculate H2 in: In the above formula, y 2i-1 is the 2i-1th Lagrange multiplier y, y 2i is the 2i-th Lagrange multiplier y; c. Calculate H3 In the above formula, c = z + w; d. Calculate H4 Obtained from the Jacobian matrix and diagonal matrix of the inequality constraints; Finally, the node data, branch data, and power source data of the target power grid are substituted into the aforementioned photovoltaic local absorption capacity calculation model considering the power grid constraints for iterative calculation. When the maximum number of iterations is reached, the optimal solution is obtained after convergence.
Citation Information
Cited By
Transmission network voltage on-line control method based on gradient dynamics and control barrier function
CN120978772A