Energy Storage Simulation
Analyze optimal battery storage configurations and energy management strategies
Basic Energy Storage Simulation
Compare direct consumption vs battery-assisted strategies
What gets simulated: We replay hourly price and PV production pairs to compare selling energy immediately versus buffering it in a Battery Energy Storage System (BESS).
Learn how the engine works
For each timestep we (1) align your price and production CSVs, (2) estimate revenue if you sell directly, and (3) run a rule-based battery policy that charges during low-price periods and discharges during peak prices. This heuristic strategy mirrors the classic peak-shaving approach widely used in distributed energy storage. The charts show cumulative profit evolution and battery state of charge (SOC), providing insight into round-trip efficiency losses and the economic value of arbitrage.
Dataset requirements
Energy prices CSV→ columnstimestamp(UTC) andprice(€/MWh).Solar production CSV→ columnstimestampandproduction_kwh.
Paths are relative to data/. Upload a CSV (stored under data/own/) or pick an existing one.
Cumulative Profit Over Time
Battery State of Charge
MCMC-Optimized Battery Strategy
Find the optimal battery control strategy using Monte Carlo optimization
What changes here: Instead of a static heuristic we tune the charge/discharge actions via a Metropolis–Hastings inspired Markov Chain Monte Carlo (MCMC) optimizer that nudges individual hours and keeps improvements.
Learn more about the optimization
We initialize actions using the rule-based policy, then sample perturbations from a Gaussian distribution (controlled by σ). Each proposed change is evaluated; if it increases profit we accept it, otherwise we accept with probability exp(ΔE / T), where T is the temperature that cools each iteration (cooling rate slider). This simulated annealing framework allows early exploration before converging to a near-optimal policy. Higher iterations and proper temperature scheduling yield better final profit at the cost of compute time.
Dataset inputs
Choose an existing price/solar CSV or upload a new one. Paths are relative to data/.
Strategy Comparison: Profit Over Time
Optimized Battery State of Charge
| Strategy | Final Profit (€) | vs Direct | vs Rule-based |
|---|
Monte Carlo Variability Analysis
Analyze profit uncertainty across multiple realistic scenarios with data variability
Why Monte Carlo? Monte Carlo simulation evaluates your strategies under realistic variability. By running hundreds of scenarios with different production and price conditions, we quantify risk, uncertainty, and expected performance using advanced statistical metrics.
How it works
The simulation takes your base CSV data and creates multiple scenarios by adding realistic variability:
- Log-Normal distribution for production (ensures non-negative values)
- Student-t distribution for prices (models extreme market events)
- Temporal correlation (AR(1) process): consecutive hours are realistically correlated
- Financial metrics: VaR (Value at Risk), CVaR, Sharpe ratio, Win rate
Each scenario evaluates all three strategies (Direct, Rule-Based Battery, MCMC-Optimized) to show which performs best under uncertainty.
Advanced: Weather-based modeling
For even more realistic simulations, one could model weather variables (temperature, irradiance, cloud cover) with their own stochastic processes and correlations, then feed them through ML models to predict production and prices. This would require weather forecast models and adds significant complexity. The current approach (perturbing production/price directly) provides an excellent balance of realism vs. usability for most applications.
timestamp, price (or predicted_price)
timestamp, production (or production_kwh)
Statistical Analysis
| Metric | Direct Sale | Battery (Rule-Based) | MCMC Optimized |
|---|