A method and system for controlling an engine includes a spark ignition
(SI) control module operating the engine in a spark ignition mode in a
high lift valve state and a pre-HCCI control module entering a matching
state when homogeneous charge compression ignition (HCCI) mode conditions
are met. When a matching condition is met, the pre-HCCI control module
enters a pre-homogeneous charge compression ignition mode and performs
spark retardation, stratified operation or lean operation and commands a
low lift valve state. The system also includes an HCCI control module
entering an HCCI mode and when in the low lift valve state.