This study investigates the effects of biogas composition on combustion stability for a purely biogas fueled HCCI engine. Biogas is one of the most promising renewable fuels for Combined Heat and Power systems driven by internal combustion engines. However, the high content of CO2 in biogas composition leads to low thermal efficiencies in spark ignited and dual fuel compression ignited engines. The study is divided into two parts: first experimental results on a biogas-fueled HCCI engine are used to validate a numerical model, and second the model is used to investigate how biogas composition impacts combustion stability. In the first part of the study, experimental analysis of a 4 cylinder, 1.9 L Volkswagen TDI Diesel engine running with biogas in HCCI mode has shown high gross indicated mean effective pressure (close to 8 bar), high gross indicated efficiency (close to 45%) and ultra-low NOx emissions below the US2010 limit (0.27 g/kWh). An inlet absolute pressure of 2 bar and inlet temperature of 473 K (200°C) were required for allowing HCCI combustion with a biogas composition of 60% CH 4 and 40% CO2 on a volumetric basis. However, slight changes in inlet pressure and temperature caused large changes in cycle-to-cycle variations at low equivalence ratios and large changes in ringing intensity at high equivalence ratios. A numerical model is validated against these experimental results. In the second part of the study, the numerical results for varied biogas composition show that at high load limit, higher contents of CH4 in biogas composition allow advanced combustion and increased burning rates of the biogas air mixture. Higher contents of CO2 in biogas composition allow lowered ringing intensities with moderate decrease in the indicated efficiency and power output. NOx emissions are not highly affected by biogas composition, while CO and HC emissions tend to increase with higher contents of CO2. According with the numerical results, biogas composition is an effective strategy to control the onset of combustion and combustion phasing of HCCI engines running biogas, allowing more stabilized combustion at low equivalence ratios and safe operation at high equivalence ratios. The main advantages of using biogas fueled HCCI engines in CHP systems are the low sensitivity of power output and indicated efficiency to biogas composition, as well as the ultra low NOx emissions achieved for all tested compositions.