Eliminating the leakage current is one of the most important issues for transformerless three phase photovoltaic (PV) systems. In this paper, the leakage current elimination of a three-phase four-leg PV inverter is investigated. With the common mode loop model established, the generation mechanism of the leakage current is clearly identified. Different typical carrier-based modulation methods and their corresponding common mode voltages are discussed. A new modulation strategy with Boolean logic function is proposed to achieve the constant common mode voltage for the leakage current reduction. Finally the different modulation methods are implemented and tested on the TMS320F28335 DSP +XC3S400 FPGA digital control platform. The experimental results verify the effectiveness of the proposed solution.