Frequency modulation method, device, equipment, medium and product

By optimizing the output power regulation of the battery energy storage system through fuzzy controller and particle swarm algorithm, the frequency problem caused by the high proportion of renewable energy access to the power grid was solved, and the stable operation of the power grid was achieved.

CN120657791APending Publication Date: 2025-09-16STATE GRID JIANGSU ELECTRIC POWER CO LTD NANJING POWER SUPPLY COMPANY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510467228.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The access of a high proportion of renewable energy to the power grid leads to frequency oscillation and overshoot. The existing PID control method is difficult to adapt to the nonlinear dynamics and complex operating conditions of the power grid.

Method used

A fuzzy controller combined with a particle swarm algorithm is used to determine the output power adjustment parameters of the battery energy storage system. The target output power of the battery energy storage system is determined through PI adjustment to achieve frequency regulation of the power grid.

Benefits of technology

Effectively prevent frequency oscillation and overshoot to ensure stable operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120657791A_ABST
    Figure CN120657791A_ABST
Patent Text Reader

Abstract

The invention discloses a frequency modulation method, device and equipment, a medium and a product. The method comprises the steps that the real-time frequency deviation and the real-time frequency deviation change rate of a power grid are acquired, and the power grid is connected to a battery energy storage system; the real-time frequency deviation and the real-time frequency deviation change rate are input into a target fuzzy controller, an output power adjusting parameter of the battery energy storage system is obtained, and a gain coefficient pair of the target fuzzy controller is determined based on a particle swarm algorithm; determining the initial output power of the battery energy storage system based on the output power adjustment parameter of the battery energy storage system and the reference output power of the battery energy storage system; after PI adjustment is carried out on the initial output power of the battery energy storage system, target output power of the battery energy storage system is obtained; and frequency modulation is performed on the power grid according to the target output power of the battery energy storage system, and stable operation of the power grid can be ensured through the technical scheme of the invention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of power grid technology, and in particular to a frequency modulation method, device, equipment, medium and product. Background Art

[0002] With the transformation of the global energy structure, the proportion of renewable energy resources (e.g., photovoltaic and wind power) in modern power systems continues to increase, playing an important role in power grids in particular.

[0003] However, the integration of a high proportion of renewable energy sources poses challenges to grid frequency stability. The intermittent and fluctuating output of photovoltaic and wind power makes it difficult to match load demand in real time, leading to frequency deviations. Furthermore, the low proportion of traditional synchronous generators in the grid reduces the overall system inertia, making frequency deviations easily exceed safe ranges.

[0004] In the existing technology, the frequency modulation method in the power grid mostly adopts the PID control method. The PID control method has the following problems: since the PID controller is difficult to adapt to the nonlinear dynamics and complex operating conditions of the power grid, it is easy to cause frequency oscillation or aggravate overshoot when a high proportion of renewable energy is connected. Summary of the Invention

[0005] Embodiments of the present invention provide a frequency modulation method, apparatus, device, medium, and product to prevent frequency oscillation or aggravate overshoot, thereby ensuring stable operation of a power grid.

[0006] According to one aspect of the present invention, there is provided a frequency modulation method, comprising:

[0007] Obtaining a real-time frequency deviation and a real-time frequency deviation change rate of a power grid, wherein the power grid is the power grid to which the battery energy storage system is connected;

[0008] Inputting the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system, wherein a gain coefficient of the target fuzzy controller is determined based on a particle swarm algorithm;

[0009] Determining an initial output power of the battery energy storage system based on an output power adjustment parameter of the battery energy storage system and a reference output power of the battery energy storage system;

[0010] After performing PI adjustment on the initial output power of the battery energy storage system, a target output power of the battery energy storage system is obtained;

[0011] The power grid frequency is adjusted according to the target output power of the battery energy storage system.

[0012] According to another aspect of the present invention, a frequency modulation device is provided, the frequency modulation device comprising:

[0013] an acquisition module, configured to acquire a real-time frequency deviation and a real-time frequency deviation change rate of a power grid, wherein the power grid is the power grid to which the battery energy storage system is connected;

[0014] an output power adjustment parameter determination module, configured to input the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system, wherein a gain coefficient of the target fuzzy controller is determined based on a particle swarm algorithm;

[0015] an initial output power determination module, configured to determine the initial output power of the battery energy storage system based on an output power adjustment parameter of the battery energy storage system and a reference output power of the battery energy storage system;

[0016] a target output power determination module, configured to perform PI adjustment on the initial output power of the battery energy storage system to obtain the target output power of the battery energy storage system;

[0017] A frequency modulation module is used to modulate the frequency of the power grid according to the target output power of the battery energy storage system.

[0018] According to another aspect of the present invention, an electronic device is provided, comprising:

[0019] at least one processor; and

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the frequency modulation method described in any embodiment of the present invention.

[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the frequency modulation method according to any embodiment of the present invention when executed.

[0023] According to another aspect of the present invention, a computer program product is provided. When the computer program is executed by a processor, the computer program implements the frequency modulation method as described in any one of the embodiments of the present invention.

[0024] In this embodiment of the present invention, the real-time frequency deviation of the power grid and the rate of change of the real-time frequency deviation are first input into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system. The initial output power of the battery energy storage system is then determined based on the output power adjustment parameter and a reference output power of the battery energy storage system. The target output power of the battery energy storage system is obtained by performing PI adjustment on the initial output power of the battery energy storage system. Finally, the power grid is frequency-regulated according to the target output power of the battery energy storage system. This prevents frequency oscillation or exacerbates overshoot, thereby ensuring stable operation of the power grid.

[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 is a flow chart of a frequency modulation method in an embodiment of the present invention;

[0028] Figure 2 is a flow chart of another frequency modulation method in an embodiment of the present invention;

[0029] Figure 3 is a structural diagram of a frequency modulation device in an embodiment of the present invention;

[0030] Figure 4 It is a structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0034] Example 1

[0035] Figure 1 This is a flow chart of a frequency modulation method provided by an embodiment of the present invention. This embodiment is applicable to the case of frequency modulation of a power grid. The method can be executed by a frequency modulation device in an embodiment of the present invention. The device can be implemented in software and / or hardware. Figure 1 As shown, the method specifically includes the following steps:

[0036] S110 , obtaining a real-time frequency deviation and a real-time frequency deviation change rate of the power grid.

[0037] In this embodiment, the power grid is the power grid to which the battery energy storage system is connected.

[0038] In this embodiment, the real-time frequency deviation of the power grid is equal to the difference between the standard frequency of the power grid and the actual frequency of the power grid. For example, the real-time frequency deviation calculation formula of the power grid is: Δf = f n -f, f is the actual frequency of the power grid, f n is the standard frequency of the power grid. When Δf>0, it means that the active power in the power grid is insufficient. At this time, the battery energy storage system supplies power to the power grid by injecting active power, and vice versa. The real-time frequency deviation change rate is the speed at which the real-time frequency deviation changes. The real-time frequency deviation change rate is obtained by taking the time derivative of the real-time frequency deviation Δf. The calculation formula for the real-time frequency deviation change rate is:

[0039]

[0040] The real-time frequency deviation change rate only works in transient events where the frequency changes suddenly, and indicates how fast the frequency changes.

[0041] S120: Input the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system.

[0042] In this embodiment, the real-time frequency deviation and the real-time frequency deviation change rate are input into a target fuzzy controller to obtain the output power adjustment parameter of the battery energy storage system. This may be done by pre-determining a gain coefficient pair of the target fuzzy controller based on a particle swarm algorithm, constructing a target fuzzy controller according to a fuzzy set of the real-time frequency deviation, a fuzzy set of the real-time frequency deviation change rate, a fuzzy set of the output power adjustment parameter, a membership function, the target gain coefficient pair, and a fuzzy control rule; and inputting the real-time frequency deviation and the real-time frequency deviation change rate into the target fuzzy controller to obtain the output power adjustment parameter of the battery energy storage system.

[0043] In this embodiment, the gain coefficient pair of the target fuzzy controller is determined based on a particle swarm algorithm.

[0044] In this embodiment, the gain coefficient pair includes: a gain coefficient of an input parameter and a gain coefficient of an output parameter, the gain coefficient of the input parameter includes: a gain coefficient of a real-time frequency deviation and a gain coefficient of a real-time frequency deviation change rate, and the gain coefficient of the output parameter includes: a gain coefficient of an output power adjustment parameter.

[0045] In this embodiment, the first objective function of the particle swarm algorithm is:

[0046]

[0047] In this embodiment, Δf is the real-time frequency deviation of the historical power grid, is the real-time frequency deviation change rate of the historical power grid, P batt To input the real-time frequency deviation and real-time frequency deviation change rate of the historical power grid into the fuzzy controller based on particle updating, the historical output power of the battery energy storage system is obtained. Min{OF1} is the individual fitness value of the particle in the gain coefficient set, t1 is the first preset time, and W1, W2, W3 and W4 are all weight factors.

[0048] Optionally, before inputting the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain the output power adjustment parameter of the battery energy storage system, the method further includes:

[0049] The fuzzy set of real-time frequency deviation, the fuzzy set of real-time frequency deviation change rate, the fuzzy set of output power adjustment parameters, the membership function and the fuzzy control rules are obtained.

[0050] In this embodiment, the fuzzy set of real-time frequency deviation includes: negative large (NH), negative medium (NM), zero (ZR), positive medium (PM) and positive large (PH); the fuzzy set of real-time frequency deviation change rate includes: negative large (NH), negative medium (NM), zero (ZR), positive medium (PM) and positive large (PH); the fuzzy set of output power adjustment parameters includes: negative large (NL), negative small (NS), zero (ZR), positive small (PS) and positive large (PL). The membership function adopts two function types: triangular and trapezoidal. According to the input and output quantities, 25 inference rules are designed for the fuzzy logic controller using the fuzzy logic toolbox, which comprehensively covers all possible combinations of input and output quantities. Specifically: when Δf belongs to NH, and When belongs to NH, ΔP belongs to NL. When Δf belongs to NH, and When belongs to NM, ΔP belongs to NL. When Δf belongs to NH, and When belongs to ZR, ΔP belongs to NL. When Δf belongs to NH, and When belongs to PM, ΔP belongs to NS. When Δf belongs to NH, and When belongs to PH, ΔP belongs to ZR. When Δf belongs to NM, and When belongs to NH, ΔP belongs to NL. When Δf belongs to NM, and When belongs to NM, ΔP belongs to NL. When Δf belongs to NM, and When belongs to ZR, ΔP belongs to NS. When Δf belongs to NM, and When belongs to PM, ΔP belongs to ZR. When Δf belongs to NM, and When belongs to PH, ΔP belongs to PS. When Δf belongs to ZR, and When belongs to NH, ΔP belongs to NL. When Δf belongs to ZR, and When belongs to NM, ΔP belongs to NS. When Δf belongs to ZR, and When belongs to ZR, ΔP belongs to ZR. When Δf belongs to ZR, and When belongs to PM, ΔP belongs to PS. When Δf belongs to ZR, and When belongs to PH, ΔP belongs to PL. When Δf belongs to PM, and When belongs to NH, ΔP belongs to NS. When Δf belongs to PM, and When belongs to NM, ΔP belongs to ZR. When Δf belongs to PM, and When belongs to ZR, ΔP belongs to PS. When Δf belongs to PM, and When belongs to PM, ΔP belongs to PL. When Δf belongs to PM, and When belongs to PH, ΔP belongs to PL. When Δf belongs to PH, and When belongs to NH, ΔP belongs to ZR. When Δf belongs to PH, and When belongs to NM, ΔP belongs to PS. When Δf belongs to PH, and When belongs to ZR, ΔP belongs to PL. When Δf belongs to PH, and When belongs to PM, ΔP belongs to PL. When Δf belongs to PH, and When it belongs to PH, ΔP belongs to PL.

[0051] In this embodiment, the membership function includes:

[0052]

[0053] In this embodiment, x is the real-time frequency deviation Δf.

[0054]

[0055]

[0056] In this embodiment, y is the real-time frequency deviation change rate.

[0057]

[0058] In this embodiment, z is the output power adjustment parameter ΔP.

[0059] In a specific example, when Δf and When both are NH, ΔP is NL: the battery energy storage system should inject the maximum active power to compensate for the instantaneous frequency drop and suppress frequency oscillation; when Δf and When both are ZR, ΔP is ZR: the battery energy storage system does not need to inject any power into or absorb any power from the grid. When both are PH, ΔP is PL: the battery energy storage system should absorb the maximum active power from the grid to compensate for the instantaneous frequency rise and suppress frequency oscillation.

[0060] A target fuzzy controller is constructed according to the fuzzy set of real-time frequency deviation, the fuzzy set of real-time frequency deviation change rate, the fuzzy set of output power adjustment parameters, the membership function, the target gain coefficient pair and the fuzzy control rule.

[0061] Optionally, determining the target gain coefficient pair of the target fuzzy controller based on a particle swarm algorithm includes:

[0062] According to the predefined particle swarm algorithm, each set of gain coefficient pairs in the gain coefficient set is taken as a particle, and the position and velocity of each particle are initialized in the solution space.

[0063] In this embodiment, the gain coefficient pair includes: gain coefficients of input parameters and output parameters. The particle swarm algorithm is used to perform group iterative calculation on multiple particles and track the optimal particle in the solution space.

[0064] In this embodiment, the gain coefficient set may be a randomly generated gain coefficient set or a preset gain coefficient set, which is not limited in this embodiment of the present invention.

[0065] According to the real-time frequency deviation of the historical power grid, the real-time frequency deviation change rate of the historical power grid, the initial output power of the historical battery energy storage system, and the first objective function, the individual fitness value of each particle is calculated, and the global optimal fitness value is determined based on the individual fitness values ​​of multiple particles.

[0066] In this embodiment, based on the historical real-time frequency deviation of the power grid, the historical rate of change of the real-time frequency deviation of the power grid, the historical initial output power of the battery energy storage system, and the first objective function, the individual fitness value of each particle can be calculated by substituting the historical real-time frequency deviation of the power grid, the historical rate of change of the real-time frequency deviation of the power grid, and the historical initial output power of the battery energy storage system into the first objective function to obtain the individual fitness value of each particle.

[0067] In this embodiment, the initial output power of the historical battery energy storage system is the output power obtained by inputting the real-time frequency deviation of the historical power grid and the real-time frequency deviation change rate of the historical power grid into the fuzzy controller based on particle updating.

[0068] The speed and position of each particle are updated to obtain the updated particle.

[0069] Check whether the iteration meets the end conditions. If not, continue to calculate the individual fitness value of each particle based on the real-time frequency deviation of the historical power grid, the real-time frequency deviation change rate of the historical power grid, the output power of the historical battery energy storage system, and the first objective function, and determine the global optimal fitness value based on the individual fitness values ​​of multiple particles after the update. If it meets the conditions, the target particle corresponding to the global optimal fitness value is determined as the target gain coefficient pair; the first objective function is:

[0070]

[0071] In this embodiment, Δf is the real-time frequency deviation of the historical power grid, is the real-time frequency deviation change rate of the historical power grid, P batt To input the real-time frequency deviation and real-time frequency deviation change rate of the historical power grid into the fuzzy controller based on particle updating, the historical output power of the battery energy storage system is obtained. Min{OF1} is the individual fitness value of the particle in the gain coefficient set, t1 is the first preset time, and W1, W2, W3 and W4 are all weight factors.

[0072] In this embodiment, P batt The target output power adjustment parameter is the product of the target output power adjustment parameter and the reference output power of the battery energy storage system. The target output power adjustment parameter is the output power adjustment parameter obtained by inputting the real-time frequency deviation and the real-time frequency deviation change rate of the historical power grid into the fuzzy controller based on particle updating.

[0073] In this embodiment, the termination condition includes at least one of the following: reaching the maximum number of iterations; the fitness value converges; the individual fitness value is equal to the target fitness value; the computing resources consumed by the algorithm operation reaches a preset limit.

[0074] In this embodiment, t1 is the simulation time, which may be set to 100 seconds. max(|Δf|) is the maximum |Δf| within t1.

[0075] In this embodiment, W1+W2+W3+W4=1. It should be noted that W1, W2, W3, and W4 are used to convert each item into a dimensionless constant. The importance and priority of each item in the first objective function can be determined by adjusting the weight factor.

[0076] In this embodiment, the fuzzy set output by fuzzy reasoning is converted into a specific, definite numerical value (i.e., real value). The output fuzzy set is defuzzified using the "center of gravity method" to obtain the output power adjustment parameter ΔP. The membership function parameters Δf, Δf, and Δf are established to evaluate the input and output of the fuzzy logic controller. The first objective function of the optimization effect of ΔP is used. The particle swarm optimization algorithm is combined with the first objective function to optimize the membership function parameters Δf, and ΔP are optimized to obtain the optimal membership function parameters Δf, and the gain coefficient K of ΔP 1F , K 2F and K 3F .

[0077] In a specific example, the particle swarm parameters are initialized and the initial particle swarm, that is, the gain coefficient set, is randomly generated. Particles are selected one by one and time domain simulation and fitness calculation are performed. A particle is selected from the particle swarm, its parameters are input into the initial fuzzy controller, and the process is run for 100 seconds. The individual fitness value is calculated. The smaller the OF1, the better the performance. The individual optimal solution of the current particle is updated and all particles in the gain coefficient set are traversed. The speed and position of each particle are updated to obtain the updated particle; check whether the iteration meets the end condition. If not, continue to calculate the individual fitness value of each particle based on the real-time frequency deviation of the historical power grid, the real-time frequency deviation change rate of the historical power grid, the output power of the historical battery energy storage system, and the first objective function, and determine the global optimal fitness value based on the individual fitness values ​​of multiple particles after the update. If it meets the requirements, the target particle corresponding to the global optimal fitness value is determined as the target gain coefficient pair.

[0078] S130: Determine an initial output power of the battery energy storage system based on an output power adjustment parameter of the battery energy storage system and a reference output power of the battery energy storage system.

[0079] In this embodiment, based on the output power adjustment parameter of the battery energy storage system and the reference output power of the battery energy storage system, the initial output power of the battery energy storage system may be determined by multiplying the output power adjustment parameter of the battery energy storage system and the reference output power of the battery energy storage system to determine the initial output power of the battery energy storage system.

[0080] S140 , performing PI regulation on the initial output power of the battery energy storage system to obtain a target output power of the battery energy storage system.

[0081] In this embodiment, after performing PI adjustment on the initial output power of the battery energy storage system, a method for obtaining the target output power of the battery energy storage system may be: obtaining an actual current corresponding to the initial output power of the battery energy storage system, determining a rate protection coefficient based on the actual current corresponding to the initial output power of the battery energy storage system and a target proportional-integral coefficient pair; and determining the target output power of the battery energy storage system based on the rate protection coefficient and the initial output power of the battery energy storage system.

[0082] Optionally, after performing PI regulation on the output power of the initial battery energy storage system, obtaining a target output power of the battery energy storage system includes:

[0083] According to a predefined particle swarm algorithm, each set of proportional-integral coefficient pairs in the proportional-integral coefficient set is used as a particle, and the position and velocity of each particle are initialized in the solution space, wherein the proportional-integral coefficient pair includes: a proportional coefficient and an integral coefficient. The particle swarm algorithm is used to perform group iterative calculation on multiple particles and track the optimal particle in the solution space;

[0084] Calculate the individual fitness value of each particle based on the battery 1x rate reference current of the battery energy storage system, the current of the historical battery energy storage system, the real-time frequency deviation of the historical power grid, the state of charge of the battery energy storage system, and the second objective function, and determine the global optimal fitness value based on the individual fitness values ​​of multiple particles, wherein the current of the historical battery energy storage system is the current corresponding to the target output power of the historical battery energy storage system output by inputting the initial output power of the historical battery energy storage system into the PI controller based on the particle update;

[0085] Update the speed and position of each particle to obtain the updated particle;

[0086] Check whether the iteration meets the end condition. If not, continue to perform the steps of calculating the individual fitness value of each particle according to the battery 1x rate reference current of the battery energy storage system, the historical current of the battery energy storage system, the real-time frequency deviation of the historical power grid, the state of charge of the battery energy storage system, and the second objective function, and determining the global optimal fitness value according to the updated individual fitness values ​​of the multiple particles. If the condition is met, determine the target particle corresponding to the global optimal fitness value as the target proportional integral coefficient pair;

[0087] After PI adjustment is performed on the output power of the initial battery energy storage system according to the target proportional integral coefficient, the target output power of the battery energy storage system is obtained.

[0088] In this embodiment, the termination condition may be the same as or different from the termination condition for determining the target proportional-integral coefficient pair based on the particle swarm algorithm, and details thereof will not be repeated here.

[0089] In this embodiment, after performing PI adjustment on the initial output power of the battery energy storage system according to the target proportional-integral coefficient pair, a method for obtaining the target output power of the battery energy storage system may be: determining a rate protection factor based on an actual current corresponding to the initial output power of the battery energy storage system and the target proportional-integral coefficient pair; and determining the target output power of the battery energy storage system according to the rate protection factor and the initial output power of the battery energy storage system.

[0090] Optionally, the second objective function is:

[0091]

[0092] Among them, Min{OF2} is the individual fitness value of the particle in the proportional integral coefficient set, and the I 1C-rate is the battery 1-rate reference current of the battery energy storage system, I batt is the current corresponding to the target output power of the historical battery energy storage system. The target output power of the historical battery energy storage system is the product of the rate protection coefficient and the initial output power of the historical battery energy storage system. The rate protection coefficient is the coefficient output by the PI controller after particle update. ΔSOC is the difference in state of charge between adjacent times. t2 is the second preset time. W5, W6, and W7 are all weight factors.

[0093] In this embodiment, W5+W6+W7=1. It should be noted that W5, W6, and W7 are used to convert each item into a dimensionless constant. The importance and priority of each item in the second objective function can be determined by adjusting the weight factor.

[0094] In this embodiment, t2 is the simulation time, and t2 can be set to 250 seconds.

[0095] In a specific example, the actual current corresponding to the initial output power of the battery energy storage system is filtered by a first-order filter; based on the integral of the deviation between the actual current of the battery energy storage system and the battery 1-rate reference current, the integral of the real-time frequency deviation of the power grid, and the integral of the difference in the state of charge at adjacent times, a parameter for evaluating the optimal parameter (K) of the PI controller is established. P and K I ) of the second objective function; using the particle swarm optimization algorithm combined with the second objective function to optimize K P and K I Solve the problem; use a PI controller to implement rate protection of the battery energy storage system to obtain a rate protection coefficient; and determine the target output power of the battery energy storage system based on the rate protection coefficient and the initial output power of the battery energy storage system.

[0096] Optionally, after performing PI adjustment on the output power of the initial battery energy storage system according to the target proportional integral coefficient, obtaining the target output power of the battery energy storage system includes:

[0097] Obtaining an actual current corresponding to the initial output power of the battery energy storage system;

[0098] A smoothed battery current is determined according to an actual current corresponding to the initial output power of the battery energy storage system, a Laplace operator, and a time parameter of a first-order filter.

[0099] In this embodiment, the smoothed battery current is determined based on the following formula:

[0100]

[0101] Among them, I f is the smoothed battery current, S is the Laplace operator (complex frequency domain variable), T f is the time parameter of the first-order filter, I batt It is the actual current corresponding to the initial output power of the battery energy storage system.

[0102] A rate protection coefficient is determined according to the target proportional-integral coefficient pair, the battery 1-rate reference current, and the smoothed battery current.

[0103] In this embodiment, the target proportional-integral coefficient pair includes a proportional coefficient and an integral coefficient.

[0104] In this embodiment, the rate protection factor is determined based on the following formula:

[0105]

[0106] Among them, K P is the proportionality coefficient, K I is the integral coefficient, I 1C-rate is the battery 1-rate reference current, K C-rate is the rate protection factor.

[0107] The product of the rate protection factor and the initial output power of the battery energy storage system is determined as the target output power of the battery energy storage system.

[0108] In this embodiment, the proportional coefficient is used to adjust the output of the PI controller according to the current error, and the integral coefficient is used to adjust the output of the PI controller according to the accumulated value of the error.

[0109] S150: Regulate the frequency of the power grid according to the target output power of the battery energy storage system.

[0110] In this embodiment, the battery energy storage system can compensate for power imbalance in the power grid by rapidly absorbing or releasing electrical energy and adjusting its output power, thereby regulating the grid frequency to maintain it near the rated value.

[0111] In this embodiment, the converter of the battery energy storage system quickly adjusts its operating state according to the target output power, controlling the magnitude and direction of the battery's charge and discharge current, thereby achieving precise regulation of the output power and, in turn, frequency modulation of the power grid.

[0112] In a specific example, Figure 2 As shown, obtain the standard frequency f of the power grid n The actual frequency f of the power grid is compared with the standard frequency of the power grid and the actual frequency of the power grid, and the real-time frequency deviation Δf and the real-time frequency deviation change rate of the power grid are determined according to the standard frequency of the power grid and the actual frequency of the power grid. The real-time frequency deviation and the real-time frequency deviation change rate of the power grid are input into the target fuzzy controller (the target gain coefficient pair of the target fuzzy controller is determined based on the particle swarm algorithm) to obtain the output power adjustment parameter ΔP. According to the output power adjustment parameter ΔP and the reference output power of the battery energy storage system, the initial output power P of the battery energy storage system is determined. batt Get P batt Corresponding I batt , according to the initial output power P of the battery energy storage system batt The corresponding actual current I batt and the battery 1-rate reference current I 1C-rate Input PI controller (according to the actual current I batt , Laplace operator S and time parameter T of the first-order filter f , determine the smoothed battery current I f , according to the proportionality coefficient K P , integral coefficient K I , Battery 1x rate reference current I 1C-rate and the smoothed battery current I f , determine the protection factor K C-rate ), and obtain the rate protection factor K C-rate ; The product of the rate protection coefficient and the initial output power of the battery energy storage system is determined as the target output power of the battery energy storage system, and frequency modulation is performed based on the target output power.

[0113] The technical solution of this embodiment first inputs the real-time frequency deviation of the power grid and the rate of change of the real-time frequency deviation into a target fuzzy controller to obtain the output power adjustment parameters of the battery energy storage system. Then, based on the output power adjustment parameters of the battery energy storage system and the reference output power of the battery energy storage system, the initial output power of the battery energy storage system is determined. After performing PI adjustment on the initial output power of the battery energy storage system, the target output power of the battery energy storage system is obtained. Finally, the power grid frequency is modulated according to the target output power of the battery energy storage system, thereby ensuring the stable operation of the power grid.

[0114] Example 2

[0115] Figure 3 This is a schematic diagram of the structure of a frequency modulation device provided by an embodiment of the present invention. This embodiment is applicable to the case of frequency modulation of the power grid. The device can be implemented in software and / or hardware. The device can be integrated into any device that provides frequency modulation function, such as Figure 3 As shown, the frequency modulation device specifically includes: an acquisition module 310 , an output power adjustment parameter determination module 320 , an initial output power determination module 330 , a target output power determination module 340 and a frequency modulation module 350 .

[0116] The acquisition module is configured to acquire the real-time frequency deviation and the real-time frequency deviation change rate of the power grid, wherein the power grid is the power grid to which the battery energy storage system is connected;

[0117] an output power adjustment parameter determination module, configured to input the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system, wherein a gain coefficient of the target fuzzy controller is determined based on a particle swarm algorithm;

[0118] an initial output power determination module, configured to determine the initial output power of the battery energy storage system based on an output power adjustment parameter of the battery energy storage system and a reference output power of the battery energy storage system;

[0119] a target output power determination module, configured to perform PI adjustment on the initial output power of the battery energy storage system to obtain the target output power of the battery energy storage system;

[0120] A frequency modulation module is used to modulate the frequency of the power grid according to the target output power of the battery energy storage system.

[0121] The above-mentioned product can execute the method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0122] Example 3

[0123] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0124] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0125] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0126] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the frequency modulation method.

[0127] In some embodiments, the frequency modulation method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the frequency modulation method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the frequency modulation method in any other suitable manner (e.g., by means of firmware).

[0128] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0129] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0130] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0132] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0133] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0134] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0135] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the frequency modulation method according to any embodiment of the present invention is implemented.

[0136] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0137] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A frequency modulation method, characterized in that: include: Obtaining a real-time frequency deviation and a real-time frequency deviation change rate of a power grid, wherein the power grid is the power grid to which the battery energy storage system is connected; Inputting the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system, wherein a gain coefficient of the target fuzzy controller is determined based on a particle swarm algorithm; Determining an initial output power of the battery energy storage system based on an output power adjustment parameter of the battery energy storage system and a reference output power of the battery energy storage system; After performing PI adjustment on the initial output power of the battery energy storage system, a target output power of the battery energy storage system is obtained; The power grid frequency is adjusted according to the target output power of the battery energy storage system.

2. The method according to claim 1, characterized in that Determining a target gain coefficient pair of the target fuzzy controller based on a particle swarm algorithm includes: According to a predefined particle swarm algorithm, each set of gain coefficient pairs in the gain coefficient set is used as a particle, and the position and velocity of each particle are initialized in the solution space, wherein the gain coefficient pair includes: a gain coefficient of an input parameter and an output parameter. The particle swarm algorithm is used to perform group iterative calculation on multiple particles and track the optimal particle in the solution space; Calculating the individual fitness value of each particle based on the real-time frequency deviation of the historical power grid, the real-time frequency deviation change rate of the historical power grid, the initial output power of the historical battery energy storage system, and the first objective function, and determining the global optimal fitness value based on the individual fitness values ​​of multiple particles, wherein the initial output power of the historical battery energy storage system is the output power obtained by inputting the real-time frequency deviation of the historical power grid and the real-time frequency deviation change rate of the historical power grid into the fuzzy controller based on particle updating; Update the speed and position of each particle to obtain the updated particle; Check whether the iteration meets the end condition. If not, continue to execute the step of calculating each particle based on the real-time frequency deviation of the historical power grid, the real-time frequency deviation change rate of the historical power grid, the output power of the historical battery energy storage system, and the first objective function, and determine the global optimal fitness value based on the individual fitness values ​​of the multiple particles after the update. If it meets the conditions, the target particle corresponding to the global optimal fitness value is determined as the target gain coefficient pair; the first objective function is: Among them, Δf is the real-time frequency deviation of the historical power grid, is the real-time frequency deviation change rate of the historical power grid, P batt To input the real-time frequency deviation and real-time frequency deviation change rate of the historical power grid into the fuzzy controller based on particle updating, the historical output power of the battery energy storage system is obtained. Min{OF1} is the individual fitness value of the particle in the gain coefficient set, t1 is the first preset time, and W1, W2, W3 and W4 are all weight factors.

3. The method according to claim 2, characterized in that Before inputting the real-time frequency deviation and the real-time frequency deviation change rate into the target fuzzy controller to obtain the output power adjustment parameter of the battery energy storage system, the method further includes: Obtaining a fuzzy set of real-time frequency deviation, a fuzzy set of real-time frequency deviation change rate, a fuzzy set of output power adjustment parameters, a membership function and a fuzzy control rule; A target fuzzy controller is constructed according to the fuzzy set of real-time frequency deviation, the fuzzy set of real-time frequency deviation change rate, the fuzzy set of output power adjustment parameters, the membership function, the target gain coefficient pair and the fuzzy control rule.

4. The method according to claim 3, characterized in that After performing PI regulation on the output power of the initial battery energy storage system, a target output power of the battery energy storage system is obtained, including: According to a predefined particle swarm algorithm, each set of proportional-integral coefficient pairs in the proportional-integral coefficient set is used as a particle, and the position and velocity of each particle are initialized in the solution space, wherein the proportional-integral coefficient pair includes: a proportional coefficient and an integral coefficient. The particle swarm algorithm is used to perform group iterative calculation on multiple particles and track the optimal particle in the solution space; Calculate the individual fitness value of each particle based on the battery 1x rate reference current of the battery energy storage system, the current of the historical battery energy storage system, the real-time frequency deviation of the historical power grid, the state of charge of the battery energy storage system, and the second objective function, and determine the global optimal fitness value based on the individual fitness values ​​of multiple particles, wherein the current of the historical battery energy storage system is the current corresponding to the target output power of the historical battery energy storage system output by inputting the initial output power of the historical battery energy storage system into the PI controller based on the particle update; Update the speed and position of each particle to obtain the updated particle; Check whether the iteration meets the end condition. If not, continue to perform the steps of calculating the individual fitness value of each particle according to the battery 1x rate reference current of the battery energy storage system, the historical current of the battery energy storage system, the real-time frequency deviation of the historical power grid, the state of charge of the battery energy storage system, and the second objective function, and determining the global optimal fitness value according to the updated individual fitness values ​​of the multiple particles. If the condition is met, determine the target particle corresponding to the global optimal fitness value as the target proportional integral coefficient pair; After PI adjustment is performed on the output power of the initial battery energy storage system according to the target proportional integral coefficient, the target output power of the battery energy storage system is obtained.

5. The method according to claim 4, characterized in that The second objective function is: Among them, Min{OF2} is the individual fitness value of the particle in the proportional integral coefficient set, and the I 1C-rate is the battery 1-rate reference current of the battery energy storage system, I batt is the current corresponding to the target output power of the historical battery energy storage system. The target output power of the historical battery energy storage system is the product of the rate protection coefficient and the initial output power of the historical battery energy storage system. The rate protection coefficient is the coefficient output by the PI controller after particle update. ΔSOC is the difference in state of charge between adjacent times. t2 is the second preset time. W5, W6, and W7 are all weight factors.

6. The method according to claim 5, characterized in that After performing PI adjustment on the output power of the initial battery energy storage system according to the target proportional integral coefficient, a target output power of the battery energy storage system is obtained, including: Obtaining an actual current corresponding to the initial output power of the battery energy storage system; determining a smoothed battery current based on an actual current corresponding to the initial output power of the battery energy storage system, a Laplace operator, and a time parameter of a first-order filter; determining a rate protection coefficient according to the target proportional-integral coefficient pair, the battery 1-rate reference current, and the smoothed battery current; The product of the rate protection factor and the initial output power of the battery energy storage system is determined as the target output power of the battery energy storage system.

7. A frequency modulation device, characterized in that: include: an acquisition module, configured to acquire a real-time frequency deviation and a real-time frequency deviation change rate of a power grid, wherein the power grid is the power grid to which the battery energy storage system is connected; an output power adjustment parameter determination module, configured to input the real-time frequency deviation and the real-time frequency deviation change rate into a target fuzzy controller to obtain an output power adjustment parameter of the battery energy storage system, wherein a gain coefficient of the target fuzzy controller is determined based on a particle swarm algorithm; an initial output power determination module, configured to determine the initial output power of the battery energy storage system based on an output power adjustment parameter of the battery energy storage system and a reference output power of the battery energy storage system; a target output power determination module, configured to perform PI adjustment on the initial output power of the battery energy storage system to obtain the target output power of the battery energy storage system; A frequency modulation module is used to modulate the frequency of the power grid according to the target output power of the battery energy storage system.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the frequency modulation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the frequency modulation method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the frequency modulation method according to any one of claims 1 to 6.