A Combined Error-Compensation and Adaptive Third-Order PLL Demodulation Method for TMR-Based Magnetic Encoders
Yue Xin, Jia Cui, Haifeng Wei, Li Lui · Electronics · 2026
TMR-based magnetic encoders provide sensitive SIN/COS signals, but practical accuracy is degraded by channel mismatch and decoder dynamics. This study evaluates an end-to-end embedded implementation on a PMSM (Permanent Magnet Synchronous Motor) bench. We consider amplitude mismatch, quadrature non-orthogonality, and harmonic/noise disturbances in the measured differential channels. We implement a lightweight compensation chain, including fixed-window moving-average filtering, min–max amplitude normalization, and correlation-based quadrature identification with sample-shift correction. We then compare four demodulation configurations under identical sampling and reference alignment to a 24-bit encoder: (A0) conventional second-order PLL (phase locked loop), (A1) compensation + open-loop atan2, (A2) compensation + fixed-ωn third-order PLL, and (A3) compensation + adaptive-ωn third-order PLL. Experiments with a TMR3081 sensor and an STM32 controller show clear differences among A0–A3. In steady operation, A3 removes the DC bias observed with A0 and keeps the angle error within approximately ±0.3° in the evaluated steady window. During commutation and ramp-like segments, PLL-based tracking (A0/A2/A3) is more robust than open-loop atan2 (A1), and bandwidth adaptation in A3 improves the acquisition–noise trade-off within the preset ωn bounds. These results are reported for this prototype and the tested parameter settings.