**3. The Role of Energy Storage in Micro-Grids**

A fundamental partner of the micro-grid improved architecture is the ESS embedded in the architecture, which is described in Section 4. Even if the batteries of the EVs connected to the grid may be used according to the V2G paradigm, an embedded ESS is necessary to provide the grid with at least a minimum amount of storage. The ESS is useful as a tank where the excessive energy arising from the production side can be stored, or by which the lacking energy to sustain a user request can be found. The ESS, thus, acts as a mediator between the energy production and the energy consumption

sides, providing several advantages [37]. First of all, the ESS provides a peak shaving function that is useful from both sides. If the peaks in the power demand are sustained by the ESS (e.g., during the fast charge of an EV connected to the grid), the power requirements towards the grid can be relaxed with beneficial effects in both, grid connection costs and technical constraints. On the other hand, ESS will store the peaks in RES energy production due to favorable weather conditions, when the user demand is low or the energy introduction in the main grid is not profitable or even costly. To fully exploit the beneficial effects of the presence of an ESS, a controller that manages the three-way bi-directional energy fluxes is mandatory. The control of the energy fluxes should consider the expected level of energy production (even with possible short and middle term forecasts), the expected demand coming from the user side and the costs, both positive and negative, associated with the power exchange toward the grid. The open research problem is in finding the optimal algorithms with which the energy fluxes are managed and considering the constraints given by the limits in maximum power and maximum energy, which characterize the ESS used in the micro-grid [38–45].
