Terrain simulation. To replicate real-world road conditions, we simulated the 20 drive cycles using our in-house EV Simulink model (Supplementary figure ). The model components, descriptions and parameter values are detailed in the (Supplementary information). The model takes two inputs, a) time-series velocity drive cycles and b) a gradient value representing terrain features. Gradient values of 0, 20 and -20 were used to simulate flat, uphill, and downhill terrains, respectively. For each drive cycle, we generated three distinct simulated profiles corresponding to different terrain conditions. The accuracy of our model was evaluated against MATLAB's built-in EV model (Supplementary figure ) for standard drive cycle from Federal Test Procedure (FTP) (Supplementary figure ). Since the model outputs the current and voltage for an entire battery pack, the values were scaled down to match the nominal voltage of a single lithium-ion cell. Assuming the battery pack has 96 cells in series and parallel, the individual cell current was calculated by dividing the current values by 96.