The goal of this project is to develop a cooperative distributed Home Energy Management System (HEMS) for 1) a single house, and 2) aggregated houses. In this cooperative distributed HEMS, energy sources and loads can coordinate and cooperate with each other to maximize the user comfort, meet the power constraints (e.g., avoid over-loading), optimize the power flows, decrease the system cost and the electricity bill in a single house and among aggregated houses. It also includes smart battery charging/discharging strategies to optimize the integration of the energy storage system. The project consists of design, development and demonstration phases.