You are on page 1of 5

PVBT

PV-BESS Tool (Analysis and Sizing tool for the small-scale


PV/BESS)
Version 1.2 (2022)

This tool was validated and detailed in the following paper:

A. A. R. Mohamed, R. J. Best, X. A. Liu and D. J. Morrow, "A Comprehensive Robust Techno-


Economic Analysis and Sizing Tool for the Small-Scale PV and BESS," in IEEE Transactions on
Energy Conversion, doi: 10.1109/TEC.2021.3107103.

EPIC Research Cluster


School of Electronics, Electrical Engineering and Computer Science
Queen’s University Belfast
Belfast, UK

This work is part of SPIRE 2 project (Storage Platform for the Integration of Renewable Energy), supported by the European Union’s INTERREG VA
Programme, managed by the Special EU Programmes Body (SEUPB). The views and opinions expressed in this document do not necessarily reflect
those of the European Commission or the SEUPB.
PVBT
1. Introduction:
Small-scale battery energy storage systems (BESS) are attracting more customers due to their ability to achieve a
profitable energy arbitrage in the presence of heat-pumps, electric vehicles (EV) and solar photovoltaics (PV) with
the time of use (ToU) tariff in addition to maximizing the self-consumption and self-sufficiency. A comprehensive
techno-economic analysis tool for the PV and BESS (PVBT) and PV/BESS sizing optimization algorithm are
detailed in this document.
The repository contains two programs: 1) PVBT and 2) PVBTOptimization. The first one is for the analysis only,
the second one is for the PV/BESS sizing optimization and analysis.
The PVBT tool utilizes a real-time BESS control method that aims to maximize the PV self-consumption and energy
arbitrage that has been validated using real measurements in addition to integrating a rigorous ageing model to
determine the loss in savings due to the capacity degradation. The PVBT outputs are:
1. The net household with and without the BESS.
2. Electricity bill with and without the BESS.
3. BESS power dispatch.
4. BESS state of charge.
5. Battery degradation and SoH.
6. PV self-consumption with and without the BESS.
7. Self-sufficiency with and without the BESS.
8. Power curtailed with and without the BESS.
9. Exported power to the grid with and without the BESS.
In addition to five cost-benefit analyses (CBA) are conducted for:
1. CBA for the PV investment according to the lifetime warranty.
2. CBA for the BESS investment according to the warrantied lifetime.
3. CBA for the BESS investment according to the lifetime based on the minimum state of health (end of a
lifetime based on SoH).
4. CBA for the PV and the BESS according to the warrantied lifetime of the PV and the BESS.
5. CBA for the PV and the BESS according to the PV warrantied lifetime and the BESS lifetime based on the
minimum state of health.
In the fourth and fifth CBAs, the total number of BESS replacements is determined based on the BESS lifetime and
the year of the installation. Each of these CBA contains five metrics that are calculated in order to evaluate the
investment viability: the total savings (TS), the investment net present value (NPV), the annual return on investment
(AROI), discounted payback period, and any required subsidy.
Two plots are developed after the program converges: 1) the net demand with the battery state of charge; 2) the
battery degradation. The main results are printed in the command window and can be saved in an excel file.

2. PVBT Guide:
The PVBT tool has two MATLAB files and two excel/CSV file, described as:
PVBT.m Used to enter the tool inputs and run the PVBT.
MAINCODE.m Main code file.
Inputs.csv CSV file to enter the power profiles.
Results.xls Excel template for the results. Results are saved in this file.
PVBT
In order to run the code, the required inputs are detailed as follows:
- The power profiles should be entered in any data resolution in the file (Inputs.csv) in the following format:
Demand (kW) (first column) PV (kW) (second column) EV (kW) (third column)
• One-year power profiles are required, and all values should be positive.
• To add measurements of a heat pump, please add their values to the demand (sum) in the first column
or to the EV in the third column. If there is no EV, just replace the EV column with zeros.

- Use PVBT.m, to run the code. The inputs for the (PVBT.m) are described as follows:
Main Inputs
SaveR To save the data in excel sheet: 1 will save in Results.xls, other values will not
DataRes Data resolution in minutes: 10 for 10 minutes, 30 for 30 minutes, 60 for 1 hour
Tariff Tariff structure, inside the tool three tariffs, are given, choose one of them (FT for flat
tariff), (DT for double ToU tariff), and (TT for three level ToU tariff) – tariffs can be
adjusted using the utility inputs.
BESS Inputs
BESS Actual Battery Capacity [kWh]
DOD Maximum depth of discharge in fraction (0 to 1)
SOCMAX Maximum state of charge (0 to 1)
BESSP Maximum rating of the BESS [kW]
RE BESS System efficiency = BESS Efficiency (√𝑟𝑜𝑢𝑛𝑑𝑡𝑟𝑖𝑝 𝑒𝑓𝑓𝑖𝑐𝑒𝑛𝑐𝑦)
Inverter/Charger Efficiency
SOCI Initial value of SOC that the simulations will start with, default=minimum SOC
SOHM Minimum BESS state of health (end of lifetime)
FB (V 1.1) Fixed part of the BESS price that does not decline with years [£/kWh] (not affected
by the Dr)
BP BESS price [£/kWh] (affected by the Dr)
LTY Warrantied lifetime [Years]
PV Inputs
PVSize PV rating [kWp]
PVCost PV price [£/kWp]
InvCost Inverter cost [£/kW]
InvSize Inverter size [kW]
PVdeg PV annual degradation rate [% p.a.]
PVOM PV annual O&M cost as a percentage of the capital cost [% of CAPEX]
Utility Inputs
EXP Export power limit [kW]
EX Export tariff rate in [p/kWh]
SC Standing charge [p/day]
SR Flat tariff value [p/kWh]
HR High/peak rate value [p/kWh]
MR Shoulder rate value [p/kWh] (for the three-level time of use tariff)
LR Low-rate value [p/kWh]
TLS Start hour of low-rate tariff
TLE End hour of low-rate tariff
TPR Tariff daily profile, please insert the values of high rate (HR) and low rate (LR) at
each hour according to your preference.
Cost Benefit Analysis Inputs
YearI Year of installation
PVBT
IR Interest rate [%]
er Electricity price annual growth rate [% p.a.]
Dr Annual declining rate in BESS prices [% p.a.]
BESS Control Method Inputs: Threshold Rule-based Inputs
PTHD Upper threshold for discharging [kW]
PTHC Lower threshold for charging [kW]
PCNS A percentage of the BESS capacity to be charged during each season using a low tariff
rate to maximize the energy arbitrage. Set all values to zero if you don’t want to use
this feature
DIA (v 1.2) An option to allow the battery to discharge after the end of low tariff period (DIA=1),
or to discharge the battery whenever the demand exceeds the generation at any time of
the day (DIA=0);

- The electricity and export tariffs are entered in British pence / kWh. However, it can be changed to different
currencies according to the country regulations and tariff structures. The export power, assumptions,
parameters, and tariff profiles can be adjusted also according to specific preferences.

3. PVBT Sizing Optimization Guide:


The aim of the optimization formulation is to find the optimal sizes of PV only with or without BESS, BESS only
in presence of PV, and PV with BESS sequentially. The optimization objective is to maximize profitability through
maximizing the net present value.
The PVBT sizing optimization tool has four MATLAB files and one CSV file, described as:
PVBTO.m Used to enter the sizing tool inputs and run the PVBT sizing optimization.
BCM.m, MAINCODE0.m, MAINCODE.m Main code files.
Inputs.csv CSV file to enter the power profiles.
The power profiles should be entered in any data resolution in the file (Inputs.csv) as explained in the PVBT guide.
Yet, for the PV generation profile, please insert a PV generation profile of a 1 kWp system for your location. [e.g.
for a 4 kWp PV system, scale the data to 1 kWp by dividing all the time-points by the system size (4 kWp)]
The PVBT sizing optimization requires the additional following inputs:
OPTTY Optimization type| BPV: find the BESS and PV sizes, B: Optimize the BESS size
only, PV: Optimize the PV size only.
For the PV only (OPTTY:PV)
LPV PV Lower limit of the search space
UPV PV Upper limit of the search space
BESS and BESS capacity and power rating if there is a BESS, if there is no BESS, please leave
BESSP these values as small as possible but not zero.

For the BESS only (OPTTY:B)


PVSize PV rating [kWp]
LPS BESS Lower limit of the search space
UPS BESS Upper limit of the search space
For the PV and BESS (OPTTY:BPV)
Insert the values of LPV, UPV, LPS, and UPS

- All the other inputs are similar to the PVBT inputs.


PVBT
- The proposed sizing optimization adopts the NOMAD solver from the OPTI Toolbox. Please download and
install the OPTI Toolbox from here (https://github.com/jonathancurrie/OPTI).
- The PVBT sizing optimization outputs are printed in the command window, then can be saved later as a pdf
report. After determining the PV/BESS sizes, you can use these values in the PVBT and save the results in the
excel template.
- More details on the work implemented in this code are available in [1].
4. Download and licensing:
The PVBT is available for free download from (https://github.com/ARa2of/PV-BESS-Analysis-Tool) This open-
source simulation tool is published under the MIT-License.
Copyright © 2021 Ahmed Mohamed.

5. Citations:
A. If you will use this tool in work for a publication, please acknowledge by citing the
followings:
[1]. A. A. R. Mohamed, R. J. Best, X. A. Liu and D. J. Morrow, "A Comprehensive Robust
Techno-Economic Analysis and Sizing Tool for the Small-Scale PV and BESS," in IEEE
Transactions on Energy Conversion, 2021, doi: 10.1109/TEC.2021.3107103.

[2] A. A. R. Mohamed, PV-BESS Tool (PVBT), 2021, https://doi.org/10.5281/zenodo.5098348

In addition to citing [1] and [2]:


B. Please acknowledge the use of the degradation model as:
[3]. B. Xu, A. Oudalov, A. Ulbig, G. Andersson and D. S. Kirschen, "Modeling of Lithium-Ion
Battery Degradation for Cell Life Assessment," in IEEE Transactions on Smart Grid, vol. 9, no. 2,
pp. 1131-1140, March 2018, doi: 10.1109/TSG.2016.2578950
C. If you used the PVBT sizing optimization, please acknowledge the use of the NOMAD as:
[4]. Currie, J., Wilson, D.I., Sahinidis, N. and Pinto, J., 2012. OPTI: Lowering the barrier between
open source optimizers and the industrial MATLAB user. Foundations of computer-aided process
operations, 24, p.32.
[5]. S. Le Digabel, "Algorithm 909: NOMAD: Nonlinear Optimization with the MADS
Algorithm," ACM Transactions on Mathematical Software 37(4), pp. 44:1 - 44:15, 2011

6. Contact Details:
For any inquiry or bug/issue reporting, please use the following emails: AARaoufM@gmail.com /
amohamed06@qub.ac.uk

You might also like