View Single Post
Old 01-17-2017, 03:25 PM   #2972 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
You can't do the PI test with a resistive load, because the P and I values are related to the inductance and resistance of the stator coil. I would get maybe 48v, and then do
run-pi-test

and see what happens. A better way is to measure the stator resistance, and then use the following formula:

ki = 2000*3.14159*STATOR_RESISTANCE*CURRENT_SENSOR*192* 1702/(BUS_VOLTAGE*2048*10000)

For "CURRENT_SENSOR", you would use 100 if you are using a LEM Hass 100-s. This number is how many amps per 0.625 volts change in the current sensor.
So, if you are using a LEM Hass 50-s, it would be 50, a LEM Hass 300-s, you would use 300, etc... Tamura is the same way. However many amps per 0.625v is what you use.

Then, you could try Kp = 62*Ki all the way up to Kp = 100*Ki. To see what works best, you would type:

run-pi-test2

To see the actual convergence.
__________________
kits and boards
  Reply With Quote
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
ale0502 (01-17-2017), cont (06-02-2019)