# Model Predictive Control for Microgrid Functionalities: Review and Future Challenges

Felix Garcia-Torres, Ascension Zafra-Cabeza, Carlos Silva, Stephane Grieu, Tejaswinee Darure, Ana Estanqueiro

► To cite this version:

Felix Garcia-Torres, Ascension Zafra-Cabeza, Carlos Silva, Stephane Grieu, Tejaswinee Darure, et al. Model Predictive Control for Microgrid Functionalities: Review and Future Challenges. Energies, 2021, 14 (5), pp.1296. 10.3390/en14051296. [https://arxiv.org/abs/2009.04475]

HAL Id: hal-04751045

https://cnrs.hal.science/hal-04751045v1

Submitted on 24 Oct 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
Article

# Model Predictive Control for Microgrid Functionalities: Review and Future Challenges

Felix Garcia-Torres <fnref n="1" />* , Ascension Zafra-Cabeza <fnref n="2" /> ID , Carlos Silva <fnref n="3" /> ID , Stephane Grieu <fnref n="4" /> ID , Tejaswinee Darure <fnref n="4" /> ID and Ana Estanqueiro <fnref n="5" /> ID

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** 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. https://doi.org/10.3390/en14051296

Academic Editor: Robin Roche

Received: 11 January 2021
Accepted: 18 February 2021
Published: 26 February 2021

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

<figure><img src="image_3.png" /></figure>

**Copyright:** © 2021 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/).

**Abstract:** Renewable generation and energy storage systems are technologies which evoke the future energy paradigm. While these technologies have reached their technological maturity, the way they are integrated and operated in the future smart grids still presents several challenges. Microgrids appear as a key technology to pave the path towards the integration and optimized operation in smart grids. However, the optimization of microgrids considered as a set of subsystems introduces a high degree of complexity in the associated control problem. Model Predictive Control (MPC) is a control methodology which has been satisfactorily applied to solve complex control problems in the industry and also currently it is widely researched and adopted in the research community. This paper reviews the application of MPC to microgrids from the point of view of their main functionalities, describing the design methodology and the main current advances. Finally, challenges and future perspectives of MPC and its applications in microgrids are described and summarized.

**Keywords:** microgrids; model predictive control; electric markets; flexibility; resilience; buildings; energy storage system; power-to-X; power quality and reliability; blockchain; fault-tolerant control

## 1. Introduction

In most developed countries, the policy framework for climate and energy follows the ambitious commitment of reducing greenhouse gas emissions and reaching a neutral-carbon-based energy system in the next few decades. From the power grid's perspective, the delivery of such ambition requires the development of cost-efficient approaches that respond to the challenges of affordability, competitiveness, security of supply, and sustainability of electric power systems fully-based on renewable energy systems.

The current distribution and transmission grids will have to evolve to be able to deliver a low-carbon and competitive energy supply while the power quality and reliability levels will be even more restrictive than nowadays. This will also require changes in the current operation of electrical markets, as to handle the uncertainties of renewable energy system (RES), they should become more flexible. The planning and operation of power systems will have to be adapted to the non-synchronous nature environment of future power systems where Renewable Energy Systems (RES) will be dominant, thus making it more prone to frequency instability in a context where most of the ancillary services to provide grid stability will mainly need to be provided by the RES of consumer-based resources, rather than based on the inertia of conventional generators.

<footnote n="1">¹ Application Unit, Centro Nacional del Hidrogeno, 13500 Puertollano, Ciudad Real, Spain</footnote>

<footnote n="2">² Department of Systems Engineering and Automatic Control, Universidad de Sevilla, 41092 Sevilla, Spain; asunzafra@us.es</footnote>

<footnote n="3">³ IN+ Center for Innovation, Technology and Policy Research, Mechanical Engineering Department, Instituto Superior Técnico (IST), Universidade de Lisboa, 1049-001 Lisbon, Portugal; carlos.santos.silva@tecnico.ulisboa.pt</footnote>

<footnote n="4">⁴ Processes, Materials and Solar Energy (PROMES-CNRS) Laboratory, University of Perpignan Via Domitia, 66100 Perpignan, France; grieu@univ-perp.fr (S.G.); tejaswinee.darure@univ-perp.fr (T.D.)</footnote>

<footnote n="5">5 Unidade de Energias Renováveis e Eficiência Energética, Laboratorio Nacional de Energia e Geologia, 1649-038 Lisbon, Portugal; ana.estanqueiro@lneg.pt</footnote>

<footnote>* Correspondence: felix.garcia@cnh2.es; Tel.: +34-926-42-06-82</footnote>
Under this challenging scenario, microgrid technology emerges as a key solution to pave the way for these future neutral-carbon smart grids. As defined by CIGRE [1], microgrids are electricity distribution systems containing loads and distributed energy resources, (such as distributed generators, storage devices, or controllable loads) that can be operated in a controlled, coordinated way either while connected to the main power grid or when they work as islanded systems. The transformation of the smart grid towards a more structured system based on microgrids with storage systems working in a cooperative and self-organized way appears as a key to transform our current energy system into a more intelligent, robust, and greener one. A microgrid-based structure of the smart grid would not only allow better integration of the emerging distributed components in the wholesale market but could also be utilized as a part of distribution and transmission system management through evolving flexibility (ancillary service) market and novel grid management concepts. The flexibility provided by energy storage systems in microgrids, as well as the ability of microgrids to operate on grid-connected/islanded mode, appear as key solutions to the challenges posed by the future transmission and distribution grids. The introduction of microgrids could improve reliability, reduce emissions, and expand energy options in the future power system. They may also add redundancy and increase grid security. Several microgrid facilities can also recover and utilize heat from their Distributed Generation (DG) systems, a practice known as combined heat and power generation. Cooling generation can be also included as a flexibility tool or power-to-X. The interconnection of these microgrids into networks of microgrids provides another degree of flexibility. Microgrids can also increase the resilience, security, and smartness of the energy system in an endeavor to progress towards an energy system which is capable of hosting a large share of variable renewables. An overview of the different functionalities of microgrids in a structured smart grid and their interaction with the different players of the electric market is shown in Figure 1.

<figure><img src="image_4.png" /><figcaption>**Figure 1.** Overview of the main functionalities of microgrids.</figcaption></figure>

While most of the technology related to microgrid components such as RES and ESS have reached their technological maturity, there still exist challenges regarding their combined optimization in a microgrid as set of subsystem subjected to uncertainties such as renewable generation, load consumption, and energy prices. Besides the aforementioned problems with RES and loads, ESS also have to be optimally controlled by the microgrid according to their operation costs or physical constraints. The complexity of the algorithms is even increased when several microgrids have to be optimized at the same time. Because of the technical and economic benefits that microgrids can bring to the future energy
systems, several methodologies have been developed to solve their associated problems and numerous review studies have been developed related to microgrid management from a global perspective such as [2–4] to particular issues such as power quality in microgrids [5,6], stability, and control aspects of microgrids [7], energy management system (EMS) [8], resilience [9] or buildings microgrid [10].

As can be seen in the aforementioned studies, Model Predictive Controller (MPC) appears as a powerful tool to deal with all the control aspects related to microgrids in all their control layers. The potentiality of MPC-based controllers for microgrids is an object of study in several recent studies [11–14]. The term MPC [12,15] does not refer to a specific control strategy but rather encompasses an ample range of control methods that makes explicit use of a model of the process to predict the behavior of the system and obtain the optimal control signals by minimizing an objective function. The proposed methodology allows the selection of the best amongst all feasible input sequences over a future horizon according to established criteria which can be weighted. At each sample instant, the first input of this sequence is applied to the control system and the procedure is repeated in a receding horizon fashion at every sampling time. MPC methodology can easily handle the different constraints of the devices which integrate the microgrid, enabling the controller to optimize each of the microgrid components closely to their ultimate profitable margins but integrating aspects as degradation, operation cost, power, and energy capacity limits. The MPC methodology also allows the design of hierarchical multi-layer systems and control systems made by a number of control algorithms working on different time scales. Its formulation as hybrid MPC allows the formulation of complex cost functions for the microgrid optimization problem integrating logic, dynamic, and mixed-products-based variables within the Mixed Logic Dynamic (MLD) framework. Its stochastic formulation allows for facing the uncertainties in the forecasting of renewable generation or load consumption to consider several possible scenarios with an assigned probability which can be different to the one that is finally executed. Its distributed formulation allows the optimization of several microgrids working in the same network respecting the individual behavior and optimization for each microgrid controller. As a recent example, MPC has been satisfactorily applied to power electronic devices with its Finite Control State (FCS) and continuous control state formulation (CCS) [12].

Despite the many reviews of microgrid control issues and MPC applications, no sum-
mary of MPC controllers considering final-use applications of microgrids has yet been
published. The main aim of this review is to introduce MPC from the perspective of micro-
grid functionalities. In this review, the development of MPC and various improved MPC
schemes for the main microgrid functionalities are introduced and analyzed, highlighting
their main contributions. The study concludes with a discussion of future challenges re-
garding the development of microgrid functionalities using Model Predictive Control. The
inserted references have been selected using as keywords the titles of the sections, as well
as the keywords given in the review article. The database used corresponds to google
scholar and scopus. For the selection of the references reviewed in this work, two criteria
have been used: (i) *Relevance*: According to the number of citations of each reference, (ii)
*Novelty* considering those works related to this review published in the last two years.

## 2. A Review of MPC-Based Control Methods for Microgrid Applications

The microgrid control system must address several aspects with different timescales. The optimization of the system taking into account the day-ahead electrical markets requires sample periods of 1 h; real-time control of power quality and reliability (PQR) issues—fast electrical control of the phase, frequency and voltage of individual resources—must be done on time scales lower than one second or less; unit commitment, economic dispatch, demand-side optimization, and energy exchanges with the utility grid are performed on time scales of minutes or hours. Thus, an extended approach is necessary to develop a hierarchical control structure that handles these different time scales. These levels are shown in Figure 2 and are explained in depth in [16].
<figure><img src="image_5.png" /><figcaption>**Figure 2.** Microgrid control level architecture.</figcaption></figure>

The primary level operates on a fast time scale and maintains the voltage and frequency stability during changes on the generation or demand, or after switching to the islanded mode. This control is implemented locally in the DERs. The secondary level is responsible for ensuring that the voltage and frequency deviations are adjusted to zero after a load or generation change is produced within the microgrid. This level is responsible for eliminating any steady-state error introduced by the primary control and is also used for synchronization with the grid during the transition from the islanded mode to grid connection. The tertiary control is used to optimize the power flow between the components of the microgrid and the main grid (or other microgrids) on large time scales (planning and schedule). A summary of the main goals of each control level of the microgrid depending on its working mode can be found in Figure 3.

<figure><img src="image_6.png" /><figcaption>**Figure 3.** Microgrid control levels and operation mode.</figcaption></figure>
In the next subsections, we describe in detail how the MPC was applied to solve specific problems within the microgrid architecture.

## 2.1. *Electrical Markets, Flexibility, and Ancillary Services*

The intense development of both the Variable Renewable Energy (VRE) and the Information and Communication Technology (ICT) sectors enable new paradigms of operation for individual prosumers, for clusters of prosumers associated within sustainable nZEB buildings and/or structured in the form of microgrids. In fact, the greatest challenges faced by the energy system planners of near 100% renewable power systems conceived within the European National Plans for Energy and Climate [17] are oriented to identify new sources of system inertia (Power system Inertia is the capability of an alternate power system to store kinetic energy in rotating masses—usually from the electric generators/machines directly connected to the grid—that acts to overcome imbalance between power supply and demand, thus being the most important mechanism in the fast frequency regulation of the power system.) [18,19] and novel sources of flexibility [20,21].

Flexibility is a concept that is easy to understand but difficult to explain, as it is a rather intuitive property of power systems. In a broad sense, the flexibility of a power system describes its ability to adapt the electricity generation and consumption patterns to maintain balance between energy supply and demand and thus to ensure robust and stable operation within different time scales, in an economical and sustainable manner. As such, when VRE (Variable Renewable Energy) sources, like wind and PV systems, started to develop and increase their shares in the overall energy mix share, “flexible power systems” were considered to be the ones with a relevant share of fast-responsive power plants, e.g., hydro or thermal open-cycle units, while a large share of nuclear and/or slow-response coal plants would classify them as non-flexible.

The quest for novel sources of flexibility has been one of the most relevant areas of research in the recent years [20–22]. Microgrids, prosumers, and the so-called DSM—demand side management/DR-demand response capacity have been consistently considered to be (one of) the most valuable new sources of adjustment between production and consumption, especially as the share of dispatchable (regulated) power plants, capable of offering power/energy reserves diminishes. Due to the small dimension (both of power capacity and energy volumes), a single prosumer or microgrid is of little value in assisting a transmission system operator (TSO) in maintaining the stability of the system. This is the main reason why different structures of operation, aggregation, and negotiation of electricity are requested together with the definition of new energy/electricity players and actors for the energy transition decade just started. Recent research [23] addressed the organization of prosumers in the form of resource aggregators (including their identification, classification and connection with other power system players) and characterized in detail the role of resource aggregators and the organization of new business models for demand response in electricity markets. With a different, but extremely valuable and innovative approach, Pasetti et al. [24] addressed the role of Virtual Power Plants and Demand-Side Management in Urban Energy Systems, with a focus on a VPP (virtual power plant) architecture with the capability of supervising the prosumer participation in DSM programs. Unlike classical VPP architectures that usually build on dispersed VREs, these authors focused on a VPP model constrained by the physical domain of single users, i.e., to single points of common coupling (Pcc) of the distribution network, i.e., under a microgrid structure. The VPP architecture proposed by Pasetti et al. [24] allows the integrated and coordinated implementation of several control and management strategies applicable to microgrids and clusters of consumers aggregates, e.g., energy management, demand response, and ancillary services and is a promising concept for years to come.

Several other authors have addressed this subject under different approaches (and angles of application) in recent years. One valuable operation of aggregators of consumers or microgrids is to offer/trade ancillary services to the TSO. Majzoobi and Khodaei [25] developed a model for optimal scheduling to minimize microgrid cost (and maximize
value) by adapting consumption profile to the local resources and providing ancillary services. The model successfully addresses day-ahead schedules with sub-hourly time-intervals. One application considered to have a higher potential in the near future is the new, blockchain-based, organization of consumer energy transaction management for (sharing and) trading within a smart active operation of distribution networks [26]. Figure 4 depicts a possible new organization of consumer electricity trading following a blockchain-based trading after Christidis et al. [27]:

<figure><img src="image_7.png" /><figcaption>**Figure 4.** A conceptual diagram for a blockchain-based local energy market including the local utility and third-party energy service companies (ESCOs), adapted from [27].</figcaption></figure>

How local energy markets will be structured and organized in order to maximize the benefits offered by local generation as well as the smoothing effects of aggregation and the valuable effects of DSM is a current area of research (e.g., project TradeRES, [28]), as well as the development of European regulations and governance decisions that will shape our behavior as consumers in the next few decades.

## 2.2. Resilience, Risk Management, and Fault Tolerant Control

Resilience, risk management, and Fault-Tolerant Control (FTC) have become relevant issues of power systems in recent years. One of the reasons is the effects that natural disasters can cause to electrical grids. In this challenging framework, microgrids can play a very important role to improve the resilience of power systems based on renewable generation. Reliability of power supply has to be considered as a fundamental aspect in environments with critical loads (i.e., hospitals, military facilities, etc.) even more important than the economic optimization of their energy management system (EMS). Microgrids can provide resilience to this kind of facilities through their capacity to form self-sustainable islanded energy systems [9]. In this section, a review study of the main methods to increase the resilience and fault-tolerant control application to microgrids is carried out.

### 2.2.1. Need for Fault-Tolerant Control in Building Systems and Microgrids

Intelligent building design is entering its third generation [29], in which different control systems are exchanging data to assist a variety of building management systems. The first generation of intelligent buildings deals with independent systems; the second generation deals with interconnected systems; and the key phenomenon behind the third
generation is the increase in the number and the variety of sensors distributed throughout building functionalities.

In this context, the whole building system is highly vulnerable to different kinds of faults. Unbeknownst to many, discrepancies from different sources could cause a big penalty over cost and comfort. Energy efficiency and user comfort are directly targeted by an abnormality in building operation. Thus, to make a resilient building management system, it is important not only to identify the severity, the cause, and the type of each fault but also fault-tolerant techniques.

The study carried out by [30] proved that many HVAC systems perform poorly because the importance of control has been underestimated by producers. In fact, the majority of installations are controlled by a simple control law, of the All or Nothing or PID type [31]. Hence, there is a need to use an advanced control system to improve the performance of the HVAC system.

Another important solution that will allow buildings to enhance their EMS is the integration of a number of small production units called thermal microgrids that do not stop increasing remarkably [32]. These units are rapidly becoming the mainstay of the future power system. At the same time, storage systems have become more reliable, cheaper, and cleaner, thus making viable the possibility of storing energy to cope with the intermittent nature of renewable electricity production. However, to have an efficient microgrid, an optimal control system is needed for the energy management between production, storage and consumption that adapts to the presence of faults and minimizes the occupant's discomfort and the increase of energy consumption [33,34]. The paper presented in [35] formulates distributed and centralized MPC strategies to balance fluctuations in solar power generation by directly controlling the aggregate demand of clusters of distributed residential air-conditioners. HVAC systems or combined cooling, heating and power microgrids can add flexibility to RES without increasing their economic cost.

The control system, whether for the thermal regulation of the building or the energy management of the microgrid must have a certain degree of intelligence in order to ensure optimal operation. All the more so since today, automated systems are subject to increasingly demanding performance constraints resulting in the application of ever more efficient controls, not only in the case of nominal operation but also in the event of fault appearance. This leads to the general notion of fault tolerant control systems.

### 2.2.2. Fault Tolerant Control Techniques for Building Systems: State of the Art

The goal of a fault tolerant system is to allow desired objectives to be maintained, not only in nominal operation but even in the presence of faults. It is very important to specify that the objectives to be achieved during these two operating modes are different [30]. Over recent years, FTC became an appealing area of research for building researchers. Various FTC strategies have been developed to compensate the fault effects and to maintain such desired performances in buildings. An important number of research and survey papers are available in the literature. Methods vary from adaptive control [36] to distributed [37] to model-based techniques [38]. The use of an adaptive control technique to control a set of IoT temperature systems subject to different failures has been discussed in [39]. Three mechanisms have been used for this purpose: a module for the data quality improvement, a state prediction module that predicts the future error and a PID controller. The authors in [38] made the design of a bank of local adaptive FTC agents to compensate some sensor faults in HVAC systems.

Fault-tolerant control techniques use an explicit model of the system under diagnosis. They can be passive or active models [40]. In general, all FTC approaches consist of two important stages: fault detection and identification and control system reconfiguration. *Passive FTC* techniques don't modify the parameters and the structure of the controller [41]. FTC techniques in the literature are interested only by active techniques. The use of passive FTC in building systems has not been given an adequate span of attention in the academia. Unlike, passive FTC methods, *active FTC* techniques are adaptive ones. The reaction to
system failure is in real time by reconstructing the control actions to attenuate or eliminating
the impact of such identified faults. They require fault diagnostic tools. In addition, they
can cope with a greater range of faults and variations in system behavior compared to
passive methods [42].

In the literature, numerous studies have developed various active FTC applications in buildings. For example, Ref. [43] exploits an approach that accommodated stuck damper vanes of the air handler. Ref. [44] investigates a supervisory fuzzy logic based FTC to characterize and correct fouling performance degradation faults for variable air volume (VAV) air-conditioning systems. Experimental results for an FTC algorithm for detecting and correcting sensor and damper faults in air-handling units (AHUs) are presented in [45].

Moreover, active FTC methods are distinguished from passive ones by the use of an FDI module and an online synthesis of a controller. Several methodologies for the design of fault accommodation strategies are proposed in the literature such as the method of pursuing a reference model [46], adaptive control [36], and many more. Most of the fault accommodation strategies have been developed for linear models. Some techniques mentioned above, such as model tracking methods, could be applied to nonlinear systems using the input/output nonlinear linearization control strategy. However, the nonlinear command remains difficult to implement in building systems.

2.2.3. New Challenges for Fault-Tolerant Control in Building Systems

The performance of the overall FDI/FTC system depends on many factors such as the availability of actuators and the fact that the sensors are always in good operation mode and that all the data are available [40]. However, on the one hand, data gaps i.e., missing data are the most important sensor fault types in buildings [47]. This is a challenge. On the other hand, the study in [48] concluded that typical faults in buildings consist of 13 types of faults and discussed the annual impact of each of them in terms of energy consumption. All the types of faults mentioned above are faults of the type “normal faults”, i.e., easy to reveal. In addition, there are other insidious types of faults. For example, the fact that there is no noise in the ventilation system does not imply no fault but that no fault has been revealed [49].

Many applications deal with a set of fault situations that are known in advance [50]. The design of the control law so that the side effects of a fault are compensated for is usually done by FTC control schemes seen previously. However, whatever the FTC control strategy (passive or active), its feasibility depends on the performance of the FDI diagnostic part of each fault [51,52]. Numerous studies on FTC control are conducted assuming the availability of the perfect FDI. This requires the availability of complete information about the system model, which is not the case. In a building system, model-based FDI techniques rely on analytical model, derived from a physical relation. In connection with buildings, it is really impossible to develop a complete physical-model matching accurately the reality for a whole building system. The various phenomenon like heat transfer from facade or unplanned occupancy are challenging jobs to model. Model-based diagnosis believes in behavioral constraints only and assumes them to be true in all circumstances. It assumes that the model represents the reality of building operation independently of the current context and any fault can be detected by measuring the physical variables and checking the consistency with a reference model. However, universally valid behavioral models i.e., valid whatever the context, are difficult to set up. Nevertheless, behavioral models always valid i.e., universal are difficult to set up. Erroneous all-context models might lead to invalid diagnoses [53]. According to [54], diagnosis reasoning must differ in different scenarios, e.g., fault detection and diagnosis approaches should be different for normal working days and a vacation period.
## 2.3. Power Quality and Real-Time Control

Power quality and reliability will be important factors in the transition towards the smart grid, since the power it generates should, according to the various national policies, meet the growing demand cleanly, reliably, sustainably and at a low cost [55].

In electric power systems, any deviation with respect to the theoretical sinusoidal waveform) is considered to perturb the power quality of the electrical grid. The deviation can be in any of the parameters of the wave: frequency, amplitude, waveform and symmetry between phases, and, depending on its degree and the sensitivity of the receptors, this perturbation may have a repercussion on other devices. Depending of the time scale of the perturbation, several classifications can be made, such as variations and events. While variations are continuously measured and evaluated, unpredictable events occur in general and require a trigger action to be measured. Important variations are: slow voltage changes, harmonics, flicker, and unbalance. Important events are rapid voltage changes, dips, swells, and interruptions. The power quality in the microgrid will be a result of the interaction between the main grid, the generator connected to the microgrid and the load fed by the microgrid. High penetration of renewable energy produces energy imbalances in the grid resulting in serious problems in power quality, such as, flickers, sags, variations in frequency, and voltage magnitude of the main grid. This fact is due to fluctuating systems and their inherent intermittency. This makes more precise requirements on the power balance control algorithm, from primary control to the operational planning necessary. This fact requires higher effectiveness in reference tracking for the electronic power associated with the ESS. Moreover, it is necessary to establish new control algorithms different from the classical PIPWM controllers that present a slow response and a long transient period until the references are reached. Frequency is related with the active power balance in the system. This is due to the fact that the employed generating technology is generally formed by a set of synchronous turbines (machine). At the instant when an increase in the demanded electric power is produced, the turbine torque is suddenly applied to the shaft, which will result in a decrease of the rotation speed and consequently, and also the frequency of the wave generated. Meanwhile, the effective voltage value is closely related to the excitation of the synchronous machine. That is, it can be seen that it is important for the active power control implemented through the turbine, while the control voltage is the excitation of the machine. This explains why both problems are studied in a decoupling problem, but in reality they are not at all, the latter being particularly important when producing transient phenomena.

An adequate quality supply provides the compatibility required among all the devices connected to the same grid. In traditional power systems, power quality in a node of the grid is associated with the short circuit power at that point of the grid. Under constant emission, higher short circuit power results in better voltage quality. The controllability of fossil-fuel power plants on which the centralized generation has been based, as well as the traditional lineal loads just cause low level power quality anomalies in comparison with short circuit power in the upstream network [55]. However, this scenario has been modified in recent years marking the transition to the smart grid with the introduction of distributed generators and electronic loads. Regardless of the scenario, power quality would be defined by the interaction between the generation equipment, the consumer devices, and the grid.

Microgrids will also be characterized by a high share of power-electronic devices that will increase harmonic levels and possibly cause instability as the result of interactions between controllers and resonances. MPC has several attractive features regarding its application to the PQR management of microgrids, since the controller can take into account the future behavior of the power inverter, despite its complex dynamics. The cost function can integrate multiple criteria, thus allowing the optimization of important parameters such as active and reactive power control, and the reduction of harmonics or ripple minimization. MPC-based controllers can easily handle the transition between islanded and grid-connected modes, achieving a faster response than that obtained by classical
PI-PWM controllers. This aspect may be crucial in the case of energy supply to critical loads. The MPC formulation as a Finite Control Set (FCS) does not imply a high computational cost, which is a relevant issue in the control problem of power inverters.

The PQR control of the microgrid is established in the secondary and primary control levels. The secondary control level is related to the global control of voltage and frequency in the microgrids, including the restoration of voltage/frequency during the transition to islanded mode or the re-synchronization with the main grid. The primary control directly applies to the power converters of the microgrid [12]. This section provides a review of the main contributions related to the application of MPC-controllers to the power quality enhancement in microgrids. The different advantages and disadvantages of each method are summarized in Table 1.

### 2.3.1. MPC for Power Converters

The field of MPC has been applied to power converters by employing two main control strategies: the FCS and the Continuous Control Set (CCS). The FCS is based on the finite number of switching states that a power inverter can adopt. The optimization problem is simplified by considering these possible switching states in order to predict the behavior of the converter. At each sampling instant, the set of admissible switching sequences is enumerated, the corresponding system response is predicted, the cost function is evaluated and the sequence that yields the minimal cost is consequently selected [56]. The CCS method sends continuous-time signals as control actions, which are sent to a modulator, and the optimization problem is solved analytically by making the derivative of the cost function equal to zero in the unconstrained case. Its main advantage is the use of longer control horizons, since an analytical solution is provided. Nevertheless, the complex topologies of power inverters make it difficult for this methodology to create an appropriate model of the plant, since higher computational resources are also necessary. A basic application of this kind of controllers can be found in [57].

The latest studies related to power quality enhancement with power inverters search the harmonic compensation using four-leg voltage source inverter topologies with active neutral control. In [58], an active power filter implemented with a four-leg voltage-source inverter (VSI) using an MPC scheme is presented for grid-connected applications. The paper presented in [59] applies a similar methodology in the new implementation of the finite control state set model predictive control (FS-MPC) applied to a three-level four-leg flying capacitor converter (FCC) operating as a shunt active power filter. The results obtained by the control algorithm improve the current tracking capability and transient response. However, the use of an FCS-MPC controller attains bad results in the THD content. In [60], a cascade-free fuzzy FCS-MPC is proposed for neutral point-clamped power inverters with a low switching frequency (SF). The main objective of the proposed method is to achieve a low SF operation. The cost function is formulated in order to reduce the SF, and a fuzzy logic control (FLC) technique is employed in order to choose the weighting factors in a dynamic manner. The paper presented in [61] proposes a new flexible reference current generation technique by using a tuning parameter to reduce the active power oscillation flexibly. The reference current generated comprises not only the positive and negative sequence currents but also lower order harmonic components. A flexible multi-frequency reference current computation technique for the unbalanced and distorted grid conditions is developed using MPC control techniques. The experimental and simulation results successfully validate the trade-off between the low frequency power oscillations and current THD, which is established using a tuning parameter. The proposed scheme, therefore, allows active power oscillations to be reduced in microgrid scenarios.

In [62], a composite selective harmonic elimination pulse-width modulation (SHE-PWM) and model predictive control (MPC) for seven-level hybrid-clamped (7L-HC) inverters is presented. The result attained by the proposed methodology is a low switching frequency, which has a good harmonic performance with a reduced computational burden. In [63], a strategy that combines FCS-MPC with a SHE modulation pattern in its
formulation is proposed in order to govern multilevel power converters. The proposed methodology is based on considering a desired operating point for the system state (con-verter current reference), and an associated predefined SHE voltage pattern is obtained as a necessary steady-state control input reference. The cost function is then formulated with the inclusion of both system state and control input references. The experimental results obtained have a fast dynamic response, while a predefined voltage and current spectrum with low switching frequency is achieved in steady-state.

In [64], a model predictive power control (MPPC) scheme and a model predictive voltage control (MPVC) scheme are presented. The proposed methodology consists of controlling the bidirectional buck-boost converters of the battery energy storage systems by using the MPPC algorithm as a basis. The fluctuating output from the renewable energy sources can be smoothed, while stable DC-bus voltages can be maintained as inputs to the inverters. The parallel inverters are controlled by using a combination of the MPVC scheme and the droop method to ensure stable AC voltage output and proper power sharing. The proposed method is simpler than the traditional cascade control and has a better performance, which is validated in simulation in MATLAB/Simulink and on a Real-Time Laboratory (RT-LAB) platform
<table><caption>**Table 1.** Application of MPC schemes for power quality enhancement.</caption><thead><tr><td>Method</td><td>Objective</td><td>Validation</td><td>Main Contributions</td><td>Limitations</td><td>Ref</td></tr></thead><tbody><tr><td>FCS MPC</td><td>Active power filter with harmonics</td><td>Laboratory Test Bench</td><td>The use of a four-leg voltage inverter allows the compensation of current harmonic components and unbalanced current in the microgrid</td><td>Steady state error if the model is not accurate</td><td>[58–61]</td></tr><tr><td>SHE MPC</td><td>Voltage control with nonlinear and unbalanced loads</td><td>Laboratory Test Bench</td><td>Composite strategy that combines SHE-PWM and MPC, which uses the SHE-PWM in the modulation part to generate the real-time output voltage level, capacitor voltage balancing and switching frequency control</td><td>Complexity of the power inverter topology. Transition between islanded and connected mode</td><td>[62]</td></tr><tr><td>FCS MPC SHE</td><td>To track the converter output current reference in transients, while preserving the SHE voltage pattern in steady-state</td><td>Laboratory Test Bench</td><td>A fast dynamic response is obtained throughout transients, while a predefined voltage and current spectrum with a low switching frequency is achieved in steady-state</td><td>Transition between islanded and grid-connected mode</td><td>[63]</td></tr><tr><td>GPC+SP</td><td>To restore frequency in islanded mode</td><td>Simulation</td><td>Faster speed with fewer oscillations</td><td>Slower dynamic performance</td><td>[65]</td></tr><tr><td>Hybrid MPC</td><td>Active Power Sharing in Grid-Connected Mode</td><td>Laboratory Test Bench</td><td>Including economic operation of a hybrid ESS</td><td>Reactive Power Balance is not included</td><td>[66]</td></tr><tr><td>Fuzzy Adaptive MPC</td><td>Load frequency for an isolated microgrid</td><td>Simulation</td><td>Faster response with damped oscillations</td><td>Stability of the controller is not guaranteed</td><td>[67]</td></tr></tbody></table>
<table><caption>Table 1. *Cont.*</caption><thead><tr><td>Method</td><td>Objective</td><td>Validation</td><td>Main Contributions</td><td>Limitations</td><td>Ref</td></tr></thead><tbody><tr><td>DMPC</td><td>Secondary Voltage Control</td><td>Simulation</td><td>Distributed Voltage and Frequency Restoration in Autonomous Microgrids</td><td>Transient response subject to proportional integral terms</td><td>[68]</td></tr><tr><td>Fuzzy MPC</td><td>Microgrid Frequency Stabilization</td><td>Simulation</td><td>Stabilization of the microgrid frequency through the incorporation of a virtual inertia system based on MPC</td><td>Instability owing to fuzzy component of the controller</td><td>[69]</td></tr><tr><td>DMPC</td><td>Voltage and Frequency Regulation</td><td>Laboratory Test Bench</td><td>Compensation of the communication issues. Consensus as to the active and reactive shared power</td><td>Slower Dynamic owing to inclusion of communication</td><td>[70]</td></tr></tbody></table>
### 2.3.2. MPC for Voltage and Frequency Regulation

Microgrids consist of multiple parallel-connected distributed generators, storage devices, or controllable loads that are able to operate in both grid-connected and islanded modes, in a coordinate mode. In islanded mode, it is necessary to maintain system stability and power quality among the multiple parallel interconnected devices. Deficit balances in the active and reactive power between the different components of the microgrids owing to several aspects, such as the influence of impedance mismatch of the feeders and the different ratings of the distributed units, can lead to poor power quality indexes, which can damage the devices connected to same microgrid AC/DC bus. In connected mode, imbalances in the active/reactive power can affect the schedule carried out with the main grid in the tertiary control.

The increasing presence of nonlinear loads and unbalanced loads could further affect the global power balance in the microgrid. Secondary control levels based on different methodologies, such as enhanced droop-control, network-based control methods, improved hierarchical control approaches based on graph theory, multi-agent system, gain scheduling methods, etc., have, therefore, been proposed. Several references that propose MPC-based controllers applied to voltage and frequency regulation problems in microgrids can be found in existing literature. In [65], an MPC-based controller and a Smith predictor (SP) based controller are applied to the secondary level of the microgrid. The results of this work prove that the proposed methodology enables nominal frequency values to be attained faster, but with fewer oscillations during load variations. The MPC-controller with the SP additionally solves the problems caused by communication delays.

The authors of [66] propose a secondary control level linked to the schedule carried out in the tertiary control level of the microgrid. The microgrid includes a hybrid ESS, and the different operational issues of each of the ESS technologies are also included in order to carry out the real-time power balance of the microgrid. In [67], a fuzzy adaptive model predictive approach for the load frequency control of an isolated microgrid is proposed. The frequency deviation problem is solved by employing a centralized MPC, which is made adaptable by dynamically adjusting its parameters using a fuzzy controller.

In [68], a distributed secondary control scheme is proposed for both voltage and frequency control in autonomous microgrids. The algorithm incorporates predictive mechanisms into distributed generations, while the secondary voltage control is converted into a tracker consensus problem of distributed model predictive control, in which the synchronous convergence procedure for voltage magnitudes to the reference value is drastically accelerated at a low communication cost.

In [69], a virtual inertia control-based MPC for the microgrid frequency stabilization of a system for microgrids is developed. The proposed MPC-based virtual inertia control is tested for several mismatched parameters of the microgrid, wind power, and load disturbances. The proposed MPC-based virtual inertia control is able to reduce and stabilize the frequency deviation of the microgrid and provides robustness to the system subjected to uncertainties and disturbances to the fuzzy logic and conventional virtual inertia systems, thus enhancing the stability and resiliency of the microgrid.

The authors of [70] present a DMPC-based strategy with which to regulate the frequency and average voltage, thereby achieving real and reactive power consensus in the microgrid. The proposed methodology is based on the droop, power transfer, and phase angle equations used to solve the DMPC. The formulation includes explicit operational constraints to ensure the operation of the microgrid within feasible ranges. The controller is also able to modify its adjacency matrix in response to either electrical or communication disturbances. The simulations and experimental tests performed show that the use of the proposed controller makes it possible to attain the regulation and consensus objectives, thus satisfying the operational constraints. The results presented improve the behavior of the microgrid when confronted with electrical disturbances, such as load changes or the disconnection/reconnection of distributed generators, and communication issues, such as latency and data packet losses.
## 2.4. Microgrid Connected Building Comfort Management Systems

Global warming and subsequent climate change have been a strong motivation to reduce overall energy consumption and thus curtail the use of fossil fuels. At the European level, 40% of the energy is consumed by the commercial and noncommercial buildings to serve the functions and comfort of the residing occupants [71]. Consequently, phenomenal research has been contributed to achieve nearly zero energy buildings (nZEB) i.e., buildings or districts joined to smart microgrids incorporating renewable energy sources and storage [72]. These microgrids may or may not be connected to the main utility grid. Over the last few decades, researchers have investigated the goal of optimal operation of the microgrids through a variety of control methodologies to ensure minimum energy consumption while maintaining the comfort of the occupants in the buildings. Among these methodologies, MPC has been most favored technique, thanks to its inherent advantages and flexibility. Equation (1) represents a simplified MPC optimization problem structure commonly seen in the literature. The cost function concerning (i) HVAC energy consumption ($J_{HVAC}$), (ii) utility grid pricing and tariffs ($J_{cost}$), (iii) maintenance and operational costs of the distributed energy resources (DERs) like photovoltaic (PV) panels, wind turbines ($J_{DER}$) coupled with energy storage systems (ESS) ($J_{ESS}$) is minimized with subject to the constraints accounting for (i) the thermal dynamics of the building ($f_{HVAC}$), (ii) thermal dynamics of DERs ($f_{DER}$) and ESS ($f_{ESS}$), and essentially (iii) the occupants' comfort bounds. Note that $N$ is the finite horizon that can range from hours, days, or months [73]. Depending on the nature of the cost functions, system dynamics and involved variables, strategies like Stochastic MPC, Deterministic MPC, and even Hierarchical MPC have been implemented and verified on various platforms achieving economical operations of the microgrids [74–78].

$$ 
\begin{array}{ll}
\underset{U^*}{\text{minimize}} & J_{HVAC} + J_{DER} + J_{ESS} + J_{cost} \\
\text{subject to:} & \\
& f_{HVAC}(k+j) = 0 \qquad j = 0, \dots, N-1 \\
& f_{DERmin} \le f_{DER}(k+j) \le f_{DERmax} \qquad j = 0, \dots, N-1 \\
& f_{ESSmin} \le f_{ESS}(k+j) \le f_{ESSmax} \qquad j = 0, \dots, N-1 \\
& f_{costmin} \le f_{cost}(k+j) \le f_{costmax} \qquad j = 0, \dots, N-1
\end{array}
\quad (1) $$

Figure 5 depicts the general notion of the microgrid-HVAC building control framework. As the term suggests, the centralized MPC controller gathers the information from the system components and computes an optimal demand management schedule with appropriate DERs setpoints to attain the energy saving and building comfort [79,80], as illustrated in Equation (1). Despite its simplicity, the centralized control architecture imposes several problems as it offers limited scalability, higher computational burden for single platform and being detrimental in the case of fault occurrence. Hence, several studies propose the use of theoretically mature hierarchical control frameworks where a master (upper) controller generates set-points for the slave (lower) controllers (Figure 5) and thus information among the controllers is exchanged [76,81]; in other words, the optimization problem from Equation (1) is decomposed into sub-problems to reach the optimal solution. Moreover, Ref. [74] have extended the analysis to the goal oriented controller coordination as energy efficient and cost efficient depending on the temporal data exchange among the controllers.

The availability of accurate and detailed models of microgrids and buildings is one of the critical requirements of the MPC technology. On that account, several authors have emphasized the use of tools like TRNSYS, EnergyPlus, and GridMat simulation platforms that offer reliable simulation for long horizons and large-scale complexities [76,82]. However, some articles favor the physics based modeling of the buildings and microgrid components as it provides more access and visibility of the system parameters [75,83]. Inspired by the recent developments in data science, Ref. [84] has employed data driven techniques for the modeling of the occupancy estimation. Determined by the nature of the models and
constraints, mixed integers linear programming (MILP) [73,85] or nonlinear programming (NLP) [86,87] optimization methods have been exploited in the literature. The HVAC Building system has significant influence on the disturbances on its dynamics. These disturbances majorly comprise occupancy behavior and the weather forecast. Refs. [73,76] account for the occupancy schedule and activity, based on which the control strategy commands to maintain thermal comfort in Fanger index, pre-cooling, or pre-heating action to avoid peaks of discomfort, in order to modulate HVAC action resulting in energy peak shaving and smooth battery performances. Similarly, to tackle weather forecast errors, authors in [88] have approximated forecast error into piecewise linear form in the MPC formulation. Considering the weather measurements or forecast models is common practice in the literature making the control structure more robust towards its disturbances.

<figure><img src="image_8.png" /><figcaption>**Figure 5.** General controller architecture for HVAC buildings integrated with microgrid technology.</figcaption></figure>

Research on control strategies applied on microgrids joined to residential and commercial buildings has a long tradition; however, other nontraditional infrastructure applications have also been studied. Ref. [89] demonstrated MPC strategy on its microgrid system coupled with the marina of Ballen similarly [85] for the application of greenhouse and Ref. [90] has explored the possibility of subways integrated with a smart microgrid and its optimal performance.

A closer look at the literature of control architecture applied to buildings integrated with microgrids, however, reveals a number of gaps. In Table 2, a summary of the main references in this research field is analyzed. Consideration of more versatile microgrid systems, large-scale, and diverse building structures may provoke the practice of other control techniques like distributed, decentralized strategies. However, a great percentage of papers consider a variety of disturbances, but the deployment of robust control strategies for the same is rarely seen. Moreover, most of the results have been carried out on simulation platforms, and their real-time implementation on the existing building infrastructure can galvanize the market for new products progressing towards a more environmentally friendly ecosystem.
<table><caption>**Table 2.** MPC schemes applied to HVAC Buildings Comfort Systems integrated with microgrids.</caption><thead><tr><td>Configuration</td><td>Main Contributions</td><td>Limitations</td><td>Ref</td></tr></thead><tbody><tr><td>Island system with PV, batteries and residential buildings</td><td>Considers nonlinearity of the system dynamics, ensures the smooth operation of the storage system</td><td>Computational complexity may increase exponentially</td><td>[80]<br>[79]</td></tr><tr><td>PV, Utility grid and building infrastructure</td><td>Variety of infrastructure options have been explored, integration with the main utility grid and consideration of prices and tariffs</td><td>Limited in the configuration as only PV system is considered</td><td>[65]</td></tr><tr><td>PV, wind turbines, electric battery and buildings</td><td>Demand management to smooth the battery operation and utmost energy saving, consideration of occupancy schedule</td><td>Occupant activity may also affect thermal comfort, weather data are presumed and curtailed to specific season</td><td>[76]</td></tr><tr><td>PV, electric battery, and buildings</td><td>Weather forecast error is considered in the dynamics of PV operation</td><td>Dedicated robust MPC techniques may aid weather consideration in the building dynamics and controller dynamics as well</td><td>[88]</td></tr><tr><td>PV, chiller, electric battery, and buildings</td><td>Hierarchical control architecture is explored, local optimization at the building level eliminated the need of the data transfer and resulting further data protection</td><td>Coupling in the local optimization problems is ignored and may not cater for a global optimal solution</td><td>[81]</td></tr><tr><td>Combined heat production (CHP), electric storage and buildings</td><td>Solution for day-ahead real-time scheduling, price forecasting through stochastic optimization</td><td>Occupancy behavior and weather forecast errors are ignored, the proposed architecture may be complex for a large number of building infrastructures</td><td>[87]</td></tr><tr><td>Fuel cell, Diesel generator, electric storage, and buildings</td><td>Multi-scale MPC: i) day-ahead scheduling for building energy management ii) inter-hour MPC to smoothen DER fluctuations</td><td>Short term forecasting may affect the scheduling drastically, as two optimization problems are solved simultaneously and data are exchanged, the process delays can affect the performance</td><td>[77]</td></tr></tbody></table>

## 2.5. Combined Cooling, Heating, and Power Microgrids

In buildings, the management of heating, cooling and power energy services is characterized by the existence of significant coupling effects. One the one hand, the use of electric appliances in buildings always generates internal heating gains (due to the heat losses generated by the power conversion in the appliances), which helps to reduce heating needs in winter or increases cooling needs in summers. On the other hand, in many buildings, heating and cooling loads are fully generated by electrical systems or require at least some electrical support systems (fans, pumps, etc). Therefore, to optimize the management of heating and cooling systems, it is necessary to include in the control systems information about these complex interactions, and the use of an MPC approach enables the use of complex physical models that accurately describe all coupling effects. In this way, over the last few years, the use of MPC strategies to manage the generation of power, heating and
cooling in an integrated way has been gaining attention. The applications are usually at the building level, but applications with multiple buildings in district heating networks have also been addressed. We now present some of the most recent applications found in the literature that not only cope with the interaction between these services, but also include the management of renewable generation plants, storage and the interaction with the market.

Pombeiro et al. [91] proposed an MPC optimization framework to control the heating, ventilation, and air conditioning (HVAC) system in an experimental setting in a Lisbon university building that maximizes user comfort while minimizing costs, constrained to: thermal comfort; variable electricity price; and available electricity in batteries that are charged by a PV system. The algorithm model used a simplified thermal model of the room or an EnergyPlus and the optimization algorithm was genetic algorithm or dynamic programming.

Zhao et al. [92] developed an MPC-based strategy using a nonlinear programming (NLP) algorithm to optimize the scheduling of the energy systems under day-ahead electricity pricing. The distributed power generation in a Hong Kong Zero Carbon Building consisted of a combined cooling and power system and a photovoltaic (PV) system and a stratified chilled water storage tank introduced as the thermal energy storage.

More recently, Zhang et al. [93] proposed a stochastic MPC for a CHP microgrid using mix-integer linear programming. The CHP microgrid consisted of fuel cell based CHP, wind turbines, PV generators, battery/thermal energy storage system (BESS/TESS), gas fired boilers, and various types of electrical and thermal loads scheduled according to the demand response policy. An MILP based energy management model with uncertainty variables represented by typical scenarios was developed to coordinate the operation of the electrical subsystem and thermal subsystem. The simulation results show that the MPC approach was more efficient than an open loop based stochastic day-ahead programming (S-DA) strategy or a pure MPC strategy.

Verrilli et al. [94] focused on the design of an MPC framework that reduces the operating and maintenance cost in a District-Heating Power Plant DHPP at Ylivieska, Finland considering thermal energy storage (TES) and flexible loads. The MPC accomplished this by forecasting the demand and solving a mix-integer linear programming problem that minimized the cost by scheduling boilers, TES units, and flexible loads. The use of a receding horizon approach enhances the robustness to the forecast errors.

The aforementioned applications demonstrate that MPC is the state-of-the-art approach for an integrated management system at the building level. The type of model is usually a nonlinear physical model of the heating, cooling, and power loads (such as ventilation or lighting); the control strategy requires the use of a nonlinear optimization; the cost function can be cost minimization and/or comfort maximization and allow the exploration of the flexibility provided by the storage systems but also by the buildings' thermal inertia. The forecasting of the renewable resources and the loads can be easily complemented with the incorporation of artificial intelligence techniques [95].

## 2.6. *MPC for Interconnected Microgrids*

As a consequence of the increased penetration of integrated renewable generation such as wind and solar photovoltaic energy as well as energy marketing, EMSs are undergoing changes to adapt to these new challenges. The evolution of isolated self-consumption networks towards the interconnection of networks is being focused on the optimization of energy flows that may be demanded or offered by the microgrids that integrate the network.

With the objective of relaxing computational constraints, current control systems have been shifted from centralized control systems to distributed approaches [96]. In centralized control systems, optimization is carried out globally for all members that make up the network. It requires a costly and critical central control architecture. Control devices and communication channels are also critical points in this approach. In contrast, in a decentralized control system, each member undertakes a local optimization, increasing
communication speed and fault tolerance. Unilateral decisions by operators can affect the performance of the electricity grid locally, but do not directly affect global behavior. The distributed architecture aims to be an appropriate EMS for a large-scale microgrid community (MGC).

According to Figure 2, the power flow management and the economic optimization between interacting microgrids are undertaken on the tertiary level. This level will be responsible for achieving optimal interactions between the agents that make up the network.

Table 3 describes a set of motivating applications where different techniques have been used to develop networked microgrids. The work of [96] shows a comparison between decentralized, centralized, and hierarchical-distributed MPC approaches for a group of interconnected home-microgrids. The distributed approach improved the power profiles compared to the decentralized strategy.

<table><caption>**Table 3.** Application of MPC schemes for interconnected microgrids</caption><thead><tr><th>Method</th><th>Controller Validation</th><th>Main Contributions</th><th>Limitations</th><th>Ref</th></tr></thead><tbody><tr><td>Comparison</td><td>Simulation</td><td>Decentralized, Centralized and Distributed approaches.</td><td>Trade-off among local balancing and storage losses and scalability</td><td>[96]</td></tr><tr><td>Centralized</td><td></td><td></td><td></td><td></td></tr><tr><td>MPC</td><td>Simulation</td><td>Nonlinear optimization.</td><td></td><td>[97]</td></tr><tr><td>Economic MPC</td><td>Simulation</td><td>Flexible formulation, Integer programming, Fault accommodation.</td><td></td><td>[98]</td></tr><tr><td>Stochastic MPC</td><td>Laboratory-scaled</td><td>Use of Gaussian Processes to improve the forecasting of renewable resources.</td><td>Computationally expensive</td><td>[99]</td></tr><tr><td>Distributed</td><td></td><td></td><td></td><td></td></tr><tr><td>Lagrange Multipliers DMPC</td><td>Simulation</td><td>Setting of a framework to model large-scale microgrids.</td><td>Scalability</td><td>[100]</td></tr><tr><td>Cooperative logarithmic-barrier method</td><td>Experimental</td><td>Optimal results in an iterative method.</td><td>Iterative Computational load</td><td>[101]</td></tr><tr><td>Stochastic DMPC</td><td>Simulation</td><td>Resilient approach and fault accommodation.</td><td></td><td>[102]</td></tr><tr><td>Hierarchical DMPC</td><td>Simulation</td><td>Hierarchical approach using MILP.</td><td>Number of integer variables</td><td>[103]</td></tr></tbody></table>

In the centralized context, the work of [97] applies an MPC on a group of interconnected microgrids with the main grid maximizing the benefits for all the agents and using nonlinear models. From an economical point of view, the work proposed in [98] describes an MPC methodology for energy regulation among microgrids with an internal electric market. It minimizes the deviations due to renewable resources and failures. Another contribution to centralized schemes is the proposal described in [99] where Gaussian Processes are used to predict solar PV generation and load demands. For that, data from nearby microgrids are additionally considered. Forecasts are more accurate compared to locally made predictions.

From the point of view of Distributed MPC (DMPC), there are many contributions to be highlighted. The formulation presented in [100] sets an integrated framework to model, simulate, and optimize large-scale networks based on Lagrange multipliers. The hub networking concept is introduced here. The work of [101] proposes an EMS optimization based on the cooperative logarithmic-barrier method to iterate achieving optimal results
similar to centralized MPC on an experimental setup. The work proposed in [102] presents a resilient DMPC approach with respect to the noncompliance of some microgrids using stochastic models. In addition, active mechanisms are incorporated to disconnect microgrids in case of hard discrepancies. Another cooperative framework is presented in [103] where urban districts share certain distributed energy resources. The hierarchical structure uses MPC in both levels with integer programming. An aggregator is added to the control scheme to coordinate and optimize the cost and use of resources. A distributed DMPC framework, suitable for controlling large-scale networked systems such as power systems, is presented in [78]. The overall system is decomposed into subsystems, each with its own MPC controller. These subsystem-based MPCs work iteratively and cooperatively towards satisfying system wide control objectives. The proposed DMPC framework achieves performance equivalent to centralized MPC.

### 3. Challenges and Future Perspectives

As discussed throughout this review paper, MPC presents many features that could introduce enhancement in the hierarchical control of microgrids. Nevertheless, several challenges and limitations exist that could degrade its feasibility, performance, and scalability.

#### 3.1. MPC Challenges in General Terms to Provide Solutions for Microgrids

MPC is mainly based on a model; nevertheless, MPC cannot describe unstable systems and originally had difficulty recognizing online models. The complexity of MPC controllers for the large-scale interconnection of microgrids with feasibility criteria for their required execution time is still a non-solved issue. The performance of MPC controllers decreases with the complexity of the number of variables included in the cost functions, it being difficult to guarantee stability and feasibility criteria. Thus, some of those algorithms are likely to remain theoretical. Actual applications are complicated and difficult to achieve. Moreover, due to the complexity of real systems, more hardware, better optimization algorithms, and the expansion of the control law of MIMO systems and nonlinear processes are very important. Large systems of interconnected microgrids must reduce computation times and now incorporate distributed MPC and hierarchical MPC. In the future, the latest schemes, such as explicit MPC and stochastic MPC, could be used as well. For dynamic systems such as power electronic systems, dynamic models can be researched in the future. The optimization of large-scale-interconnected microgrids can be combined with more complex models, as well as control schemes for building comfort should consider more interferences in the future. Overall, the state of MPC use in microgrids can be summarized in three respects. First, the application of MPC in microgrids will have to evolve towards rapid online computation. Control architectures where the techniques of machine learning, deep learning, or reinforcement learning should be combined with MPC controllers in order to achieve better computation time for higher complexity control problems related to microgrids. Second, some of the latest MPC technologies, such as hybrid MPC, stochastic MPC, and distributed MPC are satisfactorily being applied to areas of microgrids. Third, many MPC methods for power quality or real-time control will require the improvement of embedded MPC techniques or an advance in available control platform for these kinds of applications.

#### 3.2. MPC and the Introduction of Microgrids in Electric Markets

Microgrids will evolve introducing different power-to-X technologies. The formulation of this kind of system will be an important goal in the future developments of MPC-controllers for microgrids. The development MPC controller with a joint optimization for active and reactive power in the microgrids is also an issue which still requires development. Aspects such as the integration of network constraints or including congestion management in the PCC with the main grid is also a research line to be explored.
### 3.3. MPC and Fault-Tolerant Control in Microgrids

Stability is highly important for microgrids, especially operating in autonomous operation. Thus, far, the stability analysis including recent techniques such as tube-based MPC controllers is an important field to be developed.

### 3.4. MPC and Power Quality for Microgrids

The biggest challenge in the future may be the trade-off between computing time, performance level, and economic cost. It is very difficult to reduce calculation time and cost without affecting performance. This aspect is even critical in the secondary and primary control level of microgrids where real-time controllers have to be implemented. Regarding the primary control level, aspects such as the behaviour of the internal components of such power inverters changing due to operational factors such as temperature, and solving the steady state error, are still questions to be solved in the application of MPC-controllers.

### 3.5. MPC and Networked Microgrids

Currently, networked microgrids are being researched endowing an ability to decide when and how to exchange power in order to optimize energy flows. New methodologies have been developed to provide flexibility measures, such as fast-acting supply, demand response, and energy storage services [104], that even enable aggregators of consumers to participate in electricity markets. In this sense, Blockchain [105] was created with the aim of meeting the optimization needs of decentralized schemes and the digitization of the market. The main objective of blockchain is to eliminate intermediary agents and replace them with a distributed network of digital users. These users verify the transactions executed and ensure the security and integrity of the transactions. Unlike centralized systems, each node owns a copy of the ledger or has access to it in the cloud. Therefore, anyone on the network could access the historical record of transactions and verify their validity, resulting in a high level of transparency. The transaction validation mechanisms are known as consensus algorithms. A blockchain-based platform consists mostly of a distributed ledger, a decentralized consensus mechanism, and cryptographic security measures. In addition, blockchains allow for the automated execution of smart contracts in peer-to-peer (P2P) networks [106].

Taking into account the previous properties that characterize blockchain methodologies, it can be considered that the optimization of interconnected microgrids is a direct application of that. Proof of this is the bibliography dedicated to it [107] and in general to energy networks [105] and Internet of Things (IoT) [108,109]. Note that blockchain does not only provide a feasible distributed implementation but also involves a safe framework for development. See, for example, [110] where a novel permissioned energy blockchain system is introduced to allow secure energy delivery services for EVs and energy nodes through the use of distributed ledgers and cryptocurrency.

To the best knowledge of the authors, there are no blockchain-based microgrid applications that use an MPC in the optimization. However, blockchain methodologies that consider the principles of MPC in consensus algorithms are expected to be developed in the very near future.

## 4. Conclusions

This review has been focused on carrying out an analysis of the current development of MPC strategies to develop final-use applications and functionalities in microgrids. Classical MPC mainly solves multivariable constraint control problems. However, this method is not suitable for nonlinear, stochastic, and large-scale interconnected systems. To solve MPC-problems with logic and continuous variables, the hybrid MPC formulation can be used. Piecewise approaches based on a hybrid MPC formulation can be applied to include nonlinearities in the plant predictive model. Recent formulations of MPC controllers include a stochastic formulation which allows the inclusion of uncertainties on the control problem associated with renewable energy and loads, enhancing the resilience of this
kind of systems. Distributed approaches have been satisfactorily applied to large-scale interconnected microgrids, reducing the required computation time through the use of decentralized or distributed approaches. In addition, recently, MPC controllers using FCS or CCS approaches are being applied as a powerful tool to improve the power quality in microgrids. MPC methods are continually evolving to solve the most complex problems that the industry and technology need to control. Thus, it is expected that the field of MPC-controllers will continue to provide solutions to face the problem that the promising introduction of microgrids in the future smart grids brings with it.

**Author Contributions:** Conceptualization, All; methodology, All; software, None; validation, None; formal analysis, All; investigation, All; resources, All; data curation, All; writing—original draft preparation, All; writing—review and editing, All; visualization, All; supervision, All; project administration, All; funding acquisition, All. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was partially funded by European Commission with the European Regional Development Funds (ERDF) under the program Interreg SUDOE SOE3/P3/E0901 (Project IMPROVEMENT) and with the financial support by Spanish Ministry of Science and Innovation under grant PID2019-104149RB-100 (Project SAFEMPC).

**Acknowledgments:** The authors acknowledge the support given by their affiliation entities: National Center of Hydrogen (CNH2) and University of Seville, in Spain, University of Perpignan Via Domotia, in France and Laboratorio Nacional de Energia e Geologia (LNEG) and Technical University of Lisbon, in Portugal for the support to carry out this study.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

**Abbreviations**

The following abbreviations are used in this manuscript:

CCS Continuous Control Set

DER Distributed Energy Resources

DMPC Distributed Model Predictive Control

DSM Demand Side Management

DSO Distribution System Operator

DR Demand Response

ESS Energy Storage System

FCS Finite Control State

GPC Generalized Predictive Control

HVAC Heating, Ventilation, and Air Conditioning

MPC Model Predictive Control

MO Market Operator

nZEB nearly Zero Energy Building

PQR Power Quality and Reliability

RES Renewable Energy System

SHE Selective Harmonic Elimination

SMPC Stochastic Model Predictive Control

SP Smith Predictor

TSO Transmission System Operator

VSI Voltage Source Inverter

ZEB Zero Energy Building
## References

1. Marnay, C.; Chatzivasileiadis, S.; Abbey, C.; Iravani, R.; Joos, G.; Lombardi, P.; Mancarella, P.; von Appen, J. Microgrid evolution roadmap. In Proceedings of the 2015 International Symposium on Smart Electric Distribution Systems and technologies (EDST), Vienna, Austria, 8–11 September 2015; pp. 139–144.

2. Morstyn, T.; Hredzak, B.; Agelidis, V.G. Control strategies for microgrids with distributed energy storage systems: An overview. *IEEE Trans. Smart Grid* **2016**, *9*, 3652–3666. [CrossRef]

3. Minchala-Avila, L.I.; Garza-Castañón, L.E.; Vargas-Martínez, A.; Zhang, Y. A review of optimal control techniques applied to the energy management and control of microgrids. *Procedia Comput. Sci.* **2015**, *52*, 780–787. [CrossRef]

4. Roslan, M.; Hannan, M.; Ker, P.J.; Uddin, M. Microgrid control methods toward achieving sustainable energy management. *Appl. Energy* **2019**, *240*, 583–607. [CrossRef]

5. Han, Y.; Li, H.; Shen, P.; Coelho, E.A.A.; Guerrero, J.M. Review of active and reactive power sharing strategies in hierarchical controlled microgrids. *IEEE Trans. Power Electron.* **2016**, *32*, 2427–2451. [CrossRef]

6. Nejabatkhah, F.; Li, Y.W.; Tian, H. Power quality control of smart hybrid AC/DC microgrids: An overview. *IEEE Access* **2019**, *7*, 52295–52318. [CrossRef]

7. Ahmed, M.; Meegahapola, L.; Vahidnia, A.; Datta, M. Stability and Control Aspects of Microgrid Architectures—A Comprehensive Review. *IEEE Access* **2020**, *8*, 144730–144766. [CrossRef]

8. Espín-Sarzosa, D.; Palma-Behnke, R.; Núñez-Mata, O. Energy management systems for microgrids: Main existing trends in centralized control architectures. *Energies* **2020**, *13*, 547. [CrossRef]

9. Hussain, A.; Bui, V.H.; Kim, H.M. Microgrids as a resilience resource and strategies used by microgrids for enhancing resilience. *Appl. Energy* **2019**, *240*, 56–72. [CrossRef]

10. Yamashita, D.Y.; Vechiu, I.; Gaubert, J.P. A review of hierarchical control for building microgrids. *Renew. Sustain. Energy Rev.* **2020**, *118*, 109523. [CrossRef]

11. Villalón, A.; Rivera, M.; Salgueiro, Y.; Muñoz, J.; Dragičević, T.; Blaabjerg, F. Predictive Control for Microgrid Applications: A Review Study. *Energies* **2020**, *13*, 2454. [CrossRef]

12. Bordons, C.; Garcia-Torres, F.; Ridao, M.A. *Model Predictive Control of Microgrids*; Springer: Cham, Switzerland, 2020.

13. Vasilakis, A.; Zafeiratou, I.; Lagos, D.; Hatziargyriou, N. The Evolution of Research in Microgrids Control. *IEEE Open Access J. Power Energy* **2020**, *7*. [CrossRef]

14. Babayomi, O.; Li, Z.; Zhang, Z.; Sun, Y.; Dragicevic, T.; Rodriguez, J. The Role of Model Predictive Control in Microgrid Power Quality-A Survey. In Proceedings of the 2020 IEEE 11th International Symposium on Power Electronics for Distributed Generation Systems (PEDG), Dubrovnik, Croatia, 28 September–1 October 2020; pp. 340–345.

15. Camacho, E.F.; Bordons, C. *Model Predictive Control*; Springer Science & Business Media: Berlin, Germany, 2013.

16. Vasquez, J.C.; Guerrero, J.M.; Miret, J.; Castilla, M.; De Vicuna, L.G. Hierarchical control of intelligent microgrids. *IEEE Ind. Electron. Mag.* **2010**, *4*, 23–29. [CrossRef]

17. Parliament, E. PE/55/2018/REV/1. OJ L 328, 21.12.2018, p. 1–77. (EUR-Lex-32018R1999-EN-EUR-Lex (europa.eu)). 2018. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?toc=OJ:L:2018:328:TOC&uri=uriserv:OJ.L_.2018.328.01.0001.01.ENG (accessed on 23 December 2020).

18. Holttinen, H.; Kiviluoma, J.; Flynn, D.; Smith, C.; Orths, A.; Eriksen, P.B.; Cutululis, N.A.; Soder, L.; Korpas, M.; Estanqueiro, A.; et al. System impact studies for near 100% renewable energy systems dominated by inverter based variable generation. *IEEE Trans. Power Syst.* **2020**. [CrossRef]

19. Hodge, B.M.S.; Jain, H.; Brancucci, C.; Seo, G.S.; Korpås, M.; Kiviluoma, J.; Holttinen, H.; Smith, J.C.; Orths, A.; Estanqueiro, A.; et al. Addressing technical challenges in 100% variable inverter-based renewable energy power systems. *Wiley Interdiscip. Rev. Energy Environ.* **2020**, *9*, e376. [CrossRef]

20. Grunewald, P.; Diakonova, M. Flexibility, dynamism and diversity in energy supply and demand: A critical review. *Energy Res. Soc. Sci.* **2018**, *38*, 58–66. [CrossRef]

21. Lannoye, E.; Flynn, D.; O'Malley, M. Evaluation of power system flexibility. *IEEE Trans. Power Syst.* **2012**, *27*, 922–931. [CrossRef]

22. Heggarty, T.; Bourmaud, J.Y.; Girard, R.; Kariniotakis, G. Quantifying power system flexibility provision. *Appl. Energy* **2020**, *279*, 115852. [CrossRef]

23. Lu, X.; Li, K.; Xu, H.; Wang, F.; Zhou, Z.; Zhang, Y. Fundamentals and business model for resource aggregator of demand response in electricity markets. *Energy* **2020**, *204*, 117885. [CrossRef]

24. Pasetti, M.; Rinaldi, S.; Manerba, D. A virtual power plant architecture for the demand-side management of smart prosumers. *Appl. Sci.* **2018**, *8*, 432. [CrossRef]

25. Majzoobi, A.; Khodaei, A. Application of microgrids in providing ancillary services to the utility grid. *Energy* **2017**, *123*, 555–563. [CrossRef]

26. Mengelkamp, E.; Notheisen, B.; Beer, C.; Dauer, D.; Weinhardt, C. A blockchain-based smart grid: Towards sustainable local energy markets. *Comput. Sci. Res. Dev.* **2018**, *33*, 207–214. [CrossRef]

27. Christidis, K.; Sikeridis, D.; Wang, Y.; Devetsikiotis, M. A framework for designing and evaluating realistic blockchain-based local energy markets. *Appl. Energy* **2021**, *281*, 115963. [CrossRef]

28. Project, T. TradeRES—New Market Model for 100 % Renewable Power Systems. 2020. Available online: https://www.lneg.pt/en/project/traderesnew-markets-design-models-for-100-renewable-power-systems/ (accessed on 29 December 2020).
29. Shao, C.; Ding, Y.; Siano, P.; Lin, Z. A framework for incorporating demand response of smart buildings into the integrated heat and electricity energy system. *IEEE Trans. Ind. Electron.* **2017**, *66*, 1465–1475. [CrossRef]

30. Jarrou, A. Diagnostic de Défauts et Commande Tolérante Aux Défauts des Systèmes à Énergie Renouvelable. Ph.D. Thesis, Université de Lorraine, Nancy, France, 2020.

31. Thenozhi, S.; Yu, W. Stability analysis of active vibration control of building structures using PD/PID control. *Eng. Struct.* **2014**, *81*, 208–218. [CrossRef]

32. Marrasso, E.; Roselli, C.; Sasso, M.; Tariello, F. Global and local environmental and energy advantages of a geothermal heat pump interacting with a low temperature thermal micro grid. *Energy Convers. Manag.* **2018**, *172*, 540–553. [CrossRef]

33. Wang, S.; Chen, Y. Fault-tolerant control for outdoor ventilation air flow rate in buildings based on neural network. *Build. Environ.* **2002**, *37*, 691–704. [CrossRef]

34. Olivares, D.E.; Mehrizi-Sani, A.; Etemadi, A.H.; Cañizares, C.A.; Iravani, R.; Kazerani, M.; Hajimiragha, A.H.; Gomis-Bellmunt, O.; Saeedifard, M.; Palma-Behnke, R.; et al. Trends in microgrid control. *IEEE Trans. Smart Grid* **2014**, *5*, 1905–1919. [CrossRef]

35. Mahdavi, N.; Braslavsky, J.H.; Seron, M.M.; West, S.R. Model predictive control of distributed air-conditioning loads to compensate fluctuations in solar power. *IEEE Trans. Smart Grid* **2017**, *8*, 3055–3065. [CrossRef]

36. Casado-Vara, R.; Vale, Z.; Prieto, J.; Corchado, J.M. Fault-tolerant temperature control algorithm for IoT networks in smart buildings. *Energies* **2018**, *11*, 3430. [CrossRef]

37. Reppa, V.; Papadopoulos, P.; Polycarpou, M.M.; Panayiotou, C.G. A distributed virtual sensor scheme for smart buildings based on adaptive approximation. In *Proceedings of the 2014 International Joint Conference on Neural Networks (IJCNN)*, Beijing, China, 6–11 July 2014; pp. 99–106.

38. Papadopoulos, P.M.; Reppa, V.; Polycarpou, M.M.; Panayiotou, C.G. Distributed adaptive sensor fault tolerant control for smart buildings. In *Proceedings of the 2015 54th IEEE Conference on Decision and Control (CDC)*, IEEE, Osaka, Japan, 15–18 December 2015; pp. 3143–3148.

39. Casado-Vara, R.; Sittón-Candanedo, I.; De la Prieta, F.; Rodríguez, S.; Calvo-Rolle, J.L.; Venayagamoorthy, G.K.; Vega, P.; Prieto, J. Edge Computing and Adaptive Fault-Tolerant Tracking Control Algorithm for Smart Buildings: A Case Study. *Cybern. Syst.* **2020**, *51*, 685–697. [CrossRef]

40. Zhang, Y.; Jiang, J. Bibliographical review on reconfigurable fault-tolerant control systems. *Annu. Rev. Control* **2008**, *32*, 229–252. [CrossRef]

41. Dong, J.; Yang, G.H. Reliable state feedback control of T-S fuzzy systems with sensor faults. *IEEE Trans. Fuzzy Syst.* **2014**, *23*, 421–433. [CrossRef]

42. Ettouil, R.; Chabir, K.; Sauter, D.; Abdelkrim, M.N. Resilient synergetic control for fault tolerant control system. *IFAC PapersOnLine* **2018**, *51*, 908–913. [CrossRef]

43. Talukdar, A.; Patra, A. Dynamic model-based fault tolerant control of variable air volume air conditioning system. *HVAC Res.* **2010**, *16*, 233–254. [CrossRef]

44. Liu, X.F.; Dexter, A. Fault-tolerant supervisory control of VAV air-conditioning systems. *Energy Build.* **2001**, *33*, 379–389. [CrossRef]

45. Fernandez, N.; Brambley, M.R.; Katipamula, S. *Self-Correcting Hvac Controls: Algorithms for Sensors and Dampers in Air-Handling Units*; Technical Report; Pacific Northwest National Lab. (PNNL); Richland, WA, USA, 2009.

46. Zhang, Y.; Jiang, J. Design of restructurable active fault-tolerant control systems. *IFAC Proc. Vol.* **2002**, *35*, 101–106. [CrossRef]

47. Najeh, H.; Singh, M.P.; Ploix, S.; Chabir, K.; Abdelkrim, M.N. Automatic thresholding for sensor data gap detection using statistical approach. In *Sustainability in Energy and Buildings*; Springer: Cham, Switzerland, 2020; pp. 455–467.

48. Roth, K.W.; Westphalen, D.; Feng, M.Y.; Llana, P.; Quartararo, L. *Energy Impact of Commercial Building Controls and Performance Diagnostics: Market Characterization, Energy Impact of Building Faults and Energy Savings Potential*; Prepared by TAIX LLC for the US Department of Energy. November. (Table 2–1); US Department of Energy: Washington, DC, USA, 2005; 412p.

49. Najeh, H.; Singh, M.P.; Ploix, S.; Chabir, K.; Abdelkrim, M.N. Diagnosis in buildings: New trends illustrated by an application. In *Proceedings of the 2019 International Conference on Control, Automation and Diagnosis (ICCAD)*, IEEE, Paris, France, 7–9 October 2019; pp. 1–6.

50. Blanke, M.; Kinnaert, M.; Lunze, J.; Staroswiecki, M.; Schröder, J. *Diagnosis and Fault-Tolerant Control*; Springer: Cham, Switzerland, 2006; Volume 2.

51. Wu, N.E. Coverage in fault-tolerant control. *Automatica* **2004**, *40*, 537–548. [CrossRef]

52. Staroswiecki, M. On reconfigurability with respect to actuator failures. *IFAC Proc. Vol.* **2002**, *35*, 257–262. [CrossRef]

53. Ploix, S.; Désinde, M.; Touaf, S. Automatic design of detection tests in complex dynamic systems. *IFAC Proc. Vol.* **2005**, *38*, 478–483. [CrossRef]

54. Singh, M.; Kien, N.T.; Najeh, H.; Ploix, S.; Caucheteux, A. Advancing Building Fault Diagnosis Using the Concept of Contextual and Heterogeneous Test. *Energies* **2019**, *12*, 2510. [CrossRef]

55. Bollen, M.; Zhong, J.; Zavoda, F.; Meyer, J.; McEachern, A.; Lopez, F.C. Power quality aspects of smart grids. In *Proceedings of the International Conference on Renewable Energies and Power Quality (ICREPQ’10)*, Granada, Spain, 23–25 March 2010.

56. Rodriguez, J.; Pontt, J.; Silva, C.A.; Correa, P.; Lezana, P.; Cortés, P.; Ammann, U. Predictive current control of a voltage source inverter. *IEEE Trans. Ind. Electron.* **2007**, *54*, 495–503. [CrossRef]
57. Vazquez, S.; Montero, C.; Bordons, C.; Franquelo, L.G. Design and experimental validation of a model predictive control strategy for a VSI with long prediction horizon. In Proceedings of the IECON 2013—39th Annual Conference of the IEEE Industrial Electronics Society, Vienna, Austria, 10–13 November 2013; pp. 5788–5793.

58. Acuna, P.; Moran, L.; Rivera, M.; Dixon, J.; Rodriguez, J. Improved active power filter performance for renewable power generation systems. *IEEE Trans. Power Electron.* **2013**, *29*, 687–694. [CrossRef]

59. Antoniewicz, K.; Jasinski, M.; Kazmierkowski, M.P.; Malinowski, M. Model predictive control for three-level four-leg flying capacitor converter operating as shunt active power filter. *IEEE Trans. Ind. Electron.* **2016**, *63*, 5255–5262.

60. Liu, X.; Wang, D.; Peng, Z. Cascade-free fuzzy finite-control-set model predictive control for nested neutral point-clamped converters with low switching frequency. *IEEE Trans. Control Syst. Technol.* **2018**, *27*, 2237–2244. [CrossRef]

61. Mohapatra, S.R.; Agarwal, V. Model Predictive Control for Flexible Reduction of Active Power Oscillation in Grid-tied Multilevel Inverters under Unbalanced and Distorted Microgrid Conditions. *IEEE Trans. Ind. Appl.* **2019**, *56*, 1107–1115. [CrossRef]

62. Wu, M.; Tian, H.; Li, Y.W.; Konstantinou, G.; Yang, K. A composite selective harmonic elimination model predictive control for seven-level hybrid-clamped inverters with optimal switching patterns. *IEEE Trans. Power Electron.* **2020**, *36*, 274–284. [CrossRef]

63. Aguilera, R.P.; Acuna, P.; Lezana, P.; Konstantinou, G.; Wu, B.; Bernet, S.; Agelidis, V.G. Selective harmonic elimination model predictive control for multilevel power converters. *IEEE Trans. Power Electron.* **2016**, *32*, 2416–2426. [CrossRef]

64. Shan, Y.; Hu, J.; Li, Z.; Guerrero, J.M. A model predictive control for renewable energy based ac microgrids without any pid regulators. *IEEE Trans. Power Electron.* **2018**, *33*, 9122–9126. [CrossRef]

65. Ahumada, C.; Cárdenas, R.; Saez, D.; Guerrero, J.M. Secondary control strategies for frequency restoration in islanded microgrids with consideration of communication delays. *IEEE Trans. Smart Grid* **2015**, *7*, 1430–1441. [CrossRef]

66. Garcia-Torres, F.; Valverde, L.; Bordons, C. Optimal load sharing of hydrogen-based microgrids with hybrid storage using model-predictive control. *IEEE Trans. Ind. Electron.* **2016**, *63*, 4919–4928. [CrossRef]

67. Kayalvizhi, S.; Kumar, D.V. Load frequency control of an isolated micro grid using fuzzy adaptive model predictive control. *IEEE Access* **2017**, *5*, 16241–16251. [CrossRef]

68. Lou, G.; Gu, W.; Xu, Y.; Cheng, M.; Liu, W. Distributed MPC-based secondary voltage control scheme for autonomous droop-controlled microgrids. *IEEE Trans. Sustain. Energy* **2016**, *8*, 792–804. [CrossRef]

69. Kerdphol, T.; Rahman, F.S.; Mitani, Y.; Hongesombut, K.; Küfeoğlu, S. Virtual inertia control-based model predictive control for microgrid frequency stabilization considering high renewable energy integration. *Sustainability* **2017**, *9*, 773. [CrossRef]

70. Gómez, J.S.; Sáez, D.; Simpson-Porco, J.W.; Cárdenas, R. Distributed predictive control for frequency and voltage regulation in microgrids. *IEEE Trans. Smart Grid* **2019**, *11*, 1319–1329. [CrossRef]

71. D'Agostino, D.; Mazzarella, L. What is a Nearly zero energy building? Overview, implementation and comparison of definitions. *J. Build. Eng.* **2019**, *21*, 200–212. [CrossRef]

72. Fontenot, H.; Dong, B. Modeling and control of building-integrated microgrids for optimal energy management—A review. *Appl. Energy* **2019**, *254*, 113689. [CrossRef]

73. Bartolucci, L.; Cordiner, S.; Mulone, V.; Rocco, V.; Rossi, J.L. Renewable source penetration and microgrids: Effects of MILP-Based control strategies. *Energy* **2018**, *152*, 416–426. [CrossRef]

74. Lešić, V.; Martinčević, A.; Vašak, M. Modular energy cost optimization for buildings with integrated microgrid. *Appl. Energy* **2017**, *197*, 14–28. [CrossRef]

75. Bruni, G.; Cordiner, S.; Mulone, V.; Sinisi, V.; Spagnolo, F. Energy management in a domestic microgrid by means of model predictive controllers. *Energy* **2016**, *108*, 119–131. [CrossRef]

76. Korkas, C.D.; Baldi, S.; Michailidis, I.; Kosmatopoulos, E.B. Occupancy-based demand response and thermal comfort optimization in microgrids with renewable energy sources and energy storage. *Appl. Energy* **2016**, *163*, 93–104. [CrossRef]

77. Jin, X.; Jiang, T.; Mu, Y.; Long, C.; Li, X.; Jia, H.; Li, Z. Scheduling distributed energy resources and smart buildings of a microgrid via multi-time scale and model predictive control method. *IET Renew. Power Gener.* **2018**, *13*, 816–833. [CrossRef]

78. Venkat, A.N.; Hiskens, I.A.; Rawlings, J.B.; Wright, S.J. Distributed MPC strategies with application to power system automatic generation control. *IEEE Trans. Control Syst. Technol.* **2008**, *16*, 1192–1206. [CrossRef]

79. Bruni, G.; Cordiner, S.; Mulone, V.; Rocco, V.; Spagnolo, F. A study on the energy management in domestic microgrids based on model predictive control strategies. *Energy Convers. Manag.* **2015**, *102*, 50–58. [CrossRef]

80. Baldi, S.; Karagevrekis, A.; Michailidis, I.T.; Kosmatopoulos, E.B. Joint energy demand and thermal comfort optimization in photovoltaic-equipped interconnected microgrids. *Energy Convers. Manag.* **2015**, *101*, 352–363. [CrossRef]

81. Touretzky, C.R.; Baldea, M. Integrating scheduling and control for economic MPC of buildings with energy storage. *J. Process Control* **2014**, *24*, 1292–1300. [CrossRef]

82. Al Faruque, M.A.; Ahourai, F. GridMat: Matlab toolbox for GridLAB-D to analyze grid impact and validate residential microgrid level energy management algorithms. In Proceedings of the ISGT 2014, IEEE, Kuala Lumpur, Malaysia, 20–23 May 2014; pp. 1–5.

83. Liu, K.; Liu, T.; Tang, Z.; Hill, D.J. Distributed MPC-based frequency control in networked microgrids with voltage constraints. *IEEE Trans. Smart Grid* **2019**, *10*, 6343–6354. [CrossRef]

84. Khalilnejad, A.; French, R.H.; Abramson, A.R. Data-driven evaluation of HVAC operation and savings in commercial buildings. *Appl. Energy* **2020**, *278*, 115505. [CrossRef]

85. Ouammi, A.; Achour, Y.; Dagdougui, H.; Zejli, D. Optimal operation scheduling for a smart greenhouse integrated microgrid. *Energy Sustain. Dev.* **2020**, *58*, 129–137. [CrossRef]
86. Lešić, V.; Vašak, M.; Martinčević, A.; Novak, H. Nonlinear hierarchical building zone and microgrid control based on sensitivity analysis. In Proceedings of the 2017 21st International Conference on Process Control (PC), Strbske Pleso, Slovakia, 6–9 June 2017; pp. 321–326.

87. Vasilj, J.; Gros, S.; Jakus, D.; Zanon, M. Day-ahead scheduling and real-time Economic MPC of CHP unit in Microgrid with Smart buildings. *IEEE Trans. Smart Grid* **2017**, *10*, 1992–2001. [CrossRef]

88. Sharma, I.; Dong, J.; Malikopoulos, A.A.; Street, M.; Ostrowski, J.; Kuruganti, T.; Jackson, R. A modeling framework for optimal energy management of a residential building. *Energy Build.* **2016**, *130*, 55–63. [CrossRef]

89. Carli, R.; Dotoli, M.; Jantzen, J.; Kristensen, M.; Othman, S.B. Energy scheduling of a smart microgrid with shared photovoltaic panels and storage: The case of the Ballen marina in Samsø. *Energy* **2020**, *198*, 117188. [CrossRef]

90. Rigaut, T.; Nassiopoulos, A.; Bourquin, F.; Giroux, P.; Pény, A. Model predictive control for energy and climate management of a subway station thermo-electrical microgrid. *Transp. Res. Procedia* **2016**, *14*, 926–935. [CrossRef]

91. Pombeiro, H.; Machado, M.J.; Silva, C. Dynamic programming and genetic algorithms to control an HVAC system: Maximizing thermal comfort and minimizing cost with PV production and storage. *Sustain. Cities Soc.* **2017**, *34*, 228–238. [CrossRef]

92. Zhao, Y.; Lu, Y.; Yan, C.; Wang, S. MPC-based optimal scheduling of grid-connected low energy buildings with thermal energy storages. *Energy Build.* **2015**, *86*, 415–426. [CrossRef]

93. Zhang, Y.; Meng, F.; Wang, R.; Kazemtabrizi, B.; Shi, J. Uncertainty-resistant stochastic MPC approach for optimal operation of CHP microgrid. *Energy* **2019**, *179*, 1265–1278. [CrossRef]

94. Verrilli, F.; Srinivasan, S.; Gambino, G.; Canelli, M.; Himanka, M.; Del Vecchio, C.; Sasso, M.; Glielmo, L. Model predictive control-based optimal operations of district heating system with thermal energy storage and flexible loads. *IEEE Trans. Autom. Sci. Eng.* **2016**, *14*, 547–557. [CrossRef]

95. Pombeiro, H.; Santos, R.; Carreira, P.; Silva, C.; Sousa, J.M. Comparative assessment of low-complexity models to predict electricity consumption in an institutional building: Linear regression vs. fuzzy modeling vs. neural networks. *Energy Build.* **2017**, *146*, 141–151. [CrossRef]

96. Hidalgo-Rodríguez, D.I.; Myrzik, J. Optimal Operation of Interconnected Home-Microgrids with Flexible Thermal Loads: A Comparison of Decentralized, Centralized, and Hierarchical-Distributed Model Predictive Control. In Proceedings of the 2018 Power Systems Computation Conference (PSCC), Dublin, Ireland, 11–15 June 2018; pp. 1–7.

97. Hajar, K.; Hably, A.; Bacha, S.; Elrafhi, A.; Obeid, Z. An application of a centralized model predictive control on microgrids. In Proceedings of the Power Energy Conference (EPEC 2016), Ottawa, ON, Canada, 12–14 October 2016.

98. Garcia-Torres, F.; Bordons, C.; Tobajas, J.; Márquez, J.J.; Garrido-Zafra, J.; Moreno-Muñoz, A. Optimal Schedule for Networked Microgrids Under Deregulated Power Market Environment Using Model Predictive Control. *IEEE Trans. Smart Grid* **2021**, *12*, 182–191. [CrossRef]

99. Gan, L.K.; Zhang, P.; Lee, J.; Osborne, M.A.; Howey, D.A. Data-Driven Energy Management System With Gaussian Process Forecasting and MPC for Interconnected Microgrids. *IEEE Trans. Sustain. Energy* **2021**, *12*, 695–704. [CrossRef]

100. del Real, A.J.; Arce, A.; Bordons, C. An Integrated Framework for Distributed Model Predictive Control of Large-Scale Power Networks. *IEEE Trans. Ind. Inform.* **2014**, *10*, 197–209. [CrossRef]

101. Xing, X.; Xie, L.; Meng, H. Cooperative energy management optimization based on distributed MPC in grid-connected microgrids community. *Int. J. Electr. Power Energy Syst.* **2019**, *107*, 186–199. [CrossRef]

102. Ananduta, W.; Maestre, J.M.; Ocampo-Martinez, C.; Ishii, H. Resilient distributed model predictive control for energy management of interconnected microgrids. *Optim. Control Appl. Methods* **2020**, *41*, 146–169. [CrossRef]

103. Parisio, A.; Wiezorek, C.; Kyntäjä, T.; Elo, J.; Strunz, K.; Johansson, K.H. Cooperative MPC-Based Energy Management for Networked Microgrids. *IEEE Trans. Smart Grid* **2017**, *8*, 3066–3074. [CrossRef]

104. Luo, X.; Wang, J.; Dooner, M.; Clarke, J. Overview of current development in electrical energy storage technologies and the application potential in power system operation. *Appl. Energy* **2015**, *137*, 511–536. [CrossRef]

105. Andoni, M.; Robu, V.; Flynn, D.; Abram, S.; Geach, D.; Jenkins, D.; McCallum, P.; Peacock, A. Blockchain technology in the energy sector: A systematic review of challenges and opportunities. *Renew. Sustain. Energy Rev.* **2019**, *100*, 143–174. [CrossRef]

106. Swan, M. *Blockchain: Blueprint for a New Economy*; O'Reilly Media Inc.: Newton, MA, USA, 2015.

107. Shafie-khah, M. *Blockchain-Based Smart Grids*; Academic Press: Cambridge, MA, USA, 2020.

108. Novo, O. Blockchain meets IoT: An architecture for scalable access management in IoT. *IEEE Internet Things J.* **2018**, *5*, 1184–1195. [CrossRef]

109. Dorri, A.; Kanhere, S.S.; Jurdak, R. Towards an optimized blockchain for IoT. In Proceedings of the 2017 IEEE/ACM Second International Conference on Internet-of-Things Design and Implementation (IoTDI), Pittsburgh, PA, USA, 18–21 April 2017; pp. 173–178.

110. Wang, Y.; Su, Z.; Zhang, N. BSIS: Blockchain-Based Secure Incentive Scheme for Energy Delivery in Vehicular Energy Network. *IEEE Trans. Ind. Inform.* **2019**, *15*, 3620–3631. [CrossRef]