Energy Storage Management And Simulation For Nano-Grids