A frequency-dependent virtual impedance approach to improving stability with grid-forming inverters