Applied Energy 278 (2020) 115581 Available online 5 August 2020 0306-2619/© 2020 Elsevier Ltd. All rights reserved. Contents lists available at ScienceDirect Applied Energy journal homepage: www.elsevier.com/locate/apenergy Management of an island and grid-connected microgrid using hybrid economic model predictive control with weather data Danilo P. e Silva a,1 , José L. Félix Salles b, , Jussara F. Fardin b , Maxsuel M. Rocha Pereira c a Federal Institute of Education, Science and Technology of Espírito Santo, Serra, E.S., Brazil b Electrical Eng. Department, Federal University of Espírito Santo, Vitória, E.S., Brazil c Industrial Technology Department, Federal University of Espírito Santo, Vitória, E.S., Brazil GRAPHICAL ABSTRACT ARTICLE INFO Keywords: Microgrid Renewable energy resources Optimization Hybrid economic model predictive control Energy management system Weather data ABSTRACT Microgrid management is a multi-objective problem that involves purchasing and selling energy, time-variant renewable generation, and maintenance costs. The microgrid can operate autonomously on an island or through mode connected with the main grid. This paper proposes an original optimization model for the management of an isolated microgrid that allows the automatic grid connection to provide ancillary services to the main grid, such as selling the excess renewable generation and purchasing electricity to charge the battery bank. The proposed optimization is formulated via hybrid economic model predictive control using weather forecasts performed by a mesoscale meteorological model. It includes new constraints to meet a specific connection/disconnection regulation, such as the minimum connection/disconnection time and the maximum connection frequency. This paper also proposes a new hybrid model of a battery bank that includes the grid connection/ disconnection. Furthermore, the hybrid models of renewable energy sources convert weather data to the wind and photovoltaic power by using the mixed logical dynamical framework. The proposed algorithm is sensitive to the forecasting error, which causes variations of 1% in the met demand, 27.3% in the battery bank costs, and 13.3% in the financial profits. Compared to multi-period mixed integer linear programming and rule-based strategy, we show that the proposed controller manages the microgrid more safely (i.e., it provides state of charge below its critical value during a period less than 25% of that offered by other strategies). In locations with high energy generation, only the proposed optimization furnishes energy sale profit. Corresponding author. E-mail address: jleandro@ele.ufes.br (J.L.F. Salles). 1 Ph.D. student in electrical engineering at Federal University of Espírito Santo. https://doi.org/10.1016/j.apenergy.2020.115581 Received 9 January 2020; Received in revised form 4 July 2020; Accepted 20 July 2020