Inspiration

In the world of spec racing like the Toyota GR Cup, every car is identical. The only variable is the driver. While most telemetry tools focus on speed (how fast did you go?), they ignore efficiency (what did it cost?).

We were inspired by a simple question: "Is that 0.1 second gain worth destroying your tires for?"

We realized that tire life is like a bank account. Every corner is a transaction where you "spend" grip to "buy" lap time. We built the Toyota Racing ROI Engine to bring financial analytics to the race track, calculating the Return on Investment (ROI) for every single corner.

What it does

The ROI Engine processes race telemetry to answer questions traditional tools can't:

  1. Cost per Corner: It calculates the exact "Tire Energy" (in Joules) consumed in every turn.
  2. ROI Analysis: It identifies "Wasteful" laps where a driver pushed too hard for minimal gain (High Cost, Low Return).
  3. Predictive Strategy: It uses Machine Learning to predict the exact lap the tires will fail, allowing race engineers to plan pit stops perfectly.

How we built it

We built the core engine using Python, leveraging the data science ecosystem to turn raw sensor data into strategy.

1. The Physics Engine (Backend)

We ingest raw CSV telemetry data using Pandas. The biggest challenge was noise—raw G-force data is messy. We used SciPy to apply Savitzky-Golay filters, smoothing the sensor noise while preserving the sharp "spikes" of curb strikes that are crucial for analysis.

We then calculate the work done on the tires using a custom physics model: $$ \text{Tire Energy} = \int_{0}^{d} (m \cdot \sqrt{a_{lat}^2 + a_{long}^2}) \cdot ds $$ Where $a$ is acceleration and $ds$ is distance traveled.

2. The Strategy Brain (ML)

We use Scikit-Learn to track the cumulative stress on the tires. A Linear Regression model fits the degradation curve in real-time, predicting the "Cliff" — the moment tire performance will drop below a competitive threshold.

3. The Pit Wall (Frontend)

The user interface is built with Streamlit. It provides a "Pit Wall" experience for race engineers, featuring:

  • ROI Heatmaps: Visualizing efficiency across the track.
  • Friction Circles: Using Plotly to show how much of the available grip the driver is using.

Challenges we ran into

  • Data Alignment: Comparing Lap 5 to Lap 20 is difficult because speed varies. We had to resample all telemetry data from the time domain to the spatial domain (interpolating data to a fixed 1-meter grid) to make accurate corner-by-corner comparisons.
  • Defining "Cost": Translating G-forces into a "currency" required iterating on our physics model to account for the fact that high-speed corners destroy tires exponentially faster than slow corners.

Accomplishments that we're proud of

We successfully created a metric that didn't exist before. Instead of just saying "You were slow," our tool says "You were inefficient." We're particularly proud of the "Smart Coaching" system that automatically generates text advice like "Turn 4: You spent 15% more tire life for only 0.01s gain. Back off."

What we learned

We learned that in racing, the fastest lap isn't always the best lap. The winning strategy is often about managing resources, not just maximizing peak speed. We also deepened our knowledge of signal processing and how to clean real-world sensor data for production-grade analysis.

Share this project:

Updates