View Single Post
Old 10-10-2014, 06:22 PM   #1189 (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,170 Times in 760 Posts
I fixed the PI loop! and got it tuned crazy fast. There was a mistake in the code

I was doing

newVd = newVd + Kp*error + Ki*sumOfErrors

When it should have been

newVd = Kp*error + Ki*sumOfErrors.

It converges crazy fast and no overshoot. Now I'm finding the optimum rotor time constant. How do I post to the wiki? Then I can update the code. That other code that's on it was so last tuesday. haha

I should add: I don't mind people who critique me kindly. I just had some very bad experiences on the AVR Freaks forum a couple years ago where I was told I was basically an idiot and shouldn't ever try to make things that would go in a moving vehicle. haha.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (10-13-2014)