Optical storage and charging micro-grid frequency control method based on improved butterfly optimization algorithm

Through the improved butterfly optimization algorithm (GBOA), the problem of difficulty in adjusting flexible microgrid models in the existing technology is solved, and more efficient frequency control is achieved.

CN119692537AActive Publication Date: 2025-03-25SHANGHAI ELECTRIC POWER DESIGN INST +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411736487.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-25
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The prior art is difficult to effectively adjust the flexibility of the park microgrid model, especially under the requirements of distributed adjustable resources for the stable frequency of the microgrid.

Method used

The improved butterfly optimization algorithm (GBOA) is used to optimize the parameters of the PID controller, and the control signals are provided to distributed and adjustable resources through the microgrid collaborative control center to maintain supply and demand balance, and the optimal PID control parameters are obtained through data preprocessing and iterative optimization.

Benefits of technology

Better controller parameter adjustment is achieved, thereby better adjusting the flexibility of the microgrid model and improving the accuracy and stability of frequency control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692537A_ABST
    Figure CN119692537A_ABST
Patent Text Reader

Abstract

The invention discloses a light storage and charging micro-grid frequency control method based on an improved butterfly optimization algorithm, and the method comprises the steps: in centralized control, a park micro-grid cooperative control center has distributed adjustable resources; the park micro-grid cooperative control center central controller allocates a signal corresponding to the target power demand from the distributed adjustable resources; the distributed adjustable resources monitored by the EMS of the park micro-grid cooperative control center specifically comprise EV, WTG and PV; a controller used together with the PV and the EV executes necessary monitoring control operation to report necessary electrical parameters to a microgrid control center; the EMS sends a signal to the controller so as to adjust power generation and maintain power balance; comprising the steps that a PID controller is adopted in a control system of a controller, and the input is the deviation between the set frequency and the actual collection frequency of the control system; pID control parameters are obtained through an improved butterfly optimization algorithm. According to the method, the parameters of the controller can be better adjusted, so that the flexibility of the VPP model is better adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer energy management, and in particular to a frequency control method for a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm. Background Art

[0002] In the existing technology, a campus microgrid with a powerful computer energy management system (EMS) has the potential to solve this demand. The microgrid allows the dynamic participation of distributed adjustable resources, power plants and energy storage systems (ESS) to maintain the demand-supply balance of the power grid on the current time scale. Some research institutions have studied the hierarchical control strategies and coordinated EMS algorithms for the frequency stability of the campus microgrid. However, the control strategies proposed in these literatures are still mature control structures similar to traditional power systems, which are not suitable for the requirements of distributed adjustable resources for the frequency stability of microgrids under new power systems.

[0003] In terms of optimization algorithms, optimization techniques and control strategies for microgrids / interconnected networks have also attracted research attention. Some optimization techniques, such as genetic algorithm (GA), particle swarm optimization (PSO) and social spider algorithm (SSA), have been studied for this purpose.

[0004] However, compared with the above-mentioned existing technologies and other meta-heuristic algorithms, the Butterfly Optimization Algorithm (BOA) provides better solutions in solving several complex engineering problems.

[0005] Therefore, how to better adjust the controller parameters to better regulate the flexibility of the park microgrid model has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] In view of the above-mentioned defects of the prior art, the present invention provides a frequency control method for a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm, the purpose of which is to better adjust the controller parameters and thus better regulate the flexibility of the microgrid model.

[0007] To achieve the above-mentioned purpose, the present invention discloses a frequency control method for a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm, wherein a park microgrid collaborative control center provides a control signal to distributed adjustable resources to maintain a balance between supply and demand, and in centralized control, the park microgrid collaborative control center has distributed adjustable resources;

[0008] The central controller of the park microgrid collaborative control center distributes signals corresponding to the target power demand from the distributed adjustable resources;

[0009] The distributed adjustable resources monitored by the EMS of the park microgrid collaborative control center specifically include EV, WTG and PV;

[0010] The controller used with PV and EV performs the necessary monitoring and control operations to report the necessary electrical parameters to the microgrid control center;

[0011] The EMS sends signals to the controller to adjust power generation and maintain power balance;

[0012] The control system including the controller adopts a PID controller;

[0013] The input of the PID controller is the deviation between the set frequency of the control system and the actual acquisition frequency;

[0014] The PID control parameters are obtained through the following steps:

[0015] Step 1: Set the basic parameters of the algorithm through data preprocessing;

[0016] Step 2: Initialize the population size N, set the maximum number of iterations Iter_max, and the current number of iterations Iter = 1;

[0017] Step 3, determine whether the previous iteration number Iter is greater than the maximum iteration number Iter_max;

[0018] If yes, then all processes are terminated and the optimal solution is output, i.e., the PID control parameters, including the PID control ratio K. P 、PID control integral K I and the differential gain parameter K of PID control D ;

[0019] If not, continue with the next steps;

[0020] Step 4: Calculate the scent concentration of all butterflies;

[0021] Step 5: Find the optimal i-th butterfly individual g*;

[0022] Step 6: Determine whether i is greater than N;

[0023] If yes, skip the subsequent steps and go to step 13;

[0024] If not, continue with the next steps;

[0025] Step 7: Generate a random factor r in the range of [0,1] and update the switching frequency p;

[0026] Step 8: Determine whether the random factor r is greater than the switching frequency p, and update the solution vector x of the i-th butterfly in the next iteration Iter+1. i ;

[0027] If so, enter the global search phase for update;

[0028] If not, enter the local search phase for update;

[0029] Step 9: Calculate the solution vector x of the i-th butterfly in the next iteration Iter+1 after the update i Fitness

[0030] Step 10: Judgement Is it greater than

[0031] If yes, continue with the next steps;

[0032] If not, skip step 11 and proceed to step 12;

[0033] Step 11: Use The corresponding replace

[0034] Step 12: Use Replace g*;

[0035] Step 13: Update the power index a of the butterfly optimization algorithm;

[0036] Step 14: Add Iter+1 and execute step 3 again.

[0037] Preferably, in step 1, the basic parameters include the target frequency f d , actual frequency f a , dimension D, search boundary SB, lower limit p of dynamic switching probability min and upper limit p max , the time range T of the optimization objective function J, the perception mode c of the butterfly optimization algorithm, and the power index a of the butterfly optimization algorithm.

[0038] More preferably, the standard frequency f d It is manually set to 50Hz; the actual frequency f a The dimension D is the parameter dimension of each individual, indicating the number of parameters to be optimized, that is, the PID control parameters, specifically including the proportion K of the PID control P 、The integral K of the PID control I and the differential gain parameter K of the PID control D; The search boundary SB is the value range of each parameter; the perception mode c of the butterfly optimization algorithm and the power index a of the butterfly optimization algorithm are both [0,1]; the maximum number of iterations Iter_max is the maximum number of generations of the algorithm running, between 100 and 1000; the random factor r is used to introduce randomness when updating the position, and its value is [0,1]; the population size N represents how many individuals / solutions there are in each generation, between 10 and 50.

[0039] More preferably, the search boundary SB is specifically as follows:

[0040] K P min ≤K P ≤K P max ;

[0041] K I min ≤K I ≤K I max ;

[0042] K D min ≤K D ≤K D max ;

[0043] Among them, K P min The minimum proportional gain of the PID controller; K P max The maximum proportional gain of the PID controller; K I min The minimum integral gain of the PID controller; K I max The maximum integral gain of the PID controller; K D min The minimum differential gain of the PID controller; K D max The maximum value of the derivative gain of the PID controller.

[0044] More preferably, the formula for calculating the fragrance concentration of all butterflies in step 4 is as follows:

[0045] f=cI a ;

[0046] Wherein, f is the perceived intensity of each butterfly in the scent concentration matrix of the butterfly;

[0047] I is the stimulus intensity matrix, specifically [K P , K I , KD ].

[0048] More preferably, in step 7, the formula for updating the switching frequency p is as follows:

[0049]

[0050] More preferably, in step 8, the formula for entering the global search phase to update the position is as follows:

[0051]

[0052] in, is the solution vector x of the i-th butterfly in the current iteration Iter i ;

[0053] is the solution vector x of the kth butterfly in the current iteration Iter k ;

[0054] is the solution vector x of the i-th butterfly in the next iteration Iter+1 i ;

[0055] f i is the solution vector x of the ith butterfly i The fragrance concentration of the corresponding butterfly;

[0056] q is the weight factor;

[0057] More preferably, in step 8, the formula for entering the local search phase to update the position is as follows:

[0058]

[0059] in, is the solution vector x of the i-th butterfly in the current iteration Iter i ;

[0060] is the solution vector x of the jth butterfly in the current iteration Iter j ;

[0061] is the solution vector x of the kth butterfly in the current iteration Iter k ;

[0062] is the solution vector x of the i-th butterfly in the next iteration Iter+1 i ;

[0063] f iis the solution vector x of the ith butterfly i The fragrance concentration of the corresponding butterfly;

[0064] q is the weight factor;

[0065] More preferably, in step 9, any Fitness The calculation formula is as follows:

[0066]

[0067] Among them, e d is the frequency deviation of the microgrid;

[0068] e s is the tie line deviation of the microgrid;

[0069] e m is the main grid frequency deviation outside the microgrid.

[0070] Beneficial effects of the present invention:

[0071] The present invention can better adjust the controller parameters, thereby better regulating the flexibility of the microgrid model.

[0072] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 A flow chart showing an improved butterfly optimization algorithm for obtaining PID control parameters in one embodiment of the present invention. DETAILED DESCRIPTION

[0074] Example

[0075] like Figure 1 As shown, the frequency control method of the photovoltaic storage and charging microgrid based on the improved butterfly optimization algorithm, the microgrid collaborative control center provides control signals to the distributed adjustable resources to maintain the balance between supply and demand. In the centralized control, the microgrid collaborative control center has distributed adjustable resources;

[0076] In practical applications, distributed adjustable resources can be controlled resources, such as battery packs, which can be controlled to charge or discharge.

[0077] The central controller of the microgrid collaborative control center distributes signals corresponding to the target power demand from the distributed adjustable resources;

[0078] The distributed adjustable resources monitored by the EMS of the microgrid collaborative control center specifically include EV, WTG, and PV;

[0079] The controller used with PV and EV performs the necessary monitoring and control operations to report the necessary electrical parameters to the microgrid control center;

[0080] The EMS sends signals to the controller to adjust power generation and maintain power balance;

[0081] The control system including the controller adopts a PID controller;

[0082] The input of the PID controller is the deviation between the set frequency of the control system and the actual acquisition frequency;

[0083] The PID control parameters are obtained through the following steps:

[0084] Step 1: Set the basic parameters of the algorithm through data preprocessing;

[0085] Step 2: Initialize the population size N, set the maximum number of iterations Iter_max, and the current number of iterations Iter = 1;

[0086] Step 3, determine whether the previous iteration number Iter is greater than the maximum iteration number Iter_max;

[0087] If yes, then end all processes and output the optimal solution, i.e., the PID control parameters, including the PID control ratio K. P 、PID control integral K I and the differential gain parameter K of PID control D ;

[0088] If not, continue with the next steps;

[0089] Step 4: Calculate the scent concentration of all butterflies;

[0090] Step 5: Find the optimal i-th butterfly individual g*;

[0091] Step 6: Determine whether i is greater than N;

[0092] If yes, skip the subsequent steps and go to step 13;

[0093] If not, continue with the next steps;

[0094] Step 7: Generate a random factor r in the range of [0,1] and update the switching frequency p;

[0095] Step 8: Determine whether the random factor r is greater than the switching frequency p, and update the solution vector x of the i-th butterfly in the next iteration Iter+1 i ;

[0096] If so, enter the global search phase for update;

[0097] If not, enter the local search phase for update;

[0098] Step 9: Calculate the solution vector x of the i-th butterfly in the next iteration Iter+1 after the update i Fitness

[0099] Step 10: Judgement Is it greater than

[0100] If yes, continue with the next steps;

[0101] If not, skip step 11 and proceed to step 12;

[0102] Step 11: Use The corresponding replace

[0103] Step 12: Use Replace g*;

[0104] Step 13: Update the power index a of the butterfly optimization algorithm;

[0105] Step 14: Add Iter+1 and execute step 3 again.

[0106] In some embodiments, in step 1, the basic parameters include the target frequency f d , actual frequency f a , dimension D, search boundary SB, lower limit p of dynamic switching probability min and upper limit p max , the time range T of the optimization objective function J, the perception mode c of the butterfly optimization algorithm, and the power index a of the butterfly optimization algorithm.

[0107] In some embodiments, the standard frequency f d Manually set to 50Hz; actual frequency f a It is collected through the microgrid; the dimension D is the parameter dimension of each individual, which represents the number of parameters to be optimized, that is, the PID control parameters, including the proportion K of PID control. P 、PID control integral K I and the differential gain parameter K of PID control D; The search boundary SB is the value range of each parameter; the perception mode c of the butterfly optimization algorithm and the power index a of the butterfly optimization algorithm are both [0,1]; the maximum number of iterations Iter_max is the maximum number of generations of the algorithm, between 100 and 1000; the random factor r is used to introduce randomness when updating the position, and its value is [0,1]; the population size N indicates how many individuals / solutions there are in each generation, between 10 and 50.

[0108] In some embodiments, the search boundary SB is specifically as follows:

[0109] K P min ≤K P ≤K P max ;

[0110] K I min ≤K I ≤K I max ;

[0111] K D min ≤K D ≤K D max ;

[0112] Among them, K P min The minimum proportional gain of the PID controller; K P max The maximum proportional gain of the PID controller; K I min The minimum integral gain of the PID controller; K I max The maximum integral gain of the PID controller; K D min The minimum differential gain of the PID controller; K D max The maximum value of the derivative gain of the PID controller.

[0113] In practical applications, the search boundary SB can ensure that the optimization result is within a reasonable range.

[0114] In some embodiments, the formula for calculating the scent concentration of all butterflies in step 4 is as follows:

[0115] f=cI a ;

[0116] Wherein, f is the perceived intensity of each butterfly in the scent concentration matrix of the butterfly;

[0117] I is the stimulus intensity matrix, specifically [K P , K I , K D ].

[0118] In some embodiments, in step 7, the formula for updating the switching frequency p is as follows:

[0119]

[0120] In some embodiments, in step 8, the formula for entering the global search phase to update the position is as follows:

[0121]

[0122] in, is the solution vector x of the i-th butterfly in the current iteration Iter i ;

[0123] is the solution vector x of the kth butterfly in the current iteration Iter k ;

[0124] is the solution vector x of the i-th butterfly in the next iteration Iter+1 i ;

[0125] f i is the solution vector x of the ith butterfly i The fragrance concentration of the corresponding butterfly;

[0126] q is the weight factor;

[0127] In some embodiments, in step 8, the formula for entering the local search phase to update the position is as follows:

[0128]

[0129] in, is the solution vector x of the i-th butterfly in the current iteration Iter i ;

[0130] is the solution vector x of the jth butterfly in the current iteration Iter j ;

[0131] is the solution vector x of the kth butterfly in the current iteration Iter k ;

[0132] is the solution vector x of the i-th butterfly in the next iteration Iter+1i ;

[0133] f i is the solution vector x of the ith butterfly i The fragrance concentration of the corresponding butterfly;

[0134] q is the weight factor;

[0135] In some embodiments, in step 9, any Fitness The calculation formula is as follows:

[0136]

[0137] Among them, e d is the frequency deviation of the microgrid;

[0138] e s is the tie line deviation of the microgrid;

[0139] e m is the main grid frequency deviation outside the microgrid.

[0140] In practical applications, the main goal of the park microgrid is to maintain a balance between supply and demand without considering the random changes in power generation and load. To this end, the frequency control strategy of the park microgrid under the new power system minimizes the imbalance of the park power frequency.

[0141] Therefore, the integral of the square error (ISE) of the frequency deviation of the microgrid, the tie line and the main grid frequency deviation is taken as the objective function (J), which is expressed as follows:

[0142]

[0143] Among them, the frequency deviation of the virtual power plant is: d , tie line deviation: e s , main network frequency deviation: e m , time range considered: T.

[0144] 1.2 Controller Design

[0145] In the photovoltaic storage microgrid system, a PID controller is designed to calculate the frequency deviation and feed it back to the objective function to implement the PID controller and calculate the frequency deviation. We will combine the frequency target and actual frequency of the microgrid to calculate the deviation and feed it back to the objective function middle.

[0146] The output of the PID controller is calculated based on the current error (the difference between the target frequency and the actual frequency). The output formula of the controller is:

[0147] e(t)=f d -f a Formula 2

[0148]

[0149] Among them, set the target frequency: f d , actual frequency: f a Frequency error: e(t), PID controller output: u(t), K P , K I , K D are the proportional, integral and derivative gain parameters of PID control, and the constraints are:

[0150] K P min ≤K P ≤K P max Formula 4

[0151] K I min ≤K I ≤K I max Formula 5

[0152] K D min ≤K D ≤K D max ; Formula 6

[0153] Optimization process: The target frequency is initially set manually, and the actual frequency is collected in real time by the EMS system. The frequency error is then calculated and brought into Formula 1 to calculate the integral square error to obtain the optimal proportional, integral and differential gain parameters in PID control. The update of the actual frequency can be adjusted through the controller output u(t) of Formula 7 to complete the frequency control.

[0154] f a (t+Δt)=f a (t)+u(t)*Δt Formula 7

[0155] 1.3 Control strategy

[0156] The campus microgrid must provide control signals to distributed adjustable resources to maintain a balance between supply and demand. Therefore, this patent proposes the concept of using centralized control in an available architecture, such as in centralized control, the microgrid has electrical signal status information of distributed adjustable resources, so the central controller distributes signals corresponding to target power demand from distributed adjustable resources.

[0157] The EMS in a microgrid manages prosumer resources such as controllable loads, such as electric vehicle charging stations and power plants.

[0158] EV, WTG and PV are distributed adjustable resources monitored by EMS. The controller used with PV and EV performs the necessary monitoring and control operations to report the necessary electrical parameters to the microgrid control center to adjust the power generation and maintain power balance. The control system has adopted a PID controller. The input of the controller is the deviation between the set frequency of the system and the actual acquisition frequency. This patent innovation proposes to use a modified butterfly optimization algorithm (GBOA) to optimize frequency control.

[0159] In the traditional butterfly optimization algorithm (BOA), each butterfly has its own unique fragrance and individual tactile ability, which is also a major feature that distinguishes it from other swarm intelligence optimization algorithms. The principle of butterfly fragrance production mainly involves three important concepts, namely perception mode, stimulus intensity and power index. In this patented improved butterfly optimization algorithm (GBOA), c is used to represent the perception mode value of [0, 1], the power index a is [0, 1], and the stimulus intensity matrix I is [K P , K I , K D ], so in GBOA, fragrance is expressed as a function of the physical intensity of the stimulus as follows

[0160] f=cI a Formula 8

[0161] Among them, f is the perceived intensity of the fragrance, that is, the intensity of the fragrance perceived by other butterflies. The algorithm has two key steps: the local search stage and the global search stage. In the global search stage, the butterfly takes a step towards the most suitable butterfly / solution "g*". In order to address the problem of slow convergence and low search accuracy of BOA during global search, the GBOA algorithm proposed in this patent introduces the weight factor q into the formulas of global search and local search. When the q value is small, the speed and accuracy of GBOA's early search can be improved; when the q value gradually increases, the search accuracy of GBOA at the later local optimal point can be improved. The weight factor q can be expressed as

[0162]

[0163] Among them, Iter and Iter_max represent the current number of iterations and the maximum number of iterations respectively.

[0164] The global search phase can be expressed as:

[0165]

[0166] in is the solution vector x of the i-th butterfly in the iteration parameter ti Here g* represents the current best solution found among all solutions in the current iteration. The scent of the butterfly is represented by f i Indicates that r is a random number in [0,1].

[0167] The local search phase can be expressed as

[0168]

[0169] in and are the jth and kth butterflies from the solution space. If and belong to the same group, and r is a random number in [0,1], then formula (12) becomes a local random walk.

[0170] The global search and local search in the traditional BOA algorithm are controlled by the switching probability p. Although the BOA algorithm has considered the balance between global search capability and local search capability, since the switching probability p is a constant, it cannot adapt to the dynamic adjustment of global search capability and local search capability during the algorithm iteration process. This patent proposes that the GBOA algorithm uses a dynamic switching probability to balance the proportion of global search capability and local search capability. p will gradually increase the probability of local search as the number of iterations increases, thereby achieving a better optimization strategy. In the early stage of the optimization iteration, the global search is focused on, so as to quickly locate the approximate position of the global optimal solution in the search space, and then in the later stage of the iteration, the local search capability should be enhanced to improve the optimization accuracy of the algorithm.

[0171]

[0172] Among them, p min , p max They represent the lower and upper limits of the dynamic switching probability respectively, Iter and Iter_max represent the current number of iterations and the maximum number of iterations respectively.

[0173] Microgrid-based dynamic control can enhance the system dynamics of the power system while increasing the share of renewable energy sources while improving the capacity and reliability of transmitted energy.

[0174] This patent establishes a frequency control model for a photovoltaic storage and charging microgrid under a new power system, with the integral of the square error (ISE) of the frequency deviation, the tie line and the main grid frequency deviation as the objective function.

[0175] In terms of control strategy, this patent proposes an improved butterfly optimization algorithm (GBOA) analysis to confirm the advantages of the PID controller, and the control strategy of the interconnected microgrid can be adopted to achieve frequency optimization and regulation.

[0176] Based on the BOA algorithm, this patent proposes a method of dynamic switching probability to balance the proportion of global search capability and local search capability, so as to improve the algorithm's optimization accuracy.

[0177] This patent proposes to introduce a weight factor q into the global search and local search formulas, which can not only improve the speed and accuracy of GBOA's early search, but also improve the search accuracy of GBOA's local optimal point in the later stage.

[0178] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A frequency control method for a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm. The park microgrid collaborative control center provides control signals to distributed adjustable resources to maintain a balance between supply and demand. The method is characterized by: In centralized control, the park microgrid collaborative control center has distributed adjustable resources; The central controller of the park microgrid collaborative control center distributes signals corresponding to the target power demand from the distributed adjustable resources; The distributed adjustable resources monitored by the EMS of the park microgrid collaborative control center specifically include EV, WTG and PV; The controller used with PV and EV performs the necessary monitoring and control operations to report the necessary electrical parameters to the microgrid control center; The EMS sends signals to the controller to adjust power generation and maintain power balance; The control system including the controller adopts a PID controller; The input of the PID controller is the deviation between the set frequency of the control system and the actual acquisition frequency; The PID control parameters are obtained through the following steps: Step 1: Set the basic parameters of the algorithm through data preprocessing; Step 2: Initialize the population size N, set the maximum number of iterations Iter_max, and the current number of iterations Iter = 1; Step 3, determine whether the previous iteration number Iter is greater than the maximum iteration number Iter_max; If yes, then all processes are terminated and the optimal solution is output, i.e., the PID control parameters, including the PID control ratio K. P 、PID control integral K I and the differential gain parameter K of PID control D ; If not, continue with the next steps; Step 4: Calculate the scent concentration of all butterflies; Step 5: Find the optimal i-th butterfly individual g*; Step 6: Determine whether i is greater than N; If yes, skip the subsequent steps and go to step 13; If not, continue with the next steps; Step 7: Generate a random factor r in the range of [0,1] and update the switching frequency p; Step 8: Determine whether the random factor r is greater than the switching frequency p, and update the solution vector x of the i-th butterfly in the next iteration Iter+1. i ; If so, enter the global search phase for update; If not, enter the local search phase for update; Step 9: Calculate the solution vector x of the i-th butterfly in the next iteration Iter+1 after the update i Fitness Step 10: Judgement Is it greater than If yes, continue with the next steps; If not, skip step 11 and proceed to step 12; Step 11: Use The corresponding replace Step 12: Use Replace g*; Step 13: Update the power index a of the butterfly optimization algorithm; Step 14: Add Iter+1 and execute step 3 again.

2. The method for controlling the frequency of a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm according to claim 1 is characterized in that: In step 1, the basic parameters include the target frequency f d , actual frequency f a , dimension D, search boundary SB, lower limit p of dynamic switching probability min and upper limit p max , the time range T of the optimization objective function J, the perception mode c of the butterfly optimization algorithm, and the power index a of the butterfly optimization algorithm.

3. The frequency control method of the photovoltaic storage and charging microgrid based on the improved butterfly optimization algorithm according to claim 2 is characterized in that: The standard frequency f d It is manually set to 50Hz; the actual frequency f a The dimension D is the parameter dimension of each individual, indicating the number of parameters of the problem to be optimized, that is, the PID control parameters, specifically including the proportion K of the PID control P 、The integral K of the PID control I and the differential gain parameter K of the PID control D ; The search boundary SB is the value range of each parameter; the perception mode c of the butterfly optimization algorithm and the power index a of the butterfly optimization algorithm are both [0,1]; the maximum number of iterations Iter_max is the maximum number of generations of the algorithm running, between 100 and 1000; the random factor r is used to introduce randomness when updating the position, and its value is [0,1]; the population size N represents how many individuals / solutions there are in each generation, between 10 and 50.

4. The method for controlling the frequency of a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm according to claim 2 is characterized in that: The search boundary SB is specifically as follows: K P min ≤K P ≤K P max ; K I min ≤K I ≤K I max ; K D min ≤K D ≤K D max ; Among them, K P min The minimum proportional gain of the PID controller; K P max The maximum proportional gain of the PID controller; K I min The minimum integral gain of the PID controller; K I max The maximum integral gain of the PID controller; K D min The minimum differential gain of the PID controller; K D max The maximum value of the derivative gain of the PID controller. In practical applications, the search boundary SB can ensure that the optimization result is within a reasonable range.

5. The method for controlling the frequency of a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm according to claim 4 is characterized in that: The formula for calculating the scent concentration of all butterflies in step 4 is as follows: f=cI a ; Wherein, f is the perceived intensity of each butterfly in the scent concentration matrix of the butterfly; I is the stimulus intensity matrix, specifically [K P , K I , K D ].

6. The frequency control method of the photovoltaic storage and charging microgrid based on the improved butterfly optimization algorithm according to claim 5 is characterized in that: In step 7, the formula for updating the switching frequency p is as follows:

7. The method for controlling the frequency of a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm according to claim 1 is characterized in that: In step 8, the formula for entering the global search phase to update the position is as follows: in, is the solution vector x of the i-th butterfly in the current iteration Iter i ; is the solution vector x of the kth butterfly in the current iteration Iter k ; is the solution vector x of the i-th butterfly in the next iteration Iter+1 i ; f i is the solution vector x of the ith butterfly i The fragrance concentration of the corresponding butterfly; q is the weight factor; 8. The method for controlling the frequency of a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm according to claim 1 is characterized in that: In step 8, the formula for entering the local search phase to update the position is as follows: in, is the solution vector x of the i-th butterfly in the current iteration Iter i ; is the solution vector x of the jth butterfly in the current iteration Iter j ; is the solution vector x of the kth butterfly in the current iteration Iter k ; is the solution vector x of the i-th butterfly in the next iteration Iter+1 i ; f i is the solution vector x of the ith butterfly i The fragrance concentration of the corresponding butterfly; q is the weight factor; 9. The method for controlling the frequency of a photovoltaic storage and charging microgrid based on an improved butterfly optimization algorithm according to claim 7 or 8, characterized in that: In step 9, either Fitness The calculation formula is as follows: Among them, e d is the frequency deviation of the microgrid; e s is the tie line deviation of the microgrid; e m is the main grid frequency deviation outside the microgrid.

Citation Information

Patent Citations

  • Energy coordination control method of off-grid direct-current microgrid

    CN111900711A

  • Energy storage site selection method based on improved butterfly optimization algorithm

    CN117372080A

  • Dynamic frequency control scheme for microgrids using energy storage

    US20180090936A1

  • Control system for microgrids for the production and distribution of electric power coming from multiple production sources of different types, and control method thereof

    US20190341781A1

  • Method for stabilizing an autonomous microgrid including an active load

    US20200343731A1