Clear Sky Science · en
Optimal scheduling study of microgrids based on multistrategy improved sardine algorithm
Why smarter small power grids matter
Across the world, towns and campuses are adding small local power systems built from solar panels, wind turbines, batteries, and small generators. These “microgrids” can keep the lights on during blackouts and make better use of clean energy. But choosing when to use the sun, the wind, a battery, or a fuel powered generator is a tricky puzzle that changes every hour. This study presents a new way to plan those choices so that microgrids cut both costs and pollution at the same time.
How local power systems work
A microgrid is like a small, smart version of the larger power grid. It can connect to the main grid when that is helpful, or run on its own if there is a failure outside. Inside the microgrid, several devices share the work: solar panels and wind turbines bring in clean but changeable energy, batteries store extra electricity for later, and fuel based units such as diesel generators and gas turbines provide backup power and quick response. The main goal is to match all of this changing supply to the local demand without wasting energy or money.
The challenge of daily decision making
Running a microgrid well means making many linked decisions: when to charge or discharge batteries, how much power to buy from or sell to the main grid, and how hard to run fuel based machines. These decisions must respect many limits, such as maximum power ratings, safe battery levels, and how fast devices can ramp their output up or down. On top of this, there is a trade off between low bills and clean air. Fuel generators and grid power can be cheap but dirty, while solar and wind are clean but uncertain. Simple planning methods often get stuck in a “good enough” pattern that is not truly the best and can miss cheaper, cleaner options hidden in this complex landscape.

A new search method inspired by fish schools
To tackle this, the authors build a detailed mathematical model of a microgrid that includes wind turbines, solar panels, a micro gas turbine, a diesel generator, and a battery. They then design a new search method to explore the many possible schedules. The method mixes two nature inspired ideas: a recent “sardine” algorithm based on how fish schools move and split, and a well known “particle swarm” method that guides virtual particles toward better solutions. The improved approach uses several tricks: it starts with a more varied set of trial solutions, adjusts how boldly it searches as it learns, and adds random “jumps” that help it escape local dead ends. A two layer structure lets one group explore broadly while another fine tunes promising options, sharing the best findings between them.
Testing the method on standard puzzles
Before using the method on real microgrid problems, the team tests it on twelve standard math functions widely used to judge search algorithms. These test cases include smooth hills, sharp ridges, and landscapes with many small valleys. In head to head trials against seven other methods, including the original sardine algorithm, particle swarm optimization, genetic algorithms, and several hybrids, the improved sardine approach finds better solutions more quickly and more reliably. It shows strong ability to explore widely at first and then focus tightly near the best answer, without getting trapped in poor locations.

What happens inside a model microgrid
Next, the authors apply their method to a sample microgrid that runs on a typical day with changing sun, wind, and demand. The model includes the costs of fuel, operation, and pollution for each device, as well as prices for buying from or selling to the main grid. The improved scheduling pattern uses batteries as a smart buffer, charging when power is cheap and clean and discharging when prices and pollution would otherwise be high. Solar and wind are used as much as possible, while the gas turbine and diesel generator run only when their combined economic and environmental benefits outweigh grid imports. Compared with older planning methods, the new approach produces smoother output curves and a better balance between local generation, storage, and grid power.
Why this new approach matters
Under the same conditions and with the same equipment, the improved sardine based method cuts the total daily cost of running the sample microgrid by about one quarter compared with the original sardine algorithm, while also lowering pollution. It reaches good answers faster and with less risk of stalling in a poor solution. Although the work is still based on computer models and ignores some real world details, it suggests that carefully designed search methods can make future microgrids both cheaper and cleaner to operate. As more communities adopt local energy systems, such smart scheduling tools could play a key role in building a more reliable and sustainable power supply.
Citation: Wei, L., Zhong, H. Optimal scheduling study of microgrids based on multistrategy improved sardine algorithm. Sci Rep 16, 15782 (2026). https://doi.org/10.1038/s41598-026-46654-z
Keywords: microgrid, renewable energy, energy storage, optimization algorithm, economic dispatch