###### Abstract
The non-linear models are appropriated despite their numerical complexity, because it is necessary to predict process behavior on a wide range of operating conditions. However, those applications use the exact process model for predictions of system behavior, which is an unrealistic assumption. In most cases, the model is not perfect, and it is necessary to deal with modeling errors that affect the controller performance. In this work, a single-layer economic model predictive controller (EMPC) is proposed to perform the dynamic optimization of the operation of the activated sludge process of a WWTP. A standard simulation platform, the benchmark simulation model (BSM1), is used to test the two EMPC formulations, which are evaluated and compared in terms of the compromise between energy consumption and effluent quality achieved along the evaluation period. The economic-oriented controllers proposed in this work use an approximated non-linear phenomenological model of the process for predictions. The use of the simplified model reduces the computing effort on each controller execution, but produces plant-model mismatch problems while capturing its non-linear behavior. Here, the measurements of the constrained and the controlled variables are used to update the constraints and the cost function in the optimization problem, which is a technique commonly used to address plant-model mismatch problems that can produce infeasibilities and suboptimal operation [20]. Two formulations of the EMPC are considered in this paper, which are distinguished by the use of a pure economic cost function in the controller optimization problem, or a combination of a measure of the deviation from the set point and an economic performance index. The formulation of the economic performance indices is another important issue in the EMPC implementation. Here, the formulation is oriented to obtain a compromise solution between operating costs and effluent quality in terms of ammonium levels in the effluent. This trade-off is represented in the cost function by including an energy consumption index (economic terms) [21], and an index that quantifies the deviation from a desired legal value of the effluent ammonium concentration (quality term) [22]. A number of works addressing the implementation of single-layer EMCP approaches reflects its possibilities as an alternative to hierarchical RTO structures [17]. Nevertheless, its application to WWTPs is scarcely studied [15; 16]. The goal of this paper is to show the suitability of the technique to minimize energy consumption and improve effluent quality by taking advantage of the dynamic behavior of the WWTPs. A novelty of the work with respect to previous works [8; 15; 16] is the execution of the optimization in a scenario where plant-model mismatch can affect the feasibility and the quality of the solution. Note that in the EMPC problem, the objective is the optimization of economics; then, the correction of the mismatch between the predictions and the measurements is quite different from set-point tracking problems [20]. The mathematical description of the proposed control strategies and the process description is presented in Section 2. The particularization of the EMPC to the WWTP is presented in Section 3. The simulation results and analysis are in Section 4, which also presents some conclusions.