Abstract: The aim of this project is to carry out the study of obtaining energy from the application of renewable energy sources such as biogas and biomass. There will be analyzed two examples to obtain heat and power, a heating plant and a biogas plant. In the first one is about a boiler plant, with a simple existing boiler with a mechanical grate boiler for the co-firing of coal and biomass in different mass proportions and then compare the obtained results with the case of the combustion of the coal. The biomass used will be gray straw pellets that are better than yellow straw, because of the lower content of alkali metal compounds, and willow chips. To compare the different cases will be calculated the properties of the biofuel, the amount of compounds in the fuel, the oxygen demand, the rate of consumed fuel, the emission to atmosphere of some flue gases and the evaluation of the fuel costs. In the second one will be analyzed a biogas plant to cogenerate heat and power from organic waste from a cattle farm. To determinate if this installation is profitable or not it will have to be calculated the amount of thermal power and electricity generated in the plant, the revenues obtained from the sales of electricity and heat production, the incomes from green and yellow certificates and from waste disposal per year. On the other hand there are outgoings from investments, operating costs, maintenance costs and ownership costs.