Is it possible to solely use a P-controller for velocity control?

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?

• You might find my answer to Understanding the flow of a PI controller of interest. Mar 5, 2021 at 16:29
• If you need exact control of speed, no. If you only need the speed to be part of a larger loop, very possibly yes, and it may even have slight advantage over PI control in terms of easier to achieve overshoot spec, in a common situation where the plant is an integrator or single-dominant-pole! Mar 5, 2021 at 17:52

Let's consider the transfer function of a dc motor:

$$\frac{\dot{\Theta}(s)}{U(s)} = \frac{K}{(Js+b)(Ls+R)+K^2}$$

where the variables represent the following terms:

• $$\dot{\Theta} \rightarrow$$ Motor's Rotational Speed (output)
• $$U \rightarrow$$ Armature Voltage (input to motor via some motor drive)
• $$J\rightarrow$$ Moment of Inertia
• $$b \rightarrow$$ Viscous Friction Coefficient
• $$R\rightarrow$$ Electric Constant
• $$K\rightarrow$$ Represents the motor torque and back EMF constant
• $$L\rightarrow$$ Inductance

In order to control the rotational speed of the motor, we need to introduce an appropriate control scheme and design the controller according to some design specifications:

For the sake of simplicity, let's considered the sensor dynamics to be just a gain of $$1$$ and the disturbance term $$G_d(s)$$ to be $$0$$. The simplified block diagram is now the following:

Picking some arbitrary values for the constants (DC Motor Speed: System Modeling) and some conservative design specifications like the following:

• Settling Time $$3$$sec
• Overshoot less than $$10$$%
• Steady State Error less than $$1$$%

Picking a proportional gain of let's say $$K_p = 75$$ leads to the following step response of the closed loop system:

It is obvious that the P-Controller can stabilize the rotational speed of the motor. However, the design specifications, except from the settling time, are not met. We could increase the $$K_p$$ gain in order to meet the steadt state error specification but increasing $$K_p$$ will simultaneously decrease the steady state error and increase the overshoot, which is already out of the boundaries that have been set. If we also consider the effects of the disturbances, which will definitely impact the physical system's behaviour along with the measurements' noise, then the performance of the P-Controller will definitely be inappropriate.

After some experiments, taking a value of $$K_p = 1000$$ drives the steady state error to $$e_{ss} = 0.01$$ but check the step response of the system:

To sum up, as you can see it is possible to stabilize the rotational speed of a dc motor using a simple P-Controller but the characteristics of the response will most of the times be unacceptable and in real-world situations I believe that you will probably never get it to eliminate the steady state error by using just a simple controller despite the fact that in simulations you can eliminate it.

EDIT: In the case of $$K_p = 75$$ the control signal produced by the P-Controller is the following:

This control signal represents the signal (voltage) that will be fed into a specific piece of hardware (Electronic Speed Controller aka ESC) which will be responsible to maintain the speed at the desired levels. Non zero output error means non zero output from the controller. This piece of hardware has itself certain dymanics (a transfer function) that are significantly faster than everything else and can be ignored during the process of controller design (if you want you can model them as well and if you model them you can also check the output of the ESC - see padé approximation for more information). When these dynamics of the ESC reach their steady state, the current speed output of the ESC will be kept steady and the same value of speed will be fed to the real motor. This means that if the output of the controller remains the same for a certain amount of time then the output of the ESC will also remain the same for the same amount of time. Moreover, if the speed has reached exactly the desired value, the output of the controller will be zero. This zero will be fed to the ESC and the ESC will interpret it as "I don't need to change anything" and as a result the speed output of the ESC will remain the same. I have kind of oversimplified things but the whole idea is described.

• I can't quite wrap my head around how the P control can turn the error into zero when zero error would mean zero speed. It seems guaranteed that you will always get a steady-state error because it needs an error to generate an output right? Mar 5, 2021 at 15:13
• Check my edit, hope this helps a bit more. Mar 5, 2021 at 15:47
• Thank you for the detailed answer friend! Mar 5, 2021 at 19:01
• You are very welcome. Don't forget to accept the answer and upvote in case your problem has been resolved. Mar 5, 2021 at 19:14