## 1 Introduction  
Due to environmental issues and the shortage of fossil fuel, the participation of renewable energy sources (RESs) in the power system is expected and desired to increase. Since these are suitable for decentralized deployment, the power distribution system of the future could be designed and operated considering a hierarchical configuration consisting of micro and nanogrids. In fact, homes and neighborhoods can become net-zero energy nano and microgrids [1]. That is to say that the total amount of energy used by a home and/or neighborhood, on an annual basis, is nearly equal to the amount of energy produced by RESs [2]. Assuming that micro and nanogrids are expected to be able to operate autonomously, the most significant challenge is power availability, because the power generated by the RESs is variable and depends on environmental conditions. In such a case, the nano and microgrids should be supported by properly sized and controlled energy storage systems (ESSs). Besides, the system should be able to balance supply and demand obtaining high levels of power quality in both steady-state and transient conditions. The most commonly used energy storage elements in ESSs are batteries, due to their high energy densities. On the other hand, in general, batteries present relatively low power densities, making it difficult for them to compensate for large and sudden power unbalances. This condition can lead to increased power losses and high operating temperatures, which can significantly decrease the lifetime of the battery. Keeping the battery operating as close as possible to the ideal conditions respecting the recommended state-of-charge (SoC) ranges, charging and discharging rates, temperature and cell-charge equalization is very important according to [3,4]. Hybrid energy storage systems (HESSs), with battery and supercapacitor (SC), have been proposed to strike a balance between the complementary characteristics of these two energy storage means [5,6]. The SC can compensate transient power fluctuations while the battery supplies the average and slow varying power demand [5, 6, 7]. The literature reports several approaches for controlling the power sharing between the battery and the SC in applications with HESSs. A two level electrical storage system is presented in [8] to deal with the power fluctuation of RESs. The stress on the battery can be mitigated by a control algorithm that extracts the maximum power from the RESs and uses the SC to deal with the high frequency components of the RES' power fluctuation [9]. A model predictive control system for a HESS is proposed in [10] where a model of the battery and SC is used to generate the gating signals of the DC-DC converters (interfaces) with the high frequency power supplied by the SC. A supervisory energy management strategy (EMS) based on neural networks, which is rather complicated, is proposed in [11]. It has been shown in [12] that a dynamic EMS in a RES integrated with a HESS can provide effective active DC link voltage regulation and reduced current stress on the battery [12]. All these algorithms are based on centralized control employing a communication link between the distributed energy resources (DERs). However, if communication fails, the system is disabled. Thus, centralized control schemes tend to present lower reliability [13, 14, 15]. Since battery and SC in a HESS are usually co-located and the main task of the SC is to prevent the fast varying current components from circulating through the battery, a simple scheme with frequency component separation, based on a low pass filter (LPF) or a high pass filter (HPF) is usually employed [16]. The high frequency and fast varying current components to be supplied by the HESS are processed by the high power density SC, while the average and slow varying components are dealt with by the battery. One issue with this approach is that it tends to forfeit the potential contribution of the SC and its high power capabilities to dynamically improve power quality in a DC nanogrid.