MA730 torque mode: Motor reverses when blocked

In SimpleFOC, I used two types of magnetic encoders. One has the marking “AVQJ,” but I’m not sure what model it is—it works perfectly at both low and high speeds. The other one is marked “AZAJ,” which should be the MA730. This encoder works fine at low speeds but has issues at high speeds. In voltage-controlled torque mode, when I stop the motor from rotating at high speed, the motor briefly spins in reverse before rotating forward again. It even starts oscillating, causing the motor to spin back and forth automatically.

I suspect that when the motor is forced to stop abruptly during high-speed rotation, the rapid deceleration causes incorrect encoder readings.

That sounds more like a PID tuning problem than a sensor problem. The graph looks ok to me. The sensor reading is increasing when velocity is positive, and decreasing when velocity is negative. Try decreasing motor.PID_velocity.I and P

Now that I think about it, the velocity is calculated from the rate of change of the sensor reading, so there’s no way they could be mismatched in the graph even if they are in reality.

Post your code so we can rule out any software problems. Double check the magnet is rigidly mounted to the shaft. People have gone insane from slightly loose magnets in the past :slight_smile:

Hi @lg28702426 , welcome to SimpleFOC!

It sounds a bit like this could be a filtering issue. What cutoff frequency is the filter set to?