SBAA539 March   2022 TMAG5170 , TMAG5170-Q1 , TMAG5173-Q1 , TMAG5273

 

  1.   Trademarks
  2. 1Introduction
  3. 2Magnet Selection
    1. 2.1 Placement Considerations
    2. 2.2 Magnet Properties
  4. 3Measurement Non-Linearity
  5. 4Mechanical Error Sources
  6. 5Signal Chain Errors
  7. 6Calibration Methods

Calibration Methods

To combat the non-linearities which are unique to any system, it is often necessary to implement calibration to ensure the highest precision results. While efforts to address mechanical or electrical errors prior to performing the arctangent calculation will produce the most linear results, often it is not practical to address each error source individually. Rather, a final profile may be created measuring against a known angle. The error is subtracted from the measured angle to minimize the final position error to be used by the microcontroller. Consider the possible angle error which results from combining the impact of each of the various mechanical error modes. While normally the On-Axis case shows little to no error, when these factors are combined a complex error pattern will emerge. It is worth noting in Figure 6-1 that the cyclical amplitude varies during one full rotation.

Figure 6-1 On Axis Angle Error with Combined Mechanical Errors

Two approaches are common for calibrating angle measurement errors such as this. The first uses a multi-point lookup table to generate a piecewise approximation of the error curve. As the number of data points increases, the resulting plot will quickly approach the actual system error. Consider this comparison of 8, 16, and 32 point calibrations of an example error curve.

Figure 6-2 8-point Linearization
Figure 6-4 32-point Linearization
Figure 6-3 16-point Linearization

This method requires a look-up table which is then used to approximate the error between the nearest data point using an assumption that the error varies linearly between these known values.

The other method attempts to approximate the error for all positions through an equation based solution. Since the error is cyclical in nature, it is possible to make an approximation using the sum of the combination of a sine and cosine value of each harmonic. This similarly will improve in accuracy as the number of data points increases. Using the same error profile from Figure 6-5, it is possible to reach a higher accuracy result after correcting the first 4 harmonics.

Figure 6-5 Harmonic Approximation Linearization

For more details regarding angle encoding using TMAG5170, and calibration examples captured in a lab environment, please review Absolute Angle Encoder Reference Design with Hall-Effect Sensors for Precise Motor Position Control.