Titration curve estimation for adaptive pH control