The increasing penetration of renewable energy generation (REG) in the microgrid paradigm has brought with it larger uncertainty in the scheduled generation. This along with the inevitable variation between actual load and forecasted load has further accentuated the issue of real-time power balancing. With the advent of smart loads and meters supported by advanced communication technologies, several new possibilities for demand side management have opened up. In this paper, a real time optimization strategy for load side energy management system (EMS) and for power balance is proposed. The proposed strategy achieves power balance by optimizing load reduction. The objective is to ascertain uninterrupted power to critical loads and reduce non-critical loads depending on the priorities for various loads. To further enhance the flexibility of the system, the addition of a battery to the management model is also discussed. The proposed algorithm also makes the system tolerant to possible generator failures if battery is added to the system. The effectiveness of the proposed online power balancing strategy via optimization is demonstrated through various simulation case studies. © IFAC.