In order to maximize the power generation of the photovoltaic power generation system under the premise of ensuring the reliable operation of the system, a method for setting the capacity ratio and power limit of the photovoltaic power generation system is proposed. Firstly, the influence of capacity ratio and variable power limit on the lifetime of the IGBT and the power generation of the system is analyzed. Then the optimal setting model of capacity ratio and power limit parameters of photovoltaic power generation system considering the lifetime of power devices is established, and the optimal capacity ratio and power limit are obtained by using the differential evolution algorithm to solve the model. Finally, the analysis results of examples in different latitudes verify the effectiveness of the proposed method.