Jump to content
  • Advertisement
Sign in to follow this  

getting torque from rpm

This topic is 4972 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive entered 8 data points. 0k - 7k RPM and the torque at each point. What I want todo now is get torque for an RPM that doesnt exactly match a defined data point. so I know @ 0k RPM its 0 torque and at 1K RPM its 100ftlbs. I need to figure out what is the torque value in ftlbs at 273RPM? or 6237 RPM etc etc. Any help is greatly appreciated. I know a line is: y = mx + b I dont know how to get the change in Y to calc the slope. PLEASE HELP :) -=dapope=-

Share this post

Link to post
Share on other sites
The problem you're facing is interpolation. If you want a smooth RPM-Torque curve, then fit cubic splines to your data (these preserve continuity of the first two derivatives of a function fitting the data).

Alternatively, if this is to be used frequently in your program, then you should consider precomputing a lookup table with sufficient resolution to cover the smallest difference in the output variable (in this case torque) that your system requires.

If this is too fine a detail (leading to a too large LUT), then a more coarsely grained table and linear interpolation might be sufficient.

Linear interpolation is trivial and can be found in almost any text book on calculus and analytic geometry... as well as most stats books... and a pile of graphics programming books...



Share this post

Link to post
Share on other sites
linear interpolation...

say you have data point (rpm=4000, torque=250 N.m) and (rpm=6000, torque = 315 N.m).
you want torque for rpm=4451

t = (4451-4000) / (6000-4000:

torque = 250 + t * (315 - 250)

in short, given points P1 and P2, you want to interpolate for Point P where P.x is known and between P1.x and P2.x (but not necessary).

t = (P.x - P1.x) / (P2.x - P1.x);
P.y = P1.y + t * (P2.y - P1.y);

That's basic 1-dimensional linear interpolation. You can use it for a variety of things, like for your case, graphs, uniform scaling, to model a crude electronic amplifier or gate, with the input maxing out and mining out of course.

Share this post

Link to post
Share on other sites
Awesome thanks so much.

Ive got it running and it works quite well, next step is to graph the curve.

Any suggestions on how to structure this stuff?

So for instance. i want a viper and a pinto.

so its:
rpmCurve = rpmCurve();
if car.rpm <=1000:
rpmCurve.startRPM = 0;
rpmCurve.endRPM = 1000;
rpm.startTQE = 0;
rpm.endTQE = 88;
elif 2000:
elif 3000:
etc etc

rpmCurve.clcTQE(tqe, rpm)

I want to make each cars torque curve attrs on its car object any ideas?


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!