rhc input function for switched systems