Abstract:Aiming at the low decoding accuracy caused by various errors in the magnetic encoder, a single-layer adaptive neural network is proposed based on the principle of neural network to compensate the errors such as amplitude inequality, phase non-orthogonality, DC bias, harmonic and noise in the sine and cosine signals. The phase-locked loop algorithm is used to decode the compensated sine and cosine signals. In the circuit, the TLE5501 magnetoresistance chip is used to detect the change of angle, the TL082C operational amplifier chip is used to adjust the signal, and the STM32G431 single chip computer is used to verify the performance of the algorithm. The effectiveness and feasibility of the algorithm are verified by simulation and experiment.