Winning GT3 Racing Using Google Cloud and Fledge
Optimizing machine operations using Industrial IoT Fledge with Google Cloud, ML and state-of-the-art digital twins and simulators
Gradient Racing is a professional auto racing team based in Austin, Texas. One of Honda’s customers for NSX GT3 Evo, Gradient is committed to using cutting edge technology to gain an edge in GT racing.
Modern race cars have thousands of adjustable parameters in their suspension, aerodynamics, transmission and other systems. Finding the perfect configuration of these parameters for a given driver, track and race strategy is key to winning races. In GT racing, this has been more art than science, with drivers making multiple test runs and working with the race team to adjust the car based on feel.
Like Formula One and Nascar, Gradient wanted to bring state-of-the-art simulation technology to bear on this problem, believing that it would allow them to configure the car far more precisely. To do this, they engaged Motorsports.ai, a leader in racing modeling.
Creating a Virtual Racing Environment
Motorsports.ai’s goal was to create a full simulation environment of the race: a simulated driver, a simulated car and a digital twin of the track. While car simulation software was commercially available, Motorsports.ai decided to use machine learning technology to develop an AI driver that would react to conditions in the same way as Gradient’s human driver.
Motorsports.ai deployed the Linux Foundation’s Fledge for three functions. First, to collect the massive amount of data required to train the machine learning system. Second, to validate the race simulations of car, driver and track. Last, to help validate the digital twin of each race track. Originally developed by Dianomic Systems, Fledge joined LF Edge, an umbrella organization that aims to establish an open, interoperable framework for edge computing independent of hardware, silicon, cloud, or operating system, last year. Fledge is an open-source Industrial IoT framework to collect sensor data, enhance it with meta information, run ML models on the edge and reliably transport data to central or cloud-based processing systems. In a matter of weeks, Motorsports.ai developed the plugins needed to interface Fledge with the race car’s CAN Bus and Eclipse Cyclone DDS interfaces to over 2000 in-car sensors.
The human driver made multiple test runs on the track to determine his reaction to different conditions. Twenty times a second, Fledge collected readings on every aspect of car performance, as well as driver actions such as gas pedal and brake pressure, steering angle and gear changes. Fledge enhanced each reading with the precise timestamp and GPS location of the car on the track. Overall, Fledge collected more than 1GB of data on each test run, which it buffered and automatically transmitted to Google Cloud at the end of the run. Motorsports.ai fed this data into TensorFlow running on a 20 node Google Kubernetes Engine cluster to validate the digital twin, and improve the accuracy of the predictions.
To build the model, Motorsports.ai integrated Fledge into a highly accurate simulation, and virtual prototyping environment to collect the same data as was collected in the physical car. Using TensorFlow, they then run distributed machine learning jobs using the KubeFlow framework on the aforementioned kubernetes cluster. Fledge is used to manage the sensor data from both the actual and virtual track runs. Motorsports.ai uses these results to provide predictions that ensure a competitive performance.
A key attribute for a digital twin is validation, and verification, which in this case requires precise mapping of the track surface type. The coefficient of friction between the car’s tires and track varies at each venue, the surface could be asphalt, concrete, painted, or all of the above. To identify the surface type for the digital twin, an Intel RealSense camera was deployed on the car, oriented to the track. ML models running on the NVIDIA Jetson Xavier platform were then used to identify surface categories while Fledge added the telemetry, and timestamp to the ML models surface type category predictions.
Gradient used the Motorsports.ai simulation to optimize suspension and alignment settings for every race in 2019. The simulation enabled far more rigorous tuning than their previous manual method. Instead of building a configuration based on a few laps and driver “feel”, they were able to run tens of thousands of simulations using precise measurement. They were able to investigate conditions that had not yet been experienced on the actual track and ensure that they could compete effectively in them.
For example, for tire camber alone they ran 244 simulations, testing the camber of each tire at 0.1° increments through a range of -3.0° to +3.0°. All told, Gradient simulated more than 10,000 track runs for each race, orders of magnitude more than would have been possible using a human driver.
The results showed on the scoreboard. Gradient broke the Circuit of the Americas track record by over 1.1 seconds and the Mid-Ohio Sports Car Course record by more than 1 second. They continued their success at other races and took home the national GTB1 championship title of the 2019 Pirelli Triple Trofeo.
To learn more about Fledge, visit https://www.lfedge.org/projects/fledge/, get the code here, or engage with the community on Slack (#fledge).
To learn more about LF Edge, visit https://www.lfedge.org/.