A theory of a D-type optical fiber sensor based on the Kretchmann's configuration and heterodyne interferometry is proposed. In the paper, we try to design a D-type optical fiber sensor, which is the Kretchmann's configuration of a three-layer scheme, and