The present invention relates to a
control unit configured for controlling a motor driving a
piston compressor pump below a selected rotational speed value. The motor is driven by a frequency converter comprising a
rectifier unit being operatively connected to an
inverter unit via an intermediate
DC circuit. According to the present invention the
control unit comprises a
motor speed calculation unit for calculating, in the digital domain, the rotational speed of the motor based on measured BEMF voltages from the motor, a speed controller unit for calculating, in the digital domain, a
stator current reference based on the calculated rotational speed and a rotational speed reference, a D / A converter unit for converting the calculated
stator current reference from the speed controller unit to an analog
stator current reference, a
comparator unit for comparing, in the analog domain, the analog stator current reference and a measured current in the intermediate
DC circuit of the frequency converter, and providing a
comparator unit output in response to this comparison, and a PWM unit for providing PWM control signals to a phase commutation unit in response to the
comparator unit output, said phase commutation unit providing a switch pattern to the
inverter unit based on the measured BEMF voltages from the motor. The present invention further relates to an associated method.