Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 05-20-2009, 04:44 PM   #1331 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Mazda Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 17 Times in 14 Posts
I actually haven't seen the source code in a while. I'm not sure if he is still doing the "one per cycle" increment/decrement. That wouldn't really be PI. State space, i think, is what we should really be using, but that's new tech and a little tricky. probably not worth the minor benefits.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-20-2009, 05:24 PM   #1332 (permalink)
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 changed the pwm so it's effectively 14 bit, although it really is only 10 bit. I use an auxiliary variable to store the "fine" PWM duty, and each time it is updated, I shift that value down 4 bits, putting it in the range 0-1023. It makes for very smooth driving at near 0 rpm. I would definitely describe the throttle as a bit squishy as JayC was saying. I might try a PI loop again. It was an abysmal failure last time. The greater PWM resolution I bet will fix that problem. Or I'll just do something like "squishy if change in throttle is small", "fast and snappy if change in throttle is large". That would still allow for smooth takeoffs, and I don't think would require a PI loop. Right now, it feels perfectly smooth, and stopping is pretty quick (4 times faster to slow down than to speed up), but not instantaneous, because it made for jerky driving each time I would take my foot off the gas, I mean throttle haha.


I'm going to get that PI loop working. It will be nice to have when RPM feedback is implemented. I have a little hall effect rpm thing that that was $6 that I haven't tried out yet.
__________________
kits and boards

Last edited by MPaulHolmes; 05-20-2009 at 05:36 PM..
  Reply With Quote
Old 05-21-2009, 12:11 AM   #1333 (permalink)
EcoModding Lurker
 
Join Date: Apr 2009
Location: Maine
Posts: 26
Thanks: 0
Thanked 1 Time in 1 Post
Paul, can you measure the rate of change in the throttle position input and then feed that value in to a sensitivity multiplier? sort of like what Microsoft does for their mouse pointer acceleration. that would allow the driver to control whether it reacts smoothly or aggressively and passenger
__________________
"Experience is something you get right after you need it !"

http://www.diyelectriccar.com/garage/cars/143

http://www.diyelectriccar.com/forums...tor-32083.html
  Reply With Quote
Old 05-21-2009, 12:26 AM   #1334 (permalink)
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
Hey BlackPanther! That's exactly what I was trying to do a few minutes ago, until I realized that I just put the last diaper on our poopy son, so we just got back from Walmart. Now I'll go back to trying out that idea. Thank you! It's too dark to go drive and test it out, so I might do that tomorrow.

Well, I tried it tonight. I couldn't wait. Much more responsive, like a regular car, but a hair wiggly at near 0 rpm (lholding still up a steep hill). With incrementing the fine duty by one, it's VERY smooth, but a bit mushy. I like the term mushy! I'll lower the sensitivity some more to see what happens TOMORROW! HAHAHA!
__________________
kits and boards

Last edited by MPaulHolmes; 05-21-2009 at 01:23 AM..
  Reply With Quote
Old 05-21-2009, 02:32 AM   #1335 (permalink)
EcoModding Lurker
 
Join Date: May 2009
Location: Lake Tapps WA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Paul this is really great stuff you are doing, this has renewed my interest in EV again.

I'm a good fabricator if I can help some how let me know, I'm local to you, Lake Tapps near Auburn.

Torry
  Reply With Quote
Old 05-21-2009, 08:12 AM   #1336 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Mazda Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 17 Times in 14 Posts
Paul, something is fundamentally wrong if you can't get a smooth acceleration out of a PI loop. Can you detail your current and throttle sample rates and filtering methods as well as your PI loop frequency and P and I values and how you came to them?
  Reply With Quote
Old 05-21-2009, 09:56 AM   #1337 (permalink)
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
Thank you I B RACIN! I used to go swimming at Lake Tapps, since I grew up in Auburn. That's weird. Thank you for your offer!

Matt:

I have no doubt that there is something fundamentally wrong with my crappy PI loop. It's a piece of junk right now, but I'll try to make it a bit more clear, and then attach it here for you to look over, maybe tonight. I choose my P and I values by starting with I = 0, and P small (but not that small, only 1/64 I think), then gradually incrementing P until "I noticed overshoot", which was a joke because at the time everything was so noisy that it was a mess. Then I was supposed to back off a bit, and then gradually increase I until more overshoot or oscillations. I haven't tried it with the filtered current that I have now. I really need to try it, then I'll ask you guys what I'm doing wrong. IT was a long time ago since I tried it last, and a lot has changed softwarewise.
__________________
kits and boards
  Reply With Quote
Old 05-21-2009, 10:02 AM   #1338 (permalink)
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Mazda Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 17 Times in 14 Posts
Okay, i'll just leave you alone you've got more important issue to worry about than the fine details of the foot-to-road dynamics. If there's one major lesson I've learned in engineering - perfect is a dream, comprimise puts products on the market.
  Reply With Quote
Old 05-21-2009, 10:56 AM   #1339 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Calgary, AB
Posts: 21

Corolla bandit - '05 Toyota Corolla CE
Thanks: 1
Thanked 1 Time in 1 Post
This project is looking really good. I was hoping I could help out with the code. Paul , could you put it on the wiki or - even better - in charlie_fd's svn repository (/trunk - Open ReVolt - Trac). It sounds like you've been getting a lot of help with the hardware side, let's get the same number of eyes looking at the software.
  Reply With Quote
Old 05-21-2009, 12:11 PM   #1340 (permalink)
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'll attach the stuff to the thing from Adrian once I figure out how to send files there. I logged in, but I don't know how to send files. I'm going to try to fix that stupid PI loop now.

__________________
kits and boards
  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul and Sabrina's Cheap 3 Phase Inverter (AC Controller) with Field Oriented Control MPaulHolmes Fossil Fuel Free 3480 05-04-2022 05:43 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 09:09 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 04:10 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com