1. A method for power management, comprising: applying a decentralized control to manage a large-scale community-level energy system; obtaining a global optimal solution satisfying constraints between agents representing the energy system's devices as a state-based potential game with a multi-agent framework; independently optimizing each agent's output power while considering operational constraints and assuring a pure Nash equilibrium (NE), wherein a state space helps coordinating the agents' behavior in energy system to deal with system-wide constraints including supply demand balance, battery charging power constraint and satisfy system-wide and device-level (local) operational constraints; and controlling distributed generations (DGs) and storage devices using the agent's output.