A plant controller controls a plant modeled in a discrete-time system. The controller
uses a frequency-shaping response-designating control algorithm having a filtering
function to cause a difference between output of the plant and a target value to
converge. Thus, the plant is robustly controlled without causing undesired frequency
components. When the plant is an engine, the engine is modeled using a ignition
timing corrective quantity as input and a rotational speed as output. The controller
performs the frequency-shaping response-designating control algorithm to determine
the ignition timing corrective quantity. The frequency-shaping response-designating
control may be frequency-shaping sliding-mode control. In one embodiment, the control
input into the plant may includes a corrective term for stabilizing an internal
variable of the filter, a corrective term for stabilizing the difference between
the output of the plant and the target value and a corrective term that varies
depending on a switching function.