Degradation of TiN coatings under cyclic loading