Back to intro

A Data-Driven Approach to Predict Driving Range and Energy Consumption in Electric Vehicles Using Real-World Data

Final project report · Kathmandu University, Department of Mechanical Engineering · February 2026 · Team of four

Overview

How far an electric vehicle can go depends on how much energy it uses, and on a hilly road that changes a lot from one stretch to the next. Most energy models are built on standard drive cycles and do not handle long climbs and descents well.

This project builds a model for the Kathmandu to Manthali route, about 256 km of steep and varied road. It combines a physics-based energy calculation with a Random Forest model, so the prediction reflects the terrain as well as the driving.

Data

GPS logger data from a passenger vehicle that drove between Kathmandu and Manthali every day for three months. Each record has latitude, longitude, speed, heading, altitude and time.

Method

Map of the Kathmandu to Manthali route drawn from the interpolated GPS data
The route for one round trip, plotted from the interpolated GPS data.
Line chart of raw and processed vehicle speed over one day
Raw speed readings against the processed signal after outlier removal, interpolation and Kalman filtering.

Results

Energy model
R² of 0.8273 and RMSE of 0.145 kWh per 3 km segment on the test trips.
Tuning
R² improved from 0.7505 with default settings to 0.8273 after tuning the hyperparameters.
Driving range
Using a usable battery capacity of about 41.86 kWh, the model predicted an average range of 357.27 km. The actual average was 363.76 km.
Range error
3.92% MAPE per trip, with an RMSE of 20.22 km.
Scatter plot of predicted against actual energy for 3 km segments, close to the perfect prediction line
Predicted against actual energy for 3 km segments. Points near the dashed line are accurate predictions.
Bar chart of feature importance, led by uphill terrain and total elevation gain
Feature importance. Uphill terrain and total elevation gain matter most, which matches what the physics predicts.

Tools and methods