Minimization of waterbed effect using a frequency-domain algorithm