I'm struggling to see how Integral gain is used for motor positioning.
Suppose we have an AC motor (with a 2048PPR encoder on the shaft) connected to a winch which drives an object forwards and backwards. At 0 speed and 0 torque, there is no movement.
Now, using Proportional gain, we can drive the motor to a position and as it approaches the setpoint, the output to the motor decreases. The motor hopefully lands close to the setpoint.
If we use Integral gain, where the error accumulates, when we reach the setpoint the value of I is still high and the motor overshoots (even with very little ki). This wouldn't be a problem if the motor required a non-zero voltage to maintain its position (e.g. using the motor as a hoist).
The Integral may get very small, causing the motor to stop, but wouldn't it then rise up again after some time (depending on Ki), overshoot, and just oscillate around the setpoint infinitely?
A basic solution I've come up with is to use Integral gain to "push" the motor to its setpoint (effectively correcting the steady-state error), and when the motor is "close enough" to the setpoint, set the output to 0.
Is this a commonly used method? Are there any other approaches?