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- third-order PLL, and (A3) compensation + adaptive- 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 bounds. These results are reported for this prototype and the tested parameter settings.
Hierarchical Takagi–Sugeno–Kang (TSK) fuzzy classifiers combine nonlinear modeling with rule-based decision structures for complex classification tasks. However, prediction errors may propagate through successive layers, and the contributions of different layers require careful consideration when combining their outputs. These limitations motivate a learning strategy that incorporates inter-layer information and adjusts layer contributions. This study proposes a hierarchical TSK fuzzy classifier with adaptive error compensation (DAE-TSK-FC). The adaptive error compensation mechanism incorporates prediction differences between successive layers into subsequent layer inputs while retaining supervision from true labels. A soft relaxation-based output ensemble strategy combines supervised base coefficients with output-dependent adjustments to determine the weights assigned to different layers. Experiments compare DAE-TSK-FC with five benchmark classifiers on six UCI datasets and three real-world rice wine fermentation datasets. The proposed method achieves the highest mean testing accuracies on Iris, FJ-BJ-PCI, and FJ-BQ-PCI, reaching 98.38%, 96.25%, and 92.67%, respectively, and exhibits the smallest testing-accuracy standard deviations on Iris and FJ-BJ-PCI. Moreover, the proposed model preserves the interpretable structure of TSK fuzzy rules, allowing its predictions to be explained through the semantic meanings of fuzzy antecedents and the contributions of rule consequents.