EnexaEMS Simulator v1.0
Simulation Overview
  • Input SummaryAll configuration parameters
  • Simulation AlgorithmsReactive vs Smart EMS explained
  • Result OverviewSide-by-side comparison
Configuration
  • Location SetupEquipment specs & constraints
  • FinancialsCosts, income & margins
  • Solar ProductionPV generation profile
  • Charging SessionsEV demand profile
  • Not ModeledKnown gaps & limitations
  • SmartEMS ConfigPlanner tuning parameters
Reactive BMS
  • BMS AlgorithmHow the reactive BMS works
  • BMS ReactiveRule-based simulation results
SmartEMS
  • SmartEMS AlgorithmHow the 2-layer optimizer works
  • SmartEMS ResultsOptimized simulation output

BMS Reactive Algorithm

Complete rule-based energy management logic -- how every minute of the simulation is decided

Algorithm Overview
Core design principles

The Reactive BMS is a rule-based energy management system that runs at 1-minute resolution (1440 steps per day). It is purely reactive -- it makes each decision based only on the current state, with no forward knowledge of future sessions, prices, or PV output.

Every minute, the algorithm asks one question: Is an EV connected right now? This branches into two completely different operating modes with different priorities and constraints.

Resolution

1 min

1440 steps / day

Strategy

Reactive

No lookahead or optimization

Inputs

5 signals

EV, SOC, PV, grid, budget

Decision Flow
The full minute-by-minute decision tree
Decision
Is an EV connected to the charger?

YES -- EV Connected

Primary goal: deliver maximum power to the EV. The charger does not know how long the driver will stay, so it pushes energy as fast as possible using all available sources.

Step 1: Calculate EV power request

EV requests min(maxAcceptRate, remaining energy x 60) capped by hardware output (230 kW)

CCS protocolISO 15118

Step 2: Fill the request (priority cascade)

Priority 1PV to EVFree energy, zero marginal cost
Priority 2Grid to EVUp to grid limit (80 kW)
Priority 3Battery to EVFill the gap (subject to constraints)

Step 3: Battery discharge constraints

Max discharge rate: 150 kW x derating factor

SOC derating: 100% power above 30% SOC, linear ramp to 0% at 20% SOC

Cycle budget: max 300 kWh discharge per day

SOC floor: never below 20% (29 kWh)

Step 4: Trickle recharge (if enabled)

If gridToEV < gridLimit, the spare grid capacity plus any leftover PV recharges the battery while the EV charges.

Capped by: maxChargeRate (80 kW) SOC ceiling (90%)

Status: Enabled

Step 5: PV surplus

Any remaining PV after EV + battery trickle is exported to grid

EEG feed-in

NO -- Idle (no EV)

Primary goal: recharge battery to target SOC so it is ready for the next session. Secondary: export PV surplus to grid for feed-in revenue.

Decision
Battery SOC < idle target (80%)?
YES -- Recharge
1stPV to battery
2ndGrid to battery

Grid capped at 50 kW

Total capped at 80 kW

PV surplus after battery --> grid export

NO -- SOC at target

Battery is full enough.

All PV output --> grid export

Grid draw = 0 kW

BOTH PATHS

State Update (every minute)

batterySocKwh += chargeKwh - dischargeKwh

totalDischarged += dischargeKwh

gridCost = gridKwh x (EPEX[slot] + fees)

evRevenue = evKwh x 0.59 EUR

wearCost = dischargeKwh x 0.071 EUR

SOC clamped to [20%, 90%]

SOC Derating Curve
Battery discharge power limit as a function of SOC

Real battery management systems reduce discharge power as SOC drops to protect cell voltage. Our model uses a simple two-zone linear derating curve:

CUTOFF
DERATING
FULL POWER
CEILING
0%20%30%90%100%

Example: SOC at 25%

Derating factor = (25 - 20) / (30 - 20) = 0.50

Effective discharge = 150 x 0.50 = 75 kW

Example: SOC at 80%

Above 30% threshold -- no derating

Effective discharge = 150 x 1.00 = 150 kW

Hard Constraints (Never Violated)
Physical and configuraton limits enforced every minute

Grid connection limit

80 kW

Total grid import (to EV + to battery) never exceeds this. Physical fuse / DSO contractual limit.

Max discharge rate

150 kW

Battery power output to EV. Subject to SOC derating (reduced linearly below derating threshold).

Max charge rate

80 kW

Total power into battery (PV + grid) never exceeds this. BMS / inverter limit. Applies in both idle and trickle modes.

Max hardware output

230 kW

Charger hardware limit per connector. Total EV delivery never exceeds this even if sources can provide more.

SOC floor

20% (29 kWh)

Battery never discharged below this. Protects LFP cell voltage and longevity.

SOC ceiling

90% (129 kWh)

Battery never charged above this. Reduces calendar aging at high SOC.

Daily cycle budget

300 kWh/day

Limits total discharge per day to protect cycle life. At 143 kWh capacity, this is ~2.1 full equivalent cycles/day.

Limitations of Reactive Strategy
What this algorithm does NOT do (but the EMS Optimizer will)

No price awareness

Recharges battery at the same rate regardless of whether EPEX price is 2 ct or 14 ct. An optimizer would buy cheap and discharge during expensive slots.

No session forecasting

Does not anticipate upcoming sessions. Cannot pre-charge battery before a known busy period. Treats every idle minute the same.

No PV forecast

Does not know that solar will be available later. Cannot defer grid recharging to wait for free PV energy.

No grid export optimization

Exports PV surplus passively. Does not strategically store PV for later self-consumption or time grid export to high-price slots.

The EMS Optimizer (coming soon) will address all of these by using lookahead optimization (e.g. rolling horizon MPC or MILP) to minimize total cost while respecting the same physical constraints. The Reactive BMS serves as the baseline to measure how much value the optimizer adds.