A model to study the hydraulic performance of controlled irrigation canals