Position Control Mode

Hello there,
I’ve watched one of your videos:

I am very interested in the Motion Control Mode. How do you make the positioning so smooth?
I am using an open loop stepper and my algorithm currently kind of works like this:
If( currentPosition < desiredPosition ): move Forwards
If( currentPosition > desiredPosition ): move Backwards
Else: Stay

Of course it looks different in code but I think this is the best way to explain. But when I hold my hand against it (like you do with your finger in the video) it is either really tough to hold against (with NEMA34) and even if I use a smaller Motor I feel the steps very hard. Like I said in the video the way you hold against the rotation looks pretty smooth. What are the principles behind this?

Hey Marco!

The position control works via a PID control loop.

It is closed-loop control, so it is reading the encoder (shown near the beginning of the video) and using the PID control algorithm to control the motors position according to the sensor.

The PID althorithm has various parameters which can be tuned to control the behaviour.

In addition, the motor itself is controlled via FOC - field oriented control. This is an algorithm for setting the motor phase currents to control the motors commutation (movement) in an ideal way.
This makes for smoother and more efficient driving of the motor, with direct control over speed and torque.

It is explained in some detail here: https://docs.simplefoc.com/foc_theory

Hey @Marco,

You can’t really achieve this very smooth behavior without closing the loop with a position encoder. If this is something you need I would recommend trying out closed loop with one of your steppers.