The main objective of this work was the design of different effluent quality controllers and a cost controller for WWTPs. This study was based on the relative gain array (RGA) analysis applied to an anaerobic/anoxic/aerobic (A2/O) configuration of a simulated WWTP, with combined removal of organic matter, nitrogen and phosphorus. The RGA analysis was able to point out the best pairing amongst the input and the output control variables of the plant to design low order and decentralized effluent quality controllers, such as proportional-integral controllers for each variable of interest (ammonium, nitrate and phosphate). In a second step, a cost controller to automatically search for the most economic setpoints of the effluent quality controllers was implemented based on the best decentralized control structure tested. The simulated plant was operated under different control modes that chronologically represent control configurations becoming gradually more complex: (i) in open loop; (ii) with dissolved oxygen (DO) control in the last aerobic reactor only; (iii) with the effluent quality controllers active; (iv) with the effluent quality controllers active and automatically receiving the setpoints from a cost controller. The effluent quality controllers alone and the cost control together with effluent quality controllers could save up to 42,000 Euros/year and 225,000 Euros/year, respectively, when compared to the operating costs of the plant operating with DO control (a reduction of 2.5% and 13% of the operating costs, respectively). The cost controller proved to be a good tool for automating the search of the most profitable setpoints of the effluent quality controllers for a given cost setpoint. © 2009 Elsevier Ltd. All rights reserved.