Intermittent energy source usage, such as solar and wind power, is continuously increasing. Intermittent energy sources are highly dependent on prevailing weather conditions, resulting in stochastic electricity generation. The expected stochasticity in electricity generation will cause issues for the current power grid. Moreover, an expected issue for the Swedish power grid is higher peak loads. Thus, there is an emerging need for novel and smart power systems capable of shifting peak loads in the future electricity grid. Model Predictive Control (MPC) is a sophisticated control method that is suitable for smart-grid aggregators. Hence, MPC can be used to optimally control the efficiency of energy use in a smart grid and shift peak loads. T...