Speed Regulation Control Loop

Speed regulation tuning

Speed is regulated by the commanded speed, the speed limits and the speed regulation control loop parameters: Speed regulator Kp and Speed regulator Ki. The speed regulation control loop is a closed-loop feedback system use to control the output current based on the measured speed to achieve the specified speed setpoint.

The adjustment of the Speed regulator Kp and Speed regulator Ki will affect the acceleration of the system, rise time, among others (overshoot, settling time, steady-state error and stability).

Tunning effects when increasing a parameter independently:

ParameterRise timeOvershootSettling timeSteady-state errorStability
Speed regulator KpDecreaseIncreaseSmall changeDecreaseDegrade
Speed regulator KiDecreaseIncreaseIncreaseEliminateDegrade

A simple tuning process

Set Speed regulator Ki to 0 and Speed regulator Kp to 1.

With the vehicle under the intended operating conditions/load, induce a step response to assess if the system is responding the way you want it. This looks like commanding full throttle or remote speed command from 0-speed to assess the system acceleration. If it is responding too fast/aggressive, or oscillating, reduce the Speed regulator Kp by 25%. If responding too slowly, double the Speed regulator Kp up to less than 8. Repeat the test iteratively until the system is responding proportionally to throttle input the way you like it. The goal should be to set the Kp as low as is tolerable to have the desired response but not overshoot the target speed.

Once you have the system responding nicely to the throttle input or remote speed command, with Kp only, we can correct the undershoot speed error. Set Speed regulator Ki to 1 and test how the system behaves at the target speed setpoint. If it is still undershooting the target speed, double the Speed regulator Ki up to less than 128. If it is overshooting the target, reduce the Speed regulator Ki by 25%. Repeat the test iteratively until the system is responding the way you like it. The goal is a system that doesn’t oscillate above and below the speed setpoint but settles nicely at the setpoint.

Your system should now be responding quite nicely! Test the response to throttle inputs from various speeds. You might find the system has become a little more aggressive due to the introduction of the Ki variable and might need to reduce both proportionally to bring the response back into the desired range.

Configuration Parameters

Speed regulation


Speed regulator control loop gains


Smart, Silent, Smooth.

Responsive Menu Pro Image Responsive Menu Clicked Image