Something funny is going on. I'm not sure about the code you have, but I've updated it on my end, so it will be good to know for sure what you have again.
P = 1, I = 0 should have resulted in ZERO current feedback the whole time. (it's just how the numbers work out on my end) The fact that your controller did what it did shows there was a problem in the software with something other than the PI loop.
|