Modelling and experimental studies of properties of TiN coatings