An automated system for chemical phosphorus control uses on-site generation of high-quality ferrous reagents.