A pump controller, comprising: a motor determination unit configured to determine motor operating parameters of a motor configured to control a pump in a well, said motor operating parameters comprising motor torque and motor speed; a pump determination unit operably coupled to the motor determination unit and configured to determine pump operating parameters based on at least one motor operating parameter, said pump operating parameters comprising pump torque and pump speed; a fluid level determination unit operably coupled to the pump determination unit and configured to determine an estimated fluid level in the well; and an adjustment unit operably coupled to the fluid level determination unit, the adjustment unit configured to adjust the pump speed to maintain the estimated fluid level at a predetermined setpoint value, characterised in that, said fluid determination unit comprising a first mode unit configured to generate first mode output data based on operation of the pump in a first mode, including pump speed and pump torque values associated with an identified specific fluid-over-pump value and to store such data; and said fluid determination unit further comprising a second mode unit operably coupled to the first mode unit, wherein the second mode unit is configured to operate the pump in an operational mode in a production manner to determine an estimated fluid level with current speed and torque values of the pump compared to the speed and torque values of the pump generated and stored by the first mode unit. a motor determination unit configured to determine motor operating parameters of a motor configured to control a pump in a well, said motor operating parameters comprising motor torque and motor speed; a pump determination unit operably coupled to the motor determination unit and configured to determine pump operating parameters based on at least one motor operating parameter, said pump operating parameters comprising pump torque and pump speed; a fluid level determination unit operably coupled to the pump determination unit and configured to determine an estimated fluid level in the well; and an adjustment unit operably coupled to the fluid level determination unit, the adjustment unit configured to adjust the pump speed to maintain the estimated fluid level at a predetermined setpoint value, characterised in that, said fluid determination unit comprising a first mode unit configured to generate first mode output data based on operation of the pump in a first mode, including pump speed and pump torque values associated with an identified specific fluid-over-pump value and to store such data; and said fluid determination unit further comprising a second mode unit operably coupled to the first mode unit, wherein the second mode unit is configured to operate the pump in an operational mode in a production manner to determine an estimated fluid level with current speed and torque values of the pump compared to the speed and torque values of the pump generated and stored by the first mode unit. said fluid determination unit comprising a first mode unit configured to generate first mode output data based on operation of the pump in a first mode, including pump speed and pump torque values associated with an identified specific fluid-over-pump value and to store such data; and said fluid determination unit further comprising a second mode unit operably coupled to the first mode unit, wherein the second mode unit is configured to operate the pump in an operational mode in a production manner to determine an estimated fluid level with current speed and torque values of the pump compared to the speed and torque values of the pump generated and stored by the first mode unit.