This document summarizes a research paper that analyzes the optimal design and model predictive control of a standalone hybrid renewable energy system (HRES) for residential demand side management in Pakistan. It describes using HOMER Pro software to simulate 9 scenarios of PV-wind-diesel-battery-converter systems to determine the optimal system design with the lowest cost. The optimal design was found to be a PV-wind-battery-converter system with a net present cost of $47,398 and levelized cost of energy of $0.309/kWh, providing a 100% reduction in emissions. A MATLAB/Simulink model of the optimal HRES was developed and validated. Model predictive control algorithms were also applied to regulate