Adaptive flow control using slope seeking