Dynamic Energy Management System for a Smart Microgrid | Synapse