[ES] El presente Trabajo Fin de Máster permitirá aplicar los conocimientos adquiridos en el Máster Universitario en Tecnologías Energéticas para el Desarrollo Sostenible, así como afianzar lo aprendido en el Grado en Ingeniería de la Energía. Este proyecto, realizado en colaboración con una empresa valenciana de ingeniería de proyectos energéticos, trata de dar una solución de valorización de residuos con alto contenido orgánico. Estos residuos provienen de dos líneas diferenciadas: por un lado, hay residuos agrícolas (frutas y verduras no aptas para consumo, restos de poda, restos ganaderos ) y por otro hay una línea de restos alimentarios (restos de supermercados o de hostelería). En el proyecto se propone una planta de valorización de residuos que consiste en un pretratamiento en el que se adecúan los residuos antes mencionados para las fases posteriores; después se realiza digestión anaerobia donde se obtiene biogás. Este gas, con un 54% de metano y un 46% de CO2, puede ser valorizado en un motor de cogeneración para producir electricidad y energía térmica, y en una planta de upgrading (biometanización), donde se purifica hasta tener un 99% de metano, permitiendo su inyección a red de gas con una pureza superior a la del Gas Natural convencional. Debido a que este proceso de biometanización requiere gran cantidad de energía térmica, se incluye una caldera a biogás para aportar ese calor necesario. Por otro lado, de la digestión se obtiene un residuo líquido con alto contenido en nitrógeno que no puede ser proyectado al campo sin ser tratado previamente. Por tanto, se propone un sistema de tratamiento del digerido con el objetivo de gestionar adecuadamente este residuo., [EN] This Master's Thesis allows applying the acquired knowledge in Master's Degree in Energy Technologies for Sustainable Development, as well as to consolidate what has been learned in in Energy Engineering Degree. This project, carried out in collaboration with a Valencian engineering company for energy projects, tries to provide a solution for the recovery of waste with a high organic content. This waste comes from two differentiated lines: on the one hand, there are agricultural residues (fruits and vegetables not suitable for consumption, pruning waste, livestock remains ...) and, on the other hand, there is a line of food waste (supermarket or hospitality remains). The project proposes a waste recovery plant that consists of a pre-treatment in which the aforementioned waste is adapted for the subsequent phases; then anaerobic digestion is performed where biogas is obtained. This gas, with 54% methane and 46% CO2, can be upgraded in a cogeneration engine to produce electricity and thermal energy, and in an upgrading plant (biomethanization), where it is purified until it has 99% methane, allowing its injection into the gas network with a purity superior to that of conventional natural gas. Because this biomethanization process requires a large amount of thermal energy, a biogas boiler is included to provide that necessary heat. On the other hand, digestion produces a liquid waste with a high nitrogen content that can not be projected to the field without being previously treated. Therefore, a digested treatment system is proposed with the objective of managing adequately this residue., [CA] This Master's Thesis is designed to demonstrate the acquired knowledge in Master's Degree in Energy Technologies for Sustainable Development, as well as to consolidate what has been learned in in Energy Engineering Degree. This project, carried out in collaboration with a Valencian engineering company for energy projects, tries to provide a solution for the recovery of waste with a high organic content. This waste comes from two differentiated lines: on the one hand, there are agricultural residues (fruits and vegetables not suitable for consumption, pruning waste, livestock remains ...) and, on the other hand, there is a line of food waste (supermarket or hospitality remains). The project proposes a waste recovery plant that consists of a pre-treatment in which the aforementioned waste is adapted for the subsequent phases; then anaerobic digestion is performed where biogas is obtained. This gas, with 54% methane and 46% CO2, can be upgraded in a cogeneration engine to produce electricity and thermal energy, and in an upgrading plant (biomethanization), where it is purified until it has 99% methane, allowing its injection into the gas network with a purity superior to that of conventional natural gas. Because this biomethanization process requires a large amount of thermal energy, a biogas boiler is included to provide that necessary heat. On the other hand, digestion produces a liquid waste with a high nitrogen content that can not be projected to the field without being previously treated. Therefore, a digested treatment system is proposed with the objective of "cleaning" this residue.