A Structural Approach to the Control of Switching Systems with an Application to Automotive Engines