Simulated diffraction on TiN coatings with gradients