Energy Optimizer
This guide covers the core capabilities of the Energy Optimizer. Peak shaving limit integration is coming soon.
The Energy Optimizer is an AI-driven schedule that runs on a recurring interval (every 15 minutes or every hour) and produces an optimal control plan for battery storage systems. It takes into account day-ahead electricity spot prices, solar PV generation forecasts, building load forecasts, and grid constraints to determine when to charge, discharge, or idle the battery — minimizing total energy cost while respecting hardware limits.
What the optimizer does today
The optimizer currently supports battery dispatch optimization with the following inputs:
| Input | Source | Purpose |
|---|---|---|
| Import price forecast | Spot price integration (ENTSO-E, Elering, etc.) | Determines when grid electricity is cheap (charge) or expensive (discharge) |
| Export price forecast | Spot price integration | Determines the value of selling excess energy back to the grid |
| PV generation forecast | AI Cloud Meter (Load Forecast) or external feed | Predicts solar production to coordinate with battery charging |
| Load forecast | AI Cloud Meter (Load Forecast) | Predicts building consumption to size battery dispatch appropriately |
| Battery state of charge | Real-time SOC measurement device | Ensures the optimizer starts from the actual battery state |
Cost functions
The optimizer supports three optimization strategies:
| Strategy | Description |
|---|---|
| Cost | Minimize total electricity cost — charge when prices are low, discharge when prices are high |
| Self-consumption | Maximize use of own PV production — store solar energy for later use instead of exporting |
| Profit | Maximize revenue from energy trading — optimize for price arbitrage across the day |
Battery configuration
The optimizer respects detailed battery constraints:
- Capacity (kWh), max charge/discharge power (kW)
- Charge and discharge efficiency (default 99%)
- SOC limits — configurable min/max state of charge (default 10%-90%)
- Grid interaction rules — optionally disable charging from grid or discharging to grid
- Charge/discharge weight — penalty weights to bias the optimizer toward fewer cycles
Output
The optimizer produces:
- Battery power schedule — a time series of charge/discharge setpoints (kW) written to a forecast measurement device, which can be read by the BMS
- SOC forecast — predicted state of charge over the optimization horizon
- Deviation entries — scheduled override actions on the battery control datapoint in the technical system, visible in the building's schedule calendar (Charge / Discharge / Idle blocks with color coding)
Grid constraints
The optimizer enforces grid import and export limits (kW), ensuring the battery schedule never pushes the building's grid exchange beyond configured maximums.
Coming soon: peak shaving integration
The next evolution of the Energy Optimizer will consume the hourly peak limits generated by the Peak Shaving Calculator as dynamic grid import constraints. Instead of using a fixed grid max import value, the optimizer will read the peak limit for each hour and adjust battery dispatch accordingly — discharging to keep consumption below the limit during expensive peak hours, and charging during off-peak windows when headroom is available.
This closes the loop between peak analysis and active control:
End-to-end peak optimization pipeline