Resumen: The adoption of energy systems powered by renewable sources requires substantial economic investments. Hence, selecting system components of an appropriate size becomes a critical step, which is significantly influenced by their distinct characteristics. Furthermore, the availability of renewable energy varies over time, and estimating this availability introduces considerable uncertainty. In this paper, we present a technique for the optimal design of hybrid energy systems that accounts for the uncertainty associated with resource estimation. Our method is based on stochastic programming theory and employs a surrogate model to estimate battery lifespan using a feedforward neural network (FFNN). The optimization analysis for system design was conducted using a genetic algorithm (GA) and the poplar optimization algorithm (POA). We assessed the effectiveness of the proposed technique through a hypothetical case study. The introduction of a surrogate model, based on an FFNN, resulted in an approximation error of 9.6 % for cost estimation and 20.6 % for battery lifespan estimation. The probabilistic design indicates an energy system cost that is 25.7 % higher than that obtained using a deterministic approach. Both the GA and POA achieved solutions that likely represent the global optimum. Idioma: Inglés DOI: 10.1016/j.renene.2024.120540 Año: 2024 Publicado en: Renewable Energy 227 (2024), 120540 [17 pp.] ISSN: 0960-1481 Financiación: info:eu-repo/grantAgreement/ES/AEI/PID2021-123172OB-I00 Financiación: info:eu-repo/grantAgreement/EUR/AEI/TED2021-129801B-I00 Tipo y forma: Artículo (Versión definitiva) Área (Departamento): Área Ingeniería Eléctrica (Dpto. Ingeniería Eléctrica)