Nonlinear optimal control for the quadruple water tank system