The common mode (CM) noise is caused by the charging and discharging of the parasitic capacitance between the ground and the high dv/dt nodes in the circuits. For switching mode power supply, high dv/dt is inevitable. The parasitic capacitance therefore should be as small as possible. However, power devices consume powers so as to generate heat. Heatsink must be used. The parasitic capacitance between the heatsink and the power devices is thus inevitable. The noise then flows through this parasitic capacitance and finally to the ground. This invention proposes a method to cancel the parasitic capacitance between the power devices and the heatsimk, as a result, the CM noise is significantly reduced. The direct benefit is the reduction of EMI filter size since the corner frequency of EMI filter design is greatly reduced. The invention can be applied to lots of topologies such as boost, buck and buck-boost converters. The implementation is very simple and the cost is very low.