On the beneficial effect of periodic forcing on activated sludge models