The intense and continuous increase in the demand for electrical energy around the world presents interesting and very varied challenges to the scientiﬁc community. It is known that the main source of generation, for this essential and indispensable resource in the development and evolution of the modern world that we know, is based on the consumption and exploitation of fossil fuels stored in nature for millions of years.
Due to their inevitable depletion, together with the imperative need to have sustainable and more environmen-tally friendly means of generation, there have been a great impetus in recent time to the research, development and application of alternative sources for the electricity generation based on Renewable Energy Resources (RERs).
Among the characteristics to be highlighted concerning RERs, apart from the most important and interesting which is a practically null environmental pollution, it can be mentioned their abundant, unlimited nature and the great variety of options. The alternatives for this type of resource are strongly linked to the speciﬁc geographical location; for this reason they are generally refereed to as native energy sources. However, they also have some undesirable traits, such as their intermittent and random nature. These points are exactly where the greatest technological and ideological challenges are focused, in order to achieve they acceptance and management in the most efficient and reliable way.
Including renewable energies in a hierarchical, unidirectional and centralized structure, as is the current and tradi-tional electrical system, entails a series of problems to be solved, in order to maintain the quality and reliability of the energy supply to consumers. Energy storage systems emerged as a solution to deal with the undesirable characteristics of RERs. Furthermore, the idea of an electrical grid made up of smaller management and control units, where these storage systems are incorporated, emerged as a structural solution for the conﬁguration of traditional electrical grids.
Thus the concept of microgrid arises, which can be deﬁned as a set of loads, sources of energy generation and storage systems, seen as a single controllable system from the main electrical grid, being able to operate
autonomously or connected and interacting with the grid. A microgrid can have different scales, such as hospital, university campus, industrial parks or domestic residences. These constitute the previous step for the conception of more complex systems, the smart grid, where conventional and renewable generation, consumers and energy storage of di˙erent nature and size are integrated, in an efficient, sustainable and safe way.
In this line of research, Economic MPC is chosen as a tool for an optimal control and management of microgrids.