Applicant has found that maximum absolute correction signals idmax(t) and iqmax(t) represent the maximum absolute corrections that yield to a zero the active current iaref(t) when subtracted entirely from the respective currents id and iq. In this respect, the modified active current computed with the modifications yields: Applicant has found that that nullifying the active current ia(t) corresponds to completely stop any regeneration of current. Applicant has found that to avoid overvoltage, it is not necessary to apply the maximum corrections. Only a fraction of idmax(t) and iqmax(t) may be conveniently applied, depending on a voltage level and on some user-defined tuning parameters. Indeed, depending on the voltage level, the active current ia(t) can take also small negative values (that is, to regenerate) with bottom limit - ialstAbs(t), wherein ialstAbs(t) is an absolute value computed at next step. Furthermore, the method performs the step of determining the instantaneous maximum allowable regeneration current ialstAbs(t) (block 130) based on the measured voltage level and a prefixed parameter iaMaxAbs corresponding to a maximum absolute active current for regeneration, for example defined by the user: