Impact of Incorporating Disturbance Prediction on the Performance of Energy Management Systems in Micro-Grid

The design and implementation of appropriate advanced control strategies is a key factor for the effective integration of micro-grids into the electrical network. In view of this, the study proposes an Adaptive Model-Based Horizon Control technique in the bid to addressing issues related to the Energy Management System in micro-grid operations. The main objective of the energy management system is to balance energy generation and demand through energy storage, so as to optimize the operation of the micro-grid with high penetrations of renewable energy sources. This paper further investigates the impacts of considering the prediction of disturbances on the performance of the Energy Management System based on the adaptive model predictive control algorithm in order to improve the operating costs of the micro-grid with hybrid-energy storage systems. The adaptive model predictive control algorithm solves the energy optimization problem in a renewable energy-based micro-grid with various types of energy storage systems that exchange energy with the host grid. More so, this optimization problem is resolved at each sampling period in order to determine the minimum running costs while satisfying demand and taking into account technical and physical constraints. The simulation results under different conditions have demonstrated how the use of an adaptive model predictive control based energy management system can enhance micro-grid operation, provided there is effective forecasting, and consequently minimized the running operating costs of micro-grid. More so, it is evident in the cost function, $J$ , obtained from the three scenarios conducted, that the perfect knowledge of the disturbance prediction is essential for effective micro-grid operations.


I. INTRODUCTION A. BACKGROUND AND MOTIVATION
In reality, the penetration of the Renewable Energy Sources (RESs) into the electrical network poses many challenges arising from their inherent intermittent nature, as well as the need to satisfy unpredictable consumer demand [1]. More so, several uncertainties have been imposed on the modern operation of the distribution network by the integration of large-scale distributed renewable energy. It is necessary to determine the economic and reliable control strategies against fluctuating generation outputs and unpredictable weather conditions. In addition, the stochastic characteristics of the load profiles are exacerbated by increasingly The associate editor coordinating the review of this manuscript and approving it for publication was Haiquan Zhao . complicated end-users [2], [3]. Conversely, while the traditional, source-controllable method of generating energy enables generation to balance the demand, the incorporation of new renewable-based technology with an unpredictable and variable profile makes it imperative to provide unique solutions to the problems that have not previously emerged. It is essential to realize that the energy imbalances in the grid, associated with the issues of reliability, stability, and power quality, are the result of the high penetration of the RESs in the electrical network. The inclusion of Energy Storage Systems ( ESSs) such as hydrogen, batteries, flywheels, ultracapacitors, and so on, is a one-way approach to addressing these issues [4].
Meanwhile, due to its inherent predictive difficulties and variability, consideration of renewable sources, such as the un-dispatchable unit, can be avoided with the help of the ESS VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ buffering capability. Therefore, the discontinuous nature of renewable generation and the randomness of the behavior of the consumer are both compensated by the stored energy in these units [5]. In addition, the imbalances introduced by the fluctuation of the RESs in the grid are compensated by the use of energy storage technologies, thus ensuring the appropriate quality of the power supplied to the local loads. However, storage concerns are not just a technical solution for energy management in the electrical network, yet, in addition, a way of effectively using sustainable resources by averting the shedding of generation amid overproduction and, similarly, shedding of loads in the event of generation deficit. Meanwhile, the design and implementation of an advanced control system are vital for the convenient operation of hybrid ESSs. More so, the control technique will manipulate the characteristics of the individual ESS, taking into account degradation problems and operational constraints; thus, it appears as a technical solution to improve flexibility, performance, and lifespan [6], [7]. The Energy Management System (EMS) is responsible for the most efficient means of maintaining the energy balance in the micro-grid. Hence, the primary objective is to ensure a reliable supply of electrical power to its local load consumers. This could involve simply handling the surplus/ shortage of energy or considering certain functionalities based on economic or operational parameters.
EMS objective is located at the tertiary level and, if necessary, must balance power generation and demand through energy storage, dispatch-able generators, and demand management. The EMS can also maximize the system efficiency and reduce running costs. Model Predictive Control can perform such activities if the cost function and operating constraints are appropriately set. The predictive controller determines online optimum set points that are sent as control signals to generator power converters, loads, storage units, and grid connections. The on-board electronic control units of the various elements of the micro-grid (generators, batteries, fuel cells, etc.) then decide the best way to achieve these points, according to controllers from their own manufacturers. The power generated by the Renewable Energy Sources (RESs) and the power demanded are the two major disturbances (sources of uncertainty) that operate on a micro-grid that could positively impact its EMS and economic performances [8], [9]. The challenges emerge from the inherent intermittent nature of renewable energy sources and the criteria for satisfying the variable demand for energy. While renewable sources are used for the generation, this makes them a problem to be addressed by the control system due to their time-varying nature, difficulty in predicting, and lack of manipulative capability. Although the controller cannot adjust these variables (except for in the case of Demand Response) [10], MPC may use the current information (current measurement and future prediction) to forecast the system output along the horizon.
The MPC-based optimization approach has over-time, drawn the consideration of the power system network attributable to a few focal points over the Metaheuristic and Heuristic control techniques. The MPC-based control scheme's advantages over other control schemes are, and are not limited to the following criteria [11]. It focuses on the future behavior and predictions of the system and is therefore extremely appealing to systems that are inherently dependent on forecasting energy demand and the production of renewable energy, and offers a feedback mechanism that makes the system more sensitive to uncertainty and disturbance [1], [12]. Moreover, this control strategy can address complex system constraints, integrate generation and demand projections, and finally, manage physical and operational constraints such as storage capacity or generator slew-rate power limits [13]. Despite its advantages over traditional control techniques and it's extensive usage for most of the control aspects of micro-grid in the industrial community, some drawbacks require urgent attention as far as control performance is concerned [5]. It is worthy of notice that the conventional MPC controller, i.e., the MPC controller running in the non-adaptive mode, is not accurate in handling varying dynamics, since the internal plant model used in MPC for prediction is constant. The optimum outcome could not be achieved by an MPC-based energy management system with the constant penalty weights when taking into account micro-grid complexities; meanwhile, the mechanism would be closed in certain outrageous circumstances. Thus, adapting the weights as indicated by the ESS state will increase the robustness of the system.
On the other hand, the AMPC takes the updated plant model at each time step for the current operating condition; as a result, it makes accurate predictions for the new operating condition. Hence, in order to deal with changes in plant dynamics, the AMPC controller is utilized. The Adaptive Model Predictive Controller requires a discrete plant model for its control actions, which results in excellent controller performance. Thus, in terms of excellent tracking and regulating control performance, AMPC is superior to the MPC controller running in the non-adaptive mode. In addition, consideration is given to the implementation of better optimization algorithms and effective modeling systems due to the difficulty of the micro-grid optimization problem and the enormous economic advantages that could accrue from its improved solution.

B. LITERATURE REVIEW
The intermittent and volatile generation of renewable energy and the random behavior of consumers introduce a stochastic component to the control problem. In practical applications, all of these variables are not entirely controllable. Still, knowledge of their time evolution is essential for improving micro-grid management and control, especially when using MPC approaches [8], [14]. More so, predictions can typically be derived from solar irradiance, wind forecasts, or historical data on atmospheric conditions, electricity prices, and load consumption. The mismatch between generation and demand can, therefore, be resolve by balancing the power output utilizing demand-side management, storage devices, and flexible renewable generation resources. However, the difficulty of predicting generation and demand causes considerable uncertainty, which is unavoidable [4], [15]. A new approach to decision-making in micro-grid systems is introduced to address this challenge: deterministic decisionmaking can be substituted by a stochastic solution [16], taking explicit account of system uncertainties. In addition, the MPC provides a certain degree of robustness to the control of system uncertainties due to its receding horizon implementation; its deterministic formulation generally makes it inherently inadequate to deal systematically with uncertainties. Hence, more techniques that are sophisticated are required when the level of uncertainties are significant [16].
Various techniques were proposed to address uncertainties in the load forecasted [17], [18]. Renewable uncertainties typically have a more significant influence if renewable energy sources supply a substantial portion of micro-grid energy. Several robust and stochastic methods of scheduling micro-grids have been studied to address the challenges of renewable uncertainties [18]. A Model Predictive Control (MPC) approach has been utilized in several works to the scheduling problem [19], [20]. Additionally, the performance of deterministic and stochastic MPC in the economic scheduling of micro-grids has been contrasted in refs [21], [22]. The solution of a model predictive economic scheduling was likewise provided by ref [23] and further discussed the influence of forecast error. More so, in literature, numerous control algorithms spanning from metaheuristics and heuristics have been presented to address the problem of micro-grid power dispatch. These algorithms are, but are not limited to the following, genetic algorithms (GA) [24], evolutionary strategies, and algorithms for tabu searching [25]. Consequently, the emerging control methods in the literature are either computationally robust or not suitable for real-time implementation, or they may generate sub optimal solutions. However, either the problem of optimization remains non-linear in the works described above or other essential features, such as minimum up and downtimes and demand-side programs, are overlooked [26]. Ref [27] typically utilized heuristic algorithms to implement micro-grid electricity. Similarly, few research works [28]- [31] have used the Hysteresis Band Control (HBC) technique for energy management, due to its reasonable simplicity and ease of implementation. Moreover, a significant decrease in running costs can be noticed by comparing both techniques [15]. Several micro-grid applications utilize Fuzzy Control (FC), either for tuning or supporting conventional controllers or as the central controller [32]. Jiang et al. [33], proposed a stochastic receding-horizon control (SRHC) technique based on modified stochastic predictive model control (SMPC) to address fluctuations in renewable energy and loads. As uncertainties play a significant role in the micro-grid network, Farzin et al. [34], proposed a stochastic framework for optimal energy management of micro-grids during unscheduled islanding period, providing a cost-effective solution to this problem, while capturing all the inherent uncertainties. The presented framework addresses the prevailing uncertainties of islanding duration as well as prediction errors of demand and renewable power generation. Csaji et al. [35], proposed an Adaptive Aggregated predictions for renewable sources, which fits several stochastic models to historical times-series data and therefore, argued that side information, such as clear-sky predictions or the typical system behavior, can be used as exogenous inputs to increase their performance. The generating forecasts problems for energy production and consumption processes in a renewable energy system were further addressed. Ref [16], gave an overview of the main developments in the area of Stochastic Model Predictive Control (SMPC), and further provided the various SMPC algorithms, along with the key theoretical challenges in stochastic predictive control without undue mathematical complexity. More so, the Optimal Control Problem (OCP) was also formulated for Stochastic Linear and Non-linear MPC. Valibeygi et al. [36], proposed a robust scheduling algorithm for the scheduling of the power flow between the main electricity grid and the micro-grid with the generation of solar energy and the battery energy storage subject to uncertainty in the generation of solar energy. Moreover, they further proposed a time-varying soft constraints on the battery State of Charge (SOC) in order to prevent overconservatism in power scheduling while ensuring robustness against uncertainties. Dufo-López et al. [37] proposed a novel control technique, optimized by Genetic Algorithm (GA), for the control of autonomous micro-grid consisting of renewable energy sources [PV, Wind and hydro], a fuel cell, batteries, an electrolyser, and an AC generator. This technique optimizes the hybrid system control, obtaining the values of different variables that make the overall Net Present Cost (NPC) of the system minimal. Ref [38] developed MPC algorithms for optimal control of distributed energy resources with a battery storage system. Refs [39], [40] demonstrate how the MPC controller in hybrid storage systems tends to be a viable solution. More so, ref [41] presented the control of a hydrogen-based domestic micro-grid by an MPC-based structure. Hence, different works additionally allude to optimal generation for renewable micro-grids considering hybrid storage systems [42], [43]. MPC was also used for energy management of micro-networks connected to charging stations for electric vehicles [44], [45]. Thus, several papers have applied the MPC controller with satisfactory results in the hybridization of ESSs. The MPC controller was used in the Vahidi and Greenwell studies [37], [40], Del Real et al. [40], and Valverde et al. [46]. More so, Arce et al. [47] and Bordons et al. [48] have similar technologies developed in fuel cell and battery hybridization.
A careful review of the previous studies shows that, despite the use of MPCs in energy systems and industries [5], the consideration of measurable disturbance as well as an appropriate control technique, which is of great importance in addressing all the prevailing uncertainties of micro-grid operation, has not been extensively discussed. In some works, the impact of the integration of disturbance prediction in the context of VOLUME 8, 2020 renewable uncertainties is not considered. However, as these uncertainties have a significant influence on the micro-grid operation, they need to be addressed in the scheduling process. The article outlines a technique for taking into consideration the prediction of disturbances in the EMS while using the AMPC control technique. The research shows how AMPC can incorporate disturbance information to predict its effect and boost the performance of micro-grids. This research's most significant contribution is the design of the AMPC algorithm used to dynamically adjust the weight of different objectives as per the state of the system [49], [50].
More so, we incorporate as much information as possible into the technique used in this study and also keep the problem of micro-grid optimization solvable without any heuristics or degradation techniques. More so, we modelled the technological and physical features of the dispatch-able units using as few constraints and variables as possible. In addition, we implemented a feedback mechanism (AMPC), which subsequently reduces the uncertainty identified with time-varying loads and RES power outputs in micro-grid operations. Our contributions in this paper are further outlined as follows; a new model of the entire micro-grid network has been developed using a formalized modeling methodology that is suitable for use in online optimization schemes. An AMPC algorithm based on EMS was developed to minimize the micro-grid running costs, and lastly, simulation results were presented, indicating the viability of the proposed optimization process.

C. CONTRIBUTION
The main contributions of this paper can be summarized as follows: • An advanced control strategy was proposed in this study, i.e., an Adaptive Model-Based Receding Horizon Control technique, mainly for the effective integration of micro-grids into the electrical network; permits the integration of the information on the disturbances prediction, improves the system flexibility and operational reliability and address issues related to the Energy Management System (EMS) in micro-grid operations.
• The impact of considering the prediction of disturbances on the performance of the Energy Management System (EMS) based on the Adaptive Model Predictive Control (AMPC) algorithm to improve the operating costs of the micro-grid with hybrid-energy storage systems was also investigated.
• More so, we also demonstrated how the AMPC algorithm could incorporate disturbance information to predict its effect and boost the performance of micro-grids. The AMPC algorithm was also utilized to dynamically adjust the weight of different objectives as per the state of the system.
• The Effectiveness and superiority of the proposed AMPC control technique in terms of control performance, optimization of the system efficiency, and minimization of the operational costs are investigated through the following three scenarios, where (1) the model used by the AMPC does not include disturbances; (2) disturbances are incorporated into the model. Still, the controller does not have any information on the future evolution of disturbances (constant disturbance prediction). Lastly, when (3) the disturbance prediction is perfect (this is an optimal case that offers the best results that can be compared).
• Comprehensive multi-objective formulation is developed, which weighs the usage of manipulated variables, penalizes the rate, and also helps to keep the stored energy around an operating point.
• Comprehensive case studies with single and hybrid storage systems are presented to provide insights on the significant effects of introducing more battery storage into the micro-grid on the system efficiency and cost function minimization.

D. ORGANIZATION
The rest of this paper is structured in the following manner. The system description and the dynamic modeling of micro-grid components are presented in Section II. The formulation of EMS-based Adaptive MPC optimization problem with the consideration of measurable disturbances is outlined in Section III. Section IV describes the Adaptive MPC-based scheduling of renewable energy-based micro-grid. Simulations of three scenarios: where the model used by the AMPC does not include disturbances, where disturbances are incorporated into the model, but the controller does not have any information on the future evolution of disturbances (constant disturbance prediction). Lastly, when the disturbance prediction is perfect (this is an optimal case that offers the best results that can be compared), and the discussions on the obtained results are provided in Section V. Finally, Section VI concludes the paper.

II. DESCRIPTIONS OF THE SYSTEM MODEL UNDERSTUDY
In this paper, the MATLAB/Simulink environment was utilized to model the system dynamics of a renewable energy-based micro-grid network consisting of RESs (Photovoltaic, PV, Wind Turbine, WT) and Battery Storage system. Moreover, two different kinds of load were considered, the critical and the curtailable loads [51]. This micro-grid network was utilized to examine the impacts of integrating disturbance predictions on energy management system performance based on the proposed control technique used. We investigated two cases in this study; case 1 considers the micro-grid operation using the sustainable generation sources (PV and Wind sources), the fuel cell, the lead-acid battery, and the external grid. Hence, in order to have a hybrid storage configuration, a lithium-ion battery was added in case 2. It is necessary to note that, during the micro-grid's normal operation, the energy generated does typically not meet demand. The battery bank is mainly utilized to store excess energy from renewable sources, but can also be used by electrolysis to produce hydrogen. Moreover, when power from renewable sources is not accessible, the generation deficits can be compensated by a fuel cell using hydrogen. The hydrogen storage network consists of a Proton Exchange Membrane (PEM) electrolyser for hydrogen production and a metal hydride tank for hydrogen storage. In addition, power electronics are used to connect the components to the current DC bus. More so, both the fuel cell and the PEM electrolyser units have their own local controllers, which execute the commands for power conversion. Moreover, two DC-DC converters associated with fuel cell and electrolyser enable the DC bus to transmit power. Conversely, the lead-acid battery bank is directly plugged into the DC bus. Thus, the battery bank maintains the bus voltage, thereby simplifying the configuration. The DC micro-grid should, therefore, adopt this configuration option in order to minimize costs and improve reliability, as the batteries absorb any unbalance in the network [4]. Figures 1 and 2 demonstrate the design overview of the proposed micro-grid electric and control signal system for cases 1 and 2. Case 1 solved the EMS-based energy optimization problem using an AMPC algorithm in a renewable energy micro-grid consisting of generation sources (PV and Wind sources), lead-acid battery, fuel cell, and external grid with the inclusion of the three scenarios considered in this study. Similarly, a renewable energy-based micro-grid, composed of the generation sources (PV and Wind sources), fuel cell, hybrid storage systems (lead-acid and lithium-ion battery), and the external grid is utilized to solve the EMS-based energy optimization problem with the inclusion of the three scenarios considered in this study in case 2. Therefore, a proper model of the dynamics relating to the uncertainty dimension of the micro-grid components should be considered in this design in order to design the micro-grid network in an optimal way.

III. DYNAMIC MODELING OF MICRO-GRID COMPONENTS
This section focuses on the modeling of the dynamic behavior of a renewable energy-based micro-grid, which is a major concept in control engineering and, most notably, in the AMPC control scheme. More so, the mathematical models of the renewable generation technologies (Photovoltaic, PV system or Wind turbine, WT), and energy storage system (Batteries and hydrogen-based systems) with high penetration in micro-grids are discussed in this section. Note that, since the main idea of these models is to build the simplest models that measure up with the objectives, then the model design must be precise and simple enough to prevent computational burden when it is numerically solved. In general, the essence of modeling in control engineering is for control design and simulation to analyze the system behavior. Furthermore, accurate modeling is a major step forward for energy management and VOLUME 8, 2020 helps the optimization algorithm to adapt to exact dispatch decisions [5], [52].
In the AMPC control scheme, model design plays a significant role; meanwhile, these models are incorporated into an optimization problem, which needs simple formulations. In the following subsections, we modeled each of the micro-grid components in the proposed network of micro-grids separately.

IV. MODELING OF THE DISTRIBUTED ENERGY RESOURCES UTILIZED IN THE STUDY
The mathematical models of the DERs (renewable energy-based resources) utilized in the micro-grid are described as follows: A. PHOTOVOLTAIC SYSTEM MODELING Photovoltaic (PV) cells are electronic devices that generate electrical energy from solar radiation. Therefore, the energy the cells transform depends on the temperature, material properties, and solar radiation. This study utilized a twodiode equivalent-circuit model for excellent PV cell performance [53].
The mathematical Equation, which models the currentvoltage behavior of the ideal PV cell, therefore admits expressions as [53]: Equation (4) is the PV cell model's fundamental Equation, which does not reflect the functional I-V characteristics of PV cells. Practical PV module consists of various elements, such as R s , and R p , that need to be introduced into the above Equation (4). PV cell's functional output current admits expression as [50]: where, where, I ph is the photo-generated current by a PV cell, I D1 , I D2 are the diode currents, I O1 , I O2 are the reverse saturation current of diodes D 1 , D 2 , in Ampere. V t is the thermal voltage, V is the cell output voltage, N s , N p is the number of PV cells connected in series and parallel, k is the Boltzmann constant (1.38 * 10 −23 J/K), q is the Charge on the electron (1.602 * 10 −19 ). A 1 , A 2 are the ideality factors of diodes D 1 , D 2 , T is the Reference cell-operating temperature, 20 • C.
The PV cell output current, as defined by Equation (5) is the single PV unit. Hence, in order to achieve the desired voltage and current output level, the PV cells are connected in series and parallel. Where the PV modules are composed of parallel-connected N p cells, the PV module's output current admits expression as [53]: The Equation for the PV current as a function of temperature and irradiance admits expression as: where I sc is the short circuit current under standard test conditions (STC), T = T − T STC (In Kelvin, T STC = 25 • C) are the actual and nominal temperature, G is the surface irradiance of the cell, G STC is the nominal Irradiance under STC (1000W/m 2 , K i is the short circuit current coefficient, usually provided by the manufacturer. The diode saturation current I O1 is dependent on temperature and therefore admits expression as [53]: where E g is the band-gap energy of the semi-conductor (E g = 1.12eV for the polycrystalline silicon at 25 • C, I O , n is the standard test condition (STC) nominal saturation current, which admits expression as: Considering temperature variations, an improved equation to describe the saturation current is obtained from Equations (9) and (10), which admits expression as [54]: where K v is the open-circuit voltage coefficient (value is available on datasheets). More so, a power inverter or a DC/DC converter is utilized to interface the photovoltaic panel with the micro-grid. Maximum Power Point Tracking (MPPT) algorithm is used to track the optimal generation point, which work efficiently with the power electronics associated with the photovoltaic panel.

B. WIND TURBINE SYSTEM MODELING
Wind energy, which is a sustainable power source, uses the rotor blades to convert the kinetic energy in the wind velocity into electrical energy utilizing a technique known as aerodynamic techniques. Wind power has many points of interest over the different forms of energy, such as excellent return on investment and high power density. Wind turbines are utilized to transform wind energy into electric energy. Note that the wind energy system converts the wind's kinetic energy into electrical energy. Hence, the kinetic energy that the dynamic system generated admits expression as [50]: where m is the air mass, V is the velocity of the wind. Similarly, the mass (m) is given as: where ρ is the air density in Kg/m 3 , A is the rotor blade swept area in m 2 and d is the distance covered by the wind in m. Moreover, according to Betz theory, the wind turbine kinetic energy for time (t), i.e., mechanical power (P w ), which is captured by the corresponding mechanical torque and wind turbine admit expressions as [55]: Wind turbine active power depends on the turbine power coefficient or otherwise known as turbine efficiency, which represents the turbine conversion efficiency, and it is given by C p (λ, β) The power or wind energy utilization coefficient of turbine is a function of tip speed ratio, λ and pitch angle, β. Thus, the tip speed ratio, λ, is given as the turbine speed to the wind speed ratio, which is given as: where ω is the turbine angular speed, R is the turbine radius. Similarly, the wind turbine stored real power and the wind turbine torque expressed by equation (14) and (15), respectively, can comprehensively be written as utilized in this research work as: where the wind turbine torque coefficient is expressly defined as: Hence, the most extreme power can be extricated from the turbine just when C p (λ, β) is 0.48, λ is 8.1 and β is 0, therefore, the turbine power coefficient C p (λ, β) , which is a non-linear function, admits expression using the generic function [56]: where, 1 Note that if the pitch angle β = 0, then C p is a function of the turbine tip speed ratio, λ, so, therefore, Equation (20) is reduced to: It is worth mentioning that the wind turbine used in the simulation, utilized Equation (22) to calculate the turbine power coefficient. Similarly, the transmission of energy via the gearbox to the generator is given as: where ω gen is the generator angular speed, T is the mechanical torque, B m is the damping coefficient, T w is the aerodynamic torque and J eq is the generator's equivalent rotational inertia, where [4], [57]: where J w and J gen are the rotational inertia corresponding to generator and rotor and n g is the gear ratio. Similar to the photovoltaic case, wind turbines also utilize MPPT control algorithm for optimal power output.

V. MODELING OF DISTRIBUTED ENERGY STORAGE SYSTEMS UTILIZED IN THE STUDY
ESSs installation in an electrical power network gives the prospect for better economic dispatch management of renewable energies. In the meantime, the control scheme must be able to determine which ESS to use in real-time, depending on the operating conditions. Similarly, the mathematical models of the distributed energy storage systems utilized in the micro-grid are described as follows: A. BATTERY STORAGE SYSTEM MODELING The Battery Energy Storage System (BESS) is an electrical energy storage device. The two battery types utilized in this study are lead-acid and lithium-ion batteries. Therefore, to improve the stability and reliability of the micro-grid network, it is appropriate to introduce some kind of Energy Storage System, ESS, into the micro-grid network. Hence, the ESS discharges its power and supplies the loads in order to meet any local shortage in supplying the loads to the customer [52]. It should be noted that the operation of the micro-grid EMS is simple if only one ESS is used, such as a battery, i.e., the imbalance between generation and demand is absorbed by the battery, given its SOC is between the upper and lower limits. Meanwhile, it is expected that power generation will be halted or that excess energy will be sold to the grid (for grid-connected micro-grids) should in case the upper limit is reached. Hence, more loads must be disconnected, or the lack of energy must be purchased from the grid, should it reaches its lower limit. More so, the criterion is mainly to utilize the control technique to schedule the appropriate storage system with higher efficiency to balance the mismatch between the generation and demand, in the presence of several energy storage systems (such as batteries, hydrogen, ultra-capacitors, or flywheels) [58], [59]. The switching rules among various ESSs are often-times based on the stored energy. The fuel cell and electrolyser switching during microgrid operation that utilizes batteries and hydrogen as energy buffer are usually based on the SOC level of the battery. i.e., the fuel cell is activated as soon as the level of SOC is deficient. Similarly, the electrolyser is switched ON, should the battery SOC level is high as per given limits. Therefore, it is expedient to protect the battery bank from undercharging (low SOC level) or overcharging (high SOC level). In this case, In order to prolong the life span (integrity) of the battery, energy is transferred from the grid by the control system. The battery's' mathematical model is based on a basic voltage source model and an internal resistor. The battery voltage can be expressed as a function of the battery power and the battery current, which is given as [4]: Moreover, charging and discharging of batteries are modeled differently. Thus, when the battery is charging: Similarly, during the discharging period of the battery, the expression is as follows: (27) where V bt,0 is the open circuit battery voltage, V, K bt is the polarization constant (internal parameter of the battery, V), C max,bt is the battery's maximum capacity (Ah), C bt,t is the battery current capacity (Ah), I bt,ch and I bt,dis are the charge and discharge currents, respectively. Note that, this study assumed the C max,bt = C bt,t , which might result due to aging degradation of the battery. This assumption was necessary in order for the value of V bt,int not to approach ∞ during charging and discharging. Thus, δ bt,ch and δ bt,dis are the binary variables of the charge and discharge state of the battery respectively, A bt is the amplitude of the exponential zone, V, B bt is the inverse of the time constant in the exponential zone (Ah −1 ), R i is the internal ohmic battery resistor. The battery capacity (Ah) admits expression as [60]: Lastly, the battery state of charge (SOC) is related to the battery capacity as follows: Therefore, in order to model the dynamic behavior of the battery storage, the battery State of Charge, SOC BS , is taken into account as the state variable. The charging and discharging power is segregated consequent to the disparity in power flow efficiencies between charging and discharging (i.e., η = P out /P in ). Hence, the battery storage discrete-time model admits expression as [61]: where the battery charging and discharging powers, are P ch and P dis , respectively, kW, the storage battery charging and discharging efficiencies are η ch and η dis , respectively, 90% and the battery storage rated capacity is C BS,r , kWh.

VI. HYDROGEN STORAGE SYSTEM
Hydrogen is often seen as a potential option to be used as an energy storage device, particularly when hydrogen is generated with sustainable sources of energy. A complete hydrogen-energy storage system consists of a system for hydrogen production, a hydrogen storage system, and another system for converting hydrogen into electricity, such as a fuel cell or a hydrogen engine. Nonetheless, the most intriguing choice to use in micro-grids is hydrogen production by coupling electrolyser to renewable sources. In this study, we used a metal hydride to store hydrogen, in which the fuel cell can easily double the conversion capacity for the normal operating temperature to convert into electricity [4].

A. MATHEMATICAL MODELING OF ELECTROLYSER
Electrolysers are electrochemical devices, which, when the direct current is applied, can separate hydrogen and oxygen from the water molecules. Thus, the mathematical model of the electrolyser is a simplification of the Equation presented in refs [4], [41]. The electrolyser stack voltage V elz (t), V, is expressed as the product of the number of electrolysis cells N cell elz and the single cell voltage V cell elz .
Similarly, the single-cell voltage is expressed by the following Equation [5]: elz,0 is the Nernst voltage or reversible potential, V cell elz,act is the activation overpotential, V cell elz,ohm is the ohmic overvoltage and V cell elz,conc provides the losses due to concentration mass. Therefore, the voltage drop is the sum of the following terms: V cell elz,ohm (t) = I elz (t) R ohm (35) V cell elz,conc (t) = K conc 1,elz e K conc 2,elz I elz (t) (36) where T elz (t) is the electrolyser temperature, T 0 elz is the temperature in standard conditions, S 0 elz is the entropy change, R and F are ideal gas and Faraday's constant respectively, PO 2 is the oxygen partial pressure, PH 2 is the hydrogen partial pressure, I elz is the electrolyser current, i a0,elz and i c0,elz are the anode and cathode current densities respectively, and K conc 1,elz and K conc 2,elz are the concentration-losses factors of the electrolyser.
Therefore, taking into account the reaction in the electrolysis stack, the mass flow of hydrogen is modelled as follows:

B. MATHEMATICAL MODELING OF METAL HYDRIDE
Metal hydride is a technology utilized in micro-grid hydrogen storage. More so, as per metal hydrides, certain metal (M), most specifically iron, nickel, aluminum, titanium etc. Produce a metal hydride compound via an easily controllable reversible reaction as they react with hydrogen. Hence, hydrogen is stored at moderate pressures with this technology, typically around 2 bar. The general expression is as follows [6]: Meanwhile, this study utilized ref [62] for the mathematical model of metal hydride in the simulation.

C. MATHEMATICAL MODELING OF FUEL CELL
Fuel cells are electrochemical devices that are used for producing energy from hydrogen and oxygen flows. The anode, which is one of the electrodes, is utilized to separate the molecules of hydrogen gas into proton and electron, using a catalyst for the reaction [63]: Similarly, the protons move toward the cathode through the electrolyte.
Therefore, the fuel cell overall reaction is expressed as: Moreover, the fuel cell dynamic, defined by the balances of mass and heat, results in a slow transient response contrasted with ultra-capacitor or batteries. This study utilized Proton-Exchange-Membrane Fuel Cell (PEMFC) since it operates at relatively low temperatures and has a faster response in time. Moreover, they utilize a solid polymer membrane as the electrolyte and platinum as the catalyst. Hence the mathematical model used in this study is based on a simplified model of the study in refs [4], [64]. A fuel stack comprises of several cells VOLUME 8, 2020 N cell fc which are series-connected. The stack voltage admits expression as [4]: Similarly, the single-cell voltage is expressed by the following Equation: V cell Parameters' descriptions are similar to the electrolyser. Thus, the voltage drop is a sum of four terms, which can be expressed with the following expression: More so, the activation losses in the fuel cell can be modeled as a function of two constant coefficients K 1,act and K 2,act and the stack current, I fc .
Similarly, the ohmic losses can be modeled as a function of the equivalent ohmic resistor of the cell R ohm and the stack current I fc .
V cell fc,ohm (t) = I fc (t) R ohm (46) The concentration losses can be modeled as a function of two constant coefficients K conc 1,fc and K conc 2,fc and the stack current.

D. DYNAMIC MODELING OF THE LOAD
The loads in this study can be classified as essential loads and curtailable loads based on a demand management perspective. The demand for power of the critical loads should be regularly met. Thus, each EMU's load forecasting strategies can assist the adaptive controller in making important decisions for the network under study, such as charging and discharging the ESS and buying or selling it to the host grid. The load is predicted by the EMU at-time step, which uses the preceding duration data for a future predefined horizon N p [52]. Moreover, as the AMPC procedure continues, estimates are subsequently revised and delivered to the EMU responsible for updating the parameters of the prediction model to introduce corrections and minimize errors. Consequently, the total micro-grid load demand is expressed as [52], [65]: where the curtailable load demand and essential load demand are P load−curt (t k ) and P load−crit (t k ), respectively, and the curtailment ratio of the curtailable loads is θ (t k ).

VII. FORMULATIONS OF EMS-BASED ADAPTIVE MPC OPTIMIZATION PROBLEM
The EMS's primary goal in a micro-grid network is to reduce the costs of purchased electricity while at the same time maintaining the power balance, generation limits, ESS limits and power exchange limits. Moreover, AMPC problem formulation requires a micro-grid model for predictions; It also requires minimizing the concept of cost function and imposing operational constraints. Hence, this section describes the formulation of the EMS optimization problem. Consequently, the problem formulation is carried out by specifying the objective function, as well as the functional and operational constraints associated with each source of energy [52].

A. COST FUNCTION FORMULATIONS
EMS's primary goal is to ensure a reliable supply of electrical power to its local customers. Meanwhile, the EMS fulfills the following objectives: lowering running costs by decreasing the energy exchanged with the grid, increasing the battery life by preventing deep overcharging and discharging, protecting electrolysers and fuel cells from regular usage by limiting their power rates, and ensuring energy efficiency at the plant by using the most effective storage. The fulfillment of these objectives are attributable to their weights in the cost function [15], [41]. The cost function can incorporate terms that consider the values of the different powers involved (identified with the cost of utilizing each DER) and also the power rates (identified with their lifetimes). It may also penalize the stored energy deviation from a desired point of operation. Therefore, the quadratic cost function associated with each energy source is given to minimize the total system cost, which is solved by the proposed control algorithm (AMPC). Notice that two objective functions are obtained for the various scenarios investigated in this paper, and the AMPC algorithm solver tries to minimize it. The first multi-objective function (Equation (49a)) is used in the scenario when disturbance prediction is not incorporated in the AMPC algorithm. In contrast, the second multi-objective function (Equation (49b)) considers the integration of disturbance prediction. The aim was to investigate the impact of integrating disturbance prediction on the performance of the EMS in micro-grid in terms of cost minimization. Therefore, in order to track the reference outputs, the controller is designed to set P net = 0, which consequently adds a perturbation on P net of which the responsibility of the controller is to balance the rest of the control variables (P fc , P elz , P grid ). Moreover, the highest weight value is often assigned to the P net variable in order to drive the system to attain the system's power balance (P net = P gen − P L = 0). min J = N c k=1 α 1 P 2 grid (t +k)+α 2 P 2 fc (t +k)+α 3 P 2 elz (t +k) + α 4 P 2 bat (t +k)+β 1 P 2 grid (t +k)+β 2 P 2 fc (t +k) α 1 P 2 grid (t +k)+α 2 P 2 fc (t +k)+α 3 P 2 elz (t +k) +α 4 P 2 net (t +k)+β 1 P 2 grid (t +k)+β 2 P 2 fc (t +k) where N c is the time horizon and α i , β i , and γ i are the weights for each variable. The first four terms in this cost function weigh the usage of the manipulated variable, the subsequent four terms penalize the rate, and the last two terms help to keep the stored energy around an operating point. More so, weighting values (in the cost function and operational constraints) are often associated with the priority of using a particular unit, either for operating costs (reference tracking) or for efficiency purposes. For example, it is appropriate to use batteries first, if possible, in a micro-grid with hydrogen storage, when there is a significant mismatch between generation and demand because hydrogen has a lower path efficiency. As a consequence, the weight of the battery will be smaller than that of the fuel cell. This study has selected a quadratic cost function as the system costs to be minimized. Meanwhile, the battery bank utilized in this micro-grid is directly connected to the DC bus, therefore, P bat is not taken as the manipulated variables [4]. The minimization also includes constraints, accurately measured, as shown in Table 1. Notice that some of them are physical limits (e.g., the power generated by the generator or the fuel cell), and others are limits that are imposed to prevent system failure (e.g., power rate required by the fuel cell).

B. DYNAMIC SYSTEM CONSTRAINTS FORMULATIONS
In the optimization problem, which is to minimize the cost function of Equation (49), and solved by the proposed advanced control algorithm, the physical and operational constraints must be put into consideration. The physical constraints include the limited power that can be supplied by the units (external grid, DERs, batteries, fuel cells, electrolysers, etc.). They are physical limits that cannot be trespassed for productive reasons. Notice that there is an upper threshold for all units, but it is often normal for a lower threshold to occur, meaning that once the unit is attached, a minimum power must be supplied. Such constraints relate in this way to the power (variable u (t)) and also to the capacity of the storage units (maximum energy which can be stored in a battery or an ultra-capacitor). In addition, equipment constraints in terms of capacity limits and power rates are implemented to maximize performance, lifespan, and operating & maintenance costs. The battery bank will, therefore, operate in a range of SOC values to prevent overcharging and undercharging, which significantly decreases the number of possible cycles [4], [66]. The following constraints are considered in this study:

C. INEQUALITY CONSTRAINTS
The constraints imposed in the problem of optimal control include the generation limits of the units, which admit expressions such as [4]: The storage limits admit expressions as: Notice that the maximum and minimum values can be the same physical limits, and a protective band can be considered as well, preventing working close to hazardous regions [1], [52].
P min gen ≤ P gen (t) ≤ P max gen (56) In the same way, the other kind of constraints is imposed in order to prevent sudden shifts in the power supplied by the units. These are limits that influence the degradation of the units and will be significant in costly equipment such as fuel cells. It is worthy of note that some of these constraints can be shifted to the soft constraints category if the inequalities are replaced by a weighted term in the cost function. That is the case with the energy-storage capacity constraints [5].

D. ENERGY BALANCE CONSTRAINTS
Including the constraints of the energy balance at each time instant is very essential mainly for the purposes of the power system's stability. More so, to keep the network running effectively and reliably, the micro-grids must meet the power balance constraint [52].
where P gen,i is the power generated by the generation unit i, P sto,i is the power exchange with the storage units, P ext,i is the power exchanged with the external connections such as the main utility grid or other micro-grids, P load,i is the power consumed by the loads. During micro-grid operations, the balance between energy production and demand must always be met; thus, Equation (61) must be applied as a constraint for equality to the formulation.

VIII. ADAPTIVE MPC-BASED POWER SCHEDULING OF RENEWABLE ENERGY-BASED MICRO-GRID
AMPC is a control strategy used in micro-grids and has vast potential for addressing numerous complex problems in the area of micro-grids. While other proven methods can be used to control micro-grids, AMPC offers a generalized structure for handling most of the concerns in an organized way using some common ideas. The approach taken into consideration in this study is primarily to adaptively control the microgrid's EMS (power management) to ensure a reliable supply of electrical power to local load consumers. The primary responsibility of the adaptive controller is to coordinate and, at the same time, manage the power in the micro-grid network by suitably allowing the optimal operation of each generation unit. The problem of AMPC-based optimization offers a solution that indicates an input trajectory and states in the future that meets operational constraints while optimizing those parameters. For each sampling instant, an optimal plan is formulated based on generation and demand forecast and similarly on the knowledge of the level of energy storage.
More so, the first element in the control sequence is introduced, and the horizon is moved [67]. Using the newly available information, a new optimization problem will be solved at the next sampling time. The new optimal design will theoretically compensate for the disturbance that acts on the micro-grid by using the feedback mechanism. AMPC is responsible for the efficient operation of the micro-grid under consideration [4], [52].
The principal sources of uncertainty in this energy management problem are due to incident irradiation, wind speed, and load power forecast. Therefore, the conventional MPC is not successful in managing the varying dynamics of renewable sources, as its control efficiency is deteriorating due to variations in their production capacity. Hence, it is appropriate to use the AMPC controller, which updates the plant's internal model for any changes in operating conditions. Figures 3 and 4 show the block diagram and the flowchart of the AMPC-based EMS control scheme [23], [52]. The state-space model of Equations (62) and (63) are often utilized to model an AMPC, which admit expressions as: where the system state composed of the charging state of the Energy Storage Systems (ESSs) is given as, x (t), similarly, the manipulated vector variables, consisting of the dispatchable generation and the power exchanged by the ESSs, are given as, u (t) and the output vector, which in this case corresponds with the state as y (t). Hence, the AMPC's state-space model can be implemented and can be solved at the same time using Quadratic Programming (QP). As with any network, micro-grids are susceptible to disturbance during normal operation. There are two simple sources of disturbance in micro-grids: the power generated by the RESs (which is usually non-dispatchable) and the power demanded. These are external inputs to the system, which the controller cannot manipulate. As renewable sources are used for the generation, this makes them a problem to be solved by the control system because of their time-varying existence, the complexity of prediction, and lack of manipulative capability. The initial formulation of AMPC does not contain disturbances, but in this context, several AMPC strategies have been introduced to ensure stability and adherence to constraints [68]. Note that the feedback mechanism allows AMPC to reject disturbances, like any other controller. If disturbances can be measured (or estimated), however, their impact on the output can be included in the dynamic model. Thus, the controller can predict their influence on system performance. In this way, AMPC will have a feedforward effect inherently. The impact of these disturbances, d(t), can be applied to the AMPC state-space formulation. Hence, the system's dynamic model can be written as [5]: where B d is the matrix quantifying the effect of disturbances on the states. Now, the forecast includes disturbance values along the horizon that can be calculated (in the case of RESs, weather forecasts may provide them) or that may be considered constant and equal to the current d (t) value. The discrete-time space model of Equation (64) and (65) is obtained mainly by discretization with sample time T s , which is given by the following Equation [69]: where  66) and (67) are expressed as follows [8], [70]: where x (k + 1), x (k), d (k), U (k) and y (k) are the incremental forms of x (k + 1), x (k), d (k), U (k), and y (k), respectively. The MPC is widely divided into two parts: a model identifier for obtaining plant predictions as provided by the optimizer, and an optimizer for deriving control action [71]. Therefore in order to solve the cost function, the MPC optimizer adopts the receding horizon concept. It is also worth VOLUME 8, 2020 noting that only the first component corresponding to the first instant prediction of the optimal solution is retained, and this optimization process is repeated until an optimal control output is obtained that satisfies all the constraints involved. However, determining the controller stability in indirect adaptive control techniques is unwieldy for time-varying nonlinear systems. AMPC is also divided into two parts, the identifier for the plant model and the synthesizer for the controller [72]. The following objectives were explicitly taken into account in the development of AMPC: track the SOC and LOH references in predicted conditions, limit the fuel cell and electrolyser power rate to protect this costly equipment from extensive usage, protect the battery bank against deep overcharging and discharging. Therefore, it is easier to use the battery in a micro-grid with hydrogen storage as the first form of energy storage wherever possible. Since the efficiency of the hydrogen is much lower than the efficiency of the batteries, this approach is only used when there is a huge imbalance between supply and demand. Hence, the AMPC actualizes these goals by formulating a deterministic optimization model with an appropriate objective function and many constraints [4], [71].

IX. CONTROL ORIENTED LINEAR MODEL
The control-oriented model of the micro-grid incorporated into the AMPC optimization procedure is a simplified model. It is worth mentioning that at the EMS level, the generators and loads dynamics are very fast compared to the characteristic sampling time; therefore, it can be neglected. Hence, the main dynamics of interest in this study is that of the storage units, which, together with the balance equation of powers in the bus, will constitute the model to be used by the AMPC control algorithms. The proposed control algorithm (AMPC) utilized a control-oriented linear model for its control design. Hence, a state-space model can be derived utilizing Equations (54) -(55) for the battery and the hydrogen storage. Thus, the state vector is expressed as [4]: Similarly, the vector of the manipulated variable is given as: where SOC (t) is the state of charge of the battery and LOH (t) is the hydrogen level in the hydride tank. Meanwhile, the battery's fixed efficiency value was used to prevent the use of binary variables.
where P bat is the power supplied by the battery and V max is the maximum volume of H 2 (normal cubic meters) that can be stored in the tanks. The manipulated variables are the power that can be exchanged with the grid (P grid ), fuel cell (P fc ) and electrolyser (P elz ). As it is evident in Figures 1 and 2, the battery is attached to the DC bus and absorbs the unbalance, so P bat must compensate for the remainder of the power in the DC bus [4], [51].
Note that the imbalances generated by the difference between power generated by the renewables (non-dispatchable units, i.e., Solar and Wind), and the demand is considered as the disturbances, d (t). Since the demand and generation have a similar impact on the energy balance (one positive and the other negative), it is expedient to group such disturbances into one variable only: Therefore, the generation and demand net effect admits expression as: It is worth mentioning that the generation and demand are measurable quantities; therefore, they are measurable disturbances. Hence, the storage expressions, defining Equation (66) as the measurable disturbance are: However, the conversion values for SOC and LOH vary from charging power to electrical and hydrogen storage between 10 and 90%, and the charging and discharge capacity vary from 600 to 1800 W. The mean value obtained for the battery's conversion coefficient admits expression as: Similarly, in the case of hydrogen, the mean values are expressed as [73]: Then for a sampling time of T s = 60s, the model in matrix form is expressed as [46]: Discretizing the overall continuous structure defined by Equation (81), the model in matrix form obtained for discrete-time is as follows: Evaluating the Matrix expression of Eqn. (82a), it results in Eqn. (82b): Hence, the state considered in the optimization process is the level of the storage devices (batteries (SOC) and hydrogen (LOH)), and the control actions are the power exchanged with the grid and the power of the hydrogen storage network (including an electrolyser, a fuel cell, and hydrogen tanks).
Consequently, a multi-objective function is used to accomplish the entirety of the previous objectives, and the solver aims to minimize it. In summary, the overall objective function of the energy management problem, which is solved by the AMPC algorithm, can be formulated as:  Table 1 shows the system parameters of the main components of the micro-grid utilized in this study. Similarly, Table 2 shows the constraints imposed on the grid, generations, battery, and Hydrogen storage system. Notice that some of them are physical limits (e.g., the power provided by the generator or the fuel cell), whereas others are limits set for safe operation (e.g., the fuel cell's power slew rate). Table 3 shows the weight values imposed on the multi-objective function to be solved by the AMPC control algorithm.

X. SIMULATIONS, RESULTS, AND DISCUSSIONS
This section presents the MATLAB/Simulink simulation of a renewable energy-based micro-grid network composed of RESs (Photovoltaic, PV, Wind turbine, WT) and Battery Energy System. This micro-grid network was utilized to test the control technique applied to energy management to show the impact of integrating disturbance predictions on its performance. Therefore, two cases of separate generation scenarios were investigated in order to show the effectiveness of the proposed AMPC scheme. Case 1, therefore, considered microgrid operation using generation sources (Photovoltaic, PV or Wind Turbine, WT), lead-acid battery, fuel cell, and external grid. Therefore, in order to have a hybrid storage configuration, a lithium-ion battery was added in case 2. The proposed micro-grid system shown in Figures 1 and 2 were simulated on the MATLAB/Simulink environment. The EMS-based energy optimization problem in a renewable energy micro-grid with different types of energy storage systems was solved using an AMPC control algorithm with or without the inclusion of disturbance predictions, which exchanges energy with the host grid. The problem of optimization is solved at each sampling time to determine minimum running costs when satisfying the demand and respecting the technical and physical constraints. The behavior of the proposed controller was studied under various external conditions such as weather and demand changes. Subsequently, we considered two distinct kinds of Renewable Energy Sources (RESs), which were studied independently (Photovoltaic and wind turbine generations). The results of the MATLAB simulation demonstrate how the AMPC can adapt to different generation scenarios, providing an optimized solution for power-sharing among Distributed Energy Resources (DERs) and considering both the physical and operational constraints, as well as optimizing the imposed operating criteria. Furthermore, three scenarios were investigated as regards the incorporation of disturbance predictions in the proposed control algorithm of EMS to examine the impacts of the level of disturbance predictions on its performance and to show the effectiveness of the control algorithm on the cost function minimization. More so, these three scenarios were simulated on the MATLAB/Simulink environment to compare these conditions with similar inputs. The performance criteria utilized to show the degree of effectiveness is the cost function, J , defined in Equation (49). This section utilized Figure 1 to analyze the three scenarios, which are discussed in the following subsections. The first scenario is when the model used by the AMPC algorithm does not include any disturbance prediction. The second scenario is when disturbance prediction is incorporated into the model, but the controller does not have any information on the future evolution of disturbances (constant disturbance prediction). Lastly, is when the disturbance prediction is perfect (this is an optimal case that offers the best results that can be compared).

Scenario 1: The AMPC formulation without integrating disturbance prediction
In this section, we solved the EMS-based energy optimization problem in a renewable energy micro-grid, which comprises of generation sources (Photovoltaic, PV, Wind turbine, WT), lead-acid battery, fuel cell, PEM electrolyser, and an external grid using the AMPC control algorithm. Simulations were conducted to study the controller behavior under various external conditions (changes in weather and demand) to illustrate the theoretical context. Two renewable sources (Photovoltaic, PV, Wind turbine, WT) were, therefore, considered and examined separately. Hence, in order to evaluate the performance of the control system under consideration on the proposed micro-grid of Fig. 1, three distinct generation scenarios (Sunny, windy, and cloudy) were implemented over 24 hours simulation period without including disturbances. The first case is based on a sunny day, which has high solar radiation values and sunshine period. The power that the photovoltaic array generates is mainly concentrated during mid-day. This generation profile corresponds to a sunny day, with high irradiance during the central hours of the day, getting surplus energy and deficit at night. The EMS controls all of the storage units (batteries and hydrogen) to meet demand. Thus, the battery is used during the night to meet the demand until electricity is abundant. The battery then begins charging, and since there is still a surplus of energy, it is stored using the electrolyser in the form of hydrogen and then sells electricity to the grid. If PV generation is unable to satisfy the demand, the battery will be used again until depleted, and then the fuel cell will continue to produce electricity with a small contribution to the grid. Note that within their operating limits, SOC and LOH evolve almost freely, since the weights utilized in the cost function for the reference tracking are small. A state-space AMPC is obtained using the model from Equation (82) without the consideration of the disturbance term.
During the first hour of the day, as shown in Figures 6 and 7, there is a power deficit requiring the battery to compensate for the deficit in the microgrid system. Hence, the control system realizes the impossibility of meeting the demand entirely only with the battery. At about 7:30, the generation exceeds the load, and then continue to supply the load. Meanwhile, the battery continues to charge until its SOC reached its upper limit (75%). At that point, the electrolyser was switched ON to control the SOC level P. A. Gbadega, A. K. Saha: Impact of Incorporating Disturbance Prediction on the Performance of EMSs in Micro-Grid  due to excess energy because the irradiance was very high. Hence, the energy surplus had to be stored in the form of hydrogen. The electrolyser's power consumption grew gradually, as illustrated in Figure 6. Note that, during the first operation of the electrolyser, the controller simultaneously exports surplus energy to the grid to prevent intensive use of the electrolyser and slowly decreases as the electrolyser uses more electricity. Therefore, the battery begins discharging at 10:00 until the SOC value is close to the lower threshold (40%), and then the controller decides to switch ON the fuel cell while simultaneously taking power from the grid to reach the reference point. The grid and fuel cell shared the demand for cost function based on their weights at the end of the day. The weights utilized in the Cost function are determined by power-sharing among battery, electrolyser, fuel cell, and external grid. In the middle of the day, a significant excess of power is generated. Once the batteries are fully charged, and the maximum electrolyser capacity is achieved, a small amount of surplus energy is sold to the host grid. Despite the extensive use of the electrolyser, as the batteries are used during the evening to cover the energy deficit, the final amount of hydrogen does not really meet its initial value [74].
In this scenario, due to the cloudy weather resulting in minimal or no availability of sunlight, the PV generation is unable to meet the demand for most of the day (most often, the net power is below zero). Figures 8 and 9 depict the power flow profile during periods of surplus or deficit energy and the storage level during cloudy days, respectively. The available resources such as the battery, fuel cell, and grid must, therefore, supply any energy deficit within the micro-grid network. Hence, the EMS decides to utilize the battery to meet the load demand. Subsequently, the controller  decides to switch ON the fuel cell even though the SOC is far from its minimum value (around t = 12 hrs in a smooth way), which is also supported by the grid. It is worth mentioning that the controller does not activate the electrolyser, as there is no extra energy in the form of hydrogen to store. Meanwhile, during the second half of the day, when the battery's minimum SOC has been reached, the fuel cell and the external grid feed the load. The fuel cell satisfies the load request for nearly 12 hours, and the batteries are only utilized to balance the power within the micro-grid. Following that, the batteries commit to supplying the power deficit. The batteries, however, reach their minimum SOC after 12.5 hrs and again use the fuel cell. Therefore, the fuel cell is unable to satisfy the load demand on its own because of the thresholds in the power rate and the voltage limits, and it is required to purchase electricity from the grid.
In this scenario, a wind turbine is considered as a renewable energy source, which generates excess power in the microgrid. As can be seen in Figures 10 and 11, the wind turbine produced a significant fluctuation in electricity. A predominantly stored energy, therefore, enabled the electrolyser to operate for most of the day, and some surplus energy is sold  to the grid. It should be noted that the power rate constraints integrated into the controller design, irrespective of the high fluctuation in power produced by the wind turbine, instigated a smooth operation of the electrolyser, the behavior of which was thus quite satisfactory. Thus, the battery still stores energy, but it gets filled up early (from t = 2 hrs to 16 hrs), only injecting power into the bus several times during that period. As there is an energy surplus for most of the day, there is no need to switch ON the fuel cell. This is also not subject to substantial consumption, which would drastically shorten its lifespan. The AMPC controller has adjusted the setpoints slowly according to the optimum estimated cost function. Moreover, by evaluating the cost function of the case of no disturbance prediction, we can, therefore, observe the impact on the micro-grid performance. The cost function, J = 18.685, for the case of no disturbance prediction.

Scenario 2: The AMPC formulation with both constant and perfect disturbances predictions
Similarly, in this section, we solved the EMS-based energy optimization problem in a renewable energy micro-grid, which comprises of generation sources (Photovoltaic, PV, Wind turbine, WT), lead-acid battery, fuel cell, PEM electrolyser, and an external grid using the AMPC control algorithm. Simulations were conducted to study the controller behavior under various external conditions (changes in weather and demand) to illustrate the theoretical context. Two renewable sources (Photovoltaic, PV, Wind turbine, WT) were, therefore, considered and examined altogether. In order to evaluate the performance of the control system under consideration on the proposed micro-grid of Fig. 1, three distinct generation scenarios (Sunny, windy, and cloudy) were implemented over 24 hours simulation period with the integration of both constant and perfect disturbances predictions. More so, we investigated the situation when the disturbances are incorporated into the model. Still, the controller does not have any information about the future evolution of disturbances (constant disturbance prediction). This approach is often utilized in AMPC control scheme, since there is no future information about the disturbances prediction, the most appropriate assumption is that the disturbance will be the same across the horizon as in scenario 1. However, if the information of future disturbance evolution is available, it can be incorporated into the AMPC formulation, then, the disturbances prediction is perfect (this is an optimal case that offers the best results that can be compared). In this case study, the disturbance is given by the net power, i.e., the difference between generation and demand, d(t) = Pgen(t) − Pdem(t), which can be estimated at the current instant t time. Therefore, the effects of these disturbance predictions on the micro-grid performance are also investigated.
To compare both predictive disturbance situations, we performed some simulation with a constant disturbance based on the parameters given in Table 3, with a shift in time horizon (N p = 50) and control horizon (N c = 2), note that these horizons are long enough to realize the impact of predictive disturbances. Consequently, the results obtained utilizing constant disturbance predictions along the horizon are shown in Figures 13 and 14. Thus, the disturbance is estimated in the current instant during the minimization process and is kept constant.  Similarly, the power flows when future disturbances are identified and included in the free-response estimation, which is depicted in Figures 14 and 15. Since the micro-grid operation anticipates the progression of the disturbance, the power flows are more steady compared to when the disturbance is not predicted perfectively, which affects the micro-grid performance. Perfect disturbance prediction is useful when incorporated into the AMPC formulation,  to prevent degradation and prolong micro-grid components' lifetime. Moreover, by evaluating the cost function of both disturbance prediction cases, we can, therefore, quantify the improvement in the micro-grid performance. The cost function, J = 14.968 for the case of constant disturbance prediction and J = 10.524 for perfect knowledge of disturbance prediction of the AMPC controller, which signifies a 29.7% improvement. Therefore, with the following illustration, it is shown that the micro-grid operation can be improved by the AMPC prediction capabilities, provided there is a good forecast.

B. MICRO-GRID OPERATION WITH GENERATION SOURCES, FUEL CELL, HYBRID STORAGE SYSTEMS, AND THE EXTERNAL GRID
A new lithium-ion battery bank is added in this case to the micro-grid system of case 1. For this configuration, a new AMPC algorithm must be devised. The fuel cell is used as a DG, with a cost associated with hydrogen usage (which is not generated in the micro-grid) to demonstrate an example of the generators capable of dispatching. The micro-grid is composed of a PV plant, two different types of batteries, and a fuel cell, as illustrated in Figure 2. The power exchanged with the DC bus can be balanced using this Li-ion battery using its DC/DC converter; so that a new manipulated, P bat2 , variable will appear [5].
A new state variable is incorporated, SOC 1 (t), corresponding to the new li-ion battery, so the state vector is given by T and the manip- The disturbance is similar to the preceding case: d (t) = P gen (t)−P load (t). This battery's SOC is constrained between 35 and 80%, with a maximum load/discharge capacity limited to 3000 W. The control-oriented model is given in this case as [4]: Then, for a sampling time of T s = 30s, the model in matrix form is given as: Discretizing the overall continuous structure defined by Equation (87), the model in matrix form obtained for discrete-time is as follows:  . MATLAB/Simulink representation of scenario 1 without disturbance predictions.
Evaluating the Matrix expression of Eqn. (88a), it results in Eqn. (88b): This section utilized Figure 2 to analyze the three scenarios, which are discussed in the following subsections.

Scenario 1: The AMPC formulation without integrating disturbance prediction Scenario 2: The AMPC formulation with both constant and perfect disturbance predictions
The cost function has the form given by Equation (49). The value of α 4 has been chosen to be large, as shown in Table 3, in order to impose that, the lead-acid battery is primarily utilized to sustain the DC but at its operating voltage and does not contribute to the demand. The increments in power are weighted by the β values given in Table 3. The chosen   that the DERs operate in a coordinated manner during the day to meet demand. As the fuel cell consumes hydrogen, it is switched off for most of the day and only operates at midday (t > 12 hrs) when the energy stored in the Li-ion batteries is not sufficient to fulfill the load (note that it reaches its 30% lower limit). Note that the lead-acid battery was not utilized for a few durations during the simulation. Meanwhile, this could easily be modified by changing the cost function weights α and β [1], [5]. Figure 17 depicts the MATLAB/Simulink representation of scenario 1 without disturbances prediction. The cost function was similarly evaluated for the case without any disturbances prediction and J = 15.625. Consequently, it is evident in the cost evaluation, a reduction in the cost to 57.4% of the baseline value, taking into account the disturbances in the prediction model.
Similarly, the AMPC formulation also integrates the disturbance predictions similar to case 1. The power flows and the storage level of both the batteries are more steady, which affects the performance of the micro-grid. As is evident in Figures 21 and 22, the micro-grid operation is improved due to the perfect disturbance prediction by the AMPC algorithm. The lead-acid battery was used for the first 4hrs to satisfy demand, and then the source of generation took over from 4 hrs until 12 hrs of the simulation. The li-on battery maintained its State of Charge (SOC) of 50% until the 16 hours when the demand is quite high for only the lead battery to satisfy the demand. At this point, the SOC of the li-ion battery starts diminishing. Meanwhile, the grid tends to be ignored in meeting the available demand. Therefore, as the lead-acid battery charges up to SOC of 75%, it begins to meet the load demand. Hence, the li-ion battery starts to operate at 16 hrs until the SOC reaches its minimum limit of 40%. Figure 20 depicts the MATLAB/Simulink representation of the effects of perfect disturbance prediction on the micro-grid performance with hybrid storage systems.  Moreover, by evaluating the cost function of both disturbance prediction cases, we can therefore quantify the improvement on the micro-grid performance. The cost function, J = 9.426 for the case of constant disturbance prediction and J = 6.654 for perfect knowledge of disturbance prediction of the AMPC controller, which signifies a 29.4% improvement.

XI. CONCLUSION AND FUTURE STUDIES
The availability of more reliable and effective energy management techniques is one of the main reasons for developing effective integrated systems based on distributed generations. In this context, the EMS-based Adaptive MPC algorithm is implemented for optimal management of microgrids based on various energy storage systems. The AMPC solves an energy optimization problem with multiple types of energy storage systems in a renewable energy microgrid, which exchanges electricity with the host grid. This problem of optimization is solved at each sampling time to determine minimum running costs while satisfying the demand and considering technical and physical constraints. The controller's proposed behavior has been observed under different external conditions, such as changes in weather and demand. Different scenarios and configurations were used to demonstrate the AMPC's versatility and applicability. The simulations, therefore, show how the AMPC was able to adjust to different scenarios, offering a reasonable solution for power-sharing among the DERs and taking into account both the physical and operational constraints and the optimization of the operational criteria imposed on it. For different weights associated with each DER, different power distribution results can be obtained. In micro-grid operation, the presence of good predictions of disturbances is of great significance as anticipated. Therefore, the implementation of effective prediction approaches for sustainable generation and consumer demand and their incorporation into the EMS will help improve micro-grid operating costs. AMPC's predictive capabilities make it an appropriate method for incorporating accessible information of future generation and demand evolution. This study has demonstrated how the use of an AMPC-based EMS can enhance micro-grid operation, provided there is effective forecasting. More so, it is evident in the cost function, J , obtained from the three scenarios conducted, the cost function was further minimized by introducing the lithium-ion battery storage into the micro-grid. Therefore, as it is seen from the results, the cost function obtained when we utilized hybrid energy storage was reduced compared to when we used just only one battery during the scenario of no disturbances. In addition, considering the case with and without the integration of the information of the disturbance prediction into the AMPC formulations, it is also evident from the cost function minimization that the perfect knowledge of the disturbance prediction is essential for effective micro-grid operations.
Appropriate use of the hybrid ESS necessitates a controller to be designed that takes into consideration all the constraints, limitations, degradation concerns, and the economic costs of each ESS. The high number of constraints and variables to be optimized hinders the control problem, which necessitates advanced control algorithms. Logical (binary) variables such as the start/shutdown of the fuel cell and the electrolyser or the charging/discharging states in the batteries and the ultracapacitor are incorporated in order to control the connection and disconnection of the units (which significantly affects the lifetime). More so, one of the main goals in micro-grid operation is the optimization of the final energy price. It, therefore, makes it very important to have an accurate energy prediction algorithm from generation and consumption that requires a suitable energy price forecasting system. The complexity of the associated control problem of the integration of micro-grids into the electrical market requires advanced control algorithms such as Stochastic [75] and Economic MPC [76]. Thus, a performance comparison of these control methods also requires more investigation. Meanwhile, understanding how variations in parameters affect the output of the model is another critical area that needs attention as renewables uncertainties are major problems in microgrid operations. Sensitivity analysis of a renewable-based micro-grid with Hybrid Energy Storage Systems with different kinds of scenarios is essential to increase reliability and robustness, reduces costs, and improves the performance of the micro-grid.