磁编码器是一种基于磁阻效应或霍尔效应的轴角传感器,输出信号是转子角位置的正余弦函数。为获取转子角位置和角速度信息,设计了一种基于状态观测器的磁编码器解调算法。理论分析表明,当伺服电机匀速旋转时,基于二阶和三阶状态观测器的解调算法误差均可渐近收敛至零;当伺服电机匀加速或匀减速旋转时,前者存在原理性偏差,而后者解调误差依然可以渐近收敛至零。与反正切法相比,该算法不需通过数值差分即可获得角速度信息,具有较强的干扰抑制能力。与基于锁相环的角度跟踪法相比,该算法考虑了电机的转速变化,角位置和角速度解算精度较高。实验结果表明,该解调算法是可行的。
Magnetic encoder was a kind of rotary sensors based on magnetoresistance effects or Hall effects,and it could output two orthogonal signals which were sine or cosine functions of the rotor angular position.In order to obtain the rotor angular position and velocity information,a state-observer-based algorithm was presented to demodulate output signals of the magnetic encoder.Theoretical analysis showed that both the second-order state observer and the third-order one could make the demodulation error converge to zero asymptotically when the motor rotated under constant speed.Once the motor speed varied uniformly,the demodulation error of the former algorithm would exist bias in principle and the latter still could converge to zero asymptotically.Comparing with the arc-tangent method,this algorithm could obtain angular velocity information without needing differential operator,thus had a strong ability to suppress random disturbances.Comparing with the phase-locked loop tracking method,this algorithm could obtain angular position and velocity with higher precision since the variation of the motor speed was taken into consideration.Experimental results indicated that the demodulation algorithm present above was feasible.