Micro-grid optimization scheduling method based on improved MOJAYA algorithm
Through the improved MOJAYA algorithm and Metropolis-Hastings sampling method combined with the gold sine algorithm, the problem of weak global search capabilities and easy to fall into local optimality in microgrid optimization scheduling is solved, achieving more efficient power consumption efficiency and cost reduction.
Patent Information
- Application Number
- CN202411576328.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing technology has weak global search capabilities in microgrid optimization scheduling, which is prone to falling into local optimization, and it is difficult to consider multi-objective optimization problems such as economy, environmental protection, and power supply safety.
The improved MOJAYA algorithm is adopted to calculate the total fitness by merging the population and archive sets, update the archive sets, and individual population updates are carried out through the Metropolis-Hastings sampling method, combining the gold sine algorithm and the MOJAYA algorithm to enhance the global search ability of the algorithm.
The optimization accuracy of microgrid optimization scheduling is improved, avoids falling into local optimization, enhances power consumption efficiency and reduces power consumption costs.
Smart Images

Figure CN119448438A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of microgrid optimization scheduling, and in particular relates to a microgrid optimization scheduling method based on an improved MOJAYA algorithm. Background Art
[0002] Microgrid optimization scheduling is an important research content for energy management needs. It generally aims to minimize operating costs, emission costs and power outage costs. Under the condition of meeting various constraints, it maximizes the utilization rate of renewable energy and the economic efficiency of microgrid operation. The optimization scheduling of microgrids not only needs to consider the cost of power generation, but also the overall environmental benefits of the distributed power supply combination. Therefore, the use of scheduling optimization is very necessary to improve power efficiency and reduce power costs. In terms of optimization scheduling models and strategies, with the continuous popularization and application of microgrid technology, how to maximize the economic, technical, and environmental benefits of microgrids has become an extremely important research topic. At present, in the process of studying the optimization scheduling of microgrids, intelligent optimization algorithms are mainly used to solve the model. Intelligent optimization algorithms include evolutionary algorithms, natural optimization algorithms, plant growth algorithms and other swarm intelligence optimization algorithms. These swarm intelligence algorithms perform well in the process of microgrid optimization scheduling, but in the actual solution of microgrid scheduling models, most scholars use standard particle swarm algorithms, standard MOJAYA algorithms, genetic algorithms and their improved algorithms. These algorithms can usually only solve single-objective problems and are difficult to solve the sum optimization problem of multiple objectives, especially when considering the economy, environmental protection, power supply security, and optimal configuration of the microgrid. Single-objective algorithms are difficult to find the optimal value, and the global search ability is weak, and it is easy to fall into the local optimum. Therefore, in order to improve the ability of microgrid power system optimization scheduling and improve power efficiency, it is necessary to invent a new optimization scheduling method to improve the optimization accuracy of microgrid optimization scheduling, avoid falling into the local optimum, improve power efficiency, and reduce power costs. Summary of the invention
[0003] The purpose of the present invention is to provide a microgrid optimization scheduling method based on an improved MOJAYA algorithm, which solves the problem in the prior art that the comprehensive microgrid has a weak global search capability and is prone to falling into local optimality.
[0004] The technical solution adopted by the present invention is a microgrid optimization dispatching method based on an improved MOJAYA algorithm, which is specifically implemented according to the following steps:
[0005] Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an empty archive set.
[0006] Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i).
[0007] Step 3: Update the archive set;
[0008] Step 4: Identify the best and worst individuals through the total fitness F(i), and update the population individuals through the Metropolis-Hastings (MH) sampling method;
[0009] Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
[0010] The present invention is also characterized in that:
[0011] Step 1 is implemented according to the following steps:
[0012] First, the optimization objectives of the microgrid are set, including economic objectives and environmental objectives; relevant constraints are set, including micro-power output constraints, microgrid power balance constraints and battery operation constraints. Then, the initial population cluster P0 is randomly generated within the upper and lower limits of the constraints, and an empty set archive set is created. Set the number of iterations t = 0, the initial seed cluster P0 and the archive set All individuals in it represent the power generation output plans of each micro-power source in the microgrid.
[0013] Step 2 is implemented as follows:
[0014] Step 2.1: Merge population P t and archive set And assign original fitness to all individuals in the merged set. The original fitness calculation procedure is as follows: S(i) represents the number of individuals i dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i is dominated by, so it is considered a poor solution in fitness allocation. On the contrary, if S(i) is small, it means that individual i is a better solution because it is dominated by fewer other individuals. S(i) is determined by formula (2-1). Based on S(i), the original fitness R(i) of individual i is determined by formula (2-2):
[0015]
[0016]
[0017] |·| represents the cardinality of a set, that is, the number of elements in the set, Pt is the current population, is the current archive set, used to save non-dominated individuals, It means that individual j dominates individual i;
[0018] Step 2.2, assign crowding density to all individuals in the merged set. The crowding density is calculated as follows: Select crowding density to calculate the distance of each individual to all individuals in the archive set and the population. The expression of crowding density D(i) is shown in formula (2-3):
[0019]
[0020] In the formula, represents the distance from individual i to its kth nearest neighbor in the target space, N and are the number of initial seed clusters and the number of archive sets respectively. Add 2 to the denominator of the expression of D(i) to ensure that the expression is contained between 0 and 1;
[0021] Step 2.3: The total fitness of all individuals in the merged set is composed of the sum of the original fitness R(i) and the crowding density D(i), and the formula is as follows:
[0022] F(i)=R(i)+D(i) (2-4)
[0023] F(i) is the total fitness of individual i, R(i) is the original fitness in step 2.1, and D(i) is the crowding density in step 2.2.
[0024] Step 3 is implemented as follows:
[0025] P t and All non-dominated individuals (total fitness F(i) < 1) in the next generation archive set are copied to In, if The size exceeds By comparing the density information between individuals Perform truncation operation. Smaller individuals will be removed first, until the size of the archive set is if The size is smaller than Then from P t and Select individuals with fitness F(i)≥1 to add to Until the size of the archive collection is The total fitness and density information are used to update a valid archive set, ensuring that the individuals in the archive set are both diverse and represent high-quality solutions.
[0026] Step 4 is implemented according to the following steps:
[0027] Step 4.1: Calculate population P based on formula (2-4) t and archive set The total fitness of each individual in is calculated and sorted. The one with the smallest total fitness value is the optimal solution, and vice versa. The optimal solution and the worst solution are selected.
[0028] Step 4.2: For population P t The individuals in the MH sampling are sampled, that is, a random number r between [0,1] is generated. If r≤λ, the operation in step 4.3 is performed to adopt the first updating method, otherwise go to step 4.4;
[0029] λ=D(i) (4-1)
[0030] D(i) is the crowding density in step 2.2;
[0031] Step 4.3: Update the position of the population using the golden sine method according to formula (4-2):
[0032] x new (i) = x old (i)|sin(r1)|+r2sin(r1)|x1·x best (i) -x2·x old (i)| (4-2)
[0033] Among them, r1∈[0,2π] and r2 are random numbers, r1 determines the moving distance of the individual in the next iteration, r2∈[0,π], r2 determines the position update direction of the i-th individual in the next iteration, r2∈[0,π]; x1 and x2 are coefficients obtained by introducing the golden section number, which is a number defined as The irrational number is denoted as τ, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, the initial values of a and b are set to -π and π, and then a and b change with the change of the target value, and x1 and x2 are also updated accordingly. new is the new optimal solution generated based on the optimal solution and the worst solution obtained in step 4.1, x best 、x worst represent the optimal solution and the worst solution respectively, x old represents the solution before optimization;
[0034] Step 4.4: Update the position of the population in MOJAYA mode according to formula (4-3):
[0035] x new (i) = x old (i)+r1·(x best (i)-|x old (i)|)-r2·(x worst (i)-|x old (i)|) (4-3)
[0036] Apply non-dominated sorting to compare the individuals in the population before and after the update to determine their dominance. If the new individuals after the update can dominate the old individuals before the update, the new individuals will be retained. Otherwise, the new individuals will be discarded. Finally, based on the above steps, the initial population P is updated. t .
[0037] Step 5 is implemented according to the following steps:
[0038] Repeat the process from step 2 to step 4 until the number of iterations is reached, and finally output the archive set; the individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and dispatched; finally, according to the optimization goal, the corresponding objective function is used to select the optimal individual that meets the optimization goal, which is the final micro-source power generation output plan.
[0039] The beneficial effect of the present invention is that the method for optimizing the dispatch of microgrids based on the improved MOJAYA algorithm optimizes the dispatch of microgrids by taking into account both economic and environmental protection. The present invention integrates the golden sine algorithm and the MOJAYA algorithm by the MH sampling method to jointly determine the update law of the population, better enhance the global search ability of the algorithm, make it less likely to fall into the local optimum, greatly improve the optimization accuracy of the microgrid optimization dispatch, improve the power efficiency, and reduce the power cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1(a) is the result graph of the ZDT1 function tested by the improved MOJAYA algorithm;
[0041] Figure 1(b) is the result graph of the ZDT1 function tested by the standard MOJAYA algorithm;
[0042] Figure 2(a) is the result graph of the ZDT2 function tested by the improved MOJAYA algorithm;
[0043] Figure 2(b) is the result graph of the ZDT2 function tested by the standard MOJAYA algorithm;
[0044] Figure 3(a) is the result graph of the improved MOJAYA algorithm test ZDT3 function;
[0045] Figure 3(b) is a graph showing the results of the ZDT3 function tested using the standard MOJAYA algorithm;
[0046] Figure 4(a) is the result graph of the improved MOJAYA algorithm test ZDT4 function;
[0047] Figure 4(b) is a graph showing the results of the ZDT4 function tested using the standard MOJAYA algorithm;
[0048] Figure 5(a) is the result graph of the improved MOJAYA algorithm test ZDT6 function;
[0049] Figure 5(b) is a graph showing the results of the ZDT6 function tested using the standard MOJAYA algorithm;
[0050] Figure 6 It is a diagram of the microgrid optimization scheduling results based on the improved MOJAYA algorithm, that is, the micro-power source power generation output plan. DETAILED DESCRIPTION
[0051] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] The present invention is based on the microgrid optimization dispatching method of the improved MOJAYA algorithm, which is specifically implemented according to the following steps:
[0053] Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an empty archive set.
[0054] Step 1 is implemented according to the following steps:
[0055] First, the optimization objectives of the microgrid are set, including economic objectives and environmental objectives; relevant constraints are set, including micro-power source output constraints, microgrid power balance constraints and battery operation constraints. Then, an initial seed cluster P0 is randomly generated within the upper and lower limits of the constraints, and an empty set archive set P0 is created. The number of iterations is set to t = 0. All individuals in the initial seed cluster P0 and the archive set P0 represent the power generation output schemes of each micro-power source in the microgrid.
[0056] Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i).
[0057] Step 2 is implemented as follows:
[0058] Step 2.1: Merge population P t and archive set And assign original fitness to all individuals in the merged set. The original fitness calculation procedure is as follows: S(i) represents the number of individuals i dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i is dominated by, so it is considered a poor solution in fitness allocation. On the contrary, if S(i) is small, it means that individual i is a better solution because it is dominated by fewer other individuals. S(i) is determined by formula (2-1). Based on S(i), the original fitness R(i) of individual i is determined by formula (2-2):
[0059]
[0060]
[0061] |·| represents the cardinality of a set, that is, the number of elements in the set, P t is the current population, is the current archive set, used to save non-dominated individuals, It means that individual j dominates individual i;
[0062] Step 2.2, assign crowding density to all individuals in the merged set. The crowding density is calculated as follows: When multiple individuals do not dominate each other, R(i) is difficult to achieve its function. Therefore, the crowding density is selected to calculate the distance of each individual to all individuals in the archive set and the population. The expression of crowding density D(i) is shown in formula (2-3):
[0063]
[0064] In the formula, represents the distance from individual i to its kth nearest neighbor in the target space, N and are the number of initial seed clusters and the number of archive sets respectively. Add 2 to the denominator of the expression of D(i) to ensure that the expression is contained between 0 and 1;
[0065] Step 2.3: The total fitness of all individuals in the merged set is composed of the sum of the original fitness R(i) and the crowding density D(i), and the formula is as follows:
[0066] F(i)=R(i)+D(i) (2-4)
[0067] F(i) is the total fitness of individual i, R(i) is the original fitness in step 2.1, and D(i) is the crowding density in step 2.2.
[0068] Step 3: Update the archive set.
[0069] Step 3 is implemented as follows:
[0070] P t and All non-dominated individuals (total fitness F(i) < 1) in the next generation archive set are copied to In, if The size exceeds By comparing the density information between individuals Perform truncation operation. Smaller individuals will be removed first, until the size of the archive set is if The size is smaller than Then from P t and Select individuals with fitness F(i)≥1 to add to Until the size of the archive collection is The total fitness and density information are used to update a valid archive set, ensuring that the individuals in the archive set are both diverse and represent high-quality solutions.
[0071] Step 4: Identify the best individual and the worst individual through the total fitness F(i), and select the golden sine algorithm or MOJAYA algorithm to update the population individuals through the MH sampling method;
[0072] Step 4 is implemented according to the following steps:
[0073] Step 4.1: Calculate population P based on formula (2-4) t and archive set The total fitness of each individual in is calculated and sorted. The one with the smallest total fitness value is the optimal solution, and vice versa. The optimal solution and the worst solution are selected.
[0074] Step 4.2: For population P t The individuals in the MH sampling are sampled, that is, a random number r between [0,1] is generated. If r≤λ, the operation in step 4.3 is performed to adopt the first updating method, otherwise go to step 4.4;
[0075] λ=D(i) (4-1)
[0076] D(i) is the crowding density in step 2.2;
[0077] Step 4.3: Update the position of the population using the golden sine method according to formula (4-2):
[0078] x new (i) = x old (i)|sin(r1)|+r2sin(r1)|x1·x best(i) -x2·x old (i)| (4-2)
[0079] Among them, r1∈[0,2π] and r2 are random numbers, r1 determines the moving distance of the individual in the next iteration, r2∈[0,π], r2 determines the position update direction of the i-th individual in the next iteration, r2∈[0,π]; x1 and x2 are coefficients obtained by introducing the golden section number. These coefficients narrow the search space and lead the individual to gradually approach the optimal value, ensuring the convergence of the algorithm. The golden section number is a number defined as The irrational number is denoted as τ, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, the initial values of a and b are set to -π and π, and then a and b change with the change of the target value, and x1 and x2 are also updated accordingly. new is the new optimal solution generated based on the optimal solution and the worst solution obtained in step 4.1, x best 、x worst represent the optimal solution and the worst solution respectively, x old represents the solution before optimization;
[0080] Step 4.4: Update the position of the population in MOJAYA mode according to formula (4-3):
[0081] x new (i) = x old (i)+r1·(x best (i)-|x old (i)|)-r2·(x worst (i)-|x old (i)|) (4-3)
[0082] Apply non-dominated sorting to compare the individuals in the population before and after the update to determine their dominance. If the new individuals after the update can dominate the old individuals before the update, the new individuals will be retained. Otherwise, the new individuals will be discarded. Finally, based on the above steps, the initial population P is updated. t .
[0083] Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
[0084] Step 5 is implemented according to the following steps:
[0085] Repeat the process from step 2 to step 4 until the number of iterations is reached, and finally output the archive set; the individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and dispatched; finally, according to the optimization goal, the corresponding objective function is used to select the optimal individual that meets the optimization goal, which is the final micro-source power generation output plan.
[0086] Example 1
[0087] The present invention is based on the microgrid optimization dispatching method of the improved MOJAYA algorithm, which is specifically implemented according to the following steps:
[0088] Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an empty archive set.
[0089] Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i).
[0090] Step 3: Update the archive set.
[0091] Step 4: Identify the best and worst individuals through the total fitness F(i), and select the golden sine algorithm or MOJAYA algorithm to update the population individuals through the MH sampling method;
[0092] Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
[0093] Example 2
[0094] The present invention is based on the microgrid optimization dispatching method of the improved MOJAYA algorithm, which is specifically implemented according to the following steps:
[0095] Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an empty archive set.
[0096] Step 1 is implemented according to the following steps:
[0097] First, the optimization objectives of the microgrid are set, including economic objectives and environmental objectives; relevant constraints are set, including micro-power output constraints, microgrid power balance constraints and battery operation constraints. Then, the initial population cluster P0 is randomly generated within the upper and lower limits of the constraints, and an empty set archive set is created. Set the number of iterations t = 0, the initial seed cluster P0 and the archive set All individuals in it represent the power generation output plans of each micro-power source in the microgrid.
[0098] Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i).
[0099] Step 2 is implemented as follows:
[0100] Step 2.1: Merge population P t and archive set And assign original fitness to all individuals in the merged set. The original fitness calculation procedure is as follows: S(i) represents the number of individuals i dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i is dominated by, so it is considered a poor solution in fitness allocation. On the contrary, if S(i) is small, it means that individual i is a better solution because it is dominated by fewer other individuals. S(i) is determined by formula (2-1). Based on S(i), the original fitness R(i) of individual i is determined by formula (2-2):
[0101]
[0102]
[0103] |·| represents the cardinality of a set, that is, the number of elements in the set, P t is the current population, is the current archive set, used to save non-dominated individuals, It means that individual j dominates individual i;
[0104] Step 2.2, assign crowding density to all individuals in the merged set. The crowding density is calculated as follows: When multiple individuals do not dominate each other, R(i) is difficult to achieve its function. Therefore, the crowding density is selected to calculate the distance of each individual to all individuals in the archive set and the population. The expression of crowding density D(i) is shown in formula (2-3):
[0105]
[0106] In the formula, represents the distance from individual i to its kth nearest neighbor in the target space, N and are the number of initial seed clusters and the number of archive sets respectively. Add 2 to the denominator of the expression of D(i) to ensure that the expression is contained between 0 and 1;
[0107] Step 2.3: The total fitness of all individuals in the merged set is composed of the sum of the original fitness R(i) and the crowding density D(i), and the formula is as follows:
[0108] F(i)=R(i)+D(i) (2-4)
[0109] F(i) is the total fitness of individual i, R(i) is the original fitness in step 2.1, and D(i) is the crowding density in step 2.2.
[0110] Step 3: Update the archive set;
[0111] Step 4: Identify the best individual and the worst individual through the total fitness F(i), and select the golden sine algorithm or MOJAYA algorithm to update the population individuals through the MH sampling method;
[0112] Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
[0113] Step 5 is implemented according to the following steps:
[0114] Repeat the process from step 2 to step 4 until the number of iterations is reached, and finally output the archive set; the individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and dispatched; finally, according to the optimization goal, the corresponding objective function is used to select the optimal individual that meets the optimization goal, which is the final micro-source power generation output plan.
[0115] Example 3
[0116] The present invention is based on the microgrid optimization dispatching method of the improved MOJAYA algorithm, which is specifically implemented according to the following steps:
[0117] Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an empty archive set.
[0118] Step 1 is implemented according to the following steps:
[0119] First, the optimization objectives of the microgrid are set, including economic objectives and environmental objectives; relevant constraints are set, including micro-power source output constraints, microgrid power balance constraints and battery operation constraints. Then, an initial seed cluster P0 is randomly generated within the upper and lower limits of the constraints, and an empty set archive set P0 is created. The number of iterations is set to t = 0. All individuals in the initial seed cluster P0 and the archive set P0 represent the power generation output schemes of each micro-power source in the microgrid.
[0120] Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i).
[0121] Step 2 is implemented as follows:
[0122] Step 2.1: Merge population Pt and archive set And assign original fitness to all individuals in the merged set. The original fitness calculation procedure is as follows: S(i) represents the number of individuals i dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i is dominated by, so it is considered a poor solution in fitness allocation. On the contrary, if S(i) is small, it means that individual i is a better solution because it is dominated by fewer other individuals. S(i) is determined by formula (2-1). Based on S(i), the original fitness R(i) of individual i is determined by formula (2-2):
[0123]
[0124]
[0125] |·| represents the cardinality of a set, that is, the number of elements in the set, P t is the current population, is the current archive set, used to save non-dominated individuals, It means that individual j dominates individual i;
[0126] Step 2.2, assign crowding density to all individuals in the merged set. The crowding density is calculated as follows: When multiple individuals do not dominate each other, R(i) is difficult to achieve its function. Therefore, the crowding density is selected to calculate the distance of each individual to all individuals in the archive set and the population. The expression of crowding density D(i) is shown in formula (2-3):
[0127]
[0128] In the formula, represents the distance from individual i to its kth nearest neighbor in the target space, N and are the number of initial seed clusters and the number of archive sets respectively. Add 2 to the denominator of the expression of D(i) to ensure that the expression is contained between 0 and 1;
[0129] Step 2.3: The total fitness of all individuals in the merged set is composed of the sum of the original fitness R(i) and the crowding density D(i), and the formula is as follows:
[0130] F(i)=R(i)+D(i) (2-4)
[0131] F(i) is the total fitness of individual i, R(i) is the original fitness in step 2.1, and D(i) is the crowding density in step 2.2.
[0132] Step 3: Update the archive set.
[0133] Step 3 is implemented as follows:
[0134] P t and All non-dominated individuals (total fitness F(i) < 1) in the next generation archive set are copied to In, if The size exceeds By comparing the density information between individuals Perform truncation operation. Smaller individuals will be removed first, until the size of the archive set is if The size is smaller than Then from P t and Select individuals with fitness F(i)≥1 to add to Until the size of the archive collection is The total fitness and density information are used to update a valid archive set, ensuring that the individuals in the archive set are both diverse and represent high-quality solutions.
[0135] Step 4: Identify the best individual and the worst individual through the total fitness F(i), and select the golden sine algorithm or MOJAYA algorithm to update the population individuals through the MH sampling method;
[0136] Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
[0137] The present invention adopts an improved MOJAYA algorithm to optimize the scheduling of microgrids. The MOJAYA algorithm needs to consider the global optimal solution and the worst solution at the same time to update the population individuals. Although it can accelerate the convergence speed of the algorithm and improve the local search ability, the population diversity and global search ability may decrease with the acceleration of the convergence speed. Therefore, the golden sine algorithm is introduced to update the population position. The golden sine algorithm is a meta-heuristic algorithm proposed by Tanyildizi et al. in 2017. According to the relationship between the sine function and the unit circle, the golden sine algorithm can traverse all points on the sine function, that is, traverse the entire unit circle. The scanning of the entire unit circle is similar to the search of the search space in the optimization problem. At the same time, the golden section coefficient is introduced in the process of its position update, so that each iteration can both narrow the search range and traverse the excellent solution area, while accelerating the convergence speed of the algorithm, improving the local mining ability and solution accuracy. The present invention uses crowding density to judge the density between individuals in the target space, and selects the golden sine algorithm or MOJAYA algorithm to update the population through the MH sampling principle, thereby improving the optimization precision and accuracy of the algorithm, reducing the possibility of falling into the local optimum, and improving its optimization scheduling effect. The present invention solves the problem that the global search ability of the microgrid optimization scheduling algorithm is weak and it is easy to fall into the local optimum in the prior art.
[0138] Example 4
[0139] The present invention is based on the microgrid optimization dispatching method of the improved MOJAYA algorithm, which is specifically implemented according to the following steps:
[0140] Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an empty archive set.
[0141] Step 1 is implemented according to the following steps:
[0142] First, the optimization objectives of the microgrid are set, including economic objectives and environmental objectives; relevant constraints are set, including micro-power output constraints, microgrid power balance constraints and battery operation constraints. Then, the initial population cluster P0 is randomly generated within the upper and lower limits of the constraints, and an empty set archive set is created. Set the number of iterations t = 0, the initial seed cluster P0 and the archive set All individuals in it represent the power generation output plans of each micro-power source in the microgrid.
[0143] Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i).
[0144] Step 2 is implemented as follows:
[0145] Step 3: Update the archive set.
[0146] Step 3 is implemented as follows:
[0147] P t and All non-dominated individuals (total fitness F(i) < 1) in the next generation archive set are copied to In, if The size exceeds By comparing the density information between individuals Perform truncation operation. Smaller individuals will be removed first, until the size of the archive set is if The size is smaller than Then from P t and Select individuals with fitness F(i)≥1 to add to Until the size of the archive collection is The total fitness and density information are used to update a valid archive set, ensuring that the individuals in the archive set are both diverse and represent high-quality solutions.
[0148] Step 4: Identify the best and worst individuals through the total fitness F(i), and select the golden sine algorithm or MOJAYA algorithm to update the population individuals through the MH sampling method;
[0149] Step 4 is implemented according to the following steps:
[0150] Step 4.1: Calculate population P based on formula (2-4) t and archive set The total fitness of each individual in is calculated and sorted. The one with the smallest total fitness value is the optimal solution, and vice versa. The optimal solution and the worst solution are selected.
[0151] Step 4.2: For population P t The individuals in the MH sampling are sampled, that is, a random number r between [0,1] is generated. If r≤λ, the operation in step 4.3 is performed to adopt the first updating method, otherwise go to step 4.4;
[0152] λ=D(i) (4-1)
[0153] D(i) is the crowding density in step 2.2;
[0154] Step 4.3: Update the position of the population using the golden sine method according to formula (4-2):
[0155] x new (i) = x old (i)|sin(r1)|+r2sin(r1)|x1·x best (i) -x2·x old (i)| (4-2)
[0156] Among them, r1∈[0,2π] and r2 are random numbers, r1 determines the moving distance of the individual in the next iteration, r2∈[0,π], r2 determines the position update direction of the i-th individual in the next iteration, r2∈[0,π]; x1 and x2 are coefficients obtained by introducing the golden section number. These coefficients narrow the search space and lead the individual to gradually approach the optimal value, ensuring the convergence of the algorithm. The golden section number is a number defined as The irrational number is denoted as τ, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, the initial values of a and b are set to -π and π, and then a and b change with the change of the target value, and x1 and x2 are also updated accordingly. new is the new optimal solution generated based on the optimal solution and the worst solution obtained in step 4.1, x best 、x worst represent the optimal solution and the worst solution respectively, x old represents the solution before optimization;
[0157] Step 4.4: Update the position of the population in MOJAYA mode according to formula (4-3):
[0158] x new (i) = x old (i)+r1·(x best (i)-|x old (i)|)-r2·(x worst (i)-|x old (i)|) (4-3)
[0159] Apply non-dominated sorting to compare the individuals in the population before and after the update to determine their dominance. If the new individuals after the update can dominate the old individuals before the update, the new individuals will be retained. Otherwise, the new individuals will be discarded. Finally, based on the above steps, the initial population P is updated. t .
[0160] Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
[0161] Step 5 is implemented according to the following steps:
[0162] Repeat the process from step 2 to step 4 until the number of iterations is reached, and finally output the archive set; the individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and dispatched; finally, according to the optimization goal, the corresponding objective function is used to select the optimal individual that meets the optimization goal, which is the final micro-source power generation output plan.
[0163] From Figure 1(a), Figure 1(b) to Figure 5(a) As shown in Figure 5(b), the method of the present invention has the most extensive distribution effect compared with the standard MOJAYA, has the least discontinuity points, and is very close to the Pareto frontier. As can be seen from Tables 1 and 2, it can be seen that the mean values of GD and SP of the algorithm of the present invention are smaller than the indicators of the traditional MOJAYA algorithm, which verifies that the convergence and distribution of the improved algorithm are better than those of the algorithm before the improvement. From the data in Table 3, it can be seen that in the optimization platform, when the standard MOJAYA algorithm is used for optimization and regulation, the comprehensive cost is 2347.9 yuan, and after the improved MOJAYA algorithm optimization strategy, it is reduced to 1965.3 yuan. At this time, the comprehensive cost is reduced by 19.47%, reflecting the excellent performance of reducing the comprehensive cost.
[0164] Example 5
[0165] This embodiment first uses a multi-objective optimization ZDT series test function to test the improved MOJAYA algorithm to verify its superiority. The experimental results are compared with the unimproved MOJAYA algorithm. The following is the ZDT series test function:
[0166] (1)ZDT1
[0167]
[0168] (2)ZDT2
[0169]
[0170] (3)ZDT3
[0171]
[0172] (4)ZDT4
[0173]
[0174] (5)ZDT6
[0175]
[0176] In order to accurately evaluate the performance of the algorithm, the convergence index (GD) and uniformity index (SP) are selected for testing. The calculation process is shown in formulas (1-6) and (1-7):
[0177] (1) Convergence index
[0178]
[0179] In the formula, |P| represents the number of Pareto frontier solution sets, M represents the spatial dimension, d represents the minimum Euclidean distance between the solution in the dimension and the optimal frontier, and the convergence index represents the convergence performance of the algorithm. The larger the value, the worse the convergence performance, and the smaller the value, the better the performance.
[0180] (2) Uniformity index
[0181] f(x)=λ1·f(x1)+λ2·f(x2) (1-7)
[0182] Where, d i represents the distance between the ith solution and the adjacent solution, Indicates d i The index SP represents the distribution of solutions. If the SP is smaller, the distribution of solutions is more uniform.
[0183] The population size of the standard MOJAYA algorithm and the improved MOJAYA algorithm are both set to 200, the number of archive sets is also set to 200, and the iteration parameter is set to 100 times.
[0184] The ZDT test function is tested by the present invention, and the test results are compared and displayed as shown in Figures 1-5, and the performance index data results are shown in Tables 1 and 2. Figure 1(b) to Figure 5(a) As shown in Figure 5(b), the method of the present invention has the widest distribution effect compared with the standard MOJAYA, has the least discontinuity points, and is very close to the Pareto frontier. As shown in Tables 1 and 2, it can be seen that the mean values of GD and SP of the algorithm of the present invention are smaller than those of the traditional MOJAYA algorithm, which verifies that the convergence and distribution of the improved algorithm are better than those of the algorithm before the improvement.
[0185] Table 1 Comparison of GD evaluation indicators
[0186]
[0187] Table 2 Comparison of SP evaluation indicators
[0188] function ZDT1 ZDT2 ZDT3 ZDT4 ZDT6 Standard MOJAYA 0.023 0.0125 0.0133 0.0060 0.0046 Improved MOJAYA 0.0064 0.0111 0.0114 0.0041 0.0040
[0189] Table 3 Comprehensive cost comparison
[0190] Scheduling strategy Comprehensive cost / yuan MOJAYA Optimization Strategy 2347.9 Improved MOJAYA optimization strategy 1965.3
[0191] Example 6
[0192] This embodiment uses a grid-connected microgrid system including various distributed power sources, including photovoltaic generators (PV), wind turbines (WT), diesel generators (DE), gas turbines (MT) and energy storage batteries for optimization scheduling, taking the comprehensive cost of the microgrid as the optimization target and the micro-power generation output plan as the output result, while considering the economy and environmental protection of the microgrid. Minimize the comprehensive cost. The following formula is the objective function of the comprehensive cost of the microgrid:
[0193]
[0194] Where f1(t) is the economic goal and f2(t) is the environmental goal.
[0195] 1. Economic goals
[0196] Wind power and photovoltaic power generation in microgrids use renewable resources to generate electricity and do not consume fossil fuels. When operating in microgrids, their operation and maintenance costs should be considered first. The construction cost of gas turbines and diesel generators is fixed, so they are not included in the optimization target. Their fuel costs and operation and maintenance costs are directly calculated. The battery charging and discharging costs, depreciation costs, and grid interaction costs must also be considered. By consulting the data for relevant design, the objective function is expressed as shown in formula (2-2):
[0197]
[0198] In the formula, f om is the maintenance cost, f fuel is the fuel cost, P bat,i It represents the average charging and discharging power of the energy storage device in the i period. If it is a positive number, it means that the energy storage device is in the charging state at this time. If it is a discharging number, it means that the energy storage device is in the discharging state at this time. H represents the total number of time periods in a scheduling cycle. bw is the depreciation cost of battery charging and discharging. CE Represents the electricity price factor.
[0199] 2. Environmental goals
[0200] The environmental cost in the microgrid mainly considers the impact of pollutant gases and particulate matter emissions. Since photovoltaic power generation equipment and wind power generation equipment use clean energy to generate electricity, various pollutant gases will not be generated during the operation of the equipment. Therefore, such equipment is not added to the environmental cost function. The main consideration is the impact of pollutant gases from diesel generators and gas turbines.
[0201] Taking environmental cost as the objective function, the objective function expression is shown in formula (2-3):
[0202]
[0203] In the formula, K is the type of pollutant emission (such as SO2, NO2, CO2), a is the unit cost of pollutant treatment, β is the emission coefficient of the jth pollutant when producing different electricity, and P is the power generation power of the equipment at this time.
[0204] 3. Constraint function
[0205] Based on the electric energy interaction between the microgrid and the grid and the characteristics of the microgrid itself in the present invention, the following constraints are given:
[0206] (1) Micro power output constraints
[0207] In order to ensure the operational stability of the microgrid, each type of micropower device in the microgrid imposes relevant constraints on the upper and lower limits of the device operation:
[0208]
[0209] Where P i represents the power generation of the i-th unit, P i min is the minimum power generation, P i max is the maximum power generation.
[0210] (2) Microgrid power balance constraints
[0211]
[0212] Where P i represents the power generation of the i-th unit, P L is the load power, P PV is the photovoltaic power, P WT is the wind power generation power, P bat is the energy storage battery power, P buy and P sell For the power interaction with the grid.
[0213] (3) Battery operation constraints
[0214] SOC min <SOC i <SOC max (2-6)
[0215] In the formula, SOC i is the battery state of charge at time i, and SOC min , SOC max The upper and lower limits of the state of charge, usually the battery state of charge value is set to 0.2 and 1.
[0216] The present invention mainly uses the improved MOJAYA optimization algorithm to solve the microgrid optimization scheduling model and the microgrid operation strategy established according to the above objective function and constraint conditions. The number of populations of the standard MOJAYA algorithm and the improved MOJAYA algorithm is set to 200, the number of archive sets is also 200, and the iteration parameter is 200 times.
[0217] The present invention is used to optimize the microgrid and display the optimization results. Figure 6 As shown in the figure; it can be seen from the figure that during the period of 0:00-8:00, some distributed generation modules have not yet started, and the load demand is neither at the peak nor at the valley. Therefore, during this period, the power interaction behavior fluctuates less. However, at this time, the purchase price of electricity is at a low point. Purchasing electricity into the microgrid not only helps to reduce operating costs, but also can use this electricity to charge energy storage equipment. During the peak period of electricity prices, the electricity sales price exceeds the power generation cost of distributed generation equipment. While ensuring that the load demand is met and the operation balance is maintained, the microgrid should increase the output of the micro power source as much as possible to generate excess electricity for sale to the grid, thereby achieving economic benefits. From 18:00 to 20:00, this is the peak period of purchasing and selling electricity to the large power grid. The observation of the equipment output state curve and the load demand curve can draw the following conclusions: the distributed generation equipment has reached the working state of the limit output. At this time, the complete discharge of the energy storage unit cannot meet the user's load demand. Therefore, it is necessary to choose to purchase electricity from the large power grid so that the safety and reliability of the microgrid system are correspondingly guaranteed. From the above analysis, it can be concluded that time-of-use electricity prices are closely related to electricity interaction, and the optimization scheduling strategy is also reflected in the instance scheduling process to a certain extent, which explains the effectiveness and practicality of the optimization scheduling strategy and optimization scheduling model invented in this paper.
[0218] The comprehensive cost comparison is shown in Table 3. According to the data in the table, in the optimization platform, when the standard MOJAYA algorithm is used for optimization and regulation, the comprehensive cost is 2347.9 yuan, and after the improved MOJAYA algorithm optimization strategy, it is reduced to 1965.3 yuan. At this time, the comprehensive cost is reduced by 19.47%, reflecting the excellent performance of reducing the comprehensive cost.
Claims
1. A microgrid optimization dispatching method based on an improved MOJAYA algorithm is characterized in that: Follow the steps below to implement it: Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and empty archive set; Step 2: Merge the initial population and the empty archive set and calculate the total fitness of all individuals in the merged set. The total fitness F(i) is composed of the original fitness R(i) and the crowding density D(i); Step 3: Update the archive set. Step 4: Identify the best and worst individuals through the total fitness F(i), and update the population individuals through the MH sampling method; Step 5: Iterate the loop and finally output the archive set. The individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and scheduled.
2. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 1 is characterized in that: The step 1 is specifically implemented according to the following steps: Set the optimization goals of the microgrid, including economic goals and environmental goals; set relevant constraints, including micro-power output constraints, microgrid power balance constraints and battery operation constraints, and then randomly generate the initial seed cluster P0 within the upper and lower limits of the constraints, and create an empty set archive set Set the number of iterations t = 0, the initial seed cluster P0 and the archive set All individuals in it represent the power generation output plans of each micro-power source in the microgrid.
3. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 2 is characterized in that: The step 2 is specifically implemented according to the following steps: Step 2.1: Merge population P t and archive set And assign original fitness to all individuals in the merged set. The original fitness calculation procedure is as follows: S(i) represents the number of individuals i dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i is dominated by, so it is considered a poor solution in fitness allocation. On the contrary, if S(i) is small, it means that individual i is a better solution because it is dominated by fewer other individuals. S(i) is determined by formula (2-1). Based on S(i), the original fitness R(i) of individual i is determined by formula (2-2): |·| represents the cardinality of a set, that is, the number of elements in the set, P t is the current population, is the current archive set, used to save non-dominated individuals, It means that individual j dominates individual i; Step 2.2, assign crowding density to all individuals in the merged set. The crowding density is calculated as follows: Select crowding density to calculate the distance of each individual to all individuals in the archive set and the population. The expression of crowding density D(i) is shown in formula (2-3): In the formula, represents the distance from individual i to its kth nearest neighbor in the target space, N and are the number of initial seed clusters and the number of archive sets respectively. Add 2 to the denominator of the expression of D(i) to ensure that the expression is contained between 0 and 1; Step 2.3: The total fitness F(i) of all individuals in the merged set is composed of the sum of the original fitness R(i) and the crowding density D(i), and the formula is as follows: F(i)=R(i)+D(i) (2-4) F(i) is the total fitness of individual i, R(i) is the original fitness in step 2.1, and D(i) is the crowding density in step 2.
2.
4. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 3 is characterized in that: The step 3 is specifically implemented according to the following steps: P t and All non-dominated individuals in the next generation archive set are copied to In the above example, the total fitness F(i) < 1, if The size exceeds By comparing the density information between individuals Perform truncation operation. Smaller individuals will be removed first, until the size of the archive set is if The size is smaller than Then from P t and Select individuals with fitness F(i)≥1 to add to Until the size of the archive collection is The total fitness and density information are used to update a valid archive set, ensuring that the individuals in the archive set are both diverse and represent high-quality solutions.
5. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 4 is characterized in that: The step 4 is specifically implemented according to the following steps: Step 4.1: Calculate population P based on formula (2-4) t and archive set The total fitness of each individual in is calculated and sorted. The one with the smallest total fitness value is the optimal solution, and vice versa is the worst solution. Select the optimal solution and the worst solution. Step 4.2: For population P t MH sampling was performed on individuals in; Step 4.3: Update the position of the population using the golden sine method according to formula (4-2); Step 4.4: Update the position of the population in MOJAYA mode according to formula (4-3): x new (i)=x old (i)+r1·(x best (i)-|x old (i)|)-r2·(x worst (i)-|x old (i)|) (4-3) Apply non-dominated sorting to compare the individuals in the population before and after the update to determine their dominance. If the new individuals after the update can dominate the old individuals before the update, the new individuals will be retained. Otherwise, the new individuals will be discarded. Finally, based on the above steps, the initial population P is updated. t .
6. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 5 is characterized in that: The step 4.2 is specifically implemented according to the following steps: That is, generate a random number r between [0,1]. If r≤λ, execute step 4.3 and use the first update method. Otherwise, go to step 4.
4. λ=D(i) (4-1) D(i) is the crowding density in step 2.
2.
7. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 6 is characterized in that: The step 4.3 of updating the position of the population is as follows: x new (i)=x old (i)|sin(r1)|+r2sin(r1)|x1·x best (i)-x2·x old (i)| (4-2) Among them, r1∈[0,2π] and r2 are random numbers, r1 determines the moving distance of the individual in the next iteration, r2∈[0,π], r2 determines the position update direction of the i-th individual in the next iteration, r2∈[0,π]; x1 and x2 are coefficients obtained by introducing the golden section number, which is a number defined as The irrational number is denoted as τ, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, the initial values of a and b are set to -π and π, and then a and b change with the change of the target value, and x1 and x2 are also updated accordingly. new is the new optimal solution generated according to the optimal solution and the worst solution obtained in step 4.1, x best 、x worst represent the optimal solution and the worst solution respectively, x old represents the solution before optimization.
8. The microgrid optimization scheduling method based on the improved MOJAYA algorithm according to claim 7 is characterized in that: The step 5 is specifically implemented according to the following steps: Repeat the process from step 2 to step 4 until the number of iterations is reached, and finally output the archive set; the individuals in the archive set represent the power generation output plans of each micro-source after the microgrid is optimized and dispatched; finally, according to the optimization goal, the corresponding objective function is used to select the optimal individual that meets the optimization goal, which is the final micro-source power generation output plan.
Citation Information
Patent Citations
Full-cycle high-efficiency and high-precision optimal scheduling method and system for hydropower system
CN111915163A
Function test method based on improved multi-objective particle swarm optimization
CN114444646A
Wide-area micro-grid group power supply capacity cooperative configuration method and device
CN116454999A
Photovoltaic power prediction method based on improved MICN
CN116776935A
Cement calcination process multi-target time domain rolling optimization algorithm research based on Jaya algorithm
CN117742143A