View Single Post
Old 07-22-2009, 10:18 PM   #2059 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,553

Michael's Electric Beetle - '71 Superbeetle 500000
Thanks: 371
Thanked 297 Times in 188 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).
__________________
When I die, I would like to go peacefully, in my sleep, like my grandfather did. Not screaming and yelling like the passenger in his car.
  Reply With Quote