Adaptive control for a class of nonlinear systems with a time-varying structure