Position controll with Hall encoders only

Hi,

I’m trying to understand if I can expect reasonable performance in closed loop position control using only hall encoders? My candidate motor is 7 pole pairs and has hall sensors, and will be going through a 16:1 gearbox. I can actually tolerate several degrees error in the gearshaft output, but I do need the full torque/speed performance of the motor. I guess my question is, is this even possible (position control without incremental/absolute encoder), and what kind of performance I can expect?

More broadly, the motivation here is that I can’t fit my own absolute encoder onto the motors I’m considering. Some of the motors I’m looking at do come with incremental encoders. My experience of BLDC control using ODrives is that you can do great position control but you need to find the index pulse first, and that won’t work for this application (I understand simpleFOC has the same requirement when using incremental encoders). Interestingly I have also used Roboteqs in the past, and somehow they’re able to do position control without doing an index pulse hunt on startup. I understand that another solution to this problem is an absolute encoder, but as I said that’s not an option for me this time.

Thanks in advance for any help/pointers!

Cheers,

Luke

Yes, it works reasonably well. I recommend doing this:

  // Don't try to stop between cogging steps
  if (motor.controller == MotionControlType::angle) {
    const float c = _PI_3/motor.pole_pairs;
    target = floor(target / c + 0.5f) * c;
  }

Otherwise it tends to oscillate if the target is half way between steps.

Can’t say for sure about torque but theoretically it should be >86% of ideal at all times since halls are accurate within ±30 electrical degrees and cos(30)=.866. And if you run it through SmoothingSensor, it will give angle accuracy almost as good as a high resolution encoder once it’s moving enough to get a velocity reading.

2 Likes

I have a question on the same topic. I also want to use closed loop position control with only hall sensors. I have a Maxon 608132 motor with 8 poles plus a gearbox with a 111:1 ratio. That means more than enough resolution at the end of the shaft for me. I only want to use the built-in hall sensors without an additional encoder.

The whole thing works very well. There is just one problem. The motor oscillates when it is not moving. Is there a way to suppress that? Maybe with control parameters? Unfortunately, the code posted does not work. It would be great if someone could help me and give me some tips on how to do this.