Task-dependent switching of feedback controllers