Economic Analysis of Investing in a Solar Battery Using NPV and IRR
View the Project on GitHub ken-warren/solar_battery-investment
Households have electricity needs that can be met by purchasing electricity from a provider or generating it using solar panels. In this project, the user has installed solar panels on their roof, generating electricity from sunlight. Currently, the solar-generated electricity is used immediately in their house, reducing electricity costs. The user is considering purchasing a battery to store excess solar-generated electricity. The battery would discharge energy when solar power isn’t sufficient. We’ll analyze the potential savings in electricity costs from installing the battery, considering different scenarios of electricity price increases. Calculations will include extra electricity from the solar panel and battery combination, implied dollar savings, NPV, and IRR.
The user provides their hourly data for 2020 including the following information:
The following Libraries will be essential;
import numpy_financial as npf # Financial calculations eg calculation of IRR
import pandas as pd # Data manipulation
import matplotlib.pyplot as plt # Data visualization
import seaborn as stl # Reading data (Excel)
If the above Libraries are not yet installed,you can follow the following steps:
pip install numpy_finacial, pandas, matplotlib.pyplot, seaborn
This will get your python environment ready for analysis.
This phase includes:
The user is considering purchasing a battery to store excess solar-generated electricity. The battery would discharge energy during hours when solar power isn’t sufficient. Electricity, including solar, battery-stored, and purchased, is measured in kilowatt hours (kWh). The specific battery under consideration costs $7,000, has a 20-year lifetime, and can store up to 12.5 kWh.
Starting from 1 January 2022, the user pays $0.17 per kWh for electricity from their provider. According to a government report, electricity prices increase annually by 4%. However, the user believes that climate change will lead to faster price increases, estimating an additional 0.25% p.a.
The user has provided solar electricity generation and usage data for 2020 (hourly increments). Our analysis will focus on calculating the extra electricity generated by the solar panel and battery combination compared to using only solar panels. Additionally, we’ll estimate the implied dollar savings in electricity costs resulting from installing the battery.
Scenario 1: Assuming electricity prices increase as expected (4% p.a.).
Scenario 2: Considering the user’s estimated price increases (starting at 4% p.a. and rising by 0.25% p.a.).
We’ll perform the following calculations:
Hourly Average Solar Energy Generation and Electricity Usage
The table below shows the overall hourly calculations for the first 12 hours:
| Hour | Average Solar Usage (KWh) | Average Electricity Usage (KWh) | Electricity Needed (KWh) | Excess Solar (KWh) | Cumulative Battery Charge (KWh) | Electricity Consumption With Battery (KWh) | Savings ($) |
|---|---|---|---|---|---|---|---|
| 0 | 0.000 | 0.777 | 283.654 | 0.000 | 0.000 | 283.654 | 0.00 |
| 1 | 0.000 | 0.402 | 146.542 | 0.000 | 1.412 | 145.106 | 0.24 |
| 2 | 0.000 | 0.251 | 91.478 | 0.000 | 2.436 | 90.454 | 0.17 |
| 3 | 0.000 | 0.408 | 148.806 | 0.000 | 3.078 | 148.164 | 0.11 |
| 4 | 0.079 | 0.552 | 179.531 | 6.711 | 0.000 | 172.679 | 1.16 |
| 5 | 0.271 | 0.611 | 174.193 | 50.010 | 0.000 | 157.564 | 2.83 |
| 6 | 0.723 | 1.223 | 322.020 | 139.593 | 0.000 | 275.367 | 7.93 |
| 7 | 1.395 | 1.478 | 366.399 | 336.018 | 0.000 | 290.979 | 12.82 |
| 8 | 2.085 | 1.301 | 279.744 | 565.341 | 0.000 | 224.670 | 9.36 |
| 9 | 2.243 | 1.084 | 200.682 | 623.748 | 0.000 | 145.080 | 9.45 |
| 10 | 2.134 | 0.826 | 130.602 | 607.830 | 0.000 | 95.646 | 5.94 |
| 11 | 1.984 | 0.837 | 146.340 | 564.981 | 0.000 | 107.424 | 6.62 |
Inferences
Monthly Average Solar Energy Generation and Electricity Usage
NPV & IRR
| Cash Flow Methods | Scenario 1 | Scenario 2 |
|---|---|---|
| NPV | -4465.01 | -4357.52 |
| IRR | -0.05 | -0.08 |
The analysis reveals that while installing a battery to store excess solar-generated electricity can theoretically lead to significant savings in electricity costs, the financial viability of such an investment is questionable based on the NPV and IRR calculations. Both scenarios indicate negative NPV values and low negative IRR values, suggesting that the investment may not be profitable under the current assumptions. However, the integration of solar panels with a battery storage system still offers potential benefits in terms of energy independence and sustainability.