Open Source Motor/EV Simulator

crossbreak

1 MW
Joined
Aug 2, 2011
Messages
2,884
Location
Germany
Happy to announce: My first, still buggy version of my Motor simulator. Thanks to turbo1889 and miles for helping me on this. Not an EV Sim yet.. but it will become one.

If you find bugs, plz report / fix

Sources:
http://support.ctc-control.com/customer/elearning/younkin/motorParameters.pdf



Things i wanna add:

-> Flipped over Torque - Efficiency -diagram (with torque on X-axis, rather then rpm)
-> Possibility to add more measured data, like different no lkoad amps for different bat voltages
-> Battery sim
-> EV sim (head wind resistance, hill climb ability etc.)
 

Attachments

  • MotSim_Alpha_3.xls
    79.5 KB · Views: 158
  • motor_sim.png
    motor_sim.png
    33.5 KB · Views: 2,770
I have disabled the v3.1 attachments in this post due to the errors in this earlier version but left this post up for reference. Latest v3.2 sheets available in post further down the page. Direct link to new post with latest version:

http://endless-sphere.com/forums/viewtopic.php?f=30&t=59409#p890297




I've also almost got motor/e-bike sim. sheets that are "good enough" (as in not perfect but close enough I'm willing to share). These are the first one that I've got up to date and am ready to post. More will follow (Crank-Drive comes next)





Motor Only Simulator v3.1:

ElecMotSim3.1.xls

Basic Instructions:

----- This is just the bare motor only simulator I am currently using as the "core" of my e-bike simulator sheets.
----- All user adjustable input fields are in red colored lettering and often have explanations and/or instructions below them.
----- Accuracy is not guaranteed, I'm pretty sure this version is more accurate then previous versions of motor sims. I've used as the core of my e-bike calc. sheets but I'm also sure it isn't totally accurate by any means. Also I don't do near as good of job of "show your work" as Crossbreak does and if I were a betting man I'd bet his actual motor sim. is probably better then mine.





Left Drive E-bike Simulator v3.1:

Full Band Left Drive Calculator for E-bikes v3.1.xls





Basic Instructions:

----- The intended purpose of the sheet is to model performance and assist in choice of gearing ratios for a "Left Drive" type e-bike where the motor drives the left side of the rear drive wheel on its own reduction separate from the human pedal drive on the right side which is left normal bicycle style.
----- The first sheet labeled "Left Drive" is the display sheet where you see what it can do after you put in everything else.
----- The last sheet labeled "The Basement" is where all the calc. grids are that crunch the numbers, unless you know what your doing probably don't want to mess with anything on that sheet.
----- All the middle sheets are where you put in stuff about you and your bike and its motor and battery and all that.
----- All user adjustable input fields are in red colored lettering and often have explanations and/or instructions below them.
----- There is a build already put in, its one I want to build myself. Change the inputs to suit your needs. Your probably going to need too because my build that is in it is not a normal e-bike build but rather a pocket-rocket type folding e-bike build with a small fat rear wheel. I do intend to use a GNG small block type motor only in left drive configuration so you should be able to keep some of the motor inputs at least if your running a 48+V system and are using that motor for your build as well.












And a very big thank you to Crossbreak as well who taught me how to figure out how to include inductance into my motor modeling sheet. Whatever he gained from me I think I gained even more from him. So lets shift the credit that direction !!!

Please note my motor simulator that serves as the "core" of my sheet (in my sheets the motor sim is the means to the end not the end) is not exactly the same as his although they are similar to each other.
 
Oooh nice! I love Excel. Gonna have to play around with this some :mrgreen:
 
Add battery resistance. :)
 
sure. that's easy. Any idea about a little more sophisticated battery model? Maybe you have a link for us? Thx!

Edit: Ok not so trivial. With "iteration" activated in Excel this is really simple.. i have to look over the formulas again there must be a way to avoid that.

If you dont have iterations activated, you will get an Error 522
 

Attachments

  • MotSim_Alpha_6.xls
    99.5 KB · Views: 118
  • MotSim_Alpha_6_TGY-80-100_8_WYE.xls
    99 KB · Views: 86
Okay, first of all, the ability to solve for the inductance that I "discovered" in my Version-3.1 posted earlier was nothing more then a math error. Found error and fixed it along with some other things to update to Version-3.2 including updating my left drive calculation sheet and then worked on the crank drive version and brought that one up to Version-3.2 update level and then really crunched the numbers to manage to put together a full gear range version of my crank-drive sheet. Here they be:


View attachment ElecMotSim3.2.xls

View attachment Full Gear Band Left Drive Calculator for E-bikes v3.2.xls

View attachment One Gear At A Time Crank Drive Calculator for E-bikes v3.2.xls

View attachment Full Gear Band Crank Drive Calculator for E-bikes v3.2.xls




Similar set-up and format as previous v3.1 but with some errors corrected and now the crank drive sheets as well. Both of the full gear range sheets can simultaneously analyze up to 30 different unique gearing combinations. Be warned because of the extensive data crunching required to accomplish that for the full gear range crank drive analysis sheet Excell can take up to a full second of time to register each new input as you type it in and crunch the numbers so don't get ahead of it typing and tabbing with your inputs and give it a second or so between changing each input variable to grind through its calculations before entering the next input variable.
 
Okay, here is some more updates:



View attachment Simplified Full Gear Band Crank Drive Calculator for E-bikes v3.2.xls

View attachment Symbiotic Human-Electric Crank Drive Gearing Ratio Calculator for E-bikes v3.2.xls


Provided you have a large enough number of gears spaced close enough together to span your total gear range such that the power curve of your crank-drive e-bike can be simplified as a continuous power band between your lowest and highest available gear ratio then this simplified version of the full gear band crank drive calculator is much easier to use, much simpler, takes up much less memory space, and does not slow down Excel to a slow grinding pace. You just enter your lowest and highest gear sprocket counts and hub ratio and this sheet just assumes you have all the needed gears in-between your bottom and top end with small enough steps in-between them to be simplified as a single continuous power band. Provided that is true it works much better. In addition I added the functionality to not only solve for maximum possible speed at maximum available power under the conditions input but also to solve for maximum possible speed at maximum electric motor efficiency (as in when you hold a lower gear and let the motor spool up so that it's more efficient at a lower vehicle speed rather then always shifting up to always go as fast as possible with no regard for efficiency and the improved range capabilities it can provide).

The second attachment is just an "updated and made publicly presentable" version of a tool I've used for a long time to figure out what gearing ratio I need to set-up between my pedal crank and an electric motor in order to provide the "true hybrid", "symbiotic relationship" I personally like so much on a mid-drive so that both my pedaling and the motor are nearly perfectly matched to each other at full throttle and I just change gears to adjust my speed and only use the variance in the throttle as a means to soft engage the motor and otherwise just pretty much keep it pinned at full all the time and instead change gears to adjust my speed to keep both the electric motor and my human pedaling cadence in their optimal range nearly all the time. There will be another version of this same tool that I will get ready to post publicly at some future point which does not rely on a built in motor simulator program but allows the user to directly input data points from official test curves on the motors power output and efficiency plots if available for the motor used in a build (some manufactures do provide this information in some cases for some motors and provided its quality test data, real test data is almost always superior to theoretical modeling).
 
Okay, here is the manual input motor data version:





Manually input motor data points in it right now are pulled straight off of the power and efficiency curves on the graph for the 650-watt 24v external controller motor head published on the Cyclone Taiwan website. Any motor that you have a test graph for you can just plug in data points just like I did off of the cyclone motor graph and then play with the reduction numbers to figure out approximately what is the best gearing reduction between the motor and the crank to closely match the human and electric motor together so that it is a true hybrid vehicle and the two motors work together in a symbiotic relationship.
 

Attachments

  • Symbiotic Human-Electric Crank Drive Gearing Ratio Calculator for E-bikes - Manual Input Motor...xls
    90.5 KB · Views: 111
another reference http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-061-introduction-to-electric-power-systems-spring-2011/readings/MIT6_061S11_ch12.pdf

hope i can come up with a matlab version sooner or later
 
Back
Top