Inspiration
Professional motorsport teams generate terabytes of telemetry data but lack real-time tools to convert raw sensor readings into specific driver actions that measurably reduce lap times. Existing systems provide generic metrics without quantifying the exact technique changes needed or predicting the resulting time gains, leaving performance optimization to subjective coaching rather than data-driven analysis.
What it does
EngiTorqueMap processes racing telemetry at 100Hz to compute energy flow vectors (braking power, acceleration power, yaw energy, tire loads) and generates specific technique recommendations like "brake 12m later in Turn 3 for +0.17s gain" using machine learning models. The system provides real-time FlowGrid visualizations of energy fields, pre-event forecasting based on weather and historical data, post-race forensic analysis of efficiency degradation and multi-agent AI strategy recommendations for pit timing and pace management.
How we built it
The backend uses FastAPI to orchestrate microservices processing track geometry with GDAL/Shapely spline interpolation, computing physics-based energy vectors from telemetry, and executing ML predictions through XGBoost regressors, LSTM networks, UMAP+HDBSCAN clustering, and gradient boosting models. Kafka streams telemetry messages to consumer threads performing real-time energy calculations cached in Redis with WebSocket broadcasting to browser clients rendering D3.js charts, Three.js 3D holograms, and Leaflet.js track maps. LLM integration uses LangChain to synthesize multi-agent outputs (Energy Field, Time-Shift, Strategy, Opponent agents) into actionable recommendations via GPT-4 API calls with Sentence-Transformers embeddings stored in ChromaDB vector database. Databases: PostgreSQL 14 with TimescaleDB for time-series telemetry hypertables, Redis 7 for session state caching, ChromaDB for vector embeddings, Kafka for message streaming.
Challenges we ran into
Synchronizing 100Hz telemetry streams with 10Hz GPS data required custom interpolation logic to align timestamps while preserving signal fidelity. UMAP dimensionality reduction proved sensitive to feature scaling, necessitating StandardScaler normalization and hyperparameter tuning (n_neighbors=15, n_components=3) to achieve stable driver clusters. Real-time energy vector computation at 100Hz pushed CPU limits, requiring optimization through vectorized NumPy operations and Redis caching to maintain <100ms latency.
Accomplishments that we're proud of
Successfully integrated 10 distinct processing steps into a cohesive pipeline from raw Toyota Gazoo Racing Datasets ingestion through real-time streaming to AI-powered recommendations. Achieved accurate time-shift predictions with gradient boosting models showing 91% correlation between predicted and actual lap time improvements in validation testing. Implemented production-ready architecture handling concurrent WebSocket connections, Kafka message streaming, and database transactions with horizontal scalability via containerized micro-services.
What we learned
Physics-based energy modeling requires domain-specific approximations (vehicle mass, drag coefficients, rolling resistance) tuned to racing contexts for meaningful predictions. Multi-agent AI architectures need explicit coordination mechanisms (shared Redis state, LLM synthesis) to prevent conflicting recommendations. Real-time visualization performance demands careful optimization (canvas rendering, data decimation, WebSocket batching) to handle 100Hz update rates without browser lag.
What's next for EngiTorqueMap
Implement reinforcement learning agents that optimize racing lines by simulating thousands of lap variations to discover faster trajectories than human-driven reference laps. Deploy edge computing with ONNX Runtime on in-car hardware for sub-10ms latency energy analysis and immediate driver feedback via steering wheel displays. Integrate computer vision processing of onboard camera feeds to detect traffic patterns and adjust strategy recommendations based on opponent positioning, enhancing the Opponent Dynamics Agent with visual perception capabilities.
Built With
- anthropic-claude
- apache-kafka
- bayesian-ridge
- black
- chromadb
- cnn
- css3
- d3.js
- docker
- docker-compose
- fastapi
- flake8
- folium
- gdal
- geopandas
- git
- gpt-4
- gradient-boosting-regressor
- hdbscan
- html5
- javascript-es6
- keras
- kubernetes
- langchain
- leaflet.js
- lstm
- matplotlib
- mypy
- nginx
- numpy
- onnx-runtime
- openai
- pandas
- plotly
- plotly.js
- postgresql
- pydantic
- pyproj
- pytest
- python
- random-forest
- rasterio
- redis
- scikit-learn
- scipy
- seaborn
- sentence-transformers
- shapely
- sql
- tensorflow
- three.js
- timescaledb
- umap
- uvicorn
- xgboost
- zookeeper
Log in or sign up for Devpost to join the conversation.