Residential PV–battery sizing
A techno-economic model of PV output, battery state of charge and grid exchange, optimizing PV and battery capacity for maximum 20-year NPV.

How large should a household’s PV system and battery be? This project answers it as an optimization problem.
Approach
- Simulation: high-resolution energy balance of PV generation, household demand, battery state of charge (with efficiency losses) and grid import/export.
- Economics: 20-year net present value including investment, feed-in revenue and avoided grid purchases.
- Optimization: SciPy optimizers search PV and battery capacity for maximum NPV. Several algorithms are compared and the best is selected automatically.