DIY Electric Car Forums banner

An online calculator I created for myself, and maybe you!

1837 Views 20 Replies 6 Participants Last post by  kennybobby
I’ve developed a web calculator that may help people select a drive train for a conversion.

EV Calculator

It will predict the speed of a car for different power levels, taking into account rolling resistance, aerodynamic resistance, and gravity if you’re driving on a grade. This was easy for me to create, since I’ve had similar calculators for nerdy cyclists on the web for over 20 years. There are parameters to input that you may not know very well - those are the major sources of error.

Wait! I’ve not included any efficiency figures - use your own judgement to account for driveline loss, electrical loss, and the effects of ancillary equipment. Perhaps those effects can be incorporated into the next version.

The staring values you find are for my own project: a Jaguar Mark 10. As an example, there are values for a Zonic 120 motor fitted to a 1.9:1 reduction gear coupled to a central driveshaft.

Given inputs for your gear ratio, differential ratio and tire diameter, the RPM of your motor will be correctly displayed.

The lower section predicts acceleration to 60 mph or 100 kph. This uses an approximation of a motor’s torque curve, so you only need to input four quantities.

That’s the gist of it. There’s much more to read on the calculator page. Check it out, let me know what you think.

Font Rectangle Number Parallel Screenshot
1 - 20 of 21 Posts

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #2 ·
The confusing subject of whether torque or power is most important has already come up. It depends! For acceleration, torque is king because Newton says so: F = MA. Motor torque eventually becomes linear force at the wheels, giving you the F. You know M, so voilá: A. Surprisingly simple, as long as we don't have the complicated torque curve of an ICE through a 5-speed gearbox. The calculator does do a step-wise integration up to 60, since we'll usually be beyond the constant-torque regime of the motor. It also takes rolling resistance and aero drag into account at each step (not a big effect, though).

Power is involved, of course, but not directly in the calculation. We do have torque and RPM, so it's accounted for indirectly. The three quantities are not independent, you see, so you need only two.

There's probably some torque loss in the drivetrain, so a deduction for that is warranted.
 

· Administrator
Joined
·
1,762 Posts
It's good, but a little counter-intuitive. It's not obvious what's changing when you're making changes. Also, people may want to mix units, not have to be set in stone Metric/Imperial.

Some thing you let people punch in any number, others you make them choose from a quite limited drop-down list.

From a project perspective, almost everyone who uses a calculator like this, especially those that would need a calculator and can't do it themselves, is wanting to know 2 things:

1 - "How big of a motor do I need?"
2 - "How big of a battery pack do I need?"

So, to make it as useful as possible, that's what I would frame it around. You give it certain things, and it spits out power. And, energy used per km/mile. The RPM and other stuff just complicate things and make people too intimidated to answer their first questions, so, I'd try to move those to a different section.

I would seed the table with the initial values for a common car.

I would perhaps add tool tips or dropdown options for common vehicles. Like, Honda Civic, F150, Corvette. Because almost no one knows what cross sectional areas or Cd's are, they're going to have to go look those up, so, just giving them a few to choose from lets them figure that out in the right ballpark.

I'd set the default speed to 100km/h 60mph since that's the standard "highway speed" that everyone seems to use to cross-compare.

This is the one I currently use and share to everyone who asks, I have some of the same criticisms about it: EV Calculator
 

· Registered
Joined
·
5,387 Posts
You need to calculate and show the horsepower.

You start out with a linear rise in hp from zero to 117 hp at 3000 rpm and then it magically keeps going up as you linearly decrease the torque to get to 170hp at 7000 rpm. Doesn't seem realistic.

What would be useful is a piecewise linear entry of torque vs rpm...at least a half dozen points would be nice vs your two points.
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #5 ·
Thanks for the comments. Keep 'em coming.

It's a challenge to design software that strikes the right balance between being comprehensive and easy to use.

On the metric/U.S. question, a user can freely switch back and forth to enter particular values in his favorite unit. All entries are converted back and forth.

I took the 175 Nm / 7000 RPM point from Zonic's chart. Indeed, that point works out to be 128 kW (172 hp), a bit higher than the corresponding line for power (120 kW). Their chart is a little goofy in other ways; hope it wasn't drawn by a marketing guy. But aside from the "bonus" power and the odd wiggles, I think it's well-represented by two points up to 7000, good enough to estimate a 0-60 time for my car. I could use an education on whether this is true for other motors and overall gear ratios.

Rectangle Slope Plot Font Parallel
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #6 ·
There are some holdovers from the cycling version of this calculator that EV builders probably don't care much about:

-- Headwind (huge factor when you're on a bicycle!)

-- Temperature and elevation (used to calculate air density used for aero resistance - airline pilots know about "hot Denver" takeoffs)

-- Distance - used to figure kWh consumption, but maybe Wh/mile etc. would be more useful.

Thoughts? Anything clearly missing?
 

· Administrator
Joined
·
1,762 Posts
Wh/mile is definitely more useful than "distance". Almost everyone is smart enough to do basic multiplication, so, it's simpler and probably better to just give the result in Wh/mile. Simpler because, what does "distance" mean? Distance of what, to where, between what?

One fairly useful thing I never see calculators have, is a graph of Wh/mile at different speeds. It's a nice visual, that shows them how on their particular vehicle, how their range is affected by their circumstances.

I agree about temp, elevation and headwind.

One thing people might care about for cars, is winter performance. It might be nice to have a tab or a pull down section or something, to add winter driving. Watts of heating (maybe with a dropdown of common basic needs at different speeds and temps), and % reduction in power, or % reduction in energy/range (is there any, chemically? Or is it just due to people running heaters? Power is reduced, but is energy/).
 

· Registered
Joined
·
1,967 Posts
The zonic motor chart looks like it was drawn by a marketing guy.

Is this supposed to be dyno data? What was the supply voltage and current for the test?

In an electric motor dyno test you would apply a load torque and then measure the resulting speed, so torque would be shown on the x-axis with speed on the y-axis.

For example flipping their graph and adding the green line to find the stall torque and the no-load speed using the same general slope as their graph. This would be for a certain test voltage and current limit. Motor torque and speed contants could be calculated from this if the test voltage and currents were given. The green line would shift to the left or right depending upon the V and I.

Rectangle Slope Plot Parallel Font
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #10 ·
One fairly useful thing I never see calculators have, is a graph of Wh/mile at different speeds. It's a nice visual, that shows them how on their particular vehicle, how their range is affected by their circumstances.
Yes, that's a graph I've often wanted to display for this sort of calculator, and the iPhone app. If only I were younger, I'd go find some javascript graph-making code and graft it in. Any young code jockeys in the house?

Incidentally, I was moved to do a calculator for a Tesla Model 3 five years ago: Tesla 3 Calculator
I got into the weeds for that one, adding efficiency and ancillary loads (including the heater). I hesitate to do that here - I'm really just trying to choose a drivetrain at this point.

Maybe that suggests a different calculator for battery decisions. The curious might be interested in the breakdown of resisting forces - aero, rolling and gravity. The Energy app in a Tesla does that, in the form of range impact.
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #11 ·
In addition, I would like a grade increase factor. My commute had a couple of 6% uphill sections, both ways at 45mph plus. Talk about sucking current....
There is a grade input. In fact, a requirement I have for my car is to do 70 mph up a 5% grade.

BTW, with a few important assumptions, grade does not affect range on a closed circuit, contrary to intuition (especially if you ride a bike!). The important assumptions are 1) constant speed, and 2) no braking allowed, including regeneration. I've gotten into arguments about this, but ... science! I was playing with the Tesla calculator linked above when I learned this - this is something I like about models: they can surprise you! The constant speed business is the difference between a car and a bicycle, coupled with the highly non-linear aero resistance factor.
 

· Registered
Joined
·
2,062 Posts
Please explain: the wattage requirement doesn't increase on a upgrade because that does conflict with my observed reality: part throttle to maintain 45 level, 6% full throttle to maintain 45 with associated power levels and currents rising accordingly, the ON duty cycle of the controller going to somewhere north of 90%, motor temps rising significantly, pack voltage falling.

Saw the grade box, but thought it was an overall grade change perhaps only useful on I70 eisenhower pass. Home to work was overall a 2%, but there were three pulls about 1mile each that were 6%. So I need to do two iteritations, one for level, one for the 6% and sum them for a composite of 4 to reflect the trip?

Calculated range home to somewhat level South Reno:40 miles, actual range home to work in Stead 13 miles out and back.
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #13 ·
It's a different challenge to predict range for an actual route, with various ups and downs. You have the right idea, to sum up a bunch of sections. Even if I don't fully model an actual route, I like how models can improve my intuition about things. Of course, I've found out that my intuition is wrong on occasion, which I hate, but that's the way it goes.

To clarify my assertion about hilly routes not hurting range, this is true only for a route where you stop at the same elevation as you started, usually meaning a loop or an out-and-back. And don't forget the two other assumptions.
 

· Registered
Joined
·
5,387 Posts
Unlike a bicycle, range does get consumed in a car in hilly terrain. Without regen, you have to use brakes (reverse polarity on a brushed motor, or friction brakes) on a 6% grade, something you can't use with the pencil erasers they call brake pads on a bike...that is a major range loss as heat.
 

· Registered
Joined
·
8,519 Posts
In an electric motor dyno test you would apply a load torque and then measure the resulting speed, so torque would be shown on the x-axis with speed on the y-axis.

View attachment 133840
Using a crude friction brake dyno as is common with companies selling old forklift motors for EV conversions, yes. In the real world of modern motor design, no. This obsolete test method is the reason that performance charts for those old motor have no data for any speed below the maximum torque point - they start from high speed (no load) and as they increase brake force the motor stalls and the test is over.
 

· Registered
Joined
·
8,519 Posts
Please explain: the wattage requirement doesn't increase on a upgrade because that does conflict with my observed reality: part throttle to maintain 45 level, 6% full throttle to maintain 45 with associated power levels and currents rising accordingly, the ON duty cycle of the controller going to somewhere north of 90%, motor temps rising significantly, pack voltage falling.
Yes, you obviously need higher power when climbing, but you need lower power when descending, so as long as you never throw away energy by friction braking the net result over a course which ends at the starting elevation is no change in required energy due to grades. Of course this ignores changes in drive system (legs, electric motor, engine, whatever) efficiency with load.
 

· Registered
Joined
·
1,967 Posts
Using a crude friction brake dyno as is common with companies selling old forklift motors for EV conversions, yes. In the real world of modern motor design, no. This obsolete test method is the reason that performance charts for those old motor have no data for any speed below the maximum torque point - they start from high speed (no load) and as they increase brake force the motor stalls and the test is over.
Please help an old obsolete codger crawl out of the stone age cave, and enlighten me on the modern motor test method(s).

Is my old Magtrol hysteresis dyno considered too crude for the modern world motors?:D
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #18 · (Edited)
While I still have temperature and elevation in the model -- used to calculate air density -- I decided to test their effects on power to maintain 74 mph and kWh consumption for a 106 mile trip in my car. That's a trip I'd like to take with the Jaguar - to the Saratoga Auto Museum where I am a docent. Great new exhibit there currently: Bond in Motion. As explained elsewhere, the kWh estimate doesn't include inefficiencies or ancillary loads, and is seriously optimistic.

Anyway, the "cold Saratoga" (32F/0C and 400 ft/120 m) condition requires 26 kW and 37.1 kWh.

The "hot Denver" (95F/35C and 5280 ft/1610 m) condition requires 21 kW and 30.0 kWh.

Hmm - big difference. Maybe I should keep temperature and elevation in the model, or just elevation.

=====================

Bonus material for nerds: here is the expression for aero drag force. The funny "p" is air density, rho. The v^2 is the killer, even worse when you multiply by another v to compute power from that force. This does not include the "reverse thrust" from firing machine guns in the forward direction, since that's only an Aston Martin thing.

Flash photography Font Gas Darkness Audio equipment
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #19 ·
I've revised a few things in the calculator. Thanks for all your comments.

An energy rate is now displayed, Wh/km or Wh/mile. Like the total consumption for the distance entered, this is the theoretical number, with no consideration for mechanical losses, electrical losses or the drain from ancillary equipment. If I were to add an input for "overall efficiency", what would you enter for your car on a good day? My guess is 75%, FWIW.

I've also added linear wheel force in the acceleration section. That's simply motor torque (at low RPM) times gear ratio, times differential ratio, divided by tire radius. Some of you hot rodders will want to know this to predict smoke, by comparing it to the weight on the axle or axles. Do our metric friends know the weight of their car in the proper units of force, newtons? Not likely, hence the bogus "kgf". Anyway, this is a rather fundamental thing, the force pushing the car along; car magazines never mention it. My friends have gotten a sense of it while pushing my engine-less Jag around.

I've re-arranged the entries a bit, reduced the initial power level, and clarified the labels for the input and output fields.


Font Rectangle Parallel Number Slope
 

· Registered
1966 Jaguar Mark 10
Joined
·
33 Posts
Discussion Starter · #20 ·
Just happened to tune into one of my favorite YouTube channels, and got a good treatise on EV tires. Jason suggests a rolling resistance of 0.01 is kinda standard, not the 1.25 I have as the default in the calculator. Anyone got good knowledge on this?

I don't know what I'll do for the Jag - the existing steel wheels (not special) are only 14".

 
1 - 20 of 21 Posts
Top