FOC for stepper motors

I am evaluating Trinamic's TMC4671 for controlling a stepper motor in torque and and velocity. Trinamic provides a program TMCL-IDE, it's not really stable, it's quite confusing, but it helps getting started.

The inner control of FOC is for current control, torque and flux, where torque is the component that makes the motor rotate, and flux the component that does not (did I understand that correctly?).

The IDE has an "automatic PI tuning" for all the control loops, but first I naturally concentrate on the innermost: flux/torque. It uses the encoder to know the electrical phi angle, so that it can tune the regulator only using the flux (the component of the force that is radial to the rotation, so the motor is actually not moving).

After doing this, then tuning the PI regulator for velocity, I get a setup that is kind of functional, but the performance is not very good. The velocity control feels "sandy", it is not smooth at all.

If I observe the flux while tuning the current PI regulator, I notice that the measured current is noisy, see left side of the picture:
noisy-flux.png
Especially the low period, regulating the flux to 0, is more jittery than I am comfortable with.

I don't know if I am missing something, or have unreasonable expectations? I would like to fix that first step so that it performs well, before moving on.
 
Top