A method of controlling the operating parameters of a membrane bioreactor system, the method including the steps of determining a control algorithm based on the relationship between the value of a parameter of the influent provided to the membrane bioreactor system and an optimal performance measurement parameter of the system and controlling one or more operating parameters of the membrane bioreactor system using the determined control algorithm.