Cost-Benefit Analysis of Battery Storage for Sustainable Energy Management

Cost-Benefit Analysis of Battery Storage for Sustainable Energy Management

In this project, I analyse the potential savings from installing a battery to store excess solar electricity and compare it with purchasing electricity from the grid. The model, created in R, simulates the impact of using a battery to store and discharge solar power across 2020. The goal is to calculate the savings Naomi could expect from installing a battery and to determine whether this investment would be financially beneficial in the long run. Visualizations of key data insights are provided using Power BI.

1.1 Objective and Scope

My aim is to determine the economic benefit of installing a battery for storing solar energy in a residential setting. Using data provided for solar generation and electricity usage in 2020, I calculated the potential savings of installing a battery compared to relying solely on solar generation and purchasing from the electricity provider.

The modelling includes several steps, such as:

  • Data validation and visualization

  • Calculation of electricity purchases and excess generation

  • Simulation of battery charge levels and usage

  • Analysis of savings across 2020

  • Forward projections for 20 years

  • Calculation of the Net Present Value (NPV) and Internal Rate of Return (IRR) for two inflation scenarios

1.2 Data Cleaning and Preparation

After loading the data, I performed simple checks for missing values and outliers.

In order to enhance model performance and accuracy, I made use of the IQR method to detect and remove outliers.

I then visualized the average solar generation and electricity usage for each hour of the day to ensure the data was consistent and free from significant outliers.

1.3 Exploratory Data Analysis (Consumption VS Generation)

Energy Consumption VS Generation without a battery installed

There is an inverse relationship between solar energy generation and household electricity consumption over the course of the day. When consumption is highest (e.g., morning or evening), solar generation tends to be at its lowest, during the middle of the day, when solar generation peaks (due to optimal sunlight), electricity consumption is generally lower.

This creates inefficiencies since 1,640 kW goes to waste annually when the household fails to fully utilise it during peak generation times. Yet the same household has to purchase 4994 kW annually.

Modelling Electricity Usage

To model the electricity purchased from the provider, I compared the electricity generated by the solar panels to the household's hourly electricity usage. If the generation was less than the usage, the deficit was calculated as the electricity bought from the provider and compared this against the electricity generated.

Battery Charge Modelling

The core of the model is simulating how a battery would. The battery starts at 0 kWh and has a capacity of 12.5 kWh and can be charged with excess solar power or discharged to meet electricity usage.

```{r}
with_battery <- clean_energy
# Parameters
max_battery_capacity <- 12.5
battery_charge <- 0  # Initial battery charge level

# Initialize columns
with_battery$Battery_Charge_Level <- 0
with_battery$Electricity_Bought <- 0

# Loop through each hour to calculate battery charge and electricity bought
for (i in 1:nrow(with_battery)) {
  solar_generation <- with_battery$`Solar electricity generation (kWh)`[i]
  electricity_usage <- with_battery$`Electricity usage (kWh)`[i]
  if (solar_generation > electricity_usage) {
    excess_generation <- solar_generation - electricity_usage
    charge_to_add <- min(max_battery_capacity - battery_charge, excess_generation)
    battery_charge <- battery_charge + charge_to_add
    with_battery$Electricity_Bought[i] <- 0  # No purchase required
  } else {
    shortfall <- electricity_usage - solar_generation
    discharge_from_battery <- min(battery_charge, shortfall)
    battery_charge <- battery_charge - discharge_from_battery
    with_battery$Electricity_Bought[i] <- shortfall - discharge_from_battery
  }
  with_battery$Battery_Charge_Level[i] <- battery_charge
}
head(with_battery)
```

Energy Saving Analysis

After battery installation, electricity purchases from the provider reduce by 33% due to 100% utilisation of solar energy.

Solar energy generated accounts for 40% of total consumption up from 20% upon battery installation.

1.4 Cost Saving Analysis

Next, I calculated the savings that could be achieved by installing the battery. The savings were determined by comparing the cost of electricity purchased without the battery and with the battery, assuming a price of $0.17 per kWh from the electricity provider.

Battery installation results in a savings of KSh 36,258 annually serving as an indicator of the battery’s effectiveness. The battery installation process costs KSh 15,000 making this venture financially viable.

1.5 Forward Projections (NPV Calculation)

To evaluate the long-term financial benefit of installing the battery, I projected the annual savings for the next 20 years based on two inflation scenarios:

  1. Electricity prices increase by 4% per year.

  2. Electricity prices increase by 4% annually, with an additional 0.25% increase each year.