The application of a multivariable predictive controller to an activated sludge process is discussed in this work. Emphasis is given to the model identification and the long term assessment of the controller efficiency in terms of economical and environmental performances. A recurrent neural network model is developed for the identification problem and the dynamic matrix control is chosen as suitable predictive control algorithm for controlling the nitrogen compounds in the bioreactor. Using the Benchmark Simulation Model No. 1 as virtual platform, different predictive controller configurations are tested and further improvements are achieved by controlling the suspended solids at the end of the bioreactor. Based on the simulation results, this work shows the potentiality of the dynamic matrix control that together with a careful identification of the process, is able to decrease the energy consumption costs and, at the same time, reduce the ammonia peaks and nitrate concentration in the effluent.