Reactive Power Control And Optimization of Large Scale Grid Connected Photovoltaic Systems In The Smart Grid