Truck Depot Charging: Grid, Battery Buffer and Schedule

Optimize truck charging against a limited grid connection. Size the battery buffer, compare EDF scheduling, and check every departure SOC and demand charge.

#BESS #charging schedule #demand charges #depot charging #linear programming #MCS #peak shaving

Plan a truck depot charging schedule while a grid upgrade is delayed. This calculator helps fleet engineers, energy managers and students compare a larger connection with a battery buffer, using each truck’s arrival, departure and required state of charge. It suits a depot with several connected trucks and power sharing across megawatt charging equipment.

Start with the truck timetable. Each truck has an editable row: choose Own values to enter elapsed arrival and departure hours, usable battery capacity, arrival SOC, required SOC and DC acceptance power. Enter SOC as a fraction, such as 0.8 for 80%. Times run from the beginning of the planning horizon, so an overnight shift can use continuous elapsed hours. The supplied six-truck timetable is a synthetic planning example.

Set the grid import limit, other site load, shared DC charging capacity and power available at each plug. The charging curve stays at its plateau until the selected SOC knee and then tapers linearly. Each command is held throughout its slot and remains below the acceptance curve at the resulting end SOC. Replace those assumptions with vehicle or fleet measurements when available. Charger nameplate power alone does not determine how much energy a truck can take during a short stop.

The electric truck charging schedule optimization first maximizes energy delivered before departure, then minimizes the modeled monthly energy and demand bill without giving back delivered energy. The full horizon includes BESS charging, discharging, conversion losses, converter power and SOC limits. An independent vehicle ODE replay verifies the resulting commands. Leave Restore initial BESS SOC enabled for repeatable operation; disabling it represents a one-off shift that can consume the initial stored energy.

Read each truck’s departure SOC and energy shortfall before comparing costs. The dispatch tables give constant DC truck commands and signed AC BESS power: positive means discharge. Only trucks with a nonzero command appear in the narrow setpoint list. The playback cursor follows the charging allocation and battery state. Earliest-deadline-first provides a simple baseline that replenishes its initial battery reserve whenever grid headroom permits.

The grid connection battery sweep compares nine infrastructure options. The separate minimum-capacity search finds a nominal BESS energy bracket for those held commands, at the selected grid limit and converter rating. That minimum meets departures; the installed battery can be larger to reduce demand charges. If the search ceiling cannot supply the fleet, more battery energy may be ineffective when charging power or dwell time is the binding limit.

Prices are editable illustrative USD assumptions dated 2 November 2026. Monthly energy costs cover the stated number of modeled horizons; demand charges use the largest modeled slot-average import. The 18-month result repeats that bill without escalation. These figures exclude equipment, installation, financing, degradation replacement, off-horizon energy and tariff ratchets.

This depot BESS sizing model does not design transformers, protection, cables or connector cooling. Smaller command intervals reduce conservatism for short stops; continuously varying control can require less storage. Dedicated connected plugs are assumed; it does not optimize truck movements or queues. Installation work belongs to a qualified person, and equipment must be checked against the standard in force.

How it is calculated

Each truck and the BESS receive constant power commands for each scheduling slot, 15 minutes by default. SOC then changes linearly while a command is realizable. For the entered nonincreasing acceptance curve,

Pa(S)=P0min⁡(1,1−k(S−Sk)),k=(1−f)/(1−Sk).P_a(S)=P_0\min(1,1-k(S-S_k)),\qquad k=(1-f)/(1-S_k).

For truck energy xjx_j in a slot of duration Δt\Delta t, the LP imposes both

xj≤P0Δt,xj≤P0Δt[1+k(Sk−Send,j)].x_j\le P_0\Delta t,\qquad x_j\le P_0\Delta t[1+k(S_k-S_{end,j})].

Here Send,j=Sarrival+∑ℓ≤jxℓ/CS_{end,j}=S_{arrival}+\sum_{\ell\le j}x_\ell/C. The second constraint is linear in cumulative delivered energy. Because acceptance decreases with SOC, satisfying it at the end proves that the constant command is accepted throughout the slot. This avoids combining a full-power charging integral with a smaller available grid power.

The full-horizon LP simultaneously enforces truck availability and target SOC, shared DC cabinet power, the AC grid limit and absolute peak, no export, BESS charge/discharge converter power, and cumulative stored-energy bounds. Since all these commands are constant and BESS energy is linear within a slot, the constraints apply throughout that slot. A first simplex solve maximizes total delivered truck energy. A second fixes that total and minimizes monthly energy and demand charges, with a USD 0.001/kWh AC-storage-throughput regularizer. If the fleet is infeasible, this minimizes total shortfall without promising equal or priority-weighted service.

The AC balance is Pg=Pbase+∑Ptruck/ηc+PB,c−PB,dP_g=P_{base}+\sum P_{truck}/\eta_c+P_{B,c}-P_{B,d}; storage evolves as dE/dt=ηBPB,c−PB,d/ηBdE/dt=\eta_B P_{B,c}-P_{B,d}/\eta_B. Cyclic mode restores at least the initial stored energy. One-off mode can use the BESS to supply a base load above the grid limit, provided the converter and initial usable energy can cover the entire base-load deficit. The initial LP basis explicitly includes that supporting discharge.

An independent RK4 replay integrates dS/dt=min⁡(Pcommand,Pa(S))/CdS/dt=\min(P_{command},P_a(S))/C, checking the actual truck energy and grid, cabinet, converter and storage limits at its stages. A failed replay blocks results. The separate EDF controller uses the same realizable constant-command acceptance bound and reserves storage for future base-load deficits.

The 3 × 3 sweep warm-starts the same LP. Each option first checks base-load supply; an infeasible option is marked individually. The capacity search uses LP sensitivity to bracket the least nominal BESS energy for the entered command interval, power and terminal policy. The reported bracket is optimization precision, not a physical uncertainty margin.

All solver matrices are explicitly normalized by 1 h, 1 kW and 1 kWh. Independent SciPy 1.15.3/HiGHS record s7 replaces the former integral-envelope record s6, and independently integrates the review counterexample. Context ratings from bp pulse, ASKO and Alfredsson describe different grid, DC charger and BESS power limits; they do not determine storage energy.

Assumptions

The timetable is synthetic and editable, not a measured ASKO or bp pulse operating record. Every active truck has its own available plug; a shared cabinet limits aggregate DC output. Truck usable capacity is fixed. DC charger output is treated as energy entering the usable battery; additional pack losses, temperature limits and auxiliary loads require adjusted acceptance curves or site load.

Other site load and conversion efficiencies are constant. BESS charge and discharge share the stated converter rating. One-way BESS efficiency is applied separately in each direction. There is no PV, export, vehicle-to-grid, outage reserve beyond the minimum SOC, or integer plug assignment.

Default tariff assumptions are USD 0.15/kWh and USD 12/kW/month as a user-editable scenario dated 2026-11-02, not a quoted utility tariff. Monthly demand charges apply once to the modeled peak. The reference cases reproduce ICCT’s nominal 350/750 kW, 45-minute events with losses and taper disabled; they are ideal energy benchmarks, not measurements of MCS performance.

The optimization and EDF comparison both hold each DC setpoint for its entire slot. There are no within-slot power reallocations. The input charging curve is a static upper bound on vehicle acceptance; constant setpoints are constrained at the slot's end SOC.

Where it applies

The result is optimal for the explicitly modeled piecewise constant DC command policy. A continuously varying, acceptance-following controller can deliver more energy and need less storage. Refine the scheduling interval to assess that difference before procurement. In the review's 600 kWh, SOC 0.65→0.94, 15-minute, 700 kW-grid case, the continuous-control ceiling is 162.748 kWh; a held command can deliver only 140 kWh. The calculator reports the resulting 34 kWh shortfall, not a feasible departure.

Availability rounds inward to complete slots and can lose almost two intervals of dwell time. The acceptance constraint uses end SOC and the full entered taper curve; it does not approximate an unavailable full-power trajectory as an average power. Converter ramps, communications delays, cooling and temperature-dependent derating are not modeled. The site controller must implement the stated commands and actual equipment limits.

The default replay uses four RK4 substeps in each charging slot and one exact linear interval for idle slots. Valid constant commands give a constant vehicle derivative, so replay refinement should change only roundoff. Increase replay substeps to diagnose a failed or near-boundary replay; refine the scheduling interval to change the control policy itself. The model's default cost targets about three seconds; finer schedules take longer.

The BESS bracket applies to the entered SOC window, initial SOC, converter power, grid limit and terminal policy. It excludes ageing, forecast uncertainty, temperature derating and procurement margin. If the search ceiling cannot supply all departures, the minimum-capacity result is blank. Sweep cells whose base load cannot be supplied are blank for truck shortfall and explicitly labeled Base unmet; they do not block other options.

Large dimensionless LP tableaux exceed the engine's element-by-element unit audit; physical inputs and energy-accounting summaries retain units. The independent ODE replay and AC energy-balance check verify the recovered dispatch. The cost comparison excludes off-horizon loads/peaks, tariff ratchets, fixed charges, taxes, BESS capital and degradation costs. EDF terminal restoration is reported separately if it needs extra recharge time.

IEC TS 63379:2026, Edition 1.0, supersedes draft-status wording in older summaries. This is energy scheduling rather than connector compliance; check against the standard in force.

References

  • ICCT, Charging infrastructure needs for battery electric trucks in the European Union by 2030 (October 2025), Table 5 and charging-pattern assumptions, PDF pp.19–20. https://theicct.org/wp-content/uploads/2025/10/ID-476-%E2%80%93-EU-BETs_report_final-1.pdf
  • CharIN, Official publication of IEC TS 63379: A game-changer for Megawatt Charging System standardization (February 2026). https://www.charin.global/news/iec-ts-63379-for-megawatt-charging-system-mcs/
  • IEC TS 63379:2026, Edition 1.0, public scope and publication date. https://webstore.iec.ch/en/publication/67975
  • Kempower, ASKO Vestby depot installation (16 October 2025): two 1.2 MW power units, 2.4 MW aggregate charging power; this is not a claim about its grid connection. https://investors.kempower.com/releases/kempower-delivers-distributed-megawatt-charging-solution-to-norways-largest-grocery-retailer-askos-depot-in-vestby/
  • Kempower, The utilization imperative (2026): Alfredsson depot integration of charging, 1.2 MW BESS and solar. https://kempower.com/the-utilization-imperative-how-shared-depots-and-flexible-charging-will-drive-the-electric-truck-transition/
  • Henry Johnson (Alpitronic), public LinkedIn post on bp pulse/Aral MCS rollout (2026): initial grid power 2.5 MW. This operator-specific starting limit is context, not a universal MCS requirement. https://www.linkedin.com/posts/henry-johnson-a6409134_march-marked-a-major-milestone-for-alpitronic-activity-7447594421136678912-W9X0

Inputs

InputSymbolUnitDefault
Number of trucksN_trucks6
Truck 1
Choose Own values to edit this truck; SOC is a fraction from 0 to 1.
truck_1Truck 1
Truck 2truck_2Truck 2
Truck 3truck_3Truck 3
Truck 4truck_4Truck 4
Truck 5truck_5Truck 5
Truck 6truck_6Truck 6
Truck 7truck_7Truck 7
Truck 8truck_8Truck 8
Planning horizonH_windowh6
Grid import limitP_gridkW800
Other site loadP_basekW100
Shared charger DC capacityP_cabinetkW2400
Maximum DC power per truckP_plugkW1200
AC to DC efficiencyeta_charger0.95
Installed nominal BESS energyB_nomkWh600
BESS AC converter ratingP_besskW1200
BESS minimum SOCsoc_min0.1
BESS maximum SOCsoc_max0.9
BESS initial SOCsoc_start0.6
BESS one-way efficiency
Round-trip efficiency is the square of this value.
eta_bess0.95
Restore initial BESS SOC
Enable for a repeating operating horizon; disable for a one-off shift.
cyclictrue
Truck taper starts at SOCsoc_knee0.65
Power fraction at full SOC
Power falls linearly from the knee to this fraction of the plateau at SOC 1.
tail_fraction0.2
Energy price (USD/kWh)energy_rate1/kWh0.15
Demand price (USD/kW/month)demand_rate1/kW12
Operating horizons per monthdays_month22
Sweep minimum gridG_lowkW600
Sweep maximum gridG_highkW1000
BESS search ceiling
The minimum-capacity result is bracketed below this ceiling at the selected grid limit.
B_searchkWh1200
Scheduling slot
Use 0.25 h for 15-minute constant-power commands; shorter slots reduce control-policy conservatism.
dt_sloth0.25
LP pivot limitpivot_limit1500
Time in depott_showh1.4
ODE replay substeps per slot
RK4 replays the optimized setpoints against the vehicle acceptance curve.
replay_steps4

Results

With the default inputs above, the calc gives:

ResultValue
Departure readinessAll departures supplied
Sizing feasibilityCapacity bracket found
Minimum BESS · slot setpoints249.6 kWh
Capacity search bracket width0.01 kWh
Optimized departure shortfall0 kWh
Optimized site peak596 kW
Imported energy per horizon2,922.9 kWh
Monthly demand charge (USD)7,152
Monthly electricity cost (USD)16,798
18-month electricity cost (USD)302,359
EDF departure shortfall0 kWh
EDF site peak800 kW
EDF monthly electricity cost (USD)19,313

Checked against sources

Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).

ICCT 45-minute fast charging event

Source: ICCT, Charging infrastructure needs for battery electric trucks in the EU by 2030 (2025), PDF p.19 Table 5 and 45-minute event assumption. Independent ideal-energy benchmark: 350 kW × 0.75 h = 262.5 kWh. No losses/taper; this checks an ideal nominal event, not measured performance.

Inputs: Number of trucks = 1; Truck 1 = ICCT fast event; Planning horizon = 1 h; Grid import limit = 1,500 kW; Other site load = 0 kW; Shared charger DC capacity = 1,500 kW; AC to DC efficiency = 1; Installed nominal BESS energy = 0 kWh; BESS AC converter rating = 0 kW; Power fraction at full SOC = 1; Sweep minimum grid = 1,000 kW; Sweep maximum grid = 1,500 kW; BESS search ceiling = 100 kWh; Energy price (USD/kWh) = 0 1/kWh; Demand price (USD/kW/month) = 0 1/kW; the others as above.

ResultSourceThis calc
Energy delivered to trucks262.5 kWh262.5 kWh
Optimized site peak350 kW350 kW

ICCT 45-minute ultrafast charging event

Source: ICCT (2025), PDF p.19: nominal MCS rate 750 kW and daily 45-minute opportunity event. Independent ideal-energy benchmark: 750 kW × 0.75 h = 562.5 kWh; no losses/taper. The report's 2025 standard-status wording is superseded by IEC TS 63379:2026.

Inputs: Number of trucks = 1; Truck 1 = ICCT ultrafast event; Planning horizon = 1 h; Grid import limit = 1,500 kW; Other site load = 0 kW; Shared charger DC capacity = 1,500 kW; AC to DC efficiency = 1; Installed nominal BESS energy = 0 kWh; BESS AC converter rating = 0 kW; Power fraction at full SOC = 1; Sweep minimum grid = 1,000 kW; Sweep maximum grid = 1,500 kW; BESS search ceiling = 100 kWh; Energy price (USD/kWh) = 0 1/kWh; Demand price (USD/kW/month) = 0 1/kW; the others as above.

ResultSourceThis calc
Energy delivered to trucks562.5 kWh562.5 kWh
Optimized site peak750 kW750 kW

Independent HiGHS default-fleet optimization

Source: Revised independent SciPy 1.15.3/HiGHS formulation of the constant-setpoint model, attached source s7. Each truck setpoint is constrained by its end-of-slot SOC. The minimum nominal capacity is solved with an explicit LP capacity variable, independently of the calculator's parametric search. Reproduction: .work/truck-depot-charging-bess/crosscheck.py. Supersedes the old integral-envelope benchmark s6.

Inputs: the default inputs above.

ResultSourceThis calc
Energy delivered to trucks2,160 kWh2,160 kWh
Optimized site peak596 kW596 kW
Minimum BESS · slot setpoints249.6 kWh249.6 kWh
Monthly electricity cost (USD)16,79816,798

DC cabinet rating survives AC conversion losses

Source: ICCT (2025), PDF p.19 Table 5 gives a 350 kW fast charging rating and a 45-minute event; PDF p.20 states charging efficiency close to 85%. This isolated nominal-rating case assumes constant DC acceptance: 350 kW × 0.75 h = 262.5 kWh into the truck and 262.5/0.85 = 308.823529 kWh from AC. It tests that a DC nameplate is not derated twice; it does not reproduce the report's separate effective-power-utilization factor.

Inputs: Number of trucks = 1; Truck 1 = ICCT fast event; Planning horizon = 1 h; Grid import limit = 1,500 kW; Other site load = 0 kW; Shared charger DC capacity = 350 kW; AC to DC efficiency = 0.85; Installed nominal BESS energy = 0 kWh; BESS AC converter rating = 0 kW; Power fraction at full SOC = 1; Sweep minimum grid = 1,000 kW; Sweep maximum grid = 1,500 kW; BESS search ceiling = 100 kWh; Energy price (USD/kWh) = 0 1/kWh; Demand price (USD/kW/month) = 0 1/kW; the others as above.

ResultSourceThis calc
Energy delivered to trucks262.5 kWh262.5 kWh
Imported energy per horizon308.8 kWh308.8 kWh

Joint grid/taper limit: realizable quarter-hour command

Source: Independent review regression and SciPy verification, source s7. At 700 kW grid power the continuous-control maximum is only 162.7483943 kWh, so the former 174 kWh result was impossible. For the explicitly modeled constant DC command, the exact endpoint acceptance constraint gives 140 kWh and a 34 kWh shortfall. This case checks command realization as well as conservation.

Inputs: Number of trucks = 1; Truck 1 = own values; Planning horizon = 0.25 h; Grid import limit = 700 kW; Other site load = 0 kW; Installed nominal BESS energy = 0 kWh; BESS AC converter rating = 0 kW; AC to DC efficiency = 1; Sweep maximum grid = 800 kW; BESS search ceiling = 100 kWh; the others as above.

ResultSourceThis calc
Energy delivered to trucks140 kWh140 kWh
Optimized departure shortfall34 kWh34 kWh
Energy delivered in independent ODE replay140 kWh140 kWh
Optimized site peak560 kW560 kW

One-off BESS supports a base load above the grid limit

Source: Independent review's one-hour example supplied by the user: grid 100 kW, other site load 200 kW, 600 kWh BESS and 60 kWh DC truck demand. Constructive feasibility: (100 kWh base deficit + 60/0.95 kWh AC charging)/0.95 = 171.745 kWh of stored energy, below the 300 kWh initially available above reserve, with an ample 1200 kW converter. Cyclic restoration is disabled.

Inputs: Number of trucks = 1; Truck 1 = own values; Planning horizon = 1 h; Grid import limit = 100 kW; Other site load = 200 kW; Restore initial BESS SOC = no; Sweep minimum grid = 100 kW; Sweep maximum grid = 300 kW; the others as above.

ResultSourceThis calc
Energy delivered to trucks60 kWh60 kWh
Optimized departure shortfall0 ± 1 × 10⁻⁵ kWh0 kWh
Main optimization status00
Energy delivered in independent ODE replay60 kWh60 kWh

Related Resources

Responses

Your email address will not be published. Required fields are marked *

L ading...