Skip to content
knoxsp edited this page May 17, 2020 · 1 revision

You have your motor connected to U, V and W terminals, the encoder is connected, the throttle is connected, and your computer is connected and running your terminal software.

Power up the controller and see the firmware version

There should be no throttle fault

Type in the following command, as shown

KP=1000 KI=20 RUN-PI-TEST2

There should be a very brief hum, and the output from the screen should look something like this

We are running a short test with the settings we have chosen, to determine if the output 'converges' to 0. If you take the output, copy and paste to excel, then generate a graph with the values on the Y axis and the line numbers on the X axis, you will see a graph like this

What you are trying to come up with are settings that make the graph fall to 0 as quickly as possible but go negative as little as possible. Here are some examples from my motor and my controller

These include Kp and KI too low

Kp and KI too high

KP an KI about right

For simplicity, we are using simple division on KP to get KI. When you get about right, you can increase or decrease the numbers individually to get slightly less negative, or drop the time just a bit. KP / 50 seems to work for most motors that have been tested.

remember to SAVE when you are done!

When you change your pack voltage, like changing from 24V for testing to 144V in your vehicle ... you need to run the tune again. The numbers that you saved will run, but different numbers will give less overshoot (negative) or a shorter time to 0V (convergence)

This is your sixth milestone. The controller does the basics - drive your motor smoothly.

If you have trouble getting convergence on your motor, check the appendix for troubleshooting.

Fine tuning of the controler

This section is a bit larger, involves more settings, and is very subjective. You are making the controller YOURS. It will decelerate how YOU want it to. You can configure it for one-pedal driving, where letting off on the throttle gets you mild to aggressive regenerative braking. You can change how responsive the vehicle is for the throttle, the time it takes to go from no torque to maximum torque. Careful with that one - you can wreck gearboxes, CV axles, drive shafts, clutches ... with too much torque too fast.

Clone this wiki locally