Power grid reactive power optimization method and device, storage medium and computer equipment
By combining resource concentration evaluation factors and chaotic perturbation terms, the search step size and perturbation are dynamically adjusted, solving the problems of slow convergence speed and easy getting trapped in local optima in power grid reactive power optimization, and achieving efficient reactive power optimization and reduction of active power loss.
Patent Information
- Application Number
- CN202511370926.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2025-12-26
AI Technical Summary
Existing reactive power optimization methods for power grids converge slowly in large-scale power grids, making it difficult to find feasible solutions and easily getting trapped in local optima, resulting in poor optimization efficiency and effectiveness.
A power grid reactive power optimization method based on resource concentration evaluation factors and chaotic disturbance terms is adopted. By initializing multiple feasible solutions, the search step size and disturbance terms are dynamically adjusted, and the positions of feasible solutions are updated until the preset optimization conditions are met, so as to find the optimal decision variable set for reactive power control.
It improves the efficiency and quality of reactive power optimization in the power grid, quickly finds reliable optimal solutions, reduces active power loss across the entire grid, and achieves local balance and compensation of reactive power.
Smart Images

Figure CN121216638A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power systems, and particularly relates to a power grid reactive power optimization method and device, a storage medium and a computer device. BACKGROUND
[0002] The large power grid optimization problem involves multiple nonlinear relationships such as power flow equations, component response characteristics and machine-grid interface equations, and its essence belongs to a complex nonlinear optimization problem. Typical applications include reactive power optimization, unit commitment, economic dispatch and voltage emergency control. Therefore, efficient solution of the nonlinear optimization problem is of great significance to the safe and stable operation of the large power grid.
[0003] The commonly used nonlinear optimization methods, such as the interior point method, the particle swarm algorithm and the genetic algorithm, still have obvious limitations in the application of the actual large-scale power grid complex scene. Due to the large scale of the power grid structure, the existing methods often have slow convergence speed, and even it is difficult to obtain a feasible solution, and it is easy to fall into local optimum in the optimization process. Therefore, in actual application, the optimization efficiency and optimization effect of the existing optimization method are difficult to achieve the expected. SUMMARY
[0004] The purpose of the present application is to at least solve one of the above technical defects, in particular, the technical defect that in the prior art, due to the large scale of the power grid structure, the existing method often has slow convergence speed, and even it is difficult to obtain a feasible solution, and it is easy to fall into local optimum in the optimization process. Therefore, in actual application, the optimization efficiency and optimization effect of the existing optimization method are difficult to achieve the expected.
[0005] In a first aspect, the present application provides a power grid reactive power optimization method, which comprises:
[0006] obtaining a preset target optimization function and its corresponding constraint condition;
[0007] initializing a plurality of feasible solutions of the target optimization function based on the constraint condition, each feasible solution representing a decision variable group, the decision variable group including generator reactive power, node reactive compensation and transformer ratio;
[0008] calculating a resource concentration evaluation factor of each feasible solution, and updating the position of each feasible solution according to the resource concentration evaluation factor of each feasible solution;
[0009] calculating a corresponding chaotic disturbance term according to the variance of each updated feasible solution, and updating the position of each feasible solution based on each updated feasible solution and its chaotic disturbance term, returning to execute the step of calculating the resource concentration evaluation factor and the subsequent steps until the preset optimization condition is met, determining the optimal decision variable group according to the current position of each feasible solution, and performing reactive power regulation on the power grid according to the optimal decision variable group.
[0010] In one of the embodiments, the resource concentration evaluation factor of each feasible solution is calculated, comprising:
[0011] For each feasible solution, the gradient of the objective optimization function to the decision variable set corresponding to the feasible solution is calculated, and the length of the gradient is determined;
[0012] The resource concentration evaluation factor of the feasible solution is calculated based on the gradient and the length thereof.
[0013] In one of the embodiments, the position of each feasible solution is updated according to the resource concentration evaluation factor according to the following expression:
[0014]
[0015] In the expression, x i (t) represents the position of the i th feasible solution in the t th iteration, x i (t+1) represents the position of the i th feasible solution in the (t+1) th iteration, f i (t) represents the resource concentration evaluation factor, a i (t) represents the optimization factor, μ i (t) represents the mutation factor, x j (t) represents the position of a randomly selected feasible solution, and x best (t) represents the position of the feasible solution with the optimal fitness in the feasible solutions.
[0016] In one of the embodiments, the chaotic disturbance term corresponding to each updated feasible solution is calculated according to the updated variance of each feasible solution, comprising:
[0017] The control parameter value of a preset chaotic mapping is obtained;
[0018] The variance of each updated feasible solution is calculated, and the chaotic disturbance term of each updated feasible solution is determined based on the control parameter value and the variance of each updated feasible solution.
[0019] In one of the embodiments, the position of each feasible solution is updated based on each updated feasible solution and the chaotic disturbance term thereof according to the following expression:
[0020]
[0021] In the expression, x i (t) represents the position of the i th feasible solution in the t th iteration, x i (t+1) represents the position of the i th feasible solution in the (t+1) th iteration, f i (t) represents the resource concentration evaluation factor, a i (t) represents the optimization factor, μ i (t) represents the mutation factor, x j (t) represents the position of a randomly selected feasible solution, and x best (t) represents the position of the feasible solution with the optimal fitness in the feasible solutions. denotes an adaptive shrinkage factor, 、 denote vectors consisting of upper and lower bounds of the decision variable group respectively, denotes a random vector in the interval [0, 1], denotes a chaos disturbance intensity coefficient, denotes a chaos disturbance item of the i th feasible solution in the j th iteration, denotes a chaos disturbance item of the i th feasible solution in the j th iteration, denotes a chaos disturbance item of the i th feasible solution in the j th iteration.
[0022] In one embodiment, after updating the position of each feasible solution based on the updated each feasible solution and the chaos disturbance item thereof, the method further comprises:
[0023] judging whether the current iteration number reaches a set value, if yes, calculating the tunneling probability of each feasible solution according to the updated position of each feasible solution and the current iteration number;
[0024] splitting each feasible solution according to the tunneling probability of each feasible solution, and taking the split feasible solutions as the feasible solutions participating in the next iteration;
[0025] if not, determining local feasible solutions whose fitness remains unchanged after multiple iterations from the feasible solutions, and introducing a correction factor to update the position of each local feasible solution.
[0026] In one embodiment, the tunneling probability of each feasible solution is calculated according to the updated position of each feasible solution and the current iteration number according to the following expression:
[0027]
[0028] In the formula, denotes the tunneling probability of the i th feasible solution in the j th iteration, denotes the tunneling probability of the i th feasible solution in the j th iteration, denotes the tunneling probability of the i th feasible solution in the j th iteration, 、 denote the lower and upper limit values of the tunneling probability respectively, denotes the fitness of the target optimization function at the feasible solution x i, denotes the maximum value of the target optimization function under the current iteration, denotes the minimum value of the target optimization function under the current iteration, denotes the minimum value of the target optimization function under the current iteration, denotes the total iteration number, denotes the current iteration number.
[0029] In a second aspect, the application provides a power grid reactive power optimization device, which comprises:
[0030] The function obtaining module is configured to obtain a preset target optimization function and a corresponding constraint condition of the target optimization function.
[0031] The initialization module is configured to initialize a plurality of feasible solutions of the target optimization function based on the constraint condition, each feasible solution representing a decision variable group, the decision variable group including generator reactive power, node reactive compensation, and transformer ratio;
[0032] The factor calculation module is configured to calculate a resource concentration evaluation factor of each feasible solution, and update a position of each feasible solution according to the resource concentration evaluation factor of each feasible solution.
[0033] The position updating module is configured to calculate a corresponding chaotic disturbance term according to a variance of each updated feasible solution, and update a position of each feasible solution based on each updated feasible solution and the chaotic disturbance term of each updated feasible solution, return to execute the factor calculation module and subsequent modules until a preset optimization condition is met, determine an optimal decision variable group according to a current position of each feasible solution, and perform reactive power regulation on the power grid according to the optimal decision variable group.
[0034] In a third aspect, the present application provides a storage medium, the storage medium storing computer readable instructions, the computer readable instructions being executed by one or more processors to cause the one or more processors to perform the steps of the power grid reactive power optimization method according to any one of the above embodiments.
[0035] In a fourth aspect, the present application provides a computer device, including one or more processors and a memory.
[0036] The memory stores computer readable instructions, and the one or more processors execute the computer readable instructions to perform the steps of the power grid reactive power optimization method according to any one of the above embodiments.
[0037] From the above technical solutions, the embodiments of the present application have the following advantages:
[0038] The power grid reactive power optimization method, device, storage medium and computer device provided by the application, in the reactive power optimization process, first obtain a preset target optimization function and a corresponding constraint condition, and initialize a plurality of feasible solutions of the target optimization function based on the constraint condition. Then, the resource concentration evaluation factor of each feasible solution is calculated, and the position of each feasible solution is updated according to the resource concentration evaluation factor of each feasible solution. The resource concentration evaluation factor can dynamically adjust the search step length based on the gradient, improving the search efficiency. Then, the corresponding chaotic disturbance term is calculated according to the variance of each updated feasible solution, and the chaotic disturbance term can increase a disturbance in the contraction direction to effectively maintain the diversity of the solution space in the optimization stage, avoiding premature homogenization of each feasible solution. Based on the updated each feasible solution and its chaotic disturbance term, the position of each feasible solution is updated again, so that the necessary exploration ability can be maintained while tending to the optimal solution. The step of calculating the resource concentration evaluation factor is continued to be executed until the optimal decision variable group obtained through the above iteration process meets the preset optimization condition, and the reactive power is regulated. Thus, the reliable optimal solution of the power grid reactive power optimization is quickly found, and the efficiency and quality of the reactive power optimization are improved. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1 A flowchart of a power grid reactive power optimization method provided by an embodiment of the present application;
[0041] Figure 2 A structural diagram of a power grid reactive power optimization device provided by an embodiment of the present application;
[0042] Figure 3 An internal structure diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0044] In one of the embodiments, the application provides a power grid reactive power optimization method. The following embodiments are described with the method applied to a server. It can be understood that the power grid reactive power optimization method can be executed by a single server or a server cluster composed of multiple servers, and the application does not make specific limitations thereto.
[0045] As shown in Figure 1 , the application provides a power grid reactive power optimization method, which comprises:
[0046] S101: Obtain a preset target optimization function and its corresponding constraint condition.
[0047] The target optimization function is used to minimize the difference between the active power generated by the generator and the active power absorbed by the load, i.e., the optimization target of the target optimization function is to minimize the active power loss of the whole network, and the purpose is to arrange local compensation and balance of reactive power and avoid long-distance transmission of reactive power, thereby reducing the network loss of the whole network.
[0048] In the embodiment, when it is necessary to perform reactive power optimization on the power grid, the target optimization function pre-constructed for the power grid reactive power optimization problem is obtained at this time, and the constraint condition of the target optimization function is obtained, which includes active power constraint, reactive power flow constraint and variable upper and lower limit constraint. When the target optimization function and its corresponding constraint condition are determined, the target optimization function can be solved to obtain the specific value of a set of decision variables.
[0049] In one example, the target optimization function can be expressed as:
[0050]
[0051] In the formula, Pgen represents the active power generated by the generator (including pumped storage and energy storage in charging state), Pload represents the active power absorbed by the load (including pumped storage and energy storage in charging state).
[0052] The constraint condition includes active power constraint, reactive power flow constraint and variable upper and lower limit constraint, wherein the active power constraint can be expressed as:
[0053]
[0054] In the formula, Pbal represents the active power of the balance node, , Pcharge and Pdischarge represent the charging power and discharging power of the energy storage device, , V represents the node voltage amplitude, , Y represents the admittance value of the power grid Jacobian matrix, represents the voltage phase angle, represents the number of grid nodes.
[0055] The reactive power flow constraint can be expressed as:
[0056]
[0057] wherein, represents the reactive power of the equilibrium node, represents the reactive power of the power generation node, represents the reactive compensation power, represents the reactive power of the load node.
[0058] The variable upper and lower limit constraints include the upper and lower limit constraints of the variables involved in the above formula.
[0059] Specifically, the target optimization function takes the generator reactive power, the node reactive compensation amount, and the transformer ratio as the decision variables. Among them, the generator reactive power and the node reactive compensation amount are directly included in the reactive power flow constraint, and the transformer ratio can determine the grid Jacobian matrix admittance value, thereby affecting the reactive power flow constraint.
[0060] S102: Initialize a plurality of feasible solutions of the target optimization function based on the constraint conditions.
[0061] Wherein, each feasible solution represents a decision variable group, and the decision variable group includes the generator reactive power, the node reactive compensation amount, and the transformer ratio.
[0062] In this step, the upper and lower limits of the decision variables can be determined by the constraint conditions, and based on this, the initialized solution space is determined, and then a plurality of feasible solutions about the target optimization function are initialized in the solution space. Specifically, a plurality of feasible solutions can be initialized in a random generation manner, for example, initialized using the following expression:
[0063]
[0064] wherein, represents the position of the th feasible solution at the initialization, , respectively represent the lower limit and the upper limit of the decision variable composed of a vector, represents a random vector in the interval [0, 1].
[0065] In some embodiments, Latin hypercube sampling, chaotic initialization, etc. can also be used for initialization, which can be adjusted according to actual needs, and the present application does not make specific limitations thereto.
[0066] S103: Calculate the resource concentration evaluation factor of each feasible solution, and update the position of each feasible solution according to the resource concentration evaluation factor of each feasible solution.
[0067] The resource concentration evaluation factor reflects the advantages and disadvantages of the feasible solution in the current search space, and can be used to dynamically adjust the search step according to the gradient, thereby adaptively reducing the search step when near the local optimal solution and increasing the search step when far from the optimal solution.
[0068] In this step, all feasible solutions are traversed, and the resource concentration evaluation factor of each feasible solution is calculated according to the pre-set formula. After traversal and calculation, the search step of each feasible solution can be controlled based on the resource concentration evaluation factor of each feasible solution, and then the position of each feasible solution is updated.
[0069] By quantitatively evaluating the resource concentration evaluation factor of each feasible solution, high-performance solutions and low-performance solutions can be objectively identified, thereby guiding the search process to concentrate in a better area and avoiding blind exploration. At the same time, based on the resource concentration evaluation factor, the search step is dynamically adjusted, which can realize adaptive optimization iteration, enhance the convergence and precision of the algorithm, and ultimately improve the probability of finding the global optimal solution or the approximate optimal solution.
[0070] S104: Calculate the corresponding chaotic disturbance term according to the updated variance of each feasible solution, and update the position of each feasible solution based on the updated each feasible solution and its chaotic disturbance term.
[0071] The chaotic disturbance term is a pseudo-random sequence generated by a chaotic mapping, which is used to apply a controllable and dynamic disturbance to the position of the feasible solution.
[0072] In this step, the corresponding variances of each feasible solution can be calculated according to the updated positions of each feasible solution in S103, and then the corresponding chaotic disturbance terms can be determined based on the updated variances of each feasible solution. The chaotic disturbance term can effectively enhance the global search ability and the ability to jump out of the local optimal solution of the optimization process. After determining the chaotic disturbance term of each feasible solution, the position of each feasible solution is updated again according to the updated each feasible solution and its chaotic disturbance term.
[0073] By dynamically adjusting the strength of the chaotic disturbance term based on the variance, extensive exploration can be performed when the solution distribution is relatively dispersed, avoiding premature convergence to a local optimal solution; when the solution distribution is relatively concentrated, fine adjustment is performed to improve the quality of the solution. This dynamic adjustment mechanism enables the algorithm to maintain a balance between global search and local search, thereby more effectively finding the global optimal solution.
[0074] S105: Determine whether a pre-set optimization condition is met.
[0075] The preset optimization condition refers to a condition for triggering the iteration to stop.
[0076] Specifically, the preset optimization condition can be set as reaching a set maximum number of iterations, which can be set as 10000. The preset optimization condition can also be set as a difference between target optimization function values of consecutive N iterations being less than a preset value, which can be set as 0.001, and N can be set as 10. The application does not limit the specific setting and numerical setting of the preset optimization condition.
[0077] S106: Return to the step of calculating the resource concentration evaluation factor and the subsequent steps.
[0078] S107: Determine the optimal decision variable group according to the current position of each feasible solution, and perform reactive power regulation on the power grid according to the optimal decision variable group.
[0079] In this step, the feasible solution corresponding to the position with the lowest fitness is selected from the current positions of each feasible solution, and a decision variable group, i.e., the optimal decision variable group, is extracted from the feasible solution. Finally, the optimal decision variable group can be used to determine the values of variables such as generator reactive power, node reactive compensation, and transformer ratio, and the power grid is regulated based on these variable values, thereby minimizing active power loss and indirectly promoting local balance and compensation of reactive power. The fitness refers to the function value obtained by substituting the feasible solution into the target optimization function.
[0080] It can be understood that two position updating strategies are set by considering different factors. The first updating can control the speed of movement of the feasible solution by step adjustment, and the second updating can maintain the diversity of the solution space and avoid premature homogenization of the feasible solutions. In this way, the positions of the feasible solutions can be fully adjusted in one iteration, so that the optimal decision variable group for reactive power optimization of the power grid can be quickly found in the optimization process, thereby reducing the active power loss of the whole network.
[0081] In the above embodiment, firstly, a preset target optimization function and a corresponding constraint condition are obtained, and a plurality of feasible solutions of the target optimization function are initialized based on the constraint condition. Then, a resource concentration evaluation factor of each feasible solution is calculated, and a position of each feasible solution is updated according to the resource concentration evaluation factor of each feasible solution. The resource concentration evaluation factor can dynamically adjust a search step based on a gradient, thereby improving search efficiency. Then, a corresponding chaotic disturbance term is calculated according to a variance of each updated feasible solution, and the chaotic disturbance term can add a disturbance in a contraction direction, so as to effectively maintain diversity of a solution space in an optimization stage and avoid early homogenization of each feasible solution. Based on each updated feasible solution and the chaotic disturbance term, the position of each feasible solution is updated again, so that necessary exploration ability can be maintained while tending to an optimal solution. The step of calculating the resource concentration evaluation factor is continued to be executed until an optimal decision variable group obtained through the above iteration process meets a preset optimization condition, and reactive power regulation is performed based on the optimal decision variable group. Thus, a reliable optimal solution of grid reactive power optimization can be quickly found, and efficiency and quality of reactive power optimization are improved.
[0082] In one of the embodiments, the resource concentration evaluation factor of each feasible solution is calculated, including:
[0083] S1: For each feasible solution, a gradient of the target optimization function to a decision variable group corresponding to the feasible solution is calculated, and a module length of the gradient is determined.
[0084] S2: The resource concentration evaluation factor of the feasible solution is calculated based on the gradient and the module length.
[0085] In one example, the resource concentration evaluation factor of the feasible solution is calculated based on the gradient and the module length according to the following expression:
[0086]
[0087] In the expression, the resource concentration evaluation factor is denoted as the gradient of the target optimization function to the decision variable group corresponding to the feasible solution is denoted as the module length of the gradient is denoted as
[0088] In the embodiment, the gradient of the target optimization function to the decision variable group corresponding to the feasible solution optimizes an exploration direction, and the module length of the gradient optimizes a potential influence of a step length, so that the resource concentration evaluation factor obtained can more finely guide a search process and improve search efficiency.
[0089] In one of the embodiments, the position of each feasible solution is updated according to the resource concentration evaluation factor according to the following expression:
[0090]
[0091] In the expression, Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the resource concentration evaluation factor. Represents the optimization factor. Indicates the variable factor. This represents the location of a randomly selected feasible solution. This indicates the position of the feasible solution with the best fitness among all feasible solutions.
[0092] In this embodiment, gradient descent information is transformed into adaptive weights through a resource concentration evaluation factor, enabling a refined search of feasible solutions along the performance improvement direction. Simultaneously, the convergence term towards the global optimum ensures the population converges towards known superior regions, while the introduction of a random mutation term effectively prevents the algorithm from getting trapped in local optima, maintaining population diversity. This synergistic effect improves the convergence speed and accuracy of the optimization algorithm, ensuring that optimization can quickly lock onto high-performance regions while possessing good global exploration capabilities, thus more reliably approximating the global optimum of complex problems.
[0093] In some embodiments, the optimization factor can be set to 0.5 to control the step size strength of the move towards the global optimum. The mutation factor can be set to 0.3 to control the strength of the random perturbation term.
[0094] In one embodiment, the corresponding chaotic perturbation term is calculated based on the updated variance of each feasible solution, including:
[0095] S1: Obtain the preset control parameter values for the chaotic mapping.
[0096] S2: Calculate the variance of each updated feasible solution and determine the chaotic perturbation term for each updated feasible solution based on the control parameter values and each variance.
[0097] In one example, the chaotic perturbation term for each updated feasible solution is determined based on the control parameter values and each variance, according to the following expression:
[0098]
[0099] in, Indicates the first The feasible solution is at the _th _th Chaotic perturbation term in the next iteration This represents the control parameter value, typically set to 10 to ensure the search remains completely chaotic. Indicates a feasible solution The variance, i.e., the variance of the first... A feasible solution is the variance of all solutions within a certain neighborhood, which represents or centers the solution.
[0100] In this embodiment, the variance of feasible solutions is nonlinearly mapped to chaotic perturbations, thereby automatically associating the intensity of the perturbations with the current convergence state of the population. When the population is dispersed (large variance), the perturbations are moderately suppressed to avoid excessive randomness; when the population is clustered and tends to converge (small variance), the perturbations are significantly amplified to provide the impetus to escape local optima. This ensures that the algorithm remains stable in the early stages of the global search and can apply effective chaotic perturbations when it gets trapped in local optima, thereby improving the global optimization capability and convergence reliability during the optimization process and minimizing active power loss.
[0101] In one embodiment, the position of each feasible solution is updated based on the updated feasible solution and its chaotic perturbation term, according to the following expression:
[0102]
[0103] In the formula, Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the adaptive shrinkage factor. , These represent vectors consisting of the upper and lower bounds of the decision variable set, respectively. Represents a random vector in the interval [0,1]. This represents the intensity coefficient of chaotic perturbation. Indicates the first The feasible solution is at the _th _th Chaotic perturbation term in the next iteration.
[0104] Among them, adaptive shrinkage factor It can be used to control the local search range, and its calculation expression can be represented as follows:
[0105]
[0106] In the formula, , These are the minimum and maximum values of the adaptive shrinkage factor, respectively. This represents the attenuation coefficient, typically taken as 0.1. Indicates the maximum number of iterations. This indicates the current iteration number. It can be understood that an adaptive shrinkage factor allows for a larger weight in the early stages of the search, facilitating a broad search, and a smaller weight in later stages, facilitating a finer search.
[0107] wherein the chaotic perturbation intensity coefficient may be set as a function decreasing with iteration, denoted as:
[0108]
[0109] wherein, denotes the initial perturbation intensity.
[0110] In the embodiment, the chaotic perturbation term can provide a bounded and ergodic perturbation, break the symmetry search pattern of the traditional algorithm, prevent premature convergence, and its performance is superior to that of simple random perturbation, while tending to the optimal solution, it can also maintain the necessary exploration ability.
[0111] In one of the embodiments, after updating the position of each feasible solution based on the updated each feasible solution and its chaotic perturbation term, the power grid reactive power optimization method further comprises:
[0112] S1: judging whether the current iteration number reaches the set value, if yes, calculating the tunneling probability of each feasible solution according to the updated position of each feasible solution and the current iteration number.
[0113] S2: splitting each feasible solution according to the tunneling probability of each feasible solution, and taking the split feasible solutions as the feasible solutions participating in the next iteration.
[0114] S3: if not, determining the local feasible solutions whose fitness remains unchanged after multiple iterations in each feasible solution, and introducing a correction factor to update the position of each local feasible solution.
[0115] wherein, the tunneling probability is used to determine the probability of the feasible solution jumping to a new region in the optimization process.
[0116] In the embodiment, whether the current iteration number reaches the set value is judged to determine whether enough iterations have been performed, and when the set value is reached, the tunneling probability of each feasible solution is calculated according to the updated position of each feasible solution and the current iteration number, and the tunneling probability is related to the iteration number and the individual fitness. By introducing the tunneling probability in the splitting process of the feasible solution, the algorithm can be given the ability to jump out of the local extremum. Specifically, taking the splitting of each feasible solution into two feasible solutions as an example, each feasible solution can be split according to the tunneling probability of each feasible solution based on the following expression:
[0117]
[0118]
[0119] wherein, denotes the splitting factor, which simulates the difference between the offspring and the parent, and is generally taken as 0.2, denotes the tunneling probability, , denotes the feasible solution obtained after splitting.
[0120] When the set value is not reached, the feasible solutions in which the fitness of the continuous multiple iterators remains unchanged can be determined at this time, and these feasible solutions are determined as local feasible solutions. Then, for each local feasible solution, the corresponding correction factor is calculated to avoid falling into local optimization. In this way, perturbation can be introduced after multiple iterations to escape from local optimization in time. It should be noted that, unlike the final optimization convergence, the correction at this time occurs when the number of iterations is still relatively small, i.e., the set value is less than the maximum number of iterations. Specifically, the expression for calculating the correction factor can be represented as follows:
[0121]
[0122] In the formula, denotes the correction parameter, which is generally taken as 0.1, denotes the gradient of the target optimization function at the feasible solution , denotes the aggregation degree of the feasible solution . , denotes the vector composed of the upper bound and the lower bound of the th feasible solution.
[0123] wherein the gradient can be calculated according to the following expression:
[0124]
[0125] In the formula, denotes the small perturbation amount, which can be taken as 0.001.
[0126] The aggregation degree can be calculated according to the following expression:
[0127]
[0128] In the formula, denotes the number of feasible solutions.
[0129] In one embodiment, the tunneling probability of each feasible solution is calculated according to the updated position of each feasible solution and the current number of iterations according to the following expression:
[0130]
[0131] In the formula, denotes the The feasible solution is at the _th _th The tunneling probability in the next iteration. , These represent the lower and upper limits of the tunneling probability, respectively. This indicates that the objective optimization function is in the feasible solution Adaptability at that location This indicates the maximum value of the objective function in the current iteration. This represents the minimum value of the objective function in the current iteration. Indicates the total number of iterations. This indicates the current iteration number.
[0132] It is understandable that feasible solutions with poorer fitness have a higher probability of tunneling during splitting. Meanwhile, this tunneling probability decreases slowly with each iteration.
[0133] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0134] The power grid reactive power optimization device provided in the embodiments of this application is described below. The power grid reactive power optimization device described below can be referred to in correspondence with the power grid reactive power optimization method described above.
[0135] like Figure 2 As shown, this application provides a power grid reactive power optimization device 200, the device comprising:
[0136] The function acquisition module 201 is used to acquire the preset target optimization function and its corresponding constraints.
[0137] Initialization module 202 is used to initialize multiple feasible solutions of the objective optimization function based on constraints. Each feasible solution represents a set of decision variables, which includes generator reactive power, node reactive power compensation, and transformer turns ratio.
[0138] The factor calculation module 203 is used to calculate the resource concentration evaluation factor for each feasible solution and update the position of each feasible solution according to the resource concentration evaluation factor of each feasible solution.
[0139] The position updating module 204 is configured to calculate a chaotic disturbance term according to a variance of each updated feasible solution, and update the position of each feasible solution based on each updated feasible solution and the chaotic disturbance term of the feasible solution, and return to the factor calculation module and subsequent modules until a preset optimization condition is met, determine an optimal decision variable group according to the current position of each feasible solution, and perform reactive power regulation on the power grid according to the optimal decision variable group.
[0140] In the above embodiment, a preset target optimization function and a corresponding constraint condition are first obtained, and a plurality of feasible solutions of the target optimization function are initialized based on the constraint condition. Then, a resource concentration evaluation factor of each feasible solution is calculated, and the position of each feasible solution is updated according to the resource concentration evaluation factor of each feasible solution. The resource concentration evaluation factor can dynamically adjust the search step length based on the gradient, thereby improving the search efficiency. Then, a chaotic disturbance term is calculated according to the variance of each updated feasible solution, and the chaotic disturbance term can add a disturbance in the contraction direction to effectively maintain the diversity of the solution space in the optimization stage, thereby avoiding premature homogenization of each feasible solution. Based on each updated feasible solution and the chaotic disturbance term of the feasible solution, the position of each feasible solution is updated again, so that the necessary exploration ability can be maintained while tending to the optimal solution. The step of calculating the resource concentration evaluation factor is continued to be executed until the optimal decision variable group obtained through the above iterative process meets the preset optimization condition, and the optimal decision variable group is used for reactive power regulation. Thus, a reliable optimal solution of the power grid reactive power optimization can be quickly found, and the efficiency and quality of the reactive power optimization are improved.
[0141] In one embodiment, the factor calculation module comprises:
[0142] The first calculation submodule is configured to calculate, for each feasible solution, a gradient of the target optimization function with respect to a decision variable group corresponding to the feasible solution, and determine a module length of the gradient.
[0143] The second calculation submodule is configured to calculate a resource concentration evaluation factor of the feasible solution based on the gradient and the module length.
[0144] In one embodiment, the factor calculation module comprises:
[0145]
[0146] wherein, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, x i represents the position of the i th feasible solution in the j th iteration, denotes a mutation factor, denotes the position of a randomly selected feasible solution, denotes the position of the feasible solution with the lowest fitness among the feasible solutions.
[0147] In one of the embodiments, the position updating module comprises:
[0148] a parameter obtaining sub-module, configured to obtain a control parameter value of a preset chaotic mapping;
[0149] a perturbation calculating sub-module, configured to calculate a variance of each updated feasible solution, and determine a chaotic perturbation term of each updated feasible solution based on the control parameter value and the variance of each updated feasible solution.
[0150] In one of the embodiments, the position updating module comprises:
[0151]
[0152] wherein, denotes the position of the i-th feasible solution in the j-th iteration, denotes the position of the i-th feasible solution in the j-th iteration, denotes the position of the i-th feasible solution in the j-th iteration, denotes the position of the i-th feasible solution in the j-th iteration, denotes the position of the i-th feasible solution in the j-th iteration, denotes the position of the i-th feasible solution in the j-th iteration, denotes an adaptive contraction factor, , denote vectors composed of upper and lower bounds of the decision variable group respectively, denotes a random vector in the interval [0, 1], denotes a chaotic perturbation strength coefficient, denotes the chaotic perturbation term of the i-th feasible solution in the j-th iteration, denotes the chaotic perturbation term of the i-th feasible solution in the j-th iteration, denotes the chaotic perturbation term of the i-th feasible solution in the j-th iteration.
[0153] In one of the embodiments, after the position updating module is executed, the power grid reactive power optimization device further comprises:
[0154] a probability calculating module, configured to determine whether the current iteration number reaches a set value, and if so, calculate a tunneling probability of each feasible solution according to the updated position of each feasible solution and the current iteration number;
[0155] a solution splitting module, configured to split each feasible solution according to the tunneling probability of each feasible solution, and take the split feasible solutions as the feasible solutions participating in the next iteration;
[0156] an updating module, configured to, if not, determine local feasible solutions with unchanged fitness after multiple iterations among the feasible solutions, and introduce a correction factor to update the position of each local feasible solution.
[0157] In one embodiment, the probability calculation module includes:
[0158]
[0159] In the formula, Indicates the first The feasible solution is at the _th _th The tunneling probability in the next iteration. , These represent the lower and upper limits of the tunneling probability, respectively. This indicates that the objective optimization function is in the feasible solution Adaptability at that location This indicates the maximum value of the objective function in the current iteration. This represents the minimum value of the objective function in the current iteration. Indicates the total number of iterations. This indicates the current iteration number.
[0160] The division of modules in the above-described power grid reactive power optimization device is merely illustrative. In other embodiments, the power grid reactive power optimization device can be divided into different modules as needed to complete all or part of its functions. Each module in the above-described power grid reactive power optimization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0161] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the power grid reactive power optimization method as described in any of the above embodiments.
[0162] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the power grid reactive power optimization method as described in any of the above embodiments.
[0163] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 3The computer device 300 comprises a processing component 302, further comprising one or more processors, and a memory resource represented by the memory 301, for storing instructions executable by the processing component 302, such as an application program. The application program stored in the memory 301 can comprise one or more than one module each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute the instructions to perform the power grid reactive power optimization method of any of the embodiments described above.
[0164] The computer device 300 can further comprise a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 can operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0165] Those skilled in the art can understand that, Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0166] Finally, it should be noted that the terms "first" and "second", and the like, herein do not denote any order, quantity, combination or important / primary / secondary status, but are used to distinguish one element from another, and do not denote or imply any actual relationship or sequence among such elements. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. The terms "a" and "an" and "the" and similar referents in the context of this disclosure are to be construed to be inclusive of both singular and plural, unless the context clearly dictates otherwise. It will be further understood that the terms "comprises", "comprising", "has", "having", "includes" and / or "including", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "and / or" and "or" as used herein refer to and encompass any and all possible combinations of one or more of the associated items, including but not limited to any one of the associated items alone, any two of the associated items, all of the associated items, and any permutation and combination thereof.
[0167] The various embodiments described in this specification are presented by way of example, and are not intended to limit the scope of the disclosure. Each embodiment is presented in a way that emphasizes its particular features, and the embodiments can be combined according to the needs of the user.
[0168] The above description of disclosed embodiments provides enabling concepts for making or using the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for optimizing reactive power in a power grid, characterized in that, The method includes: Obtain the preset target optimization function and its corresponding constraints; Multiple feasible solutions to the objective optimization function are initialized based on the constraints. Each feasible solution represents a set of decision variables, which includes generator reactive power, node reactive power compensation, and transformer turns ratio. Calculate the resource concentration evaluation factor for each feasible solution, and update the position of each feasible solution based on the resource concentration evaluation factor for each feasible solution. The corresponding chaotic perturbation term is calculated based on the variance of each updated feasible solution, and the position of each feasible solution is updated based on each updated feasible solution and its chaotic perturbation term. The process returns to the step of calculating the resource concentration evaluation factor and subsequent steps until the preset optimization conditions are met. Then, the optimal decision variable set is determined based on the current position of each feasible solution, and reactive power regulation of the power grid is performed based on the optimal decision variable set.
2. The power grid reactive power optimization method according to claim 1, characterized in that, The calculation of resource concentration evaluation factors for each feasible solution includes: For each feasible solution, calculate the gradient of the objective optimization function with respect to the set of decision variables corresponding to that feasible solution, and determine the magnitude of the gradient; The resource concentration evaluation factor for the feasible solution is calculated based on the gradient and its magnitude.
3. The power grid reactive power optimization method according to claim 1, characterized in that, The positions of each feasible solution are updated according to the resource concentration evaluation factor using the following expression: In the formula, Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the resource concentration evaluation factor. Represents the optimization factor. Indicates the variable factor. This represents the location of a randomly selected feasible solution. This indicates the position of the feasible solution with the best fitness among all feasible solutions.
4. The power grid reactive power optimization method according to claim 1, characterized in that, The step of calculating the corresponding chaotic perturbation term based on the variance of each updated feasible solution includes: Obtain the preset control parameter values for the chaotic mapping; Calculate the variance of each updated feasible solution, and determine the chaotic perturbation term of each updated feasible solution based on the control parameter values and each variance.
5. The power grid reactive power optimization method according to claim 1, characterized in that, Update the position of each feasible solution based on the updated feasible solution and its chaotic perturbation term according to the following expression: In the formula, Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the first The feasible solution is at the _th _th Position in the next iteration Indicates the adaptive shrinkage factor. , These represent vectors consisting of the upper and lower bounds of the decision variable set, respectively. Represents a random vector in the interval [0,1]. This represents the intensity coefficient of chaotic perturbation. Indicates the first The feasible solution is at the _th _th Chaotic perturbation term in the next iteration.
6. The power grid reactive power optimization method according to claim 1, characterized in that, After updating the position of each feasible solution based on the updated feasible solution and its chaotic perturbation term, the method further includes: Determine whether the current iteration count has reached the set value. If it has, calculate the tunneling probability of each feasible solution based on the updated position of each feasible solution and the current iteration count. Based on the tunneling probability of each feasible solution, each feasible solution is split, and the split feasible solutions are used as feasible solutions to participate in the next iteration. If the fitness is not achieved, then among the feasible solutions, determine the local feasible solutions whose fitness remains unchanged after multiple iterations, and introduce a correction factor to update the position of each local feasible solution.
7. The power grid reactive power optimization method according to claim 6, characterized in that, The tunneling probability of each feasible solution is calculated using the following expression, based on the updated position of each feasible solution and the current iteration number: In the formula, Indicates the first The feasible solution is at the _th _th The tunneling probability in the next iteration. , These represent the lower and upper limits of the tunneling probability, respectively. This indicates that the objective optimization function is in the feasible solution Adaptability at that location This indicates the maximum value of the objective function in the current iteration. This represents the minimum value of the objective function in the current iteration. Indicates the total number of iterations. This indicates the current iteration number.
8. A power grid reactive power optimization device, characterized in that, The device includes: The function acquisition module is used to acquire the preset target optimization function and its corresponding constraints. An initialization module is used to initialize multiple feasible solutions of the objective optimization function based on the constraints. Each feasible solution represents a set of decision variables, which includes generator reactive power, node reactive power compensation, and transformer turns ratio. The factor calculation module is used to calculate the resource concentration evaluation factor for each feasible solution and update the position of each feasible solution based on the resource concentration evaluation factor for each feasible solution. The position update module is used to calculate the corresponding chaotic perturbation term based on the variance of each feasible solution after the update, and update the position of each feasible solution based on each feasible solution and its chaotic perturbation term. Then, it returns to execute the factor calculation module and its subsequent modules until the preset optimization conditions are met. Based on the current position of each feasible solution, the optimal decision variable set is determined, and reactive power regulation of the power grid is performed based on the optimal decision variable set.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the power grid reactive power optimization method as described in any one of claims 1 to 7.
10. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the power grid reactive power optimization method as described in any one of claims 1 to 7.