Kennedy Kyalo

Logo

Economic Analysis of Investing in a Solar Battery Using NPV and IRR

View the Project on GitHub ken-warren/solar_battery-investment

Economic Analysis of Investment in a Solar Battery


Table of Contents


Overview

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.

Data Source

The user provides their hourly data for 2020 including the following information:

  1. Date and Hour: Timestamps representing each hour of the year.
  2. Solar Electricity Generated (kWh): The amount of electricity generated by the solar panels during that hour.
  3. Electricity Used (kWh): The electricity consumed during the same hour.

Tools

  1. Jupyter notebook - for cleaning, analysis and documentation Guidance to installation
  2. Python. Install

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:

  1. Open you CMD prompt
  2. Copy and paste each of the following lines:
pip install numpy_finacial, pandas, matplotlib.pyplot, seaborn

This will get your python environment ready for analysis.

Data Cleaning

This phase includes:

  1. Finding and dropping missing values
  2. Inspection of duplicates
  3. Deletion of negative values
  4. Inspection of outliers and correcting them.

Data Analysis

Battery Consideration

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.

Electricity Pricing

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.

Data and Analysis

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.

Scenarios to Analyze

  1. Scenario 1: Assuming electricity prices increase as expected (4% p.a.).

  2. Scenario 2: Considering the user’s estimated price increases (starting at 4% p.a. and rising by 0.25% p.a.).

Calculations

We’ll perform the following calculations:

Results

  1. Data Cleaning

OutlierBoxPlot

  1. Data Analysis

Hourly Average Solar Energy Generation and Electricity Usage

AvgElectricityPlot

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

MonthlyPlot

  1. Future Projections

NPV & IRR

Cash Flow Methods Scenario 1 Scenario 2
NPV -4465.01 -4357.52
IRR -0.05 -0.08

Conclusion

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.

Recommendations

  1. Explore Alternative Battery Options - Investigate other battery models or brands that might offer better efficiency, longer lifespan, or lower costs. This could improve the financial viability of the investment.
  2. Consider Government Incentives and Rebates - Look into any available government incentives, rebates, or tax credits for renewable energy installations. These can significantly offset the initial investment cost and improve the overall return on investment.
  3. Optimize Energy Consumption - Implement energy-saving measures within the household to reduce overall electricity consumption. This can enhance the effectiveness of the solar and battery system, maximizing savings and improving the financial outlook of the investment.