This paper proposes a novel control solution designed to solve the local and grid-connected distributed energy resources (DERs) management problem by developing a generalizable framework capable of controlling DERs based on forecasted values and real-time energy prices. The proposed model uses sampling-based model predictive control (SBMPC), together with the real-time price of energy and forecasts of PV and load power, to allocate the dispatch of the available distributed energy resources (DERs) while minimizing the overall cost. The strategy developed aims to find the ideal combination of solar, grid, and energy storage (ES) power with the objective of minimizing the total cost of energy of the entire system. Both offline and controller hardware-in-the-loop (CHIL) results are presented for a 7-day test case scenario and compared with two manual base test cases and four baseline optimization algorithms (Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Quadratic Programming interior-point method (QP-IP), and Sequential Quadratic Programming (SQP)) designed to solve the optimization problem considering the current status of the system and also its future states. The proposed model uses a 24-hour prediction horizon with a 15-minute control horizon. The results demonstrate substantial cost and execution time savings when compared to the other baseline control algorithms.
INDEX TERMSController Hardware-in-the-Loop (CHIL), distributed energy resources (DER), distributed generation (DG), distributed storage (DS), energy management, real-time pricing, model predictive control (MPC).