Controlling the acceleration or deceleration