The invention relates to a method and a device for tracking a minimum torque per ampere condition for controlling an electrical machine using direct flux vector control. The invention: - determines a torque reference; - determines a provisional flux target from the torque reference using a torque-flux dependency rule; - determines a flux target by adding a low frequency flux signal to the provisional flux target; - controls the electrical machine using direct flux vector control according to the flux target; - measures the current provided to the electrical machine at at least three time events, which are times at which the low frequency flux signal has different values; - estimates a maximum torque per ampere flux from the measured currents; - updates the dependency rule according to the estimated maximum torque per ampere flux.