SLYA072 may   2023 TMAG5253

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Mechanical Implementation
  6. 3Magnetic Implementation
  7. 4Magnet Sensor Placement
  8. 5Prototyping and Bench Testing
  9. 6Error Sources
  10. 7Post Processing
  11. 8Summary
  12. 9References

Post Processing

After finalizing the trigger hardware, a method of translating the TMAG5253 device output into the corresponding angle needs to be determined. Assuming the device and mechanical tolerances are sufficiently small, use a look-up table or a regression equation. In both methods, several trigger systems must be characterized to determine what voltage corresponds to the angle. Then an average curve can be generated based upon the sample measurements. As shown in Figure 7-1, the averaged data points serve as the look-up values, and any value in between indicated by the dotted line is interpolated. More data points can be required to accurately predict a nonlinear output.

GUID-20221109-SS0I-VKFF-QM2N-9V67CM54R50C-low.svg Figure 7-1 Look-up Table Method

Since look-up tables can take up more memory than desired, the regression equation approach is a viable option. A regression equation can be as simple as a linear equation or as complex as a quartic equation. Figure 7-2 shows an examples of using linear, quadratic, and cubic regressions to recreate the measured curve. Beside each curve is the corresponding equation.

GUID-20221109-SS0I-SKQR-XGL6-QXZPTWBWHLFP-low.svg Figure 7-2 Regression Method

For the trigger design featured here, which has one plot bend due to non-linear behavior of magnetic field magnitude and another plot bend for the output exceeding the linear range of the output voltage (VOUT > VL), a cubic regression equation seems most appropriate. To get the cubic regression equation, a system of equations like Equation 2 through Equation 5 needs to be solved. Since the angle is the unknown that needs to be solved for in the application, voltage can be substituted for x, while angle can be substituted for y, and n equals the number of data points collected. Table 7-1 shows the values used to calculate the summation values, while Table 7-2 shows the summation values used in Equation 2 through Equation 5. With coefficients provided in Table 7-2, coefficients a through d can be solved in Microsoft® Excel® with Equation 6.

Equation 2. a x i 6 + b x i 5 + c x i 4 + d x i 3 = x i 3 y i
Equation 3. a x i 5 + b x i 4 + c x i 3 + d x i 2 = x i 2 y i
Equation 4. a x i 4 + b x i 3 + c x i 2 + d x i = x i y i
Equation 5. a x i 3 + b x i 2 + c x i 1 + d n i = y i
Table 7-1 Regression Related Values 1
Angle (degrees) Output (V) Output2 Output3 Output4 Output5 Output6 Output Angle Output2 Angle Output3 Angle
110 1.799433 3.23796(1) 5.82649(2) 10.484387 18.86596 33.94803 197.9376 356.1756(3) 640.9143(4)
105 1.85587 3.444241 6.392052 11.8627 22.01577 40.85833 194.866 361.6453 671.1655
100 1.932033 3.732753 7.211803 13.93344 26.91988 52.0101 193.2033 373.2753 721.1803
95 2.082433 4.33652 9.030532 18.80548 39.16116 81.5505 197.8312 411.9702 857.9005
90 2.248933 5.057701 11.37443 25.58034 57.52848 129.3777 202.404 455.1931 1023.699
85 2.705 7.317025 19.79255 53.53885 144.8226 391.7451 229.925 621.9471 1682.367
80 3.0829 9.504272 29.30072 90.33119 278.482 858.5323 246.632 760.3418 2344.058
75 3.313167 10.97707 36.36887 120.4961 399.2238 1322.695 248.4875 823.2805 2727.666
Result of column 2, cell 1 (1.799433), raised to the power of 2
Result of column 2, cell 1 (1.85587), raised to the power of 3
Result of column 8, cell 1 (197.9376), raised to the power of 2
Result of column 8, cell 1 (197.9376), raised to the power of 3
Table 7-2 Regression Related Values 2
Row a b c d Right-Side Terms
1 Σxi6 = 2910.717061 Σxi5 = 987.0197 Σxi4 = 345.0326 Σxi3 = 125.2975 10668.95
2 Σxi5 = 987.0197 Σxi4 = 345.0326 Σxi3 = 125.2975 Σxi2 = 47.60755 4163.829
3 Σxi4 = 345.0326 Σxi3 = 125.2975 Σxi2 = 47.60755 Σxi = 19.01977 1711.287
4 Σxi3 = 125.2975 Σxi2 = 47.60755 Σxi = 19.01977 Σni = 8 740
  1. x1n=outputn at 110°, x2n=outputn at 105°, etc.
Equation 6. MULT(MINVERSE(a1:d4),right-side terms1:right-side terms 4)

From the values in Table 7-2 and the Excel formula Equation 6, the coefficients for Equation 7 can be calculated. Figure 7-3 provides a comparison between our average measured values and equation generated angle values for voltage outputs between 1.7 V and 3.3 V.

Equation 7. - 25.5528 × output 3 + 206.8976 × output 2 - 564.915 × output = angle
GUID-20221104-SS0I-QGBQ-MXBP-L9Z0V4XLQS26-low.svg Figure 7-3 Regression Fit