Integration of renewable energy sources (RES) into the ac grid is growing very rapidly to meet the high and reliable load demand. The penetration of this growing microgrid structures within the distribution network are leading to several challenging power quality issues. It is mandatory to maintain the voltage and frequency within the prescribed limits at the local bus under any condition of the renewable sources and load. It is a known fact that the behaviour of RES, loads are unpredictable and the need for energy storage system (ESS) becomes extremely important. The sharing of power among grid, RES and storage plays a very vital role for the stable operation of grid integrated microgrid system. Also, the energy storage devices (ESD) need to be operated within its safe limits. Hence a simple control algorithm for power management is being formulated to generate references for RES, ESS interfaced power electronic converters and grid connected converter to mitigate the power imbalance within the dc grid and support sudden frequency variations of the ac grid. Further this method also improves the power quality condition of the ac system. The proposed algorithm is tested and validated using MATLAB based Simulink environment. © 2015 IEEE.