The present document wants to gather the experience obtained in the development of a Supervisory System for optimal WWTP management and control, its implementation in a real plant (Granollers WWTP) and its evaluation in the day-to-day operation with typical plant situations. This Supervisory System combines and integrates classical control of WWTP (automatic controller for maintaining a fixed dissolved oxygen level in the aeration tank, use of mathematical models to describe the process.) with the application of tools from the Artificial Intelligence field (knowledge-based systems, mainly expert systems and cased-based systems, and neural networks). This document has been structured into nine chapters. The first part is introductory with a review of the state-of-the-art in wastewater treatment control and supervision and the explanation of the complexity of WWTP management (chapter 1). This introductory chapter together with the second one, where the antecedents to the present thesis are reviewed, are good for the establishment of the objectives (chapter 3). Next, chapter 4 describes the peculiarities and specificities of the selected plant to implement the Supervisory System. Chapters 5 and 6 of the present document explain the work carried out to develop and build the knowledge base of the rule-based or expert system (chapter 6) and the case-based system (chapter 7). Chapter 8 illustrates the integration of these reasoning techniques into a distributed multi-layer architecture. Finally, there is a last chapter focused on the evaluation (verification and validation) of, first of all, each one of the techniques individually, and lately, of the overall Supervisory System when facing with real situations taking place in the wastewater treatment plant.