With the development of the double high power system, the grid-connected environment is showing a weak and complex situation. The existence of grid impedance makes the grid-connected point susceptible to harmonic interference and reactive power fluctuations, deteriorates the quality of grid-connected power, and affects the friendly grid-connected converters. Traditional grid-connected converters that only use active power as the transmission target are already difficult to adapt to the above working conditions. Based on the status quo, a photovoltaic inverter control strategy with harmonic suppression function is proposed. The command current is composed of the harmonic detection link and the DC side voltage stabilization control link. According to the generalized instantaneous reactive power theory, the instantaneous active component, fundamental positive sequence reactive component, and harmonic component of the grid-connected current are detected, and the functions of suppressing harmonics and reactive power compensation of photovoltaic inverter are realized through the current tracking control link. Then, considering the limited capacity of the inverter in the actual situation, a capacity matching strategy based on the composite function photovoltaic inverter is proposed, and a matching coefficient is designed. Considering the external characteristics of the grid-connected converter and the harmonic characteristics in actual working conditions, a strategy is designed with the output active power and the harmonic suppression control effect as the optimal control level, and the reactive power compensation control effect as the sub-optimal level. Finally, a simulation case is carried out to verify that when the photovoltaic inverter is in normal grid-connected operation, it can suppress the harmonic current of the grid-connected point and compensate for the reactive power to the greatest extent. This greatly improves the power quality of the grid-connected point and improves the inverter. The utilization rate of the converter enhances the robustness of the grid-connected converter when facing complex grid-connected conditions. The simulation results verify the effectiveness and feasibility of the proposed strategy. © 2022 Power System Protection and Control Press.