Electric vehicle
- 2 state
- 1 control
- Lagrange cost
- fixed final time
- 4 boundary
- OptimalControl valid
- OptimalControl, scalarized valid
- JuMP valid
- ModelingToolkit valid
The Electric Vehicle (EV) trajectory problem is a benchmark in optimal control for energy-efficient driving. It was introduced by Petit & Sciarretta (2011) as a simplified longitudinal model of an electric vehicle moving along a road with varying slope. The state variables are the vehicle position
Here, we denote the final time as
Mathematical formulation
where the road slope is modelled as a cubic polynomial
and the parameters
Qualitative behaviour
The optimal solution balances traction and braking to respect the velocity boundary conditions while minimising energy consumption.
Road slope variations
introduce nonlinearities, strongly influencing the structure of the optimal control. For flat roads, the solution often exhibits a bang–singular–bang profile, while slopes lead to asymmetric trajectories.
Characteristics
Nonlinear second-order dynamics including drag, gravity, and slope effects.
Mixed linear–quadratic cost reflecting energy and smoothness trade-offs.
Fixed-distance trip with zero final velocity.
Benchmark for testing energy-optimal trajectory generation and direct transcription methods in electric vehicles.
References
Petit, N., & Sciarretta, A. (2011). Optimal drive of electric vehicles using an inversion-based trajectory generation approach. IFAC Proceedings Volumes, 44(1), 14519–14526. Introduces the EV optimal control formulation, including energy-efficient trajectory generation and numerical solution methods.
Sciarretta, A., & Guzzella, L. (2007). Control of Hybrid Electric Vehicles. IEEE Control Systems Magazine, 27(2), 60–70. Provides context for energy-optimal vehicle control and modelling of longitudinal dynamics.
Feng, X., & Petrovic, D. (2010). Energy-optimal control of electric vehicles: A review of recent advances. IEEE Transactions on Intelligent Transportation Systems, 11(3), 678–689. Surveys numerical methods for EV trajectory optimisation, including handling of road slopes and energy costs.
Parameters
| Parameter | Default value | Unit | Meaning |
|---|---|---|---|
t0 | 0 | s | initial time |
tf | 1 | s | final time |
b1 | 1.0 | – | weight of the power u·v in the cost |
b2 | 1.0 | – | weight of u² in the cost |
h0 | 0.1 | – | constant resistance in the dynamics of v |
h1 | 1 | – | gain of the control u in the dynamics of v |
h2 | 0.001 | – | coefficient of the quadratic drag v² |
α0 | 3 | – | coefficient of degree 0 of the road profile, a cubic in x |
α1 | 0.4 | – | coefficient of degree 1 of the road profile |
α2 | -1 | – | coefficient of degree 2 of the road profile |
α3 | 0.1 | – | coefficient of degree 3 of the road profile |
x_t0 | 0 | m | initial position |
v_t0 | 0 | m/s | initial velocity |
x_tf | 10 | m | final position, the length of the trip |
v_tf | 0 | m/s | final velocity |
Every modeling takes other values with the keyword parameters, merged with these: electric_vehicle(backend; parameters=(t0=…,)).
Reference objective
The best objective among the solves that converged, in each modeling, on the default grid of the modeling: the modelings are independent, each has its own reference. See how the references are computed.
| Modeling | Scheme | Grid | Reference objective | Solves | Distinct solutions | Configurations agree |
|---|---|---|---|---|---|---|
| JuMP | :trapeze | 500 | 1228.599284 | 8 | 1 | yes, within 0 |
| OptimalControl | :trapeze | 500 | 1228.599284 | 18 | 1 | yes, within 9.3e-16 |
| OptimalControl, scalarized | :trapeze | 500 | 1228.599284 | 3 | 1 | yes, within 0 |