**Abstract:**
The water discharge from the canal depends on the various canal parameters viz. upstream water level, downstream water level, canal dimensions, etc. For the correct water distribution, the upstream and downstream water levels need to be maintained properly. Continuous discharge of water at constant rate is can be achieved by keeping the difference between upstream and downstream water levels constant. The canal gate opening needs to be corrected according to the changes in the upstream water level, desired water discharge, flow rates, etc. The Proportional Integral Derivative (PID) control algorithms are robust and efficient to achieve zero steady state error. Thus in order to maintain the correct the gate position, PID algorithm can be used. A PID algorithm based embedded system is implemented to maintain the upstream water level in the canal at constant desired level. The implemented system maintains the desired upstream water level within the acceptable tolerance limits.

**Keywords:**
Upstream water level, downstream water level, canal dimension, PID algorithm.