Automatic control of the activated sludge process—I. Development of a simplified dynamic model