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

justin_le said:
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

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

Here you can see a setup with a voltage throttle (Standard ebike controller) at 50% and 100%.
VoltsThrottle Compared.jpg

Same system and controller but with an amps throttle. The curved line moves downwards
AmpsThrottle Compared.jpg

And finally with a torque throttle
TorqeThrottle Compared.jpg

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.
 
And the other item which I'm sure a lot of people will have fun with:
View attachment 1

CustomMotorParameters.jpg

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.
 
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 :!:
 
justin_le said:
And the other item which I'm sure a lot of people will have fun with:
View attachment 1

: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.
 
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 ?
 
markz said:
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.
 
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?
 
Is it possible to use it for central motor if we know all the parameters :?: :!:

Homemade or very well known (Bafang) for example.

Thierry
 
markz said:
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 said:
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.
 
cycborg said:
Edit: Oops, the spreadsheet doesn't have inductance.

We'll work on fixing that! ( https://endless-sphere.com/forums/viewtopic.php?p=1333447#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.html?bopen=true&motor=cust_10.38_0.12_0.2_23_0.77_0.0185_0&motor_b=cust_10.38_0.12_0.015_23_0.77_0.0185_0&cont=C40&cont_b=C40&batt_b=B5216_GA&batt=B5216_GA&wheel=20i&wheel_b=20i
Inductance Effect.jpg

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.html?bopen=true&motor=cust_10.38_0.12_0.2_80_0.77_0.0185_0&motor_b=cust_10.38_0.12_0.015_80_0.77_0.0185_0&cont=C40&cont_b=C40&batt_b=B5216_GA&batt=B5216_GA&wheel=20i&wheel_b=20i
Inductance with 80 poles.jpg

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.
 
justin_le said:
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.
 
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
 
SolarRay said:
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

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.
 
ThierryGTLTS said:
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.
 
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 said:
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.
 
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/crystalyte%20hs%20front%20motor%2040km%20max%20speed.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
View attachment 1
 
FredTheSwede said:
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
https://endless-sphere.com/forums/viewtopic.php?p=1375674#p1375674
 
All,

I just discovered the Grin Tech "Trip Simulator"...been playing with the "Motor Simulator" for a few months and thought it was a great tool.

The Trip Simulator is the greatest thing ever invented...well right after the electric motor and the battery :lol: . It is a little more complicated than the Motor Simulator but has the capability to provide a LOT more information if you want/need it.

Everybody...please support Grin Tech by purchasing as much as possible from them. The support they provide to the electric bike community is approaching priceless.
 
I am trying to make a simple phase amp measurement with arduino or similar and was looking into the current of pne phase with a hall sensor connected to the osciloscope. I see in the ebike simulator the formula is Imotor=Ibatt/D, where D is PWM duty cycle and this is simplified for square wave controller and it should be actually the RMS value. However mine is sine wave and the current has a bit different form like on the bellow screenshot from the current on the scope of phase 1. Can I accept that the phase current is the RMS value of this waveform? In my case it's 205 mV which is about 5Amp (hall sensor produces 40 mV/A)...
 

Attachments

  • New2455.png
    New2455.png
    15.3 KB · Views: 4,478
Back
Top