## 4 Discussion  
Five real cases with different consumption profiles have been studied, from an economic point of view, through simulations of standalone energy systems. The results show that in both 100% PV and PV-diesel hybrid systems, the use of lead-acid or Li-ion batteries results in different sizing of the economic optimum system. In other words, if the type of battery is changed, to achieve the economic optimum the entire system must be resized. This different size of the system elements affects the capacity of the battery, the power of the PV generator and, in hybrid systems, the fuel consumption. Consequently, for each case, the optimum system (and its NPC) is different for each type of battery. A lower NPC means a lower cost of the system throughout its lifetime, i.e., a higher profitability. Thus, of both optimum systems, with a lead-acid or Li-ion battery, the one that presents the lowest NPC should be considered the absolute optimum and the type of battery that it includes is the best option from an economic point of view. In all cases of this study, Li-ion batteries have shown a longer lifetime, between +18% and +113% over lead-acid ones. This result is consistent with the estimate [26] that lithium-ion battery lifetime can double that of lead-acid batteries. The cases in which lead-acid batteries have shown a shorter useful life are both homes (single-family home and second home), in accordance with the results of a previous study focused on their aging [11]. Consequently, it is in them where the improvement in terms of lifetime is greater when changing to a Li-ion battery. Furthermore, in all cases, the Li-ion battery has lower capacity than the lead-acid battery in their optimum systems. This result is in accordance with a previous study [2] based on the charge and discharge characteristics of both battery types. Differences in capacity range between \(-7\%\) and \(-92\%\). Both longer lifetime and less capacity, play in favor of its profitability. However, in the cases studied, it has not been found that the increase in lifetime or the reduction in capacity is enough for Li-ion batteries to displace lead-acid ones. Moreover, its use entails differences in other costs of the system. The behaviors observed in PV and hybrid systems show similarities, but relevant differences. In PV systems the battery capacity reductions due to incorporating Li-ion are between \(-7\%\) and \(-67\%\), while in hybrid systems they are between \(-21\%\) and \(-92\%\). These battery capacity reductions are accompanied by changes in generation. In PV systems, the power of PV generator changes, resulting in large changes in the amount of excess energy. On the contrary, in hybrid systems the fuel consumption changes, while the power of the PV generator and the excess energy hardly vary. It should be noted that generation is  
Figure 18: Sensitivity analysis on the NPC of the optimal systems with lead-acid and Li-ion batteries for the pig farm case, based on the solar irradiation: (**a**) PV system; (**b**) Hybrid system. not always higher when using Li-ion batteries, since in some of the study cases reductions in the power of the PV generator or in fuel consumption have been observed. Furthermore, in four of the five case studies, both in PV and hybrid systems, the amount of energy cycled in the battery has barely changed, despite the changes in battery capacity and generation. With respect to the economic comparison of the optimum systems with both types of battery in each case, differences are found between the studied cases. In PV systems the differences in NPC range between \(-16\%\) and \(+22\%\), with the Li-ion battery being the most profitable in one case. This corresponds to the second home. In hybrid systems, the differences in NPC range from \(-7.2\%\) to \(+5.9\%\), with the Li-ion battery being the most profitable in two cases. These correspond to the two homes studied, the second home and the single-family home.