Averaging Level Control for Urban Drainage System


  • Yongjie Wang
  • Finn Aakre Haugen




averaging level control, MPC, PI, extended Kalman filter, urban drainage system


In the work, averaging level control using model-based control and estimation algorithm on a buffer tank system is studied. Implementation of Model Predictive Control (MPC) and Proportional-Integral (PI) control together with Kalman filter for state and disturbance estimation show decent benefits and potentials. Results show that acceptable setpoint tracking of water level in the basin under varying inflow can be achieved. MPC precedes PI for smoother pump actions. Python as a popular programming language is adopted and showed potential for real-time control (RTC).


N. S. V. Lund, A. K. V. Falk, M. Borup, H. Madsen, and Peter S. Mikkelsen. Model Predictive Control of Urban Drainage Systems: A Review and Perspective towards Smart Real-Time Water Management. Critical Reviews in Environmental Science and Technology 48 (3):279–339. 2018. doi: 10.1080/10643389.2018.1455484.

Dan Simon. Optimal State Estimation: Kalman, H Infinity, and Nonlinear Approaches. John Wiley & Sons. 2006.

L. Sun, O. Seidou, I. Nistor, and K. Liu. Review of the Kalman-Type Hydrological Data Assimilation. Hydrological Sciences Journal 61 (13):2348–66. 2016. doi: 10.1080/02626667.2015.1127376.

National Instruments. NI-DAQmx Python API Documentation. Release 0.5.0. 2017.

VEAS.nu. From Sewage Treatment Plant to Biorefinery - Brochure in English with Key Numbers for 2018. 2018. https://www.veas.nu/global/upload/rBPPQ/files/5155-VEAS-profileringsbrosjyre-A5-ENG-v1-oppslag.pdf.

Cython.org. Cython 3.0a0 Documentation. 2020. https://cython.readthedocs.io/en/latest/. numpy.org. NumPy User Guide. 2021. https://numpy.org/doc/stable/user/index.html.

Matplotlib.org. Matplotlib: Python Plotting - Matplotlib 3.4.2 Documentation. 2021. https://matplotlib.org/.

Python.org. Python 3.9.5 Documentation. 2021. https://docs.python.org/3.9/.

SciPy.org. Minimize(Method=’SLSQP’) - SciPy v1.7.0 Manual. 2021a. https://docs.scipy.org/doc/scipy/reference/optimize.minimize-slsqp.html#optimize-minimize-slsqp.

SciPy.org. SciPy v1.4.1 Reference Guide. 2021b. https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#rdd2e1855725e-12.