PURPOSE: To effectively suppress suppress knocking by reducing the internal EGR quantity by controlling an exhaust flow adjusting means so that exhaust pressure is lowered when knocking is detected, in an engine controller equipped with an exhaust flow adjusting means for changing the exhaust flow state with the variation of the back pressure.
CONSTITUTION: The downstream side of an exhaust passage 17 is divided into two branched exhaust passages 21 and 22, and mufflers 23 and 24 are installed in the respective branched passages 21 and 22, and a control valve 25 is installed in the first branched passage 21 on the upstream side of the first muffler 23. When the control valve 25 is closed, exhaust gas flaws only to the second muffler 24 side, and when the control valve 25 is opened, exhaust gas flows to both the mufflers 23 and 24. In an engine equipped with a variable silencer (exhaust flow adjusting means), if knocking is detected by a knocking sensor 38 in the region on the relatively high revolution side, an ECU 36 changes the control valve 25 to an opened state, and the temperature in a combustion chamber is lowered, and knocking is suppressed.