## 1 Introduction  
Global concerns surrounding the decarbonization of energy systems have notably increased over the past years [1]. Distributed energy generation systems such as PV panels are one of the most promising technologies primarily contributing to the building service industry [2]. However, the main improvement to the technology has been in connection with the electrochemical efficiency of the PV cells [3]. Despite notable technological advancements, there are various technical challenges associated with their adoption in the building sector including the mismatch in the supply and demand timing. One of the possible solutions to address this challenge is to install electric storage systems (ESS) [4]. The ESS, integrated with the renewable energy systems equipped with PV panels, especially in the stand-alone (off-grid) systems, is used for peak shaving and power shifting from day time to peak load hours (mostly evenings) [5]. In stand-alone renewable energy systems in buildings, the total energy demand is supplied by solar or other renewable energy sources [6], making the energy supply and demand management an integral part of the system [7, 8]. The energy storage systems although contributing positively to the energy management solutions, have considerable environmental impacts [9]. This is mainly associated with the extraction of raw materials such as Cobalt, Nickel, and Lithium, and energy intensive processes when manufacturing Lithium-ion batteries [10]. This impact, however, could be reduced by prolonging the service life of the batteries retired from their first application in EVs, to less demanding applications such as residential buildings [11]. The initial state of health (SoH) of the second life batteries in such applications is generally around 75-80% of their nominal capacity [12]. Such second life applications are also expected to provide financial benefits making renewable energy more affordable and desirable for the end-users [13]. Lithium-ion batteries used in electric vehicles are considered second life when their capacity reaches 80% of their initial value. The lithium-ion batteries can be used in less-stressed applications such as buildings until their end of life. In order to achieve highest life span of the SLBSs, the load stress applied to them should be minimized. For grid-connected systems, it will be managed by the battery management system (BMS) which controls the energy flow through the SLBs, and mostly the extra demand will be applied to the grid. However, in stand-alone systems, the stress level and variations of the load applied to the SLBs are higher than grid-connected systems. In addition, the size of the PVs and SLBs plays a key role in the stand-alone system to find the optimum energy performance of the system as well as achieving the highest life span for the SLBs. On the other hand, as the number of electric vehicles increases, more buildings are equipped with EV charging stations applying a significant extra load to the building energy storage system which may directly affect the SLBs service life. This is the case especially when these systems are designed to cover the building demands excluding EVCS. Numerous studies have investigated the application of second life batteries for ESS in residential buildings. [PERSON] et al. [14] studied second life batteries in a micro-grid using an equivalent circuit model (ECM) and validated the model against the experimental data. Furthermore, the performance of the microgrid with different architectures was assessed. The results demonstrated that the second life batteries could be successfully installed in grid-connected or islanded microgrid applications uninterrupting the normal operation of the system. [PERSON] et al. [13] have introduced the integration of a 3 MW second life battery ESS with the grid for peak shaving in China. The mathematical modelling of the system as well as a cost-effective model for the BSS is developed.