Energy Storage Simulation

Analyze optimal battery storage configurations and energy management strategies

← Back to Home
Basic Simulation
Optimized Strategy
Monte Carlo Analysis

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 → columns timestamp (UTC) and price (€/MWh).
  • Solar production CSV → columns timestamp and production_kwh.

Paths are relative to data/. Upload a CSV (stored under data/own/) or pick an existing one.

Battery Configuration - Adjust battery parameters
10
2
90

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/.

Battery Configuration
10
2
90
MCMC Tuning Parameters
1000
1.0
1.0
0.9995

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.

Base Data (Reference Scenario)
CSV with columns: timestamp, price (or predicted_price)
CSV with columns: timestamp, production (or production_kwh)
Uncertainty Parameters
Auto
Standard deviation as percentage (e.g., 15% = typical solar variability)
Auto
Standard deviation as percentage (e.g., 10% = typical price volatility)
Battery & Simulation Settings
10
90
100
70
0% = independent, 100% = fully correlated (realistic: 60-80%)