This paper presents the hardware architecture and the software development of a real-time knowledge-based
distributed control system for the supervision of a wastewater treatment pilot plant with biological removal of
organic matter and nitrogen. A continuous monitoring of plant and controls data is used by an expert system
developed in G2, a development environment based on object-oriented paradigm. A set of rules and
procedures to help fault detection, plant maintenance, and nitrification - denitrification cycle operation was
implemented and validated at pilot scale. The hardware architecture includes different supervision levels,
including two autonomous process computers (plant control and analysers control).Fundação Calouste Gulbenkian (FCG) - postdoctoral
research grant..Generalitat de Catalunya. Consell Interdepartamental de Recerca i Innovació Tecnològica (CIRIT) - predoctoral fellowship