According to the detection principle, the encoder can be divided into optical, magnetic, inductive and capacitive. According to its scale method and signal output form, it can be divided into three types: incremental, absolute and hybrid. 1.1 Incremental encoder Incremental encoder directly uses the principle of photoelectric conversion to output three sets of square wave pulses A, B and Z phase; A and B pulses have a phase difference of 90. , So that the direction of rotation can be easily judged, and the Z phase is one pulse per revolution, which is used for reference point positioning. 1.2 Absolute encoder The absolute encoder is a sensor that directly outputs numbers. There are several concentric code discs along the radial direction on its circular code disc. Each track consists of light-transmissive and opaque sectors. The sector trees of adjacent code channels are in double relationship. The number of code channels on the code disc is the number of binary digits. On one side of the disc is the light source, and the other side has a photosensitive element corresponding to each code channel. When the disc is in different positions, each photosensitive element converts the corresponding level signal according to whether it receives light or not to form a binary number. 1.3 Hybrid absolute encoder The hybrid absolute encoder outputs two sets of information, one set of information is used to detect the magnetic pole position, with absolute information function; the other set is exactly the same as the output information of the incremental encoder.