Optimal periodic control of activated sludge processes—I. Results for the base case with monod/decay kinetics