You are here

Low-Speed Hall Interpolation Performance Issues

1 post / 0 new
cpaterson
Offline
Last seen: 1 day 14 hours ago
VESC Free
Joined: 2025-12-05 01:07
Posts: 1
Low-Speed Hall Interpolation Performance Issues

I'm trying to debug an issue I'm having with low electrical/mechanical rotational speed, speed control, running the VESC Labs Maxim 120V model which I believe runs on FW version 6.06. I'm controlling a internal permanent magnet motor, which is running hall sensor based rotor position sensing. The motor has 8 poles. I'm trying to run as low as 10 RPM mechanical, so 40 ERPM on a dynamometer setup. Obviously, there are challenges with running at this speed associated with the influence of changing friction/external torque with position, and the corresponding lack of inertia to overcome these conditions, but aside from that, I'm encountering what I believe to be a bug with hall interpolation in the VESC motor control firmware. Below is a plot of motor phase in purple vs hall state, running at a 1000 ERPM setpoint, with interpolation set to start at 10 ERPM:

1000 ERPM halls vs phase.png

Three things can be observed. One, that the FOC motor phase jumps ~90 degrees at one point in a complete commutation cycle. Two, that at the hall transitions, there is a small amount of leveling of the FOC motor phase signal. Three, that the interpolation is significantly underpredicting the rotation speed of the rotor, resulting in the need for the FOC motor phase signal to jump significantly to resolve this discrepancy created. 

Digging into the codebase, it appears that the problem may arise in this code block within foc_math.c.

image-20260126-014733.png

Here, it appears that the configurable interpolation startpoint RPM is being fed into a fmax function that is used to set the maximum rate of change of the estimated rotor angle. This is inconsistent with the tooltip in the VESC Tool, shown here:

image-20260126-014855.png

What further supports this theory is some testing at different interpolation startpoint values, this test was done at 3k ERPM as a value, with the same 1k ERPM speed setpoint:

image-20260126-015327.png

You can see the significantly steeper slope of the hall interoplation, with it consistently being capped by the current hall state. 

It was also possible to "tune" the interpolation value to get an output I would expect, here with 700 ERPM interpolation, 1k ERPM speed setpoint:

image-20260126-015608.png

I'm hoping that someone with more experience with the VESC codebase can provide some feedback here. Is there a history of issues with hall interpolation? Does it make sense that this code is driving this bug? Can anyone confirm that the VESC Labs controllers are running 6.06?

Also, if anyone has experience with doing this type of operation, and has recommendations for any tuning to improve this low speed speed control performance, that would be appreciated.