Received October 31, 2019, accepted November 10, 2019, date of current version November 26, 2019. Digital Object Identifier 10.1109/ACCESS.2019.2954050 An Optimal Energy Management Technique Using the ǫ -Constraint Method for Grid-Tied and Stand-Alone Battery-Based Microgrids ELIAN J. AGNOLETTO 1 , DANIEL SILVA DE CASTRO 1 , RODOLPHO V. A. NEVES 2 , RICARDO QUADROS MACHADO 1 , (Senior Member, IEEE), AND VILMA A. OLIVEIRA 1 , (Member, IEEE) 1 S˜ ao Carlos School of Engineering, University of S˜ ao Paulo, S˜ ao Carlos 13566-590, Brazil 2 Department of Electrical Engineering, Federal University of Viçosa, Viçosa 36570-900, Brazil Corresponding author: Elian J. Agnoletto (elianmt@usp.br) This work was supported in part by the Fundação de Amparo à Pesquisa do Estado de São Paulo (FAPESP) under Grant 2013/20721-4, Grant 2014/50851-0, and Grant 2016/25017-1, in part by the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) under Grant 233605/2014-2 and Grant 305892/2017-7, and in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (CAPES) under Finance Code 001 and Grant 88881.030370/2013-0. ABSTRACT The intermittent characteristics of microgrids (MGs) have motivated the development of energy management systems (EMSs) in order to optimize the use of distributed energy resources. In current studies, the implementation of an EMS followed by experimental-based analyses for both grid-tied and stand-alone MG operation modes is often neglected. Additionally, the design of a management strategy that is capable of preserving the storage device lifetime in battery-based MGs using a power gradient approach is hardly seen in the literature. In this context, this work presents the application of an EMS for battery-based MGs which is suitable for both grid-tied and stand-alone operation modes. The proposed EMS is formulated as an optimal power flow (OPF) problem using the ǫ -constraint method which is responsible for computing the current references used by the EMS to control the MG sources. In the optimization problem, the total generation cost is minimized such that the active power losses are kept within pre-established boundaries, and a battery management strategy based on power gradient limitation is included. Finally, the effectiveness of the proposed EMS is evaluated by two scenarios which enable detailed analyses and validation. The first considers a dispatchable and a non-dispatchable source, whereas the second a dispatchable source and a storage device. The experimental results showed that the proposed EMS is efficient in both operation modes and is also capable of smoothing the state of charge (SoC ) behavior of the storage device. INDEX TERMS Battery power gradient, distributed generation, energy management system, microgrid, optimal power flow, storage device. I. INTRODUCTION The connection of distributed generators (DGs) to electrical power systems and the renewable energy sources intermittent characteristics have motivated the study of energy manage- ment strategies to optimize microgrids (MGs) operations, therefore improving DGs performance in an intelligent, safe, reliable and coordinated way [1]. The control concepts applied to MGs are established hier- archically through the primary, secondary and tertiary levels. The energy management is executed at the tertiary level by The associate editor coordinating the review of this manuscript and approving it for publication was Zhen Li. solving an optimal power flow (OPF) problem which opti- mizes the energy resources usage [2]. This is performed based on an objective function differentiation. Typically, the OPF considers power balance constraints, emission of pollutants, fuel cost, performance, security boundaries, power sharing and stability [1], [3]–[9]. Basically, an energy management system (EMS) is addressed following either a decentralized or a centralized architecture. In the former, the management strategy runs locally with slow communication links. In the latter, on the other hand, it operates on the highest control layer and fast communication links are required [10]. The advantage of the centralized approach is that the EMS configuration provides 165928 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ VOLUME 7, 2019