Table of Content

Block

Roadmap

Block

Model 3 Recap

Alright my bad, in the previous Model 2: Load Transfer Without Traction Limits (1D) post, I placed a lot of emphasis on how model 2 feel pointless until model 3. Well, now that I actually have studied model 3, apparently, model 2 are still kinda pointless for model 3 lol… They probably won’t matter up until model 5, but… there’s at least a merit for this, that is model 3 will affect model 2, so there’s that.

So yeah, its also now that i realized my roadmap is not the best to grasp this entire system, but then again, its mine, and its my learning…

For model 3, the most important thing is that we will basically replace our current drive force derivation:

Fengine=u(t)FengineMaxF_{\text{engine}} = u(t) \cdot F_{\text{engineMax}}
Block

With a much more complex subsystem that involves an actual engine with an actual gearbox. Whats more, model 3 is also kinda similar to model 2 in that we will also be deriving some values that feels pointless right now, but essential later on.

The physics and stuff will pretty much remain the same, meaning if you let the car decelerate without pressing anything, it will pretty much be the same as simulator 1 and 2, what will be different, is mostly… controls.

If I had to, this image pretty much sums up model 3… And I will explain why in this post:

suction cup wheels


1. The Engine

In model 1 and model 2, we can imagine the car as a rocket that just magically produce forward motion, well, real cars don’t do that, they have an engine, and it produces torque.

Torque is basically just a rotational force compared to the “straight” force that we have been working with for the last 2 models. And thats exactly what the engine do, it spins.

To kind of just get to the gist of it, if previously, we were doing:

Fengine=u(t)FengineMaxF_{\text{engine}} = u(t) \cdot F_{\text{engineMax}}
Block

now we will be doing:

Fengine=Fdrive=uTengineMaxxgxdnRwF_{\text{engine}} = F_{drive} = \frac{u \cdot T_{engineMax} \cdot x_g \cdot x_d \cdot n}{R_w}
Block
  • Units breakdown
Term Meaning Unit
$F_{drive}$ drive force Newton (N)
$u$ direction unitless
$T_{engine}$ engine torque Newton-meter (N·m)
$x_g$ gear ratio unitless
$x_d$ differential ratio unitless
$n$ efficiency unitless (0.0–1.0)
$R_w$ wheel radius meters (m)

Quick consistency check: $\frac{N \cdot m}{m} = N$, so, still a force like $F_{\text{engine}}$.

For now, lets focus on $ T_{engineMax} $.


1.1. The Torque/Power Curve

1.1.1. First Intuition

In their guide, they have this plot:

torque power curve

Now, a quickie: rpm (revolution per minute), basically how many times the engine made a full 360 degree spin with its shaft in 1 minute. In this context, we can think of the relationship between torque and rpm as follow:

TengineMax=f(rpm)T_{engineMax} = f(rpm)
Block

And by the way, we won’t be touching hp (horsepower) in pretty much our entire roadmap, its just an equivalent unit more commonly used amongst car folks and engineers.

Here’s the same plot using SI units, matching our current unit set:

torque power curve si

Again, we will only be focusing on torque, so pay attention to the orange line for now.

Now, as someone who have never driven before, when I first look at this, my first question is: “Why isn’t this orange line always increasing?”. Well, the engine basically have a “sweet-spot” for it to be able to deliver maximum torque, which is usually around the mid-high range of this line as you can see, once we go past that maxima, both torque and power goes down.

What’s more, notice how this plot isn’t defined at $ \leq 1000 $ rpm and $ ~> 6000 $ rpm, the specific value here doesn’t really matter, lets just call them the left side and the right side…

In car lingo, the left side is called the stall zone meaning you can’t really produce torque successfully at that rpm, again, we are not dealing with an arbitrary force generator anymore, we are dealing with a real life engine. Basically if you start an engine, it have to start spinning at that rpm. Not that it can’t literally spin at that rpm, but rather, it can’t maintain it without dying and needing to restart.

And beyond the right side, is what they call the redline, if you go beyond this point, you will damage your engine.


1.1.2. Example Torque Curve Implementation

But now, what does this curve actually mean for us? And what is its relation to the new $F_{drive}$ equation?

Having defined that $T_{engineMax} = f(rpm)$, and seeing that the torque curve doesn’t seem to be a function (these curves are determined from engine tests), we can imagine that we will be implementing this torque thing with a look up table, something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Simplified Torque Lookup Table for an LS1 Engine (RPM, Torque in Nm)
# Based on SI unit plot values
TORQUE_CURVE = [
    (1000, 390),
    (2000, 430),
    (3000, 450),
    (4000, 470),
    (4400, 475), # Peak Torque
    (5000, 460),
    (6000, 390)  # Redline
]

def get_max_torque(rpm):
    # Handle Stall Zone and Redline boundaries
    if rpm <= TORQUE_CURVE[0][0]: return TORQUE_CURVE[0][1]
    if rpm >= TORQUE_CURVE[-1][0]: return TORQUE_CURVE[-1][1]
    
    # Linear Interpolation between points
    for i in range(len(TORQUE_CURVE) - 1):
        rpm_low, torque_low = TORQUE_CURVE[i]
        rpm_high, torque_high = TORQUE_CURVE[i+1]
        
        if rpm_low <= rpm <= rpm_high:
            # Calculate how far we are between the two points (0.0 to 1.0)
            fraction = (rpm - rpm_low) / (rpm_high - rpm_low)
            return torque_low + fraction * (torque_high - torque_low)
    return 0
Python

And for rpm, we can calculate it from the car’s current motion:

rpm=ωwheelxgxd602π\text{rpm} = \omega_{wheel} \cdot x_g \cdot x_d \cdot \frac{60}{2\pi}
Block

where:

ωwheel=vRw\omega_{wheel} = \frac{v}{R_w}
Block

But remember our stall zone? in implementation, we can do something like this:

1
rpm = max(rpm, rpm_idle)  # rpm_idle ~1000
Python

So technically, the engine is always running for our simulator. You may be asking, if the engine is spinning, and both rpm and torque is only defined starting from 1000 and below 6000, so meaning that we are idling with the engine spinning at 1000 rpm, so is my car going to always move? Well, for that, we are going to talk about a real pedal in a car called a clutch, its a component for the driver to disconnect the engine from the wheels, meaning the engine spins but the wheels doesn’t. We are going to talk more about it later, for now, don’t worry about that.

And about the redline, if we simply do:

1
rpm = min(rpm, rpm_redline)
Python

then we aren’t actually simulating a “limit”, we are just pretending the engine stops getting faster while still allowing it to produce maximum force.

So instead, what we should do is:

1
2
if rpm > rpm_redline:
    T_engine = 0
Python

above approach is called a rev limiter. This creates a “hard cut” where the engine stops producing torque until the RPM drops back into the safe zone. This provides immediate feedback to the player that they need to shift gears. If this gets confusing… it was and probably still is for me too, just kinda know that actual real cars does this rev limiter thing. In real car, say the engine is doing a smooth continuous “rvrrrrrrr”, this rev limiter thing is what make that “rvrm rvrm rvrm rvrm rvrm rvrm” sound, which exactly translate to us setting T_engine = 0 continuously as we are just neck close to the redline.

So thats $T_{engineMax}$ for us, but remember that the entire engine is:

Fdrive=uTengineMaxxgxdnRwF_{drive} = \frac{u \cdot T_{engineMax} \cdot x_g \cdot x_d \cdot n}{R_w}
Block

In the next section, we will be breaking down the rest of the arguments in the above equation.


1.2. Gear Ratios

In our drive force equation, $x_g$ (Gear Ratio) and $x_d$ (Differential Ratio) transform engine effort into wheel force. For a Corvette C5, the values look like this:

Gear Ratio ($x_g$) Total Multiplier ($x_g \cdot x_d$)
First gear 2.66 ~9.10
Second gear 1.78 ~6.08
Third gear 1.30 ~4.44
Fourth gear 1.00 ~3.42
Fifth gear 0.74 ~2.53
Sixth gear 0.50 ~1.71
Reverse 2.90 ~9.91
Differential $x_d = 3.42$

Think of the Differential Ratio as a global multiplier that’s always on. The Gear Ratio is the one the driver (or your code) swaps out.

In 1st gear, your total multiplier is 9.1. This means for every $1\text{ Nm}$ of torque your engine makes, the axle gets $9.1\text{ Nm}$ of twisting force. Even if we lose 30% of that energy to heat and friction ($n = 0.7$), we still end up with a massive mechanical advantage.


1.2.1. Strength vs. Speed

You can’t just multiply torque forever and get a rocket ship for free. Physics demands a trade-off: Strength vs. Speed.

  • Low Gears (High Ratio): You get massive torque (strength) to overcome the car’s inertia and start moving, but the engine has to spin 9.1 times just to make the wheels spin once.
  • High Gears (Low Ratio): You get less torque, but the wheels can spin much faster relative to the engine. This is why you can’t start a car in 6th gear. You have the speed, but not the muscle to move the mass.

torque power curve per gear

This is how it looks when we plot it. The yellow line (Gear 1) is a huge spike of torque, but it runs out of RPM very quickly. The dark blue line (Gear 6) is much lower, but it stretches way further to the right.

The above plot we looked at was technically correct, but it’s a bit confusing. It tells you what the motor is doing, but it doesn’t tell you what the car is doing. To bridge that gap, take a look at this plot:




Drivetrain Specs:
Max Tractive Force (Gear 1): 12404 N
Theoretical Top Speed (Gear 6 @ 6000 RPM): 92.6 m/s (333 km/h)
  • The X-Axis (Speed in m/s): Now, you can see exactly how much “road” each gear covers.
  • The Y-Axis (Tractive Force in N): Instead of Torque (which is rotational), we are measuring Newtons. This is the direct translation for the tires exert against the asphalt to move the car’s mass forward.

Each coloured curve is generated from the same core relationships:

  • Total torque multiplication (engine -> wheel):
Wheel Torque=Engine Torque×xg×xd\text{Wheel Torque} = \text{Engine Torque} \times x_g \times x_d
Block
  • Tractive force (convert rotational torque to linear thrust):
Ftractive=Wheel TorqueRwF_{\mathrm{tractive}} = \frac{\text{Wheel Torque}}{R_w}
Block
  • Speed translation (engine RPM → vehicle speed):
v=RPM×2π×Rw60×xg×xdv = \frac{\text{RPM} \times 2\pi \times R_w}{60 \times x_g \times x_d}
Block

The black dotted curve is the Optimal Envelope: for each speed it shows the maximum tractive force available across all gears. Staying on this envelope maximizes acceleration. Where two gear curves cross is the mathematical shift point, beyond that speed a higher gear produces more tractive force, so remaining in the lower gear would reduce acceleration.


1.2.2. The Final Calculation

To get the final $F_{drive}$ that we actually plug into our physics loop, we take that engine torque and finish the math:

Fdrive=TenginexgxdnRwF_{drive} = \frac{T_{engine} \cdot x_g \cdot x_d \cdot n}{R_w}
Block

Using the Corvette example at peak torque ($475\text{ Nm}$) in 1st gear:

4752.663.420.70.339166 N of force\frac{475 \cdot 2.66 \cdot 3.42 \cdot 0.7}{0.33} \approx 9166\text{ N of force}
Block

With $9166\text{ N}$ of force pushing a $1439\text{ kg}$ car, you get an acceleration of $6.4\text{ m/s}^2$.

Note: if you notice, some curves in the plot above are defined within the stall zone that we mentioned. Its crucial to know that X-axis on this specific plot isn’t representing Engine RPM (like in the torque power curve plot) anymore, it is representing Axle RPM (the speed of the rear wheels). Which is why that black curve is literally just “engine”

When you are in a high gear ratio (like 1st gear), the wheels spin much slower than the engine.

Block

1.2.3. About the Clutch

Earlier, I briefly mentioned the clutch, to recap: Up until now, we’ve been assuming that the engine and the wheels are always perfectly connected. In reality, that’s not always true, and this is where the clutch comes in.

The clutch is a component that allows the driver to temporarily disconnect the engine from the drivetrain. When you press the clutch pedal, the engine can keep spinning freely without forcing the wheels to spin with it.

Now, for our simulator(s), we are not implementing the clutch (at least not until much later, probably). I think right now, it just adds way to much complexity and is genuinely a difficult component to grasp especially for people who have never driven before. This is not physically perfect, but it keeps the system stable, simple, and focused on the core ideas.


1.2.4. Transmission Modes Going Forward

“Transmission” just mean a connection between the engine and the wheels when talking about a car, it “transmits” power. With that being said, starting from model 3, I will be focusing on 2 main transmissions:

  • Manual transmission:
    • You control gear shifting directly
    • No clutch (so this is a simplified manual)
  • Automatic transmission:
    • The system shifts gears for you
    • Brake can also act as reverse at low speeds

This lets us explore the physics and behaviors without literally learning how to drive. Automatic will also be helpful if in the future we want to explore autonomous vehicles ;).


2. The Suction Cup Wheels

This post is a work in progress, sorry i had to push it early cause im testing something

Comments are disabled for this post