Optimal Design and Analysis of Grid-Connected Solar Photovoltaic Systems