The invention relates to a method and a control device (4) for pumping systems, which, by means of a PID algorithm, regulates the operating frequency of variable-frequency drives (2) connected between a photovoltaic generator (1) and a pumping unit (3), to keep the voltage of the generator (1) within a reference voltage and above the minimum power voltage of the variable-frequency drives (2). When the control device (4) detects a sharp fall in the DC voltage of the generator (1) below a first threshold value, it deactivates the PID algorithm to establish a frequency lower than the operating frequency of the variable-frequency drives (2) and a minimum gradient of sudden deceleration for an increase in the voltage of the variable-frequency drives (2). When the control device detects that the DC voltage has returned above a second threshold value, the PID controller of the control device (4) is reactivated.