How its done with higher end systems including motion cards like Galil where the problem of motor hunting can be eliminated when using say linear scales on the final positioner and some backlash exists.
This is done by using an encoder on the motor as well as the scale or ball screw encoder on the final motion.
In this manner the PID tuning is separated between the two feedback items and is done in two parts.
The control obviously has to accept both feedback sources.
There is a comprehensive tutorial on the Galil web site on this issue.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.