View Single Post
Old 07-22-2009, 10:18 PM   #2059 (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,202 Times in 765 Posts
I messed with the throttle proportional to power in a variety of contexts, and it works perfectly in some, and acts really weird in others. I'm starting to think that there are different stages where different throttles are appropriate, and maybe a speed sensor is needed to help decide when to switch throttle types. Maybe throttle proportional to torque near 0 rpm, throttle proportional to power once the motor is spinning, throttle proportional to speed at some time???

Say you are on a very steep hill. Let's pretend the Duty is 1 (scale of 0 to 512), and the current is 512. Well, that can happen if the throttle is 1.

Here's some pseudo-code:

power = pwmDuty*current/512.
adjust pwmDuty until power = throttle.


It does NOT feel good to have the current go to 500 when the throttle is almost 0. At least the hardware overcurrent circuit saved my bacon.

Throttle proportional to power feels AWESOME when you are moving. It does NOT feel awesome when taking off. We need a dang speed sensor. There, I said it! hahaha!

Without a speed sensor, the best feeling throttle that I have felt is the current PI loop. Another good one is the one that sort of integrates the speed with torque (ramping code).
__________________
kits and boards
  Reply With Quote