In the work presented in this paper, data-driven control is used to tune an Internal Model Control. Despite the fact that it may be contradictory to apply a model-free method to a model-based controller, this methodology has been successfully applied to a Activated Sludge Process (ASP) based wastewater treatment. In addition a feedforward controller over the influent substrate concentration was also computed using the virtual reference feedback tuning and applied to the same wastewater process to see the effect over the dissolved oxygen and the substrate concentration at the effluent.