Methodology for pH titration curve estimation for adaptive control