This paper presents the optimization process of a gridconnected photovoltaic (Pv) system@ which is intended to replace a large-scale thermal solar system on the rooftop of a federal ofice building. A PV energy conversion model is described. Based on this model@ array surface tilt angle and array size are optimized. The optimization method is based on maximizing the utilization of the array output energy and@ at the same time@ minimizing the electricitypowersold to thegrid. An efectiveness factor is introduced that takes into account both of these parameters. The array configuration and the output parameters are determined by comparing several PV modules. A 43.2 kWPVsystem is designed@ and operational problems such as harmonic efects and anti-islanding are discussed. Finally@ the system performance is simulated@ and through economic analysis it is shown that the cost of PV system can be recouped in 13 years under the current renewable energy incentive program by the state of Illinois.