Economic model predictive control for energy management of a microgrid connected to the main electrical grid. (September 2022)