Skip to main content

Decentralized AI to Optimize Battery Performance, Lifetime, and Safety

Three cars on the highway, a contected cloud is illustrated on the highway

This collaboration between Cognivity AI Sweden AB and California-based Luxury EV Manufacturer explored the transition from static, rule-based battery management software to adaptive, AI-driven models deployed directly on the battery system.

Electric vehicle (EV) manufacturers currently face challenges in accurate battery diagnostics, leading to discrepancies in estimated range, charging times, and State-of-Charge (SoC) readings. Current Battery Management System (BMS) software is largely based on static lab data applied generically across all batteries, which ignores real-world variability and individual driving behaviors. Cloud-based alternatives offer limited improvements due to low data resolution, high processing costs, and strict data privacy regulations such as GDPR.

Consequently, these diagnostic limitations often result in oversized battery packs, range anxiety, and costly inefficiencies. Addressing these challenges requires a decentralized approach that can provide real-time, personalized diagnostics without the need for raw data transfer, thereby extending battery lifetime and ensuring data security.

The Project

The project investigated how decentralized artificial intelligence can be integrated into existing battery management systems. By tailoring proven AI models from stationary energy storage to automotive environments, the focus lied on validating the system’s accuracy, robustness, and adaptability in three key areas:

  • Decentralized Architecture and Data Security: The study analyzed the implementation of AI directly on the battery system. This architecture ensured GDPR compliance by allowing vehicles to exchange learned insights rather than raw data, creating a secure foundation for fleet-level intelligence.

  • Diagnostic Accuracy and Optimization: Using laboratory data and engineering fleet data, the project refined models for dynamic automotive conditions. The objective is to rigorously evaluate the models' ability to reduce State-of-Charge (SoC) and State-of-Health (SoH) estimation inaccuracies from ±30% to approximately ±2%.

  • System Integration and Cross-Platform Learning: The project evaluated how the multi-layer machine learning architecture could be seamlessly integrated using standard measurements (pack current, cell voltages, temperatures) without requiring additional sensor costs, enabling continuous learning across different climates and usage profiles.

This collaboration between Swedish and American experts bridges the gap between advanced predictive analytics and automotive engineering.

Portrait of a man talking and smiling

“No two batteries age the same way, yet today every car gets the same battery software. We wanted to change that. TrinityBMS gives every battery its own personalized software, which keeps learning from how that particular car is used and from other cars used in a similar way. Because the learning happens on the battery itself, customer data never has to leave the car, the models can learn from the most detailed data available, and the system can respond in real time. In our tests, that cut the error in the battery health estimate by around 70 percent. The next step is to show it working on a real fleet.” 

Christian Fleischer, CEO, Cognivity AI 

Key findings include:

Battery software is typically developed once and then shipped unchanged in every vehicle an OEM builds. Small differences between cells from manufacturing, together with climate, charging habits and driving style, pull each pack away from the average it was calibrated on. Over a vehicle’s life, its state estimates drift, and software inaccuracies can reach 25%. A single fleet-wide model can’t close that gap, and collecting raw data from every car to retrain centrally is expensive and raises privacy concerns. 

TrinityBMS is our answer: a decentralized learning framework that tailors the battery software to each vehicle while still learning from the whole fleet. Each vehicle trains on its own operating data, so its estimates adapt to that pack and that driver, and the raw data never leaves the car. Vehicles share only model updates. TrinityBMS groups vehicles whose batteries behave alike and builds a shared model for each group, so every vehicle learns from peers with similar usage rather than from one fleet-wide average. Finding the right balance between local training and group learning is still an active part of the work. 

What the project has delivered so far: 

  • Much more accurate state-of-health estimates. We emulated decentralized training with 100 clients in the TrinityBMS framework, each representing one vehicle with one NMC cells. TrinityBMS brought the per-cell state-of-health error (RMSE) down to 1.0 percentage points, compared with 3.7 for one shared fleet model and 4.8 for a pretrained generic model – about 3.3 times better than the shared model. The biggest gains came on the hardest cells: only 13% had an error above 2.5 percentage points, against 62% with the shared model. All results are averaged over five runs.
  • Validation in minutes, not weeks. Validating fleet learning on a remote setup used to take days to weeks per campaign. By optimizing the algorithms and distributing the framework across GPUs, we made it 10–40 times faster. A full 100-vehicle campaign now runs in minutes to hours, so we can iterate on large fleet simulations far more quickly.
  • Forecasting end of life early. An ensemble of Bayesian physics-informed neural networks (B-PINN) predicts a cell’s full state-of-health curve and total cycle life from just its first few cycles, with calibrated uncertainty. A complementary recursive forecasting model reaches an R² of 0.98 on state-of-health forecasting.
  • From research to the vehicle. These models are compute-intensive, so we built a toolchain that converts them from Python to C/C++ for embedded BMS hardware, covering both edge-GPU and microcontroller targets. Pruning, quantization and knowledge distillation keep the models small: in one case, a distilled model 25 times smaller than its teacher kept state-of-health error at 1.12%, against 1.0% for the original. 

The transatlantic collaboration is what made this benchmark realistic. Our OEM partner gave us access to real-world vehicle data, which we used to statistically emulate the vehicles in the fleet. So while the fleet itself was simulated, the way each emulated vehicle is used reflects how cars are actually driven and charged. 

Next comes full-scale validation, including confirming that the accuracy gains hold on later, unseen operating data for each cell. From there, we will take TrinityBMS step by step towards the road: software-in-the-loop (SiL) testing, then hardware-in-the-loop (HiL) testing on BMS, then deployment on a real battery pack, and finally scaling up across a fleet. 

Cognitivity

Each box in the figure is one vehicle in a simulated 100-vehicle fleet, and the number in it shows how far off that vehicle’s battery health estimate is, in percentage points. The darker the box, the bigger the error. 

On the left is how things work today: let’s assume every vehicle runs the same model, trained in advance and never updated once the car is on the road. As each battery ages in its own way, the estimates drift. For vehicle 2, the error reaches 13.6 percentage points. 

On the right: TrinityBMS lets each vehicle keep learning from its own data, while vehicles that behave alike share what they learn through a common group model. For the same vehicle 2, the error drops to just 0.8. Across the fleet, the average error falls from 3.7 to 1.0 percentage points, and 95 of the 100 vehicles get a better estimate. 

Partners: Cognivity AI Sweden AB and California-based Luxury EV Manufacturer 
Project Manager: DR. Christian Fleischer, Cognivity AI Sweden AB 
Period: 2025 – 2026

This collaboration is the result of a joint effort led by Future Mobility, co-funded by Vinnova and the Swedish Energy Agency. The initiative is designed to foster partnerships and strengthen the research and innovation (R&I) network between Sweden and the United States to speed up the development of sustainable mobility.

Do you want to explore more? 

Man smiling into the camera

Hans Pohl

Future Mobility
Program Director
hans.pohl@lindholmen.se
+46(0)70-840 27 40
A road, data is visualized on the road

Innovation projects

On this site, you can find active and finalized projects with co-funding from Future Mobility.