SBAA539A march   2022  – may 2023 TMAG5170 , TMAG5170-Q1 , TMAG5170D-Q1 , TMAG5173-Q1 , TMAG5273

 

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

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.

GUID-20220316-SS0I-NNBC-5JFS-KKC9SF23V8MD-low.svgFigure 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.

GUID-20220316-SS0I-SFHP-2R69-5B7KPT9CKCTD-low.svgFigure 6-2 8-point Linearization
GUID-20220316-SS0I-QQG6-0DKC-BJWXNDK7DL5W-low.svgFigure 6-4 32-point Linearization
GUID-20220316-SS0I-SPPW-X9PS-7N53MX3ZHLJQ-low.svgFigure 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.

GUID-20220316-SS0I-7PKM-MVNM-LVLGQTBQQJV7-low.svgFigure 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.