Skip to content

Speed regulator tuning

Speed regulation tuning

The commanded speed, the speed limits and the gains of the speed regulation control loop control the speed. The gains are Speed regulator Kp and Speed regulator Ki. The speed regulation control loop is a closed-loop system. It controls the output current from the measured speed, to get the speed setpoint.

Speed regulator Kp and Speed regulator Ki have an effect on the acceleration, the rise time, the overshoot, the settling time, the steady-state error and the stability.

Note

If Speed regulator Kp Q10 (address 1947) is not zero, the controller uses it in place of Speed regulator Kp.

The table shows the effect when you increase one gain and do not change the other:

Parameter Rise time Overshoot Settling time Steady-state error Stability
Speed regulator Kp Decrease Increase Small change Decrease Decrease
Speed regulator Ki Decrease Increase Increase Remove Decrease

Effect of an increase in each speed regulator gain

Tuning

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

  2. Put the vehicle in its usual operating conditions and load. Do a step-response test: from 0 speed, give a full throttle command or a full remote speed command. Monitor the acceleration.

  3. If the response is too fast, too aggressive, or oscillates, decrease Speed regulator Kp by 25%.

  4. If the response is too slow, multiply Speed regulator Kp by 2. Keep the value less than 8.

  5. Do the test again. Repeat steps 3 and 4 until the response to the throttle is correct.

    Note

    Use the lowest Speed regulator Kp that gives the necessary response without overshoot of the target speed.

  6. When the response is correct with Speed regulator Kp only, correct the speed error below the target.

  7. Set Speed regulator Ki to 1. Do a test at the target speed setpoint.

  8. If the speed stays below the target, multiply Speed regulator Ki by 2. Keep the value less than 128.

  9. If the speed goes above the target, decrease Speed regulator Ki by 25%. Do the test again. Repeat steps 8 and 9 until the response is correct.

    Note

    The speed must not oscillate above and below the setpoint. It must settle at the setpoint.

  10. Do tests of the response to the throttle from different speeds. Speed regulator Ki can make the system more aggressive. If necessary, decrease the two gains by the same proportion until the response is correct.

Low-speed gains (beta)

WARNING

These functions are beta functions. Do a test of the functions in your system before you use them in a product. The behaviour can change in a later firmware version. We are interested in your test results. Send them to your ASI sales representative.

You can use different speed regulator gains at low speed:

  • Low speed Kp (Features4 bit 0): below BETA: Low Speed Kp Start Threshold, the controller uses BETA: Low Speed Kp Value. Above BETA: Low Speed Kp End Threshold, it uses the usual Kp. Between the two thresholds, Kp changes smoothly (cubic spline). The thresholds are a percentage of the motor speed.
  • Target speed Ki (Features4 bit 1): when the target speed is below BETA: Target Speed Ki Start Threshold, the controller uses BETA: Target Speed Ki Value. Above BETA: Target Speed Ki End Threshold, it uses the usual Ki. Between the two thresholds, Ki changes linearly.

To see the gains that the controller uses, read live speed kp (address 1674) and live speed ki (address 1675).

  1. Tune the usual speed regulator gains first. Refer to Tuning.
  2. Enable Features4 bit 0, bit 1, or both.
  3. Set the gain values and the start and end thresholds.
  4. Save the parameters to flash.
  5. Do a test at low speed. Monitor live speed kp and live speed ki.
Parameter Address Units Description
live speed kp 1674 Read only. Speed regulator Kp in use.
live speed ki 1675 Read only. Speed regulator Ki in use.
Features4 1974 Bit field. Bit 0: BETA: Low Speed Kp. Bit 1: BETA: Target Speed Ki.
BETA: Low Speed Kp Value 1975 Kp below the start threshold.
BETA: Low Speed Kp Start Threshold 1976 % motor speed Below this speed, the controller uses the low speed Kp.
BETA: Low Speed Kp End Threshold 1977 % motor speed Above this speed, the controller uses the usual Kp.
BETA: Target Speed Ki Value 1978 Ki when the target speed is below the start threshold.
BETA: Target Speed Ki Start Threshold 1979 % motor speed Below this target speed, the controller uses the target speed Ki.
BETA: Target Speed Ki End Threshold 1980 % motor speed Above this target speed, the controller uses the usual Ki.

Low-speed gain parameters