Calibrating Speed Profiles for Electric Delivery Fleets
Calibrating speed profiles for electric delivery fleets requires shifting from static, internal-combustion baselines to dynamic, telemetry-driven edge weights. Unlike legacy routing models that treat maxspeed as a fixed constant, EV calibration treats velocity as a continuous function of road grade, payload mass, battery state-of-charge (SoC), and thermal constraints. The calibration pipeline ingests synchronized GPS and CAN bus traces, normalizes them against road network topology, applies EV-specific correction multipliers, and continuously validates against observed route completion times and energy consumption.
EV-Specific Calibration Variables
Electric delivery vans exhibit non-linear speed degradation under load and elevation changes. Regenerative braking alters deceleration curves, while battery thermal throttling and SoC directly impact sustained cruising speeds. Accurate calibration must model four primary variables:
- Payload-to-Range Efficiency: Each additional 100 kg of cargo reduces average speed on inclines by 3–7%. This stems from motor torque limits and efficiency curve flattening at higher current draws. Calibration requires mapping curb weight + payload against manufacturer torque-speed envelopes.
- Grade-Dependent Power Consumption: Uphill segments demand higher continuous current, forcing speed caps to preserve range and prevent inverter overheating. Downhill segments recover energy via regeneration, permitting slightly higher approach speeds without range penalty. Grade thresholds should be binned at ±2%, ±4%, and >±6% for accurate cost assignment.
- Urban Stop-and-Go Frequency: Frequent acceleration cycles deplete high-current reserves faster than steady-state cruising. Dense delivery zones require lower baseline speeds (typically 15–25 km/h below posted limits) to account for acceleration energy penalties and dwell time variance.
- Battery Degradation Multipliers: Fleet vehicles typically experience 5–15% usable capacity loss after 50,000 miles. Long-term speed profiles must apply a degradation factor to the SoC threshold that triggers conservative routing, preventing route overruns as battery health declines.
Graph Weighting & Network Integration
Routing engines rely on directed graphs where edge weights represent travel time or energy cost. For electric fleets, raw OSM speed limits must be transformed into time-cost functions that incorporate elevation, road class, and historical fleet telemetry. Raw routing engines typically parse the maxspeed tag as defined in the OpenStreetMap Wiki, but EV profiles require overriding this baseline with dynamic multipliers.
This transformation aligns with established OSM Graph Architecture & Network Modeling principles, where static tags are replaced by dynamic cost matrices. When integrating with open-source routing stacks, you replace the default speed extraction logic with a custom profile that reads elevation profiles from SRTM or OpenTopography, applies payload-adjusted torque curves, and outputs a time_cost column. The resulting graph can be ingested by OSRM, Valhalla, or GraphHopper using their respective custom profile formats. When exporting to production routers like Valhalla, the calculated time_cost must map to the engine’s custom profile API schema to ensure correct edge weighting during pathfinding.
Python Calibration Pipeline
The following pipeline demonstrates a production-ready, vectorized approach to calibrating speed profiles. It ingests a base road network, applies EV-specific correction factors, and outputs calibrated speeds alongside time-cost weights for graph ingestion.
import numpy as np
import pandas as pd
def calibrate_ev_speeds(
df: pd.DataFrame,
base_speed_col: str = "base_speed_kmh",
grade_col: str = "grade_pct",
payload_col: str = "payload_kg",
soc_col: str = "soc_pct",
stop_freq_col: str = "stops_per_km"
) -> pd.DataFrame:
"""
Applies EV-specific correction multipliers to base road speeds.
Returns DataFrame with 'calibrated_speed_kmh' and 'time_cost_min_per_km'.
"""
# 1. Payload penalty: ~0.04% speed reduction per kg on non-flat grades
payload_factor = 1.0 - (df[payload_col] * 0.0004 * np.abs(df[grade_col]))
# 2. Grade penalty/reward: exponential drag on climbs, regen benefit on descents
grade_factor = np.where(
df[grade_col] > 0,
np.exp(-0.035 * df[grade_col]), # Uphill penalty
1.0 + (0.012 * np.abs(df[grade_col])) # Downhill regen allowance
)
# 3. SoC thermal throttling: aggressive reduction below 20% SoC
soc_factor = np.where(
df[soc_col] < 20,
0.75 + (0.0125 * df[soc_col]), # Linear ramp from 0.75 to 1.0
1.0
)
# 4. Stop-and-go penalty: urban acceleration drain
urban_factor = 1.0 - (df[stop_freq_col] * 0.025)
# Combine factors (clamped to realistic EV operating bounds)
df["calibrated_speed_kmh"] = (
df[base_speed_col] * payload_factor * grade_factor * soc_factor * urban_factor
).clip(lower=5.0, upper=df[base_speed_col])
# Convert speed to time cost (minutes per km) for graph weighting
df["time_cost_min_per_km"] = 60.0 / df["calibrated_speed_kmh"]
return df[["edge_id", "calibrated_speed_kmh", "time_cost_min_per_km"]]
Implementation Notes:
- Vectorization: The pipeline avoids
apply()loops, leveraging NumPy broadcasting for sub-100ms execution on 500k+ edge datasets. - Clamping: Speeds are bounded between 5 km/h (urban crawl) and the posted limit to prevent unrealistic routing suggestions.
- Time Cost Conversion: Routing engines optimize on
time_cost, not raw speed. The60.0 / speedtransformation ensures Dijkstra/A* algorithms correctly penalize steep or congested segments.
Validation & Continuous Drift Correction
Static calibration degrades rapidly as fleet composition, battery health, and seasonal temperatures shift. Implement a closed-loop validation pipeline that compares predicted vs. actual route completion times. Flag edges with >12% deviation for recalibration. Use rolling 30-day telemetry windows to update degradation multipliers and adjust urban stop-and-go coefficients based on actual dwell times and acceleration profiles.
For fleet operators managing mixed ICE/EV assets, the methodology parallels Speed Profile Calibration for Heavy Vehicles, particularly when accounting for curb weight differentials and axle-load distribution. Deploy A/B testing on low-risk delivery zones before rolling updated profiles to production routing engines. Monitor energy-per-kilometer alongside time accuracy to ensure speed reductions don’t inadvertently increase total fleet energy consumption through inefficient routing.