The smart control of the biogas-hydrogen engine is needed to improve the overall energy efficiency of the hybrid renewable energy system. The paper presents some simulation results of the optimal control parameters of the engine aiming to achieve the compromise between performance and pollutant emissions of the biogas-hydrogen engine. In neat biogas fueling mode, the optimal equivalence ratio changes from 1.05 to 1.01 as the CH4 composition in biogas increases from 60% to 80%. By adding 20% hydrogen into biogas, the optimal equivalence ratio practically reaches the stoichiometric value, despite the variation of CH4 concentration. At the same operating condition and hydrogen content, an increase of 10% CH4 in biogas leads to a decrease of 2 degrees CA in the optimal advanced ignition angle. However, at a given engine speed and biogas composition, the optimal advanced ignition angle decreased by 3 degrees CA when adding 10% hydrogen into biogas. The optimal ignition angle is independent of the load regime. Under optimal operating conditions, the addition of 20% hydrogen content into biogas is found to improve the indicated engine cycle work by 6%, to reduce CO and HC emissions by 5-10 times; however, it increases NOx emission by 10-15% compared to neat biogas fueling mode. (C) 2022 Elsevier Ltd. All rights reserved.