0
$\begingroup$

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?

$\endgroup$
7
  • $\begingroup$ See if my answer to electronics.stackexchange.com/a/346759/73158 helps. $\endgroup$
    – Transistor
    Apr 8, 2020 at 23:01
  • $\begingroup$ @Transistor, A very good description of PID. However, the answer assumes that an output is necessary to maintain the setpoint (such as would be the case with speed control). In my case, as we reach target position, there is accumulated Integral which causes the motor to overshoot, and then presumably oscillate back and forth, never settling at its target position. $\endgroup$
    – 19172281
    Apr 8, 2020 at 23:15
  • $\begingroup$ I want to use Integral gain to "push" the motor that extra bit to its setpoint, but can't see how it wouldn't overshoot $\endgroup$
    – 19172281
    Apr 8, 2020 at 23:16
  • $\begingroup$ Read through Eurotherm's PID control made easy twice and then try using their technique to set yours up. They're discussing temperature control but you should be able to adapt the technique. $\endgroup$
    – Transistor
    Apr 8, 2020 at 23:25
  • $\begingroup$ @Transistor, which of the several methods would you suggest? Considering I've chosen not to implement Derivative gain, can my PI controller still be tuned such that the motor will settle at its target position (even with I gain), and the Integral reaches 0, or close to it? $\endgroup$
    – 19172281
    Apr 8, 2020 at 23:34

1 Answer 1

1
$\begingroup$

when setting the proportional gain and the integration constant, it is common practice to include just enough resistance in the model so the control loop is critically damped. this prevents the system from oscillating or "hunting" about the setpoint and represents the optimum PID response regime.

It is also common practice to define a position error window or tolerance band so that when the position lands within the window, the PID system is disabled and replaced by a lock-and-hold system.

$\endgroup$
1
  • $\begingroup$ "when the position lands within the window, the PID system is disabled" - Is this essentially what I described in my question? $\endgroup$
    – 19172281
    Apr 9, 2020 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.