View Single Post
Old 07-18-2009, 02:48 AM   #2028 (permalink)
MPaulHolmes's Avatar
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,831

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,367
Thanked 1,119 Times in 734 Posts
The new laptop from the SGC is on it's way, but a friend of mine (evrag) let me borrow his laptop, so I decided to get to work loop tuning! I installed all the software, and tried it out.

Here's a graph of the current response when throttle suddenly jumps from 0 to 50 (on a scale of 0 to about 500). This isn't a PI loop, but instead was just some ramping code, like this:

if (throttle < current)
else if (throttle > current)

Also, pwmDuty was in the range 0 to 4088. Throttle feels pretty good on this setting. Not TERRIBLY responsive, but not bad.

The current is blue, and the throttle is red. Each tick mark on the x-axis represents 1/4000 of a second, so it took the current 0.04 seconds to get up to where the throttle was (50 amps about):

I was just trying it out. I wrote the code for the PI loops, and now I'm going to test that. It's almost like having a digital storage oscilloscope! hehe.
kits and boards

Last edited by MPaulHolmes; 07-18-2009 at 03:58 AM..
  Reply With Quote