Power grid compensation of harmonics