New 2017 updates to ebikes.ca motor simulator to try out

Get all your technical information about electric bikes here.
User avatar
Alan B   100 GW

100 GW
Posts: 7484
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by Alan B » Oct 02 2017 1:24pm

Yes, that would be excellent also, whatever seems to be the best way to present it (and calculate it). It might become the most popular view, and require less explanation for most people.

Thanks for considering it.

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Multiple throttle modes and custom defined motors too

Post by justin_le » Oct 06 2017 11:17am

justin_le wrote: This is similar to what thunderstorm was asking for with a phaserunner controller mode and I think we'll add this to this list. So when you choose a custom controller you can choose if the throttle control is a PWM (ie voltage) throttle, a battery current (ie power) throttle, or a phase current (ie torque) throttle.
And we have it. It's just on the dev simulator site at the moment here
http://www.ebikes.ca/tools/simulator2.html

But if you do a custom motor controller, there is a choice to have it be a voltage throttle, amps throttle, or torque throttle:
Sim Throttle Types.jpg
Sim Throttle Types.jpg (67.44 KiB) Viewed 3984 times
I've never quite pictured it this way before but it makes for a really great explanation to show how each throttle mode affects the torque curve of the setup, which has a flat top (phase current limit), and curved section (battery amps limit), and a diagonal dropoff (voltage limit). At full throttle, the torque curve is identical regardless of your throttle mode, but at partial throttle you are then regulating just one of these 3 lines up and down.
Effect of Throttle Modes.jpg
Effect of Throttle Modes.jpg (84.58 KiB) Viewed 3984 times
Here you can see a setup with a voltage throttle (Standard ebike controller) at 50% and 100%.
VoltsThrottle Compared.jpg
VoltsThrottle Compared.jpg (132.62 KiB) Viewed 3984 times
Same system and controller but with an amps throttle. The curved line moves downwards
AmpsThrottle Compared.jpg
AmpsThrottle Compared.jpg (139.25 KiB) Viewed 3984 times
And finally with a torque throttle
TorqeThrottle Compared.jpg
TorqeThrottle Compared.jpg (135.88 KiB) Viewed 3984 times
You'll notice in the above examples, that the top speed reached with 50% throttle is very dependant on the throttle mode. With the components selected the torque throttle setup has exactly the same top speed of 41.4 kph at 50% or 100% throttle, while at 50% the voltage throttle is much slower (22.9 kph) and the amps throttle is somewhere in between (34.5 kph). However if you click elsewhere on the graph to see the transient behavior, even through the torque throttle has the same top speed, the acceleration at 50% throttle is only half has much, while the voltage throttle still has the same acceleration off the line at 50% vs 100%.

So play away! There is some interesting behavior when you select the "auto throttle" mode in the torque or amps throttle options, which may look like buggy behavior but it is actually all correct once you think about it.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Custom Motor

Post by justin_le » Oct 06 2017 11:25am

And the other item which I'm sure a lot of people will have fun with:
CustomMotor.jpg
CustomMotor.jpg (73.37 KiB) Viewed 3982 times
CustomMotorParameters.jpg
CustomMotorParameters.jpg (70.87 KiB) Viewed 3982 times
There are a lot of reasons why I was reluctant to add this option in the past but we've got most of those resolved, so for anyone wanting to play "what-ifs" or have a properly characterized 3rd party motor on the simulator you can do this now quite easily. And since all the parameters are in the URL you can easily make local bookmarks for your various custom motor types rather than having to type them in each time.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

thunderstorm80   1 kW

1 kW
Posts: 332
Joined: Mar 29 2016 5:54am

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by thunderstorm80 » Oct 06 2017 12:02pm

FINALLY !!!!!! :D :D :D :D

Thank you so much Justin! With the addition of torque-throttle and fully detailed custom-motor option, your Motor-Simulator is truly up to date!
It seems you are eventually following (almost) all our suggestions. :P

I know I sound "greedy" when saying this at this moment of joy, but one thing I would like to see in your Simulators is the ability to simulate the conditions during field weakening.
If the analytical model is too difficult or unachievable (at the moment), it's possible to do this discretely by testing the unloaded speeds of different motors at (for the sake of the example) 5A, 10A, 20A, 30A of field weakening currents and so on, and record the weakened kV on each. (by the unloaded speed)
Then, a user, which chooses such tested motor, will have the option to choose those respective tested field weakening currents. In each setting, the kV of the motor would be adjusted according to the respective unloaded test (ONLY if the motor runs above it's normal unloaded speed and/or the demanded phase current is higher than what the back-EMF allows which requires weakening)
Am I understanding this all correctly?
I've yet found an article or a way to understand how does the field weakening current vs delta-kV works...

If what I suggested above is logical, I would be happy to test this for all the different motors I currently own, and send you the data so you can include it in the simulator.

And again, Great job with the Simulator :!:

markz   100 GW

100 GW
Posts: 6091
Joined: Jan 09 2014 11:38pm
Location: Alberta Canada

Re: Custom Motor

Post by markz » Oct 14 2017 2:57pm

justin_le wrote:And the other item which I'm sure a lot of people will have fun with:
CustomMotor.jpg
:arrow: This is totally coooooool !

My first thought, without doing a search, was how would a layman measure some of those parameters: Winding Inductance, Hystresis Torque and Eddie Current Torque.

csc   100 W

100 W
Posts: 138
Joined: Dec 13 2016 7:40am

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by csc » Oct 15 2017 3:57am

Congrats Justin : ultra useful. It just gives me a lot of answers and demonstrates that I screwed when choosing the motors for my 2wd config : unpleasant but many thanks anyway !!!!

If one day, anticipating field weakening ability + 2wd specific efficiency become possible, it would be over ultra useful !!!!

Would you or anyone help me to set up a custom 5k turbo in both 3t and 4t versions ?

Unless you can add it in the list, or there's already an equivalent ?

User avatar
cycborg   1 kW

1 kW
Posts: 435
Joined: Jul 05 2014 4:45pm
Location: Boston metro, US

Re: Custom Motor

Post by cycborg » Oct 16 2017 8:26am

markz wrote:My first thought, without doing a search, was how would a layman measure some of those parameters: Winding Inductance, Hystresis Torque and Eddie Current Torque.
Justin explains this here, for all the parameters except inductance. If you don't have access to the appropriate meter for that, you can look for a similar motor in Miles' spreadsheet and use its number as a rough guess, and experiment with how changing the number affects your results.

Edit: Oops, the spreadsheet doesn't have inductance.

markz   100 GW

100 GW
Posts: 6091
Joined: Jan 09 2014 11:38pm
Location: Alberta Canada

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by markz » Oct 21 2017 8:37pm

Does anyone think when you do the trip sim, and you plot out your route on Google Maps, that it is accurate on the slopes?

ThierryGTLTS   100 mW

100 mW
Posts: 45
Joined: Jan 10 2017 8:10am

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by ThierryGTLTS » Oct 22 2017 4:43am

Is it possible to use it for central motor if we know all the parameters :?: :!:

Homemade or very well known (Bafang) for example.

Thierry

User avatar
Alan B   100 GW

100 GW
Posts: 7484
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by Alan B » Oct 23 2017 10:06am

Excellent Justin! Thanks!!

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by justin_le » Nov 09 2017 3:49pm

markz wrote:Does anyone think when you do the trip sim, and you plot out your route on Google Maps, that it is accurate on the slopes?
That was the hope, the data comes directly from google's map data, but what we found is that in practice the elevation data has a lot of noise in it. On average it is OK and accurate enough, but between adjacent data points if one dot is 1 meter higher than it should be, it results in a short section of the trip having a really steep angle and that can mess up the simulator results if it means that the motor stalls out. So when we have someone working on this particular web app project again, one of the things we'll be doing is applying various levels of filters to 'smooth out' the google reported elevation info so that the calculated grade slope doesn't have as many spikes in it.

This will also help a bit in that the trip simulator is a steady state model and explicitly does not simulate the inertia and momentum of the bike. So if there is a short steep section that your speed would normally carry you through without slowing down too much, on the simulator it will have you going up at a crawl. The point of the trip sim was to show the long term performance expectations so normally that wouldn't matter, but if these short sections wind up with the vehicle going just a few kph then there will be large bump in the motor core temperature that wouldn't exist in practice.
ThierryGTLTS wrote:Is it possible to use it for central motor if we know all the parameters :?: :!:
Homemade or very well known (Bafang) for example.


Yes of course. You simply put in the motor parameters, and then set your wheel diameter to include the effective gearing. So if your motor has a 10:1 reduction to the crankset, and then your chain goes from say 42T on the front to 16T on the rear, spinning a 24" diameter wheel, you would put in for your wheel diameter:
24" * 1/10 * 42/16 = 6.3"
To simulate a different gearing you just change your wheel size accordingly.

We considered adding additional fields for gear ratios and such, but it added more clutter than was worth given the triviality of multiplying the numbers yourself. We might revisit it as a separate pop-up window option to not clutter the input fields for those who don't like math.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Custom Motor

Post by justin_le » Nov 09 2017 6:14pm

cycborg wrote: Edit: Oops, the spreadsheet doesn't have inductance.
We'll work on fixing that! ( https://endless-sphere.com/forums/viewt ... 7#p1333447 )

The inductance is an interesting term in the simulation when you are using either a trapezoidal controller or a standard sinewave controller since it restricts the ability of the current to reach the full value as predicted by (Vbatt-Vemf)/R, especially at higher eRPMs. In the online simulator right now the algorithm is modeling a trapezoidal drive, where at each commutation the current transitions from one phase to another and during this time it decays somewhat. The result can be a much lower torque and power at a given RPM than what you would predict from the simple voltage and back-emf model.

Here you can see two motors simulated with exactly the same KV, Resistance etc., but system A has a typical winding inductance value for a motor of this spec (0.2mH), while system 'B' is close to what you would have in a model with no inductance. The simulator model won't work at all if inductance is zero or too low.
http://www.ebikes.ca/tools/simulator.ht ... heel_b=20i
Inductance Effect.jpg
Inductance Effect.jpg (154.38 KiB) Viewed 3393 times
Now change the same motor from 23 poles to 80 pole pairs (like you'd have with a geared drive) and it's way more pronounced still since the eRPM is almost 4 times as high.
http://www.ebikes.ca/tools/simulator.ht ... heel_b=20i
Inductance with 80 poles.jpg
Inductance with 80 poles.jpg (122.93 KiB) Viewed 3393 times
Effectively you need a higher voltage battery to achieve the torque and power levels than would be predicted by a more standard motor model. But with a field-oriented controller the inductance doesn't really come into play as the controller will adjust the commutation timing so that the current waveform is ideally timed and not lagging.

For the trip simulator web app, we don't care at all about inductance of #poles since we're only interested in the heat generated for a given motor torque output, not in the exact electrical details on how the controller is able to get that current into the motor.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
madin88   100 MW

100 MW
Posts: 2746
Joined: May 27 2013 2:02am
Location: Austria

Re: Custom Motor

Post by madin88 » Nov 12 2017 3:46am

justin_le wrote: Effectively you need a higher voltage battery to achieve the torque and power levels than would be predicted by a more standard motor model. But with a field-oriented controller the inductance doesn't really come into play as the controller will adjust the commutation timing so that the current waveform is ideally timed and not lagging.
That makes a lot of sense. Learning never stops.
In view of controller, as far as i know a very low inductance usually is not good because there will be high current spikes (depending on the PWM frequency) which put stress on the FET's and caps.
The higher the inductance, the more smooth the motor current. A smooth current waveform means less heat EVERYWHERE from my understanding.

User avatar
SolarRay   100 mW

100 mW
Posts: 49
Joined: Apr 17 2012 1:08am
Location: Russia, Vyksa
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by SolarRay » Jun 09 2018 10:19pm

Bug report:
If I use a link to a simulation with a wheel of a different size from the standard one (12", 14", 16", ...), then the wheel size automatically changes to 660mm.
example:
http://www.ebikes.ca/tools/simulator.html?bopen=false&motor=M2705&hp=0&cont=C40&batt=B7223_AC&wheel=7i&mass=150&grade=15

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by justin_le » Jun 10 2018 5:03pm

SolarRay wrote:
Jun 09 2018 10:19pm
Bug report:
If I use a link to a simulation with a wheel of a different size from the standard one (12", 14", 16", ...), then the wheel size automatically changes to 660mm.
example:
http://www.ebikes.ca/tools/simulator.ht ... 0&grade=15
Hmm, this must have been broken more recently when we added the additional default wheel sizes of 70mm, 90mm etc. for skateboard trucks. Thanks for bringing that to our attention and we'll see that it gets fixed.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by justin_le » Jun 10 2018 5:06pm

ThierryGTLTS wrote:
Oct 22 2017 4:43am
Is it possible to use it for central motor if we know all the parameters :?: :!:
Homemade or very well known (Bafang) for example.
Yes, very easily. Simply input all the motor parameters, and then choose a wheel diameter that takes into account all the gearing. So if your motor goes through 10:1 gear reduction before the 26" bicycle wheel, you just input a 2.6" bicycle wheel size.

We have an in-progress build on our dev server that provides a separate pop-up window to introduce gear reduction options to save people the math. With that you can input motor gearing then front and rear chainring sizes, but the end result is identical to just putting in an effective wheel size.
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
SolarRay   100 mW

100 mW
Posts: 49
Joined: Apr 17 2012 1:08am
Location: Russia, Vyksa
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by SolarRay » Jun 15 2018 9:26am

justin_le wrote:
Jun 10 2018 5:03pm
Thanks for bringing that to our attention and we'll see that it gets fixed.
Thanks for your work. This simulator is very useful for me.

markz   100 GW

100 GW
Posts: 6091
Joined: Jan 09 2014 11:38pm
Location: Alberta Canada

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by markz » Jul 02 2018 5:59pm

Most helpful for me right now choosing my gearing and using a spread sheet.
I have mine going from a 42" to 11" E.W.D. purely based on the speed I need.

Effective Wheel Diameter = Wheel Size x (motor gear / crank gear) x (crank gear / rear wheel cassette [or freewheel] gear)

I do not see a description of using this equation in the Motor Simulator notes.


justin_le wrote:
Nov 09 2017 3:49pm

Yes of course. You simply put in the motor parameters, and then set your wheel diameter to include the effective gearing. So if your motor has a 10:1 reduction to the crankset, and then your chain goes from say 42T on the front to 16T on the rear, spinning a 24" diameter wheel, you would put in for your wheel diameter:
24" * 1/10 * 42/16 = 6.3"
To simulate a different gearing you just change your wheel size accordingly.

We considered adding additional fields for gear ratios and such, but it added more clutter than was worth given the triviality of multiplying the numbers yourself. We might revisit it as a separate pop-up window option to not clutter the input fields for those who don't like math.

FredTheSwede   1 µW

1 µW
Posts: 4
Joined: Aug 05 2017 2:13pm

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by FredTheSwede » Aug 15 2018 3:45pm

While searching the internet for info about motors and their efficiency I came across the simulator.
I have seen the performance charts like this one below but never really get a "feeling" to which RPMs and Torques are a useful range.
MotorGraph.JPG
In my job I often come across fully measured motors including the controller with efficiency maps like the picture below this text.
Is this information available on the net openly?
Is there any way that this information can be retrieved from the simulator?

If I go to Crystallytes documents I still don't get the full map for a motor.
Example:
http://shop.crystalyte-europe.com/files ... 0speed.pdf

I think this could be a very nice plot to see and you , at least I do, get a feeling for the range where I should aim to be
with the motor to run it at a good operating point.

Thanks/Fredrik

Data Samples
rawdatasamples.JPG
Efficiency MAP
MotorEfficiency.JPG

User avatar
justin_le   10 MW

10 MW
Posts: 2149
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: New 2017 updates to ebikes.ca motor simulator to try out

Post by justin_le » Aug 28 2018 5:02am

FredTheSwede wrote:
Aug 15 2018 3:45pm
While searching the internet for info about motors and their efficiency I came across the simulator.
I have seen the performance charts like this one below but never really get a "feeling" to which RPMs and Torques are a useful range.
I suppose in most cases of ebike design and motor choice it's not quite the right question to ask. The vehicle and load will dictate the torque at any given motor RPM, and then you can see what the efficiency of the motor will be at that point. Just because a motor is say 70% at a light load and lower speed and 80% efficient at higher RPM's and torques, doesn't mean that it's not useful to run it at the lower power and speed or that it's some kind of bad operating point. And the plot that you showed doesn't give any indication of where the motor is likely to overheat. You can burn up the motor while it is running at 80% efficiency at the high torque + high RPM side of the chart, while it might barely get warm running at 70% efficiency at the much lower torque and low RPM situation.

Is this information available on the net openly?
Is there any way that this information can be retrieved from the simulator?
The data is all there in the simulator graphs if you were to do a series of them with say varying phase controller currents (and hence motor torque) from zero to the max, and then retabulate the results into a 3D graph as you are after with rpm on one axis, torque as the other axis, and efficiency as the data plot point. But if you wanted to do a more automated / scripted solution, it would be a lot easier to use our trip simulator web app which has an option to "Run Simulation Set" at the bottom which will provide a numeric data output copied to your clipboard
http://www.ebikes.ca/tools/trip-simulator.html

See this post here as an example of using this feature
viewtopic.php?p=1375674#p1375674
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

Post Reply