A control system governs fluid level in a well system including a pump
positioned downhole for pumping fluid upward through a tubular, a rod
positioned within the tubular for driving the pump, a prime mover, and a
pumpjack to transmit power from the prime mover to the rod to reciprocate
the rod. A sensor senses a position of the rod or a member of the
pumpjack and outputting signals in response thereto. A controller
receives the signals and computes a plurality of time intervals, each
time interval being between signals and occurring during at least a
portion of an upstroke of the rod. The controller selectively decreases
power output from the prime mover in response to an increase in the
computed time interval.