View Single Post
Old 05-25-2016, 02:47 PM   #2767 (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,368
Thanked 1,136 Times in 750 Posts
I have version 1.1 ready now. (or 0.2 haha). I've been testing and editing things the last few days. It has induction, Nissan Leaf permanent magnet using resolver, Toyota MGR permanent magnet using resolver, and "generic permanent magnet" with generic encoder on shaft. I improved the PI loop tuning test so it's successful with a larger range of motors now. The problem was, with some really big motors, in the PI loop test, if you command a current step, properly chosen P and I constants will give convergence in close to 1millisec. So, I had been forcing successful PI loop tuning tests to converge in 2mS for all motors. But yesterday I hooked up a 1.5HP permanent magnet motor, and it required 15ms for convergence. So the test always failed with that motor. Now, I have it run through the possible PI values, allowing 2mS, and if it all fails, then all PI values allowing 4mS, and then 6mS, ... It also halts tests sooner if any oscillation is observed, since oscillation indicates the PI values are too big anyway.

There's also been quite a big of reorganizing by wrapping some things in functions.

I'm very very grateful wehzeh for you getting thingstodo's code up there. His has been tested the most extensively. I've tested the "0.2" code, but not as thoroughly as he has. Maybe I should verify that it all works on the leaf and toyota MGR motor before it gets added to a branch or however the heck that works. The 0.2 code also has some things for debugging built in, which isn't necessarily for public use, but I guess it's not so terrible to have it out there.
__________________
kits and boards
  Reply With Quote