The invention discloses a decoding method for sine and cosine output signals of a TMR magnetic resistance angle sensing
chip, and the method comprises the following steps: 1, setting the TMR magnetic resistance angle sensing
chip, and obtaining the rotation amount of a rotating part to be detected through the TMR magnetic resistance angle sensing
chip; step 2, the TMR magnetic resistance angle sensing chip converts the rotation amount into a sine
signal and a cosine
signal, and transmits the sine
signal and the cosine signal to a processor unit; step 3, the processor unit processes the sine signal to obtain a sine value, processes the cosine signal to obtain a cosine value, and transmits the sine value and the cosine value to an angle
phase difference calculation module, and the angle
phase difference calculation module combines a feedback angle to calculate a difference value signal; 4,
processing the difference value signal through a
PID regulator to obtain a rotating speed signal; 5,
processing the rotating speed signal through an
integrator to obtain an angle signal; and 6, transmitting the angle signal as a feedback angle to an angle
phase difference calculation module, and circulating the steps 1-5 to obtain a rotating speed signal and an angle signal in real time. And a rotating speed signal and an angle signal are obtained through closed-
loop control. Closed-loop
feedback control is adopted, obtained angle and speed information has the advantages of being high in precision, small in phase difference and the like, meanwhile, the problems of high-speed compensation and low-speed compensation are solved, and unification of
signal processing algorithms is achieved.