A method, device, electronic equipment, and storage medium for real-time reactive power control in distribution networks based on co-simulation.
By using a co-simulation-based method, an initial population of reactive power control vectors is generated and iteratively optimized. By combining the voltage penalty value with the weighted summation of power loss, the problems of cumbersome modeling and difficult optimization in the existing technology are solved, and voltage stability and active power loss optimization of the distribution network are achieved.
Patent Information
- Application Number
- CN202610202938.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-26
AI Technical Summary
Existing reactive power control methods for distribution networks rely on explicit mathematical models, which leads to cumbersome modeling and difficulty in adapting to complex topology changes and drastic fluctuations in source loads. Optimization solutions also face difficulties in convergence or even lack a solution.
A co-simulation-based approach is adopted to generate an initial population of reactive power control vectors by acquiring real-time data from photovoltaic inverters and load nodes. Real-time reactive power control is achieved by using iterative optimization and power flow calculation, combined with fitness evaluation that weights the voltage over-limit penalty value and power loss.
It effectively solves the problem of insufficient robustness in optimization solutions under complex topology changes and drastic source-load fluctuations, and realizes voltage stability and active power loss optimization in distribution networks.
Smart Images

Figure CN122092405A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart distribution network operation control technology, specifically to a method, device, electronic equipment, and storage medium for real-time reactive power control of distribution networks based on collaborative simulation. Background Technology
[0002] With the increasing penetration rate of distributed photovoltaic (PV) power in distribution networks, the significant intermittency and volatility of its output power pose a severe challenge to the safe and stable operation of the power grid, easily leading to problems such as node voltage exceeding limits and increased network losses. Fully utilizing the remaining capacity of PV inverters for real-time reactive power control has become a key means to suppress voltage fluctuations in distribution networks, reduce active power losses, and improve power quality, which is of great significance for ensuring the economical and efficient operation of distribution networks with a high proportion of renewable energy.
[0003] However, existing reactive power control methods for distribution networks mostly rely on constructing accurate explicit mathematical models (such as power flow equations based on convex relaxation or linearization) for optimization. In practical applications, due to the complex topology of distribution networks and the often-existing three-phase imbalance, constructing a high-precision mathematical model that adapts to network changes in real time is extremely cumbersome. Especially under conditions of real-time and drastic fluctuations in photovoltaic power and load, traditional gradient-based or hard-constraint-based optimization algorithms are prone to convergence difficulties due to the high nonlinearity of the power flow equations, and may even lead to unsolvable cases in extreme operating conditions where voltage constraints cannot be strictly met. This makes it difficult to meet the requirements of smart distribution networks for reactive power control in terms of robustness and solution success rate. Summary of the Invention
[0004] This invention provides a method, device, electronic device, and storage medium for real-time reactive power control of distribution networks based on co-simulation. It can solve the problems in the prior art, such as cumbersome modeling due to reliance on explicit mathematical models, difficulty in adapting to complex distribution network topology changes, and difficulty in convergence or even no solution in optimization under severe source-load fluctuations due to the use of hard voltage constraints.
[0005] An embodiment of the present invention provides a real-time reactive power control method for distribution networks based on co-simulation, comprising: Obtain the real-time active power value of each photovoltaic inverter in the distribution network, the real-time active load value of each load node, and the real-time reactive load value. An initial population containing multiple sets of reactive power control vectors is generated based on real-time active power values. Repeatedly perform iterative optimization operation until the current population meets the preset termination condition, and select the reactive power control vector with the best fitness evaluation value in the current population as the target reactive power control vector. Control each photovoltaic inverter to perform power regulation according to the target reactive power control vector; The iterative optimization operation includes: The real-time active load value, the real-time reactive load value, and the reactive power control vectors contained in the current population are input into the distribution network simulation calculation engine so that the distribution network simulation calculation engine can perform power flow calculation and generate the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, the initial population is the initial population. For each reactive power control vector, based on the bus voltage value and the preset voltage constraint range, the voltage over-limit penalty value corresponding to the current reactive power control vector is calculated, and the corresponding voltage over-limit penalty value is weighted and summed with the corresponding total active power loss value of the distribution network to obtain the fitness evaluation value of the current reactive power control vector. The current population is updated based on the fitness evaluation values of each reactive power control vector to generate a new generation population, and the new generation population is then used to update the current population.
[0006] Furthermore, the step of generating an initial population containing multiple sets of reactive power control vectors based on real-time active power values includes: Obtain the rated capacity parameters of each photovoltaic inverter in the power distribution network; For each photovoltaic inverter, the maximum allowable reactive power output value of the current photovoltaic inverter is calculated based on the real-time active power value and the rated capacity parameter. Based on the maximum allowable reactive power output value, the feasible region of reactive power output of the current photovoltaic inverter is determined. Within the feasible domain of reactive power output of the current photovoltaic inverter, randomly generate reactive power values of a preset population size. The reactive power values generated by each photovoltaic inverter are combined according to the preset inverter arrangement order to obtain multiple sets of reactive power control vectors to form the initial population.
[0007] Furthermore, the step of inputting real-time active load values, real-time reactive load values, and the reactive power control vectors contained in the current population into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine can perform power flow calculations and generate the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector, includes: Input the real-time active load value and the real-time reactive load value into the distribution network simulation calculation engine so that the distribution network simulation calculation engine can configure the active power parameters and reactive power parameters of each load node in the distribution network simulation calculation engine according to the real-time active load value and the real-time reactive load value. The reactive power control vectors contained in the current population are input into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine performs a single power flow calculation operation according to each reactive power control vector, generating the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, in each single power flow calculation operation, the distribution network simulation calculation engine configures each reactive power value contained in the current reactive power control vector as the reactive power output parameter of each photovoltaic inverter, and performs power flow calculation.
[0008] Furthermore, for each reactive power control vector, based on the bus voltage value and the preset voltage constraint range, the voltage over-limit penalty value corresponding to the current reactive power control vector is calculated, and the corresponding voltage over-limit penalty value is weighted and summed with the corresponding total active power loss value of the distribution network to obtain the fitness evaluation value of the current reactive power control vector, including: For each reactive power control vector, the voltage over-limit component calculation operation is performed on the bus voltage value of each bus node corresponding to the current reactive power control vector to generate the voltage over-limit component of the corresponding bus node. The voltage over-limit components of each bus node are accumulated to obtain the voltage over-limit penalty value corresponding to the current reactive power control vector. The penalty term value is obtained by multiplying the voltage over-limit penalty value by the preset penalty weight coefficient, and the penalty term value is added to the total active power loss value of the distribution network corresponding to the current reactive power control vector to obtain the fitness evaluation value of the current reactive power control vector. The voltage over-limit component calculation operation includes: Determine whether the current bus voltage value of the bus node is between the preset lower voltage threshold and the preset upper voltage threshold; if so, determine that the voltage over-limit component of the current bus node is zero. If not, when the current bus voltage value of the bus node exceeds the voltage upper limit threshold, calculate the absolute value of the first difference between the current bus voltage value and the voltage upper limit threshold, and use the absolute value of the first difference as the voltage over-limit component of the current bus node. When the current bus voltage value of the bus node is lower than the lower voltage threshold, calculate the absolute value of the second difference between the current bus voltage value and the lower voltage threshold, and use the absolute value of the second difference as the voltage over-limit component of the current bus node.
[0009] Furthermore, the step of updating the current population based on the fitness evaluation values of each reactive power control vector to generate a new generation population, and updating the new generation population to the current population, includes: For each reactive power control vector contained in the current population, three reactive power control vectors other than the current reactive power control vector are randomly selected from the current population, and the three selected reactive power control vectors are defined as the reference vector, the first difference vector, and the second difference vector, respectively. A difference vector is generated based on the first difference vector and the second difference vector; The difference vector is weighted according to a preset scaling factor to generate a weighted difference vector; A vector synthesis operation is performed on the baseline vector and the weighted difference vector to generate a mutation vector; According to the preset crossover probability parameters, a binomial crossover operation is performed on the mutation vector and the current reactive power control vector to generate the experimental reactive power control vector. Calculate the fitness evaluation value of the experimental reactive power control vector and compare the fitness evaluation value of the experimental reactive power control vector with the fitness evaluation value of the current reactive power control vector. If the fitness evaluation value of the experimental reactive power control vector is better than the fitness evaluation value of the current reactive power control vector, then the experimental reactive power control vector is selected as the corresponding reactive power control vector in the new generation population; otherwise, the current reactive power control vector is selected as the corresponding reactive power control vector in the new generation population.
[0010] Furthermore, the step of performing a vector synthesis operation on the reference vector and the weighted difference vector to generate a mutation vector includes: For each reactive power value contained in the reference vector, calculate the algebraic sum of the current reactive power value and the reactive power difference component at the corresponding position in the weighted difference vector to generate a variant reactive power value. The generated variant reactive power values are combined according to their corresponding positions to generate a variant vector.
[0011] Furthermore, the step of performing a binomial crossover operation between the mutation vector and the current reactive power control vector according to preset crossover probability parameters to generate an experimental reactive power control vector includes: For each reactive power value contained in the mutation vector, a random probability value corresponding to the current reactive power value is generated. Determine whether the random probability value is less than or equal to the preset crossover probability parameter; if yes, then determine the current reactive power value as the test reactive power value at the corresponding position; if no, then determine the reactive power value at the corresponding position in the current reactive power control vector as the test reactive power value at the corresponding position. The generated reactive power values are combined according to their corresponding positions to generate a reactive power control vector.
[0012] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0013] One embodiment of the present invention provides a real-time reactive power control device for distribution networks based on co-simulation, comprising: a data acquisition module, a repetitive operation module, an iterative optimization module, and a power regulation module; The data acquisition module is used to acquire the real-time active power value of each photovoltaic inverter in the distribution network, the real-time active load value of each load node, and the real-time reactive load value. The repeated execution operation module is used to generate an initial population containing multiple sets of reactive power control vectors based on the real-time active power value; and to repeatedly execute the iterative optimization module until the current population meets the preset termination condition, and select the reactive power control vector with the best fitness evaluation value in the current population as the target reactive power control vector. The iterative optimization module is used to input real-time active load values, real-time reactive load values, and each reactive power control vector contained in the current population into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine can perform power flow calculation and generate the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, the initial population is the initial population; for each reactive power control vector, according to the bus voltage value and the preset voltage constraint range, the voltage over-limit penalty value corresponding to the current reactive power control vector is calculated, and the corresponding voltage over-limit penalty value and the corresponding total active power loss value of the distribution network are weighted and summed to obtain the fitness evaluation value of the current reactive power control vector; according to the fitness evaluation value of each reactive power control vector, the current population is updated to generate a new generation population, and the new generation population is updated to the current population; The power regulation module is used to control each photovoltaic inverter to perform power regulation according to the target reactive power control vector.
[0014] Based on the above method embodiments, the present invention provides corresponding electronic device embodiments.
[0015] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the real-time reactive power control method for distribution networks based on co-simulation as described in any of the above-described method embodiments.
[0016] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0017] One embodiment of the present invention provides a storage medium storing a computer program thereon, wherein, when the computer program is running, it controls the device where the storage medium is located to execute any of the above-described method embodiments of the real-time reactive power control method for distribution networks based on co-simulation.
[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention provides a method, device, electronic device, and storage medium for real-time reactive power control in a distribution network based on co-simulation. The method acquires real-time active power values of each photovoltaic inverter in the distribution network, as well as real-time active load values and real-time reactive load values of each load node; generates an initial population containing multiple sets of reactive power control vectors based on the real-time active power values; determines a target reactive power control vector from the initial population through iterative optimization, and controls each photovoltaic inverter to adjust its power according to the target reactive power control vector; wherein, the iterative optimization includes: inputting the real-time active load values, real-time reactive load values, and reactive power control vectors in the current population into a distribution network simulation engine for power flow calculation to obtain the corresponding total active power loss value and bus voltage value of the distribution network; calculating a voltage exceedance penalty value based on the bus voltage value and a preset voltage constraint range, and weighting it with the total active power loss value of the distribution network to obtain a fitness evaluation value; updating the current population based on the fitness evaluation value until a preset termination condition is met.
[0019] This application avoids the problems of cumbersome modeling and difficulty in adapting to topology changes faced by existing technologies in constructing explicit mathematical models in complex distribution networks by directly inputting real-time load and control vectors into the distribution network simulation engine for power flow calculation. Simultaneously, by calculating the voltage exceedance penalty value and using its weighted sum with power loss as the fitness evaluation criterion, an augmented fitness function containing a penalty term is constructed. This ensures that solutions with voltage exceedances are no longer directly eliminated due to constraint violations, but are retained in the population as inferior solutions for iteration. This transforms the traditional hard voltage constraint into a soft constraint in the objective function, effectively solving the problem of insufficient robustness in optimization algorithms that fail to converge or have no solutions under drastic source-load fluctuations due to strong constraints. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a real-time reactive power control method for distribution networks based on co-simulation, provided by an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of the structure of a real-time reactive power control device for a distribution network based on co-simulation, provided in an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] like Figure 1 As shown, to address the problems in existing technologies where reliance on explicit mathematical models leads to cumbersome modeling, difficulty in adapting to complex distribution network topology changes, and difficulties in convergence or even no solution due to the use of hard voltage constraints under drastic source-load fluctuations, an embodiment of the present invention provides a real-time reactive power control method for distribution networks based on co-simulation, comprising at least the following steps: Before detailing the specific steps, the execution environment of this invention embodiment is first described. The method described in this invention runs on a distribution network regional coordination and control device deployed in a distribution network substation or regional dispatch center. The distribution network regional coordination and control device establishes bidirectional communication connections with each photovoltaic inverter and intelligent measurement terminal in the distribution network via industrial Ethernet, power line carrier communication, or a private wireless network. The distribution network regional coordination and control device integrates a distribution network simulation calculation engine (e.g., a simulation kernel developed based on OpenDSS or Matlab), which interacts with the control algorithm program in real time via an internal data bus or dynamic link library interface.
[0024] Step S1: Obtain the real-time active power value of each photovoltaic inverter in the distribution network, the real-time active load value of each load node, and the real-time reactive load value. Specifically, in this embodiment of the invention, it is first necessary to construct the actual physical scenario of the distribution network's operation at the current moment, serving as the data foundation for subsequent collaborative simulation and optimized control. Specifically, it is necessary to collect the distribution network's operational status data in real time through measuring devices, communication terminals, or energy management system interfaces deployed in the distribution network. For each photovoltaic inverter connected to the distribution network, the real-time active power output value of the photovoltaic inverter is obtained. This real-time active power output value reflects the active power output level of the distributed power source under the current illumination and temperature conditions. Simultaneously, for each load node in the distribution network, the real-time active load value and real-time reactive load value consumed by the load node at the current moment are obtained. The real-time active load value and the real-time reactive load value characterize the actual electricity demand of power users in the distribution network. It is worth noting that the collection of the above data should meet the preset time synchronization requirements to ensure that the acquired data can truly reflect the operating status of the distribution network at the same time segment. After obtaining the real-time active power, real-time active load, and real-time reactive load values, these values are used as defined boundary condition parameters to drive the distribution network simulation engine for power flow calculations. By implementing this step, the actual source-load fluctuations of the distribution network can be accurately mapped to the simulation environment, eliminating the model inaccuracy problem caused by parameter estimation bias in traditional methods. This provides accurate and reliable data support for generating a high-quality initial population and performing precise iterative optimization.
[0025] Step S2: Generate an initial population containing multiple sets of reactive power control vectors based on the real-time active power values; In a preferred embodiment, generating an initial population containing multiple sets of reactive power control vectors based on real-time active power values includes: Obtain the rated capacity parameters of each photovoltaic inverter in the power distribution network; For each photovoltaic inverter, the maximum allowable reactive power output value of the current photovoltaic inverter is calculated based on the real-time active power value and the rated capacity parameter. Based on the maximum allowable reactive power output value, the feasible region of reactive power output of the current photovoltaic inverter is determined. Within the feasible domain of reactive power output of the current photovoltaic inverter, randomly generate reactive power values of a preset population size. The reactive power values generated by each photovoltaic inverter are combined according to the preset inverter arrangement order to obtain multiple sets of reactive power control vectors to form the initial population.
[0026] Specifically, in a preferred embodiment of the present invention, the process of generating an initial population containing multiple sets of reactive power control vectors based on real-time active power values is as follows: First, the rated capacity parameters of each photovoltaic inverter in the distribution network are obtained through an equipment ledger database or inverter communication interface. The rated capacity parameters characterize the upper limit of the apparent power that the photovoltaic inverter can output. Then, for each photovoltaic inverter, using the obtained real-time active power values and the rated capacity parameters, the maximum allowable reactive power output value of the current photovoltaic inverter is calculated according to the power circle diagram constraint principle. Specifically, the output of the photovoltaic inverter is limited by the apparent power capacity, and the formula for calculating the maximum allowable reactive power output value is as follows: in, Indicates the first The maximum allowable reactive power output value of each photovoltaic inverter; Indicates the first Rated capacity parameters of a photovoltaic inverter; Indicates the first Real-time active power values of a photovoltaic inverter; This indicates the square root operation.
[0027] Based on the calculated maximum allowable reactive power output value, the feasible region of reactive power output for the current photovoltaic inverter is determined. Since the photovoltaic inverter can generate both inductive and capacitive reactive power, the feasible region of reactive power output is limited to between the negative and positive values of the maximum allowable reactive power output. After determining the feasible region of reactive power output for each photovoltaic inverter, reactive power values of a preset population size are randomly generated within the feasible region of reactive power output for the current photovoltaic inverter. To ensure the uniform distribution of the initial population in the solution space, a uniformly distributed random number generation strategy is typically adopted for the th... The first individual The formula for calculating the initial reactive power of a photovoltaic inverter is as follows: in, Indicates the first in the initial population The corresponding reactive power control vector in the nth... The reactive power value of a photovoltaic inverter; This represents a random number that follows a uniform distribution between 0 and 1. The value range is 1 to , Indicates the preset population size; The value range is 1 to , This indicates the total number of photovoltaic inverters in the distribution network.
[0028] Finally, the reactive power values generated by each photovoltaic inverter are combined according to a preset inverter arrangement order to obtain multiple sets of reactive power control vectors to form the initial population. Specifically, for each individual index... , will generate The reactive power values are arranged sequentially according to the physical node order or logical numbering order of the photovoltaic inverter, forming a... The reactive power control vector of dimension is ultimately determined by The set of reactive power control vectors constitutes the initial population. By implementing this step, it can be ensured that each individual in the initial population strictly satisfies the physical capacity constraints of the photovoltaic inverter, avoiding the waste of computing power caused by the infeasibility of the initial solution. At the same time, the remaining capacity of the photovoltaic inverter provides sufficient reactive power regulation margin, laying a good solution space foundation for subsequent global optimization.
[0029] Step S3: Repeat the iterative optimization operation until the current population meets the preset termination condition, and select the reactive power control vector with the best fitness evaluation value in the current population as the target reactive power control vector. In a preferred embodiment, the iterative optimization operation includes: The real-time active load value, the real-time reactive load value, and the reactive power control vectors contained in the current population are input into the distribution network simulation calculation engine so that the distribution network simulation calculation engine can perform power flow calculation and generate the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, the initial population is the initial population. For each reactive power control vector, based on the bus voltage value and the preset voltage constraint range, the voltage over-limit penalty value corresponding to the current reactive power control vector is calculated, and the corresponding voltage over-limit penalty value is weighted and summed with the corresponding total active power loss value of the distribution network to obtain the fitness evaluation value of the current reactive power control vector. The current population is updated based on the fitness evaluation values of each reactive power control vector to generate a new generation population, and the new generation population is then used to update the current population.
[0030] In a preferred embodiment, the step of inputting the real-time active load value, the real-time reactive load value, and each reactive power control vector contained in the current population into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine performs power flow calculation and generates the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector, includes: Input the real-time active load value and the real-time reactive load value into the distribution network simulation calculation engine so that the distribution network simulation calculation engine can configure the active power parameters and reactive power parameters of each load node in the distribution network simulation calculation engine according to the real-time active load value and the real-time reactive load value. The reactive power control vectors contained in the current population are input into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine performs a single power flow calculation operation according to each reactive power control vector, generating the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, in each single power flow calculation operation, the distribution network simulation calculation engine configures each reactive power value contained in the current reactive power control vector as the reactive power output parameter of each photovoltaic inverter, and performs power flow calculation.
[0031] In a preferred embodiment, for each reactive power control vector, calculating the voltage over-limit penalty value corresponding to the current reactive power control vector based on the bus voltage value and a preset voltage constraint range, and then weighting and summing the corresponding voltage over-limit penalty value with the corresponding total active power loss value of the distribution network to obtain the fitness evaluation value of the current reactive power control vector, includes: For each reactive power control vector, the voltage over-limit component calculation operation is performed on the bus voltage value of each bus node corresponding to the current reactive power control vector to generate the voltage over-limit component of the corresponding bus node. The voltage over-limit components of each bus node are accumulated to obtain the voltage over-limit penalty value corresponding to the current reactive power control vector. The penalty term value is obtained by multiplying the voltage over-limit penalty value by the preset penalty weight coefficient, and the penalty term value is added to the total active power loss value of the distribution network corresponding to the current reactive power control vector to obtain the fitness evaluation value of the current reactive power control vector. The voltage over-limit component calculation operation includes: Determine whether the current bus voltage value of the bus node is between the preset lower voltage threshold and the preset upper voltage threshold; if so, determine that the voltage over-limit component of the current bus node is zero. If not, when the current bus voltage value of the bus node exceeds the voltage upper limit threshold, calculate the absolute value of the first difference between the current bus voltage value and the voltage upper limit threshold, and use the absolute value of the first difference as the voltage over-limit component of the current bus node. When the current bus voltage value of the bus node is lower than the lower voltage threshold, calculate the absolute value of the second difference between the current bus voltage value and the lower voltage threshold, and use the absolute value of the second difference as the voltage over-limit component of the current bus node.
[0032] In a preferred embodiment, the step of updating the current population based on the fitness evaluation values of each reactive power control vector to generate a new generation population, and updating the new generation population to the current population, includes: For each reactive power control vector contained in the current population, three reactive power control vectors other than the current reactive power control vector are randomly selected from the current population, and the three selected reactive power control vectors are defined as the reference vector, the first difference vector, and the second difference vector, respectively. A difference vector is generated based on the first difference vector and the second difference vector; The difference vector is weighted according to a preset scaling factor to generate a weighted difference vector; A vector synthesis operation is performed on the baseline vector and the weighted difference vector to generate a mutation vector; According to the preset crossover probability parameters, a binomial crossover operation is performed on the mutation vector and the current reactive power control vector to generate the experimental reactive power control vector. Calculate the fitness evaluation value of the experimental reactive power control vector and compare the fitness evaluation value of the experimental reactive power control vector with the fitness evaluation value of the current reactive power control vector. If the fitness evaluation value of the experimental reactive power control vector is better than the fitness evaluation value of the current reactive power control vector, then the experimental reactive power control vector is selected as the corresponding reactive power control vector in the new generation population; otherwise, the current reactive power control vector is selected as the corresponding reactive power control vector in the new generation population.
[0033] In a preferred embodiment, the step of performing a vector synthesis operation on the reference vector and the weighted difference vector to generate a mutation vector includes: For each reactive power value contained in the reference vector, calculate the algebraic sum of the current reactive power value and the reactive power difference component at the corresponding position in the weighted difference vector to generate a variant reactive power value. The generated variant reactive power values are combined according to their corresponding positions to generate a variant vector.
[0034] In a preferred embodiment, the step of performing a binomial crossover operation between the mutation vector and the current reactive power control vector according to a preset crossover probability parameter to generate a test reactive power control vector includes: For each reactive power value contained in the mutation vector, a random probability value corresponding to the current reactive power value is generated. Determine whether the random probability value is less than or equal to the preset crossover probability parameter; if yes, then determine the current reactive power value as the test reactive power value at the corresponding position; if no, then determine the reactive power value at the corresponding position in the current reactive power control vector as the test reactive power value at the corresponding position. The generated reactive power values are combined according to their corresponding positions to generate a reactive power control vector.
[0035] Specifically, in a preferred embodiment of the present invention, the iterative optimization operation is the core step in achieving precise reactive power control, and the operation is performed through a closed-loop interaction of "simulation-optimization". Specifically, the real-time active load value, the real-time reactive load value, and each reactive power control vector contained in the current population are input to the distribution network simulation calculation engine. The distribution network simulation calculation engine, as the calculation carrier of the fitness function, is used to perform power flow calculations based on the input boundary conditions and control variables, generating the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector. In this process, the initial population is the initial population generated in step S2. For each reactive power control vector contained in the current population, its control effect needs to be evaluated. To this end, based on the bus voltage value and the preset voltage constraint range, the voltage exceedance penalty value corresponding to the current reactive power control vector is calculated. Subsequently, an augmented objective function including the penalty term is constructed, and the corresponding voltage exceedance penalty value and the corresponding total active power loss value of the distribution network are weighted and summed to obtain the fitness evaluation value of the current reactive power control vector. After evaluating all individuals in the current population, the current population is updated based on the fitness evaluation values of each reactive power control vector to generate a new generation population. The new generation population is then updated to the current population, and the next iteration begins until the preset iteration termination conditions are met (such as reaching the maximum number of iterations or the fitness value no longer decreasing significantly).
[0036] Specifically, to balance real-time control with computational accuracy, the preset iteration termination condition is set to satisfy any one of the following: when the change in the optimal individual fitness evaluation value over a preset number of generations (e.g., 5 generations) is less than a preset convergence threshold (e.g., 10). −4When either condition is met, the iteration terminates immediately and the optimal solution for the current moment is output, ensuring that control commands can be issued in a timely manner. This can be done when the current computation time exceeds the allowable time window (e.g., 5 seconds) of the real-time dispatch cycle of the distribution network.
[0037] Furthermore, to achieve accurate interaction between the algorithm and the physical model, the process of inputting real-time active load values, real-time reactive load values, and the reactive power control vectors contained in the current population into the distribution network simulation engine is designed as a hierarchical configuration mode. First, the real-time active load values and the real-time reactive load values are input into the distribution network simulation engine, allowing the engine to configure the active and reactive power parameters of each load node based on these values. This step establishes the basic operating conditions of the distribution network at the current moment. Subsequently, in the batch simulation stage, the reactive power control vectors contained in the current population are input into the distribution network simulation engine, enabling the engine to perform a single power flow calculation operation based on each reactive power control vector. In each single power flow calculation operation, the distribution network simulation calculation engine configures the reactive power values contained in the current reactive power control vector as the reactive power output parameters of each photovoltaic inverter, and calls the power flow calculation core program (such as the Newton-Raphson method or the forward-backward substitution method) to perform the power flow calculation. Finally, it outputs the total active power loss value of the distribution network corresponding to the current reactive power control vector and the bus voltage value of each node.
[0038] It is worth noting that, to handle the large number of simulation demands generated during population iteration, the power distribution network simulation engine is configured in snapshot simulation mode, meaning it only calculates the steady-state power flow at the current time point, without performing continuous time-series simulations. Furthermore, the power distribution network simulation engine and the optimization algorithm use shared memory or COM component interface technology for data transmission, avoiding frequent file read / write operations. This keeps the time consumed by a single power flow calculation within milliseconds, meeting the performance requirements of real-time iteration.
[0039] Furthermore, to address the convergence problem of traditional optimization methods under hard voltage constraints, this invention employs a penalty function method to handle voltage constraints. The process of calculating the fitness evaluation value for each reactive power control vector is as follows: First, for each reactive power control vector, a voltage over-limit component calculation operation is performed on the bus voltage value of each bus node corresponding to the current reactive power control vector, generating the voltage over-limit component for the corresponding bus node. The specific logic of the voltage over-limit component calculation operation is as follows: It is determined whether the current bus node's bus voltage value is between a preset lower voltage threshold and a preset upper voltage threshold. If yes, it indicates that the node voltage is qualified, and the voltage over-limit component of the current bus node is determined to be zero. If not, it indicates that a voltage over-limit has occurred. When the current bus voltage value of the bus node exceeds the upper voltage threshold, calculate the absolute value of the first difference between the current bus voltage value and the upper voltage threshold, and use the first absolute value of the difference as the voltage over-limit component of the current bus node; when the current bus voltage value of the bus node is lower than the lower voltage threshold, calculate the absolute value of the second difference between the current bus voltage value and the lower voltage threshold, and use the second absolute value of the difference as the voltage over-limit component of the current bus node.
[0040] The calculation formula for the above voltage over-limit component can be expressed as: in, Indicates the first The first reactive power control vector corresponds to the first Voltage over-limit components at each bus node; Indicates the first The first reactive power control vector corresponds to the first The bus voltage values of each bus node; This indicates the preset upper voltage threshold. This indicates the preset lower voltage threshold.
[0041] After obtaining the voltage over-limit components of all nodes, the voltage over-limit components of each bus node are accumulated to obtain the voltage over-limit penalty value corresponding to the current reactive power control vector. Finally, the voltage over-limit penalty value is multiplied by a preset penalty weight coefficient to obtain the penalty term value, and the penalty term value is added to the total active power loss value of the distribution network corresponding to the current reactive power control vector to obtain the fitness evaluation value of the current reactive power control vector. The formula for calculating the fitness function is as follows: in, Indicates the first The fitness evaluation value of each reactive power control vector; This represents the corresponding total active power loss value of the distribution network; This represents the preset penalty weighting coefficient; This represents the total number of busbar nodes in the distribution network. In practical applications, the preset penalty weighting coefficient... The value of is crucial to the convergence direction of the algorithm. It is recommended to... Set to a larger value (e.g., a value in the range of 10). 3 Up to 10 5 The purpose of setting a large value is to construct a strong penalty mechanism, so that the fitness evaluation value of any reactive power control vector that leads to voltage exceedance becomes extremely large (i.e., the range), thus being naturally eliminated by dominant individuals in subsequent selection operations. This avoids the loss of population diversity caused by directly eliminating solutions that exceed the limit, and ensures that the final output target reactive power control vector can strictly meet the voltage safety constraints.
[0042] Furthermore, the process of updating the current population based on the fitness evaluation values of each reactive power control vector employs the mutation, crossover, and selection strategies of the differential evolution algorithm. Specifically, this includes: For each reactive power control vector (as the target vector) in the current population, three reactive power control vectors other than the current reactive power control vector are randomly selected from the current population, and these three selected reactive power control vectors are defined as the reference vector, the first difference vector, and the second difference vector, respectively. Then, a mutation operation is performed: a difference vector is generated based on the first difference vector and the second difference vector; the difference vector is weighted according to a preset scaling factor to generate a weighted difference vector; and a vector synthesis operation is performed on the reference vector and the weighted difference vector to generate a mutation vector.
[0043] The vector synthesis process of the mutation operation follows the principle of element-by-element calculation: for each reactive power value contained in the reference vector, the algebraic sum of the current reactive power value and the reactive power difference component at the corresponding position in the weighted difference vector is calculated to generate the mutated reactive power value; the generated mutated reactive power values are combined according to the corresponding positions to generate the mutation vector.
[0044] The formula for calculating the mutation vector is as follows: in, Represents the mutation vector; Represents the reference vector; Represents the first difference vector; Represents the second difference vector; This represents the preset scaling factor. To balance the algorithm's global search capability with its local exploitation capability, the preset scaling factor is recommended. The value range is set to [0.4, 0.9]. Simultaneously, the preset crossover probability parameter... The recommended value range is [0.1, 0.9]. Furthermore, the preset population size of the initial population... It is generally recommended to base the total number of photovoltaic inverters in the distribution network on the number of inverters. To determine, the value usually ranges from to The range is between 30 and 100 to ensure that the population can fully cover the solution space.
[0045] After generating the mutation vector, a crossover operation is performed: based on a preset crossover probability parameter, a binomial crossover operation is performed between the mutation vector and the current reactive power control vector to generate a test reactive power control vector. Specifically, for each reactive power value contained in the mutation vector, a random probability value corresponding to the current reactive power value is generated; it is determined whether the random probability value is less than or equal to the preset crossover probability parameter; if so, the current reactive power value (i.e., the value from the mutation vector) is determined as the test reactive power value at the corresponding position; if not, the reactive power value at the corresponding position in the current reactive power control vector (i.e., the value from the original individual) is determined as the test reactive power value at the corresponding position; finally, the generated test reactive power values are combined according to their corresponding positions to generate the test reactive power control vector.
[0046] Finally, a selection operation is performed: the fitness evaluation value of the experimental reactive power control vector is calculated, and compared with the fitness evaluation value of the current reactive power control vector. If the fitness evaluation value of the experimental reactive power control vector is better than (i.e., less than) the fitness evaluation value of the current reactive power control vector, the experimental reactive power control vector is selected as the corresponding reactive power control vector in the next generation population; otherwise, the current reactive power control vector is selected as the corresponding reactive power control vector in the next generation population. By implementing this step, the differential evolution mechanism can be used to perform efficient search in the solution space, and under the premise of ensuring voltage safety constraints, the population can be gradually guided to evolve towards minimizing network losses, thereby obtaining the optimal reactive power control strategy that balances safety and economy.
[0047] Step S4: Control each photovoltaic inverter to perform power regulation according to the target reactive power control vector; Specifically, when the iterative optimization operation meets the preset termination condition, the determined target reactive power control vector represents the globally optimal reactive power configuration scheme under the current distribution network operation section. To transform this globally optimal reactive power configuration scheme into actual control actions for physical devices, the target reactive power control vector needs to be parsed and issued as instructions. Specifically, the target reactive power control vector is an ordered set composed of the optimal reactive power setpoints of each photovoltaic inverter in the distribution network. The control terminal maps and sends each reactive power value contained in the target reactive power control vector to the local controller of the corresponding photovoltaic inverter through the distribution network's communication network or dispatch data network.
[0048] Upon receiving a reactive power control command, the local controller of each photovoltaic inverter adjusts the on / off timing of the power electronic switching devices in the inverter circuit, thereby altering the phase relationship between the inverter output current and the grid connection voltage. This drives the actual reactive power output value of the photovoltaic inverter to quickly track and stabilize at the received reactive power value. During this process, each photovoltaic inverter utilizes its remaining capacity to provide reactive power support, achieving real-time regulation of the reactive power flow of the distribution network without affecting normal active power generation. By implementing this step, the theoretical optimal solution obtained through co-simulation and algorithm optimization can be transformed into the physical regulation effect of the distribution network in real time. This effectively eliminates the risk of bus voltage exceeding limits and significantly reduces active power losses in the distribution network when dealing with random fluctuations in source load, ensuring the safe, stable, and economical operation of a high-proportion renewable energy distribution network.
[0049] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0050] like Figure 2 As shown, an embodiment of the present invention provides a real-time reactive power control device for distribution networks based on co-simulation, including: a data acquisition module, a repetitive operation module, an iterative optimization module, and a power regulation module; The data acquisition module is used to acquire the real-time active power value of each photovoltaic inverter in the distribution network, the real-time active load value of each load node, and the real-time reactive load value. The repeated execution operation module is used to generate an initial population containing multiple sets of reactive power control vectors based on the real-time active power value; and to repeatedly execute the iterative optimization module until the current population meets the preset termination condition, and select the reactive power control vector with the best fitness evaluation value in the current population as the target reactive power control vector. The iterative optimization module is used to input real-time active load values, real-time reactive load values, and each reactive power control vector contained in the current population into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine can perform power flow calculation and generate the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, the initial population is the initial population; for each reactive power control vector, according to the bus voltage value and the preset voltage constraint range, the voltage over-limit penalty value corresponding to the current reactive power control vector is calculated, and the corresponding voltage over-limit penalty value and the corresponding total active power loss value of the distribution network are weighted and summed to obtain the fitness evaluation value of the current reactive power control vector; according to the fitness evaluation value of each reactive power control vector, the current population is updated to generate a new generation population, and the new generation population is updated to the current population; The power regulation module is used to control each photovoltaic inverter to perform power regulation according to the target reactive power control vector.
[0051] In a preferred embodiment, the repetitive execution module generates an initial population containing multiple sets of reactive power control vectors based on real-time active power values, including: Obtain the rated capacity parameters of each photovoltaic inverter in the power distribution network; For each photovoltaic inverter, the maximum allowable reactive power output value of the current photovoltaic inverter is calculated based on the real-time active power value and the rated capacity parameter. Based on the maximum allowable reactive power output value, the feasible region of reactive power output of the current photovoltaic inverter is determined. Within the feasible domain of reactive power output of the current photovoltaic inverter, randomly generate reactive power values of a preset population size. The reactive power values generated by each photovoltaic inverter are combined according to the preset inverter arrangement order to obtain multiple sets of reactive power control vectors to form the initial population.
[0052] In a preferred embodiment, the iterative optimization module inputs real-time active load values, real-time reactive load values, and the reactive power control vectors included in the current population to the distribution network simulation calculation engine, so that the distribution network simulation calculation engine performs power flow calculations to generate total active power loss values and bus voltage values of the distribution network corresponding to each reactive power control vector, including: Input the real-time active load value and the real-time reactive load value into the distribution network simulation calculation engine so that the distribution network simulation calculation engine can configure the active power parameters and reactive power parameters of each load node in the distribution network simulation calculation engine according to the real-time active load value and the real-time reactive load value. The reactive power control vectors contained in the current population are input into the distribution network simulation calculation engine, so that the distribution network simulation calculation engine performs a single power flow calculation operation according to each reactive power control vector, generating the total active power loss value and bus voltage value of the distribution network corresponding to each reactive power control vector; wherein, in each single power flow calculation operation, the distribution network simulation calculation engine configures each reactive power value contained in the current reactive power control vector as the reactive power output parameter of each photovoltaic inverter, and performs power flow calculation.
[0053] In a preferred embodiment, the iterative optimization module, for each reactive power control vector, calculates the voltage over-limit penalty value corresponding to the current reactive power control vector based on the bus voltage value and a preset voltage constraint range, and then performs a weighted summation of the corresponding voltage over-limit penalty value and the corresponding total active power loss value of the distribution network to obtain the fitness evaluation value of the current reactive power control vector, including: For each reactive power control vector, the voltage over-limit component calculation operation is performed on the bus voltage value of each bus node corresponding to the current reactive power control vector to generate the voltage over-limit component of the corresponding bus node. The voltage over-limit components of each bus node are accumulated to obtain the voltage over-limit penalty value corresponding to the current reactive power control vector. The penalty term value is obtained by multiplying the voltage over-limit penalty value by the preset penalty weight coefficient, and the penalty term value is added to the total active power loss value of the distribution network corresponding to the current reactive power control vector to obtain the fitness evaluation value of the current reactive power control vector. The voltage over-limit component calculation operation includes: Determine whether the current bus voltage value of the bus node is between the preset lower voltage threshold and the preset upper voltage threshold; if so, determine that the voltage over-limit component of the current bus node is zero. If not, when the current bus voltage value of the bus node exceeds the voltage upper limit threshold, calculate the absolute value of the first difference between the current bus voltage value and the voltage upper limit threshold, and use the absolute value of the first difference as the voltage over-limit component of the current bus node. When the current bus voltage value of the bus node is lower than the lower voltage threshold, calculate the absolute value of the second difference between the current bus voltage value and the lower voltage threshold, and use the absolute value of the second difference as the voltage over-limit component of the current bus node.
[0054] In a preferred embodiment, the iterative optimization module updates the current population based on the fitness evaluation values of each reactive power control vector to generate a new generation population, and updates the new generation population to the current population, including: For each reactive power control vector contained in the current population, three reactive power control vectors other than the current reactive power control vector are randomly selected from the current population, and the three selected reactive power control vectors are defined as the reference vector, the first difference vector, and the second difference vector, respectively. A difference vector is generated based on the first difference vector and the second difference vector; The difference vector is weighted according to a preset scaling factor to generate a weighted difference vector; A vector synthesis operation is performed on the baseline vector and the weighted difference vector to generate a mutation vector; According to the preset crossover probability parameters, a binomial crossover operation is performed on the mutation vector and the current reactive power control vector to generate the experimental reactive power control vector. Calculate the fitness evaluation value of the experimental reactive power control vector and compare the fitness evaluation value of the experimental reactive power control vector with the fitness evaluation value of the current reactive power control vector. If the fitness evaluation value of the experimental reactive power control vector is better than the fitness evaluation value of the current reactive power control vector, then the experimental reactive power control vector is selected as the corresponding reactive power control vector in the new generation population; otherwise, the current reactive power control vector is selected as the corresponding reactive power control vector in the new generation population.
[0055] In a preferred embodiment, the iterative optimization module performs a vector synthesis operation on the baseline vector and the weighted difference vector to generate a mutation vector, including: For each reactive power value contained in the reference vector, calculate the algebraic sum of the current reactive power value and the reactive power difference component at the corresponding position in the weighted difference vector to generate a variant reactive power value. The generated variant reactive power values are combined according to their corresponding positions to generate a variant vector.
[0056] In a preferred embodiment, the iterative optimization module performs a binomial crossover operation between the mutation vector and the current reactive power control vector according to a preset crossover probability parameter to generate a test reactive power control vector, including: For each reactive power value contained in the mutation vector, a random probability value corresponding to the current reactive power value is generated. Determine whether the random probability value is less than or equal to the preset crossover probability parameter; if yes, then determine the current reactive power value as the test reactive power value at the corresponding position; if no, then determine the reactive power value at the corresponding position in the current reactive power control vector as the test reactive power value at the corresponding position. The generated reactive power values are combined according to their corresponding positions to generate a reactive power control vector.
[0057] It should be noted that the embodiments of the device described above correspond to the embodiments of the present invention described above, and can realize the real-time reactive power control method for distribution networks based on co-simulation described in any one of the present invention. Furthermore, the embodiments of the device described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Additionally, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort.
[0058] Based on the above-described method embodiments of the present invention, a corresponding embodiment of an electronic device is provided.
[0059] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the real-time reactive power control method for distribution networks based on co-simulation as described in any one of the present invention, or, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments.
[0060] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the terminal device.
[0061] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0062] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0063] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0064] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments; Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is running, the device where the storage medium is located executes any of the above-described co-simulation-based real-time reactive power control methods for power distribution networks.
[0065] The aforementioned storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0066] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0067] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A real-time control method for reactive power of a power distribution network based on co-simulation, characterized in that, The method comprises the following steps: acquiring real-time active power values of each photovoltaic inverter in a power distribution network, real-time active load values of each load node, and real-time reactive load values; generating an initial population containing multiple groups of reactive power control vectors according to the real-time active power values; repeatedly performing an iterative optimization operation until the current population meets a preset termination condition, and selecting a reactive power control vector with the optimal fitness evaluation value in the current population as a target reactive power control vector; controlling each photovoltaic inverter to perform power adjustment according to the target reactive power control vector; the iterative optimization operation comprises the following steps: inputting the real-time active load values, the real-time reactive load values, and each reactive power control vector contained in the current population into a power distribution network simulation calculation engine to enable the power distribution network simulation calculation engine to perform power flow calculation, and generating power distribution network total active power loss values and bus voltage values corresponding to each reactive power control vector; wherein the initial population is the initial population; for each reactive power control vector, calculating a voltage out-of-limit penalty value corresponding to the current reactive power control vector according to the bus voltage values and a preset voltage constraint range, and performing weighted summation on the corresponding voltage out-of-limit penalty value and the corresponding power distribution network total active power loss value to obtain a fitness evaluation value of the current reactive power control vector; updating the current population according to the fitness evaluation values of the reactive power control vectors to generate a new generation population, and updating the new generation population as the current population.
2. The real-time control method of the power distribution network reactive power based on the synergic simulation according to claim 1, characterized in that, The method comprises the following steps: acquiring rated capacity parameters of each photovoltaic inverter in the power distribution network; for each photovoltaic inverter, calculating a maximum reactive power allowed output value of the current photovoltaic inverter according to the real-time active power values and the rated capacity parameters; determining a reactive power output feasible region of the current photovoltaic inverter based on the maximum reactive power allowed output value; randomly generating a preset population size number of reactive power values within the reactive power output feasible region of the current photovoltaic inverter; combining the reactive power values generated by each photovoltaic inverter according to a preset inverter arrangement order to obtain multiple groups of reactive power control vectors to constitute the initial population.
3. The real-time control method of the power distribution network reactive power based on co-simulation as claimed in claim 2, wherein, The method comprises the following steps: inputting the real-time active load values and the real-time reactive load values into the power distribution network simulation calculation engine to enable the power distribution network simulation calculation engine to configure active power parameters and reactive power parameters of each load node in the power distribution network simulation calculation engine according to the real-time active load values and the real-time reactive load values; The power grid simulation calculation engine is inputted with each reactive power control vector contained in the current population, so that the power grid simulation calculation engine respectively performs single power flow calculation operation according to each reactive power control vector, and generates power grid total active power loss values and bus voltage values corresponding to each reactive power control vector; wherein, in each single power flow calculation operation, the power grid simulation calculation engine respectively configures each reactive power value contained in the current reactive power control vector as a reactive power output parameter of each photovoltaic inverter, and performs power flow calculation.
4. The method of claim 3, wherein the method further comprises: According to the bus voltage values and the preset voltage constraint range, the voltage out-of-limit penalty value corresponding to each reactive power control vector is calculated, and the corresponding voltage out-of-limit penalty value and the corresponding power grid total active power loss value are weighted and summed to obtain the fitness evaluation value of the current reactive power control vector, including: For each reactive power control vector, the voltage out-of-limit component calculation operation is performed on the bus voltage value of each bus node corresponding to the current reactive power control vector, to generate the voltage out-of-limit component of the corresponding bus node; The voltage out-of-limit components of each bus node are accumulated to obtain the voltage out-of-limit penalty value corresponding to the current reactive power control vector; The voltage out-of-limit penalty value is multiplied by a preset penalty weight coefficient to obtain a penalty term value, and the penalty term value is added to the power grid total active power loss value corresponding to the current reactive power control vector to obtain the fitness evaluation value of the current reactive power control vector; The voltage out-of-limit component calculation operation includes: determining whether the bus voltage value of the current bus node is between the preset lower voltage threshold and the preset upper voltage threshold; if yes, the voltage out-of-limit component of the current bus node is determined to be zero; if not, when the bus voltage value of the current bus node exceeds the upper voltage threshold, the first difference absolute value between the bus voltage value of the current bus node and the upper voltage threshold is calculated, and the first difference absolute value is taken as the voltage out-of-limit component of the current bus node; when the bus voltage value of the current bus node is lower than the lower voltage threshold, the second difference absolute value between the bus voltage value of the current bus node and the lower voltage threshold is calculated, and the second difference absolute value is taken as the voltage out-of-limit component of the current bus node.
5. The method of claim 4, wherein the method further comprises: The current population is updated according to the fitness evaluation values of each reactive power control vector to generate a new generation population, and the new generation population is updated as the current population, including: for each reactive power control vector contained in the current population, three reactive power control vectors other than the current reactive power control vector are randomly selected from the current population, and the selected three reactive power control vectors are defined as a reference vector, a first difference vector and a second difference vector, respectively; a difference vector is generated according to the first difference vector and the second difference vector; a weighted difference vector is generated by weighting the difference vector according to a preset scaling factor; vector synthesis operation is performed on the reference vector and the weighted difference vector to generate a mutation vector; binomial crossover operation is performed on the mutation vector and the current reactive power control vector according to a preset crossover probability parameter to generate a trial reactive power control vector; a fitness evaluation value of the trial reactive power control vector is calculated, and the fitness evaluation value of the trial reactive power control vector is compared with a fitness evaluation value of the current reactive power control vector; if the fitness evaluation value of the trial reactive power control vector is better than the fitness evaluation value of the current reactive power control vector, the trial reactive power control vector is selected as a corresponding reactive power control vector in a new generation population, otherwise, the current reactive power control vector is selected as the corresponding reactive power control vector in the new generation population.
6. The method of claim 5, wherein the method further comprises: The vector synthesis operation is performed on the reference vector and the weighted difference vector to generate a mutation vector, including: for each reactive power value contained in the reference vector, an algebraic sum of a current reactive power value and a reactive power difference component at a corresponding position in the weighted difference vector is calculated to generate a mutated reactive power value; the generated mutated reactive power values are combined according to the corresponding positions to generate a mutation vector.
7. The method of claim 6, wherein the method further comprises: The binomial crossover operation is performed on the mutation vector and the current reactive power control vector according to a preset crossover probability parameter to generate a trial reactive power control vector, including: for each reactive power value contained in the mutation vector, a random probability value corresponding to a current reactive power value is generated; it is judged whether the random probability value is less than or equal to the preset crossover probability parameter; if yes, the current reactive power value is determined as a trial reactive power value at the corresponding position; if no, a reactive power value at the corresponding position in the current reactive power control vector is determined as the trial reactive power value at the corresponding position; the generated trial reactive power values are combined according to the corresponding positions to generate a trial reactive power control vector.
8. A real-time control device for reactive power of a distribution network based on co-simulation, characterized in that, including: a data acquisition module, a repeated execution operation module, an iterative optimization module and a power adjustment module; the data acquisition module is configured to acquire real-time active power values of each photovoltaic inverter in a power distribution network, real-time active load values and real-time reactive load values of each load node; the repeated execution operation module is configured to generate an initial population containing multiple groups of reactive power control vectors according to the real-time active power values; the iterative optimization module is repeatedly executed until a current population meets a preset termination condition, and a reactive power control vector with an optimal fitness evaluation value in the current population is selected as a target reactive power control vector; The iterative optimization module is configured to input the real-time active load value, the real-time reactive load value, and each reactive power control vector included in the current population into the power distribution network simulation calculation engine to enable the power distribution network simulation calculation engine to perform power flow calculation, and generate power distribution network total active power loss values and bus voltage values corresponding to each reactive power control vector; the initial population is the initial population; for each reactive power control vector, a voltage out-of-limit penalty value corresponding to the current reactive power control vector is calculated according to the bus voltage value and a preset voltage constraint range, and a weighted sum of the corresponding voltage out-of-limit penalty value and the corresponding power distribution network total active power loss value is performed to obtain a fitness evaluation value of the current reactive power control vector; the current population is updated according to the fitness evaluation values of the reactive power control vectors to generate a new population, and the new population is updated as the current population; The power adjustment module is configured to control each photovoltaic inverter to perform power adjustment according to the target reactive power control vector.
9. An electronic device, comprising: A computer program product includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the power distribution network reactive power real-time control method based on collaborative simulation according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized by The storage medium includes a stored computer program, and when the computer program is running, the device where the storage medium is located is controlled to perform the power distribution network reactive power real-time control method based on collaborative simulation according to any one of claims 1 to 7.
