An Energy Management System (EMS) is a comprehensive platform that connects, manages, and optimizes energy flows for businesses or homes (HEM system). It serves as the operating system for smart and responsible energy consumption and production, balancing various energy sources, storage systems (DER), and consumption patterns. EMS aims to maximize efficiency, reduce energy bill, and minimize carbon footprint by dynamically adapting to external factors such as weather, energy prices, and demand forecasts. Modern EMS architectures integrate intelligent networking of components, including communication modules, sensors, and actuators, to enable real-time optimization and predictive maintenance.