abstract: With the growing penetration of plug-in electric vehicles (PEVs), the impact of the PEV charging brought to the utility grid draws more and more attention. This thesis focused on the optimization of a home energy management system (HEMS) with the presence of PEVs. For a household microgrid with photovoltaic (PV) panels and PEVs, a HEMS using model predictive control (MPC) is designed to achieve the optimal PEV charging. Soft electric loads and an energy storage system (ESS) are also considered in the optimization of PEV charging in the MPC framework. The MPC is solved through mixed-integer linear programming (MILP) by considering the relationship of energy flows in the optimization problem. Through the simulation results, the perf...