A closed-loop selective harmonic compensation for active filters