Skip to content

Vehicle-system drive cycles

aeolus1d carries a vehicle-system layer alongside the 1-D gas-network solver: a longitudinal vehicle model, a closed-loop driver, drive-cycle profiles, a transmission/driveline with an AMT shift state machine, a parallel-hybrid powertrain, and a control/signal toolbox. This is the AVL Cruise M-style vehicle workflow — feed a speed-time target, let a driver model track it, and read back the cycle KPIs (distance, tracking error, fuel, CO₂).

A vehicle-system run is not a 1-D gas-network solve, so it has its own self-contained case format and CLI entry point:

aeolus1d drive-cycle examples/85_vehicle_drive_cycle.toml --out trace.csv

aeolus1d run is for gas-network cases; aeolus1d drive-cycle is for vehicle-system cases. They do not share a schema.

The case file

Four blocks, all optional except [drive_cycle]:

[vehicle]                     # aeolus1d.vehicle.VehicleParameters fields
mass_kg = 1300.0
cd = 0.30
frontal_area_m2 = 2.2
wheel_radius_m = 0.30
gear_ratio = 8.0              # combined gearbox × final drive
driveline_efficiency = 0.92
crr = 0.010                   # rolling-resistance coefficient

[driver]                      # aeolus1d.driver.DriverParameters fields
kp = 2.0                      # P gain on speed error  [1/s]
ki = 0.5                      # I gain                 [1/s²]
feedforward = true            # add steady road-load; PI only trims

[drive_cycle]
source = "builtin"            # "builtin" | "csv" | "segments"
name = "urban_illustrative"
dt_s = 0.1                    # keep kp*dt_s < 1 (PI pole 1 - kp*dt_s)
grade_rad = 0.0

[report]                      # optional — turns wheel work into fuel/CO₂
bsfc_g_per_kwh = 240.0
fuel_density_kg_l = 0.745      # gasoline default
fuel_co2_g_per_g = 3.09        # gasoline default (g CO₂ per g fuel)

Unknown keys in [vehicle], [driver], and [report] raise an error (typo protection) rather than being silently ignored. The only three keys [report] accepts are bsfc_g_per_kwh, fuel_density_kg_l, and fuel_co2_g_per_g; the last two default to gasoline (0.745 kg/L, 3.09 g CO₂/g) and only matter once a BSFC is supplied.

A gearbox, and a coast-down road load

Added 2026-10-22, for the Cruise M vehicle import. Two optional parts of [vehicle] stand in for keys above:

[vehicle]
mass_kg = 1375.0
wheel_radius_m = 0.305
gear_ratios = [3.538, 1.913, 1.31, 0.971, 0.714, 0.619]   # gear 1 first
final_drive = 3.944
shift_strategy = "economy"      # or "sport"
road_load_f0_N = 128.79         # F = F0 + F1 v + F2 v^2, SI
road_load_f1_N_s_m = 0.0
road_load_f2_N_s2_m2 = 0.4715
driveline_efficiency = 0.91
  • A gearbox (gear_ratios, with final_drive, default 1.0, and shift_strategy): every step the run engages the gear whose engine speed v / r * ratio * final_drive lies in the strategy's band and is closest to its target (economy: 2000 rpm in 1300-3500; sport: 3500 in 2000-5500; the same rule as driveline.auto_shift_step). Gear 1 from rest. The pick is per speed, with no hysteresis and no shift time. The trace records the overall ratio each sample used (gear_ratio), and the KPIs integrate through it. gear_ratio is then not given (the loader refuses both), and final_drive and shift_strategy are refused without gear_ratios.
  • A coast-down road load (road_load_f0_N, road_load_f1_N_s_m, road_load_f2_N_s2_m2, all three or none): the force opposing motion is F0 + F1 |v| + F2 v^2, zero at standstill, in place of rolling resistance and drag, so crr, cd, frontal_area_m2 and air_density_kg_m3 are refused beside it. The coefficients are those of a coast-down or a chassis dynamometer setting, in SI (N, N s/m, N s^2/m^2). Gradeability takes F0 as the rolling part (Crr = F0 / (m g), on the grade's normal load).

The GUI's vehicle dialog keeps both verbatim and turns off the boxes they stand in for. The engine-coupled driver (below) refuses a gearbox: its driveline is one rigid ratio.

aeolus1d import avl_cruise_m in.proj out.toml writes a project's vehicle beside the network as out.vehicle.toml: the mass by load state (empty: curb weight plus the additional load; full: gross weight; half: their mean), the road-load function or the drag and rolling resistance, the gear table, the final drive, the driven wheels' dynamic radius and the constant efficiencies (a per-gear gearbox efficiency as its mean). The rolling resistance is the driven wheel's velocity-dependent factor at its first speed, read only under the standard model with that factor switched on; any other setting gives no vehicle case, and a wheel-load, inflation-pressure or temperature adjustment is reported, not carried. The driving cycle, the engine's torque limits and the shift schedule are not read and stay at the defaults; the import's report says so, and names anything else it did not carry.

Choosing a cycle

The [drive_cycle] source selects how the speed-time profile is built:

source What it does Use for
"builtin" A bundled illustrative cycle by name (urban_illustrative, highway_illustrative). Demos / smoke tests. Not regulatory.
"csv" Load a two-column time,speed table from path (speed_unit = "kmh" or "mps"; column indices default to time_col = 0, speed_col = 1, and a header row is assumed via has_header = true). Official WLTP / NEDC / FTP-75 / JC08 cycles.
"segments" Build an exact synthetic cycle from inline idle/accelerate/cruise/decelerate phases. Reproducible custom cycles.

Regulatory cycles are not bundled. The WLTP / NEDC / FTP-75 / JC08 speed-time tables are public data but long empirical traces; aeolus1d does not ship them (and won't fabricate them). Drop the official CSV next to your case and point source = "csv", path = "..." at it. Naming a regulatory cycle under source = "builtin" returns a pointed error telling you to use the CSV path.

A segments cycle is defined inline:

[drive_cycle]
source = "segments"
name = "my_synthetic"
dt_s = 0.1
segments = [
  { kind = "idle",       duration_s = 8.0 },
  { kind = "accelerate", duration_s = 12.0, target_kmh = 50.0 },
  { kind = "cruise",     duration_s = 30.0, target_kmh = 50.0 },
  { kind = "decelerate", duration_s = 10.0, target_kmh = 0.0 },
]

What it reports

aeolus1d drive-cycle prints the cycle KPIs and, with --out, writes the per-step trace (t_s, v_target_mps, v_actual_mps, engine_torque_Nm, brake_force_N) as CSV:

Drive cycle 'urban_illustrative': 150 s, dt=0.1 s
  distance         :    0.777 km
  avg speed        :    18.64 km/h
  max speed        :    30.99 km/h
  tracking RMSE    :    0.164 m/s
  positive wheel W :    0.067 kWh
  fuel             :    3.007 L/100km     # only with [report] bsfc
  CO₂              :    69.22 g/km

Fuel and CO₂ are estimated from the positive engine-side work (the wheel work divided by the driveline efficiency) via the supplied brake-specific fuel consumption (bsfc_g_per_kwh) — a first-order energy-balance estimate, not a fuel map. For a fuel map, drive the engine model directly (see the engine validation suites).

Electrified (hybrid) drive cycles — W5

Add a [powertrain] block and the same case becomes a parallel hybrid: the driver's per-step engine-torque demand is split between the engine and an e-motor by a power-split controller, and the battery state-of-charge is coulomb-counted. aeolus1d drive-cycle auto-detects the block and reports the W5 deliverable — SoC, electrical energy used (and regen recovered), and the engine-share fuel + tailpipe CO₂:

[powertrain]
  [powertrain.motor]      # aeolus1d.hybrid.EMotor fields
  T_max_Nm = 200.0
  P_max_W = 60.0e3
  eta_drive = 0.92
  eta_regen = 0.85

  [powertrain.battery]    # aeolus1d.hybrid.Battery fields
  capacity_Ah = 50.0
  SoC = 0.6               # initial state-of-charge
  R_internal_Ohm = 0.1

  [powertrain.controller] # aeolus1d.hybrid.HybridController fields
  strategy = "load_following"   # or "fixed_fraction" / "engine_only" / "motor_only"
  motor_fraction = 0.3          # split used by the "fixed_fraction" strategy
  engine_min_T_Nm = 30.0
  regen_enabled = true

The four split strategies are load_following (default — the engine covers demand above engine_min_T_Nm, the motor trims the rest), fixed_fraction (the motor always takes motor_fraction of the demand), engine_only, and motor_only. Unknown keys in any of the three [powertrain.*] sub-tables — or an unknown sub-table name — raise.

Electrified drive cycle 'urban_illustrative': 150 s, dt=0.1 s
  distance         :    0.785 km
  tracking RMSE    :    0.189 m/s
  SoC              :   60.0% -> 59.8%
  electrical used  :    0.058 kWh (regen 0.029 kWh)
  engine fuel      :    1.087 L/100km
  tailpipe CO₂     :    25.02 g/km

The vehicle longitudinal dynamics are identical to the conventional run (it moves on the total engine + motor torque); the hybrid only allocates the source, so the difference is the energy split. The battery is a coulomb-counted SoC + OCV-map + internal-resistance model; drive discharges it, braking regenerates (clamped to [0, 1]). The deeper electrochemical battery tier (cell design / aging / pack thermal) is out of scope — import it as an FMU. See examples/86_electrified_drive_cycle.toml.

Programmatic use

The same machinery is a small Python API:

from aeolus1d.io.vehicle_case import load_vehicle_case, run_vehicle_case

case = load_vehicle_case("examples/85_vehicle_drive_cycle.toml")
trace, kpi = run_vehicle_case(case)
print(kpi.distance_km, kpi.fuel_l_per_100km)

A case that carries a [powertrain] block sets case.hybrid; run it through run_electrified_case(case) instead (it returns (trace, ElectrifiedKPIs) — SoC, electrical/regen energy, and the engine-share fuel + CO₂). The aeolus1d drive-cycle CLI auto-selects between the two by whether case.hybrid is None.

The underlying blocks — aeolus1d.vehicle, aeolus1d.driver, aeolus1d.drive_cycles, aeolus1d.driveline, aeolus1d.transmission_shift, aeolus1d.hybrid, aeolus1d.analysis.vehicle_tasks, and the aeolus1d.control.signal_toolbox — are all usable independently for acceleration / elasticity / gradeability / coastdown analysis tasks and for assembling custom controllers.

The driver on the gas-dynamics engine

Added 2026-10-20. aeolus1d.driver_engine.follow_cycle_engine puts the same driver on a crank-resolved 1-D engine case instead of a torque-following engine: the driver's torque request opens the case's throttle BC, the engine runs in the solver, and the vehicle moves on the torque the engine delivered. It is a Python entry point; there is no case block or command for it.

import numpy as np

from aeolus1d.drive_cycles import DriveCycle
from aeolus1d.driver import DriverParameters
from aeolus1d.driver_engine import follow_cycle_engine
from aeolus1d.io.parsers import load_case
from aeolus1d.vehicle import VehicleParameters

case = load_case("examples/71_ktm_510_si.toml")
for bc in case.bcs:                       # give the intake a throttle
    if (bc.pipe, bc.end) == ("intake_runner", "left"):
        bc.kind, bc.A_max, bc.A_pipe, bc.Cd = "throttle", 1.385e-3, 1.385e-3, 0.85

cycle = DriveCycle("step", np.array([0.0, 0.2, 0.7, 2.0]),
                   np.array([20.0, 20.0, 21.0, 21.0]))
res = follow_cycle_engine(case, cycle, VehicleParameters(),
                          DriverParameters(engine_torque_max_Nm=74.0),
                          settle_cycles=2)
print(res.tracking_rmse_mps, res.throttle_open.max())

How the two models are coupled:

  • Once per engine cycle of the first cylinder. Torque is only defined per cycle, and a cycle (10-60 ms) is short against the vehicle's seconds: kp * dt is 0.05 at 5000 rpm with the default gain.
  • Driver to engine: a linear pedal map, open = clip(T_req / engine_torque_max_Nm, open_min, 1). Set engine_torque_max_Nm to the engine's wide-open torque; the default 300 N m is a car's. The engine's torque against opening is not inverted (it is steep near closed and flat near wide open); the driver's integral takes up the difference.
  • Engine to vehicle: the cycle-mean brake torque, W_brake_J / (4 pi) summed over the cylinders. Without [cylinder.fmep] friction is unmodelled and this is the indicated torque (example 71 has none).
  • Fuel follows the air. At each intake closing the Wiebe fuel mass is set to the trapped air over lambda_target * AFR_stoich (lambda 1 by default, the AFR from the cylinder's fuel: its fuel_preset's atoms, or fuel_H_C_ratio without one). Without this the throttle is not a torque actuator: on example 71 at 6000 rpm with its fixed 34 mg, closing the throttle from 1.0 to 0.05 RAISED the torque from 49.9 to 52.2 N m while the burn ran at lambda 0.51. Metered at lambda 1 the same closing takes it from 74.0 to 23.6 N m.
  • Engine speed is v * gear_ratio / wheel_radius_m, one ratio for the run, set at every coupling event with the crank angle kept continuous (the case's own omega_crank is replaced at the start). A vehicle with a gearbox (gear_ratios) is refused, since 2026-10-22: the run would read the default gear_ratio in its place.

It refuses a case with no throttle (or several, unless throttle_bc names one), cylinders that are not Wiebe without injectors, a start speed that does not turn the crank (there is no clutch), a burn window that holds the intake closing, and a vehicle that slows the crank to omega_min_rad_s.

Measured 2026-10-20, the run above: example 71 with that throttle intake, the default VehicleParameters (1300 kg, gear ratio 8, so 20 m/s is 5093 rpm), engine_torque_max_Nm = 74 (the lambda 1 wide-open torque this engine gave at 6000 rpm), two settle cycles, 87 coupled cycles.

Phase What happened
Hold at 20 m/s, 0-0.2 s The feed-forward asks 11.8 N m, the pedal map opens 0.159, the engine gives 37.7 N m; the car runs 0.07 m/s fast and the driver closes the throttle to 0.049
Ramp to 21 m/s, 0.2-0.7 s It asks 2 m/s^2 and wide open gives about 1.0; the throttle opens 0.05 -> 1.00, the torque 28 -> 69 N m, the error grows to -0.545 m/s
Hold at 21 m/s, 0.7-2.0 s The error falls through 0 at 1.34 s and overshoots to +0.160 m/s at 1.78 s (the integral wound up on the ramp, and at small openings the engine gives more than the pedal map asks: 45 N m for 21 at 0.29); the throttle eases back to 0.013 and starts to reopen; +0.148 m/s at 2.0 s

Tracking RMSE 0.242 m/s over the 2 s; fuel 7.9-47.4 mg per cycle on 114-689 mg of air; crank 5093 -> 5388 rpm. Nothing was tuned for this run.

It is expensive. That run took 1948 s of wall time for 89 engine cycles, 21.9 s a cycle, on a box at load average 47-50 that it shares with CI; a warm cycle of the same case alone took 5.8 s (about 8000 steps) at load 24. A second of driving is about 43 cycles at 5000 rpm, so this is for segments of seconds, not whole drive cycles.

Limits: one gear ratio and no clutch (shift scheduling is the open AMT item in BACKLOG.md); Wiebe cylinders only; the trapped air counts exhaust gas drawn back from the intake runner as air (on example 71 at 6000 rpm, 263 mg against 253 mg delivered at 5 % opening, 690 against 700 mg wide open). Example 71's own fixed 34 mg runs at lambda 1.38 on the air the model traps, which is why it gives the paper's 48 N m and lambda 1 gives 74 (BACKLOG.md, KTM section).