Control And Optimization Of Energy Flow In Hybrid Large Scale Systems - A Microgrid For Photovoltaic Based Pev Charging Station