Speed Control

Speed control is the process of varying the speed of a motor in response to a command input (such as a requested speed). This is the primary function of a Motor Controller. There are two variants of speed control: open loop and closed loop. In open loop, the command input is directly converted into a command for the motor (usually applied voltage). In closed loop, sensor feedback (usually an encoder or potentiometer) is used to measure the motor speed in real time and adjust the applied motor voltage such that the motor speed more closely follows the commanded speed.

Open Loop

During open loop speed control, the requested speed is directly converted into a voltage applied to the motor. This approach is the simplest and easiest to implement and works fine for non-precision use cases. The major drawback of the open loop method is there is no guarantee that the actual motor speed will match the commanded speed. The applied voltage will usually vary as the battery voltage drops, which means the motors will have less torque and spin more slowly. External loads on the motors/wheels, such as loads on a robot's wheels when going up or downhill or when performing a pivot turn, will affect the resulting motor speeds.

Closed Loop

Closed loop speed control corrects the variation in motor speeds by constantly adjusting the applied voltage to the motors using sensor feedback. Sensor options include using encoders or potentiometers to measure a motor's speed or using a Positioning System to monitor the robot's ground speed. Compared to open loop, this approach requires some additional effort including installation of the needed sensors and tuning of the motor control algorithm. Unlike open loop control, the closed loop approach provides a reasonable guarantee that the motor speed will follow the requested speed regardless of battery level and external loads on the motors. Closed loop speed control is well-suited for:

  • Situations where the robot needs to drive completely straight (such as the RealCow Robotic System, which is operated from horseback)
  • Vectoring robots: To vector cleanly in various directions, the wheel speeds of a vectoring robot need to be tightly controlled to ensure they operate in the intended ratios.
  • Autonomous robots: Autonomous robots are much easier to develop when the robot moves the way the software is expecting. Many complications arise when the wheel speeds are varying unpredictably due to external conditions.

Closed loop speed control is most easily implemented using Roboteq and Roboclaw motor controllers. These brands perform similarly, but the Roboteq is preferred because it has error detection for situations where something goes wrong and the encoder signal is lost or disconnected.