Reactive compensation control method, device and equipment for new energy station and medium
By combining particle swarm optimization and simulated annealing, the reactive power compensation strategy is dynamically adjusted, which solves the problem of grid voltage instability in wind, solar and energy storage systems, realizes efficient reactive power compensation and stable grid operation of new energy power plants, and improves the system's autonomous reactive power response capability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-17
AI Technical Summary
Traditional reactive power voltage control methods cannot effectively cope with the output power fluctuations of wind, solar and energy storage systems, leading to grid voltage instability or even collapse, affecting the absorption of new energy and the stable operation of the grid.
An adaptive search using particle swarm optimization (PSO) combined with simulated annealing is employed to construct the objective function and constraints of the power grid system. The reactive power compensation strategy is dynamically adjusted, and the global optimal position is determined through iterative solution by generating a particle swarm to achieve reactive power compensation.
It achieves efficient reactive power compensation control for new energy power plants, ensures stable grid operation, enhances the absorption capacity of new energy, strengthens the system's reactive power autonomous response capability, avoids getting trapped in local optima, and improves search efficiency and compensation accuracy.
Smart Images

Figure CN121689073A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid technology, and in particular to a reactive power compensation control method, device, equipment and medium for new energy power plants. Background Technology
[0002] With rapid economic development and continuous population growth, energy demand is constantly rising, putting enormous pressure on the supply of traditional fossil fuels. Simultaneously, their use leads to increasingly serious greenhouse gas emissions and environmental pollution. To address these challenges, the development and utilization of renewable energy sources such as wind and solar power has become an inevitable trend in the global energy transition. Although wind and solar energy resources are abundant, their output power is greatly affected by the natural environment, exhibiting randomness and volatility, which poses challenges to the stability of the power grid and the quality of power supply.
[0003] With the continuous expansion of new energy power plants, the impact of power output fluctuations from wind and solar power on the power grid is becoming increasingly significant, potentially leading to voltage instability or even grid collapse. Traditional reactive power and voltage control methods are no longer suitable for wind-solar-storage systems. To improve the application value of wind-solar-storage systems and ensure the efficient absorption of new energy and stable grid operation, researching and developing new reactive power and voltage control strategies has become an important issue that urgently needs to be addressed. Summary of the Invention
[0004] To address the aforementioned deficiencies, this invention provides a method, device, equipment, and medium for reactive power compensation control at new energy power plants, which can accurately perform reactive power compensation control, ensuring efficient absorption of new energy and stable operation of the power grid.
[0005] This invention provides a reactive power compensation control method for new energy power plants, the method comprising: Generate a particle swarm and initialize the particle swarm; The objective function for the operation of the power grid system is constructed based on the operating data of the power grid system, and the corresponding constraints are determined. Based on the constraints, an adaptive search is performed using the generated particle swarm to iteratively solve the objective function; The reactive power value is determined based on the globally optimal location obtained from the search, and reactive power compensation is performed.
[0006] Preferably, the step of using the generated particle swarm to perform adaptive search based on the constraints and iteratively solving the objective function includes: Identify the set of bad scenarios for reactive power compensation based on the aforementioned constraints; The fitness values of particles in the swarm are calculated based on the bad scenario set, the optimal positions of each particle are updated, and the global optimal position is determined. Based on the objective function, a simulated annealing operation is performed on the global optimal position to update the global optimal position, inertia weight, and the position and velocity of each particle; When the preset maximum number of iterations is reached, the solution ends and the latest global optimal position is output.
[0007] Preferably, when the grid voltage of the power grid system is within a preset operating range, the objective function is: ; Where f1 is the objective function under the first operating condition, P loss The system loss is represented by t, where t represents time t, T is the number of moments within the cycle of the power grid system, and r is the network loss. ij and l ij Let be the squares of the effective resistance and the squares of the effective current of the circuit between node i and node j, respectively; ∆t is the interval time; and φ is the total number of nodes in the power grid system. Preferably, when the grid voltage of the power grid system is less than the minimum value of the operating range, the objective function is: ; Where f2 is the objective function under the second operating condition. Let N be the average voltage deviation of the central nodes in the power grid system, and N be the number of central nodes. Let be the actual voltage amplitude of the k-th central node at time t. Let be the actual voltage amplitude of the k-th central node at time t+1. This represents the maximum allowable voltage amplitude for k central nodes. This represents the minimum allowable voltage amplitude for k central nodes.
[0008] Preferably, the constraints include: power flow equation constraints, upper and lower limits of active and reactive power output of wind turbine generators, upper and lower limits of active and reactive power output of photovoltaic generators, upper and lower limits of active and reactive power output of energy storage SOC, upper and lower limits of reactive power output of SVG, and upper and lower limits of voltage. The power flow equation constraints include: ; The upper and lower limit constraints for the active and reactive power output of the wind turbine generator include: ; The upper and lower limits of the active and reactive power output of the photovoltaic unit include: ; The upper and lower limits of the active and reactive power output of the energy storage SOC include: ; The upper and lower limits of the reactive power output of the SVG include: ; The voltage upper and lower limit constraints include: ; Among them, P j and Q j P represents the active power and reactive power flowing into the j-th node in the power grid system, respectively. wind,j and P pv,j Let Q be the useful power output of wind power and the useful power output of photovoltaic power at the j-th node in the power grid system, respectively. wind,j and Q pv,j These represent the reactive power output from wind power and the reactive power output from photovoltaic power at the j-th node in the power grid system, respectively. and These represent the active power output and absorbed active power of the energy storage at the j-th node in the power grid system, respectively. The reactive power output of the energy storage at the j-th node in the power grid system. and These are the active power output and the active power connected to the j-th node in the power grid system, respectively. and Let g represent the active power output and reactive power connected to the j-th node in the power grid system, respectively; g is the number of nodes including power sources; w is the number of nodes including wind and solar power; and P is the number of nodes including wind and solar power. WT Q represents the active power output of the wind turbine. WT P represents the reactive power output of the wind turbine. WT,max Q represents the upper limit of the active power output of the wind turbine. WT,min Q represents the lower limit of the reactive power output of the wind turbine. WT,max P is the upper limit of the reactive power output of the wind turbine. PV Q represents the active power output of the photovoltaic unit. PV P represents the reactive power output of the photovoltaic unit. PV,max Q represents the upper limit of the active power output of a photovoltaic (PV) unit. PV,min Q represents the lower limit of the reactive power output of a photovoltaic (PV) unit. PV,max Q represents the upper limit of the reactive power output of the photovoltaic unit. SVG Q represents the reactive power output of the SVG. SVG,min Q is the lower limit of the reactive power output of the SVG. SVG,max U is the upper limit of the reactive power output of the SVG. i U is the voltage of the SVG. i,min U is the lower limit of the voltage of the SVG. i,max The upper limit of the voltage of the SVG, SOC ESS For energy storage unit capacity, SOC ESS,min SOC is the lower limit of the capacity of energy storage units. ESS,max P is the upper limit of the energy storage unit capacity. chaESS P is the active power absorbed by energy storage. chamax ESS P is the upper limit of the active power absorbed by energy storage. dis ESS P is the active power output of the energy storage. dismax ESS Q represents the upper limit of the active power output of the energy storage. ESS Q is the reactive power output of the energy storage unit. ESS,min Q represents the lower limit of the reactive power output of the energy storage unit. ESS,max This is the upper limit of the reactive power output of the energy storage unit.
[0009] Preferably, identifying the set of bad scenarios for reactive power compensation based on the constraints includes: Calculate the voltage fluctuation of the reactive power compensation scheme for each scenario under the given constraints; The reactive power compensation scheme in scenarios where voltage fluctuations are not lower than a preset threshold is identified as the bad scenario set for reactive power compensation.
[0010] Preferably, the step of calculating the fitness values of particles in the swarm based on the bad scene set, updating the optimal position of each particle, and determining the global optimal position includes: During the k-th iteration, the sum of penalties for each reactive power compensation scheme in the bad scenario set is minimized as the fitness function to calculate the fitness. The optimal position is determined by the calculated fitness of each particle at the k-th iteration. The global optimal position is determined based on the optimal position of each particle.
[0011] Preferably, the step of performing simulated annealing on the global optimal position to update the global optimal position, inertia weight, and the position and velocity of each particle includes: At different temperatures, the old state of each particle's current position before iteration and the new state of its new position after iteration are determined according to the objective function. When the old state is not better than the new state, accept the new state and determine the solution corresponding to the new position as the group optimal solution for the next stage; when the old state is better than the new state, calculate the acceptance probability based on the new state and the old state, and generate a random number within a preset range; when the generated random number is less than the acceptance probability, do not accept the new state as the group optimal solution for the next stage of particles; when the generated random number is not less than the acceptance probability, accept the new state as the group optimal solution for the next stage of particles. The inertia weights are updated using a preset decreasing trend model based on the voltage fluctuations, reactive power compensation requirements, and iteration count of the power grid system. Combining the updated inertia weights, the current individual optimal position, the current global optimal position, the preset search direction, and the preset search step size, the new velocity of the particle is calculated according to the preset velocity update formula; The particle position is updated according to a preset position update formula, taking into account the particle's new velocity, search direction, and search step size.
[0012] This invention also provides a reactive power compensation control device for new energy power plants, the device comprising: An initialization module is used to generate a particle swarm and initialize the particle swarm. The construction module is used to construct the objective function of the power grid system based on the operating data of the power grid system, and to determine the corresponding constraints. The search module is used to perform adaptive search using the generated particle swarm according to the constraints, and to iteratively solve the objective function; The compensation module is used to determine the reactive power value based on the globally optimal location obtained from the search, and to perform reactive power compensation.
[0013] This invention also provides a terminal 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 reactive power compensation control method for new energy power plants as described in any of the above embodiments.
[0014] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the reactive power compensation control method for new energy power plants as described in any of the above embodiments.
[0015] The present invention provides a method, apparatus, equipment, and medium for reactive power compensation control at renewable energy power plants. This method involves generating and initializing a particle swarm; constructing an objective function for the operation of the power grid system based on its operational data and determining corresponding constraints; using the generated particle swarm to perform an adaptive search based on these constraints to iteratively solve the objective function; and determining the reactive power value based on the globally optimal location obtained from the search for reactive power compensation. This solution can accurately control reactive power compensation, ensuring efficient absorption of renewable energy and stable operation of the power grid. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a reactive power compensation control method for a new energy power station provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the principle of the reactive power compensation control method for new energy power plants provided in this embodiment of the invention. Figure 3 This is a schematic diagram of the reactive power compensation control device for new energy power stations provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation
[0017] 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.
[0018] See Figure 1 This is a flowchart illustrating a reactive power compensation control method for a new energy power station according to an embodiment of the present invention. The method includes steps S1 to S4: Step S1: Generate a particle swarm and initialize the particle swarm; Step S2: Construct the objective function for the operation of the power grid system based on the operating data of the power grid system, and determine the corresponding constraints; Step S3: Based on the constraints, the generated particle swarm is used for adaptive search to iteratively solve the objective function; Step S4: Determine the reactive power value based on the globally optimal location obtained from the search, and perform reactive power compensation.
[0019] In this specific implementation, a particle swarm is generated: based on the solution requirements of the reactive power compensation problem in the power grid system, a certain number of particles are generated, each representing a potential reactive power compensation scheme. The particle's position corresponds to key parameters such as the reactive power output value. Each particle is assigned an initial position and velocity. The initial position is randomly selected within the maximum and minimum range of reactive power compensation that renewable energy power plants can participate in, while the initial velocity is set within a reasonable range based on the problem characteristics, ensuring that the particle swarm has a certain degree of diversity in the initial stage, providing a broad foundation for subsequent searches.
[0020] The specific steps for generating a random particle swarm and initializing the particle swarm are as follows: During initialization, the following set of particles is randomly created. ; in, It is a random number uniformly distributed between [0,1]. Although each element satisfies the inequality constraints, the equality constraint problem still needs to be solved. To solve this problem, an equality constraint handling strategy is needed. After creating the initial position for each particle, the velocity of each particle is also randomly generated.
[0021] The formula for updating the particle swarm velocity in the particle swarm algorithm is: ; In the formula: v id k x is the velocity value of the i-th particle in the d-th dimension and the k-th generation. id k p is the position of the i-th particle in the d-th dimension and the k-th generation. id k Let g be the optimal position of the i-th particle in the d-th dimension in the k-th generation. d k Let w be the global optimal position of the d-th dimension of the particle swarm in the k-th generation, w be the inertial weight of the particle, c1 be the weight coefficient of the particle tracking its own historical best value, and c2 be the weight coefficient of the particle for its historical best value.
[0022] The objective function is constructed based on the power grid system's operational data, aiming to maintain system voltage stability and reduce network losses. For example, objectives could include controlling voltage fluctuations within allowable limits and minimizing reactive power transmission losses. These objectives are then combined to form the objective function, the value of which reflects the merits of the reactive power compensation scheme. The constraints mainly include the maximum and minimum values of reactive power that renewable energy power plants can participate in reactive power compensation, voltage fluctuation thresholds, and upper and lower limits of reactive power output. These constraints ensure that the reactive power values obtained from the search are within the feasible range for actual power grid system operation.
[0023] An adaptive search is performed based on the generated particle swarm and the constraints.
[0024] For example, the search direction is guided by the current voltage value of the renewable energy power station. When the real-time voltage fluctuation is greater than a threshold, the search direction leans towards increasing reactive power output; when the voltage fluctuation is less than or equal to the threshold, the search direction leans towards decreasing reactive power output. The search step size is dynamically adjusted according to the scenario and constraints. When the voltage fluctuation is large, a smaller step size is set closer to side A; when the fluctuation is small, a smaller step size is set closer to side C. Particle swarm optimization is used for iterative solution. In each iteration, simulated annealing is combined to update the global optimal position, inertia weight, and the position and velocity of each particle. Through continuous iteration, the particle swarm gradually approaches the optimal solution of the objective function until the iteration termination condition is met, such as reaching the maximum number of iterations or the objective function value converges.
[0025] Based on the reactive power value corresponding to the optimal location obtained through the search, the reactive power compensation equipment, such as the grid-type SVG system, is controlled to output the corresponding reactive power to achieve reactive power compensation for the power grid system and maintain system voltage stability. Specifically, the optimal reactive power value is processed through voltage loop, current loop, Park transformation, SPWM modulation, and other stages to be converted into an actual control signal to drive the SVG system.
[0026] By employing adaptive particle swarm optimization (PSO) and dynamically adjusting the search direction and step size based on the real-time operation of the power grid system, the optimal reactive power value satisfying the objective function can be accurately found. This makes reactive power compensation more aligned with the actual needs of the system and improves compensation accuracy. The adaptive search rules allow the PSO to focus on more promising regions during the search process, avoiding ineffective searches. Simultaneously, the introduction of simulated annealing helps to escape local optima, and combined with dynamic adjustment of inertia weights, accelerates the convergence speed of the objective function, improving overall search efficiency. This enables accurate reactive power compensation control, ensuring efficient absorption of new energy sources and stable grid operation.
[0027] In yet another embodiment provided by the present invention, step S2 specifically includes: Based on constraints, a set of adverse scenarios is identified from power grid operation data to clarify optimization objectives. Based on power grid system constraints, such as voltage fluctuation thresholds and reactive power compensation limits, operational scenarios that do not meet these constraints are selected, forming a set of adverse scenarios. Among these scenarios, reactive power compensation schemes may lead to problems such as voltage instability and exceeding equipment capacity, making them key areas for optimization.
[0028] After initializing the particle swarm, the particle fitness is calculated for the bad scenario set, and the individual optimal positions and the initial global optimal positions are updated. For the bad scenario set, the fitness value of each particle in the swarm is calculated. The fitness value reflects the performance of the particle, i.e., the reactive power compensation scheme, in the bad scenario; the lower the value, the better the scheme. The individual optimal positions of each particle are updated according to the fitness values, its own historical optimal solution is retained, and the current global optimal position is determined from all individual optimal positions.
[0029] Simulated annealing is performed on the global optimal position based on the objective function, updating the global optimal position, inertia weights, and particle positions and velocities before proceeding to the next iteration. The objective function is used as the evaluation criterion to perform simulated annealing on the current global optimal position. If the new position is better and the objective function value is lower, it is accepted directly; if it is worse, acceptance probability is used to determine whether to accept it, avoiding getting trapped in local optima. Simultaneously, the global optimal position, inertia weights, and the positions and velocities of each particle are updated based on the simulated annealing results, guiding the particle swarm towards a better solution.
[0030] Repeat the iterative process until the maximum number of iterations is reached, and use the reactive power value corresponding to the final global optimal position for reactive power compensation. When the number of iterations reaches the preset maximum value, stop the search, use the reactive power value corresponding to the final global optimal position as the optimal compensation plan, and drive the reactive power compensation device to operate the grid-connected SVG to achieve stable operation of the power grid.
[0031] In another embodiment provided by the present invention, when determining the objective function, specifically: When the power grid system is in a normal operating state, in order to improve the economy during the operation of the new energy power station, the network loss should be minimized and compensated accordingly.
[0032] When the grid voltage Ug meets the preset range, for example, 0.9Un < Ug < 1.1Un, that is, when the power grid is operating normally, Ug is the preset normal voltage.
[0033] ; Among them, f1 is the objective function under the first operating condition, P loss is the system network loss, t represents the time t, T is the number of moments within the cycle of the power grid system, r ij and l ij are respectively the square of the effective resistance of the circuit between node i and node j and the square of the effective current, ∆t is the interval time, and φ is the total number of nodes in the power grid system; When the grid voltage is less than 0.9Un, that is, there is a large amount of reactive power deficit in the power grid and the grid voltage drops; at this time, in order to provide a certain support for the power grid and minimize the voltage fluctuation of each node, reactive power compensation is performed with this objective function The objective function is: ; Among them, f2 is the objective function under the second operating condition, is the average voltage deviation of the central nodes of the power grid system, N is the number of central nodes, is the actual voltage amplitude of the kth central node at time t, is the actual voltage amplitude of the kth central node at time t + 1, is the maximum allowable voltage amplitude of the k central nodes, is the minimum allowable voltage amplitude of the k central nodes.
[0034] In another embodiment provided by the present invention, the constraint conditions include: power flow equation constraint, upper and lower limits of active and reactive power output of wind turbines, upper and lower limits of active and reactive power output of photovoltaic units, upper and lower limits of active and reactive power output of energy storage SOC, upper and lower limits of reactive power output of SVG, and upper and lower limits of voltage; Specifically, the constraints of the power flow equations can be obtained from the power flow equations: ; Among them, P j and Q j P represents the active power and reactive power flowing into the j-th node in the power grid system, respectively. wind,j and P pv,j Let Q be the useful power output of wind power and the useful power output of photovoltaic power at the j-th node in the power grid system, respectively. wind,j and Q pv,j These represent the reactive power output from wind power and the reactive power output from photovoltaic power at the j-th node in the power grid system, respectively. and These represent the active power output and absorbed active power of the energy storage at the j-th node in the power grid system, respectively. The reactive power output of the energy storage at the j-th node in the power grid system. and These are the active power output and the active power connected to the j-th node in the power grid system, respectively. and These represent the active power output and reactive power connected to the j-th node in the power grid system, respectively; g represents the number of nodes including power sources; and w represents the number of nodes including wind and solar power.
[0035] The upper and lower limit constraints for the active and reactive power output of the wind turbine generator include: ; The upper and lower limits of the active and reactive power output of the photovoltaic unit include: ; The upper and lower limits of the active and reactive power output of the energy storage SOC include: ; The upper and lower limits of the reactive power output of the SVG include: ; The voltage upper and lower limit constraints include: ; Among them, P WT Q represents the active power output of the wind turbine. WT P represents the reactive power output of the wind turbine. WT,max Q represents the upper limit of the active power output of the wind turbine. WT,min Q represents the lower limit of the reactive power output of the wind turbine. WT,max P is the upper limit of the reactive power output of the wind turbine. PV Q represents the active power output of the photovoltaic unit. PV P represents the reactive power output of the photovoltaic unit. PV,max Q represents the upper limit of the active power output of a photovoltaic (PV) unit. PV,minQ represents the lower limit of the reactive power output of a photovoltaic (PV) unit. PV,max Q represents the upper limit of the reactive power output of the photovoltaic unit. SVG Q represents the reactive power output of the SVG. SVG,min Q is the lower limit of the reactive power output of the SVG. SVG,max U is the upper limit of the reactive power output of the SVG. i U is the voltage of the SVG. i,min U is the lower limit of the voltage of the SVG. i,max The upper limit of the voltage of the SVG, SOC ESS For energy storage unit capacity, SOC ESS,min SOC is the lower limit of the capacity of energy storage units. ESS,max P is the upper limit of the energy storage unit capacity. cha ESS P is the active power absorbed by energy storage. chamax ESS P is the upper limit of the active power absorbed by energy storage. dis ESS P is the active power output of the energy storage. dismax ESS Q represents the upper limit of the active power output of the energy storage. ESS Q is the reactive power output of the energy storage unit. ESS,min Q represents the lower limit of the reactive power output of the energy storage unit. ESS,max This is the upper limit of the reactive power output of the energy storage unit.
[0036] In another embodiment of the present invention, the process of identifying a set of bad scenarios for reactive power compensation specifically includes: Calculate the voltage fluctuation of the reactive power compensation scheme for each scenario under the given constraints; Due to the uncertainties in wind and solar power generation, let Λ be the set of all possible wind and solar power generation scenarios. For any scenario... ,in, In the context Wind and solar power generation within the next time period t are compared with the normal value P. tw Possible fluctuations, assuming Indicating wind and solar power generation scenarios Under the reactive power compensation scheme P, voltage fluctuations may occur in certain scenarios. The value will become extremely large.
[0037] The reactive power compensation scheme in scenarios where voltage fluctuations are not lower than a preset threshold is identified as the bad scenario set for reactive power compensation.
[0038] Given a threshold B, scenarios where voltage fluctuations are not lower than B are termed bad scenarios. For a reactive power compensation scheme P, the set of bad scenarios is defined as follows: .
[0039] In another embodiment of the present invention, the step of calculating the fitness values of particles in the swarm based on the bad scene set, updating the optimal position of each particle, and determining the global optimal position includes: During the k-th iteration, the sum of penalties for each reactive power compensation scheme in the bad scenario set is minimized as the fitness function to calculate the fitness. The optimal position is determined by the calculated fitness of each particle at the k-th iteration. The global optimal position is determined based on the optimal position of each particle.
[0040] In this specific implementation, during the k-th iteration, the set of bad scenarios is used as the core. The sum of penalties for each reactive power compensation scheme represented by each particle within the bad scenario set is used as the fitness function. The penalty value is closely related to the constraints. When a scheme violates the constraints, a corresponding penalty value is assigned according to the degree of violation; the more severe the violation, the larger the penalty value. The goal of the fitness function is to minimize this sum of penalties. This means that the lower the fitness value, the better the reactive power compensation scheme corresponding to the particle performs in the bad scenario set, the better it meets the constraints, and thus the more suitable it is as a candidate scheme for optimization.
[0041] At the start of the k-th iteration, the identified bad scenario set is extracted. For each particle in the particle swarm, the reactive power compensation scheme corresponding to its position is applied to each scenario in the bad scenario set. Based on the constraints, it is determined whether the scheme violates the constraints. For scenarios that violate the constraints, the corresponding penalty value is calculated. The penalty values of all bad scenarios are summed to obtain the fitness value of the particle.
[0042] Based on the calculated fitness value, the best previous position at the k-th iteration is determined as the optimal position for each particle. For a single particle, the fitness values corresponding to all previous positions are retained throughout its historical iterations. By comparing these fitness values, the position with the smallest fitness value is determined as the optimal position for that particle at the k-th iteration. This process reflects the particle's memory and retention of its own historical optimal solutions, ensuring that the particle can evolve in a better direction. For each particle, retrieve its position and corresponding fitness value in all iteration steps before the k-th iteration. Compare these fitness values with the fitness value calculated in the k-th step, and select the position with the smallest fitness value as the optimal position of the particle in the k-th iteration.
[0043] After determining the optimal position for each particle, the position with the smallest fitness value is selected from all the optimal positions and determined as the global optimal position at the k-th iteration. The global optimal position represents the best reactive power compensation scheme found by the current particle swarm in the bad scenario set. It is the stage-optimal solution in the entire particle swarm search process and provides the basis for subsequent simulated annealing operations, parameter updates, etc.
[0044] Collect the optimal positions of all particles and their corresponding fitness values at the k-th iteration. Sort these fitness values and find the position with the smallest fitness value. This position is the global optimal position of the particle swarm at the k-th iteration. The reactive power compensation model for adverse scenarios is constructed by minimizing the total penalty across these adverse scenarios. The penalty for an individual adverse scenario is determined by voltage fluctuations. It is calculated as the square of the deviation from the B value. For compensation scheme P, relative to... The total penalty is The sum of penalties for all individual scenarios ; The fitness is calculated by minimizing the sum of penalties for each reactive power compensation scheme in the bad scenario set as the fitness function; To address this problem characterized by non-differentiability, high dimensionality, and multiple constraints, this embodiment develops a novel algorithm. Traditional particle swarm optimization (PSO) uses a group of particles to search the entire space, with each particle representing a feasible solution to the equation. The mass of each particle is evaluated by its fitness function. In each iteration, the particle moves towards the optimal position in the algorithm until a solution is accepted after multiple iterations. However, PSO is prone to getting trapped in local optima, thus failing to find the optimal solution. Therefore, this patent introduces an annealing rule to avoid getting trapped in local optima and improve the reactive power compensation effect.
[0045] During the k-th iteration, the set of bad scenarios for feasible solutions is first determined. As the fitness function, let and The best previous position of particle n and the best previous position in the group at iteration k; In another embodiment of the present invention, the step of performing simulated annealing on the global optimal position to update the global optimal position, inertia weight, and the position and velocity of each particle includes: At different temperatures, the old state of each particle's current position before iteration and the new state of its new position after iteration are determined according to the objective function. When the old state is not better than the new state, accept the new state and determine the solution corresponding to the new position as the group optimal solution for the next stage; when the old state is better than the new state, calculate the acceptance probability based on the new state and the old state, and generate a random number within a preset range; when the generated random number is less than the acceptance probability, do not accept the new state as the group optimal solution for the next stage of particles; when the generated random number is not less than the acceptance probability, accept the new state as the group optimal solution for the next stage of particles. The inertia weights are updated using a preset decreasing trend model based on the voltage fluctuations, reactive power compensation requirements, and iteration count of the power grid system. Combining the updated inertia weights, the current individual optimal position, the current global optimal position, the preset search direction, and the preset search step size, the new velocity of the particle is calculated according to the preset velocity update formula; The particle position is updated according to a preset position update formula, taking into account the particle's new velocity, search direction, and search step size.
[0046] In this embodiment, the simulated annealing operation is based on the principle of thermodynamic annealing. By comparing the old and new states of the global optimum at different temperatures, the global optimum is optimized. When the old state (i.e., the objective function value corresponding to the particle's current position before iteration) is not better than the new state (i.e., the objective function value corresponding to the new position after iteration), the new state is directly accepted to ensure that the search proceeds in a better direction. When the old state is better than the new state, the new state is not directly discarded. Instead, the acceptance probability is calculated, which is related to the difference in objective function values between the old and new states and the current temperature, and combined with random numbers to determine whether to accept it. This helps to escape local optima and enhance the globality of the search.
[0047] At different temperatures, the old state of the particle's current position before the iteration and the new state of the new position after the iteration are calculated based on the objective function. If the old state is not better than the new state, the new state is accepted and the new position is set as the group's optimal solution for the next stage; if the old state is better than the new state, the acceptance probability is calculated, and a random number between 0 and 1 is generated. When the random number is less than the acceptance probability, the global optimal position is not updated; otherwise, the new state is accepted and the global optimal position is updated.
[0048] Based on the voltage fluctuation data of the power grid system, the reactive power compensation demand parameters, and the current iteration number, the inertia weight is calculated and updated by substituting it into the preset decreasing trend model.
[0049] The update of the inertia weight is closely related to the real-time operating status and iterative process of the power grid system. Based on a pre-defined decreasing trend model, and taking into account voltage fluctuations, reactive power compensation requirements, and the number of iterations, the inertia weight decreases as the iteration progresses. A larger inertia weight in the initial stage is beneficial for the particle swarm to conduct global exploration, while a smaller inertia weight in the later stage helps to focus on local optimization and improve convergence accuracy.
[0050] Velocity updates are based on a preset formula, incorporating updated inertia weights, the current optimal individual position, the current global optimal position, and preset search direction and step size. This allows particle velocities to both inherit historical information and adjust towards better solutions. Position updates, on the other hand, are based on the new velocity, combined with the search direction and step size, and adjusted within feasible limits according to a preset formula to ensure particles move towards better solutions.
[0051] The updated inertia weights, the current individual optimal position, the current global optimal position, and the preset search direction (guided by voltage fluctuations) and search step size (adjusted according to scene constraints) are substituted into the preset velocity update formula to calculate the new velocity of each particle.
[0052] By combining the particle's new velocity with the preset search direction and search step size, and substituting it into the preset position update formula, the particle position is updated to ensure that the new position is within the range of feasible solutions.
[0053] First, at temperature T, assuming the current position is i, the particle's state is E. i The new position is j, and the particle's state is E. i If E j <E i If E j >E i Then calculate the acceptance probability. A random number a is generated that is greater than or equal to 0 and less than 1. If a < p, the state is not accepted as the swarm optimal solution for the next stage of particles. If a > p, the state is accepted as the swarm optimal solution for the next stage of particles.
[0054] In scenario-oriented adaptive search rules, the search direction is guided by the value of the current wind power generation scenario, and the search step size is dynamically adjusted according to the scenario and constraints.
[0055] In scenario-oriented adaptive search rules, the search direction is guided by the current voltage value of the renewable energy power station, and the search step size is dynamically adjusted according to the scenario and constraints. See also Figure 2 This is a schematic diagram illustrating the principle of the reactive power compensation control method for new energy power plants provided in this embodiment of the invention. Line segment AC represents the current solution Q. i The neighborhood of [Q] - i,t Q + i,t Point B represents the current solution Q. i,t Point A is the left boundary of the neighborhood, and point C is the right boundary of the neighborhood.
[0056] If the real-time voltage fluctuation over time period t exceeds the threshold, then the current error λ tIf λ > 0, the reactive power output of reactive power compensation should be increased to maintain system voltage stability. A better solution would be closer to point A. Therefore, the search direction is from point A to point B. Conversely, λ... t If the value is less than 0, the reactive power output of the SVG should be reduced. A better solution would be closer to point C, therefore the search direction should be from point C to point B.
[0057] Furthermore, for larger λ t (λ t A value greater than 0 indicates a better solution closer to point A, and a smaller search step size should be set. Let ΔQ t ii In scene λ t The search step size for the current solution. For a smaller λ t (λ t A value <0 indicates a better solution closer to point C; therefore, a smaller ΔQ should be set. t iu value.
[0058] Here, the search direction and step size are adaptively and dynamically adjusted according to the changes in the grid connection point voltage. Let J be the maximum number of searches within the neighborhood.
[0059] For a grid-type SVG system, the d-axis voltage reference value U is first obtained from the reactive voltage compensation value calculated by the above function. dref and q-axis voltage reference value U qref After passing through the voltage loop and current loop, ud and uq are obtained. After park transformation, SPWM modulation is performed to obtain the SPWM waveform. The phase angle information required during park transformation is obtained according to the virtual synchronous machine control method.
[0060] As one implementation method, the initial temperature is set at 80 degrees. After iterating 100 times at each temperature, the temperature is reduced by 0.5 degrees to ensure that, while maintaining the computational speed, all particles can traverse as many places as possible within the constraint space, thus avoiding the occurrence of getting trapped in local optima.
[0061] Check if the current iteration count is greater than the maximum iteration count; if so, exit the loop.
[0062] In traditional SVG-controlled renewable energy systems, the particle swarm optimization algorithm is prone to getting trapped in local optima, resulting in insufficient reactive power autonomous response capability during voltage dips or rises. Specifically, as the voltage dip lessens, the system's reactive power autonomous response capability also weakens, making it unable to perform effective reactive power autonomous response when the voltage approaches or just enters the low-voltage crossing region.
[0063] By employing the improved particle swarm optimization (PSO) algorithm-based reactive power compensation strategy proposed in this invention, the system's autonomous reactive power response capability is significantly enhanced even when the coupling point voltage experiences varying degrees of fluctuation and rise. Compared to the method without this invention, the improved strategy significantly reduces the inadequacy of reactive power response, meeting the system's requirements for autonomous reactive power response. Furthermore, when the fluctuation of the coupling point voltage exceeds a set threshold or enters a variable coefficient range, the autonomous reactive power response capability is further enhanced as the degree of voltage rise decreases, ensuring that the system can achieve the required autonomous reactive power response.
[0064] This invention also provides a reactive power compensation control device for new energy power plants, see [link to relevant documentation]. Figure 3 This is a schematic diagram of the reactive power compensation control device for new energy power plants provided in an embodiment of the present invention. The device includes: An initialization module is used to generate a particle swarm and initialize the particle swarm. The construction module is used to construct the objective function of the power grid system based on the operating data of the power grid system, and to determine the corresponding constraints. The search module is used to perform adaptive search using the generated particle swarm according to the constraints, and to iteratively solve the objective function; The compensation module is used to determine the reactive power value based on the globally optimal location obtained from the search, and to perform reactive power compensation.
[0065] It should be noted that the reactive power compensation control device for new energy power plants provided in the embodiments of the present invention can execute the reactive power compensation control method for new energy power plants described in any of the above embodiments. The specific functions of the reactive power compensation control device for new energy power plants will not be elaborated here.
[0066] See Figure 4 This is a schematic diagram of a terminal device provided in an embodiment of the present invention. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a reactive power compensation control program for a new energy power station. When the processor executes the computer program, it implements the steps in the above-described embodiments of the reactive power compensation control methods for new energy power stations, for example... Figure 1 The steps S1 to S4 are shown. Alternatively, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments.
[0067] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing functions, which describe the execution process of the computer program in the terminal device. For example, the computer program can be divided into various modules, the specific functions of which will not be elaborated again.
[0068] The terminal device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.
[0069] 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.
[0070] 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, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, 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 (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0071] Wherein, if the modules / units integrated in the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in code form, object code form, executable file, or some intermediate form, etc. The computer-readable medium can 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.
[0072] 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 method for reactive power compensation control of a new energy station, characterized in that, The method comprises: generating a particle swarm and initializing the particle swarm; constructing a target function of operation of the power grid system according to operation data of the power grid system and determining corresponding constraint conditions; performing adaptive search on the target function by using the generated particle swarm according to the constraint conditions and iteratively solving the target function; determining a reactive power value according to a global optimal position obtained by the search and performing reactive power compensation.
2. The method of claim 1, wherein, The adaptive search on the target function by using the generated particle swarm according to the constraint conditions and the iteratively solving the target function comprise: identifying a bad scenario set of the reactive power compensation according to the constraint conditions; calculating fitness values of particles in the population according to the bad scenario set, updating optimal positions of the particles, and determining a global optimal position; performing a simulated annealing operation on the global optimal position according to the target function, updating the global optimal position, an inertia weight, and positions and speeds of the particles; when a preset maximum number of iterations is reached, the solving is ended, and the latest global optimal position is output.
3. The method of claim 1, wherein, When a grid voltage of the power grid system is within a preset operation range, the target function is: ; Wherein, f1 is the target function under the first operating condition, P loss is the system loss, t represents the t time, T is the number of time in the power grid system period, r ij and l ij are the square of the resistance effective value and the square of the current effective value of the circuit between node i and node j respectively, and Δt is the interval time, and φ is the total number of nodes in the power grid system.
4. The method of claim 1, wherein, When the grid voltage of the power grid system is less than a minimum value of the operation range, the target function is: ; Wherein, f2 is the target function under the second operating condition, is the average voltage deviation of the hub nodes in the power grid system, N is the number of hub nodes, t represents the t time, T is the number of time in the power grid system cycle, is the actual voltage amplitude of the kth hub node at t time, is the actual voltage amplitude of the kth hub node at t+1 time, is the maximum value of the allowable voltage amplitude of the k hub nodes, is the minimum value of the allowable voltage amplitude of the k hub nodes.
5. The method of claim 2, wherein, The constraint conditions comprise: a power flow equation constraint, an upper and lower limit constraint of active and reactive power output of a wind turbine generator, an upper and lower limit constraint of active and reactive power output of a photovoltaic generator, an upper and lower limit constraint of active and reactive power output of a storage energy SOC, an upper and lower limit constraint of reactive power output of an SVG, and a voltage upper and lower limit constraint. The identifying the bad scenario set of the reactive power compensation according to the constraint conditions comprises: calculating voltage fluctuations of reactive power compensation schemes of each scenario under wind power and photovoltaic power generation scenarios according to the constraint conditions; determining the reactive power compensation scheme under a scenario with a voltage fluctuation not less than a preset threshold as the bad scenario set of the reactive power compensation.
6. The method of claim 2, wherein, The calculating fitness values of the particles in the population according to the bad scenario set, updating the optimal positions of the particles, and determining the global optimal position comprise: minimizing a sum of penalties of each reactive power compensation scheme in the bad scenario set as a fitness function to calculate fitness when performing k-step iteration; determining a best previous position of each particle at the k-step iteration as the optimal position according to the calculated fitness; determining the global optimal position according to the optimal positions of the particles.
7. The method of claim 1, wherein, The performing the simulated annealing operation on the global optimal position, updating the global optimal position, the inertia weight, and the positions and speeds of the particles comprise: determining an old state of a current position of each particle before iteration and a new state of a new position after iteration according to the target function at different temperatures; when the old state is not better than the new state, accepting the new state and determining a solution corresponding to the new position as a population optimal solution of a next stage; when the old state is better than the new state, calculating an acceptance probability according to the new state and the old state and generating a random number in a preset range; when the generated random number is less than the acceptance probability, not accepting the new state as the population optimal solution of the next stage particle; when the generated random number is not less than the acceptance probability, accepting the new state as the population optimal solution of the next stage particle; The inertia weight is updated according to a preset decreasing trend model based on voltage fluctuation of the power grid system, reactive power compensation demand, and iteration number; A new speed of the particle is calculated according to a preset speed updating formula based on the updated inertia weight, current individual optimal position, current global optimal position, and preset search direction and preset search step length; The particle position is updated according to a preset position updating formula based on the new speed of the particle and the search direction and the search step length.
8. A reactive power compensation control device for a new energy station, characterized in that, The device comprises: An initialization module configured to generate a particle swarm and initialize the particle swarm; A construction module configured to construct a target function of operation of the power grid system according to operation data of the power grid system and determine corresponding constraint conditions; A search module configured to perform adaptive search according to the generated particle swarm based on the constraint conditions and iteratively solve the target function; A compensation module configured to determine a reactive power value based on a global optimal position obtained by the search and perform reactive power compensation.
9. A terminal device, comprising: The computer readable storage medium comprises a stored computer program, wherein the computer program, when executed, controls a device in which the computer readable storage medium is located to perform the new energy station reactive power compensation control method.
10. A computer readable storage medium characterized by, The computer readable storage medium comprises a stored computer program, wherein the computer program, when executed, controls a device in which the computer readable storage medium is located to perform the new energy station reactive power compensation control method.