Power system virtual inertia configuration method and device, terminal equipment and storage medium
By constructing a virtual inertia optimization allocation model using the bat algorithm, the problem of power grid inertia decline caused by the high proportion of new energy penetration was solved, thereby improving the frequency stability and economic efficiency of the power system and optimizing the allocation of virtual inertia.
Patent Information
- Application Number
- CN202510931893.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-28
AI Technical Summary
The high penetration of new energy sources leads to a decrease in the grid inertia level and a weakening of the system's frequency and voltage regulation capabilities. Existing technologies make it difficult to simultaneously maximize economic benefits and virtual inertia configuration efficiency.
A virtual inertia optimization allocation model is constructed using the bat algorithm. By minimizing the total investment cost and maximizing the frequency stability index, virtual inertia is allocated. Taking into account power system parameters and the total amount of virtual inertia, an objective function and constraints are constructed to optimize the allocation of virtual inertia for each unit.
This technology maximizes frequency stability while minimizing total investment costs, improves the frequency stability and economic efficiency of the power system, and fills the technical gap in virtual inertia configuration in existing technologies.
Smart Images

Figure CN120855392A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power systems, and more particularly to a method, apparatus, terminal equipment, and storage medium for configuring virtual inertia in power systems. Background Technology
[0002] The high penetration of new energy sources poses significant challenges to the frequency security and stable operation of the power grid. New energy generating units are connected to the power system through power electronic devices, replacing traditional synchronous generators. This results in a significant decrease in system inertia, making it unable to actively provide inertia support to the grid during active power deficit disturbances. Inertia represents the power system's resistance to frequency changes, while inertia is a quantitative measure of inertia. A sharp decrease in inertia drastically weakens the system's frequency and voltage regulation capabilities, reduces its disturbance immunity, worsens its stability, and increases the likelihood of frequency security incidents.
[0003] To address the challenge posed by insufficient inertia from renewable energy sources to power system frequency stability, scholars both domestically and internationally have proposed the concept of virtual inertia. The total resources of virtual inertia are limited, and the mechanism by which its distribution within the system affects frequency is complex. The allocation of virtual inertia values influences its efficiency in frequency stability. Simultaneously, power systems must consider economic efficiency. Current technologies lack solutions for configuring virtual inertia with economic considerations in mind. Therefore, maximizing both economic benefits and the efficiency of virtual inertia configuration simultaneously has become a pressing issue. Summary of the Invention
[0004] This invention provides a method, apparatus, terminal equipment, and storage medium for configuring virtual inertia in a power system, which can address the technical gap in the prior art regarding virtual inertia configuration that considers economic benefits.
[0005] An embodiment of the present invention provides a method for configuring virtual inertia in a power system, comprising:
[0006] Obtain the power system parameters and the total virtual inertia of the power system; wherein, the power system parameters include: the total power deficit at the initial moment of the disturbance, the rated frequency of the system, the total rated capacity of traditional generator sets, the total rated capacity of new energy generator sets, and the rotor frequency of all generator sets;
[0007] Based on the power system parameters and the total virtual inertia, with the goal of minimizing the total investment cost and maximizing the frequency stability index, an objective function for the virtual inertia optimization allocation model is constructed, along with critical inertia constraints, system frequency change rate constraints, maximum frequency deviation constraints, and system steady-state frequency deviation constraints for building the virtual inertia optimization allocation model; wherein, the frequency stability index is used to measure the stability of the frequency change rate of the power system's inertia level in the initial stage after being disturbed;
[0008] Under the constraints of critical inertia, system frequency change rate, maximum frequency deviation, and system steady-state frequency deviation, the objective function of the virtual inertia optimization allocation model is solved using the bat algorithm to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized.
[0009] Virtual inertia is configured based on the target virtual inertia of each unit.
[0010] Furthermore, the expression for the objective function is:
[0011]
[0012] C = C u +C p ;
[0013] C u =r w ·X w ·∑H w +r l ·X l ·∑H l +r n ·X n ·∑H n ;
[0014] C p =C m +C d +C r ;
[0015]
[0016] Where r C r is the normalization coefficient for total investment cost. I α is the normalized coefficient of the frequency stability index; α and β are Cauchy-type frequency stability parameters, with β being a positive even number; a and σ are normal-type investment cost parameters; C represents the total investment cost; I represents the frequency stability index; C u Indicates the total investment cost on the load side; C p This represents the total investment cost for power generation; r w X represents the power generation cost coefficient of a photovoltaic power plant; w This represents the normalized stability index of the electricity provided by a photovoltaic power plant; ∑H w This represents the total virtual inertia of a photovoltaic power station; r l X represents the power generation cost coefficient of a wind farm; l This represents the normalized stability index of the electricity provided by a wind farm; ∑H l This represents the total virtual inertia of a wind farm; r n X represents the power generation cost coefficient of an energy storage power station; nThis represents the normalized stability index of the electrical energy provided by the energy storage power station; ∑H n C represents the total virtual inertia of the energy storage power station; m Indicates material cost; C d Indicates the cost of disposal; C r Indicates operation and maintenance costs; H all H represents the total virtual inertia of the power system; min To meet the minimum total virtual inertia required for power system stability; H i The virtual inertia of the i-th generator unit is represented by ΔP; ΔP represents the total power deficit at the initial moment of the disturbance; f s Indicates the system's rated frequency; S G S represents the total rated capacity of a traditional generator set. S Indicates the total rated capacity of new energy generator sets; f i f represents the rotor frequency of the i-th generator set; ctl The frequency of inertia is represented by N; the total number of generator sets is represented by N; and time is represented by t.
[0017] Furthermore, the expression for the critical inertia constraint is:
[0018] H all ≥H min ;
[0019] Where H all H represents the total virtual inertia of the power system; min To ensure the minimum total virtual inertia required for power system stability;
[0020] The expression for the system frequency change rate constraint is:
[0021]
[0022] In the formula, Δf(t) represents the system frequency deviation; t represents time; ΔP represents the total power deficit at the initial moment of the disturbance; and H represents the inertia of the unit.
[0023] The expression for the maximum frequency deviation constraint is:
[0024]
[0025] In the formula, R is the speed control gain of the unit's governor; P step The unit disturbance amplitude is relative to the system capacity reference value; D is the load damping coefficient; K n This is the mechanical power gain coefficient; ω is the damping ratio; ω is the natural oscillation angular frequency; t nadir The extreme point of the system frequency deviation is θ; θ represents the coefficients generated when deriving the frequency expression of the model parameters; T r The reheat time constant;
[0026] The expression for the system steady-state frequency deviation constraint is:
[0027]
[0028] In the formula, Δf ss Indicates steady-state frequency deviation; S R This is the reserve capacity for primary frequency regulation.
[0029] Furthermore, the virtual inertia optimization allocation model is solved using the bat algorithm to obtain the target virtual inertia of each unit that minimizes the total investment cost and maximizes the frequency stability index, including:
[0030] Initialize the maximum and minimum pulse frequencies, number of bats, maximum number of iterations, and initial pulse loudness of the bat algorithm;
[0031] For each bat, an initial position is randomly generated; the bat's position is used to characterize the inertial constant value of the virtual synchronous generator.
[0032] Determine the initial global optimal solution based on the initial positions of all bats;
[0033] Repeat the solution operation until the number of times the solution operation is executed reaches the maximum number of iterations, and obtain the target virtual inertia based on the globally optimal solution.
[0034] The solution operation includes:
[0035] Calculate the location of the local optimal solution based on the current impulse loudness and the current global optimal solution; wherein, the current impulse loudness when the solution operation is executed for the first time is the initial impulse loudness, and the current global optimal solution is the initial global optimal solution;
[0036] For each bat, a pulse frequency is randomly generated based on the maximum and minimum pulse frequency values; the bat's position and speed are updated based on the pulse frequency, current position, current speed, and the current global optimal solution.
[0037] Based on the updated positions of all bats and the positions of the local optimal solutions, select the position that maximizes the objective function value, and use the selected position to update the global optimal solution.
[0038] The impulse loudness of the bat is updated based on the current impulse loudness and the iteration step size; wherein the iteration step size is adaptively reduced during iteration.
[0039] Furthermore, the formula for calculating the location of the local optimal solution is:
[0040] x new =x old+εA t ;
[0041] In the formula, x new Indicates the local optimum; x old A represents the current global optimal solution in the current iteration; ε is a random number with a value in the range [-1, 1]; t This indicates the current pulse loudness.
[0042] Further, the step of randomly generating a pulse frequency based on the maximum and minimum pulse frequency values, and updating the bat's position and speed based on the pulse frequency, current position, current speed, and the current global optimal solution, includes:
[0043] Based on the maximum and minimum pulse frequencies, a pulse frequency is generated using a random pulse generation formula.
[0044] Based on the pulse frequency, current position, current velocity, and current global optimal solution, the bat's position and velocity are updated using position and velocity update formulas.
[0045] The formula for generating random pulses is as follows:
[0046] f i =f min +(f max -f min )*γ;
[0047] In the formula, f i f represents the pulse frequency randomly generated by the i-th bat; max Indicates the maximum pulse frequency; f min γ represents the minimum pulse frequency; γ represents a random vector with a value range of [-1, 1].
[0048] The position and velocity update formulas are as follows:
[0049]
[0050] In the formula, This represents the updated velocity of the i-th bat in the t-th iteration; This represents the current speed of the i-th bat in the t-th iteration; This represents the updated position of the i-th bat in the t-th iteration; x represents the current position of the i-th bat in the t-th iteration; * This represents the current globally optimal solution.
[0051] Further, updating the bat's impulse loudness based on the current impulse loudness and iteration step size includes:
[0052] Calculate the iteration step size for the current iteration based on the adaptive decreasing iteration step size formula;
[0053] Based on the current impulse loudness and the current iteration step size, the impulse loudness of the bat is updated using the impulse loudness update formula;
[0054] The formula for adaptively decreasing iteration step size is:
[0055]
[0056] In the formula, μ represents the iteration step size; T max t represents the maximum number of iterations; t represents the number of iterations in the current iteration; the impulse loudness update formula is:
[0057] A t+1 =αA t ;
[0058] In the formula, A t+1 Indicates the updated impulse loudness; A t α represents the current impulse loudness before the update; α represents the iteration step size.
[0059] Another embodiment of the present invention provides a virtual inertia configuration device for a power system, comprising: a data acquisition module, a model building module, a model solving module, and a virtual inertia configuration module;
[0060] The data acquisition module is used to acquire the power system parameters and the total virtual inertia of the power system; wherein, the power system parameters include: the total power deficit at the initial moment of the disturbance, the rated frequency of the system, the total rated capacity of traditional generator sets, the total rated capacity of new energy generator sets, and the rotor frequency of all generator sets;
[0061] The model building module is used to construct the objective function of the virtual inertia optimization allocation model based on the power system parameters and the total virtual inertia, with the goal of minimizing the total investment cost and maximizing the frequency stability index. It also includes the critical inertia constraint, system frequency change rate constraint, maximum frequency deviation constraint, and system steady-state frequency deviation constraint for building the virtual inertia optimization allocation model. The frequency stability index is used to measure the stability of the frequency change rate of the power system's inertia level in the initial stage after being subjected to disturbances.
[0062] The model solving module is used to solve the objective function of the virtual inertia optimization allocation model under the constraints of critical inertia, system frequency change rate, maximum frequency deviation, and system steady-state frequency deviation, using the bat algorithm, to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized.
[0063] The virtual inertia configuration module is used to configure virtual inertia according to the target virtual inertia of each unit.
[0064] Another embodiment of the present invention 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 steps of the power system virtual inertia configuration method of the present invention.
[0065] Another embodiment of the present invention provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of the power system virtual inertia configuration method of the present invention.
[0066] The following benefits can be obtained by implementing the present invention:
[0067] This invention obtains the power system parameters and the total virtual inertia of the power system. Based on the power system parameters and the total virtual inertia, and with the goal of minimizing the total investment cost and maximizing the frequency stability index, it constructs an objective function for a virtual inertia optimization allocation model, as well as critical inertia constraints, system frequency change rate constraints, maximum frequency deviation constraints, and system steady-state frequency deviation constraints for the virtual inertia optimization allocation model. Using the bat algorithm, the objective function of the virtual inertia optimization allocation model is solved to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized. Based on the target virtual inertia of each unit, virtual inertia is configured. This invention constructs a virtual inertia optimization allocation model with the goal of minimizing the total investment cost and maximizing the frequency stability index, while simultaneously considering the maximization of the economic benefits of the power system and the efficiency of virtual inertia configuration, filling the technical gap in existing technologies regarding virtual inertia configuration that considers economic benefits. Attached Figure Description
[0068] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0069] Figure 1 This is a flowchart illustrating a method for configuring virtual inertia in a power system according to an embodiment of the present invention.
[0070] Figure 2 This is a schematic diagram of the structure of a power system virtual inertia configuration device provided in an embodiment of the present invention. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0072] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the term "comprising" and any variations thereof in the specification, claims and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0073] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0074] See Figure 1 To address the technical gap in existing technologies regarding virtual inertia configuration that considers economic benefits, an embodiment of the present invention provides a method for configuring virtual inertia in a power system, comprising:
[0075] S1. Obtain the power system parameters and the total virtual inertia of the power system; wherein, the power system parameters include: the total power deficit at the initial moment of the disturbance, the rated frequency of the system, the total rated capacity of traditional generator sets, the total rated capacity of new energy generator sets, and the rotor frequency of all generator sets.
[0076] It should be noted that the total virtual inertia of the power system refers to the total amount of virtual inertia to be allocated to the system, which can be calculated using the following formula:
[0077]
[0078] Where H all The virtual inertia of the power system is represented by T; the set of traditional generator sets is represented by X; and the set of new energy generator sets is represented by H. G,m H represents the inertia of the m-th conventional generator set; S,n S represents the inertia of the nth new energy generator unit; G,m S represents the rated capacity of the m-th conventional generator set; S,nS represents the rated capacity of the nth new energy generator unit; G S represents the total rated capacity of a traditional generator set. S This indicates the total rated capacity of new energy generator sets.
[0079] S2. Based on the power system parameters and the total virtual inertia, with the goal of minimizing the total investment cost and maximizing the frequency stability index, construct the objective function of the virtual inertia optimization allocation model, as well as the critical inertia constraint, system frequency change rate constraint, maximum frequency deviation constraint, and system steady-state frequency deviation constraint for constructing the virtual inertia optimization allocation model; wherein, the frequency stability index is used to measure the stability of the frequency change rate of the power system's inertia level in the initial stage after being disturbed.
[0080] It should be noted that the frequency stability index is used to measure whether the rate of frequency change of the actual inertia level of the current power system in the initial stage after being subjected to disturbances can meet the frequency stability requirements of the power system.
[0081] The objective function of the virtual inertia optimization allocation model includes two objectives: minimizing the total investment cost and maximizing the frequency stability index.
[0082] In a preferred embodiment, the expression for the objective function is:
[0083]
[0084] C = C u +C p ;
[0085] C u =r w ·X w ·∑H w +r l ·X l ·∑H l +r n ·X n ·∑H n ;
[0086] C p =C m +C d +C r ;
[0087]
[0088] Where r C r is the normalization coefficient for total investment cost. Iα is the normalized coefficient of the frequency stability index; α and β are Cauchy-type frequency stability parameters, with β being a positive even number; a and σ are normal-type investment cost parameters; C represents the total investment cost; I represents the frequency stability index; C u Indicates the total investment cost on the load side; C p This represents the total investment cost for power generation; r w X represents the power generation cost coefficient of a photovoltaic power plant; w This represents the normalized stability index of the electricity provided by a photovoltaic power plant; ∑H w This represents the total virtual inertia of a photovoltaic power station; r l X represents the power generation cost coefficient of a wind farm; l This represents the normalized stability index of the electricity provided by a wind farm; ∑H l This represents the total virtual inertia of a wind farm; r n X represents the power generation cost coefficient of an energy storage power station; n This represents the normalized stability index of the electrical energy provided by the energy storage power station; ∑H n C represents the total virtual inertia of the energy storage power station; m Indicates material cost; C d Indicates the cost of disposal; C r Indicates operation and maintenance costs; H all H represents the total virtual inertia of the power system; min To meet the minimum total virtual inertia required for power system stability; H i The virtual inertia of the i-th generator unit is represented by ΔP; ΔP represents the total power deficit at the initial moment of the disturbance; f s Indicates the system's rated frequency; S G S represents the total rated capacity of a traditional generator set. S Indicates the total rated capacity of new energy generator sets; f i f represents the rotor frequency of the i-th generator set; ctl The frequency of inertia is represented by N; the total number of generator sets is represented by N; and time is represented by t.
[0089] In this embodiment, the total investment cost takes into account the economic reasons for the optimized allocation of virtual inertia, as the distance between energy stations and load sides varies at different nodes. For a specific load side, factors such as the power generation method, power generation quality, and stability of the energy station are considered; for a specific new energy power station, the power generation cost mainly includes material costs, consumption costs, and operation and maintenance costs.
[0090] The frequency stability index can be used to determine the transient frequency stability of the power system after a disturbance. If the frequency stability index is greater than 1, meaning the actual operating inertia of the system is greater than the critical inertia, then the power system frequency can remain stable after the disturbance.
[0091] The expression for the total virtual inertia of the power system can be represented by the swing equation of the generator after the disturbance, that is:
[0092]
[0093] In the formula, ΔP h This represents the power deficit of the h-th generator set at the initial moment of disturbance in the set of traditional generator sets and new energy generator sets.
[0094] In a preferred embodiment, the expression for the critical inertia constraint is:
[0095] H all ≥H min ;
[0096] Where H all H represents the total virtual inertia of the power system; min To ensure the minimum total virtual inertia required for power system stability;
[0097] The expression for the system frequency change rate constraint is:
[0098]
[0099] In the formula, Δf(t) represents the system frequency deviation; t represents time; ΔP represents the total power deficit at the initial moment of the disturbance; and H represents the inertia of the unit.
[0100] The expression for the maximum frequency deviation constraint is:
[0101]
[0102] In the formula, R is the speed control gain of the unit's governor; P step The unit disturbance amplitude is relative to the system capacity reference value; D is the load damping coefficient; K n ζ is the mechanical power gain coefficient; ζ is the damping ratio; ω is the natural oscillation angular frequency; t nadir The extreme point of the system frequency deviation is θ; θ represents the coefficients generated when deriving the frequency expression of the model parameters; T r The reheat time constant;
[0103] The expression for the system steady-state frequency deviation constraint is:
[0104]
[0105] In the formula, Δf ss Indicates steady-state frequency deviation; S R This is the reserve capacity for primary frequency regulation.
[0106] In this embodiment, the critical inertia constraint can be characterized by the frequency stability index, i.e., I≥1.
[0107] For the system frequency change rate constraint, after the system is disturbed, the active power imbalance is at its maximum at the initial moment, at which time the system frequency change rate is also at its maximum, with a value of [value missing].
[0108] It should be noted that Δf(t) represents the deviation between the maximum and minimum frequencies of a certain generator unit. nadir This is the moment when the system frequency deviation reaches its maximum.
[0109] For the maximum frequency deviation constraint, considering both the minimum frequency drop and the maximum frequency rise, an excessively large maximum frequency deviation may lead to low-frequency load shedding, high-frequency shedding, or even a large-scale power outage. The maximum frequency deviation is directly related to the disturbance amount, while inertia has a limited impact on it.
[0110] For the steady-state frequency deviation constraint of the system, the frequency deviation is expressed as the frequency deviation under the condition that the primary frequency regulation reserve capacity of the unit is fully released, which is one of the criteria for frequency stability.
[0111] S3. Under the constraints of critical inertia, system frequency change rate, maximum frequency deviation, and system steady-state frequency deviation, the objective function of the virtual inertia optimization allocation model is solved using the bat algorithm to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized.
[0112] It should be noted that the bat algorithm simulates the echolocation-based hunting behavior of bats, continuously adjusting their flight behavior based on the frequency and rate of pulse signals, constantly updating the current optimal position and flight speed, demonstrating strong global search capabilities. Traditional bat algorithms have relatively large step sizes in the early stages to avoid prematurely getting trapped in local optima. The improved bat algorithm used in this paper reduces the search step size as the number of iterations increases, resulting in fast convergence and high efficiency. The optimization algorithm uses an improved bat algorithm where the iteration step size can be adaptively changed. The step size is larger in the early stages to avoid prematurely getting trapped in local optima. In the later stages, the step size decreases with the number of iterations, resulting in strong global search capabilities and fast convergence.
[0113] In a preferred embodiment, the step of solving the virtual inertia optimization allocation model using the bat algorithm to obtain the target virtual inertia of each unit corresponding to the minimum total investment cost and the maximum frequency stability index includes:
[0114] Initialize the maximum and minimum pulse frequencies, number of bats, maximum number of iterations, and initial pulse loudness of the bat algorithm;
[0115] For each bat, an initial position is randomly generated; the bat's position is used to characterize the inertial constant value of the virtual synchronous generator.
[0116] Determine the initial global optimal solution based on the initial positions of all bats;
[0117] Repeat the solution operation until the number of times the solution operation is executed reaches the maximum number of iterations, and obtain the target virtual inertia based on the globally optimal solution.
[0118] The solution operation includes:
[0119] Calculate the location of the local optimal solution based on the current impulse loudness and the current global optimal solution; wherein, the current impulse loudness when the solution operation is executed for the first time is the initial impulse loudness, and the current global optimal solution is the initial global optimal solution;
[0120] For each bat, a pulse frequency is randomly generated based on the maximum and minimum pulse frequency values; the bat's position and speed are updated based on the pulse frequency, current position, current speed, and the current global optimal solution.
[0121] Based on the updated positions of all bats and the positions of the local optimal solutions, select the position that maximizes the objective function value, and use the selected position to update the global optimal solution.
[0122] The impulse loudness of the bat is updated based on the current impulse loudness and the iteration step size; wherein the iteration step size is adaptively reduced during iteration.
[0123] It should be noted that the step size adaptively changes with the number of iterations during the iteration process. During parameter initialization, the initial bat position is randomly generated. In the virtual inertia allocation problem, the virtual inertia allocated to each node represents its position.
[0124] In a preferred embodiment, the formula for calculating the location of the local optimal solution is:
[0125] x new =x old +εA t ;
[0126] In the formula, x new Indicates the local optimum; x old A represents the current global optimal solution in the current iteration; ε is a random number with a value in the range [-1, 1]; t This indicates the current pulse loudness.
[0127] It should be noted that for local search, once a solution is selected from the current local optimal solution, a new local solution will be generated by a bat random walk, i.e., x new =x old +εA t .
[0128] In a preferred embodiment, the step of randomly generating a pulse frequency based on the maximum and minimum pulse frequency values, and updating the bat's position and speed based on the pulse frequency, current position, current speed, and the current global optimal solution, includes:
[0129] Based on the maximum and minimum pulse frequencies, a pulse frequency is generated using a random pulse generation formula.
[0130] Based on the pulse frequency, current position, current velocity, and current global optimal solution, the bat's position and velocity are updated using position and velocity update formulas.
[0131] The formula for generating random pulses is as follows:
[0132] f i =f min +(f max -f min )*γ;
[0133] In the formula, f i f represents the pulse frequency randomly generated by the i-th bat; max Indicates the maximum pulse frequency; f min γ represents the minimum pulse frequency; γ represents a random vector with a value range of [-1, 1].
[0134] The position and velocity update formulas are as follows:
[0135]
[0136] In the formula, This represents the updated velocity of the i-th bat in the t-th iteration; This represents the current speed of the i-th bat in the t-th iteration; This represents the updated position of the i-th bat in the t-th iteration; x represents the current position of the i-th bat in the t-th iteration; * This represents the current globally optimal solution.
[0137] In a preferred embodiment, updating the bat's impulse loudness based on the current impulse loudness and the iteration step size includes:
[0138] Calculate the iteration step size for the current iteration based on the adaptive decreasing iteration step size formula;
[0139] Based on the current impulse loudness and the current iteration step size, the impulse loudness of the bat is updated using the impulse loudness update formula;
[0140] The formula for adaptively decreasing iteration step size is:
[0141]
[0142] In the formula, μ represents the iteration step size; T max t represents the maximum number of iterations; t represents the number of iterations in the current iteration; the impulse loudness update formula is:
[0143] A t+1 =ɑA t ;
[0144] In the formula, A t+1 Indicates the updated impulse loudness; A t α represents the current impulse loudness before the update; ɑ represents the iteration step size.
[0145] It should be noted that as bats approach their prey, the spatial range in which they search for the prey gradually decreases, the loudness tends to decrease, and the pulse frequency continuously increases, so that bats can quickly determine the location of their target prey, i.e., A. t+1 =ɑA t .
[0146] S4. Configure virtual inertia based on the target virtual inertia of each unit.
[0147] It should be noted that the final output of the model is the target virtual inertia of each unit. The total amount of virtual inertia of the power system is allocated according to the target virtual inertia to realize the configuration of virtual inertia of the power system.
[0148] like Figure 2 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided;
[0149] One embodiment of the present invention provides a virtual inertia configuration device for a power system, comprising: a data acquisition module, a model building module, a model solving module, and a virtual inertia configuration module;
[0150] The data acquisition module is used to acquire the power system parameters and the total virtual inertia of the power system; wherein, the power system parameters include: the total power deficit at the initial moment of the disturbance, the rated frequency of the system, the total rated capacity of traditional generator sets, the total rated capacity of new energy generator sets, and the rotor frequency of all generator sets;
[0151] The model building module is used to construct the objective function of the virtual inertia optimization allocation model based on the power system parameters and the total virtual inertia, with the goal of minimizing the total investment cost and maximizing the frequency stability index. It also includes the critical inertia constraint, system frequency change rate constraint, maximum frequency deviation constraint, and system steady-state frequency deviation constraint for building the virtual inertia optimization allocation model. The frequency stability index is used to measure the stability of the frequency change rate of the power system's inertia level in the initial stage after being subjected to disturbances.
[0152] The model solving module is used to solve the objective function of the virtual inertia optimization allocation model under the constraints of critical inertia, system frequency change rate, maximum frequency deviation, and system steady-state frequency deviation, using the bat algorithm, to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized.
[0153] The virtual inertia configuration module is used to configure virtual inertia according to the target virtual inertia of each unit.
[0154] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the power system virtual inertia configuration method provided by any of the above-described method embodiments of the present invention.
[0155] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0156] Based on the above-described method embodiments, another embodiment of the present invention provides a terminal device, which includes 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 power system virtual inertia configuration method of any embodiment of the present invention.
[0157] For example, in this embodiment, the computer program can 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 a specific function, which describe the execution process of the computer program in the terminal device.
[0158] 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.
[0159] 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.
[0160] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the power system virtual inertia configuration method described in any of the above-described method embodiments of the present invention.
[0161] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in 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 the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0162] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for configuring virtual inertia in a power system, characterized in that, include: Obtain the power system parameters and the total virtual inertia of the power system; wherein, the power system parameters include: the total power deficit at the initial moment of the disturbance, the rated frequency of the system, the total rated capacity of traditional generator sets, the total rated capacity of new energy generator sets, and the rotor frequency of all generator sets; Based on the power system parameters and the total virtual inertia, with the goal of minimizing the total investment cost and maximizing the frequency stability index, an objective function for the virtual inertia optimization allocation model is constructed, along with critical inertia constraints, system frequency change rate constraints, maximum frequency deviation constraints, and system steady-state frequency deviation constraints for building the virtual inertia optimization allocation model; wherein, the frequency stability index is used to measure the stability of the frequency change rate of the power system's inertia level in the initial stage after being disturbed; Under the constraints of critical inertia, system frequency change rate, maximum frequency deviation, and system steady-state frequency deviation, the objective function of the virtual inertia optimization allocation model is solved using the bat algorithm to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized. Virtual inertia is configured based on the target virtual inertia of each unit.
2. The method for configuring virtual inertia in a power system as described in claim 1, characterized in that, The expression for the objective function is: C=C u +C p ; C u =r w ·X w ·∑H w +r l ·X l ·∑H l +r n ·X n ·∑H n ; C p =C m +C d +C r ; Where r C r is the normalization coefficient for total investment cost. I α is the normalized coefficient of the frequency stability index; α and β are Cauchy-type frequency stability parameters, with β being a positive even number; a and σ are normal-type investment cost parameters; C represents the total investment cost; I represents the frequency stability index; C u Indicates the total investment cost on the load side; C p This represents the total investment cost for power generation; r w X represents the power generation cost coefficient of a photovoltaic power plant; w This represents the normalized stability index of the electricity provided by a photovoltaic power plant; ∑H w This represents the total virtual inertia of a photovoltaic power station; r l X represents the power generation cost coefficient of a wind farm; l This represents the normalized stability index of the electricity provided by a wind farm; ∑H l This represents the total virtual inertia of a wind farm; r n X represents the power generation cost coefficient of an energy storage power station; n This represents the normalized stability index of the electrical energy provided by the energy storage power station; ∑H n C represents the total virtual inertia of the energy storage power station; m Indicates material cost; C d Indicates the cost of disposal; C r Indicates operation and maintenance costs; H all H represents the total virtual inertia of the power system; min To meet the minimum total virtual inertia required for power system stability; H i The virtual inertia of the i-th generator unit is represented by ΔP; ΔP represents the total power deficit at the initial moment of the disturbance; f s Indicates the system's rated frequency; S G S represents the total rated capacity of a traditional generator set. S Indicates the total rated capacity of new energy generator sets; f i f represents the rotor frequency of the i-th generator set; ctl The frequency of inertia is represented by N; the total number of generator sets is represented by N; and time is represented by t.
3. The method for configuring virtual inertia in a power system as described in claim 1, characterized in that, The expression for the critical inertia constraint is: H all ≥H min ; Where H all H represents the total virtual inertia of the power system; min To ensure the minimum total virtual inertia required for power system stability; The expression for the system frequency change rate constraint is: In the formula, Δf(t) represents the system frequency deviation; t represents time; ΔP represents the total power deficit at the initial moment of the disturbance; and H represents the inertia of the unit. The expression for the maximum frequency deviation constraint is: In the formula, R is the speed control gain of the unit's governor; P step The unit disturbance amplitude is relative to the system capacity reference value; D is the load damping coefficient; K n This is the mechanical power gain coefficient; ω is the damping ratio; ω is the natural angular frequency. t nadir The extreme point of the system frequency deviation is θ; θ represents the coefficients generated when deriving the frequency expression of the model parameters; T r The reheat time constant; The expression for the system steady-state frequency deviation constraint is: In the formula, Δf ss Indicates steady-state frequency deviation; S R This is the reserve capacity for primary frequency regulation.
4. The method for configuring virtual inertia in a power system as described in claim 1, characterized in that, The process involves solving the virtual inertia optimization allocation model using the bat algorithm to obtain the target virtual inertia for each unit that minimizes the total investment cost and maximizes the frequency stability index, including: Initialize the maximum and minimum pulse frequencies, number of bats, maximum number of iterations, and initial pulse loudness of the bat algorithm; For each bat, an initial position is randomly generated; the bat's position is used to characterize the inertial constant value of the virtual synchronous generator. Determine the initial global optimal solution based on the initial positions of all bats; Repeat the solution operation until the number of times the solution operation is executed reaches the maximum number of iterations, and obtain the target virtual inertia based on the globally optimal solution. The solution operation includes: Calculate the location of the local optimal solution based on the current impulse loudness and the current global optimal solution; wherein, the current impulse loudness when the solution operation is executed for the first time is the initial impulse loudness, and the current global optimal solution is the initial global optimal solution; For each bat, a pulse frequency is randomly generated based on the maximum and minimum pulse frequency values; the bat's position and speed are updated based on the pulse frequency, current position, current speed, and the current global optimal solution. Based on the updated positions of all bats and the positions of the local optimal solutions, select the position that maximizes the objective function value, and use the selected position to update the global optimal solution. The impulse loudness of the bat is updated based on the current impulse loudness and the iteration step size; wherein the iteration step size is adaptively reduced during iteration.
5. The method for configuring virtual inertia in a power system as described in claim 4, characterized in that, The formula for calculating the location of the local optimal solution is: x new =x old +εA t ; In the formula, x new Indicates the local optimum; x old A represents the current global optimal solution in the current iteration; ε is a random number with a value in the range [-1, 1]; t This indicates the current pulse loudness.
6. The method for configuring virtual inertia in a power system as described in claim 4, characterized in that, The pulse frequency is randomly generated based on the maximum and minimum pulse frequency values. Based on the pulse frequency, current position, current velocity, and the current global optimal solution, update the bat's position and velocity, including: Based on the maximum and minimum pulse frequencies, a pulse frequency is generated using a random pulse generation formula. Based on the pulse frequency, current position, current velocity, and current global optimal solution, the bat's position and velocity are updated using position and velocity update formulas. The formula for generating random pulses is as follows: f i =f min +(f max -f min )*γ; In the formula, f i f represents the pulse frequency randomly generated by the i-th bat; max Indicates the maximum pulse frequency; f min γ represents the minimum pulse frequency; γ represents a random vector with a value range of [-1, 1]. The position and velocity update formulas are as follows: In the formula, This represents the updated velocity of the i-th bat in the t-th iteration; This represents the current speed of the i-th bat in the t-th iteration; This represents the updated position of the i-th bat in the t-th iteration; x represents the current position of the i-th bat in the t-th iteration; * This represents the current globally optimal solution.
7. The method for configuring virtual inertia in a power system as described in claim 4, characterized in that, The step of updating the bat's impulse loudness based on the current impulse loudness and iteration step size includes: Calculate the iteration step size for the current iteration based on the adaptive decreasing iteration step size formula; Based on the current impulse loudness and the current iteration step size, the impulse loudness of the bat is updated using the impulse loudness update formula; The formula for adaptively decreasing iteration step size is: In the formula, μ represents the iteration step size; T max This represents the maximum number of iterations; t represents the number of iterations in the current iteration. The pulse loudness update formula is as follows: A t+1 =αA t ; In the formula, A t+1 Indicates the updated impulse loudness; A t α represents the current impulse loudness before the update; α represents the iteration step size.
8. A virtual inertia configuration device for a power system, characterized in that, include: The module includes a data acquisition module, a model building module, a model solving module, and a virtual inertia configuration module. The data acquisition module is used to acquire the power system parameters and the total virtual inertia of the power system; wherein, the power system parameters include: the total power deficit at the initial moment of the disturbance, the rated frequency of the system, the total rated capacity of traditional generator sets, the total rated capacity of new energy generator sets, and the rotor frequency of all generator sets; The model building module is used to construct the objective function of the virtual inertia optimization allocation model based on the power system parameters and the total virtual inertia, with the goal of minimizing the total investment cost and maximizing the frequency stability index. It also includes the critical inertia constraint, system frequency change rate constraint, maximum frequency deviation constraint, and system steady-state frequency deviation constraint for building the virtual inertia optimization allocation model. The frequency stability index is used to measure the stability of the frequency change rate of the power system's inertia level in the initial stage after being subjected to disturbances. The model solving module is used to solve the objective function of the virtual inertia optimization allocation model under the constraints of critical inertia, system frequency change rate, maximum frequency deviation, and system steady-state frequency deviation, using the bat algorithm, to obtain the target virtual inertia of each unit when the total investment cost is minimized and the frequency stability index is maximized. The virtual inertia configuration module is used to configure virtual inertia according to the target virtual inertia of each unit.
9. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the power system virtual inertia configuration method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the power system virtual inertia configuration method as described in any one of claims 1-7.
