Input impedance of grid-connected converters with programmable harmonic resistance