A Unified Lyapunov Setting for Continuous and Discrete Time Sliding Mode Control