the active current ia(t) can be shown by algebraic formalism to correspond to a scaled version of the current ip(t), that is, the active current ia(t) can be used in place of the current ip(t) to detect regeneration and then to take provisions to limit the capacitor voltage Vdc(t). More specifically, in order to improve the clarity and facilitate the understanding of the present invention, but without this implying any loss of generality, it will be described hereinafter how the active current ia(t) controlled by the method according to the present invention relates to the current ip(t). The instantaneous active power P(t), that is the power absorbed from (if P(t) > 0) or supplied back to (if P(t) < 0) the DC-link, may be expressed in terms of DC-link quantities: Equation (1) The instantaneous current ip(t) absorbed from (if ip(t) > 0) or supplied back/regenerated to the DC-link capacitor 11 (if ip(t) < 0), can be computed by inverting equation (1) : Equation (2) The active power P(t) can also be expressed in terms of the phase currents and voltages of the motor 2 (referred to the motor’s neutral point) by the scalar product: Equation (3) P (t) = V$_{u}$ (t) i$_{u}$ (t) + V$_{v}$ (t) i$_{v}$ (t) + V$_{w}$ (t) i$_{w}$ (t) wherein, by using the dqO-Park’s transformation: Equation (4)