New Open Source E-Bike/E-vehicle calculator & simulator

Get all your technical information about electric bikes here.

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby swbluto » Thu Jul 08, 2010 7:37 pm

Okay, so just letting any other possibly interested developers what's going on (There doesn't seem to be much of those, but just in case. :) )

I'm trying to incorporate inductance modeling. I reasoned my own solution to the inductance modeling, and the resulting graph in the non-current limited region (The right of the "knee") seems to result in motor torque remarkably similar to ebikes.ca. That's good, even though I'm sure our equations are not that identical.

But, moving to the left of the graph's, I can't seem to come up with a formula that'll transition smoothly into the current limited region. It's either too high or too low and there doesn't really seem to be a "neat" solution (At least it's not obvious to me so far). So I'm wondering if this is why ebikes.ca eventually came up with an iterative approach to experimentally solving the problem because there isn't a formulaic solution.
User avatar
swbluto
10 GW
10 GW
 
Posts: 4424
Joined: Fri May 30, 2008 5:23 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby swbluto » Thu Jul 08, 2010 9:07 pm

Okay, so I went back to re-implementing the ebikes.ca code and in the gap around 150 rpm and below where the results are invalid, I just used the simple resistive model because inductance makes little difference at those low RPMs. Resultingly, there's a "little jump" at that point of transition, but it seems negligible for most practical concerns.

After implementing the ebikes.ca code, I noticed that the battery current and motor current curves are slightly off from what you'd expect. While I messed around with a variable that I could've influenced (Our K factors seem to be off by a factor of around 10), that didn't seem to affect it. So, I'm thinking that's an artifact of the iterative experimental approach of solving the motor current and battery current problem, and it's not apparent on ebikes.ca's curves because they don't tell you the battery current nor motor current.

(The problem is that the motor current and battery current values diverge by 1 to 5 amps when they're supposed to be equal (Motor current > battery current) and the battery current isn't limited at exactly its battery current limit. It's more that battery current limit - .5 amps, but it converges to the actual limit at lower RPMs.)

Anyways, I'm thinking of releasing it in current's state but the curves are just funny. It doesn't really reflect my attention to precision since it's ebikes.ca's "good enough" code, but on the other hand, it makes such a small difference from what you'd actually experience in real life, that it doesn't really functionally matter.

If I release it, I'm thinking of making it a "special version" with a particular emphasis on... it's ebikes.ca's formulas, don't blame me. What do y'all think?

(Btw, I'm not saying the curves are "wrong" although they might be, it's just a little funny looking.)
User avatar
swbluto
10 GW
10 GW
 
Posts: 4424
Joined: Fri May 30, 2008 5:23 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby tostino » Thu Jul 15, 2010 1:31 am

SW, a few months ago I did a bit of work on making the program read a text file for motor info, and fill in the list, rather than having all that data hard coded. I just checked out your newest code, and merged my changes. Is that something you would want me to commit?

I would also like to let ya know... I don't know exactly how well the new formulas are calculating everything. It seems like the efficiency is incredibly low compared to what it should be, and so is the total power out. Also, the "power required" in graphing is broken for me. Haven't had a chance to look into it yet.
tostino
100 kW
100 kW
 
Posts: 1036
Joined: Mon Mar 24, 2008 4:12 pm
Location: New Port Richey, FL

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby swbluto » Thu Jul 15, 2010 2:08 am

Sure, commit it! :D

I'll have to look at the latest release when I get to the work station. I've been trying to add inductance modeling to the code and have been doing some refining, and I haven't uploaded that version to the repository yet. If you can send an .esim file that demonstrates the problems you're noticing, that'd be great. If you let me know what output you were expecting, I can probably pinpoint any possible problems faster.
User avatar
swbluto
10 GW
10 GW
 
Posts: 4424
Joined: Fri May 30, 2008 5:23 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby tostino » Thu Jul 15, 2010 3:24 pm

I'll commit it asap then, i'll just need ya to add me to the team on Assembla. Same username as on here.

And lets see... here are a couple .esim's (one for the new version, one for the old).

Edit: that is not a real world proven setup (yet...) I will make a save of the current bike I have that matches it's performance and attach that too.

Edit#2: okay, the .esim files of my current bike must be on my home computer, i'll see if I can find them when I get home.
Attachments
Saves.rar
(288 Bytes) Downloaded 93 times
tostino
100 kW
100 kW
 
Posts: 1036
Joined: Mon Mar 24, 2008 4:12 pm
Location: New Port Richey, FL

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby swbluto » Thu Jul 15, 2010 3:37 pm

Okay, an invitation has been extended. If the code you're referring to is the "revision 4", yeah, that hasn't been released yet and it's definitely no-good. I have some code that I haven't uploaded yet that's a bit more accurate (And the user can choose between inductive and simple resistive modeling, depending on which they think is more applicable.)
User avatar
swbluto
10 GW
10 GW
 
Posts: 4424
Joined: Fri May 30, 2008 5:23 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby tostino » Thu Jul 15, 2010 3:40 pm

Ahh yeah I meant revision 4. When you said not released, I thought you meant that it wasn't even on the svn. Alright, now i'm on the same page! :)

And thanks for the invite!
tostino
100 kW
100 kW
 
Posts: 1036
Joined: Mon Mar 24, 2008 4:12 pm
Location: New Port Richey, FL

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby tostino » Fri Feb 18, 2011 11:02 am

Just wanted to bump this and say that i've spent the past couple days coding (without all that much to show for it honestly). I committed my changes to the svn, and I still have more work to do. I reverted the inductance code from v4, because it is not working correctly. We need to get a stable version on the svn, then work on the inductance code (I won't be much help I don't think =/).

I also disabled the motor current limiting until I can make sure that it models it correctly (which I wasn't sure of last night).

I added the ability for the program to read the motor info from a text file, rather than having it hard coded. That way we can add new motors easily and quickly.

Some UI errors have been fixed as well.

More work to do! Hopefully I will have a little time this weekend =).
tostino
100 kW
100 kW
 
Posts: 1036
Joined: Mon Mar 24, 2008 4:12 pm
Location: New Port Richey, FL

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby tostino » Sun Feb 20, 2011 12:37 am

Grrr! Well I fixed a few more things such as the graph generating correctly with the Power Needed lining up and all, and I am trying to work on having it tell you predicted quarter mile times... I am just having a hard time with the math for it =/. Anyone have any ideas?

I honestly have no idea how I can put in a distance, and have it tell me the time it takes to get to it... I fail lol.

Edit:
Gah! I thought I had it... but for some reason when I try and feed getDistance() a time, it doesn't return anything... and I don't know where it is looking for info it doesn't have... The only place I see it used is in TimeGraph.java (and it works just fine when used there exactly the same way as I am trying to use it).
tostino
100 kW
100 kW
 
Posts: 1036
Joined: Mon Mar 24, 2008 4:12 pm
Location: New Port Richey, FL

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby auraslip » Sun Feb 20, 2011 1:08 pm

Hey guys,

Totally not related, but I tried to make a spreadsheet to calculate heating a battery pack due to Ri. https://spreadsheets.google.com/ccc?key ... y=COLxqNYI

I know it's inaccurate because it doesn't take into account Ri change as a result of heat or SOC (among other things), but I thought you might be interested in it. Maybe you can make something useful with the idea?
User avatar
auraslip
1.21 GW
1.21 GW
 
Posts: 3646
Joined: Fri Mar 05, 2010 5:19 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby esoria » Mon Mar 21, 2011 4:21 am

Hey boys i try to download SWbluto simulator, but the file is corrupted...
Can you help me?
Thanks
esoria
100 W
100 W
 
Posts: 128
Joined: Tue Sep 07, 2010 4:57 am

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby damcard » Mon Apr 04, 2011 11:42 pm

esoria wrote:Can you help me?


I just tried to download the versions posted here and found them to be corrupted too. Best thing I can come up with short of getting Netbeans and building it is going to http://www.assembla.com/code/ebikecalcu ... des/EvCalc and get the zip there. Or you could look at the previous revisions to get an older one. Hopefully only a correctly built file was committed. Thats what I am trying anyhow. -Damcard
User avatar
damcard
100 W
100 W
 
Posts: 286
Joined: Mon Feb 02, 2009 6:15 pm
Location: San Antonio, TX

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby damcard » Tue Apr 05, 2011 12:14 am

Worked for me. I unzipped it to a directory (in my case '/home/david/Desktop/ebikecalc/EbikeCalc17'). Opened a console in that directory and ran 'java -jar /home/david/Desktop/ebikecalc/EbikeCalc17/EvCalc.jar ebikecalc2.mainFrame'. I have version 1.6.0_24 on 64 bit Ubuntu. -Damcard
User avatar
damcard
100 W
100 W
 
Posts: 286
Joined: Mon Feb 02, 2009 6:15 pm
Location: San Antonio, TX

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby esoria » Tue Apr 05, 2011 2:19 am

Thanks boys :)
esoria
100 W
100 W
 
Posts: 128
Joined: Tue Sep 07, 2010 4:57 am

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby tostino » Tue Apr 05, 2011 6:26 pm

Give me a bit if you want my latest revision... i'll zip it up and post it here.
tostino
100 kW
100 kW
 
Posts: 1036
Joined: Mon Mar 24, 2008 4:12 pm
Location: New Port Richey, FL

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby dodjob » Mon Apr 25, 2011 3:43 pm

I will be one of the thankfull waiters :) thanks for your work!
Felt beer-cruiser MAC 8T lifepo4 36V12AH 12FETS4110 http://www.bavarian-ebikes.com
User avatar
dodjob
100 W
100 W
 
Posts: 292
Joined: Wed Jun 30, 2010 3:46 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby oatnet » Tue May 24, 2011 4:23 pm

I've downloaded the zip file to my puter a few times, but when I try to open it up, Windows 7 sez "Windows cannot open the folder. The compressed (zipped) Folder xxxxx is invalid."

Is it something on my end? I appear to be able to open other zip files - was this maybe corrupted by the upgrade that toasted the pictures?

-JD
Member 117 of 16,xxx

179v VW Camper © 164v Vectrix E-Moto © 72v Norco A-line/x5403 © 60v Specialized Enduro Comp/BMC © 72v x5tracycle © 48v TF IO/BMC © 36v Kepler Friction Drive © Spot-Welding a123 © Pelican Front Packs © Vectrix Battery Replacement © MORE !!


Image大鸡巴 Motors
Knowledge is acquired through experience, everything else is just information - Albert Einstein
"Cheater?" I'm not competing, I'm Commuting!
User avatar
oatnet
100 MW
100 MW
 
Posts: 2507
Joined: Thu Apr 26, 2007 3:03 pm
Location: SoCal, USA

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby Taz » Tue May 24, 2011 4:42 pm

I get an error as well in Window 7. I am using Winzip to extract. I get a "start of central directory could not be found; Zip file corrupt. Possible cause; file transfer error."

I tried it 3 different times on 2 different PCs. I also tried it to a Windows server and it couldn't open it either.
Taz
100 mW
100 mW
 
Posts: 35
Joined: Tue May 17, 2011 10:13 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby auraslip » Tue May 24, 2011 5:52 pm

Taz - I've uploaded it on my site - it's a fresh compression so it should work https://sites.google.com/site/shelbyele ... /tech-docs

Does anyone have any ideas on how I could use this to model using two hub motors at once?
User avatar
auraslip
1.21 GW
1.21 GW
 
Posts: 3646
Joined: Fri Mar 05, 2010 5:19 pm

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby GCinDC » Mon Aug 15, 2011 8:18 am

damcard wrote:
esoria wrote:Can you help me?


I just tried to download the versions posted here and found them to be corrupted too. Best thing I can come up with short of getting Netbeans and building it is going to http://www.assembla.com/code/ebikecalcu ... des/EvCalc and get the zip there. Or you could look at the previous revisions to get an older one. Hopefully only a correctly built file was committed. Thats what I am trying anyhow. -Damcard

Any instructions on how to install/run this simulator? I can't unzip the original and don't know what to do w/ the files listed at the site above. Thanks.
Youtube channel, 2011 Highlights vid. Ebike Nerdcast.
Giant DH Comp: 20s lipo (10Ah), hs3540, 72V 45A 12FET, 900W BMSBattery charger.
GT I-Drive, 20s lipo, 9C, 72V 45A 12FET.
User avatar
GCinDC
1 GW
1 GW
 
Posts: 3457
Joined: Fri Jan 23, 2009 11:19 am
Location: Washington, DC

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby grindz145 » Mon Aug 15, 2011 8:49 am

Yeah I think that download is corrupt...
http://www.endless-sphere.com/forums/viewtopic.php?f=18&t=19548 - Ebike Nerd Podcast
Thanks to Justin @ ebikes.ca! Go there, buy stuff. Support the Revolution :D
User avatar
grindz145
100 MW
100 MW
 
Posts: 2667
Joined: Tue Apr 07, 2009 12:10 pm
Location: Rochester NY

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby zombiess » Wed Mar 07, 2012 11:56 am

Bumping this to find out if there is an update available anywhere or a working version?
Greyborg Hub Motor, Lyen 18FET, Customized full suspension kids MTB. Top Speed 61 MPH
9C 8x8, 24S2P LiPo, Lyen 12 FET, Diamondback Recoil Comp. Top Speed 42 MPH
GreyborgUSA Dealer
zombiess
100 kW
100 kW
 
Posts: 1491
Joined: Tue Feb 01, 2011 2:16 am
Location: Ventura

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby Skippic » Wed Mar 07, 2012 12:31 pm

That one seems dead a long time.

Justin's simulator is now much better than before:
http://www.ebikes.ca/simulator/
Skippic
100 W
100 W
 
Posts: 217
Joined: Tue Jun 22, 2010 11:23 pm
Location: Bratislava, Slovakia

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby zombiess » Wed Mar 07, 2012 1:04 pm

Skippic wrote:That one seems dead a long time.

Justin's simulator is now much better than before:
http://www.ebikes.ca/simulator/


Sure is, but you can't input custom motors to simulate so it doesn't work for me.
Greyborg Hub Motor, Lyen 18FET, Customized full suspension kids MTB. Top Speed 61 MPH
9C 8x8, 24S2P LiPo, Lyen 12 FET, Diamondback Recoil Comp. Top Speed 42 MPH
GreyborgUSA Dealer
zombiess
100 kW
100 kW
 
Posts: 1491
Joined: Tue Feb 01, 2011 2:16 am
Location: Ventura

Re: New Open Source E-Bike/E-vehicle calculator & simulator

Postby swbluto » Wed Mar 07, 2012 1:23 pm

Hello all! I thought there was a working zip somewhere earlier in this thread, but if it's not working anymore, I'll upload one later on today. Thanks for bringing it to my attention! I want you guys to get your awesome e-bikes rolling as soon as possible and spread word of THE REVOLUTION! :D
User avatar
swbluto
10 GW
10 GW
 
Posts: 4424
Joined: Fri May 30, 2008 5:23 pm

PreviousNext

Return to E-Bike Technical

Who is online

Users browsing this forum: No registered users and 14 guests