Active Compensation Device for avoiding harmonic resonance problems in isolated electrical systems