Microgrid optimal scheduling method based on improved mojaya algorithm
By combining the improved MOJAYA algorithm with Metropolis-Hastings sampling and the golden sine algorithm, the problem of insufficient global search capability in microgrid optimal scheduling is solved, achieving more efficient multi-objective optimization and reducing electricity costs.
Patent Information
- Application Number
- CN202411576328.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2044-11-06
AI Technical Summary
Existing microgrid optimization scheduling algorithms have weak global search capabilities when dealing with multi-objective optimization problems, are prone to getting trapped in local optima, and are difficult to simultaneously optimize economy, environmental protection and power supply security.
An improved MOJAYA algorithm is adopted, which combines the Metropolis-Hastings sampling method and the golden sine algorithm. The population is evaluated by total fitness and crowding density, and the population is updated to avoid local optima and improve global search capability.
It improves the optimization accuracy and power efficiency of microgrid scheduling, reduces power costs, enhances the algorithm's global search capability, and avoids getting trapped in local optima.
Smart Images

Figure CN119448438B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of microgrid optimization scheduling technology, specifically relating to a microgrid optimization scheduling method based on an improved MOJAYA algorithm. Background Technology
[0002] Microgrid optimal dispatch is a crucial research area for energy management, generally aiming to minimize operating costs, emission costs, and outage costs, while maximizing renewable energy utilization and microgrid operational economics under various constraints. Microgrid optimal dispatch not only considers generation costs but also the overall environmental benefits of distributed power source combinations; therefore, dispatch optimization is essential for improving electricity efficiency and reducing electricity costs. Regarding optimal dispatch models and strategies, with the increasing prevalence and application of microgrid technology, maximizing the economic, technological, and environmental benefits of microgrids has become a critical research topic. Currently, intelligent optimization algorithms are primarily used to solve microgrid optimal dispatch models. These algorithms include evolutionary algorithms, natural-inspired optimization algorithms, and plant-growth-inspired swarm intelligence algorithms, which perform well in microgrid optimal dispatch. However, in practical solutions to microgrid dispatch models, most researchers use standard particle swarm optimization, standard Mojay algorithm, genetic algorithms, and their improved versions. These algorithms typically only solve single-objective problems and struggle with multi-objective optimization problems, especially when simultaneously considering microgrid economics, environmental friendliness, power supply security, and optimal configuration. Single-objective algorithms often fail to find the optimal value and have weak global search capabilities, easily getting trapped in local optima. Therefore, to improve the optimal scheduling capabilities and power efficiency of microgrid power systems, a new optimal scheduling method needs to be developed. This method aims to improve the accuracy of microgrid optimal scheduling, avoid getting trapped in local optima, increase power efficiency, and reduce electricity costs. Summary of the Invention
[0003] The purpose of this invention is to provide a microgrid optimization scheduling method based on the improved MOJAYA algorithm, which solves the problem that the existing technology has weak global search capability of integrated microgrids and is prone to getting trapped in local optima.
[0004] The technical solution adopted in this invention is a microgrid optimal scheduling method based on an improved MOJAYA algorithm, which is 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 using the total fitness F(i), and update the population using the Metropolis-Hastings (MH) sampling method;
[0009] Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
[0010] The invention is further characterized in that,
[0011] Step 1 is implemented in the following steps:
[0012] First, the optimization objectives of the microgrid are set, including economic and environmental objectives. Relevant constraints are then defined, including micro-source output constraints, microgrid power balance constraints, and battery operation constraints. Next, an initial population cluster P0 is randomly generated within the upper and lower limits of these constraints, while an empty set archive is created. Set the iteration count t=0, and initialize the seed cluster P0 and the archive set. Each individual within represents a micro-power generation scheme of the microgrid.
[0013] Step 2 is implemented in the following steps:
[0014] Step 2.1: Merge populations P t and archive collection The initial fitness is assigned to all individuals in the merged set. The initial fitness calculation procedure is as follows: S(i) represents the number of individuals i are dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i are dominated by other individuals, and therefore it is considered a poor solution in fitness assignment. Conversely, if S(i) is small, it means that individual i is a good solution because it is dominated by fewer other individuals. S(i) is determined by equation (2-1). Based on S(i), the initial fitness R(i) of individual i is determined by equation (2-2):
[0015]
[0016]
[0017] |·| represents the cardinality of a set, that is, the number of elements in the set, P.t It is the current population. This is the current archive set, used to store non-dominated individuals. This indicates 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: The crowding density is calculated to determine the distance of each individual to the archive set and all individuals in the population. The expression for the crowding density D(i) is shown in Equation (2-3):
[0019]
[0020] In the formula, Let represent the distance from individual i to its k-th nearest neighbor in the target space. N and Let be the number of initial seed clusters and the number of archive sets, respectively. Add 2 to the denominator of the expression for 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 original fitness R(i) and the crowding density D(i), as shown in the following formula:
[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 in the following steps:
[0025] P t and All non-dominant individuals (total fitness F(i) < 1) are copied to the next generation archive set. In the middle, if Size exceeding Then by comparing density information among individuals Perform a truncation operation. Smaller individuals will be removed first, until the size of the archive is reached. if The size is smaller than Then from P t and Individuals with fitness F(i) ≥ 1 are selected to supplement the population. In, until the size of the archive collection is Update an effective archive set using total fitness and density information to ensure that the individuals in the archive set are both diverse and represent high-quality solutions.
[0026] Step 4 is implemented in the following steps:
[0027] Step 4.1: Calculate the population P based on equation (2-4). t and archive collection The total fitness of each individual in the solution is calculated and sorted. The solution with the smallest total fitness value is the optimal solution, and the solution with the largest total fitness value is the worst solution. The optimal and worst solutions are then selected.
[0028] Step 4.2, for population P t MH sampling is performed on the individuals in the sample, that is, a random number r between [0,1] is generated. If r≤λ, then the first update method is used in step 4.3; otherwise, the process is transferred 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 population position using the golden sine curve according to equation (4-2):
[0032] x new (i)=x old (i)|sin(r1)|+r2sin(r1)|x1·x best (i)-x2·x old (i)| (4-2)
[0033] Where r1∈[0,2π] and r2 are random numbers, r1 determines the movement distance of the individual in the next iteration, and r2∈[0,π] determines the position update direction of the i-th individual in the next iteration; x1 and x2 are coefficients obtained by introducing the golden ratio, which is a coefficient defined as... Let τ be an irrational number, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, with initial values of a and b set to -π and π respectively. Subsequently, a and b change with the target value, and x1 and x2 are updated accordingly. new To generate a new optimized solution based on the optimal and worst solutions obtained in step 4.1, x best x worst Let x represent the optimal solution and the worst solution, respectively. old This represents the solution before optimization;
[0034] Step 4.4: Update the population position using MOJAYA according to equation (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] The non-dominated sorting method is applied to compare the individuals in the population before and after the update to determine their dominance. If the new individual after the update can dominate the old individual before the update, the new individual is retained; otherwise, the new individual is discarded. Finally, based on the above steps, the initial population P is updated. t .
[0037] Step 5 is implemented in the following steps:
[0038] Repeat steps 2 to 4 until the number of iterations is reached, and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled. Finally, according to the optimization objective, the optimal individual that meets the optimization objective is selected by the corresponding objective function, which is the final power generation scheme of the micro-power source.
[0039] The beneficial effects of this invention are that it provides a microgrid optimization scheduling method based on an improved MOJAYA algorithm, which optimizes microgrid scheduling while considering both economic efficiency and environmental friendliness. This invention integrates the golden sine algorithm and the MOJAYA algorithm using the MH sampling method to jointly determine the population update pattern, thus enhancing the algorithm's global search capability and making it less prone to getting trapped in local optima. This significantly improves the optimization accuracy of microgrid scheduling, increases power efficiency, and reduces electricity costs. Attached Figure Description
[0040] Figure 1(a) shows the test results of the improved MOJAYA algorithm on the ZDT1 function;
[0041] Figure 1(b) shows the test results of the ZDT1 function using the standard MOJAYA algorithm;
[0042] Figure 2(a) shows the test results of the improved MOJAYA algorithm on the ZDT2 function;
[0043] Figure 2(b) shows the test results of the ZDT2 function using the standard MOJAYA algorithm;
[0044] Figure 3(a) shows the test results of the improved MOJAYA algorithm on the ZDT3 function;
[0045] Figure 3(b) shows the test results of the ZDT3 function using the standard MOJAYA algorithm;
[0046] Figure 4(a) shows the test results of the improved MOJAYA algorithm on the ZDT4 function;
[0047] Figure 4(b) shows the test results of the ZDT4 function using the standard MOJAYA algorithm;
[0048] Figure 5(a) shows the test results of the improved MOJAYA algorithm on the ZDT6 function;
[0049] Figure 5(b) shows the test results of the ZDT6 function using the standard MOJAYA algorithm;
[0050] Figure 6 This is a diagram showing the microgrid optimization scheduling results based on the improved MOJAYA algorithm, i.e., the micro-power generation output scheme. Detailed Implementation
[0051] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0052] This invention relates to a microgrid optimal scheduling method based on an improved MOJAYA algorithm, which is 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 in the following steps:
[0055] First, set the optimization objectives of the microgrid, including economic and environmental objectives; set relevant constraints, including micro-power generation output constraints, microgrid power balance constraints, and battery operation constraints. Then, randomly generate an initial population cluster P0 within the upper and lower limits of the constraints, and simultaneously create an empty set archive P0. Set the iteration number t=0. All individuals in the initial population cluster P0 and the archive set P0 represent the power generation schemes of various micro-power sources 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 in the following steps:
[0058] Step 2.1: Merge populations P t and archive collection The initial fitness is assigned to all individuals in the merged set. The initial fitness calculation procedure is as follows: S(i) represents the number of individuals i are dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i are dominated by other individuals, and therefore it is considered a poor solution in fitness assignment. Conversely, if S(i) is small, it means that individual i is a good solution because it is dominated by fewer other individuals. S(i) is determined by equation (2-1). Based on S(i), the initial fitness R(i) of individual i is determined by equation (2-2):
[0059]
[0060]
[0061] |·| represents the cardinality of a set, that is, the number of elements in the set, P. t It is the current population. This is the current archive set, used to store non-dominated individuals. This indicates 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 play its role. Therefore, crowding density is selected to calculate the distance of each individual to the archive set and all individuals in the population. The expression for crowding density D(i) is shown in Equation (2-3):
[0063]
[0064] In the formula, Let represent the distance from individual i to its k-th nearest neighbor in the target space. N and Let be the number of initial seed clusters and the number of archive sets, respectively. Add 2 to the denominator of the expression for 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 original fitness R(i) and the crowding density D(i), as shown in the following formula:
[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 in the following steps:
[0070] P t and All non-dominant individuals (total fitness F(i) < 1) are copied to the next generation archive set. In the middle, if Size exceeding Then by comparing density information among individuals Perform a truncation operation. Smaller individuals will be removed first, until the size of the archive is reached. if The size is smaller than Then from P t and Individuals with fitness F(i) ≥ 1 are selected to supplement the population. In, until the size of the archive collection is Update an effective archive set using total fitness and density information to ensure that the individuals in the archive set are both diverse and represent high-quality solutions.
[0071] Step 4: Identify the best and worst individuals using the total fitness F(i), and use the MH sampling method to select either the Golden Sine Algorithm or the MOJAYA Algorithm for population updates;
[0072] Step 4 is implemented in the following steps:
[0073] Step 4.1: Calculate the population P based on equation (2-4). t and archive collection The total fitness of each individual in the solution is calculated and sorted. The solution with the smallest total fitness value is the optimal solution, and the solution with the largest total fitness value is the worst solution. The optimal and worst solutions are then selected.
[0074] Step 4.2, for population P t MH sampling is performed on the individuals in the sample, that is, a random number r between [0,1] is generated. If r≤λ, then the first update method is used in step 4.3; otherwise, the process is transferred 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 population position using the golden sine curve according to equation (4-2):
[0078] x new (i)=x old (i)|sin(r1)|+r2sin(r1)|x1·x best(i)-x2·x old (i)| (4-2)
[0079] Where r1∈[0,2π] and r2 are random numbers, r1 determines the movement distance of the individual in the next iteration, and r2∈[0,π] determines the position update direction of the i-th individual in the next iteration; x1 and x2 are coefficients obtained by introducing the golden ratio. These coefficients reduce the search space, guiding the individual to gradually approach the optimal value and ensuring the convergence of the algorithm. The golden ratio is a number defined as... Let τ be an irrational number, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, with initial values of a and b set to -π and π respectively. Subsequently, a and b change with the target value, and x1 and x2 are updated accordingly. new To generate a new optimized solution based on the optimal and worst solutions obtained in step 4.1, x best x worst Let x represent the optimal solution and the worst solution, respectively. old This represents the solution before optimization;
[0080] Step 4.4: Update the population position using MOJAYA according to equation (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] The non-dominated sorting method is applied to compare the individuals in the population before and after the update to determine their dominance. If the new individual after the update can dominate the old individual before the update, the new individual is retained; otherwise, the new individual is discarded. Finally, based on the above steps, the initial population P is updated. t .
[0083] Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
[0084] Step 5 is implemented in the following steps:
[0085] Repeat steps 2 to 4 until the number of iterations is reached, and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled. Finally, according to the optimization objective, the optimal individual that meets the optimization objective is selected by the corresponding objective function, which is the final power generation scheme of the micro-power source.
[0086] Example 1
[0087] This invention relates to a microgrid optimal scheduling method based on an improved MOJAYA algorithm, which is 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 using the total fitness F(i), and use the MH sampling method to select either the Golden Sine Algorithm or the MOJAYA Algorithm for population updates;
[0092] Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
[0093] Example 2
[0094] This invention relates to a microgrid optimal scheduling method based on an improved MOJAYA algorithm, which is 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 in the following steps:
[0097] First, the optimization objectives of the microgrid are set, including economic and environmental objectives. Relevant constraints are then defined, including micro-source output constraints, microgrid power balance constraints, and battery operation constraints. Next, an initial population cluster P0 is randomly generated within the upper and lower limits of these constraints, while an empty set archive is created. Set the iteration count t=0, and initialize the seed cluster P0 and the archive set. Each individual within represents a micro-power generation scheme of 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 in the following steps:
[0100] Step 2.1: Merge populations P t and archive collection The initial fitness is assigned to all individuals in the merged set. The initial fitness calculation procedure is as follows: S(i) represents the number of individuals i are dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i are dominated by other individuals, and therefore it is considered a poor solution in fitness assignment. Conversely, if S(i) is small, it means that individual i is a good solution because it is dominated by fewer other individuals. S(i) is determined by equation (2-1). Based on S(i), the initial fitness R(i) of individual i is determined by equation (2-2):
[0101]
[0102]
[0103] |·| represents the cardinality of a set, that is, the number of elements in the set, P. t It is the current population. This is the current archive set, used to store non-dominated individuals. This indicates 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 play its role. Therefore, crowding density is selected to calculate the distance of each individual to the archive set and all individuals in the population. The expression for crowding density D(i) is shown in Equation (2-3):
[0105]
[0106] In the formula, Let represent the distance from individual i to its k-th nearest neighbor in the target space. N and Let be the number of initial seed clusters and the number of archive sets, respectively. Add 2 to the denominator of the expression for 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 original fitness R(i) and the crowding density D(i), as shown in the following formula:
[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 and worst individuals using the total fitness F(i), and use the MH sampling method to select either the Golden Sine Algorithm or the MOJAYA Algorithm for population updates;
[0112] Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
[0113] Step 5 is implemented in the following steps:
[0114] Repeat steps 2 to 4 until the number of iterations is reached, and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled. Finally, according to the optimization objective, the optimal individual that meets the optimization objective is selected by the corresponding objective function, which is the final power generation scheme of the micro-power source.
[0115] Example 3
[0116] This invention relates to a microgrid optimal scheduling method based on an improved MOJAYA algorithm, which is 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 in the following steps:
[0119] First, set the optimization objectives of the microgrid, including economic and environmental objectives; set relevant constraints, including micro-power generation output constraints, microgrid power balance constraints, and battery operation constraints. Then, randomly generate an initial population cluster P0 within the upper and lower limits of the constraints, and simultaneously create an empty set archive P0. Set the iteration number t=0. All individuals in the initial population cluster P0 and the archive set P0 represent the power generation schemes of various micro-power sources 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 in the following steps:
[0122] Step 2.1: Merge populations Pt and archive collection The initial fitness is assigned to all individuals in the merged set. The initial fitness calculation procedure is as follows: S(i) represents the number of individuals i are dominated by other individuals in the population and archive set. The larger S(i) is, the more individuals i are dominated by other individuals, and therefore it is considered a poor solution in fitness assignment. Conversely, if S(i) is small, it means that individual i is a good solution because it is dominated by fewer other individuals. S(i) is determined by equation (2-1). Based on S(i), the initial fitness R(i) of individual i is determined by equation (2-2):
[0123]
[0124]
[0125] |·| represents the cardinality of a set, that is, the number of elements in the set, P. t It is the current population. This is the current archive set, used to store non-dominated individuals. This indicates 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 play its role. Therefore, crowding density is selected to calculate the distance of each individual to the archive set and all individuals in the population. The expression for crowding density D(i) is shown in Equation (2-3):
[0127]
[0128] In the formula, Let represent the distance from individual i to its k-th nearest neighbor in the target space. N and Let be the number of initial seed clusters and the number of archive sets, respectively. Add 2 to the denominator of the expression for 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 original fitness R(i) and the crowding density D(i), as shown in the following formula:
[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 in the following steps:
[0134] P t and All non-dominant individuals (total fitness F(i) < 1) are copied to the next generation archive set. In the middle, if Size exceeding Then by comparing density information among individuals Perform a truncation operation. Smaller individuals will be removed first, until the size of the archive is reached. if The size is smaller than Then from P t and Individuals with fitness F(i) ≥ 1 are selected to supplement the population. In, until the size of the archive collection is Update an effective archive set using total fitness and density information to ensure that the individuals in the archive set are both diverse and represent high-quality solutions.
[0135] Step 4: Identify the best and worst individuals using the total fitness F(i), and use the MH sampling method to select either the Golden Sine Algorithm or the MOJAYA Algorithm for population updates;
[0136] Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
[0137] This invention employs an improved Mojay-A algorithm for optimized scheduling of microgrids. While the Mojay-A algorithm, which considers both the global optimum and worst-case solutions to update the population, can accelerate convergence and improve local search capabilities, population diversity and global search ability may decrease with faster convergence. Therefore, the Golden Sine Algorithm is introduced for population position updates. The Golden Sine Algorithm, proposed by Tanyildizi et al. in 2017, is a metaheuristic algorithm. Based on the relationship between the sine function and the unit circle, it can traverse all points on the sine function, effectively traversing the entire unit circle. Scanning the entire unit circle is analogous to searching the search space in an optimization problem. Furthermore, the introduction of the golden ratio during position updates allows each iteration to both narrow the search range and traverse regions of excellent solutions, accelerating convergence while improving local mining capabilities and solution accuracy. This invention assesses the density of individuals in the target space by using crowding density, and selects either the Golden Sine Algorithm or the Mojay-Smithsonian Algorithm for population updates using the MH sampling principle. This improves the accuracy and precision of the algorithm's optimization, reduces the possibility of getting trapped in local optima, and enhances its optimization scheduling performance. This invention addresses the problem in existing microgrid optimization scheduling algorithms that have weak global search capabilities and are prone to getting trapped in local optima.
[0138] Example 4
[0139] This invention relates to a microgrid optimal scheduling method based on an improved MOJAYA algorithm, which is 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 in the following steps:
[0142] First, the optimization objectives of the microgrid are set, including economic and environmental objectives. Relevant constraints are then defined, including micro-source output constraints, microgrid power balance constraints, and battery operation constraints. Next, an initial population cluster P0 is randomly generated within the upper and lower limits of these constraints, while an empty set archive is created. Set the iteration count t=0, and initialize the seed cluster P0 and the archive set. Each individual within represents a micro-power generation scheme of 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 in the following steps:
[0145] Step 3: Update the archive set;
[0146] Step 3 is implemented in the following steps:
[0147] P t and All non-dominant individuals (total fitness F(i) < 1) are copied to the next generation archive set. In the middle, if Size exceeding Then by comparing density information among individuals Perform a truncation operation. Smaller individuals will be removed first, until the size of the archive is reached. if The size is smaller than Then from P t and Individuals with fitness F(i) ≥ 1 are selected to supplement the population. In, until the size of the archive collection is Update an effective archive set using total fitness and density information to ensure that the individuals in the archive set are both diverse and represent high-quality solutions.
[0148] Step 4: Identify the best and worst individuals using the total fitness F(i), and use the MH sampling method to select either the Golden Sine Algorithm or the MOJAYA Algorithm for population updates;
[0149] Step 4 is implemented in the following steps:
[0150] Step 4.1: Calculate the population P based on equation (2-4). t and archive collection The total fitness of each individual in the solution is calculated and sorted. The solution with the smallest total fitness value is the optimal solution, and the solution with the largest total fitness value is the worst solution. The optimal and worst solutions are then selected.
[0151] Step 4.2, for population P t MH sampling is performed on the individuals in the sample, that is, a random number r between [0,1] is generated. If r≤λ, then the first update method is used in step 4.3; otherwise, the process is transferred 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 population position using the golden sine curve according to equation (4-2):
[0155] x new (i)=x old (i)|sin(r1)|+r2sin(r1)|x1·x best (i)-x2·x old (i)| (4-2)
[0156] Where r1∈[0,2π] and r2 are random numbers, r1 determines the movement distance of the individual in the next iteration, and r2∈[0,π] determines the position update direction of the i-th individual in the next iteration; x1 and x2 are coefficients obtained by introducing the golden ratio. These coefficients reduce the search space, guiding the individual to gradually approach the optimal value and ensuring the convergence of the algorithm. The golden ratio is a number defined as... Let τ be an irrational number, x1 = aτ + b(1-τ), x2 = a(1-τ) + bτ, with initial values of a and b set to -π and π respectively. Subsequently, a and b change with the target value, and x1 and x2 are updated accordingly. new To generate a new optimized solution based on the optimal and worst solutions obtained in step 4.1, x best x worst Let x represent the optimal solution and the worst solution, respectively. old This represents the solution before optimization;
[0157] Step 4.4: Update the population position using MOJAYA according to equation (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] The non-dominated sorting method is applied to compare the individuals in the population before and after the update to determine their dominance. If the new individual after the update can dominate the old individual before the update, the new individual is retained; otherwise, the new individual is discarded. Finally, based on the above steps, the initial population P is updated. t .
[0160] Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
[0161] Step 5 is implemented in the following steps:
[0162] Repeat steps 2 to 4 until the number of iterations is reached, and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled. Finally, according to the optimization objective, the optimal individual that meets the optimization objective is selected by the corresponding objective function, which is the final power generation scheme of the micro-power source.
[0163] From Figure 1(a), Figures 1(b) to 5(a) As shown in Figure 5(b), the method of this invention exhibits the most extensive distribution effect and the fewest discontinuities compared to the standard MOJAYA algorithm, and closely approximates the Pareto front. Tables 1 and 2 show that the mean values of GD and SP of the algorithm of this invention are lower than those of the traditional MOJAYA algorithm, verifying that the convergence and distribution of the improved algorithm are superior to those of the original algorithm. Table 3 shows that in the optimization platform, the overall cost was 2347.9 yuan after optimization using the standard MOJAYA algorithm, but decreased to 1965.3 yuan after the improved MOJAYA algorithm optimization strategy, representing a 19.47% reduction in overall cost, demonstrating excellent performance in reducing overall cost.
[0164] Example 5
[0165] This embodiment first uses the ZDT series of multi-objective optimization test functions to test the improved MOJAYA algorithm and verify its superiority. The experimental results are then compared with those of the unimproved MOJAYA algorithm. The following formula is the ZDT series of test functions:
[0166] (1)ZDT1
[0167]
[0168] (2)ZDT2
[0169]
[0170] (3) ZDT3
[0171]
[0172] (4)ZDT4
[0173]
[0174] (5)ZDT6
[0175]
[0176] To accurately evaluate the algorithm's performance, the convergence index (GD) and uniformity index (SP) were selected for testing, and their calculation processes are shown in equations (1-6) and (1-7):
[0177] (1) Convergence index
[0178]
[0179] In the formula, |P| represents the number of Pareto front solution sets, M represents the spatial dimension, d represents the minimum Euclidean distance between the solution in the dimension and the optimal front, 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) Evenness index
[0181] f(x)=λ1·f(x1)+λ2·f(x2) (1-7)
[0182] In the formula, d i This represents the distance between the i-th solution and its adjacent solutions. d i The average value of the solution is represented by the index SP, which indicates the distribution of the solution. The smaller the SP, the more uniform the distribution of the solution.
[0183] The population size for both the standard and improved MOJAYA algorithms is set to 200, the archive size is also set to 200, and the iteration parameter is set to 100.
[0184] The ZDT test function was tested using this invention, and the test results are shown in Figures 1-5. The performance index data are shown in Tables 1 and 2. From Figure 1(a), Figures 1(b) to 5(a) As shown in Figure 5(b), the method of this invention has the widest distribution effect compared with the standard MOJAYA algorithm, with the fewest discontinuities, and is very close to the Pareto front. Tables 1 and 2 show that the mean values of GD and SP of the algorithm of this invention are smaller than those of the traditional MOJAYA algorithm, verifying that the convergence and distribution of the improved algorithm are superior to those of the original algorithm.
[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 Comparison of Overall Costs
[0190] Scheduling strategy Total cost / yuan MOJAYA Optimization Strategy 2347.9 Improved MOJAYA optimization strategy 1965.3
[0191] Example 6
[0192] This embodiment employs a grid-connected microgrid system comprising various distributed power sources, including photovoltaic (PV) generators, wind turbines (WT), diesel generators (DE), gas turbines (MT), and energy storage batteries, for optimized scheduling. The optimization objective is to minimize the overall cost of the microgrid, with the output scheme of the micro-power sources as the output result, while also considering the economic and environmental benefits of the microgrid. The objective function for the overall cost of the microgrid is as follows:
[0193]
[0194] In the formula, f1(t) is the economic goal and f2(t) is the environmental goal.
[0195] 1. Economic Objectives
[0196] In microgrids, wind and solar power generation utilize renewable resources and do not consume fossil fuels; therefore, their operation and maintenance costs should be the primary consideration during operation. Gas turbines and diesel generators have fixed construction costs, so they are not included in the optimization objective; their fuel and operation costs are calculated directly. The charging and discharging costs and depreciation costs of batteries, as well as grid interaction costs, also need to be considered. Based on relevant literature review, the objective function is expressed as shown in equation (2-2):
[0197]
[0198] In the formula, f om It is the maintenance cost, f fuel For fuel costs, P bat,i This represents the average charging and discharging power of the energy storage device during time period i. A positive number indicates that the energy storage device is charging at this time, while a positive number indicates that the energy storage device is discharging at this time. H represents the total number of time periods within a scheduling cycle. bw Depreciation costs for battery charging and discharging. CE This indicates the price factor of electricity.
[0199] 2. Environmental Objectives
[0200] In microgrids, environmental costs mainly consider the impact of pollutant gas and particulate matter emissions. Since photovoltaic and wind power generation equipment use clean energy to generate electricity, they do not produce various pollutant gases during operation. Therefore, these types of equipment are not included in the environmental cost function. The main consideration is the impact of pollutant gases from diesel generators and gas turbines.
[0201] With environmental cost as the objective function, its objective function expression is shown in equation (2-3):
[0202]
[0203] In the formula, K represents the type of pollutant emission (such as SO2, NO2, CO2), a represents the unit cost of pollutant treatment, β represents the emission coefficient of the j-th pollutant when generating electricity at different times, and P represents the power generation capacity of the equipment at this time.
[0204] 3. Constraint Functions
[0205] Based on the electrical energy interaction behavior between the microgrid and the power grid in this invention and the characteristics of the microgrid itself, the following constraints are given:
[0206] (1) Micro-power supply output constraint
[0207] To ensure the operational stability of microgrids, the upper and lower limits of the operating range of micro-power devices in each type of microgrid are constrained:
[0208]
[0209] In the formula, P i P represents the generating capacity of the i-th unit. i min It is the minimum power generation capacity, P i max That is the maximum power generation capacity.
[0210] (2) Microgrid power balance constraints
[0211]
[0212] In the formula, P i P represents the generating capacity of the i-th unit. L For load power, P PV For photovoltaic power, P WT For wind power generation capacity, P bat For the power of the energy storage battery, P buy and P sell This refers to the power exchanged with the power grid.
[0213] (3) Battery operation constraints
[0214] SOC min <SOC i <SOC max (2-6)
[0215] In the formula, SOC i Let be the battery state of charge at time i, and SOC. min SOC max These are the upper and lower limits of the state of charge (SOC). Typically, the SOC values for a battery are set to 0.2 and 1.
[0216] This invention primarily uses an improved MOJAYA optimization algorithm to solve the microgrid optimization scheduling model established based on the above objective function and constraints, as well as the microgrid operation strategy. The population size and archive size for both the standard and improved MOJAYA algorithms are set to 200, and the iteration parameter is set to 200.
[0217] This invention is used to optimize the scheduling of microgrids, and the optimization scheduling results are displayed, such as... Figure 6 As shown in the figure, during the period from 0:00 to 8:00, some distributed generation modules have not yet started, and the load demand is neither at its peak nor at its lowest point. Therefore, the fluctuation of power interaction behavior is relatively small during this period. However, the electricity purchase price is at its lowest point at this time, and purchasing electricity into the microgrid not only helps reduce operating costs but also allows the electricity to be used to charge energy storage devices. During the peak electricity price period, the electricity price exceeds the generation cost of distributed generation equipment. While ensuring that the load demand is met and the operation is balanced, the microgrid should increase the output of micro-power sources as much as possible to generate surplus electricity for sale to the grid, thereby achieving economic benefits. From 18:00 to 20:00, the peak period for purchasing and selling electricity from the main grid is underway. Observing the equipment output state curve and load demand curve, the following conclusions can be drawn: the distributed generation equipment has reached its maximum output operating state. At this time, even if the energy storage units are fully discharged, they cannot meet the user load demand. Therefore, it is necessary to choose to purchase electricity from the main grid to ensure the safety and reliability of the microgrid system. The above analysis shows that time-of-use pricing is closely related to electricity interaction, and the optimized scheduling strategy is also reflected in the instance scheduling process, which illustrates the effectiveness and practicality of the optimized scheduling strategy and optimized scheduling model invented in this paper.
[0218] The overall cost comparison is shown in Table 3. According to the data in the table, the overall cost in the optimization platform is 2347.9 yuan when optimized and controlled by the standard MOJAYA algorithm. After the improved MOJAYA algorithm optimization strategy, it is reduced to 1965.3 yuan, which is a reduction of 19.47%, demonstrating excellent performance in reducing overall cost.
Claims
1. A microgrid optimal scheduling method based on an improved MOJAYA algorithm, characterized in that, The specific steps are as follows: Step 1: Set the microgrid objective function and constraints, and initialize the population: generate the initial population and an 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. From the original fitness and crowding density Together they form; Step 3: Update the archive set; Step 4: Measure the overall fitness Identify the best and worst individuals, and update the population using the MH sampling method; Step 4 is implemented in the following steps: Step 4.1: Calculate the population based on equation (2-4) and archive collection The total fitness of each individual in the dataset is calculated and sorted. The individual with the smallest total fitness value is the optimal solution, and the individual with the largest total fitness value is the worst solution. The optimal and worst solutions are then selected. Step 4.2, Population MH sampling is performed on individuals within the sample. Step 4.2 is implemented in the following steps: That is, to produce one Random numbers between ,if If the condition is met, then step 4.3 will be executed using the first update method; otherwise, proceed to step 4.
4. (4-1) The crowding density in step 2.2; Step 4.3: Update the population position using the golden sine curve according to equation (4-2); Step 4.3, which involves updating the location of the population, is as follows: (4-2) in, and It is a random number. This determines the distance an individual will move in the next iteration. , Decide on the next iteration The location update direction of each individual. ; and The coefficient is obtained by introducing the golden ratio, which is defined as... The irrational number is denoted as . , , , and The initial value is set to and Subsequently and It changes with the target value. and It will also be updated accordingly. This is a new optimized solution generated based on the optimal and worst solutions obtained in step 4.
1. , These represent the optimal solution and the worst solution, respectively. This represents the solution before optimization; Step 4.4: Update the population position using MOJAYA according to equation (4-3): (4-3) Non-dominated sorting is applied to compare individuals in the population before and after the update to determine their dominance. If a new individual after the update can dominate an old individual before the update, the new individual is retained; otherwise, the new individual is discarded. Finally, based on the above steps, the initial population is updated. ; Step 5: Iterate through the loop and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled.
2. The microgrid optimal scheduling method based on the improved MOJAYA algorithm according to claim 1, characterized in that, Step 1 is implemented in the following steps: The optimization objectives of the microgrid are set, including economic and environmental objectives; relevant constraints are set, including micro-source output constraints, microgrid power balance constraints, and battery operation constraints; then, an initial population is randomly generated within the upper and lower limits of the constraints. At the same time, create an empty collection archive. Set the number of iterations Initial population and archive collection Each individual within represents a micro-power generation scheme of the microgrid.
3. The microgrid optimal scheduling method based on the improved MOJAYA algorithm according to claim 2, characterized in that, Step 2 is implemented in the following steps: Step 2.1: Merge populations and archive collection The original fitness is then assigned to all individuals in the merged set. The original fitness calculation procedure is as follows: Represents an individual The number of individuals dominated by other individuals in the population and archive set. The larger it is, the more it indicates the individual It is dominated by more other individuals, therefore it is considered a poor solution in fitness allocation; conversely, if Smaller, indicating individual It is a better solution because it is dominated by fewer other individuals. Determined by equation (2-1), based on ,individual primitive fitness Determined by equation (2-2): (2-1) (2-2) The cardinality of a set is the number of elements in the set. It is the current population. This is the current archive set, used to store non-dominated individuals. Represents an individual Dominant Individual ; Step 2.2: Assign crowding density to all individuals in the merged set. The crowding density is calculated as follows: The crowding density is calculated by taking the distance from each individual to the archive set and to all individuals in the population. The expression is shown in equation (2-3): (2-3) In the formula, Represents an individual To its first position in the target space The distance to the nearest neighbor, , and These represent the initial number of population clusters and the number of archive sets, respectively. Add 2 to the denominator of the expression to ensure that the expression is contained between 0 and 1; Step 2.3: Total fitness of all individuals in the merged set. From the original fitness and crowding density The sum is composed of the following formula: (2-4) For individuals Overall fitness The initial fitness from step 2.1, The crowding density is from step 2.
2.
4. The microgrid optimal scheduling method based on the improved MOJAYA algorithm according to claim 3, characterized in that, Step 3 is implemented in the following steps: Will and All non-dominated individuals are copied to the next generation archive set. In the middle, overall fitness ,if Size exceeding Then, by comparing density information among individuals... Perform a truncation operation. Smaller individuals will be removed first, until the size of the archive is reached. ,if The size is smaller than Then from and Select fitness Individuals supplemented In, until the size of the archive collection is We update an effective archive set using total fitness and density information to ensure that the individuals in the archive set are both diverse and represent high-quality solutions.
5. The microgrid optimal scheduling method based on the improved MOJAYA algorithm according to claim 4, characterized in that, Step 5 is implemented in the following steps: Repeat steps 2 to 4 until the number of iterations is reached, and finally output the archive set. The individuals in the archive set represent the power generation schemes of each micro-power source after the microgrid is optimized and scheduled. Finally, according to the optimization objective, the optimal individual that meets the optimization objective is selected by the corresponding objective function, which is the final power generation scheme of the micro-power source.