Created
August 3, 2024 08:58
-
-
Save drbenvincent/134d74ed94c545c4fe5bbdcf025b6038 to your computer and use it in GitHub Desktop.
Payback time for house battery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Payback time for house battery\n", | |
"\n", | |
"This notebooks explores some simple calculations to estimate the savings from installing a house battery, and how long it would take to pay back the cost of the battery.\n", | |
"\n", | |
"We have only 3 solar panels, but having them means that our import is lower than it would be otherwise. Plus, we export any excess solar energy not used by the house.\n", | |
"\n", | |
"We have an electric cooker/hob, but gas central heating, no electric car yet. So our total electricity usage is not that high.\n", | |
"\n", | |
"The current setup in terms of flows of electricity is as follows:\n", | |
"\n", | |
"```mermaid\n", | |
"flowchart LR\n", | |
"\n", | |
"A[Solar panels] -->|Solar utilised|House\n", | |
"A[Solar panels] -->|Solar exported|Grid\n", | |
"Grid -->|Import|House\n", | |
"```" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"total_import = 2_260 # kWh/year\n", | |
"solar_export = 300 # kWh/year, export from excess solar generation" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Current electricity tarrif rates" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"standing_charge = 0.5833 # p/kWh\n", | |
"unit_price_day = 0.208 # p/kWh day rate\n", | |
"unit_price_night = 0.1 # p/kWh cheap night rate\n", | |
"export_price = 0.15 # p/kWh" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Cost of battery. This cost is based on a quote from a local company to provide a Tesla Powerwall 3 battery, including installation. The battery has a capacity of 13.5 kWh which would be enough to cover a full day's worth of electricity consumption in the house, though it is typically less than this." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"battery_cost = 8000 # £" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Current electricity costs" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"637.9845" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"current_annual_cost = ((standing_charge * 365) # standing charge\n", | |
" + (total_import * unit_price_day) # cost of import \n", | |
" - (solar_export * export_price)) # money earnt from export\n", | |
"current_annual_cost" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Electricity costs with a house battery\n", | |
"\n", | |
"If we get a house battery then we can shift import to a cheaper night rate. \n", | |
"\n", | |
"We can also store the excess solar that we were previously exporting - so we don't need to import as much, and we don't get paid for any export. I assume there is a 90% efficiency in storing and discharging the battery.\n", | |
"\n", | |
"We will assume we are buying a battery with capacity to service the house for 1 day.\n", | |
"\n", | |
"So the new setup will look like this:\n", | |
"\n", | |
"\n", | |
"```mermaid\n", | |
"flowchart LR\n", | |
"\n", | |
"A[Solar panels] -->|Solar utilised|House\n", | |
"A[Solar panels] -->|Solar stored|Battery\n", | |
"Grid -->|Import|Battery\n", | |
"Battery -->|Discharge|House\n", | |
"```" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"411.9045" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"round_trip_efficiency = 0.9\n", | |
"reduced_import = total_import - (solar_export * round_trip_efficiency)\n", | |
"\n", | |
"new_annual_cost = ((standing_charge * 365) # standing charge\n", | |
" + (reduced_import * unit_price_night)) # cost of import to charge battery\n", | |
"new_annual_cost" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Evaluation\n", | |
"\n", | |
"So what are the annual savings from the battery and what is the payback time?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"226.08000000000004" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"annual_saving = current_annual_cost - new_annual_cost\n", | |
"annual_saving" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Payback time in years" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"35.385704175513084" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"battery_cost / annual_saving # years" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This payback time is longer than the expected life of the battery. Based on current electricity use, 3 panel solar array, and electricity tariffs, it is not worth getting a Tesla Powerwall 3 battery." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.12.4" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment