CHEMICAL ENGINEERING TRANSACTIONS VOL. 76, 2019 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar S. Varbanov, Timothy G. Walmsley, Jiří J. Klemeš, Panos Seferlis Copyright © 2019, AIDIC Servizi S.r.l. ISBN 978-88-95608-73-0; ISSN 2283-9216 Energy Management in an Islanded Multi-Node Microgrid Based on Nonlinear Model Predictive Control (NMPC) Dimitrios Trigkasa,*, Chrysovalantou Ziogoua, Symeon Parcharidisb, Spyridon Voutetakisa, Simira Papadopouloua aChemical Process & Energy Resources Institute, Centre for Research and Technology Hellas (CPERI/CERTH), P.O. Box 60361, 57001 Thermi, Thessaloniki, Greece bSystems Sunlight SA, 2 Ermou & Nikis Street, Syntagma Sq.| 105 63 Athens, Greece dtrigas@cperi.certh.gr In this paper, an advanced control framework for an islanded multi-node microgrid is presented. Each node of the microgrid comprises various Renewable Energy Sources (RES), miscellaneous types of energy storage (batteries and/or hydrogen) and the capability of energy exchange through a DC bus interconnection. Prioritising the usage of energy sources (RES, batteries and hydrogen) at each node in order to achieve sustainability is only a partial and local solution. Supervisory control is crucial so as to achieve optimal energy exchange between the nodes which will ensure the maximum renewable energy exploitation and minimum usage of auxiliary power sources. A Nonlinear Model Predictive Controller (NMPC) is developed in order to coordinate the energy exchange between the nodes and determine the amount of energy that each node will receive or dispatch, taking into account various parameters such as forecasted power production and consumption profiles and system’s physical constraints. Indicative results are presented so as to demonstrate the capability of the NMPC to improve the efficiency of the microgrid by applying energy exchange between the nodes. 1. Introduction Microgrids have created a new perspective in energy field. A microgrid is a localised group of nodes containing electricity sources and loads. They consist of various sources of distributed generation, and most importantly renewable energy sources (RES) (Lasseter, 2002). Multi-node microgrids can operate connected to the main grid or in islanded mode, when needed, and can provide solutions for integrating renewable resources with distributed energy storage. Thus, a strong need for microgrid control arises (Menon et al, 2014). In recent years, microgrids undertake the fulfillment of energy demand, mostly based on renewable energy. The stochastic nature of renewable generation and the uncertainty concerning the load demand results in a diversity of unexpected energy states in the microgrid that need to be managed. Different approaches have been presented in order to manage microgrids. An approach with a finite state machine has been proposed by Trigkas et al. (2018) for the management of an autonomous microgrid. Zhang et al. (2018) propose a stochastic model predictive controller that manages a grid-connected microgrid while a two-step distributed model predictive controller is presented in Hu et al. (2018) that could be applied in both grid-connected and islanded multi- microgrids. Almost every approach involves the control of every device in the microgrid. In this work, the design and development of an NMPC for energy exchange among the nodes of an autonomous microgrid is presented. The proposed NMPC takes into account only the energy states of the nodes and does not interfere with the internal node operation. The main objective is the development of a supervisory control scheme, based on a nonlinear predictive control algorithm, for managing the grid energy requirements at the nodes. The scheme comprises the mathematical models of all power subsystems in the grid. The objective is the optimal exploitation of the energy produced by the RES regarding load covering and energy storing. The aim is to demonstrate optimal energy exchange, by considering the present state of each node as well as the future predicted states. Appropriate control actions will be provided to achieve energy autonomy at each node. This will yield load fulfilment and will ensure high DOI: 10.3303/CET1976151 Paper Received: 24/07/2019; Revised: 13/08/2019; Accepted: 14/08/2019 Please cite this article as: Trigkas D., Ziogou C., Parcharidis S., Voutetakis S., Papadopoulou S., 2019, Energy Management in an Islanded Multi-Node Microgrid Based on Nonlinear Model Predictive Control (NMPC), Chemical Engineering Transactions, 76, 901-906 DOI:10.3303/CET1976151 901 level of energy storage when appropriate. Furthermore, the minimisation of the auxiliary power supply operating time and energy curtailment is taken under consideration. 2. Autonomous RES-Powered microgrid An existing smart-grid network was used in order to develop and study the applicability of the proposed approach based on the mathematical models of all systems of the existing infrastructure. The autonomous smart microgrid involves three nodes powered by Photovoltaics and Wind Generators while lead acid Accumulators are used as storage units. One of the nodes embeds an integrated infrastructure of hydrogen production, storage and utilisation. The facility is comprised of a Polymer Electrolyte Membrane (PEM) Electrolyzer, hydrogen pressure tanks and a PEM Fuel Cell (FC). Diesel Generators (DG) are present in all nodes as auxiliary power supply. A DC bus is utilised, to provide the option of energy exchange between the nodes. Figure 1 illustrates the topology of the isolated RES-enabled network. LVDC BUS AC BUS Generator LOAD AC BUS Generator Battery LOAD AC BUS Generator DC DC LOAD Fuel Cell Electrolyser H2 H2O HVDC BUS SUPERVISORY STATION Local DAQ Local DAQ SCADA DC DC DC DC DC DC DC DC DC DC DC DC Inverter Charger ChargerInverter Charger PV DC DC Battery PV WG DC DC DC AC PV WG DC DC DC AC Battery 11 AC DC AC DC AC DC Inverter Node 1 Node 2 Node 3 AC DC AC DC AC DC AC DC Bidirectional Grid Converters LVDC BUS LVDC BUS Figure 1: Architecture of the autonomous smart-microgrid network This smart microgrid is located at Xanthi, Greece and is controlled by a SCADA (GE Proficy iFIX) system. The Machine to Machine (M2M) communication for the decision making is implemented by an Internet of Things (loT) enabled architecture using a custom developed middleware that uses a light weight protocol (MQTT). 3. Nonlinear Model Predictive Control Framework The developed framework is based on the mathematical concept of Nonlinear Model predictive control (NMPC) (Allgöwer et al., 2004). It is part of a family of optimisation-based control methods, which perform on-line optimisation for the determination of the future control moves. Fundamentals of Model Predictive Control concept can be found in (Mayne et al., 2000). NMPC is based on the assumption that past and present control actions affect the future response of the system. The main objective is to obtain a control action by minimising a cost function related to selected objectives or performance indices of the system. At each sampling time a finite horizon optimal control problem is solved over a prediction horizon 𝑇𝑝, using the current state of the process as the initial state. The optimisation yields an optimal control sequence {𝑢(𝑘),𝑢(𝑘 + 1), … , 𝑢(𝑘 + 𝑁𝑐)} over a control horizon 𝑇𝑐 and only the first control action 𝑢(𝑘) for the current time is applied to the system (Ziogou et al., 2018). At the next time instant the horizon is shifted by one sampling interval and the optimisation problem is resolved using the information of the new measurements acquired from the system. 3.1 Mathematical modelling and operation of the nodes In order to provide the predicted states, the proposed NMPC requires the mathematical model of the whole structure of the microgrid. The framework structure is based on the mathematical models of the energy devices of each node as well as the hierarchical energy management strategy (EMS) determining the operation and thus the values of the parameters and variables within each node. Τhe state of each node, concerning the energy stored, is derived based on the mathematical models of all subsystems and the lower level operation and energy flow inside each node. At each time step, inside each node the priority is given to the fulfillment of the load demand firstly from the RES and subsequently from the energy stored. In cases that renewable energy is not sufficient enough to cover the load demand the priority is given to the batteries. In case the batteries fail to fulfill the requested load, the node implements the stored hydrogen through the fuel cell. As latest, the diesel generators operate when the demand cannot be fulfilled from other sources. On the other hand, if the renewable energy effectively satisfies the 902 demand, the energy surplus is stored with priority to batteries and subsequently, if the node has hydrogen infrastructure, the energy is stored in hydrogen form using the PEM Electrolyzer. The mathematical models of Photovoltaics, Wind Generators, Lead Acid Accumulators, PEM Fuel Cell, PEM Electrolyzer, Hydrogen Compressor and Hydrogen storage Tanks were developed in MATLAB environment (Voutetakis et al. 2011). Based on the above described operation that captures the autonomous operation of the nodes, the aim of the NMPC framework is to provide interaction between the nodes implementing energy exchange in an optimised manner. The interconnection of the nodes is feasible through the common DC bus and the DC/DC microgrid converters. To achieve the optimal energy exchange, the objective of the NMPC is to deliver appropriate control actions to the DC/DC microgrid converters to exchange renewable or battery stored energy in order for the nodes to reach a prespecified energy state, perform maximum renewable energy exploitation, avoid DG usage and prevent the systems from reaching the operational limits. 4. Problem formulation According to the NMPC concept, state variable 𝑥𝑖(𝑡) defines the energy state of the i-th node at time instant t, which is assumed to be the stored energy in the accumulators. Controlled variable 𝑦𝑖(𝑡) denotes the battery State of Charge (SoC). The energy state reference is a target where the SoC is intended to be and is denoted with 𝑦𝑖 𝑠𝑝 (𝑡). The manipulated variable 𝑢𝑖(𝑡) denotes the power to be exchanged from i-th node at time instant t. Positive values of 𝑢𝑖(𝑡) express power inflow from other nodes and negative express power supply to other nodes. The manipulated variable defines the control signals to be sent to the DC/DC microgrid converters in order to exchange energy. For simplifying the description of the procedure and adopting a more mathematical sense, the concept of energy distribution inside the nodes and among them, is translated in power units applied in the five minutes time intervals. 4.1 Mathematical representation The mathematical representation of the NMPC algorithm described in previous sections and is implemented in this work is as follows. ( ) ( ) 1 1 0 ˆ ˆmin ( ) ( ) ( ) ( ) ( ) Npm T sp sp i i i i u i j J k y k j y k j Q y k j y k j − = = = + − + + − + (1) s.t.: ( ), , pred i a i i i y f x u= (2) { ( ), ( 1), , ( 1)} 1, 2,..., i i i i p u u k u k u k N i m= + + − = (3) ( ) ( ) ( ) meas pred i i i e k y k y k= − (4) ˆ ( ) ( ) ( ) pred i i i y k j y k j e k+ = + + (5) 1 ( ) 0 m i i u k j = + = 0,..., 1j Np= − (6) ( ) ( )2500 1 ( ) ( ) 2500 1 ( ) 1, 2,..., , 0,..., 1 i is i r k j u k j k j i m j Np −  − +  +   − + = = − (7) 0.6 ( ) 0.8 1,..., , 0,..., 1iy k j i m j Np +  = = − (8) Functional 𝐽 in Eq(1) defines the deviations of the controlled variables �̂� from the desired reference trajectory 𝑦𝑠𝑝 in each node and across the control horizon. The minimisation of 𝐽 is subject to constraints on the manipulated and controlled variables 𝑢, �̂�. 𝑓𝛼 denote the sets of algebraic model equations. The difference 𝑒(𝑘) between the measured variable 𝑦𝑚𝑒𝑎𝑠 and the corresponding predicted value 𝑦𝑝𝑟𝑒𝑑 at time instance k is assumed to be constant for the entire number of future time intervals 𝑁𝑝, of the prediction horizon 𝑇𝑝, and 𝑇𝑐 denotes the control horizon reached through 𝑁𝑐 time intervals. The prediction horizon 𝑇𝑝, and control horizon 𝑇𝑐 are set equal to 100 min, with sampling time every 5 min. Tuning parameters of the algorithm are the weight factors matrix 𝑄 in the objective function and the length of the prediction and control horizon. Matrix Q weights the significance of a node’s participation in the microgrid’s energy exchange and must be positive definite. Constraint in Eq(6) denotes that the algebraic sum of the energy exchanged should be zero at each time instant while Eq(8) constraint restricts SoC between 60-80%. Lastly, concerning Eq(7), the bidirectional DC/DC converters have a power management limit of 2500 W. In addition, the controller performs a higher-level control and does not interfere with the internal process of the nodes. For 903 appropriate interaction with the nodes that implement hydrogen infrastructure and can handle internally energy surplus or deficit from the hydrogen unit, Boolean variables 𝛿𝑟𝑖(𝑡) and 𝛿𝑠𝑖(𝑡) that depict Electrolyzer and Fuel Cell operation respectively are defined. These variables dynamically update the constrains of the power exchange through the converters, depended on whether the Electrolyzer or Fuel Cell operates in a node. That is, if hydrogen production is performed through the Electrolyzer, which means that batteries are fully charged and there is energy surplus in the node, the energy exchange mode of the node should be only to supply energy to other nodes and not to receive. Similar operation and restrictions apply when the Fuel Cell operates. 5. Operation Analysis and behavior assessment In order to demonstrate the value of the NMPC framework for energy exchange, two scenarios are simulated. Each simulation explores the energy dynamics of the nodes. Both simulate 24 h of microgrid operation and use the same input of available power in each node (Figure 2a) which results from the difference of the renewable energy minus load demand. For each time step (5 min) during the 24 h, a mean of 30 days data is used as the non-controllable available power input for the NMPC prediction procedure. First scenario utilises microgrid operation without energy exchange among the nodes. Figure 2b shows the evolution of the battery SoC during the 24 h simulated period. There exist periods of time that node 1 reaches the lower SoC limit and consequently the battery is isolated in order to be protected. Diesel generator starts to operate during these periods of time as a response to the demand and delivers constant power to the node (Figure 3a). Surplus of the DG power charges the batteries (positive power area). The figure shows also time periods (6:00-9:30 h and 19:00-24:00 h negative power area) that neither the diesel generator can respond to that energy demand which leads the node to energy deficit. On the other hand, node 3 reaches the upper SoC limit where the battery charging is stopped for some period (Figure 2b). This suggests energy surplus and part of it, depended on PEM Electrolyzer’s dynamics, is transformed into hydrogen (Figure 4a). Although the auxiliary devices contribute to the energy demand or convert excess power into hydrogen, Figure 3b shows periods of power deficit in node 1 and surplus in node 3. Such cases of energy shortage or excess is intended to be balanced implementing the control actions that NMPC derives. (a) (b) Figure 2: a) Available power at each Node. b) Battery SoC without energy exchange (a) (b) Figure 3: Operation without energy exchange a) Diesel generator excess power distribution at Node 1, b) Power deficit-surplus: i) Node 1, ii) Node 2, iii) Node 3 904 (a) (b) Figure 4: a) Hydrogen production at Node 3 without energy exchange, b) NMPC Operation: Balance of energy distribution i) Energy supplied from each node. ii) Energy received from each node The second scenario utilises the NMPC framework. Figure 4b shows the total amounts of energy exchanged according to the simulation scenario. Figure 5a shows SoC evolution when implementing the NMPC. Clearly a desired SoC balance among nodes can be noticed. The figure shows that all three battery states follow the same pattern after a short period of time. This results from the appropriate energy transfer delivered by the optimal solution of the NMPC optimisation problem at each time step. Furthermore, energy surplus is managed and distributed, according to the needs. Thus, after an optimal management implemented by the NMPC, every node operates with the battery state within limits and without energy surplus or deficit. Consequently, a maximum energy exploitation is achieved while the contribution of the diesel generator is unnecessary. Figure 5: a) Battery State of Charge of the three nodes with energy exchange, b) Control input to the DC/DC microgrid converters Figure 5b shows the manipulated variable which satisfies the constraints at each time step. These are the control actions sent to the DC/DC converters and express the power that each of them exchanges in order to implement the optimal solution. As stated in previous section, positive values mean energy input into the node while negative mean energy output. Table 1 shows the total amounts of the energy exchanged in order to achieve the energy balance. A comparison of the energy dynamics of the microgrid in isolated operation (NMPC OFF) and in energy exchange mode (NMPC ON) is shown in Table 2. It is clear that the energy balance occurred applying the NMPC, eliminated energy deficit or surplus along with the need of the diesel generator. Table 1: Microgrid energy dynamics with NMPC applied (energy exchange) Energy supplied (kWh) Energy received (kWh) Node 1 0.058 32.9 Node 2 4.504 5 Node 3 33.38 0 905 Table 2: Comparison of the energy dynamics on the microgrid without and with energy exchange operation Diesel Generator operation Energy Deficit Energy Surplus NMPC OFF NMPC ON NMPC OFF NMPC ON NMPC OFF NMPC ON min kWh min kWh min kWh min kWh min kWh Time kWh Node 1 970 17.78 0 0 420 6.77 0 0 0 0 0 0 Node 2 0 0 0 0 0 0 0 0 0 0 0 0 Node 3 0 0 0 0 0 0 0 0 195 1.13 0 0 6. Conclusions This work presents the implementation of a control framework using a nonlinear model-based technique. The framework is applied to a multi-node smart-microgrid in order to achieve energy balance among the nodes, by exchanging energy in an optimal way that is derived from the Nonlinear Model Predictive Controller. As shown in table 2, without the NMPC, node 1 needs 970 min of DG operation (17.78 kWh), and additionally has 420 min of energy deficit (6.77 kWh). On the other hand, node 3 has 195 min of energy surplus (1.13 kWh). With the implementation of the proposed NMPC, the simulation results show that the energy balance in the microgrid is achieved after few hours with the exchange of totally 37.9 kWh of energy and maintained. The benefits from implementing energy exchange and maintaining the balance are multiple. A continuous and uninterrupted power supply is guaranteed fulfilling at any time the power demand. Furthermore, economic and environmental benefits arise, since maximum exploitation of RES is implemented with simultaneous minimisation or elimination of the diesel generator usage. The outcomes of the control have impact not only in the optimal exploitation of the produced energy, but also on the operation lifecycle of the subsystems. Sensitive equipment such as batteries, fuel cells and hydrogen generation devices, are affected by several factors. For instance, long operating hours, on/off cycles, large power fluctuations and high-power operation can cause device degradation. The implementation of the developed NMPC, significantly reduces the operation periods of sensitive devices and that yields greater life expectancy of the all subsystems. Future research will involve the introduction of additional manipulated variables along with the implementation of an optimisation-based definition of the weight factor matrix Q, that will introduce higher degrees of freedom in microgrid management and control. Acknowledgments Research supported by EU funded HORIZON2020 project inteGRIDy - integrated Smart GRID Cross-Functional Solutions for Optimised Synergetic Energy Distribution, Utilisation & Storage Technologies, H2020 Grant Agreement Number: 731268. References Allgöwer F., Findeisen R., Nagy Z. K., 2004, Nonlinear Model Predictive Control: From Theory to Application, J. Chin. Inst. Chem. Engrs., 35 (3), 299–315. Hu K., Li W., Wang L., Cao S., Zhu F., Shou Z., 2018, Energy management for multi-microgrid system based on model predictive control, Frontiers of Information Technology & Electronic Eng., 19 (11),1340–1351. Lasseter, R. H., 2002, MicroGrids, Conference Proceedings (Cat. No.02CH09) 2002 IEEE Power Engineering Society Winter Meeting, 1, 305–308. Mayne D.Q., Rawlings J.B., Rao C.V., Scokaert P.O.M., 2000, Constrained model predictive control: Stability and optimality, Automatica, 36 (6), 789–814. Menon R., Paolone M., Marechal F., 2014, Model predictive control strategies for low-voltage microgrids, Chemical Engineering Transactions, 39, 1123–1128. Trigkas D., Ziogou C., Voutetakis S., Papadopoulou S, 2018, Supervisory Control of Energy Distribution at Autonomous RES-powered Smart-grids using a Finite State Machine Approach, 5th International Conference on Control, Decision and Information Technologies (CoDIT), 415–420. Voutetakis S., Seferlis P., Stergiopoulos F., Papadopoulou S., Papadopoulos A., Ipsakis D., Ziogou C., Elmasides C., 2011, Design, Optimization and Control of Stand-Alone Power Systems Using Renewable Energy Sources and Hydrogen Production, Nova Science Publishers, Inc., New York, USA. Zhang Y., Meng F., Wang R., Zhu W., Zeng X.J., 2018, A stochastic MPC based approach to integrated energy management in microgrids, Sustainable Cities and Society, 41, 349–362. Ziogou C., Voutetakis S., Georgiadis M., Papadopoulou S., 2018, Model predictive control (MPC) strategies for PEM fuel cell systems – A comparative experimental demonstration, Chemical Engineering Research and Design, 131, 656–670. 906