As an industrial roboticist I spent most of my time working with robots and machines which used brushless DC motors or linear motors, so I have lots of experience tuning PID parameters for those motors.
Now I'm moving to doing hobby robotics using stepper motors (I'm building my first RepRap), I wonder what I need to do differently.
Obviously without encoder feedback I need to be much more conservative in requests to the motor, making sure that I always keep within the envelope of what is possible, but how do I find out whether my tuning is optimal, sub optimal or (worst case) marginally unstable?
Obviously for a given load (in my case the extruder head) I need to generate step pulse trains which cause a demanded acceleration and speed that the motor can cope with, without missing steps.
My first thought is to do some test sequences, for instance:
- Home motor precisely on it's home sensor.
- Move $C$ steps away from home slowly.
- Move $M$ steps away from home with a conservative move profile.
- Move $N$ steps with the test acceleration/speed profile.
- Move $N$ steps back to the start of the test move with a conservative move profile.
- Move $M$ steps back to home with a conservative move profile.
- Move $C$ steps back to the home sensor slowly, verifying that the sensor is triggered at the correct position.
- Repeat for a variety of $N$, $M$, acceleration/speed & load profiles.
This should reliably detect missed steps in the test profile move, but it does seem like an awfully large space to test through however, so I wonder what techniques have been developed to optimise stepper motor control parameters.