# Microgrid Operation Optimization Using Hybrid System Modeling and Switched Model Predictive Control

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Economically Oriented Microgrid Hybrid Model

#### 2.1. Energy Storage Description

#### 2.2. Transactions with a Public Energy Network

#### 2.3. Critical and Non-Critical Energy Demand

#### 2.4. Power Generator and Energy Balance in Microgrid

#### 2.5. State-Space Model in MLD Form

## 3. Microgrid Control System Oriented towards Economic Optimization

#### 3.1. Control System Concept with Switched Hybrid MPC

#### 3.2. Optimization Problem Formulation

## 4. Parameters and Testing Scenario

#### 4.1. Parameters and Constraints

#### 4.2. Simulated Microgrid Configuration

#### 4.3. Energy Generation and Demand Scenarios

#### 4.4. Performed Tests and Their Methodology

- comparison of both control strategies over 48-h long simulation period consisting of the sunny day followed by the cloudy day and with two connection mode switches
- comparison of total operation cost for both approaches using aforementioned renewable energy supply scenario but with varying initial storage state of charge $SOC\left(0\right)$ and time of connection mode switch from on-grid to off-grid ${t}_{off}$.

## 5. Results

#### 5.1. Comparison of Microgrid Performance in Different Renewable Energy Generation Scenarios

#### 5.2. Comparison of Microgrid Performance Using Switched and Non-Switched HMPC Control

#### 5.3. Comparison of Switched and Non-Switched HMPC Control Performance in Various Connection Scenarios and with Varying Initial Storage State of Charge

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Garcia-Torres, F.; Zafra-Cabeza, A.; Silva, C.; Grieu, S.; Darure, T.; Estanqueiro, A. Model Predictive Control for Microgrid Functionalities: Review and Future Challenges. Energies
**2021**, 14, 1296. [Google Scholar] [CrossRef] - Bordons, C.; Garcia-Torres, F.; Ridao, M.A. Model Predictive Control of Microgrids; Springer Nature: Cham, Switzerland, 2020. [Google Scholar] [CrossRef]
- Hu, J.; Shan, Y.; Guerrero, J.; Ioinovici, A.; Chan, K.; Rodriguez, J. Model predictive control of microgrids—An overview. Renew. Sustain. Energy Rev.
**2020**, 136, 110422. [Google Scholar] [CrossRef] - Topa Gavilema, A.O.; Alvarez, J.D.; Torres Moreno, J.L.; Garcia, M.P. Towards Optimal Management in Microgrids: An Overview. Energies
**2021**, 14, 5202. [Google Scholar] [CrossRef] - Ahmad, S.; Ullah, I.; Jamil, F.; Kim, D. Toward the Optimal Operation of Hybrid Renewable Energy Resources in Microgrids. Energies
**2020**, 13, 5482. [Google Scholar] [CrossRef] - Zhang, X.; Wang, Z.; Lu, Z. Multi-objective load dispatch for microgrid with electric vehicles using modified gravitational search and particle swarm optimization algorithm. Appl. Energy
**2022**, 306, 118018. [Google Scholar] [CrossRef] - Yang, Y.; Qiu, J.; Qin, Z. Multidimensional Firefly Algorithm for Solving Day-Ahead Scheduling Optimization in Microgrid. J. Electr. Eng. Technol.
**2021**, 16, 1755–1768. [Google Scholar] [CrossRef] - Kim, R.K.; Glick, M.B.; Olson, K.R.; Kim, Y.S. MILP-PSO Combined Optimization Algorithm for an Islanded Microgrid Scheduling with Detailed Battery ESS Efficiency Model and Policy Considerations. Energies
**2020**, 13, 1898. [Google Scholar] [CrossRef][Green Version] - Wang, L.; Xue, A. Equivalent Modeling of Microgrids Based on Optimized Broad Learning System. Energies
**2021**, 14, 7911. [Google Scholar] [CrossRef] - Lopez-Garcia, T.B.; Coronado-Mendoza, A.; Domínguez-Navarro, J.A. Artificial neural networks in microgrids: A review. Eng. Appl. Artif. Intell.
**2020**, 95, 103894. [Google Scholar] [CrossRef] - Abdolrasol, M.G.M.; Mohamed, R.; Hannan, M.A.; Al-Shetwi, A.Q.; Mansor, M.; Blaabjerg, F. Artificial Neural Network Based Particle Swarm Optimization for Microgrid Optimal Energy Scheduling. IEEE Trans. Power Electron.
**2021**, 36, 12151–12157. [Google Scholar] [CrossRef] - Otani, T.; Tanabe, R.; Koyanagi, Y.; Iwamoto, S. Cooperative load frequency control of generator and battery using a recurrent neural network. In Proceedings of the TENCON 2017—2017 IEEE Region 10 Conference, Penang, Malaysia, 5–8 November 2017; pp. 918–923. [Google Scholar] [CrossRef]
- Hamedi, K.; Sadeghi, S.; Esfandi, S.; Azimian, M.; Golmohamadi, H. Eco-Emission Analysis of Multi-Carrier Microgrid Integrated with Compressed Air and Power-to-Gas Energy Storage Technologies. Sustainability
**2021**, 13, 4681. [Google Scholar] [CrossRef] - Yang, J.; Su, C. Robust optimization of microgrid based on renewable distributed power generation and load demand uncertainty. Energy
**2021**, 223, 120043. [Google Scholar] [CrossRef] - Silva, J.A.A.; Lopez, J.C.; Arias, N.B.; Rider, M.J.; da Silva, L.C.P. An optimal stochastic energy management system for resilient microgrids. Appl. Energy
**2021**, 300, 117435. [Google Scholar] [CrossRef] - Rezaei, N.; Khazali, A.; Mazidi, M.; Ahmadi, A. Economic energy and reserve management of renewable-based microgrids in the presence of electric vehicle aggregators: A robust optimization approach. Energy
**2020**, 201, 117629. [Google Scholar] [CrossRef] - Mosa, M.A.; Ali, A.A. Energy management system of low voltage dc microgrid using mixed-integer nonlinear programing and a global optimization technique. Electr. Power Syst. Res.
**2021**, 192, 106971. [Google Scholar] [CrossRef] - Alhumaid, Y.; Khan, K.; Alismail, F.; Khalid, M. Multi-Input Nonlinear Programming Based Deterministic Optimization Framework for Evaluating Microgrids with Optimal Renewable-Storage Energy Mix. Sustainability
**2021**, 13, 5878. [Google Scholar] [CrossRef] - Borrelli, F.; Bemporad, A.; Morari, M. Predictive Control for Linear and Hybrid Systems; Cambridge University Press: Cambridge, UK, 2017. [Google Scholar] [CrossRef][Green Version]
- Tatjewski, P. Advanced Control of Industrial Processes: Structures and Algorithms; Advances in Industrial Control; Springer: London, UK, 2007. [Google Scholar] [CrossRef]
- Parisio, A.; Rikos, E.; Glielmo, L. A Model Predictive Control Approach to Microgrid Operation Optimization. IEEE Trans. Control Syst. Technol.
**2014**, 22, 1813–1827. [Google Scholar] [CrossRef] - Conte, E.; Mendes, P.R.C.; Normey-Rico, J.E. Economic Management Based on Hybrid MPC for Microgrids: A Brazilian Energy Market Solution. Energies
**2020**, 13, 3508. [Google Scholar] [CrossRef] - Khakimova, A.; Shamshimova, A.; Sharipova, D.; Kusatayeva, A.; Ten, V.; Bemporad, A.; Familiant, Y.; Shintemirov, A.; Rubagotti, M. Hybrid model predictive control for optimal energy management of a smart house. In Proceedings of the 2015 IEEE 15th International Conference on Environment and Electrical Engineering (EEEIC), Rome, Italy, 10–13 June 2015; pp. 513–518. [Google Scholar] [CrossRef]
- Paula e Silva, D.; Salles, J.; Fardin, J.; Pereira, M. Management of an island and grid-connected microgrid using hybrid economic model predictive control with weather data. Appl. Energy
**2020**, 278, 115581. [Google Scholar] [CrossRef] - Olama, A.; Mendes, P.R.; Camacho, E.F. Lyapunov-based hybrid model predictive control for energy management of microgrids. IET Gener. Transm. Distrib.
**2018**, 12, 5770–5780. [Google Scholar] [CrossRef] - Dou, C.; Zhou, X.; Zhang, T.; Xu, S. Economic Optimization Dispatching Strategy of Microgrid for Promoting Photoelectric Consumption Considering Cogeneration and Demand Response. J. Mod. Power Syst. Clean Energy
**2020**, 8, 557–563. [Google Scholar] [CrossRef] - Saft Batteries. Intensium® Mini Flexible Lithium-Ion Energy Storage System Datasheet. Available online: https://cdn.enfsolar.com/Product/pdf/storage_system/5a41f616848ec.pdf (accessed on 10 July 2021).
- ENEA S. A. ENEA Energy Tariff 2021. Available online: https://www.enea.pl/dlafirm/obsluga_klienta_i_kontakt/2021/enea_operator_taryfa_2021.pdf (accessed on 10 July 2021).
- Polish Energy Regulatory Office. Average Sales Price on Polish Competitive Energy Market (Annual and Quarterly). Available online: https://www.ure.gov.pl/pl/energia-elektryczna/ceny-wskazniki/7852,Srednia-cena-sprzedazy-energii-elektrycznej-na-rynku-konkurencyjnym-roczna-i-kwa.html (accessed on 10 July 2021).
- Torrisi, F.; Bemporad, A. HYSDEL-a tool for generating computational hybrid models for analysis and synthesis problems. IEEE Trans. Control Syst. Technol.
**2004**, 12, 235–249. [Google Scholar] [CrossRef] - Bemporad, A.; Morari, M. Control of systems integrating logic, dynamics, and constraints. Automatica
**1999**, 35, 407–427. [Google Scholar] [CrossRef] - Herceg, M.; Kvasnica, M.; Jones, C.N.; Morari, M. Multi-Parametric Toolbox 3.0. In Proceedings of the IEEE 2013 European Control Conference (ECC), Zurich, Switzerland, 17–19 July 2013; pp. 502–510. [Google Scholar] [CrossRef][Green Version]
- Gurobi Optimization LLC. Gurobi—The Fastest Solver. Available online: https://www.gurobi.com/ (accessed on 16 December 2021).
- Proton Polska. Proton ZPP 100 Energy Generator Datasheet. Available online: https://proton-polska.pl/product-pol-525-Agregat-pradotworczy-Proton-ZPP-100-100kW-110kW.html (accessed on 16 December 2021).
- Customer-Led Network Revolution. Customer-Led Network Revolution Dataset. Available online: http://www.networkrevolution.co.uk/resources/project-data/ (accessed on 16 December 2021).

**Figure 3.**Schematic diagram of the chosen control system structure with switching between two hybrid model predictive control laws.

**Figure 6.**Diagram showing the methodology used to compare switched and non-switched HMPC performance.

**Figure 7.**Storage state of charge, energy balance and all system inputs over a 24-h simulation period of the sunny and cloudy day.

**Figure 8.**Storage state of charge, energy balance, and all system inputs obtained using switched and single hybrid MPC solutions in the two-day scenario.

**Figure 9.**The total cost of microgrid operation depends on the initial storage state of charge and the time at which operation mode is changed from on-grid to off-grid.

Parameter | Value | Unit | Parameter | Value | Unit |
---|---|---|---|---|---|

${\beta}_{apx1}$ | 0.5000 | - | ${f}_{b}$ | 0.5000 | - |

${\beta}_{apx2}$ | 0.6000 | - | ${f}_{const}$ | 6.100 | - |

${\beta}_{apx3}$ | 0.7000 | - | ${f}_{ep}$ | 0.1292 | EUR/kWh |

${\beta}_{apx4}$ | 0.8000 | - | ${f}_{mp}$ | 0.1062 | EUR/kWh |

${\beta}_{apx5}$ | 0.9000 | - | ${f}_{flat}$ | 0.0787 | EUR/kWh |

${\beta}_{apx6}$ | 1.0000 | - | ${f}_{sell}$ | 0.0569 | EUR/kWh |

${\beta}_{max}$ | 100 | % | ${f}_{cg}$ | 0.0003 | EUR/kWh |

${\beta}_{min}$ | 50 | % | ${f}_{p}$ | 0.0169 | EUR/kWh |

$\mathsf{\Delta}{\beta}_{max}$ | 10 | % | ${f}_{q}$ | 0.0023 | EUR/kWh |

${c}_{mnt}$ | 0.25 | EUR | ${f}_{res}$ | 0.0005 | EUR/kWh |

$c{s}_{SD}$ | 0.4478 | EUR | ${f}_{fd}$ | 0.8956 | EUR/litre |

$c{s}_{SU}$ | 0.8956 | EUR | N | 15 | - |

${E}_{e{x}_{max}}$ | 50 | kWh | ${P}_{db}$ | 0.5000 | kW |

${E}_{nd}$ | 0.0082 | kWh | ${P}_{{g}_{max}}$ | 100 | kW |

${E}_{ac}$ | 2.000 | kWh | $\mathsf{\Delta}{P}_{{g}_{max}}$ | 25 | kW |

${E}_{s{t}_{min}}$ | 100 | kWh | ${P}_{tr}$ | 32.50 | kW |

${E}_{s{t}_{max}}$ | 480 | kWh | ${T}_{s}$ | 0.25 | h |

$\mathsf{\Delta}{E}_{s{t}_{min}}$ | −220 | kWh | ${\eta}_{c}$ | 0.9700 | - |

$\mathsf{\Delta}{E}_{s{t}_{max}}$ | 61 | kWh | ${\eta}_{d}$ | 0.9700 | - |

${f}_{a}$ | 0.1662 | - |

**Table 2.**Aggregated output values associated with microgrid operation cost and averaged state of charge and energy demand reduction coefficient values for sunny and cloudy day.

Variable | Sunny Day | Cloudy Day | Unit |
---|---|---|---|

${C}_{st}=\sum {c}_{st}$ | 0.89 | 2.24 | EUR |

${C}_{mg}=\sum {c}_{mg}$ | 32.43 | 82.41 | EUR |

${C}_{s}=\sum {c}_{s}$ | 0 | 0 | EUR |

${C}_{b}=\sum {c}_{b}$ | 8.77 | 19.04 | EUR |

${C}_{total}=\sum ({c}_{st}+{c}_{mg}-{c}_{s}+{c}_{b})$ | 42.09 | 103.69 | EUR |

$\overline{SOC}$ | 47.60 | 38.84 | % |

$\overline{\beta}$ | 95.73 | 90.94 | % |

**Table 3.**Aggregated output values associated with microgrid operation cost and averaged state of charge and energy demand reduction coefficient values obtained using switched and single hybrid MPC solutions in the two-day scenario.

Variable | Switched HMPC | Single HMPC | Unit |
---|---|---|---|

${C}_{st}=\sum {c}_{st}$ | 4.93 | 4.93 | EUR |

${C}_{mg}=\sum {c}_{mg}$ | 99.81 | 112.06 | EUR |

${C}_{s}=\sum {c}_{s}$ | 10.83 | 18.16 | EUR |

${C}_{b}=\sum {c}_{b}$ | 30.28 | 40.55 | EUR |

${C}_{total}=\sum ({c}_{st}+{c}_{mg}-{c}_{s}+{c}_{b})$ | 124.19 | 139.38 | EUR |

$\overline{SOC}$ | 48.62 | 45.09 | % |

$\overline{\beta}$ | 92.50 | 96.82 | % |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Maślak, G.; Orłowski, P.
Microgrid Operation Optimization Using Hybrid System Modeling and Switched Model Predictive Control. *Energies* **2022**, *15*, 833.
https://doi.org/10.3390/en15030833

**AMA Style**

Maślak G, Orłowski P.
Microgrid Operation Optimization Using Hybrid System Modeling and Switched Model Predictive Control. *Energies*. 2022; 15(3):833.
https://doi.org/10.3390/en15030833

**Chicago/Turabian Style**

Maślak, Grzegorz, and Przemysław Orłowski.
2022. "Microgrid Operation Optimization Using Hybrid System Modeling and Switched Model Predictive Control" *Energies* 15, no. 3: 833.
https://doi.org/10.3390/en15030833