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 CO2-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.

Expenditure framework

2.1. 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 decision-maker 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.

2.2. 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.

Table 1 Cost analysed

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 (tp). 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).

2.2.1. Renovation costs (C1)

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.

$${C}_{1}(t)={I}_{0}{*e}^{-rt}$$
(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 (tp) will become an investment of \({I}_{0}{*e}^{-r*1}\) in monetary units of next year (tp+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.

2.2.2. Maintenance costs (C2)

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}={M}_{0}\left({t}_{0}{)}_{i}\cdot \mathit{exp}({\beta }_{i}*t\right).$$
(2)

\(M(t{)}_{i}\) is the maintenance costs in year t, \({M}_{0}({t}_{0}{)}_{i}\) means the maintenance cost in year t0, and \({\beta }_{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, tp) can be calculated as follows (Eq. 3):

$${C}_{2}\left(t\right)={\smallint}_{\!0}^{t}{M}_{0}({t}_{0}{)}_{i}\cdot {e}^{\beta \cdot t}\cdot {e}^{-r\cdot t}\cdot dt.$$
(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.

2.2.3. Energy production (C3)

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):

$${P}_{t}(t)={P}_{0}\cdot {e}^{-\alpha t}$$
(4)

where \({P}_{t}(t)\) is the power produced in year t, \({P}_{0}\) means the power produced in the current installation year, and \(\alpha \) (years−1) represents the coefficient representing the power production degradation of the SPS. The energy produced by PV panels \(E\left(t\right)\) (kWh) in the year t can be computed as follows (Eq. 5):

$$E\left(t\right)=\eta \cdot N\cdot {P}_{0}\cdot {e}^{-\alpha t}\cdot \Delta {t}_{i}$$
(5)

where \(N\) is the number of PV modules with an efficiency \(\eta \) (-) running \(\Delta {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.

$${C}_{3}\left(t\right)=-\eta \cdot {\int}_{\!\!\!\!0}^{t}N\cdot {C}_{E}\cdot \Delta {t}_{i}\cdot {{P}_{0}\cdot {e}^{-\alpha t}\cdot e}^{-r\cdot t}dt$$
(6)

where \({C}_{E}\) is the cost of energy (EUR/kWh), N considers the number of modules, \(\Delta {t}_{i}\) represents the number of peak hours of solar irradiance per year (a value directly linked to latitude) and \(\eta \) (-) 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 C3 and C4) 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).

2.2.4. Environmental costs (C4)

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.

$${CO}_{2\_\mathrm{em}}={CO}_{2\_\mathrm{oil}\_\mathrm{fired}}\cdot {P}_{{\mathrm{Oil}}_{\mathrm{fired}}}+{CO}_{{2}_{{\mathrm{natural}}_{\mathrm{gas}}}}\cdot {P}_{{\mathrm{Natural}}_{\mathrm{gas}}}+{CO}_{{2}_{{\mathrm{coal}}_{\mathrm{fired}}}}\cdot {P}_{{\mathrm{Coal}}_{\mathrm{fired}}} +{CO}_{{2}_{\mathrm{renewables}}}\cdot {P}_{\mathrm{renewables}}$$
(7)

where \({CO}_{{2}_{\mathrm{em}}}\) is the emissions produced by the proportion of energy sources (Tons of CO2/kWh), and \({CO}_{{2}_{{\mathrm{coal}}_{\mathrm{fired}}}},{CO}_{{2}_{{\mathrm{natural}}_{\mathrm{gas}}}},{CO}_{2\_\mathrm{oil}\_\mathrm{fired}}\) and \({CO}_{{2}_{\mathrm{renewables}}}\) (Tons of CO2/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\left(t\right)\) (kWh), the emissions produced Being \({CO}_{{2}_{em}}\)(Tons of CO2/kWh), and the carbon credits costs (\({C}_{CC}\);EUR/Tons of CO2). This cost \({C}_{4}\left(t\right)\) is characterised as negative because they consider emissions savings accumulated by an integral (because it increases over time; Eq. 8).

$${C}_{4}\left(t\right)=-\eta \cdot {\int}_{\!\!\!0}^{t}N\cdot {P}_{0}\cdot {e}^{-\alpha t}\cdot \Delta {t}_{i}{\cdot CO}_{{2}_{em}}.{C}_{CC}\cdot {e}^{-r\cdot t}dt.$$
(8)

2.3. 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 (tp; present time) to t.

$$C\left(t\right)=+{I}_{0}\cdot {e}^{-rt}+{\int}_{\!\!\!0}^{t}{M}_{0}({t}_{0}{)}_{i}\cdot {e}^{\beta \cdot t}\cdot {e}^{-r\cdot t}\cdot dt-\eta \cdot {\int}_{\!\!\!0}^{t}N\cdot {C}_{E}\cdot \Delta {t}_{i}\cdot {{P}_{0}\cdot {e}^{-\alpha t}\cdot e}^{-r\cdot t}dt-\eta \cdot {\int}_{\!\!\!0}^{t}N\cdot {P}_{0}\cdot {e}^{-\alpha t}\cdot \Delta {t}_{i}\cdot {.CO}_{{2}_{em}}.{C}_{CC}\cdot {e}^{-r\cdot t}dt.$$
(9)

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):

$$S=\eta \cdot N\cdot {P}_{0}\cdot \Delta {t}_{i}\cdot \left({C}_{E}+{CO}_{{2}_{em}}.{C}_{CC}\right).$$
(10)

And Eq. 7 converts into Eq. 9:

$$C\left(t\right)=+{I}_{0}\cdot {e}^{-rt}+{\int}_{\!\!\!0}^{t}{M}_{0}({t}_{0}{)}_{i}\cdot {e}^{\beta \cdot t}\cdot {e}^{-r\cdot t}\cdot dt-\cdot {\int }_{\!\!\!0}^{t}S{\cdot {e}^{-\alpha t}\cdot e}^{-r\cdot t}dt.$$
(11)

2.4. Optimal renovation period of PV modules

The optimisation of the problem is achieved by minimising those total costs. The optimal renovation period, tr* (for which total costs become the least possible ones) is calculated by deriving Eq. (9) and equalling zero (Eq. 12).

$${t}_{r}^{*}=-\frac{1}{\alpha }\mathit{ln}\left(\frac{{M}_{0}\cdot {e}^{\beta \cdot t}-r{I}_{0}}{S}\right).$$
(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 \(\alpha \ne 0\) and \(\left(M\cdot {e}^{\beta \cdot t}-r{I}_{0}\right)>0\). If the maintenance cost does not vary with time (\(\beta =0\)), the equation is not implicit but explicit (Eq. 13).

$${t}_{r}^{*}=-\frac{1}{\alpha }\mathit{ln}\left(\frac{M\cdot -r{I}_{0}}{S}\right).$$
(13)

2.5. Case study

The numerical example shows the above costs of the problem. Input data has been gathered from previous works (Pardo et al. 2020) 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%.

2.5.1. Investment (C1) and maintenance costs (C2)

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 m2. The investment performed (equal to I0 = 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.

Maintenance costs are equal to 2000 EUR/year. Other approaches considered operation and maintenance costs are measured in $/kW year, getting values as 19 $ ± 15$ per year (Tran and Smith 2017)—considering personnel, fees, routine equipment maintenance, and administrative expenses in the US sector. The numbers used in this approach are 2000/252*0.33 = 2000/83.16 = 24.05 EUR/kW year = 18.5 $/kW year. Some other approaches suggested that maintenance costs could be estimated as 1% of fixed angle PV modules per year in (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 \({\beta }_{i}\) =0 (Rossi et al. 2020). As we consider the influence of age about the components, we consider \({\beta }_{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).

2.5.2. Energy production costs (C3)

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.

\(\alpha \) = 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 \(\eta \) =0.7, a conservative value comparing to other approaches which fixed it as 0.8 (Spertino et al. 2020).

Finally, \(\Delta {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/m2 (Note that irradiance when sunshine and sundown is reduced). The yearly hours of solar irradiance are calculated using the monthly values taken, getting \(\Delta {t}_{i}=1929.6\) hours in this location.

2.5.3. Environmental costs (C4)

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.

$$\begin{aligned}{\rm{C}}{{\rm{O}}_{2\_em}} = & {\rm{C}}{{\rm{O}}_{2\_{\rm{oil}}\_{\rm{fired}}}} \cdot {P_{{\rm{Oi}}{{\rm{l}}_{{\rm{fired}}}}}} + {\rm{C}}{{\rm{O}}_{{2_{{\rm{natura}}{{\rm{l}}_{{\rm{gas}}}}}}}} \cdot {P_{{\rm{Natura}}{{\rm{l}}_{{\rm{gas}}}}}} + {\rm{C}}{{\rm{O}}_{{2_{{\rm{coa}}{{\rm{l}}_{{\rm{fired}}}}}}}} \cdot {P_{{\rm{Coa}}{{\rm{l}}_{{\rm{fired}}}}}}\\ & \quad + {\rm{C}}{{\rm{O}}_{{2_{{\rm{renewables}}}}}} \cdot {P_{{\rm{renewables}}}} = 865 \times 0.318 + 554 \times 0.135 + 1432 \times 0.21 + 0 \times 0.337\\ =& 650.58 \,g\,\,of\,{\rm{C}}{{\rm{O}}_2}/{\rm{kWh}}\end{aligned}$$
(14)

The carbon credits cost is equal to \({C}_{CC}\) =24.84 EUR/Tons of CO2 (average price in 2020 (IETA 2020)).

3. Results

3.1. 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):

$$S=\eta \cdot N\cdot {P}_{0}\cdot \Delta {t}_{i}\cdot \left({C}_{E}+{{\rm CO}}_{{2}_{em}}.{C}_{CC}\right)=0.7\cdot 252\cdot 0.330\cdot 1929.6\cdot \left(0.1+24.84\cdot 0.00065058\right)=18639.5 {\rm EUR}.$$
(15)

And the total costs to be minimised are (Eq. 16):

$$C\left(t\right)=+173107.86\cdot {e}^{-0.02t}+{\int}_{\!\!\!0}^{t}2000\cdot {e}^{0.1\cdot t}\cdot {e}^{-0.02\cdot t}\cdot dt-{\int}_{\!\!\!0}^{t}252\cdot 0.1\cdot 1929.6\cdot 0.33{\cdot {e}^{-0.004462t}\cdot e}^{-0.02\cdot t}dt-{\int}_{\!\!\!0}^{t}252\cdot 24.84\cdot 0.00065058\cdot 1929.6\cdot 0.33{\cdot {e}^{-0.004462t}\cdot e}^{-0.02\cdot t}dt = +173107.86\cdot {e}^{-0.02t}+2000\cdot {\int}_{\!\!\!0}^{t}{e}^{+0.08\cdot t}\cdot dt-18639.49\cdot {\int}_{\!\!\!0}^{t}{e}^{-0.024462t}.$$
(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 rest of the costs are cumulative (i.e. costs that are added 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.

Fig. 1
figure 1

Total costs are estimated using the presented model in this research

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).

$${t}_{r}^{*}=-\frac{1}{\alpha }\mathit{ln}\left(\frac{M\cdot {e}^{\beta \cdot t}-r{I}_{0}}{S}\right)=-\frac{1}{004462}\mathit{ln}\left(\frac{2000\cdot {e}^{0.1\cdot t}-0.02\cdot 173107.86}{18.64}\right).$$
(17)

And the minimum cost is calculated as follows (Eq. 18):

$$C\left(t\right)=+173107.86\cdot {e}^{-\mathrm{0.02.23.16}}+{\int}_{\!\!\!0}^{23.16}2000\cdot {e}^{0.08\cdot t}\cdot dt-{\int}_{\!\!\!0}^{23.16}18639.49\cdot {e}^{-0.024462t}= 108,929.79 + 134,448.85 - 329,569.20 = -86191 EUR.$$
(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.

3.2. 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).

Fig. 2
figure 2

Total costs considering and not considering emissions costs

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 \(\alpha =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.

Fig. 3
figure 3

Influence of the photovoltaic power degradation over time

3.3. 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 \(\Delta {t}_{i}\).

Fig. 4
figure 4

Influence of the project location using the climate station of Sagra and crossed with our model

3.4. 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.

Fig. 5
figure 5

Influence of the equivalent continuous discount rate

The exponential model to know the evolution of these costs over time considers \({\beta }_{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 \({\beta }_{i}\) from 0 to 0.2 years−1).

Fig. 6
figure 6

Influence of the maintenance cost

3.5 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 decision-maker 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):

$${C}_{1}\left(t\right)=\left(\left({\int}_{\!\!\!0}^{{t}_{l}}\left(\frac{{C}_{L}}{{t}_{l}}\right)dt\right)+\left({\int}_{\!\!\!0}^{{t}_{l}-1}\left({C}_{L}-\left(\frac{{I}_{0}}{{t}_{l}}\right)\right)\cdot i\cdot dt\right)\right){e}^{-r\cdot t}={{I}_{0}^{*}\cdot e}^{-r\cdot t}$$
(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 decision-maker 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).

Fig. 7
figure 7

Influence of interest rate on loans

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).

Fig. 8
figure 8

Influence of interest rate on loans on the total costs of solar power systems

3.6 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.

Table 2 Summary of the sensitivity analysis

4. 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 CO2 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 (\(\alpha \) = 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 \(\alpha =\) 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 \(\alpha =\) 0.02 and \(\alpha =\) 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 (\(\alpha =\) 0 and \(\alpha =\) 0.05, respectively) (Fig. 3). Even for a large degradation rate such as \(\alpha =\) 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 (\(\alpha =\) 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 \(\alpha \) 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 \({\beta }_{i}\)), the optimal renovation time reduces. If \({\beta }_{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 \(\left(M\cdot {e}^{\beta \cdot t}-r{I}_{0}\right)>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).

5. 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:

  1. (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).

  2. (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

  3. (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).

  4. (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.

  5. (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.

  6. (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.

  7. (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).