For a class of switching motion control systems, in particular scanning stage systems, a self-tuning method is proposed to find the optimal switching control parameters. In this method, a combined model/data-based approach is used to derive the gradients with respect to these parameters. The gradients are used in an update scheme which subsequently renders an updated set of parameters. Each set is applied to the machine while operating under closed-loop conditions. By repeating the process, the switching control parameters show convergence to an optimized set of values that induce servo performance inaccessible to linear control. This is because high-gain feedback is incidentally switched on to suppress large amplitude oscillations and is o...