# paper: Hill Drivetrain Simulator

Thread created automatically to discuss a document in CD-Media.

Hill Drivetrain Simulator
by: Michael Hill

Utilizes the same algorithm Ether used in his C program, but now in Excel form with some more bells and whistles.

This includes a chart for stall conditions as a function of gear ratio (typically seen in a pushing match), calculates electrical and physical properties in acceleration, and also gives an “optimal” shifting location should teams decide to shift while accelerating. This optimal position is based on RPM loss and torque matching.

The calculations used in this model are based on Ether’s algorithms (http://www.chiefdelphi.com/media/papers/2868) and have been modified to work with Excel. As a result, a fixed end condition of 3 seconds is used. This could be modified with a few minor changes, but seems to be a decent tradeoff between accuracy and speed.

Note: Cells highlighted in green, you are free to modify. Modify cells highlighted in red only if you are confident in your decisions. CIM Motor stall conditions are based off of this plot (http://files.andymark.com/CIM-motor-curve-am-0255.pdf) rather than the more often 133 Amps cited in other literature.

Disclaimer: Not responsible for any inaccuracies in calculation. Use your own sound engineering judgement for your designs.*

Drivetrain Calculator.xlsx (7.08 MB)
Drivetrain Calculator.xlsx (7.16 MB)

1 Like

Basically, what this is is a spreadsheet that utilizes Ether’s drivetrain simulation and makes it a bit more accessible and adds some extra features. The first extra feature is the very first chart. This is a plot of several things like battery voltage, current, and pushing force with respect to gear ratio. Since Ether’s algorithm took voltage drop into account, these calculations are much more likely to be near the values seen in real life (rather than simplistic calculations like motor stall current * number of motors). What is also interesting is that there is a “sweet spot” for gear ratios where your pushing force can be greater than (robot weight * kinetic coefficient of friction). This is thanks to the effect of static coefficient of friction being greater than the kinetic coefficient of friction. Beware, however, if you design to be in this zone, wear on your wheels can easily make you slip out of this zone. That is, if you start with, say, Vex W-wheels, they could start at a uF = 1.2, but after a few matches wears down to uF = 1.1, you could easily be out of the “sweet spot”.

Moving down, there are actually two charts side by side. They represent the same things for different gear ratios (G1 and G2) as defined on the left side. This is so you can compare high and low gears side by side. This is where Ether’s calculations really came into play. These charts are (by default) 3 second acceleration simulations. I chose 3 seconds because it seemed a decent time to get near full speed (taking into account length of the floor) but it’s also a trade-off of filesize. These charts present information like current draw and battery voltage, slip condition, and the position, speed, and acceleration.

Moving down, this is something I debated on putting in here, but it’s the same chart as above, but using an automatic shifting model. The torque vs. RPM graph is next to it. It is somewhat difficult to determine when the “optimal” shifting time is on DC motors, but I took a stab at it anyway. The point I chose to shift is the point where the output torques of high and low gear match given the drop in RPM from high to low gear. This point provides a “smooth” acceleration curve. The chart on the right simulates shifting at that point. This chart DOESN’T, however, take into account the time it takes to shift (assumes immediate gear change), so there is likely going to be a fraction of a second time delay. You can see in the Vmax (while shifting) is slightly increased, but you’d have to ask yourself if it’s worth it to try to shift automatically.

The values on the left side are the inputs to the acceleration model. Those highlighted in Green are the ones you can freely modify. The ones in Red, you should really think about before changing. You can change them with no problem, but those values are pretty well known. There are also max velocity outputs for each gear ratio. This is actually the last velocity seen in the acceleration model (i.e., the velocity after 3 seconds).

Anyway, have a look at it and if you have any questions, please ask.

Thanks for posting this.
I think it is the best version of a motor simulation spreadsheet I have seen.

But one question: Why is “F2A2” set at 2x “F2A” - it leads to the second gear calculations (performance calcs 2) to show double the amperage? even for the same gear ratio.

I’m not near a computer at the moment (and won’t until tomorrow). I’ll check it out when I can get to one.

So, I’m not seeing which cell you’re referring to. I just downloaded the version I uploaded, and this is what i have in the second tab (“Unit Conversions”), and things seem to be correct.

I made the gear ratios the same (7.0) and these are the plots:

http://i.imgur.com/rp8XQvm.png

So that’s odd.

The version I pulled had F2A at 0.0752 and F2A2 at 0.1504 it also has TM at 1.623

Thanks for clearing up.

Well, F2A and F2A2 are functions of the respective gear ratios. It’s possible the gear ratios were such that that one was 2x the other?

Just put up an updated version. This version adds the ability to select individual motors (assumes right and left are same). I’ve also included a Combined Motor Curve chart. The combined motor calculations are based on Paul Copioli’s spreadsheet available at http://www.fightingpi.org/Resources/Business/MSC%20Seminars/2013%20Files/Useful%20Calculations.xlsm