Sign in to follow this  
dapope

getting torque from rpm

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...

Cheers,

Timkin

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.calcTQE(rpm)
rpmCurve.clcTQE(tqe, rpm)

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

-=dapope=-

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this