View Single Post
Old 01-05-2019, 06:31 PM   #3336 (permalink)
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Originally Posted by ale0502 View Post
I need help with the run-pi-test and run-rotor-test commands.
I have my controller, batteries and motor connected. When I send run-pi-test or run-rotor-test nothing happend, never tell me nothing on terminal, the motor doesnt spin.

Hopefull for someone can help me
The rotor-test does not spin the motor. It sends some pulses into the motor and measures the voltage and current. I think Paul calculates the inductance, reactance, and resistance values he needs for his torque formulas using the rotor-test

If I remember, you need to have a throttle connected for that test to run properly. The throttle signal does not need to be moving, but the signal needs to be in range so that the test will run.

You can log the raw throttle value with this

stream-time 1
stream-raw-throttle 1
stream-throttle 1
data-stream-period 1000

If your raw throttle is above your fault-throttle-position value I think you are OK.

I think the throttle needs to be there for run-rotor-test as well.

Run-rotor-test did not work well for me. My motor is large enough, and the signals were noisy enough, that the system never 'converged'. The idea is to try a bunch of values for KP and KI and use the values that give you the fastest response of the motor without having the motor current go OVER the commanded current.

You can try run-pi-test, but if it does not work try set KP and KI then run-pi-test2 and it will print out a string of numbers. If it gets down to 0 within about 10 lines and does not go below 0, those numbers for Kp and Ki will work OK. It's not an exact science. And the number change with the pack voltage. So if you have numbers that work OK for a 48V pack they will not be very fast for 144V pack, even with everything else the same.

This is my config for my siemens AC motor
p=04000 i=00064
max-battery-amps=0400 amps
max-battery-amps-regen=0400 amps
max-motor-amps=400 amps
max-motor-amps-regen=400 amps
precharge-time=0050 tenths of a sec
rotor-time-constant=018 ms
max-rpm=06000 rev/min
encoder-ticks=1000 ticks/rev
stator-resistance=01024 mOhm
stator-inductance=00030 mHenry
rotor-inductance=00030 mHenry
pack-voltage=124 volts
I think Paul starts out with


Or something like that. He sets P and divides by 25 ... or was it 40? ... to get I

Hope this ... sort of meandering description .. helped a bit. That's all I can remember for problems so far. Let us know when you've confirmed the throttle is OK and we'll see if we can help from there. My poor memory is often triggered by descriptions of things that I know I saw ... but can't remember until someone mentions it!
In THEORY there is no difference between Theory and Practice
  Reply With Quote
The Following User Says Thank You to thingstodo For This Useful Post:
ale0502 (01-05-2019)