You need a precise optical or magnetic index marker for one of the recursive quadrature cycles counted to compute phase. Then you need to know torque available and interia on motor to predict when it will stop and what external forces are present with acceptable drift.
There are several approaches to feedback using both computed position and sensed motor current but a servo PID control is essential with phase,velocity and acceleration control and feedback.
Servo feedback using current rotary position, index and motor current are necessary,
- as force ≈k*acceleration(a),
- the integral of a is velocity (v)
- the integral of v is phase (φ)
- the encoder position can be differentiated to get v and differentiated again to get a
- "a" can be compared with target "a" from acceleration ramp current and load
- if load is unknown then it can be periodically auto-calibrated from motor response including backlash and vibration load noise, bearing noise, commutation noise.
- then choose plateau velocity, brake ramp, then below a certain velocity go to position mode feedback until stopped with critical dampening
- then shunt motor with 0V ESR= low to hold with servo corrections from external forces
- dead-band interval of bridge and adjustment rates essentially raising ESR of driver by inverse duty cycle which affects stiffness and servo error on position and power loss in driver/motor.
- there also may be a need to calibrate motor torque when hot vs cold and compensate PID loop.