Method and device for determining low-carbon scheduling parameters of micro-grid and computer equipment
Through the random initialization and mutation operation of the fox optimization algorithm, the problem that microgrid scheduling is prone to falling into local optimality is solved, the low-carbon scheduling parameter optimization of the microgrid is achieved, and the economy and global optimality of the scheduling scheme are improved.
Patent Information
- Application Number
- CN202510818492.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-16
AI Technical Summary
Existing microgrid scheduling methods are prone to falling into local optimality, which makes it difficult for the scheduling scheme to reach the overall optimal state, affecting the economy and carbon emission control effect of the microgrid.
The fox optimization algorithm is used to generate the initial fox population by randomly initializing multiple groups of scheduling parameter values. The scheduling parameter values are updated by combining the fitness function and mutation operation until the preset iteration conditions are met to obtain the target low-carbon scheduling parameters.
It improves the global optimal search capability of microgrid dispatching schemes, reduces operating costs and carbon trading costs, improves dispatching effects, and realizes the economy and low carbon nature of microgrids.
Smart Images

Figure CN120654730A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power dispatching technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for determining low-carbon dispatching parameters of a microgrid. Background Art
[0002] More and more renewable energy units are connected to the power system. However, due to their strong randomness, a high proportion of new energy units will greatly reduce the operating stability of the power system. Therefore, building a microgrid is one of the effective ways to resolve the above contradictions.
[0003] However, the intermittent and volatile nature of renewable energy makes the optimal scheduling of microgrids extremely complex. Existing scheduling methods are prone to falling into local optimality during the optimization process, making it difficult for the scheduling scheme to achieve an overall optimal state, which in turn affects the economic efficiency and carbon emission control effectiveness of the microgrid. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for determining low-carbon scheduling parameters of a microgrid that can improve the scheduling effect of the microgrid in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for determining low-carbon dispatch parameters of a microgrid, comprising:
[0006] Randomly initializing multiple groups of dispatch parameter values of target microgrids, and generating an initial fox population in a fox optimization algorithm according to the multiple groups of dispatch parameter values of the target microgrids;
[0007] The initial fox population is used as the current fox population, and the individual fitness of each fox in the current fox population is calculated according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs;
[0008] updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population;
[0009] Based on a preset mutation probability, performing a mutation operation on each individual fox in the candidate fox population to obtain a new current fox population, and returning to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then using the current fox population that meets the preset iteration condition as the target fox population;
[0010] According to the target fox population, a target low-carbon scheduling parameter value of the target microgrid is obtained.
[0011] In one embodiment, performing a mutation operation on each individual fox in the candidate fox population based on a preset mutation probability to obtain a new current fox population includes:
[0012] Based on a preset mutation probability, determining fox individuals to be mutated from the candidate fox population;
[0013] Based on the mutation operation, the scheduling parameter value corresponding to the fox individual to be mutated is updated to obtain a mutated fox individual corresponding to the fox individual to be mutated;
[0014] A new current fox population is obtained based on the mutated fox individuals and the unmutated fox individuals; the unmutated fox individuals are other fox individuals in the candidate fox population except the fox individuals to be mutated.
[0015] In one embodiment, the updating of the scheduling parameter value corresponding to the fox individual to be mutated based on the mutation operation to obtain the mutated fox individual corresponding to the fox individual to be mutated includes:
[0016] For any fox individual to be mutated, determining a scheduling parameter that needs to be mutated in the fox individual to be mutated based on the preset mutation probability;
[0017] Determine the mutation direction of each scheduling parameter that needs to be mutated based on the preset mutation direction probability;
[0018] According to the mutation direction, the scheduling parameters that need to be mutated in any of the fox individuals to be mutated are randomly updated to obtain a mutated fox individual corresponding to any of the fox individuals to be mutated.
[0019] In one embodiment, updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population includes:
[0020] Determining the optimal fox individual from the current fox population according to the individual fitness;
[0021] Randomly determine the propagation time information corresponding to each fox individual, and determine the parameter update mode corresponding to each fox individual based on a preset mode selection probability; the parameter update mode includes a prey search update mode and a hunting update mode;
[0022] According to the optimal fox individual, the propagation time information and the parameter update mode, the scheduling parameter value corresponding to each fox individual is updated to obtain a candidate fox population.
[0023] In one embodiment, updating the scheduling parameter value corresponding to each fox individual according to the optimal fox individual, the propagation time information, and the parameter update mode includes:
[0024] For any fox individual, when the parameter update mode is the prey search update mode, updating the scheduling parameter value corresponding to the any fox individual according to the optimal fox individual, the propagation time information of all fox individuals, and the number of generations of the current iteration, to obtain an updated fox individual corresponding to the any fox individual;
[0025] For any fox individual, when the parameter update mode is the hunting update mode, the scheduling parameter value corresponding to the any fox individual is updated according to the optimal fox individual, the propagation time information of the any fox individual and the algebra of the current iteration to obtain the updated fox individual corresponding to the any fox individual.
[0026] In one embodiment, updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population includes:
[0027] updating the scheduling parameter value corresponding to each fox individual in the current fox population according to the individual fitness to obtain an updated fox population;
[0028] According to the preset scheduling parameter constraint conditions, the scheduling parameter values corresponding to the fox individuals in the updated fox population that do not meet the preset scheduling parameter constraint conditions are corrected to obtain a candidate fox population.
[0029] In a second aspect, the present application further provides a device for determining low-carbon dispatch parameters of a microgrid, comprising:
[0030] A population generation module is used to randomly initialize multiple groups of dispatch parameter values of target microgrids, and generate an initial fox population in the fox optimization algorithm based on the multiple groups of dispatch parameter values of the target microgrids;
[0031] a fitness determination module, configured to use the initial fox population as the current fox population and calculate the individual fitness of each fox in the current fox population according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs;
[0032] A population updating module is used to update the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population;
[0033] a population mutation module, configured to perform a mutation operation on each individual fox in the candidate fox population based on a preset mutation probability to obtain a new current fox population, and return to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then use the current fox population that meets the preset iteration condition as the target fox population;
[0034] The scheduling parameter determination module is used to obtain the target low-carbon scheduling parameter value of the target microgrid according to the target fox population.
[0035] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] Randomly initializing multiple groups of dispatch parameter values of target microgrids, and generating an initial fox population in a fox optimization algorithm according to the multiple groups of dispatch parameter values of the target microgrids;
[0037] The initial fox population is used as the current fox population, and the individual fitness of each fox in the current fox population is calculated according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs;
[0038] updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population;
[0039] Based on a preset mutation probability, performing a mutation operation on each individual fox in the candidate fox population to obtain a new current fox population, and returning to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then using the current fox population that meets the preset iteration condition as the target fox population;
[0040] According to the target fox population, a target low-carbon scheduling parameter value of the target microgrid is obtained.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0042] Randomly initializing multiple groups of dispatch parameter values of target microgrids, and generating an initial fox population in a fox optimization algorithm according to the multiple groups of dispatch parameter values of the target microgrids;
[0043] The initial fox population is used as the current fox population, and the individual fitness of each fox in the current fox population is calculated according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs;
[0044] updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population;
[0045] Based on a preset mutation probability, performing a mutation operation on each individual fox in the candidate fox population to obtain a new current fox population, and returning to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then using the current fox population that meets the preset iteration condition as the target fox population;
[0046] According to the target fox population, a target low-carbon scheduling parameter value of the target microgrid is obtained.
[0047] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0048] Randomly initializing multiple groups of dispatch parameter values of target microgrids, and generating an initial fox population in a fox optimization algorithm according to the multiple groups of dispatch parameter values of the target microgrids;
[0049] The initial fox population is used as the current fox population, and the individual fitness of each fox in the current fox population is calculated according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs;
[0050] updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population;
[0051] Based on a preset mutation probability, performing a mutation operation on each individual fox in the candidate fox population to obtain a new current fox population, and returning to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then using the current fox population that meets the preset iteration condition as the target fox population;
[0052] According to the target fox population, a target low-carbon scheduling parameter value of the target microgrid is obtained.
[0053] The above-mentioned low-carbon dispatch parameter determination method, device, computer equipment, computer-readable storage medium and computer program product for the microgrid first randomly initialize multiple groups of dispatch parameter values of the target microgrid, and generate the initial fox population in the fox optimization algorithm based on the multiple groups of dispatch parameter values of the target microgrid. By randomly initializing multiple microgrid dispatch parameter values, it is ensured that the optimization process has good initial population diversity, preventing the initial distribution of the population from being too concentrated, thereby reducing the risk of falling into a local optimum. In addition, the diversity of the initial population can also improve the global search capability of the algorithm, making the optimization of the dispatch parameter more robust. Then, the initial fox population is used as the current fox population, and the individual fitness of each fox individual in the current fox population is calculated according to the fitness function, wherein the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes the carbon trading cost, which can achieve carbon emission control while ensuring economy, make the scheduling of the microgrid more in line with the low-carbon goal, and improve the overall sustainability of the microgrid; then, according to the individual fitness, the corresponding scheduling parameter value of each fox individual in the current fox population is updated to obtain the candidate fox population, based on the fitness value of the current fox population The positions of the individuals (dispatching parameter values) are updated. By continuously adjusting the positions of the individuals, the population can converge toward the optimal solution, improving the optimization accuracy of the dispatching parameters, more effectively escaping the local optimal trap, and making the microgrid dispatching plan closer to the global optimal solution. Next, based on the preset mutation probability, a mutation operation is performed on each fox individual in the candidate fox population to obtain a new current fox population. The step of calculating the individual fitness of each fox individual in the current fox population according to the fitness function is returned until the current fox population meets the preset iteration conditions. The current fox population that meets the preset iteration conditions is then used as the target fox population. By introducing an appropriate amount of random perturbation to enhance the exploration ability of the population, the mutation strategy can break the convergence stagnation of the population in the later optimization process, more comprehensively search for potential excellent dispatching parameter combinations, prevent the algorithm from falling into the local optimal state, further improve the global search performance, and make the microgrid dispatching plan more optimized. Finally, based on the target fox population, the target low-carbon dispatching parameter values of the target microgrid are obtained. By setting reasonable termination conditions (such as the maximum number of iterations and the convergence threshold), it can be ensured that the optimization process obtains high-quality solutions without incurring unnecessary computational overhead. In the above method, the low-carbon scheduling parameters are optimized through the fox optimization algorithm, combined with adaptive fitness calculation, population update mechanism and mutation strategy, which can effectively avoid falling into local optimality during the optimization process, improve the economy and low-carbon nature of the scheduling scheme, and realize the global optimal search capability of the microgrid scheduling parameters, thereby not only reducing the operating cost of the microgrid, but also reducing carbon trading costs and carbon emissions, and significantly improving the scheduling effect of the microgrid. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 1 is a flow chart of a method for determining low-carbon dispatch parameters of a microgrid in one embodiment;
[0056] Figure 2 Schematic diagram of a flow chart of steps for generating a new current fox population in one embodiment;
[0057] Figure 3 1 is a schematic flow chart of steps for generating candidate fox populations in one embodiment;
[0058] Figure 4 A schematic diagram of a flow chart of improving a fox optimization algorithm in one embodiment;
[0059] Figure 5 A topological diagram of a microgrid system in one embodiment;
[0060] Figure 6 Schematic diagram of optimization results based on the improved Fox optimization algorithm in one embodiment;
[0061] Figure 7 Schematic diagram of iterative convergence curves of a conventional fox optimization algorithm and an improved fox optimization algorithm in one embodiment;
[0062] Figure 8 1 is a structural block diagram of a device for determining low-carbon dispatch parameters of a microgrid in one embodiment;
[0063] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0065] In one embodiment, Figure 1As shown, a method for determining low-carbon dispatch parameters of a microgrid is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:
[0066] Step S101 : randomly initializing multiple groups of dispatch parameter values of target microgrids, and generating an initial fox population in a fox optimization algorithm according to the multiple groups of dispatch parameter values of target microgrids.
[0067] Among them, the dispatch parameter values of the target microgrid refer to multiple key variables involved in the operation of the microgrid, including but not limited to the output level of distributed power sources (such as photovoltaic, wind power, and gas turbines), the charging and discharging power of energy storage equipment, and the grid interaction power. These parameters jointly determine the operating status and dispatch effect of the microgrid.
[0068] The initial fox population in the Fox Optimization algorithm refers to the set of candidate solutions established by the Fox Optimization algorithm. Each individual fox represents a complete set of microgrid dispatch parameter values. The diversity of this population is crucial to the Fox Optimization algorithm's global search capability, ensuring that the initial solutions are evenly distributed within the search space, thereby improving the global performance of dispatch optimization.
[0069] For example, the terminal first determines the range of scheduling parameters that need to be optimized based on the actual operating requirements and constraints of the microgrid. Within this range, the terminal randomly generates multiple sets of different scheduling parameter values, each corresponding to a fox individual, thereby constructing an initial fox population. The terminal then preprocesses the generated fox population to ensure that the scheduling parameters of all individuals meet the microgrid's operating constraints, such as power balance constraints, unit output range constraints, and energy storage device state of charge restrictions. Ultimately, the terminal uses the generated fox population that meets the constraints as the initial input to the fox optimization process, providing a diverse foundation for subsequent optimization iterations.
[0070] In a specific example, the constraints of the target microgrid optimization process are:
[0071] Power balance constraints: ;Micro-source output constraints: ;Power interaction constraints between microgrid and grid: ;Energy storage battery capacity constraints: ; Gas turbine output ramping constraints: ;Energy storage battery output power constraints: .
[0072] in, To generate power for wind turbines, For photovoltaic power generation, To power the gas turbine, is the energy storage battery power, is the interaction power between microgrid and grid, is the load power of the microgrid, is the output power of the micro-source unit in the microgrid, 、 are the lower and upper limits of the output of the micro-source unit, 、 are the lower and upper limits of the interaction power between the microgrid and the grid, is the state of charge of the energy storage battery, 、 They are the lower and upper limits of the state of charge of the energy storage battery, 、 are the output power of the gas turbine at time t and time t-1, 、 are the lower and upper limits of the gas turbine ramp constraint, 、 They are the lower and upper limits of the energy storage battery output respectively.
[0073] Step S102: Taking the initial fox population as the current fox population, and calculating the individual fitness of each fox in the current fox population according to the fitness function.
[0074] The fitness function is determined based on the total operating cost of the target microgrid, which includes at least carbon trading costs. The fitness function is a mathematical model used to evaluate the performance of each individual fox's dispatch plan. Its value reflects the effectiveness of the dispatch parameter optimization. The fitness function is calculated based on the microgrid's total operating cost, which includes multiple cost items, including but not limited to fuel costs, electricity purchase costs, operation and maintenance costs, and carbon trading costs. During the optimization process, the goal of the fitness function is generally to minimize the total operating cost to ensure the economic and low-carbon nature of the dispatch plan. Carbon trading costs refer to the economic expenses incurred by the microgrid due to carbon emissions during operation. Due to certain restrictions on carbon emissions, if a microgrid's carbon emissions exceed the free quota, it must purchase additional carbon emission rights on the carbon trading market. If it falls below the free quota, the microgrid can also sell excess emission rights to generate revenue. Therefore, carbon trading costs are a key factor to consider during the optimization process.
[0075] The current fox population refers to the set of fox individuals evaluated and updated during the current round of optimization iterations. This population initially originates from randomly initialized fox individuals but is continuously updated during subsequent optimization processes to gradually converge toward the optimal scheduling solution. Individuals in the current fox population represent different combinations of microgrid scheduling parameters.
[0076] Exemplarily, the terminal first receives the individual foxes in the current fox population and calculates the corresponding total operating cost based on the dispatch parameters of each individual fox. The terminal quantifies this total operating cost using a fitness function, which includes at least carbon trading costs and may also incorporate other cost items such as the microgrid's electricity purchase costs and unit operation and maintenance costs. The terminal sequentially calculates the fitness values of all individuals in the fox population and records the current optimal individual—that is, the fox with the lowest total operating cost—to provide a reference for subsequent population updates. Finally, the terminal outputs the fitness calculation results for the current fox population and prepares to proceed to the next optimization update process.
[0077] In a specific example, the minimum daily operating cost of the microgrid is:
[0078]
[0079] Where f is the total daily operating cost of the microgrid, is the daily operating cost of various units, is the grid interaction cost, is the carbon trading cost, T is the scheduling period, and t is the current period.
[0080]
[0081]
[0082]
[0083]
[0084]
[0085] Where N is the type of micro-source, is the cost coefficient of micro-source i (unit: yuan / MW), is the output of micro-source i at time t (unit: kW), 、 are the electricity purchase and sales prices of micro-sources and the grid (unit: yuan / kWh), is the interaction power between the microgrid and the grid at time t (unit: kW), is the carbon trading cost coefficient (unit: yuan / MWh), is the actual carbon emissions of the microgrid system at time t, is the carbon emission coefficient of unit i (unit: kg*103 / MWh), is the free carbon emission quota of the microgrid system at time t, and M is the regional carbon emission quota per unit electricity (unit: kg*103 / MWh).
[0086] Step S103: updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness, and obtaining a candidate fox population.
[0087] The dispatch parameters refer to the microgrid operating parameters corresponding to each fox, including the output of distributed generation, the charge and discharge power of energy storage devices, and grid interaction power. These parameters directly determine the microgrid's power supply capacity, electricity purchase costs, and carbon emissions, and therefore require continuous adjustment during the optimization process to achieve a more optimal dispatch solution.
[0088] For example, the terminal first updates the individuals in the current fox population based on the individual fitness calculated in the previous round, following the optimization algorithm's search mechanism. The terminal then combines the information of the globally optimal individual to guide the population toward a more optimal solution, using random perturbations to maintain population diversity and avoid falling into local optima. For each individual fox, the terminal adjusts its scheduling parameter values according to the optimization algorithm's update rules, moving it toward a more optimal fitness. After the update, the terminal combines the new parameters of all individuals to form a candidate fox population and stores the population information for use in the next step. Finally, the terminal outputs the candidate fox population, providing basic data for subsequent mutation operations.
[0089] Step S104, based on the preset mutation probability, performs a mutation operation on each fox individual in the candidate fox population to obtain a new current fox population, and returns to the step of calculating the individual fitness of each fox individual in the current fox population according to the fitness function, until the current fox population meets the preset iteration conditions, and the current fox population that meets the preset iteration conditions is used as the target fox population.
[0090] The preset mutation probability refers to the probability that each fox or its scheduling parameters will mutate during the optimization process. The mutation probability is typically set within a reasonable range to ensure population diversity, prevent all individuals from prematurely converging to a local optimal solution, and avoid excessive mutation rates that could reduce search efficiency.
[0091] Mutation involves randomly perturbing the scheduling parameters of individual foxes, causing them to deviate from the current search direction, thereby enhancing the optimization algorithm's global search capabilities. Mutation can be performed on all foxes or on one or more scheduling parameters within an individual. Mutation can break down the similarities between individuals in a population, increase search diversity, and help the algorithm escape local optimal points.
[0092] The preset iteration conditions are criteria used to determine whether the optimization process should be terminated. These criteria typically include the maximum number of iterations, convergence to the optimal fitness value, and the fitness differences of individuals in the population. When the preset iteration conditions are met, the algorithm stops optimizing and outputs the current fox population as the final optimization result.
[0093] Exemplarily, the terminal first makes a mutation judgment on each fox individual in the candidate fox population based on a preset mutation probability. For fox individuals that meet the mutation conditions, the terminal randomly selects one or more scheduling parameters of the individual and adjusts them so that they produce new values within the range allowed by the variables. Subsequently, the terminal reorganizes all the mutated fox individuals into a new current fox population and enters the next round of optimization iteration. The terminal returns to the fitness calculation step, re-evaluates the new current fox population, and continues to update the population according to the optimization rules. This process continues to cycle until the optimization process meets the preset iteration conditions. The terminal uses the current fox population as the final target fox population and outputs the optimized scheduling parameter values of the population as the final low-carbon scheduling plan for the microgrid.
[0094] Step S105 , obtaining a target low-carbon dispatch parameter value of a target microgrid according to the target fox population.
[0095] The target fox population is the one that, after multiple rounds of optimization iterations, converges and meets the preset termination criteria. The individual foxes in this population represent a set of optimized microgrid scheduling schemes, which incorporate key scheduling parameters such as the output of various distributed generation sources, the charge and discharge power of energy storage devices, and grid interaction power. These parameters are optimized to achieve optimal operating costs and carbon emissions while maintaining a balance between supply and demand.
[0096] The target low-carbon dispatch parameter values for the target microgrid are the final optimized dispatch parameters extracted from the target fox population and are used to guide the actual operation of the microgrid. These parameter values are optimized by comprehensively considering factors such as total operating costs, carbon trading costs, and system stability to ensure the economical, efficient, and low-carbon operation of the microgrid.
[0097] For example, the terminal first selects the fox individual with the best fitness value from the target fox population. The dispatch parameters corresponding to this individual become the final optimization result. The terminal parses and stores the parameter values of this fox individual to form the target low-carbon dispatch parameter set for the target microgrid. The terminal can then apply these dispatch parameters to the microgrid dispatch system to guide the actual operation of distributed power sources, energy storage devices, and grid interaction power. At the same time, the terminal can verify the feasibility of the optimization results to ensure that the dispatch plan meets the microgrid's technical requirements, such as power balance and equipment operation constraints. Finally, the terminal outputs the optimized target low-carbon dispatch parameter values, providing an efficient, low-carbon, and economical dispatch plan for the microgrid.
[0098] In the above-mentioned method for determining low-carbon dispatch parameters of a microgrid, first, multiple groups of dispatch parameter values of target microgrids are randomly initialized, and based on the multiple groups of dispatch parameter values of target microgrids, an initial fox population in the fox optimization algorithm is generated. By randomly initializing multiple microgrid dispatch parameter values, it is ensured that the optimization process has good initial population diversity, prevents the initial population distribution from being too concentrated, and thus reduces the risk of falling into a local optimum. In addition, the diversity of the initial population can also improve the global search capability of the algorithm, making the optimization of the dispatch parameters more robust. Then, the initial fox population is used as the current fox population, and the individual fitness of each fox individual in the current fox population is calculated according to the fitness function, wherein the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes the carbon trading cost. It can achieve carbon emission control while ensuring economy, so that the dispatch of the microgrid is more in line with the low-carbon goal and improves the overall sustainability of the microgrid. Then, based on the individual fitness, the corresponding dispatch parameter value of each fox individual in the current fox population is updated to obtain a candidate fox population, and the position (dispatching parameter value) of the individual is adjusted based on the fitness value of the current fox population. The algorithm updates the fox population and continuously adjusts the positions of the individuals so that the population converges toward the optimal solution, improving the optimization accuracy of the scheduling parameters and more effectively escaping the local optimal trap, making the microgrid scheduling scheme closer to the global optimal solution. Next, based on the preset mutation probability, a mutation operation is performed on each fox individual in the candidate fox population to obtain a new current fox population. The algorithm then returns to the step of calculating the individual fitness of each fox individual in the current fox population according to the fitness function until the current fox population meets the preset iteration conditions. The current fox population that meets the preset iteration conditions is then used as the target fox population. By introducing an appropriate amount of random perturbation to enhance the exploration ability of the population, the mutation strategy can break the convergence stagnation of the population in the later optimization process, more comprehensively search for potential excellent scheduling parameter combinations, prevent the algorithm from falling into the local optimal solution, further improve the global search performance, and make the microgrid scheduling scheme more optimized. Finally, the target low-carbon scheduling parameter value of the target microgrid is obtained based on the target fox population. By setting reasonable termination conditions (such as the maximum number of iterations, convergence threshold, etc.), it can be ensured that the optimization process obtains high-quality solutions without incurring unnecessary computational overhead. In the above method, the low-carbon scheduling parameters are optimized through the fox optimization algorithm, combined with adaptive fitness calculation, population update mechanism and mutation strategy, which can effectively avoid falling into local optimality during the optimization process, improve the economy and low-carbon nature of the scheduling scheme, and realize the global optimal search capability of the microgrid scheduling parameters, thereby not only reducing the operating cost of the microgrid, but also reducing carbon trading costs and carbon emissions, and significantly improving the scheduling effect of the microgrid.
[0099] In an exemplary embodiment, Figure 2As shown, the above step S104 performs a mutation operation on each fox individual in the candidate fox population based on a preset mutation probability to obtain a new current fox population, which can also be achieved by the following steps:
[0100] Step S201, determining fox individuals to be mutated from a candidate fox population based on a preset mutation probability;
[0101] Step S202: Based on the mutation operation, the scheduling parameter value corresponding to the fox individual to be mutated is updated to obtain a mutated fox individual corresponding to the fox individual to be mutated;
[0102] Step S203: obtaining a new current fox population based on the mutated fox individuals and the unchanged fox individuals.
[0103] Among them, the non-mutated fox individuals are other fox individuals in the candidate fox population except the fox individuals to be mutated.
[0104] The preset mutation probability is the probability value used to control whether individual foxes will mutate during the optimization process. A higher probability value increases the likelihood of mutation, which helps break search stagnation and escape local optima. However, if the mutation probability is too high, it may affect convergence speed and lead to unstable optimization results.
[0105] Mutation involves adjusting the scheduling parameters of the individual foxes being mutated, giving them a new search direction. Mutation can involve small perturbations of a single parameter or a large-scale redistribution of multiple parameters to enhance population diversity. Mutation methods include: random perturbation (adding or subtracting a random number from the current parameter value); range mutation (randomly generating a new value within the range of the scheduling parameter); and adaptive mutation (decreasing the magnitude of the mutation as the number of iterations increases to enhance stability in later optimization stages).
[0106] Exemplarily, the terminal first generates a random number between [0,1] for each fox individual in the candidate fox population and compares it with the preset mutation probability. If the random number is less than the mutation probability, the fox individual is marked as a fox individual to be mutated. Subsequently, the terminal performs a mutation operation on all fox individuals to be mutated, specifically including randomly selecting one or more parameters from the individual's scheduling parameters for adjustment, and ensuring that the new parameter values meet the operating constraints of the microgrid. After completing all mutation operations, the terminal merges the mutated fox individuals with the non-mutated fox individuals to form a new current fox population. Subsequently, the terminal returns to the fitness calculation step, re-evaluates the optimization effect of the new current fox population, and continues to iterate and update until the optimization process meets the preset termination conditions, and finally obtains the optimized low-carbon scheduling parameter values.
[0107] In this embodiment, mutation operations based on preset mutation probabilities enhance the optimization algorithm's global search capabilities, enabling the fox population to escape local optimal zones during the optimization process and further explore new, more optimal solutions. A reasonable mutation strategy maintains sufficient diversity during the iteration process, preventing search stagnation and improving the algorithm's convergence efficiency. Ultimately, the optimized low-carbon scheduling parameters for the microgrid minimize operating costs and carbon emissions while ensuring a balance between supply and demand, thereby improving the microgrid's scheduling effectiveness.
[0108] In an exemplary embodiment, the above-mentioned step S202 updates the scheduling parameter value corresponding to the fox individual to be mutated based on the mutation operation to obtain the mutated fox individual corresponding to the fox individual to be mutated, and also includes: for any fox individual to be mutated, based on a preset mutation probability, determining the scheduling parameter that needs to be mutated in any fox individual to be mutated; according to the preset mutation direction probability, determining the mutation direction of each scheduling parameter that needs to be mutated; according to the mutation direction, randomly updating the scheduling parameter that needs to be mutated in any fox individual to be mutated to obtain the mutated fox individual corresponding to any fox individual to be mutated.
[0109] The preset mutation probability controls whether scheduling parameters will mutate. This probability affects the optimization algorithm's search capabilities and convergence speed. A lower mutation probability helps maintain the stability of the current solution, while a higher probability enhances the search's global exploration capabilities and prevents the optimization from falling into local optima. This can be the same as the mutation individual selection probability, or set separately.
[0110] The preset mutation direction probability refers to the probability that each scheduling parameter selected for mutation will be adjusted upward or downward during the mutation operation. This probability setting can influence the optimization algorithm's search trend in the solution space. For example, a higher probability can be set to prioritize solutions in a specific direction based on optimization requirements, accelerating the optimization process.
[0111] The mutation direction refers to the direction in which the selected scheduling parameter increases or decreases during the mutation process. The choice of a mutation direction is typically random and determined based on a preset probability of the direction. If the preset probability of a mutation direction is set to 50%, each parameter has an equal chance of mutating upward or downward. If the optimization problem has specific requirements, the direction probabilities can be adjusted to better align the optimization with the scheduling objective.
[0112] Exemplarily, the terminal first traverses all fox individuals to be mutated, and generates a random number between [0,1] for each scheduling parameter in each fox individual. The terminal compares the random number with the preset mutation probability. If the random number is less than the mutation probability, the scheduling parameter is selected as the "scheduling parameter that needs to be mutated". Subsequently, the terminal generates a new random number for each scheduling parameter that needs to be mutated, and compares it with the preset mutation direction probability to determine whether the parameter mutates upward or downward. After determining the mutation direction, the terminal randomly generates a disturbance value that meets the mutation range, and adjusts the parameter value according to the mutation direction, while ensuring that the adjusted parameter value is still within the allowable range. Finally, the terminal completes the scheduling parameter update of all fox individuals to be mutated, obtains the mutated fox individual, and stores it in the next iterative calculation of the optimization algorithm.
[0113] In a specific example, for a parameter of an individual that needs to be mutated, the mutation operation is:
[0114]
[0115] in, is the parameter value of an individual before a certain mutation, is the parameter value of a certain individual after mutation, it is the current iteration number, is the maximum number of iterations, 、 are the upper and lower limits of the value range of the parameter that needs to be mutated, rand is a random number; R is a random number between [0,1], which is used to determine the mutation direction.
[0116] In this embodiment, by introducing an independent variation mechanism for scheduling parameters within individuals, the optimization algorithm is given greater flexibility and search capabilities. Independent adjustments are made to different parameters within individuals, making the optimization process more refined and avoiding the problem of uncontrollable search direction caused by the simultaneous variation of all parameters. At the same time, the introduction of preset variation direction probabilities enables the optimization algorithm to regulate the parameter change trend according to the set probability during the search process, thereby accelerating convergence and improving the optimization effect. Ultimately, the optimized low-carbon scheduling parameters of the microgrid can more accurately match the scheduling target, achieve better carbon emission control while ensuring economy, and improve the overall scheduling effect of the microgrid.
[0117] In an exemplary embodiment, Figure 3 As shown, the above step S103 updates the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain the candidate fox population, which can also be achieved by the following steps:
[0118] Step S301, determining the best fox individual from the current fox population based on individual fitness;
[0119] Step S302 : randomly determining the propagation time information corresponding to each individual fox, and determining the parameter update mode corresponding to each individual fox based on a preset mode selection probability.
[0120] Among them, the parameter update mode includes the prey search update mode and the hunting update mode;
[0121] Step S303 : updating the scheduling parameter value corresponding to each fox individual according to the optimal fox individual, the propagation time information, and the parameter update mode to obtain a candidate fox population.
[0122] The optimal fox individual is the one with the best fitness in the current fox population, i.e., the best scheduling solution found in the current iteration. The scheduling parameters of the optimal fox individual will serve as a reference in this round of updates, guiding the search direction of other fox individuals and accelerating the convergence of the optimization algorithm.
[0123] The propagation time information refers to the time variable used by each fox to calculate parameter updates during this iteration. This variable is randomly generated to simulate the time it takes a fox to determine its prey's location during hunting, thereby influencing the adjustment range of the scheduling parameters.
[0124] The preset mode selection probability refers to the probability of determining which parameter update mode an individual fox adopts. Different update modes determine the search method of individual foxes during the optimization process, affecting the search ability and convergence speed of the population.
[0125] There are two parameter update modes:
[0126] Prey Search Update Mode: This mode is used during the global exploration phase, where individuals make large random jumps across the entire search space to find possible optimal solutions. This mode increases the diversity of solutions and prevents the algorithm from falling into local optimality.
[0127] Hunting Update Mode: This mode is used in the local development phase, where individuals make fine adjustments around the optimal fox individual to further optimize the current excellent solution and improve the accuracy of the solution.
[0128] For example, the terminal first selects the individual with the lowest fitness value from the current fox population based on individual fitness and marks it as the optimal fox individual. Subsequently, the terminal randomly generates a propagation time for each individual fox. Based on the preset mode selection probability, the terminal determines whether the fox individual will use the search-for-prey update mode or the hunting update mode in this iteration. Specifically, a random number in the range [0, 1] is randomly generated for each individual fox. The terminal then compares the random number with the preset mode selection probability and determines the parameter update mode based on the comparison result. The terminal adjusts the individual's scheduling parameter values based on the selected update mode. If the individual uses the search-for-prey update mode, the terminal calculates the individual's global search step size based on the propagation time information and randomly generates new scheduling parameter values in the search space, allowing it to search for potential optimal solutions within a larger range. If the individual uses the hunting update mode, the terminal uses the scheduling parameter values of the optimal fox individual as a reference and, combined with the propagation time information, makes small adjustments to the individual's scheduling parameter values to converge toward the optimal solution. After the terminal completes the scheduling parameter update of all fox individuals, it stores the newly generated fox population to form a candidate fox population and prepares to enter the next optimization iteration process.
[0129] In this embodiment, by combining the information of the optimal fox individual, random propagation time, and two parameter update modes, the optimization algorithm achieves a balance between global search and local optimization, improving the stability and convergence efficiency of the optimization process. The prey search update mode enhances the optimization algorithm's global exploration capabilities, enabling it to find optimal solutions within a wider range and avoid being trapped in local optimal solutions. The hunting update mode, on the other hand, enables the population to make fine adjustments around the current optimal solution, improving the optimization accuracy of the scheduling scheme. Ultimately, the optimized low-carbon scheduling parameters of the microgrid can achieve better carbon emission control while ensuring operational economy, thereby improving the overall scheduling effect of the microgrid.
[0130] In an exemplary embodiment, the above-mentioned step S303 updates the scheduling parameter value corresponding to each fox individual according to the optimal fox individual, the propagation time information and the parameter update mode, and also includes: for any fox individual, when the parameter update mode is the prey search update mode, the scheduling parameter value corresponding to any fox individual is updated according to the optimal fox individual, the propagation time information of all fox individuals and the current iterative algebra, and the updated fox individual corresponding to any fox individual is obtained; for any fox individual, when the parameter update mode is the hunting update mode, the scheduling parameter value corresponding to any fox individual is updated according to the optimal fox individual, the propagation time information of any fox individual and the current iterative algebra, and the updated fox individual corresponding to any fox individual is obtained.
[0131] The propagation time information refers to the time variable used to calculate the updates to the individual fox scheduling parameters during the optimization process. This variable is randomly generated and influences the amplitude of the individual fox position updates, thereby controlling the search step size during the optimization process. Furthermore, the data structure of the propagation time information corresponds to the scheduling parameters. For example, if the scheduling parameters consist of three parameters, which is a three-dimensional vector, then the propagation time information is also a three-dimensional vector, with each dimension's value independently and randomly generated.
[0132] The number of iterations refers to the number of iterations of the fox optimization algorithm. This parameter is used to adjust the search range so that a larger search range can be performed in the early stage of optimization and a more refined optimization can be performed in the later stage, thereby improving the convergence and global search capabilities of the algorithm.
[0133] Exemplarily, the terminal sequentially traverses each individual fox in the current fox population and performs a corresponding update operation according to the parameter update mode adopted by the individual fox.
[0134] If a fox uses the prey search update mode, the terminal calculates the adjustment value of its scheduling parameter based on the optimal fox's scheduling parameter value, the propagation time information of all foxes, and the current iteration. The terminal also calculates the search step size based on the propagation time information, allowing the fox to obtain sufficient exploration power during the global search process and adjust its scheduling parameter to jump over a wider range to find possible better solutions.
[0135] If a fox adopts the hunting update mode, the terminal calculates the adjustment value of its scheduling parameter based on the optimal fox's scheduling parameter value, the current fox's travel time information, and the current iteration. The terminal also calculates the local search step size based on the current fox's travel time information, allowing the fox to make fine adjustments near the optimal solution, improving optimization accuracy and prompting the population to converge to the optimal solution.
[0136] After the terminal completes the scheduling parameter update of all fox individuals, it stores the newly generated fox population to form a candidate fox population and prepares to enter the next optimization iteration process.
[0137] In a specific example, the update method for individual fox parameters in the prey search update mode is:
[0138]
[0139] , ,
[0140] in, is the location information of individual foxes (i.e., scheduling parameter value); is the optimal fox individual in the fox population under the current iteration number it; dim is the dimension of the scheduling parameter value, that is, the number of parameters that need to be optimized; The sound propagation time of the fox in the stage of searching for prey, is a random vector of dimension (1, dim); tt is the average sound propagation time of each fox during its prey search phase, specifically the average of all dimensions of the propagation time information of each fox; is the minimum value of tt among all fox individuals, it is the current iteration number, is the maximum number of iterations, Used for balance With the increase of the number of iterations, Gradually decreases, the global search capability decreases, making the solution set more inclined to .
[0141] The update method for individual fox parameters in the hunting update mode is:
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148] ,
[0149] Where p is a random number between [0,1] generated for each fox individual; is the speed of sound, For the distance of sound propagation, is the distance between the fox and its prey; , , 、 、 、 They are 、 Minimum and maximum values.
[0150] It should be noted that based on 、 or The fox optimization algorithm is controlled by The impact will gradually increase, and if If the solution happens to be a local optimal solution, the algorithm is likely to be trapped in this solution, thus failing to achieve a good convergence effect. However, the mutation operation of the genetic algorithm can, to a certain extent, enrich the diversity of the population and enhance the ability to find the optimal solution.
[0151] In this embodiment, by distinguishing between the search-for-prey update mode and the hunting update mode, the optimization process achieves a balance between global exploration and local development. This not only expands the search scope and improves the diversity of the population in the early stages of optimization, but also enables fine-tuning in the later stages of optimization to improve the optimization accuracy of the scheduling parameters. The search-for-prey update mode enhances the global search capability of the optimization algorithm, enabling the algorithm to find optimal solutions within a larger range and avoid being trapped in local optimal solutions; while the hunting update mode enables the population to make fine adjustments around the current optimal solution, improving the optimization accuracy of the scheduling scheme. Ultimately, the optimized low-carbon scheduling parameters of the microgrid can achieve better carbon emission control while ensuring operational economy, thereby improving the overall scheduling effect of the microgrid.
[0152] In an exemplary embodiment, the above-mentioned step S103 updates the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population, including: updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain an updated fox population; and correcting the scheduling parameter values corresponding to the fox individuals in the updated fox population that do not meet the preset scheduling parameter constraints according to the preset scheduling parameter constraints to obtain a candidate fox population.
[0153] Among them, the preset scheduling parameter constraints refer to the parameter ranges and operating rules that must be met during the operation of the microgrid. These constraints generally include, but are not limited to: Distributed power output limits: ensuring that the power generation of micro-source units such as wind power, photovoltaic power, and gas turbines is within the allowable range. Energy storage device charge state constraints: preventing overcharging or over-discharging of energy storage batteries to ensure their safe operation. Grid interaction power constraints: ensuring that the power purchased or sold between the microgrid and the large grid does not exceed the specified limits. Total power balance constraints: ensuring that the total power of power generation, load demand, and energy storage scheduling within the microgrid remains balanced.
[0154] For example, after the terminal completes the parameter update operation for all individual foxes, it obtains an updated fox population. Subsequently, the terminal checks each individual fox in the updated fox population to determine whether its scheduling parameter value meets the preset scheduling parameter constraints. For fox individuals that do not meet the constraints, the terminal performs correction processing, adjusting parameter values that exceed the upper and lower limits to within the allowable range, and recalculates constraint variables such as power balance to ensure that the corrected individuals still meet the operating requirements of the microgrid. Finally, the terminal stores the corrected fox population and uses it as a candidate fox population to enter the next optimization iteration process to further improve the scheduling optimization effect.
[0155] In this embodiment, by constraining and correcting the dispatching parameters of the updated fox population, the dispatching parameter values of all individual foxes are ensured to comply with the microgrid's operational constraints, thereby ensuring the feasibility of the optimization results. This correction not only avoids the problem of the optimization algorithm generating infeasible solutions, but also improves the reliability of the optimization results. The resulting low-carbon dispatching parameters of the microgrid can achieve better operating economy and carbon emission control while meeting safe operation requirements, thereby improving the overall dispatching effect of the microgrid.
[0156] In an exemplary embodiment, Figure 4 As shown, it is a flow chart of the improved fox optimization algorithm in the method for determining low-carbon dispatch parameters of the microgrid provided by this application, including:
[0157] Step S401, initialize the fox population and parameters, set the parameter dimension, population size and maximum number of iterations.
[0158] Step S402: Calculate the initial fox population fitness based on the set objective function and constraint conditions.
[0159] Step S403: The fox has a 50% chance of entering the prey search phase during the prey capture phase, otherwise, it will proceed with hunting.
[0160] Step S404: executing a mutation strategy on the updated position of the fox.
[0161] Step S405: Calculate the objective function and find the optimal solution.
[0162] Step S406, determine whether the termination condition is met; if so, output the global optimal position; otherwise, repeat steps S403-S406.
[0163] It should be noted that the method for determining low-carbon dispatch parameters of a microgrid provided in this application can be applied to Figure 5 The microgrid system shown.
[0164] Furthermore, in a specific example, a simulation analysis is performed based on the measured data of a certain area on a certain day. The daily load, wind power, and photovoltaic power are shown in Table 1.
[0165] Table 1 Measured renewable energy output and load data for a certain place on a certain day
[0166]
[0167] The microgrid operating parameters are shown in Table 2.
[0168] Table 2 Micro-source operating parameters
[0169]
[0170] This example uses the baseline method to provide free carbon emission quotas for the system. The carbon emission coefficients of the power grid and gas turbine are set to 0.6101 and 0.9101 kg*103 / MWh respectively. The market carbon trading price is 85 yuan / t, and the regional unit electricity carbon emission allocation is 0.57 kg*103 / MWh.
[0171] Due to the uncertainty of renewable energy output power and in order to improve the renewable energy consumption rate, this method adopts the full absorption method, that is, the new energy consumption rate is 100%, and adjusts the output power of other units and energy storage batteries in the system by improving the fox optimization algorithm.
[0172] The improved fox optimization algorithm is introduced into the low-carbon dispatch of microgrid: the system is initialized, and the daily load and new energy forecast output data are combined to perform global optimization using the improved fox optimization algorithm. When the constraints are met, the following is found: Figure 6 The solution shown is the one that minimizes the daily operating cost and carbon trading cost of the microgrid.
[0173] After the introduction of the carbon trading model, the system initially gives a carbon emission quota to guide the unit to save energy and reduce emissions. The results show that both the daily carbon trading costs and carbon emissions are significantly reduced. At the same time, when a free carbon emission quota is given, the economic benefits of the gas turbine are higher. While saving energy and reducing emissions, the gas turbine can sell surplus electricity to the power grid to generate revenue.
[0174] The iterative convergence curves of the fox optimization algorithm and the improved fox optimization algorithm are as follows Figure 7 As shown in the figure, under the same conditions, the optimization costs of the conventional fox optimization algorithm and the improved fox optimization algorithm are 160.53 yuan and 113.24 yuan respectively. Due to the introduction of adaptive parameters, the early search space of the improved fox optimization algorithm is increased, which is more conducive to finding the optimal solution. Due to the introduction of mutation operations, some individuals in the later stage of iteration are freed from the constraints and re-search the space, so the algorithm also has a good convergence effect in the later stage.
[0175] In this embodiment, the low-carbon scheduling parameters are optimized through the fox optimization algorithm, combined with adaptive fitness calculation, population update mechanism and mutation strategy, which can effectively avoid falling into local optimality during the optimization process, improve the economy and low-carbon nature of the scheduling scheme, and realize the global optimal search capability of the microgrid scheduling parameters, thereby not only reducing the operating cost of the microgrid, but also reducing carbon trading costs and carbon emissions, and significantly improving the scheduling effect of the microgrid.
[0176] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0177] Based on the same inventive concept, embodiments of the present application also provide a device for determining low-carbon dispatch parameters for a microgrid, which is used to implement the aforementioned method for determining low-carbon dispatch parameters for a microgrid. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the device for determining low-carbon dispatch parameters for a microgrid provided below can be found in the aforementioned method for determining low-carbon dispatch parameters for a microgrid, and will not be repeated here.
[0178] In an exemplary embodiment, Figure 8 As shown, a low-carbon dispatch parameter determination device for a microgrid is provided, comprising: a population generation module 801, a fitness determination module 802, a population update module 803, a population variation module 804 and a dispatch parameter determination module 805, wherein:
[0179] A population generation module 801 is used to randomly initialize multiple groups of dispatch parameter values of target microgrids, and generate an initial fox population in the fox optimization algorithm based on the multiple groups of dispatch parameter values of target microgrids;
[0180] A fitness determination module 802 is configured to use the initial fox population as the current fox population and calculate the individual fitness of each fox in the current fox population according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid includes at least carbon trading costs;
[0181] The population updating module 803 is used to update the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population;
[0182] The population mutation module 804 is configured to perform a mutation operation on each individual fox in the candidate fox population based on a preset mutation probability to obtain a new current fox population, and return to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function until the current fox population meets the preset iteration condition, and then use the current fox population that meets the preset iteration condition as the target fox population;
[0183] The scheduling parameter determination module 805 is used to obtain the target low-carbon scheduling parameter value of the target microgrid according to the target fox population.
[0184] In one embodiment, the population mutation module 804 is further used to determine the fox individuals to be mutated from the candidate fox population based on a preset mutation probability; based on the mutation operation, update the scheduling parameter value corresponding to the fox individuals to be mutated to obtain the mutated fox individuals corresponding to the fox individuals to be mutated; obtain a new current fox population based on the mutated fox individuals and the unmutated fox individuals; the unmutated fox individuals are the other fox individuals in the candidate fox population except the fox individuals to be mutated.
[0185] In one embodiment, the population mutation module 804 is further configured to determine, for any fox individual to be mutated, the scheduling parameters that need to be mutated in any fox individual to be mutated based on a preset mutation probability; determine the mutation direction of each scheduling parameter that needs to be mutated based on a preset mutation direction probability; and randomly update the scheduling parameters that need to be mutated in any fox individual to be mutated based on the mutation direction to obtain a mutated fox individual corresponding to any fox individual to be mutated.
[0186] In one embodiment, the above-mentioned population update module 803 is also used to determine the optimal fox individual from the current fox population based on individual fitness; randomly determine the propagation time information corresponding to each fox individual, and determine the parameter update mode corresponding to each fox individual based on the preset mode selection probability; the parameter update mode includes a prey search update mode and a hunting update mode; according to the optimal fox individual, the propagation time information and the parameter update mode, the scheduling parameter value corresponding to each fox individual is updated to obtain a candidate fox population.
[0187] In one embodiment, the above-mentioned population update module 803 is also used to update the scheduling parameter value corresponding to any fox individual according to the optimal fox individual, the propagation time information of all fox individuals and the current iteration generation for any fox individual when the parameter update mode is the prey search update mode, and obtain the updated fox individual corresponding to any fox individual; for any fox individual, when the parameter update mode is the hunting update mode, update the scheduling parameter value corresponding to any fox individual according to the optimal fox individual, the propagation time information of any fox individual and the current iteration generation for any fox individual, and obtain the updated fox individual corresponding to any fox individual.
[0188] In one embodiment, the above-mentioned population update module 803 is also used to update the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain an updated fox population; according to the preset scheduling parameter constraints, the scheduling parameter values corresponding to the fox individuals in the updated fox population that do not meet the preset scheduling parameter constraints are corrected to obtain a candidate fox population.
[0189] Each module in the aforementioned apparatus for determining low-carbon dispatch parameters for a microgrid may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0190] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 9As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be implemented via Wi-Fi, mobile cellular networks, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for determining low-carbon dispatch parameters for a microgrid. The display unit of the computer device is used to produce a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0191] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0192] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0193] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0194] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0195] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0196] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0197] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0198] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for determining low-carbon dispatch parameters of a microgrid, characterized in that: The method comprises: Randomly initializing multiple groups of dispatch parameter values of target microgrids, and generating an initial fox population in a fox optimization algorithm according to the multiple groups of dispatch parameter values of the target microgrids; The initial fox population is used as the current fox population, and the individual fitness of each fox in the current fox population is calculated according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs; updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population; Based on a preset mutation probability, performing a mutation operation on each individual fox in the candidate fox population to obtain a new current fox population, and returning to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then using the current fox population that meets the preset iteration condition as the target fox population; According to the target fox population, a target low-carbon scheduling parameter value of the target microgrid is obtained.
2. The method according to claim 1, characterized in that The method of performing a mutation operation on each individual fox in the candidate fox population based on a preset mutation probability to obtain a new current fox population includes: Based on a preset mutation probability, determining fox individuals to be mutated from the candidate fox population; Based on the mutation operation, the scheduling parameter value corresponding to the fox individual to be mutated is updated to obtain a mutated fox individual corresponding to the fox individual to be mutated; A new current fox population is obtained based on the mutated fox individuals and the unmutated fox individuals; the unmutated fox individuals are other fox individuals in the candidate fox population except the fox individuals to be mutated.
3. The method according to claim 2, characterized in that The method of updating the scheduling parameter value corresponding to the fox individual to be mutated based on the mutation operation to obtain the mutated fox individual corresponding to the fox individual to be mutated includes: For any fox individual to be mutated, determining a scheduling parameter that needs to be mutated in the fox individual to be mutated based on the preset mutation probability; Determine the mutation direction of each scheduling parameter that needs to be mutated based on the preset mutation direction probability; According to the mutation direction, the scheduling parameters that need to be mutated in any of the fox individuals to be mutated are randomly updated to obtain a mutated fox individual corresponding to any of the fox individuals to be mutated.
4. The method according to claim 1, wherein The method of updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population includes: Determining the optimal fox individual from the current fox population according to the individual fitness; Randomly determine the propagation time information corresponding to each fox individual, and determine the parameter update mode corresponding to each fox individual based on a preset mode selection probability; the parameter update mode includes a prey search update mode and a hunting update mode; According to the optimal fox individual, the propagation time information and the parameter update mode, the scheduling parameter value corresponding to each fox individual is updated to obtain a candidate fox population.
5. The method according to claim 4, characterized in that The updating of the scheduling parameter value corresponding to each fox individual according to the optimal fox individual, the propagation time information and the parameter updating mode comprises: For any fox individual, when the parameter update mode is the prey search update mode, updating the scheduling parameter value corresponding to the any fox individual according to the optimal fox individual, the propagation time information of all fox individuals, and the number of generations of the current iteration, to obtain an updated fox individual corresponding to the any fox individual; For any fox individual, when the parameter update mode is the hunting update mode, the scheduling parameter value corresponding to the any fox individual is updated according to the optimal fox individual, the propagation time information of the any fox individual and the algebra of the current iteration to obtain the updated fox individual corresponding to the any fox individual.
6. The method according to claim 1, wherein The method of updating the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population includes: updating the scheduling parameter value corresponding to each fox individual in the current fox population according to the individual fitness to obtain an updated fox population; According to the preset scheduling parameter constraint conditions, the scheduling parameter values corresponding to the fox individuals in the updated fox population that do not meet the preset scheduling parameter constraint conditions are corrected to obtain a candidate fox population.
7. A device for determining low-carbon dispatch parameters of a microgrid, characterized in that: The device comprises: A population generation module is used to randomly initialize multiple groups of dispatch parameter values of target microgrids, and generate an initial fox population in the fox optimization algorithm based on the multiple groups of dispatch parameter values of the target microgrids; a fitness determination module, configured to use the initial fox population as the current fox population and calculate the individual fitness of each fox in the current fox population according to a fitness function; the fitness function is determined based on the total operating cost of the target microgrid, and the total operating cost of the target microgrid at least includes carbon trading costs; A population updating module is used to update the corresponding scheduling parameter value of each fox individual in the current fox population according to the individual fitness to obtain a candidate fox population; a population mutation module, configured to perform a mutation operation on each individual fox in the candidate fox population based on a preset mutation probability to obtain a new current fox population, and return to the step of calculating the individual fitness of each individual fox in the current fox population according to the fitness function, until the current fox population meets a preset iteration condition, and then use the current fox population that meets the preset iteration condition as the target fox population; The scheduling parameter determination module is used to obtain the target low-carbon scheduling parameter value of the target microgrid according to the target fox population.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.