Control Synthesis of Switched Systems