Skip to Content
How the model worksHow EnergyFlow simulates an energy management system

How EnergyFlow simulates an energy management system

A home energy management system (EMS) decides, hour by hour, where electricity goes: whether solar power feeds the house, the battery, the car or the grid, and when to buy from the grid. EnergyFlow simulates what an EMS does, in two ways. The first is simple rules, the way a plain solar inverter and battery behave. The second is an optimiser that plans each day against the hourly prices. The glossary explains EMS, V2H and the other abbreviations.

What it works from

For each of the 8,760 hours of the year, the simulated EMS gets the production of your solar panels (PV), the electricity demand, and the import and export price. Demand covers heating, cooling, ventilation and hot water, plus household appliances and lighting. It is fixed: the EMS never moves a heat pump to a cheaper hour. It returns grid import and export, battery charge and discharge, the battery’s state of charge (how full it is) and car charging, and the costs are added up from those.

Rules or optimiser

You do not pick a mode. It follows from what you configured. A fixed tariff charges the same price every hour. A dynamic tariff follows the wholesale electricity market, so the price changes hour by hour. The optimiser runs when you have both a dynamic tariff and a home battery. Otherwise the simple rules run.

ConfigurationWhat runs
Fixed tariff, with or without a batterySimple rules
Dynamic tariff, no home batterySimple rules, with hourly prices used only to cost the result
Dynamic tariff, with a home batteryOptimiser

A dynamic tariff with only a car still runs the simple rules. If the optimiser cannot solve a day, the run keeps the rule-based result and records why.

Simple rules

This mode knows nothing about prices. Each hour it compares PV with demand and follows a fixed priority.

SituationPriority order
PV exceeds demand1. Charge the battery, up to its ceiling and charge power. 2. Charge the car if it is home and holds less than its next trip needs. 3. Export the rest.
Demand exceeds PV1. Discharge the battery, down to its floor. 2. Discharge the car to the house, if vehicle-to-home (V2H, the car’s battery supplying the house) is enabled and the car is above its reserve. 3. Import the rest.

The battery is charged from PV only, never from the grid. The car is also charged from the grid when a departure is close and it is still below what the trip needs.

The optimiser

The optimiser plans one calendar day at a time. It sees that day’s solar production, demand and 24 hourly prices, and works out the cheapest plan for the battery and the car: when to charge, discharge, import and export. It stays inside the battery’s floor, ceiling, power limits and losses, and inside the car’s rules. Battery charge carries over to the next day, and the battery starts the year half full. That mimics a day-ahead market, where tomorrow’s hourly prices are published the day before.

It can charge the battery from the grid when prices are low and export battery energy when prices are high. It places no value on charge left at midnight, so it knows nothing of the next day. And because it knows each day’s production and demand exactly, where a real system only forecasts, a real saving would be smaller.

Testing an EMS before you buy one

If you are weighing an EMS, you can test what it might do for your house. Run the same house twice, with the same weather year. In the first run use a fixed tariff and a battery, so the simple rules run: a house without a price-aware controller. In the second run use a dynamic tariff and the same battery, so the optimiser runs. Compare the annual electricity cost, the grid import and export, and the self-consumption.

The difference is an estimate of what price-aware control could be worth to your house under that tariff. It mixes the price structure and the control, because the optimiser does not run on a fixed tariff. It probably overstates what a real product achieves, and it says nothing about any particular product. What an energy management system changes walks through this comparison.

Where the prices come from

Day-ahead prices come from the EPEX auction. We hold hourly price files for Austria, Belgium, France, Germany, Luxembourg, the Netherlands and Switzerland. Germany and Luxembourg share one bidding zone and wholesale price. File availability depends on the zone and year. A real-year run is priced with the file of its weather year, and a typical-year run at the fixed reference year 2024. Under a dynamic tariff your import price is the spot price (the wholesale price, floored at zero) plus a network fee, plus VAT, never below a minimum import price. Export is a share of spot, never below zero. The wizard shows every figure and lets you change it. The defaults currently come from a Luxembourg dynamic tariff dated January 2026, so enter your own contract values if yours differ. Every run also adds a fixed annual grid charge, 432 EUR by default, to both tariff types.

We hold hourly day-ahead prices for all seven countries we cover. Where the dynamic tariff is not offered, a project saved with one runs on fixed prices, without the optimiser, with a note in the results.

Battery and car

Both modes use the same battery limits, listed in home battery limits.

You enter the car’s outings for each day of the week: departure hour, return hour and distance. The same week repeats all year. The car charges, or sends power to the house, only while it is home, and before each outing it must hold that trip’s energy plus a reserve (30 % of the battery by default). If the week leaves too little time at home to charge, the run stops with an error instead of reporting a result.

How the results attribute grid import and PV export, and how self-consumption is counted, is in self-consumption and self-sufficiency.

Vehicle-to-home (V2H)

V2H lets a parked electric car power the house through a bidirectional charger. It is one of the newest features on the car market, and more models offer it each year. A car battery is often several times the size of a home battery, so V2H can take in midday solar and give it back in the evening, the same job a home battery does.

It also has limits, and they decide whether it pays off for your house:

  • The car is only useful while it is at home. A car that leaves at 7:00 and comes back at 19:00 misses most of the solar day.
  • The car must keep enough charge for its next trip, plus a reserve.
  • Carmakers limit how much energy a car may give back to the house. Some cap it under the battery warranty, and some require a particular charger or energy manager.
  • Every kilowatt-hour that goes in and out of the car battery loses some energy on the way.

Whether V2H helps therefore depends on your driving week, your solar, your tariff and the size of your home battery, if you have one. That is why a simulation is worth running before you buy a bidirectional charger. Run the same house with and without V2H, and compare the self-consumption and the annual cost.

In the model, V2H follows your week of outings and the car’s reserve. The optimiser also holds V2H energy to about 2,000 kWh a year. That is a modelling assumption to stop the simulated car from being cycled for small price gains, not a manufacturer or warranty figure. The simple rules have no yearly limit, only the car’s reserve.

Limits of the model

  • The simulation runs in hourly steps. It cannot see minute-scale spikes or how a real controller reacts from second to second.
  • Only battery and car flows are managed. Heating, hot water and pool demand do not shift with price.
  • The battery has constant efficiency. Ageing, standby losses and temperature effects are not modelled.
  • Tariffs are per-kWh prices plus one fixed charge. Peak-power or capacity-based grid fees are not modelled.
  • Results estimate what a controller following these rules would do on the inputs you gave. They do not predict what a particular commercial product will do.
Last updated on