Frequency control method for microgrid with optical storage based on improved butterfly optimization algorithm
By combining an improved butterfly optimization algorithm with a PID controller, the frequency control of the microgrid is optimized, which solves the flexibility problem of distributed resources under the new power system, realizes frequency stability and supply-demand balance, and improves the system dynamics and renewable energy utilization.
Patent Information
- Application Number
- CN202411736487.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Existing microgrid frequency control strategies cannot effectively adapt to the flexibility requirements of distributed adjustable resources under new power systems. Traditional control structures are not applicable and it is difficult to achieve supply and demand balance.
An improved butterfly optimization algorithm is adopted, combined with a PID controller, and control signals are sent to distributed adjustable resources through the microgrid collaborative control center. The frequency is adjusted using resources such as EV, WTG and PV, and the PID control parameters are optimized. The global and local search capabilities are balanced by dynamic switching probability and weight factor q to optimize frequency control.
It achieves better frequency control, improves the flexibility and frequency stability of microgrid models, reduces power frequency imbalance, and enhances system dynamics and the utilization of renewable energy.
Smart Images

Figure CN119692537B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer energy management, in particular to a frequency control method for a light storage and charging micro-grid based on an improved butterfly optimization algorithm. BACKGROUND
[0002] In the prior art, a park micro-grid with a powerful computer energy management system (EMS) has the potential to solve this demand. The micro-grid allows distributed adjustable resources, power plants and energy storage systems (ESS) to dynamically participate in maintaining the demand-supply balance of the power grid at the current time scale. Some research institutions have studied hierarchical control strategies and coordinated EMS algorithms for system frequency stability of park micro-grids, but the control strategies proposed in these documents are similar to the mature control structure of traditional power systems, which is not suitable for the requirements of distributed adjustable resources for micro-grid frequency stability in new power systems.
[0003] In terms of optimization algorithms, optimization techniques and control strategies for micro-grids / interconnected networks have also attracted research attention. Some optimization techniques, such as genetic algorithm technology (GA), particle swarm algorithm technology (PSO) and social spider algorithm technology (SSA), have been studied for this purpose.
[0004] However, compared with other meta-heuristic algorithms, the butterfly optimization algorithm (BOA) provides better solutions to several complex engineering problems.
[0005] Therefore, how to better adjust the controller parameters to better adjust the flexibility of the park micro-grid model has become a technical problem that needs to be solved by those skilled in the art. SUMMARY
[0006] In view of the above defects of the prior art, the present application provides a frequency control method for a light storage and charging micro-grid based on an improved butterfly optimization algorithm, which aims to better adjust the controller parameters to better adjust the flexibility of the micro-grid model.
[0007] To achieve the above-mentioned purpose, the present application discloses a frequency control method for a light storage and charging micro-grid based on an improved butterfly optimization algorithm. The park micro-grid collaborative control center provides control signals to distributed adjustable resources to maintain supply and demand balance. In centralized control, the park micro-grid collaborative control center has distributed adjustable resources.
[0008] The park micro-grid collaborative control center central controller 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 micro-grid collaborative control center specifically include EVs, WTGs and PVs.
[0010] The controller used with the PV and EV performs necessary monitoring control operations to report necessary electrical parameters to the microgrid control center;
[0011] The EMS sends a signal to the controller to adjust power generation and maintain power balance;
[0012] The control system including the controller employs a PID controller;
[0013] The input of the PID controller is the deviation of the set frequency and the actual collected frequency of the control system;
[0014] The PID control parameters are obtained by 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 number of iterations Iter is greater than the maximum number of iterations Iter_max;
[0018] If yes, end all processes and output the optimal solution, that is, the PID control parameters, specifically including the proportional K P of PID control, the integral K I of PID control, and the differential gain parameter K D of PID control;
[0019] If no, continue to execute the subsequent 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 execute step 13;
[0024] If no, continue to execute the subsequent steps;
[0025] Step 7, generate a random factor r in the range [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 i of the i-th butterfly in the next iteration number Iter+1;
[0027] If yes, then enter the global search stage to update;
[0028] If no, then enter the local search stage to update;
[0029] Step 9, calculate the solution vector x of the i-th butterfly in the next iteration Iter+1 after updating i of the fitness function
[0030] Step 10, judge whether it is greater than
[0031] If yes, continue to execute the subsequent steps;
[0032] If no, skip step 11 and execute step 12;
[0033] Step 11, replace with corresponding to
[0034] Step 12, replace g* with
[0035] Step 13, update the power index a of the butterfly optimization algorithm;
[0036] Step 14, re-execute step 3 after Iter+1.
[0037] Preferably, in step 1, the basic parameters include target frequency f d , actual frequency f a , dimension D, search boundary SB, lower limit p min and upper limit p max of dynamic switching probability, time range T of optimization objective function J, perception mode c of the butterfly optimization algorithm, and power index a of the butterfly optimization algorithm.
[0038] More preferably, the target frequency f d is manually set to 50Hz; the actual frequency f a is obtained by micro-grid collection; the dimension D is the parameter dimension of each individual, indicating the number of parameters of the problem to be optimized, i.e. the PID control parameters, specifically including the proportional K P of the PID control, the integral K I of the PID control, and the differential gain parameter K D ; the search boundary SB is the value range of each parameter; the value of 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 iteration number Iter max is the maximum number of iterations of the algorithm, between 100 and 1000; the random factor r is used to introduce randomness when updating the position, and the 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] wherein, K P min PID controller proportional gain minimum value; K P max PID controller proportional gain maximum value; K I min PID controller integral gain minimum value; K I max PID controller integral gain maximum value; K D min PID controller differential gain minimum value; K D max PID controller differential gain maximum value.
[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 perception intensity of each butterfly in the fragrance concentration matrix of the butterfly;
[0047] I is the stimulation 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 updating the position in the global search phase is as follows:
[0051]
[0052] wherein, is the solution vector x of the i-th butterfly in the current iteration number Iter i ;
[0053] is the solution vector x of the k-th butterfly in the current iteration number Iter k ;
[0054] is the solution vector x of the i-th butterfly in the next iteration number Iter+1 i ;
[0055] f i is the solution vector x of the i-th butterfly i corresponding to the scent concentration of the butterfly;
[0056] q is a weight factor;
[0057] More preferably, in step 8, the formula for updating the position in the local search phase is as follows:
[0058]
[0059] wherein, is the solution vector x of the i-th butterfly in the current iteration number Iter i ;
[0060] is the solution vector x of the j-th butterfly in the current iteration number Iter j ;
[0061] is the solution vector x of the k-th butterfly in the current iteration number Iter k ;
[0062] is the solution vector x of the i-th butterfly in the next iteration number Iter+1 i ;
[0063] f iThe solution vector x of the i-th butterfly i The corresponding fragrance concentration of the butterfly;
[0064] q is the weighting factor;
[0065] More preferably, in step 9, any fitness The calculation formula is as follows:
[0066]
[0067] Among them, e d For the frequency deviation of the microgrid;
[0068] e s For the wiring deviation of the microgrid;
[0069] e m This refers to the frequency deviation of the main grid outside the microgrid.
[0070] The beneficial effects of this invention are:
[0071] This invention enables better adjustment of controller parameters, thereby improving the flexibility of the microgrid model.
[0072] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0073] Figure 1 The flowchart illustrates the improved butterfly optimization algorithm for obtaining PID control parameters in one embodiment of the present invention. Detailed Implementation
[0074] Example
[0075] like Figure 1 As shown, the frequency control method for photovoltaic-storage-charging microgrids based on the improved butterfly optimization algorithm provides control signals to distributed adjustable resources in order to maintain supply and demand balance. In centralized control, the microgrid collaborative control center has distributed adjustable resources.
[0076] In practical applications, distributed adjustable resources are resources that can be controlled, such as battery packs, which can be controlled to charge and discharge.
[0077] The central controller of the microgrid collaborative control center allocates signals corresponding to the target power demand from 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 the PV and EV performs necessary monitoring control operations to report necessary electrical parameters to the microgrid control center;
[0080] The EMS sends a signal 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 of the set frequency and the actual collected frequency of the control system;
[0083] The PID control parameters are obtained by 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, judge whether the previous number of iterations Iter is greater than the maximum number of iterations Iter_max;
[0087] If yes, end all processes and output the optimal solution, that is, the PID control parameters, including the proportional K P of the PID control, the integral K I of the PID control, and the differential gain parameter K D of the PID control;
[0088] If not, continue to execute the following 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, judge whether i is greater than N;
[0092] If yes, skip the subsequent steps and execute step 13;
[0093] If not, continue to execute the subsequent steps;
[0094] Step 7, generate a random factor r in the range [0, 1] and update the switching frequency p;
[0095] Step 8, judge whether the random factor r is greater than the switching frequency p, and update the solution vector x i of the i-th butterfly in the next iteration number Iter+1;
[0096] If yes, then go to the global search stage to update;
[0097] If no, then go to the local search stage to update;
[0098] Step 9, calculate the solution vector x of the i-th butterfly in the next iteration Iter+1 after updating i of the fitness function
[0099] Step 10, judge whether is greater than
[0100] If yes, continue to execute the subsequent steps;
[0101] If no, skip step 11 and execute step 12;
[0102] Step 11, replace with corresponding to
[0103] Step 12, replace g* with
[0104] Step 13, update the power index a of the butterfly optimization algorithm;
[0105] Step 14, re-execute step 3 after Iter+1.
[0106] In some embodiments, in step 1, the basic parameters include target frequency f d , actual frequency f a , dimension D, search boundary SB, lower limit p min and upper limit p max of dynamic switching probability, time range T of optimization objective function J, perception mode c of the butterfly optimization algorithm, and power index a of the butterfly optimization algorithm.
[0107] In some embodiments, the target frequency f d is manually set to 50 Hz; the actual frequency f a is obtained by micro-grid collection; the dimension D is the parameter dimension of each individual, indicating the number of parameters of the problem to be optimized, i.e. the PID control parameters, specifically including the proportional K P of PID control, integral K I of PID control, and differential gain parameter K D of PID control.; search boundary SB is the value range of each parameter; the value of perception mode c of the butterfly optimization algorithm and the value of power index a of the butterfly optimization algorithm are both [0, 1]; maximum iteration number Iter max is the maximum number of iterations of the algorithm, between 100 and 1000; random factor r is used to introduce randomness when updating the position, and the value is [0, 1]; population size N represents 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] wherein, K P min Minimum value of proportional gain of PID controller; K P max Maximum value of proportional gain of PID controller; K I min Minimum value of integral gain of PID controller; K I max Maximum value of integral gain of PID controller; K D min Minimum value of differential gain of PID controller; K D max Maximum value of differential gain of 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 perception intensity of each butterfly in the scent concentration matrix of the butterfly;
[0117] I is a stimulation 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 updating the position in the global search phase is as follows:
[0121]
[0122] wherein, is the solution vector x i of the i-th butterfly in the current iteration number Iter;
[0123] is the solution vector x k of the k-th butterfly in the current iteration number Iter;
[0124] is the solution vector x i of the i-th butterfly in the next iteration number Iter+1;
[0125] f i is the scent concentration of the butterfly corresponding to the solution vector x i of the i-th butterfly;
[0126] q is a weight factor;
[0127] In some embodiments, in step 8, the formula for updating the position in the local search phase is as follows:
[0128]
[0129] wherein, is the solution vector x i of the i-th butterfly in the current iteration number Iter;
[0130] is the solution vector x j of the j-th butterfly in the current iteration number Iter;
[0131] is the solution vector x k of the k-th butterfly in the current iteration number Iter;
[0132] is the solution vector xi ;
[0133] f i is the solution vector x of the i-th butterfly i corresponding to the butterfly's fragrance concentration;
[0134] q is a weight factor;
[0135] In some embodiments, in step 9, any fitness is calculated as follows:
[0136]
[0137] where 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 the balance between supply and demand, without considering the random changes of power generation and load. To this end, the frequency control strategy of the park microgrid under the new power system maximizes the imbalance of the park power frequency.
[0141] Therefore, the integral of the square error (ISE) of the frequency deviation, tie-line and main grid frequency deviation of the microgrid is taken as the objective function (J), which is expressed as follows
[0142]
[0143] where the frequency deviation of the virtual power plant: e d , the tie-line deviation: e s , the main grid frequency deviation: e m , the time range considered: T.
[0144] 1.2 Controller design
[0145] A PID controller is designed in the light storage and charging microgrid system to calculate the frequency deviation and feed it back to the objective function, which is used to realize the PID controller and calculate the frequency deviation. We will combine the frequency target of the microgrid with the actual frequency to calculate the deviation and feed it back to the objective function .
[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 Equation 2
[0148]
[0149] where the target frequency is set as f d , the actual frequency is f a , the frequency error is e(t), the PID controller output is u(t), K P , K I , K D are the proportional, integral and derivative gain parameters of the PID control, and the constraints are:
[0150] K P min ≤ K P ≤ K P max Equation 4
[0151] K I min ≤ K I ≤ K I max Equation 5
[0152] K D min ≤ K D ≤ K D max Equation 6
[0153] Optimization process: the target frequency is initially set by humans, the actual frequency is obtained by real-time collection of the EMS system, and then the frequency error is calculated and brought into Equation 1 to calculate the integral square error, to obtain the optimal proportional, integral and derivative gain parameters of the PID control, and the update of the actual frequency can be adjusted by the controller output u(t) of Equation 7, and then the frequency control is completed.
[0154] f a (t+Δt) = f a (t) + u(t)*Δt Equation 7
[0155] 1.3 Control strategy
[0156] The park microgrid must provide control signals to the distributed adjustable resources to maintain supply and demand balance. Therefore, this patent proposes the concept of centralized control in the available architecture, for example, in centralized control, the microgrid has the electrical signal state information of the distributed adjustable resources, therefore, the central controller allocates signals corresponding to the target power demand from the distributed adjustable resources.
[0157] The EMS in the microgrid manages the producers' resources, such as controllable loads, like electric vehicle charging stations and power plants.
[0158] The EV, WTG and PV are the distributed adjustable resources monitored by the EMS. The controllers used with the PV and EV perform the necessary monitoring 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 of the set frequency and the actual collected frequency. The innovation of this patent proposes to use the improved butterfly optimization algorithm (GBOA) to optimize the 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 producing fragrance mainly involves three important concepts, namely perception mode, stimulus intensity and power index. In this patent, the perception mode is represented by c, the value of which is [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, the fragrance is expressed as a function of the physical intensity of the stimulus as follows
[0160] f = cI a Equation 8
[0161] where 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, a local search phase and a global search phase. In the global search phase, the butterfly takes a step towards the best butterfly / solution "g*", to address the problem of slow convergence and low search accuracy in the global search of BOA, the GBOA algorithm proposed in this patent introduces a weight factor q to the global search and local search formulas. When the value of q is small, it can improve the speed and accuracy of the early search of GBOA; when the value of q gradually increases, it can improve the search accuracy of the local optimal point of GBOA in the later period. The weight factor q can be expressed as
[0162]
[0163] where Iter and Iter_max represent the current iteration number and the maximum iteration number, respectively.
[0164] The global search phase can be expressed as:
[0165]
[0166] where is the solution vector x of the i-th butterfly in the iteration parameter ti Here g* denotes the current best solution found among all solutions in the current iteration. The scent of the butterfly is denoted by f i , r is a random number in [0, 1].
[0167] The local search phase can be expressed as
[0168]
[0169] where and are the jth and kth butterflies from the solution space. If and belong to the same swarm, and r is a random number in [0, 1], then equation (12) becomes a local random walk.
[0170] The global search and local search in the traditional BOA algorithm are controlled by switching probability p. Although the BOA algorithm has considered the balance between global search ability and local search ability, since the switching probability p is a constant, it cannot adapt to the dynamic adjustment of the global search ability and the local search ability in the process of algorithm iteration. The GBOA algorithm proposed in this patent uses a dynamic switching probability to balance the proportion of global search ability and local search ability. The probability p will gradually increase the probability of local search as the number of iterations increases, so as to achieve a better optimization strategy. Make the early stage of optimization iteration focus on global search, so as to quickly locate the approximate position of the global optimal solution in the search space, and then enhance the local search ability in the later stage of iteration, so as to improve the optimization accuracy of the algorithm.
[0171]
[0172] where, p min , p max respectively represent the lower limit and the upper limit of the dynamic switching probability, Iter and Iter_max respectively represent the current number of iterations and the maximum number of iterations.
[0173] The dynamic control based on microgrid can enhance the system dynamics of the power system, while increasing the share of renewable energy, and improving the ability and reliability of energy transmission.
[0174] This patent establishes a frequency control model of the light storage and charging microgrid under the new power system, taking 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 demonstrate the advantages of the PID controller, which can adopt the control strategy of interconnected microgrid to realize frequency optimization regulation.
[0176] The patent proposes a method of dynamically switching probability to balance the proportion of global search ability and local search ability, so as to improve the optimization accuracy of the algorithm.
[0177] The patent introduces a weight factor q into the formula of global search and local search, which can improve the speed and accuracy of GBOA in the early stage, and improve the search accuracy of GBOA in the later stage.
[0178] The above detailed description of the preferred embodiments of the application. It should be understood that those skilled in the art without creative labor can make many modifications and changes according to the concept of the application. Therefore, any technical solution obtained by logical analysis, reasoning or limited experiment on the basis of the prior art by those skilled in the art according to the concept of the application shall be within the protection scope determined by the claims.
Claims
1. A frequency control method for a light storage and charging micro-grid based on an improved butterfly optimization algorithm, a park micro-grid collaborative control center provides a control signal to a distributed adjustable resource to maintain supply and demand balance, characterized in that, In the centralized control, the park micro-grid cooperative control center has distributed adjustable resources; The park micro-grid cooperative control center central controller allocates signals corresponding to 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 include EVs, WTGs and PVs; The controller used with the PVs and EVs performs necessary monitoring control operations to report necessary electrical parameters to the micro-grid 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 of the set frequency and the actual collected frequency of the control system; PID control parameters are obtained by 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 number of iterations Iter is greater than the maximum number of iterations Iter_max; If so, then all processes end and the optimal solution is output, which is the PID control parameter, specifically including the proportional K of the PID control. P Integral K of PID control I The derivative gain parameter K of PID control D ; If not, continue to execute the subsequent 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 execute step 13; If not, continue to execute the subsequent steps; Step 7, generate a random factor r in the range [0, 1] and update the switching frequency p; Step 8, judging whether the random factor r is greater than the switching frequency p, and updating the solution vector x of the i-th butterfly in the next iteration number Iter+1 i ; If yes, enter the global search stage for updating; If not, enter the local search stage for updating; Step 9, calculate the solution vector x of the i-th butterfly in the next iteration, Iter+1 i fitness of Step 10, judging whether greater than If yes, continue to execute the subsequent steps; If not, skip step 11 and execute step 12; Step 11, replace corresponding to substitute Step 12, replace g* with g*; Step 13, update the power index a of the butterfly optimization algorithm; Step 14, re-execute step 3 after Iter+1.
2. The method of claim 1, wherein the improved butterfly optimization algorithm-based frequency control method of the microgrid with optical storage and charging is characterized in that, In step 1, the basic parameters include target frequency f d , actual frequency f a , dimension D, search boundary SB, lower limit p min and upper limit p max of dynamic switching probability, time range T of optimization objective function J, perception mode c of butterfly optimization algorithm, and power index a of butterfly optimization algorithm. 3.The method of claim 2, wherein, The reference frequency f d Set manually by human to 50 Hz; the actual frequency f a Collected by micro-grid; the dimension D is the parameter dimension of each individual, representing the number of parameters of the problem to be optimized, that is, the PID control parameters, specifically including the proportional K P , integral K I and differential gain parameter K D of the PID control; 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 in [0, 1]; the maximum iteration number Iter_max is the maximum number of algorithm running, between 100 and 1000; the random factor r is used to introduce randomness when updating the position, and the value is [0, 1]; the population size N represents how many individuals / solutions in each generation, between 10 and 50. 4.The method of claim 2, wherein, 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 ; where K P min Minimum value of the proportional gain of the PID controller; K P max Maximum value of the proportional gain of the PID controller; K I min Minimum value of the integral gain of the PID controller; K I max Maximum value of the integral gain of the PID controller; K D min Minimum value of the derivative gain of the PID controller; K D max Maximum value of the derivative gain of the PID controller; In actual application, the search boundary SB can ensure that the optimization result is within a reasonable range.
5. The method of claim 4, wherein the improved butterfly optimization algorithm-based frequency control method of the microgrid with optical storage and charging is characterized by, The formula for calculating the scent concentration of all butterflies in step 4 is as follows: f = c I a ; Wherein, f is the perceived intensity of each butterfly in the scent concentration matrix of the butterfly; I is a stimulation intensity matrix, specifically [K P , K I , K D ].
6. The method of claim 5, wherein the improved butterfly optimization algorithm-based frequency control method of the microgrid with optical storage and charging is characterized by, In step 7, the formula for updating the switching frequency p is as follows: 7.The method of claim 1, wherein, In step 8, the formula for updating the position in the global search stage is as follows: wherein, is the solution vector x of the i-th butterfly in the current iteration number Iter i ; is the solution vector x of the kth butterfly in the current iteration number Iter k ; is the solution vector x of the i-th butterfly in the next iteration number Iter+1 i ; f i is the solution vector x of the i-th butterfly i corresponding to the butterfly's scent concentration; q is a weighting factor; 8.The method of claim 1, wherein, In step 8, the formula for updating the position in the local search stage is as follows: wherein, is the solution vector x of the i-th butterfly in the current iteration number Iter i ; is the solution vector x of the jth butterfly in the current iteration number Iter j ; is the solution vector x of the kth butterfly in the current iteration number Iter k ; is the solution vector x of the i-th butterfly in the next iteration number Iter+1 i ; f i is the solution vector x of the i-th butterfly i corresponding to the butterfly's scent concentration; q is a weighting factor; 9.The microgrid frequency control method based on the improved butterfly optimization algorithm of claim 7 or 8, characterized in that, In step 9, either the fitness is calculated as follows: where e d is the frequency deviation of the microgrid; e s to the tie line bias of the microgrid; e m is the frequency deviation of the main grid outside the microgrid.
Citation Information
Patent Citations
Energy storage site selection method based on improved butterfly optimization algorithm
CN117372080A
Method and system for controlling inverters in microgrids
WO2021009672A1