The objective of this work is to provide an efficient method to control the dosing of chemicals in order to optimise the operation of the complete treatment train associating phosphorus precipitation in a lamellae separator followed by nitrogen removal in a Biostyr® filter with methanol addition. Four coagulation-flocculation tanks of 1.54 m3 total volume were used, followed by a lamellae primary tank of 0.65 m2 footprint and 5.4 m2 total settling surface. On-line measurements were used. The pilot was operated initially with no chemicals, at constant and variable flow. Different control strategies were sought. To help tune the controllers, step changes in chemicals dosing were made to identify the open-loop process transfer function at different flow rates. The system was then operated in closed loop. This proved to be an efficient means of operating the system. Future work will continue to test various control strategies.