0
$\begingroup$

Let's say I want a robot to run at a certain speed. I have one motor attached to each robot rear wheel. The feedback value to the controller comes from an encoder, which outputs pulses per time unit, i.e. the measured variable is speed of the robot.

Something has been bugging me, so please correct me if I am wrong: I don't think it is possible to solely use a P-controller for velocity control. I seems to me that it is impossible to reach the desired target speed if your output signal from the controller (i.e. a velocity value) is proportional to the error value. Then when the error goes towards zero (which is what the P-controller strives for) the output signal (velocity) would go towards zero. But then how can you maintain a non-zero speed? Instead you will probably reach an equilibrium point were the robot velocity control is in a steady-state error. Is this reasoning correct or wrong?

$\endgroup$
2
  • $\begingroup$ Can you clarify this statement? "Then when the error goes towards zero (which is what the P-controller strives for) the output signal (velocity) would go towards zero." The output signal should be going toward the setpoint value while the error simultaneously goes toward zero proportionally. $\endgroup$ Mar 5 at 22:36
  • $\begingroup$ Yes, it's paradoxical which is what I wanted to uplift. A P controller strives to zero the error. But if the control variable is the speed and the output variable also is the speed then: u = Kp * e would give a zero speed as the P controller tries to reach the setpoint (desired speed), which would be impossible if your setpoint is a nonzero speed. Hope I made it clear. $\endgroup$ Mar 8 at 12:01
2
$\begingroup$

output signal from the controller (i.e. a velocity value) is proportional to the error value

I think there is some confusion here.

In a standard velocity control loop, the controller output cannot be the velocity itself, by definition. Instead, the velocity is the feedback, whereas the controller output is most likely the voltage applied to the electrical motor.

That said, your intuition is correct, a simple P controller is not sufficient for achieving the target velocity.

It is easy to verify that, as result of a zero error, the voltage command will be zero, hence the motor won't spin any longer. Thus, a generic target speed different from zero is not attainable.

More rigorously, if we consider that the transfer function voltage-speed can be well approximated with a first-order response, we end up with no integral in the loop if we close it with a simple P controller. In turn, no integral entails a non-null steady-state error. To compensate for that, one must purposely introduce the I term as it is well known.

$\endgroup$
2
  • 1
    $\begingroup$ Thanks man, that relieved me of many questions. Just as an interesting comment, I read about two types of systems: integrated and non-integrated. Example of the former is a water tank or position system where output is the accumulation of input (i.e. integral). In these systems a P controller could work. But in the later, non-integrated systems, such as flow and velocity systems, a P controller won't do. You will need the I-part as well. It all seems quite intuitive in hindsight hehe $\endgroup$ Mar 8 at 12:06
  • 1
    $\begingroup$ Well said! Consider that in practical contexts, a pure P controller won't be up to the task at hand either for integrated systems, as there will be always unmodelled quantities that will force us to introduce the I term. $\endgroup$ Mar 8 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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