Close

Theoretical and real positioning accuracy

A project log for CLN17 V2: $12 BoM Closed-Loop Driver for NEMA17

A compact, silent, high-performance open-source closed-loop (servo) stepper motor driver with USB, CAN-FD and 48V support

anton-khrustalevAnton Khrustalev 09/26/2023 at 13:503 Comments

The motor driver allows for position control down to a microstep of 1/256 (<0.01°), while the encoder has a maximum resolution of 15 bits (0.01°). Although theoretical accuracy should be close to 0.01°, it is not achievable in practice due to four factors:

  1. Motor imperfections: The construction of stepper motors commonly causes step size deviations of 2-5% in the degree measure.
  2. Step interpolation non-linearity: Increased difficulty in positioning is caused by a significant torque decrease with interpolation increase, in combination with the mechanical nonlinearities of the mechanical construction.
  3. Encoder imperfections: The effective resolution may be less than 15 bits due to nonlinearity of encoder measurements, variations in operating temperature, or interference with external magnetic fields.
  4. Magnet imperfections: The magnetic field profile created by the magnet may not rotate correspondingly to the encoder's center because of potential misalignment of the magnet and the shaft or manufacturing defects of the magnet itself.

To achieve optimal motor performance at the maximum effective resolution, it is not recommended to exceed an interpolation of 1/64 of a full step, with an optimal limit of 1/32. Exceeding these limits can lead to a significant loss in torque without any improvement in positioning accuracy, due to mechanical nonlinearities. To maintain the encoder's linearity and minimize noise, the minimum usable resolution should not exceed half of the full resolution, resulting in a maximum resolution of 14 bits.

As a result, the maximum approximately linear actual positioning resolution is 12,800 positions per revolution, and the actual position control resolution is 16,384 positions per revolution (0.02° step). Assuming this, the closed-loop system operates as expected and is capable of error-free shaft position correction.

Resolution at high speeds and loads

For high-speed or high-torque applications, it is not recommended to exceed a positioning resolution of 1/32 of a full step or 6,400 steps per revolution.

Discussions

TCWilliamson wrote 10/31/2023 at 08:17 point

Great project - but on this post it would probably be worth mentioning the limitations of the encoder chips accuracy in greater detail
Per the TLE5012B Datasheet, the overall angle error is, with auto calibration enabled, 0.6 typical, and up to 1 degree of error. Up to 1.9 degrees without autocalibration.
The main limitation of magnetic on-axis encoders is their horrific accuracy.


  Are you sure? yes | no

Anton Khrustalev wrote 10/31/2023 at 17:33 point

Yes, this problem does exist. The TLE5012 itself is one of the best encoders out there, apart from some cool solutions from Magntek. So for compact cheap variants it is the best solution imho.

But to be fair, there are not many alternatives. For stepper motors you can get quite high resolution and repeatability when encoder calibration is tied to full motor steps.
But what you're talking about is more about linearity of measurement, and that's a problem, but compared to open-loop stepper motors the situation is much better.

Btw, in the improved version it will be possible to connect an external incremental abz encoder)

  Are you sure? yes | no

TCWilliamson wrote 10/31/2023 at 18:53 point

I'd worry about deviation in the known angle as the motor heats up, as that is an addition effect (there's a graph for Error against Delta-T in the datasheet) I'm curious how much of an effect that has, as it could easily end up being a significant amount of a single step. This would be a bigger problem for FoC, which I don't think you're up to here.

  Are you sure? yes | no