Modeling and Simulation of Photovoltaic Arrays