A Microgrid Day-ahead Scheduling Optimization Method Based on Improved Learning Strategy BWOA
By optimizing the day-ahead scheduling of microgrids using the BWOA algorithm with an improved learning strategy, the problem of local optima was solved, resulting in reduced energy consumption and increased clean energy utilization in microgrids, thus ensuring stable operation and environmental protection of microgrids.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2023-06-19
- Publication Date
- 2026-05-26
AI Technical Summary
The existing black widow algorithm is prone to getting trapped in local optima in day-ahead scheduling optimization of microgrids, making it difficult for the day-ahead scheduling scheme of microgrids to reach the optimal solution, and failing to effectively reduce energy consumption and improve the clean energy consumption rate.
The Black Widow Optimization Algorithm (BWOA) employs an improved learning strategy. By initializing the population, back learning, and iterative optimization, combined with the power output matrix constraints of the microgrid, it optimizes the day-ahead dispatch scheme of the microgrid to reduce energy consumption and improve the clean energy utilization rate.
It improves the accuracy and calculation speed of day-ahead dispatching of microgrids, reduces energy consumption, increases the absorption rate of clean energy, and ensures the stable operation of microgrids and environmental protection.
Smart Images

Figure CN116739278B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system dispatch optimization, specifically a microgrid day-ahead dispatch optimization method based on the BWOA (Black Widow Optimization Algorithm) with an improved learning strategy. Background Technology
[0002] With the rapid development of my country's economy and the soaring demand for energy, the development of new energy sources such as wind power and solar power has gradually become an important part of the national energy strategy and sustainable development concept. On the other hand, the large-scale integration of new energy sources poses a severe challenge to the stable operation of microgrid power systems. Therefore, fully tapping the dispatch potential of micro-sources in microgrids is an important means to ensure the safe and stable operation of microgrid systems and the development of new energy sources. This requires that day-ahead dispatch of microgrids must reduce the energy consumption of day-ahead dispatch while ensuring the feasibility of the strategy, and improve the absorption rate of clean energy in the day-ahead dispatch strategy of microgrids.
[0003] The Black Widow Optimization Algorithm (BWOA) is characterized by its high accuracy. However, it also has drawbacks, such as being prone to getting trapped in local optima. When applied to the optimization problem of microgrid day-ahead scheduling, although it has advantages in computational speed and accuracy compared to other algorithms, it still suffers from the problem of easily getting trapped in local optima, making it difficult for the microgrid day-ahead scheduling scheme to achieve optimal results. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, this invention provides a microgrid day-ahead scheduling optimization method based on an improved learning strategy (BWOA), aiming to reduce microgrid energy consumption, improve the absorption rate of clean energy in microgrids, fully tap the scheduling potential of micro-power sources in microgrids, and ensure the safe and stable operation of microgrid power systems and the development of new energy sources.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] The present invention discloses a microgrid day-ahead scheduling optimization method based on an improved learning strategy BWOA, characterized by the following steps:
[0007] Step 1: Determine the dimension of the power output matrix of the microgrid based on the types of power sources in the microgrid, and use the power balance constraints in the microgrid and the output constraints of each micro-power source as constraints for each dimension of the microgrid output matrix.
[0008] Step 2: Initialize the population according to the constraints. Obtain the optimized initial population based on the reverse learning strategy, and initialize the optimal fitness value, optimal position, historical optimal fitness value, and historical optimal position of the population.
[0009] Step 3: Solve the problem with the objective function of minimizing microgrid energy consumption, and iterate the optimized initial population based on the optimal fitness value, optimal population position, historical optimal fitness value, and historical optimal position to obtain the optimal power output scheme.
[0010] The microgrid day-ahead scheduling optimization method based on improved learning strategy BWOA described in this invention is also characterized in that step 1 includes the following steps:
[0011] Step 1.1: Assume a microgrid contains N types of micro-sources and does not interact with the outside world. Then the output matrix of the microgrid is P = [P1, P2, ..., P]. i ,…,P N ], P i P represents the output of the i-th micro-power source; and P i =[P i,1 ,P i,1 ,…,P i,t ,…P i,T ], P i,t Let represent the output of the i-th micro-power source at time t; T is the total scheduling period.
[0012] Step 1.2: Construct the power balance constraint at time t using equation (1):
[0013] P 1,t +P 2,t +…+P i,t …+P N,t =P LOAD,t (1)
[0014] In equation (2), P LOAD,t This represents the load on the microgrid at time t;
[0015] Step 1.3: Construct the output constraints of each micro-power source at time t using equation (2):
[0016]
[0017] In equation (2), Let represent the minimum output constraint of the i-th micro-source at time t. This represents the maximum output constraint of the i-th micro-power source at time t.
[0018] Step 2 includes:
[0019] Step 2.1: Define the current iteration number as k and initialize k = 0. Define the maximum iteration number as K. max ;
[0020] The population size is initialized with the number of output schemes M, and the population of the k-th generation m-th generation is denoted as M. Let m be the output scheme in the k-th iteration; let The i-th individual at any time t is Let represent the output of the i-th micro-power source in the m-th output scheme of the k-th iteration at time t;
[0021] Initialize the m-th population of the k-th generation using equation (3) The i-th individual at time t
[0022]
[0023] In equation (3), α is a random decimal between 0 and 1;
[0024] Step 2.2: Use equation (4) to generate the m-th reverse population of the k-th generation. The i-th reverse individual at any time t That is, the reverse output of the i-th micro-source in the m-th reverse output scheme of the k-th iteration at time t:
[0025]
[0026] Step 2.3: Use equation (5) to obtain the m-th population of the k-th generation. Corresponding fitness value That is, the m-th output scheme of the k-th generation. The corresponding microgrid energy consumption is then obtained, thus yielding the microgrid energy consumption under all output schemes in the k-th generation.
[0027]
[0028] In equation (5), N is the total number of types of micro-power sources, and C i,m Let be the unit energy consumption of the i-th individual in the m-th population, and represent the energy consumption value generated per unit output of the i-th micro-power source in the m-th output scheme; U is the total number of pollutant types, b i,u α is the coefficient for the generation of type u pollutants per unit output of the i-th micro-power source. u For pollutants of type u, the unit energy consumption;
[0029] Step 2.4: Use equation (6) to obtain the m-th reverse population of the k-th generation. fitness value And as the m-th reverse output scheme of the k-th generation. The corresponding microgrid energy consumption is used to obtain the fitness values of all reverse populations in the kth generation, which are then used as the basis for all reverse power output schemes. The corresponding microgrid energy consumption
[0030]
[0031] Step 2.5: Construct the fitness values of all populations and the reverse population in the kth generation and use them as the corresponding microgrid energy consumption under all output schemes and the reverse output scheme in the kth generation, denoted as .
[0032] Step 2.6, from Select the top 50% of the population with the lowest fitness values and form the optimized population in the kth generation. That is, the m-th output scheme after the k-th generation optimization;
[0033] The m-th optimized population of the k-th generation The fitness value is used as the optimal population for the m-th population. The optimal fitness value of the population This represents the minimum microgrid energy consumption value of the m-th output scheme in k iterations;
[0034] Will The corresponding optimized population is used as the m-th optimized population in the k-th generation. optimal position This represents the optimal output scheme for the m-th output scheme in k iterations;
[0035] Compare the optimal fitness values of each optimized population in generation k, and take the minimum fitness value as the historical optimal fitness value of generation k. This represents the lowest microgrid energy consumption value among all power output schemes in k iterations;
[0036] Will The corresponding optimized population is taken as the historical best position in the kth generation. This represents the optimal power output scheme among all power output schemes in k iterations;
[0037] Compare the optimal fitness values of each optimized population in generation k, and take the largest fitness value as the worst historical fitness value F. pworst , representing the maximum microgrid energy consumption value under all power output schemes.
[0038] Step 3 includes:
[0039] Step 3.1: Randomly generate the parameters n of the kth generation using equations (7) and (8). k and b k :
[0040] n k =0.4 + 0.5 × α k (7)
[0041] b k =2×α k -1 (8)
[0042] In equations (7) and (8), α k It is a random number that takes values in the range [0,1] during the k-th iteration;
[0043] Step 3.2: Generate the k-th generation random number rand between 0 and 1. k Generate two random integers in the k-th generation between 0 and M. and
[0044] Step 3.3: Use equation (9) to obtain the m-th optimized population of the (k+1)-th generation. The i-th optimized individual This represents the output of the i-th micro-power source in the m-th output scheme of the (k+1)-th iteration at each moment within the total scheduling period T;
[0045]
[0046] In equation (9), The best historical position in the k-th iteration The i-th individual represents the output of the i-th micro-power source in the optimal output scheme during k iterations at various times within the total scheduling period T. For the k-th iteration The i-th optimal individual in an optimized population represents the i-th optimal individual in the k-th iteration. The power generation of the i-th micro-power source in each output scheme at various times within the total scheduling period T; Δ is a decimal value in [0,1].
[0047] Step 3.4: Calculate the m-th optimized population in the k-th generation using equation (10). pheromones
[0048]
[0049] In equation (10), For the m-th optimized population in the k-th generation The fitness value represents the energy consumption of the microgrid under the m-th output scheme in the k-th generation;
[0050] Step 3.5, when pheromones At that time, a random variable δ of 0 and 1 is generated, and the m-th optimized population of the (k+1)-th generation is obtained according to equation (11). The i-th optimized individual
[0051]
[0052] Step 3.6, if Then Assign to Assign to otherwise, constant, Unchanged; among them, This represents the fitness value of the m-th optimized population in the (k+1)-th generation, which is the energy consumption value of the microgrid under the m-th output scheme in the (k+1)-th generation.
[0053] Step 3.7, if but constant, Otherwise, Assign to Will Assign to
[0054] Step 3.8: Assign k+1 to k, and check if k > K. max Check if the condition is met. If it is met, the iteration is complete and step 3.9 is executed. Otherwise, go to step 3.1.
[0055] Step 3.9, Output K max Historical best fitness value during iteration That is, K max The lowest microgrid energy consumption value and the corresponding historical best location during the iteration And as K max The optimal output scheme during the iteration process.
[0056] The present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the microgrid day-ahead scheduling optimization method, and the processor is configured to execute the program stored in the memory.
[0057] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the microgrid day-ahead scheduling optimization method.
[0058] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0059] 1. The method of the present invention comprehensively considers the consumption of new energy sources and the energy consumption of microgrids, gives full play to the dispatch potential of various micro-power sources in microgrids, and fully considers the operating characteristics of each micro-power source in microgrids within the dispatch cycle, which is conducive to analyzing the impact of the output of each micro-power source on the day-ahead dispatch energy consumption of microgrids within the dispatch cycle.
[0060] 2. The high-dimensional black widow optimization algorithm with improved learning strategy proposed in this invention reduces the energy consumption of the microgrid day-ahead scheduling plan by improving the accuracy and calculation speed of the BWOA algorithm in microgrid day-ahead scheduling optimization.
[0061] 3. The method of the present invention takes into account both the operating characteristics of micro-power sources in microgrids and the energy consumption of microgrid operation, reduces the pollution of microgrids to the environment, and improves the absorption rate of clean energy in microgrids. Compared with the unoptimized method, the method of the present invention further reduces the pollution of microgrids to the environment, improves the absorption rate of clean energy in microgrids, and effectively ensures the stable operation of microgrid power systems. Attached Figure Description
[0062] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0063] In this embodiment, as Figure 1 As shown, a microgrid day-ahead scheduling optimization method based on an improved learning strategy (BWOA) includes the following sequential steps:
[0064] Step 1: Determine the dimension of the microgrid power output matrix based on the types of power sources in the microgrid. Use the power balance constraints in the microgrid and the output constraints of each micro-power source as constraints for each dimension of the microgrid power output matrix. For example, if there are N types of micro-power sources in the microgrid, then the microgrid power output matrix has N dimensions. Considering the operating characteristics of different micro-power sources, such as the influence of installed capacity and light intensity on photovoltaic power generation, the constraint for photovoltaic power generation is that its output at any time cannot exceed its maximum allowable output.
[0065] Step 1.1: Assume a microgrid contains N types of micro-sources and does not interact with the outside world. Then the output matrix of the microgrid is P = [P1, P2, ..., P]. i ,…,P N ], P i P represents the output of the i-th micro-power source; and P i =[P i,1 ,P i,1 ,…,P i,t ,…P i,T ], P i,t Let T represent the output of the i-th micro-power source at time t; T is the total scheduling period; for example, taking a day as an example, if the total scheduling period is divided into 1-hour time scales, then T = 24;
[0066] Step 1.2: In a microgrid, it is necessary to ensure a balance between power supply and power demand. The power balance constraint at time t is constructed using equation (1):
[0067] P 1,t +P 2,t +…+P i,t …+P N,t =P LOAD,t (1)
[0068] In equation (2), P LOAD,t This represents the load on the microgrid at time t;
[0069] Step 1.3: In the microgrid, based on the installed capacity and operating characteristics of each micro-power source, the output constraint of each micro-power source at time t is constructed using equation (2):
[0070]
[0071] In equation (2), Let represent the minimum output constraint of the i-th micro-source at time t. This represents the maximum output constraint of the i-th micro-power source at time t.
[0072] Step 2: Initialize the population according to constraints. Obtain the optimized initial population based on the reverse learning strategy, and initialize the optimal fitness value, optimal position, historical optimal fitness value, and historical optimal position of the population. Note: At this point, the population initialized according to constraints is already a microgrid day-ahead scheduling scheme that meets the constraints, but it cannot guarantee that the microgrid energy consumption value obtained under this scheme is the lowest. Optimization is required in Step 3.
[0073] Step 2.1: Define the current iteration number as k and initialize k = 0. Define the maximum iteration number as K. max ;
[0074] The population size is initialized with the number of output schemes M, and the population of the k-th generation m-th generation is denoted as M. Let m be the output scheme in the k-th iteration; let The i-th individual at any time t is Let represent the output of the i-th micro-power source in the m-th output scheme of the k-th iteration at time t;
[0075] Initialize the m-th population of the k-th generation using equation (3) The i-th individual at time t
[0076]
[0077] In equation (3), α is a random decimal between 0 and 1;
[0078] Step 2.2: Use equation (4) to generate the m-th reverse population of the k-th generation. The i-th reverse individual at any time t That is, the reverse output of the i-th micro-power source in the m-th reverse output scheme of the k-th iteration at time t. This shows that the reverse individual obtained by using equation (4) also satisfies the output constraint and corresponds to the individuals in the initial population.
[0079]
[0080] Step 2.3: Use equation (5) to obtain the m-th population of the k-th generation. Corresponding fitness value That is, the m-th output scheme of the k-th generation. The corresponding microgrid energy consumption is then obtained, thus yielding the microgrid energy consumption under all output schemes in the k-th generation.
[0081]
[0082] In equation (5), N is the total number of types of micro-power sources, and C i,m Let be the unit energy consumption of the i-th individual in the m-th population, and represent the energy consumption value generated per unit output of the i-th micro-power source in the m-th output scheme; U is the total number of pollutant types, b i,u α is the coefficient for the generation of type u pollutants per unit output of the i-th micro-power source. u For pollutants of type u, the unit energy consumption;
[0083] Step 2.4: Use equation (6) to obtain the m-th reverse population of the k-th generation. fitness value And as the m-th reverse output scheme of the k-th generation. The corresponding microgrid energy consumption is used to obtain the fitness values of all reverse populations in the kth generation, which are then used as the basis for all reverse power output schemes. The corresponding microgrid energy consumption
[0084]
[0085] Step 2.5: Construct the fitness values of all populations and the reverse population in the kth generation and use them as the corresponding microgrid energy consumption under all output schemes and the reverse output scheme in the kth generation, denoted as .
[0086] Step 2.6, from Select the top 50% of the population with the lowest fitness values and form the optimized population in the kth generation. That is, the m-th output scheme after the k-th generation optimization; the top 50% of the population is extracted to ensure the superiority of the population, i.e. the rationality of the output scheme. By optimizing the initial population, the computational efficiency and accuracy can be improved.
[0087] The m-th optimized population of the k-th generation The fitness value is used as the optimal population for the m-th population. The optimal fitness value of the population This represents the minimum microgrid energy consumption value of the m-th output scheme in k iterations;
[0088] Will The corresponding optimized population is used as the m-th optimized population in the k-th generation. optimal position This represents the optimal output scheme for the m-th output scheme in k iterations;
[0089] Compare the optimal fitness values of each optimized population in generation k, and take the minimum fitness value as the historical optimal fitness value of generation k. This represents the lowest microgrid energy consumption value among all power output schemes in k iterations;
[0090] Will The corresponding optimized population is taken as the historical best position in the kth generation. This represents the optimal power output scheme among all power output schemes in k iterations;
[0091] Compare the optimal fitness values of each optimized population in generation k, and take the largest fitness value as the worst historical fitness value F. pworst , representing the maximum microgrid energy consumption value under all power output schemes.
[0092] Step 3: Solve for the minimum energy consumption of the microgrid using the objective function, and iterate the optimized initial population based on the optimal fitness value, optimal population position, historical optimal fitness value, and historical optimal position to obtain the optimal power output scheme. Although the population has been optimized through back-learning, it cannot guarantee that the minimum energy consumption value will be obtained, and further iteration is still needed to further reduce the energy consumption value;
[0093] Step 3.1: Randomly generate the parameters n of the kth generation using equations (7) and (8). k and b k :
[0094] n k =0.4 + 0.5 × a k (7)
[0095] b k =2×a k -1 (8)
[0096] In equations (7) and (8), a k It is a random number that takes values in the range [0,1] during the k-th iteration;
[0097] Step 3.2: Generate the k-th generation random number rand between 0 and 1. k Generate two random integers in the k-th generation between 0 and M. and
[0098] Step 3.3: Use equation (9) to obtain the m-th optimized population of the (k+1)-th generation. The i-th optimized individual Let represent the output of the i-th micro-power source in the m-th output scheme of the k+1-th iteration at each moment within the total scheduling period T. Equation (9) ensures the randomness of individual optimization changes and ensures that the proposed method will not fall into local optima.
[0099]
[0100] In equation (9), The best historical position in the k-th iteration The i-th individual represents the output of the i-th micro-power source in the optimal output scheme during k iterations at various times within the total scheduling period T. For the k-th iteration The i-th optimal individual in an optimized population represents the i-th optimal individual in the k-th iteration. The power generation of the i-th micro-power source in each output scheme at various times within the total scheduling period T; Δ is a decimal value in [0,1].
[0101] Step 3.4: Calculate the m-th optimized population in the k-th generation using equation (10). pheromones
[0102]
[0103] In equation (10), For the m-th optimized population in the k-th generation The fitness value represents the energy consumption of the microgrid under the m-th output scheme in the k-th generation;
[0104] Step 3.5, when pheromones At that time, a random variable δ of 0 and 1 is generated, and the m-th optimized population of the (k+1)-th generation is updated according to equation (11). We obtain the m-th optimized population of the (k+1)-th generation. The i-th optimized individual
[0105]
[0106] Step 3.6, if Then let otherwise, constant, Unchanged; among them, This represents the fitness value of the m-th optimized population in the (k+1)-th generation, which is the microgrid energy consumption value under the m-th output scheme in the (k+1)-th generation. Step 3.6 compares the fitness value of the m-th optimized population in the (k+1)-th generation with the optimal fitness of the m-th optimized population in the k-th generation to update the microgrid output scheme and the corresponding microgrid energy consumption value, ensuring that the lowest population fitness value can be obtained, which is the lowest microgrid energy consumption value for each output scheme.
[0107] Step 3.7, if but constant, Otherwise, let Step 3.7 Compare the optimal fitness of the m-th optimized population in the k-th generation with the historical optimal fitness of the k-th generation to update the microgrid output scheme and the corresponding microgrid energy consumption value, ensuring that the lowest historical fitness value can be obtained, which is the lowest microgrid energy consumption value among all output schemes.
[0108] Step 3.8: Assign k+1 to k, and check if k > K. max Check if the condition is met. If it is met, the iteration is complete and step 3.9 is executed. Otherwise, go to step 3.1.
[0109] Step 3.9, Output K max Historical best fitness value during iteration That is, K max The lowest microgrid energy consumption value and the corresponding historical best location during the iteration And as K max The optimal output scheme during the iteration process.
[0110] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0111] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
Claims
1. A microgrid day-ahead scheduling optimization method based on an improved learning strategy and a BWOA (Balanced Learning Architecture) approach, characterized in that: Includes the following steps: Step 1: Determine the dimension of the power output matrix of the microgrid based on the types of power sources in the microgrid, and use the power balance constraints in the microgrid and the output constraints of each micro-power source as constraints for each dimension of the microgrid output matrix. Step 2: Initialize the population according to the constraints. Obtain the optimized initial population based on the reverse learning strategy, and initialize the optimal fitness value, optimal position, historical optimal fitness value, and historical optimal position of the population. Step 2.1, define the current iteration number as k, and initialize k = 0, define the maximum iteration number as K max ; The population size is initialized with the number of output schemes M, and the population of the k-th generation m-th generation is denoted as M. Let represent the m-th output scheme in the k-th iteration; let The i-th individual at any time t is Let represent the output of the i-th micro-power source in the m-th output scheme of the k-th iteration at time t; Initialize the m-th population of the k-th generation using equation (3) The i-th individual at time t : (3) In equation (3), A random decimal between 0 and 1; Step 2.2: Use equation (4) to generate the m-th reverse population of the k-th generation. The i-th reverse individual at any time t That is, the reverse output of the i-th micro-source in the m-th reverse output scheme of the k-th iteration at time t: (4) Step 2.3: Use equation (5) to obtain the m-th population of the k-th generation. Corresponding fitness value That is, the m-th output scheme of the k-th generation. The corresponding microgrid energy consumption is then obtained, thus yielding the microgrid energy consumption under all output schemes in the k-th generation. : (5) In equation (5), N represents the total number of types of micro-power sources. Let be the unit energy consumption of the i-th individual in the m-th population, and represent the energy consumption value generated by the i-th micro-power source under the unit output of the m-th output scheme; U is the total number of pollutant types. It is the coefficient for the generation of type u pollutants per unit output of the i-th type of micro-power source. For pollutants of type u, the unit energy consumption; Step 2.4: Use equation (6) to obtain the m-th reverse population of the k-th generation. fitness value And as the m-th reverse output scheme of the k-th generation. The corresponding microgrid energy consumption is used to obtain the fitness values of all reverse populations in the kth generation, which are then used as the basis for all reverse power output schemes. The corresponding microgrid energy consumption : (6) Step 2.5: Construct the fitness values of all populations and the reverse population in the kth generation and use them as the corresponding microgrid energy consumption under all output schemes and the reverse output scheme in the kth generation, denoted as . ; Step 2.6, from Select the top 50% of the population with the lowest fitness values and form the optimized population in the kth generation. That is, the m-th output scheme after the k-th generation optimization; The m-th optimized population of the k-th generation The fitness value is used as the optimal population for the m-th population. The optimal fitness value of the population , represents the minimum microgrid energy consumption value of the m-th power output scheme in k iterations; Will The corresponding optimized population is used as the m-th optimized population in the k-th generation. optimal position , represents the optimal power output scheme of the m-th power output scheme in k iterations; Compare the optimal fitness values of each optimized population in generation k, and take the minimum fitness value as the historical optimal fitness value of generation k. , representing the lowest microgrid energy consumption value among all power output schemes in k iterations; Will The corresponding optimized population is taken as the historical best position in the kth generation. , represents the optimal power output scheme among all power output schemes in k iterations; Compare the optimal fitness values of each optimized population in generation k, and take the largest fitness value as the worst historical fitness value. , representing the maximum microgrid energy consumption value under all power output schemes; Step 3: Solve the problem with the objective function of minimizing microgrid energy consumption, and iterate the optimized initial population based on the optimal fitness value, optimal population position, historical optimal fitness value, and historical optimal position to obtain the optimal power output scheme.
2. The microgrid day-ahead scheduling optimization method based on improved learning strategy BWOA according to claim 1, characterized in that: Step 1 includes the following steps: Step 1.1: Assume a microgrid contains N types of micro-power sources and does not interact with the outside world. Then, the power output matrix of the microgrid is... , This represents the output power of the i-th micro-power source; and , Let represent the output of the i-th micro-power source at time t; T is the total scheduling period. Step 1.2: Construct the power balance constraint at time t using equation (1): (1) In equation (2), This represents the load on the microgrid at time t; Step 1.3: Construct the output constraints of each micro-power source at time t using equation (2): (2) In equation (2), Let represent the minimum output constraint of the i-th micro-source at time t. This represents the maximum output constraint of the i-th micro-power source at time t.
3. The microgrid day-ahead scheduling optimization method based on improved learning strategy BWOA according to claim 2, characterized in that: Step 3 includes: Step 3.1: Randomly generate the parameters of the kth generation using equations (7) and (8). and : (7) (8) In equations (7) and (8), It is a random number that takes values in the range [0,1] during the k-th iteration; Step 3.2: Generate the k-th generation random number between 0 and 1. Generate two random integers in the k-th generation between 0 and M. and ; Step 3.3: Use equation (9) to obtain the m-th optimized population of the (k+1)-th generation. The i-th optimized individual , represents the output of the i-th micro-power source in the m-th output scheme of the k+1-th iteration at each moment within the total scheduling period T; (9) In equation (9), The best historical position in the k-th iteration The i-th individual represents the output of the i-th micro-power source in the optimal output scheme during k iterations at various times within the total scheduling period T. For the k-th iteration The i-th optimal individual in an optimized population represents the i-th optimal individual in the k-th iteration. The power generation of the i-th micro-power source in the total scheduling period T at each time point; It is a decimal with a value in the range [0, 1]. Step 3.4: Calculate the m-th optimized population in the k-th generation using equation (10). pheromones : (10) In equation (10), For the m-th optimized population in the k-th generation The fitness value represents the energy consumption of the microgrid under the m-th output scheme in the k-th generation; Step 3.5, when pheromones At that time, randomly generate 0 and 1 variables. And obtain the m-th optimized population of the (k+1)-th generation according to equation (11). The i-th optimized individual : (11) Step 3.6, if < Then Assign to , will be assigned to ;otherwise, constant, Unchanged; among them, This represents the fitness value of the m-th optimized population in the (k+1)-th generation, which is the energy consumption value of the microgrid under the m-th output scheme in the (k+1)-th generation. Step 3.7, if < ,but constant, Otherwise, Assign to ,Will Assign to ; Step 3.8: Assign k+1 to k, and check if k > K. max Check if the condition is met. If it is met, the iteration is complete and step 3.9 is executed. Otherwise, go to step 3.
1. Step 3.9, Output K max Historical best fitness value during iteration K max The lowest microgrid energy consumption value and the corresponding historical best location during the iteration , and as K max The optimal output scheme during the iteration process.
4. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store programs that support the processor in executing any of the microgrid day-ahead scheduling optimization methods of claims 1-3, and the processor is configured to execute the programs stored in the memory.
5. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is run by the processor, it executes the steps of the microgrid day-ahead scheduling optimization method according to any one of claims 1-3.