Quaternion based sliding mode attitude control design for spacecraft