Statistics for Weak acid/bases and pH control in upflow anaerobic sludge bed reactors