Simulation of Integration of Smart Power Grids Using Distributed Energy Sources