System Identification, Estimation, and Forecasting of Water Quality - Part I: Theory