A method to estimate optimal renovation period of solar photovoltaic modules

Renewable energy sources are essential to reduce the negative impacts on the environment caused by burning fossil fuels. Using solar photovoltaic installations in recent years means that decision-makers must consider infrastructure renewal decisions. An expenditure framework to achieve the optimal renovation period of photovoltaic modules is proposed here from an economic standpoint. This approach includes not only the investment and maintenance costs but also energy and emissions savings. A sensitivity analysis was carried out using a case study in south-eastern Spain, achieving that the optimal renovation period ranges between 17.0 and 24.7 years. Many factors are studied to identify those with the greatest influence on this indicator. Installing a solar power system is always a profitable choice considering that the installation lifetime is 25 years. Neglecting the influence of these limits may cause potential savings not fully exploited.


3
Abbreviations C E

EUR kWh
Cost of energy C L (EUR) Money borrowed in the present year CO 2 coal f ired (Tons of CO 2 /kWh) Emissions per energy produced by burning coal CO 2_em (Tons of CO 2 /kWh) Emissions per energy unit production CO 2 natural gas (Tons of CO 2 /kWh) Emissions per energy produced by burning natural gas CO 2_oil_f ired (Tons of CO 2 /kWh) Emissions per energy produced by burning oil CO 2 renewables (Tons of CO 2 /kWh) Emissions per energy produced using renewables sources C CC (EUR/Tons of CO 2 ) Carbon credits costs C 1 (t) (EUR) Installation cost of a solar power system in year t C 2 (t) (EUR) Maintenance cost of a solar power system in year t C 3 (t) (EUR) Cost of energy produced in photovoltaic modules in year t C 4 (t) (EUR) Cost of emissions saved by using photovoltaic modules in year t E(t) The energy produced by the PV panels in year t i (%) The interest on the loan I 0 (EUR) Overall installation costs (PV arrays, investors, support structure, legalisation process, etc.) I * 0 (EUR) Overall installation costs in EUR of the present year tp which consider the effect interest rates due to loans N (-) Number of photovoltaic modules M(t) i Maintenance costs in year t M 0 (t 0 ) i Means the maintenance cost in year t 0 P Coal f ired (kWh) The energy produced by burning coal P Natural gas (kWh) The energy produced by burning natural gas P Oil f ired (kWh) The energy produced by burning oil P renewables (kWh) The energy produced using renewables sources P 0 (kW) Power produced in PV arrays in the current year P t (t) (kW) Power produced in PV arrays in year t r (%) Equivalent continuous rate SPS Solar power system S (EUR) Total yearly savings t (years) Generic year t l (years) Duration of the mortgage tr* (years) Optimal renovation period tp (years) Present time t 0 (years) Year from which data on maintenance and repair on a solar power system are available (years−1) Coefficient representing the power production degradation

Introduction
Humanity is increasing energy consumption to 9938 Mtoe in 2018 (IEA 2020), following an almost linear rise since 1973 (4660 Mtoe). Without a doubt, the increasing energy consumption of the growing population is having negative impacts on the environment, and renewable energy sources are emerging as an opportunity to reduce emissions (Kang et al. 2020;Liu et al. 2020). Renewable energy sources in Spain by the end of 2020 amounted to 59,860 MW, accounting for 44% of the entire generation (RED 2020). In 2020, solar production reached an installed capacity of 14,018 MW (13% of the installed capacity at the national level) and 8% of the total energy generated in Spain (RED 2020) (both historical highs). State governments encouraged professionals to introduce solar energy resources by enacting laws (Fernández-González et al. 2020), but other market factors also promoted solar adaptation, such as the reduction of solar panels production costs-by 30 to 60% in the last 10 years (Closas and Rap 2017). Moreover, electricity prices-a very significant factor (Crago and Chernyakhovskiy 2017)-increased from €0.17/kWh in 2017 to €0.23/ kWh in 2020 (Eurostat Statistics 2021) in Spain (€0.21/kWh being the average price in Europe (Eurostat Statistics 2021)). Many approaches try to assess the feasibility when aiming to convert an infrastructure into a standalone solar photovoltaic (PV) system, in buildings (Idzikowski and Cierlicki 2021), irrigation systems (Hilarydoss 2021), etc. From the energy standpoint, some studies calculated the energy payback period (EPB) (Wilson and Young 1996), a value-focused on linking the energy demanded to manufacture PV modules and the energy produced (saved) over their lifetime. Typical values of this EPB indicator fluctuate between 1.96 and 0.68 years for various investigated materials (de Wild-Scholten 2013) although the usual values are 2.5 years (Eskew et al. 2018). Other studies quantified greenhouse gases emissions rate as 10.5-50 g CO 2 -eq./kW h (Peng et al. 2013) and highlighted that 90% of the atmospheric emissions associated with electricity generation could be avoided (Fthenakis et al. 2008) by using PV solar modules. The common indicator examined to analyse the economic viability is the payback period, accepted as the time in which the investment is fully recovered (Imteaz and Ahsan 2018;Pardo et al. 2019) from an economic standpoint. But, the economic payback period should not be used as a decision tool as the alternatives with the highest total savings (and not those with the lowest payback period) should be prioritised, so that all savings are entirely exploited (Košičan et al. 2021). As renovation is becoming important, the decision-maker must know when they must replace PV modules, as maintenance costs increase over time and less and less electricity is produced. The optimal renovation period is the point in time at which the module should be replaced to maximise the economic savings produced.
Many terms need to be considered when a utility manager decides to renovate solar power system (SPS) from an economical perspective. The PV replacement strategy must consider (among others) the maintenance costs-which decreased, on average, over the years (from 30 in 2011 to 17 $/kW/year in 2019) (Wiser et al. 2020). For these operating periods, the power deterioration of ageing PV modules (de Oliveira et al. 2018) reveals as a key determining factor (Wang et al. 2021) as recent studies showed up to 6% power degradation in three years (Silvestre et al. 2018) or 0.7% per year (Virtuani et al. 2019). Degradation tests have quantified that power losses in PV modules are mainly due to factors such as corrosion (Mota et al. 2020), dirt accumulation (Ali Sadat et al. 2021), temperature (Owen-Bellini et al. 2021), humidity (Hoffmann and Koehl 2014) and arid climates (Lindig et al. 2018). As degradation occurs in the solar PV panel, power generation is reduced (Farrell et al. 2019). To quantify the degradation of crystalline silicon PV, techniques (Lindig et al. 2018) and indicators (Mota et al. 2020) have been proposed and, the exponential model is one of the most accurate (Vázquez and Rey-Stolle 2008). The average power of the PV module declines linearly over time, but it is hypothesised that the power degradation over time could be also exponential (Bähr and Lauer 2015). The lifetime of PV modules ranges typically 25 (Flowers et al. 2016) or 30 years (Cromratie Clemons et al. 2021) and many researchers work to enlarge this lifetime (Ameur et al. 2017).
Earlier approaches proposed cost frameworks focused on calculating the levelised costs of energy (LCOE) (Branker et al. 2011;Lugo-Laguna et al. 2021) or the weighted average cost of capital (Guaita-Pradas and Blasco-Ruiz 2020) or some other set of indicators as the payback period, the net present value, etc. (Honrubia-Escribano et al. 2018). Naderipour et al. (2019) proposed a cost structure considering a hybrid wind-solar approach minimising net present costs, while others focused on sizing these installations (Sanajaoba 2019). But none of these investigated the optimal renovation period of the PV panels. The approach developed here incorporates the investment for purchasing the elements (the solar modules, inverter, battery), the maintenance costs, the energy production (and performance decay of electricity production) over the lifetime of the PV modules, and the environmental costs (Tawalbeh et al. 2021).
It is important to note the difference between the cost analysed. The renovation cost is of a one-off (it only occurs once), while the other costs are cumulative (i.e. they continue to be incurred year by year and accumulate with an integral). Therefore, as one cost decreases (as it depreciates economically because of time) and the rest increases (as it accumulates), a minimum value is produced, the optimal renovation period. Determining the best renovation period requires quantifying the time evolution of all costs. As every cost varies with time (Shayeghi and Hashemi 2015) and, to allow for comparison, every cost should be given in current monetary units using the equivalent continuous discount rate, r-the value that deals with the capital interest rate and inflation (Kleiner and Rajani 2001). Since renovation costs are very high, one scenario is considered with interest-free renovation costs (i.e. no interest is charged for borrowing the money) and another scenario where the decision-maker takes out a loan to minimise the investment (and must cover the monthly payment for borrowing the money) reducing future savings.
This study can be used by utility managers and/or practitioners at the step of analysing the feasibility study (gathering the input data from the manufacturers and identifying strategies to maximise benefits) or when planning solar station renewal under operation (recovering real data of the infrastructure, such as the maintenance costs or the performance degradation rates. Other stakeholders, such as system operators, should incorporate this approach as a tool to quantify the energy produced that is injected into their grids, as a tool to support their grid management (avoiding overloads and blackouts). Finally, policymakers can shape future policies towards energy decarbonisation with these decision tools.
A representative case in a Mediterranean zone is presented, located in the Alicante province (South-eastern Spain), with an elevated number of solar hours per year. This cost model is presented and tested for a real case study supplying energy to a pumping house that allows supplying fresh water to a municipality. A limitation of this study stems from the fact that the degradation is assumed constant for all cases (a conservative hypothesis) as to where solar radiation is lower, PV degradation is still lower, and this procedure is designed for a homogeneous plant, which suggests the same behaviour terms of breakage pattern, age, etc.
The aim of the present study was to propose a cost framework for calculating the optimal renovation period of the solar photovoltaic modules, and to find which parameters are most relevant when calculating this indicator. The paper intends to answer the following questions: (i) Which are the usual values for optimal renovation period in a real case in Spain? Higher or lower than the expected lifetime? (ii) What happens in the ideal case without deterioration in energy production? (iii) And what about if deterioration is higher than the usual values? (iv) What if maintenance costs increase? (v) How affects the energy and environmental costs? (vi) The influence of latitude? and (vii) How does the effect of a bank or partial mortgage influence this?
The problem is defined in Sect. 2.1 and the specific cost framework is described in Sect. 2.2, the total costs are grouped in Sect. 2.3 and the optimal renovation period is calculated in Sect. 2.4. The case study is presented in Sect. 2.5. Section 3 shows the results, which are analysed and compared to previous research in the discussion Sect. 4. The key conclusions are described in Sect. 5.

Problem definition
This study develops a recurrent issue when a decision-maker is managing a solar PV system. The practitioner analyses the system operation and discovers that the panels are regularly repaired, and they offer less and less power. The decisionmaker then wonders whether it is worthwhile to extend the lifetime of the photovoltaic array or whether the modules need to be replaced. If the decision-maker waits for deciding (the "laissez-faire" choice), this leads to greater maintenance costs and lower savings because of low energy production. Furthermore, this approach aims to clarify the question of how interesting to take out a bank loan for the solar PV system renovation.

Costs presentation
The costs included in the analysis behave differently. The renewal of the PV modules are investments whose value decreases over time while the repair, energy production, and emissions reduction are accumulated year by year, and consequently, increasing over time. Table 1 summarises the notation used, and the central row depicts when the cost must be considered.
In the next analysis, all costs are expressed in monetary units of the current year to allow comparison. When a decision-maker is studying the alternative of building an SPS, certain types of equipment are to be gained at present (PV panels, electrical devices, etc.). This machinery must be purchased in the present year (t p ). The monetary savings from diminished energy expenditure will be regularly achieved (a cumulative cost). It means that the future savings will be periodically achieved, and these costs must be expressed in present time monetary units (as future revenues are affected by depreciation of money values).
Maintenance, energy production, and environmental costs are cumulative as shown in Table 1. This implies that in year t, they result from accumulating the costs and/or savings produced from the current year to that year t. This accumulation is produced with a summation if the variable that considers economic depreciation is discrete or employing an integral if the variable is continuous (as in this work) (Y. et al. 2001).

Renovation costs (C 1 )
The installation costs are one of the most remarkable influencing considerations when carrying out an SPS and can be represented as follows in Eq. 1.
where C 1 (t) is the renovation cost of an SPS expressed in euros in the year t , r represents the equivalent continuous rate, and I 0 includes the overall installation costs (PV arrays, inverters, support structure, legalisation process, etc.). The cost of renovating solar panels is constant investment over time ( I 0 ). However, the cost of money is affected by the equivalent continuous rate and the parameter t (Eq. 1) shows that the investment can be expressed in monetary units of different years. Also, to compare alternatives, all costs are expressed in monetary units of the current year, so that a cost incurred in year t has a lower value in monetary units of the current year. In short, an investment of I 0 in present time (t p ) will become an investment of I 0 * e −r * 1 in monetary units Year Cost nature C 1 (Replacement) t p Investment, punctual C 2 (Maintenance) All Cumulative costs C 3 (Energy production) All Cumulative savings C 4 (Environmental) All Cumulative savings of next year (t p+1 ). Further explanations on the continuous equivalent rate can be found in Appendix I. It has been assumed that the decision-maker has the money to renovate the SPS in the current year. But being aware that the renovation costs can be large, the possibility that the entire (or partial) investment is paid for by taking out a mortgage loan has also been considered. Qualitatively, a mortgage reduces the current investment, but conversely, it also reduces the total savings (because of the prompt payment of interest) and lengthens the optimal renewal period. It is considered that the proposed cost structure will quantitatively prove these facts.

Maintenance costs (C 2 )
The maintenance costs from the current year to the year of the installation renovation (therefore it is included in the maintenance type costs, Table 1) were counted as the sum of the punctual repairs carried out in this period (as opposed to the renovation cost that only occurred at a punctual moment). The probability of a unit breakdown is determined by adjusting to a probability density function, being the time the unique variable. The shape of the probability density function of component failure depends on the individual failure pattern (i.e. one type of failure does not influence another type of failure) and common descriptions of the failure pattern are Weibull, log-normal and exponential distribution (Walker et al. 2020). Thus, this cost is proportional to the replacement of inverters, insurances costs, rent, cleaning, monitoring, control and preventive maintenance visits, repairs (inverter, transformer, etc.), metering, and official recertification of electrical installations by accredited inspectors. To assess the evolution of these costs over time, an exponential model was adopted.
Hence, maintenance costs for a generic year t are expressed as follows in Eq. 2: M(t) i is the maintenance costs in year t, M 0 (t 0 ) i means the maintenance cost in year t 0 , and i (years −1 ) represents the growth coefficient of the maintenance costs. The total cost of repairing the SPS installation from the current year to the generic year t (a sum of money expressed in euros of the current year, t p ) can be calculated as follows (Eq. 3): In this formulation, the upper limit of the integral is defined as t . The maintenance cost includes the costs of the maintenance that are made throughout all the years between the present year and t , accumulated by the integral. The effect of manufacturer's warranties and their performance can be included in the M 0 (t 0 ) i parameter to make the cost framework represent reality as closely as possible.

Energy production (C 3 )
The quality of the components of their lifespan must be also estimated. For this case, many modules are suitable, and for this study, it was merely recognised those that provide enough quality and whose operation does not reduce within the latter 25 years, drastically. It has been assumed that solar panels performance degradation rates with time go from an average of 97.5% in the first year to 80.7% in the year 25. A module drops an average of 0.7% of its performance each year because of vulnerability to the environment throughout its life (linear decrease). An exponential degradation of the PV module power must be also assumed (Vázquez and Rey-Stolle 2008) and this power deterioration can be calculated as follows (Eq. 4): where P t (t) is the power produced in year t, P 0 means the power produced in the current installation year, and (years −1 ) represents the coefficient representing the power production degradation of the SPS. The energy produced by PV panels E(t) (kWh) in the year t can be computed as follows (Eq. 5): where N is the number of PV modules with an efficiency (-) running Δt i (hours) peak hours of solar irradiance per year. So, energy production is considered as a negative and cumulative cost ( C 3 (t)) , which is formulated in Eq. 6.
where C E is the cost of energy (EUR/kWh), N considers the number of modules, Δt i represents the number of peak hours of solar irradiance per year (a value directly linked to latitude) and (-) is the efficiency (a term ranging from 1, absolute conversion of energy by the solar modules, and 0 in cloudy days). This performance ratio considers the combination of derating factors of the system, dust, mismatch of modules, dc/ac losses, etc. The negative sign indicates (in C 3 and C 4 ) that it is a negative cost or a money-saving. Energy production can be calculated using some other formulas (even getting the numbers from real measurements) and this could be incorporated into the general cost framework.
The electricity production of photovoltaic solar panels is calculated from the number of peak sun hours (PSH) and the peak power got by the panel, although in this work the same results are achieved because all the energy produced is computed according to the time of day (calculated as the product of the power by the hours of irradiance).

Environmental costs (C 4 )
By using electrical energy produced in photovoltaic solar panels (Eq. 5), conventional energy produced (among other sources) by burning fossil fuels is not being used here. Once the energy production per year is known, the emissions saved can be directly computed using the energy mix of the region studied (Eq. 7). The energy mix refers to the proportion of primary energy sources that are used to get the electricity that is distributed through the electricity distribution networks.
where CO 2 em is the emissions produced by the proportion of energy sources (Tons of CO 2 /kWh), and CO 2 coal f ired , CO 2 natural gas , CO 2_oil_f ired and CO 2 renewables (Tons of CO 2 /kWh) are emissions per energy produced by burning coal, natural gas, oil, and renewable sources. Finally, the cost of these emissions has been calculated by multiplying the energy savings E(t) (kWh), the emissions produced Being CO 2 em (Tons of CO 2 /kWh), and the carbon credits costs ( C CC ;EUR/Tons of CO 2 ). This cost C 4 (t) is characterised as negative because they consider emissions savings accumulated by an integral (because it increases over time; Eq. 8).

Total costs of solar power systems
In this method, all the forthcoming costs and benefits are considered in "current day" values. The importance of capital fluctuates with time, future expenses and benefits must be deducted from their corresponding amount in current prices. Equation 9 brings together all the cost to be minimised from now (t p ; present time) to t.
The total yearly savings ( S ) is defined as a sum of the energy and tons of carbon dioxide saved and it can be calculated as follows (Eq. 10): And Eq. 7 converts into Eq. 9:

Optimal renovation period of PV modules
The optimisation of the problem is achieved by minimising those total costs. The optimal renovation period, tr* (for (11) which total costs become the least possible ones) is calculated by deriving Eq. (9) and equalling zero (Eq. 12).
Equation (10) is an implicit formula that can be solved by several techniques as iterative implicit methods, such as the Newton-Raphson algorithm, for example. This equation shows as restrictions ≠ 0 and M ⋅ e ⋅t − rI 0 > 0 . If the maintenance cost does not vary with time ( = 0 ), the equation is not implicit but explicit (Eq. 13).

Case study
The numerical example shows the above costs of the problem. Input data has been gathered from previous works ) and is referred to as an SPS which supplies a pumping system providing fresh water to a town with 2000 inhabitants, placed in the Alicante province (Southeast of Spain). The equivalent discount rate is r = 2%.

Investment (C 1 ) and maintenance costs (C 2 )
The contribution to building the SPS considers N = 252 modules (18 in series and 14 in parallel). Each module has an area of 1.96 × 0.992 m 2 . The investment performed (equal to I 0 = 173,108 EUR) considers a turn-key site solution. To highlight the influence of the investment and interest rates of loans to meet the first investment, two potential mortgages have been proposed at an average fixed rate of 3% for 20 years. The first one assumes that the entire investment is got with the loan, while the second one covers half of the investment, and the other half comes from own funds.  (Drury et al. 2014) or 1.5% (Hernández-Moro and Martinez-Duart 2013), in our approach, maintenance costs are 1.15% of the PV costs.
In many approaches, the maintenance costs do not increase through time i =0 (Rossi et al. 2020). As we consider the influence of age about the components, we consider i =0.1, a term considering elements renovation such as (connectors, fuses, diodes, DC breaker, DC/AC converters, AC breakers). This parameter is not related to location, as it depends on inspection and preventive maintenance, corrective maintenance, operational and technical management and module cleaning, security, snow clearing, vegetation management (Steffen et al. 2020).

Energy production costs (C 3 )
The power produced in year t, P 0 is 0.330 kW per module. These are poly-crystalline Canadian Solar 330P and these modules are oriented to the south, being the tilt angle equal to 40º. The coefficient representing the power production degradation of the SPS is. = 4.46 10 -3 (years −1 ) a value that produces a 20% reduction in power production in 50 years similar order of magnitude that the proposed 0.87%/year (Spertino et al. 2020). The cost of the energy produced is C E =0.1 EUR/kWh (a value lower than other common values 0.17 − 0.24 €/kWh (Kosmadakis et al. 2021)), the efficiency of PV modules is considered =0.7, a conservative value comparing to other approaches which fixed it as 0.8 (Spertino et al. 2020).
Finally, Δt i =1929.6 is the number of hours of solar irradiance per year (a value directly linked to latitude). This value has been measured at the Sagra Station, located close to the SPS (UTMX 754.387 and UTMY 4,299,526). This station has been working since November 2018, and data is gathered every 30 min. With the measurement picked up, the monthly peak sun hour values can be obtained.
The solar peak hour measures solar irradiance per unit of the area received with the theoretical constant solar irradiance of 1000 W/m 2 (Note that irradiance when sunshine and sundown is reduced). The yearly hours of solar irradiance are calculated using the monthly values taken, getting Δt i = 1929.6 hours in this location.

Environmental costs (C 4 )
The energy mix (the proportion of the primary energy sources from electricity is produced) in Spain states that 31.8% of total energy is produced by oil-fired (865 g/ kWh), 13.5% of natural gas (554 g/kWh), and 21% of coal-fired (1432 g/kWh). The remaining 33.7% of the overall energy consumption is produced by nuclear and renewables (0 g/kWh) (Košičan et al. 2020). The emissions CO 2_em can be computed as shown in Eq. 14.
The carbon credits cost is equal to C CC =24.84 EUR/ Tons of CO 2 (average price in 2020 (IETA 2020)).

Total costs of the service life of PV modules
The first step focuses on the calculation of the total costs of the SPS installation. The economic savings can be calculated as (Eq. 15): CO 2_em =CO 2_oil_fired ⋅ P Oil fired + CO 2 natural gas ⋅ P Natural gas + CO 2 coal fired ⋅ P Coal fired + CO 2 renewables ⋅ P renewables = 865 × 0.318 + 554 × 0.135 + 1432 × 0.21 + 0 × 0.337

=650.58 g of CO 2 ∕kWh
And the total costs to be minimised are (Eq. 16): These terms can be seen in Fig. 1, where one-off costs (such as investment) occur in any year and so take on a different value expressed in monetary units from the present year (a value affected by the coefficient r). In contrast, the (16) year by year (such as maintenance) or savings (negative costs) such as energy produced and environmental costs. The full cost over the whole lifetime of the installation is the sum of all these costs. The optimum renovation period can be identified as the minimum shown in the overall costs (23.2 years; Fig. 1). This value can be achieved by solving the implicit equation proposed (Eq. 17).
And the minimum cost is calculated as follows (Eq. 18): The payback period can be calculated equalling Eq. 14 to zero, and the result is 10.5 years (Fig. 1). Solving this equation returns a second absurd value (33.4 years) which should be ignored. For a certain time, interval (between 10.5 and 33.4 years), the installation is profitable.

Influence of the environmental costs and influence of power production degradation (α)
Another sensitive parameter related to the optimum renovation period is the environmental cost, an amount that is not paid by the service manager. This cost means that the utility manager must pay for the emissions to the atmosphere, and it comes from larger costs accumulations (Fig. 2). The degradation of power production is a key parameter, as shown in the implicit equation. It seems evident that higher values of production degradation result in lower PV renovation times (Fig. 3). The formula proposed was not valid for restrictions = 0 , In this case, it can be solved numerically and depicts the maximum value of the optimum renovation period (and maximum economic savings), as this ideal condition involves no degradation of PV modules in SPS.

Influence of the hours of irradiance
To find out such influence, the irradiance hours have been changed between 1800 and 2300 h. The effect of such an increase is visible in the evolution of the overall costs (Fig. 4). Such effect, translated into the duration of the optimum renovation period, produces a reduction in its value, given the weight of the variable Δt i .

Influence of discount rate and growth coefficient of the maintenance costs
The discount rate is a parameter to consider future expenses or savings in monetary units of year zero. The money values vary with time according to the inflation and the capital interest rate in each country. Moreover, this parameter is not modifiable by engineers or professionals. The influence of this term is illustrated in Fig. 5 where the total cost of investment in year zero will make economic savings in the future. The exponential model to know the evolution of these costs over time considers i as a coefficient to consider maintenance costs for a generic year. This value depends on the replacement of machinery (inverters, repairs, transformer, etc.), cleaning, insurances costs, and its influence is illustrated in Fig. 6 (where the overall costs ranging i from 0 to 0.2 years −1 ).

Influence of the interest on loans
In Table 1, the replacement of a PV device was described as a punctual investment performed at year 0. However, if a loan must be taken out because the initial investment is large, it becomes an accumulated investment throughout the mortgage repayment.
If a loan interferes in the replacement process, the investment converts into a cumulative cost in which the decisionmaker pays every year the proportional part of the whole investment plus the interest on the money non-repaid on the mortgage. The new investment cost I * 0 is calculated as follows (Eq. 19): where C L is the money borrowed, t l is the duration of the mortgage and i is the interest on the loan. In our case, if the utility manager demands a loan for covering the whole investment ( C L =173,108 EUR; t l =20 years, i = 3%), %), values similar than other approaches ( t l =15 years, i = 1%) (Lu et al. 2021). This results in a new investment cost I * 0 =281,296.7 EUR; and if C L2 =173,108/2 = 86,554 EUR, I * 0 =267,214.8 EUR. In Fig. 7, these results are shown. It bears no surprise that the interest-free option is the better choice (the decisionmaker saves the interests for t l years). The dotted line represents the progressive investment performed for t l years and it shows low current investments (the loan covers the whole investment performed in year zero) but the worst results (the final investment is 281296.7 EUR, 1.62 times higher than the interest-free case).
The dashed line shows the medium case, where initial investments are covered half from own funds and the other half comes from the loan. The final investment is 267214.8 EUR, 1.54 times higher than the interest-free case).
With the new values achieved for the investment, the total costs for the cases are presented in Fig. 8. The loan cases show high investments and consequently, lower economic savings. These values prove that the interest rate on loans is an essential factor to calculate the optimal replacement period (it is extended up to 24 years for the two cases) but the economic savings are reduced from 86,191 EUR (interest-free case) up to 18,771 EUR (for a loan covering the whole investment; reducing savings by 78.2%) or 27,485 EUR (for a loan covering the half of the investment; a 68% reduction).

Summary of the sensitivity analysis
The results achieved are summarised in Table 2. The cases are shown in the same order as depicted in the results section.

Discussion
This study plays a key role in areas characterised by a high number of radiation hours, especially along the Mediterranean belt. With typical data from this geographical area, similar results (23.2 years) were obtained to those typical lifetime rates of PV installations (Flowers et al. 2016;Pardo et al. 2020). But our approach suggests a full costs model to evaluate the best renovation period for PV panels from an economic standpoint. Case 0 shows that if the PV modules renewal is postponed from the 23.2 years (-86,451 EUR) to 25 (-84,086 EUR) or 30 (50,371 EUR), the following values are obtained 2635 EUR and 36,080 EUR (in year 25 and 30, respectively). When calculating the energy production, the new installation produces. The energy production in year 0 is 439.63 kWh/day, a value that reduces up to 393.21 kWh/ day (10.56%) and 384.54 kWh/day (12.53%) in years 25 and 30. So, when the decision-maker decides to replace the PV modules in year 25 (and not in year 23), the energy lost is equal to 15.6 + 14.9 + 14,807 = 45,333 kWh, but if they are renewed in year 30, the energy loss amounts to 118.3 MWh over the 7 years delay.
If comparing the payback period, low values are achieved here (around 10-12 years) but similar in order of magnitude were achieved by Imteaz and Ahsan (2018) although this interesting approach did not consider PV performance degradation and the increase in maintenance costs (the two key indicators found here). The numbers achieved in a high irradiance region as Northeast Nigeria were similar to those  found here, with payback periods of 13-15.7 years (Owolabi et al. 2019).
The specific influence of production costs of emissions, a term not found in earlier studies, has been reviewed. This work addresses the optimisation problem from the manager of an electricity consuming company perspective (in this case: a water distribution system utility manager). Considering the environmental costs framework means that the savings obtained an increase from -41,200 to -89,200 euros (Fig. 2). The solar photovoltaic installation does not emit CO 2 into the air, and therefore the environmental costs (savings) delay the optimal renewal period from 22 to 23.8 years. Today, these conditions are essential to reduce emissions and this study considers them for a realistic simulation. The environmental costs reveal as a tool to make solar photovoltaic installations more profitable. In the future, neglecting the influence of these costs may lead to explanations that are distant from the true. The power production degradation is a sensitive parameter with a significant influence on the overall recovered costs. The selected rates ( = 4.46 10 -3 years −1 ) produce a 20% reduction in power production in 50 years, a lower value than the common one, annually averaging 0.5% (Jordan and Kurtz 2013). With = 0 values, the ideal situation without power degradation is analysed, and it stands out that the lowest value considers the greatest economic preservation. This quantity shows an ideal situation far from reality. Other values such as = 0.02 and = 0.05 present other cases with high degradation rates (20% every 11.5 and 4.45 years). The optimal renovation period ranges from 17.0 to 24.7 years ( = 0 and = 0.05, respectively) (Fig. 3). Even for a large degradation rate such as = 0.02, the investment is feasible, and this should encourage potential purchasers and/or decision-makers. Only high degradation rates such as 20% power production decrease in 5 years ( = 0.05) make the installation unprofitable.
By analysing the effect of irradiance hours, this work aims to highlight that these systems are more profitable in latitudes between 40ºN and 40ºS. The Sagra irradiance station yielded common values in Spain (1921.6 of peak irradiance hours per day). Values below 1800 illustrate other regions such as the North of Spain, France, Germany, while values as high as 2100 can be common from North Africa, and regions of sub-Saharan Africa, Afghanistan, Nigeria (Njoku and Omeke 2020). The results show that PV modules are viable in latitudes with low irradiance values (Fig. 4) as they always get higher economic savings than the investment and maintenance costs (the total cost is negative). This parameter (hours of irradiance) highlights that these installations study can be reproduced in other regions with lower values of irradiance achieving also economic benefits. It should also be noted that this approach does not consider the lower degradation rates of solar PV panels in low irradiation areas. That is, if lower degradation is considered, better results are still achieved as lower PV power degradation means lower values. If the amounts of the discount rate are small, the forthcoming savings will be slightly reduced, and this condition promotes investment. The optimal renovation cost ranges between 21.4 and 24.7 years for r = 0.01% and r = 4%, respectively (Fig. 5). Large rates of this parameter suggest carrying out the investment is not as profitable (future preserves are not significant in today's financial units).
The influence of the growth coefficient shows that when maintenance costs grow (high values of i ), the optimal renovation time reduces. If i =0, the equation proposed returns no solution (not a minimum value, Fig. 6), as the natural logarithm cannot be calculated for negative values. In short, the optimisation problem does not meet the restriction M ⋅ e ⋅t − rI 0 > 0.
Finally, when the funds are not interest-free (although investment increases (50%) and savings decrease (80%), the total costs still reveal total economic savings. Even without subsidies, solar electricity prices are lower than grid supply (Yan et al. 2019) Numerical results found in other works (Solangi et al. 2011) assume lower economic payback periods (12 years) than those obtained in this work. Finally, green loans or tax incentives (Xu et al. 2021) supported by public institutions are precisely used to convert a solar PV plant installation into an interest-free scenario (Bertoldi et al. 2021).

Conclusions
The main objective of this work is to propose a cost framework to calculate the optimal renovation period of the solar photovoltaic modules. The new cost framework addresses the overall cost that influences the entire lifetime of a solar power system-it allows to anticipate new values for future scenarios. This results in an implicit equation that considers the deterioration of the PV modules and includes an increase in the PV system maintenance. The results answer the questions planned, indicating that: (i) The optimal renewal period of photovoltaic modules has been quantified to be between 17.1 and 24.7 years, values lower than expected PV modules lifetime (25-30 years). (ii) An explicit equation reveals that if no deterioration is recognised (an ideal case), the increased operation time and lower costs results in achieving the highest value, 24.7 years, and maximum economical savings (iii) If the performance of the PV modules declines at high rates as 20% in 5 years (values above the common values), the installation may be non-profitable, the optimal renewal period is 17.03 years and economic savings that never return on investment (in other words, the payback period adopts a value of infinity). (iv) The quantitative study of the results shows that if the maintenance costs increase or the savings decrease over time (because of degradation), the optimum renewal time decreases up to values of 10.7 years, but even in this situation, some economic savings are achieved. (v) Energy and environmental savings are the key advantages of these green energy sources as these (negative) terms make these installations economically profitable and these terms encourage decision-makers to adopt solar photovoltaic panels as an alternative from an economic standpoint. (vi) The influence of latitude has been clarified by considering the irradiation hours and the results bear no surprise; latitudes with higher irradiance showed better results, with longer optimal renovation periods (ranging between 24.6 and 22.5 years) and higher total savings (150793 and 64157 EUR, respectively). However, it should be noted that in areas with fewer hours of sunshine, the results are also positive and always produce economic savings. (vii) Reducing the cost of capital means a significant loss of savings (up to 80%), but the project is still economically viable. Therefore, this work also underlines the importance of this parameter (modifiable by the decision-maker).

Appendix I
Investments can only be compared with each other if they can be expressed in monetary units of the same year. So, we need to express all costs in the same time unit (the current year is chosen for convenience) and two constraints must be considered here: 1. The value of money changes over time (real interest rate; r'). 2. Inflation rate (s) produces a sustained and generalised increase in the price level of goods and services (the cost of a good increases without changing its value).
The effects of the discount rate (r') and inflation rate (s) are jointly from the term real named discount rate R (or also deflated discount rate) defined as: Thus, a cost in the present year is expressed in a future year n: In the present study, we want to express future costs in the current year (t p ), so we get: The real discount rate parameter R produces significant variations in the total calculated costs. If it has a high value, it implies high values of r' and so a higher expected profitability of the project. It also implies that certain costs, such as repair costs carried forward to the current year, are less relevant because of the translation to the current year.
In the economic analysis carried out, the parameter rdefined as the equivalent continuous discount rate of the cost equivalent-is used to express future costs in current monetary units. This parameter is used because it allows the variation between costs to be represented, since the real discount rate R only allowed this calculation from year to year. The relationship between the two parameters is simple.
Likewise, the cost associated with the renewal (Eq AI.5) and maintenance of photovoltaic solar panels (Eq AI.6) can be expressed by updating the costs with the continuous update rate. Equations AI.5 and AI.6 correspond to Eqs. (1) and (3) from the manuscript (to help clarifying).
Equation (Eq AI.6) shows how the sum of discrete time variables (costs follow each other year by year) accumulates with an integral when the variables become continuous.

C n
Cost expressed in monetary units of year n C 0 Cost expressed in monetary units of the current year C 1 (t) (EUR) Installation cost of a solar power system in year t C 2 (t) (EUR) Maintenance cost of a solar power system in year t (21) C n = (1 + R) n ⋅ C 0 = 1 + r � 1 + s n ⋅ C 0 .
(24) C 1 (t p ) = I 0 (1 + R) t = I 0 (1 + e r − 1) t = I 0 ⋅ e −rt (25) (1 + R) 0 + M 0 (1) i ⋅ e ⋅1 (1 + R) 1 + I 0 Investment performed in the current year M(t) i Maintenance costs in year t M 0 (t 0 ) i Means the maintenance cost in year t 0 R Discount rate (or also deflated discount rate) r' Real interest rate r (%) Equivalent continuous rate s Inflation rate t (years) Generic year i (years−1) The growth coefficient of the maintenance costs Author's Contribution MAP, SV, and JRC contributed to conceptualisation; MAP and AJ contributed to methodology and writing-original draft preparation; MAP, SV, and AJ contributed to formal analysis and investigation; SV and JRC contributed to writing-review and editing; MAP acquired funding; MAP and JRC contributed to supervision. MAP and SV contributed to conceptualisation and calculation; MAP and AJA curated and collected the data; MAP, AJA, SV, and JRC contributed to visualisation (figures and tables); MAP and JRC contributed to writing-original draft; MAP, AJA, SV, and JRC contributed to writing-review and editing the manuscript.
Funding Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature. This work was supported by the research project "DESENREDA" through the 2021 call "Estancias de movilidad en el extranjero Jose Castillejo" of the Ministerio de Universidades (CAS21/00085) and for the project "Hi-Edu Carbon" Erasmus Plus Programme, Key Action KA22021, action type (2021-1-SK01-KA220-HED-000023274.
Data availability Not applicable.

Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Ethical approval Not applicable.

Consent for publication Not applicable.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.