Active fault-tolerant control for switched systems with time delay