Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Torque and speed car

Discussion in 'Physics' started by Sebastien_Euca, Oct 11, 2018 at 8:59 AM.

  1. Sebastien_Euca

    Sebastien_Euca

    Joined:
    Apr 15, 2018
    Posts:
    5
    Hello,I would like to control the speed using curve.Because I want to reproduce the acceleration of a specific car.There is a way to convert rpm or km\h to torque? Or an other way to obtain the acceleration (I have the curve in f(x)).
    250 Km/h max.
    Max torque 140.
    2880 rpm
     
  2. NDSno1

    NDSno1

    Joined:
    Dec 20, 2014
    Posts:
    195
    Well that's depends on how you want to do it and what kind of curve you have. Is it a distance vs time or speed vs time, or something else?
     
  3. Sebastien_Euca

    Sebastien_Euca

    Joined:
    Apr 15, 2018
    Posts:
    5
    I have a speed/time curve and it's a smooth curve.
    You need the équation ?
    With 140 of torque,my car go to the full speed ,but so fast...
    The full speed on thé curve is obtained at 24 seconde.
     
    Last edited: Oct 11, 2018 at 5:37 PM
  4. xorpheous

    xorpheous

    Joined:
    Mar 28, 2018
    Posts:
    7
    So what you need is torque to be a function of engine speed, as it would be with a real car.

    Torque(rpm) = ...math stuff...

    You could use a simple parabolic approximation for your torque curve,

    Torque(rpm) = -a(xh)2 + k

    Where k is your peak torque at an engine speed of h. The coefficient a is a parameter defining the flatness of your torque curve. Smaller values will result in something more peaky, and higher values for something flatter. I'd recommend putting in your desired peak torque (k) at the desired engine speed (h) and play with the parameter a until you have the jump from a standing start you want.

    You could use a lookup table or a higher-order polynomial model if you wanted to model a curve you've obtained from a dyno, but a reasonably flat parabola will get you close.
     
  5. Sebastien_Euca

    Sebastien_Euca

    Joined:
    Apr 15, 2018
    Posts:
    5

    Time (s)
    / Speed (Km/h)
    To be honest, I don't understand (I speak French).My peak torque is k = 140 ,okay for a ,h is for rpm speed ? but it's not static ? And after how do I apply this curve to the car ?
    Else I have this f(x) = 0.004166667 + 0.004077778 * x + 0.0005274167 * x^2 - 0.000003814444 * x^3 + 1.27e-8 * x^4
     
    Last edited: Oct 12, 2018 at 5:32 PM
  6. xorpheous

    xorpheous

    Joined:
    Mar 28, 2018
    Posts:
    7
    So based on your Time vs Velocity graph, I was able to calculate an Acceleration vs. Velocity function. I inverted your function to get Velocity vs Time, then took the derivative to get the acceleration (a = dv/dt). From there, I was able to generate a plot of A vs. V and fit a polynomial to it. This won't give you torque, but for a fixed mass car with a fixed radius wheel, the difference is only a multiplicative factor.
     
  7. Intense_Gamer94

    Intense_Gamer94

    Joined:
    Jun 20, 2013
    Posts:
    1,361