This paper proposes a novel method of compensating harmonic currents generated by consumer electronic equipment that act as harmonic voltage sources, using the correlation function. The distribution transformer is equipped with an additional winding on the secondary side, and a single-phase voltage-source PWM inverter is connected to the added winding, acting as a shunt active filter. The leakage inductor of the added winding behaves as though connected in series to the leakage inductor on the secondary side winding connected to the consumer electronic equipment. The shunt active filter can thus be used to compensate harmonic currents on the source side without an inductor series-connected to the harmonic voltage source. The basic principle of the proposed compensation method is discussed in detail. Digital computer simulation is implemented to demonstrate the validity and practicability of the proposed compensation method using the proposed harmonic current detection method based on the correlation function.