RT journal article T1 Analysis and optimisation of collective self-consumption in residential buildings in Spain A1 Gil Mena, Antonio José A1 Nasimba Medina, Víctor Fernando A1 Bouakkaz, Abderraouf A1 Haddad, Salim A2 Ingeniería Eléctrica K1 Collective self-consumption K1 Building K1 Techno-economic analysis K1 Cost of energy K1 Net billing K1 Residencial sector AB Studies on self-consumption in residential use are constantly evolving, and society claims new solutions in response to changes to new paradigms. This paper aims to optimise the sizing of a self-consumption installation for collective self-consumption in a residential building under the Spanish regulatory framework. The study considers the current price volatility in the retail electricity Spanish market and focuses on the techno-economic analysis of self-consumption in a building consisting of 12 dwellings using photovoltaic energy and the possible support of a storage system. The three aspects analysed are the sizing of the self-consumption facility, the use of smart appliances to shift their consumption to more cost-effective times and the sharing of the renewable energy generated by the facility among the consumers participating in the collective self-consumption. This study employs two models, an average-day model and a whole-year model. The techno-economic analysis yields that between the two self-consumption modalities for residential consumption, the modality with surplus simplified compensation is more profitable than the one without surpluses. Finally, the study focuses on sharing the total renewable energy generated among the participants. The results indicate that both ex-ante and ex-post dynamic sharing brings few benefits. PB Elsevier SN 0378-7788 YR 2023 FD 2023-03-15 LK http://hdl.handle.net/10498/27916 UL http://hdl.handle.net/10498/27916 LA eng DS Repositorio Institucional de la Universidad de Cádiz RD 10-may-2026