MODELING AND CONTROL OF A GRID CONNECTED PHOTOVOLTAIC SYSTEM