Next Article in Journal
Pulsed Temperature Operation of SnO2-Based Gas Sensors
Previous Article in Journal
Microfluidic Cuvette for Near-Infrared Spectroscopy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Abstract

Numerically Stable Magnetic Field Expressions for End-of-Shaft Angle Sensing Systems †

1
Silicon Austria Labs GmbH, Sandgasse 34, 8010 Graz, Austria
2
Sensitec GmbH, 35578 Wetzlar, Germany
*
Author to whom correspondence should be addressed.
Presented at the XXXV EUROSENSORS Conference, Lecce, Italy, 10–13 September 2023.
Proceedings 2024, 97(1), 210; https://doi.org/10.3390/proceedings2024097210
Published: 6 May 2024

Abstract

:
The design of end-of-shaft angle sensing magnetic positioning systems (MPS) requires accurate field computations in the sensing area for the magnetostatic inversion procedure. Highly resolved field computations on a 3-D domain make FEM simulations unfeasible and favour analytical solutions. Analytical textbook field solutions of a number of standard magnet shapes are however numerically unstable along symmetry axes, body edges as well as in the far field. For the particular application of an end-of-shaft system, only a particular instability close to the symmetry axis, ρ → 0 plays a detrimental role. We stabilize the field equation by mathematical reformulation of naturally occurring numerically unstable combinations of elliptic integrals in the derivation. The resulting formulas or even their ready-to-use implementation in the freely available Python package Magpylib can be used without limitations for end-of-shaft MPS designs.

1. Introduction

End-of-shaft magnetic positioning systems (MPS) are widely used for angle sensing. When a magnet, typically a cylinder magnet with diametral magnetization is mounted at the end of a rotating shaft, the rotation angle is uniquely determined by the outputs of a 2-D magnetic sensor positioned below the axis, see Figure 1. From the measurement of the field modulation, an MPS is supposed to determine the relative motion between a permanent magnet and the magnetic field sensors. The definition of the layout of a magnetic positioning system is based on the inverse magnetostatic problem, typically a global inversion algorithm such as differential evolution to map sensor outputs to the corresponding position and/or orientation of the magnet but also to solve for a number of system parameters of interest such as magnet dimension, magnetization, runout of the axis, magnet and sensor positions, tolerances for all these parameters, strayfields, etc. Needless to say, for such highly dimensional inversion algorithms to work, they rely on very accurate solutions of the “forward” magnetostatic field problem.

2. Methods

Only recently, some investigations [1,2] have addressed the issue of numerical instabilities inherent in the well-known analytical field solutions given in the literature, e.g., ref. [3]. For the end-of- shaft angle sensing systems with a 2-D sensor or sensor array (depending on how many parameters are supposed to be determined) placed below a diametrically magnetized cylinder, a numerical instability of the analytic field solution that increases as one approaches the axis ρ0 turns out to be particularly detrimental, as the magnetostatic field solution needed for the global optimization loses its entire floating point precision, see magnetic field component evaluations in the top row of Figure 2.
We investigated this problem, stemming from catastrophic cancellations due to definite integrals in the derivation of the field and searched for ways to stabilize the analytical expressions, shown here in an exemplary fashion for the radial field component:
H ρ = M R 4 π c o s φ 2 z ± h ρ z ± h / 2 2 + ρ + R 2 ρ R ρ + R c e l κ ± , p , 1,1 + c e l κ ± , 1 , 1,1 +
with κ ± 2 = 1 4 ρ R / z ± 2 + ρ + R 2 and p = 1 4 ρ / ρ + R 2 . The precision of this stabilized radial field component is shown in the leftmost plot in the lower row of Figure 2. The other two plots to the right show the improved precision of the azimuth and axial field components, respectively.

3. Discussion

Analytical textbook magnetic field solutions of magnets shaped as cubes, cylinders, etc. have typically been written in elegant and condensed form but without consideration of direct floating point evaluation on a computer. Combinations of elliptic integrals that occur in many problems with underlying cylindrical geometry proof to be particularly troublesome when evaluation is needed for instance very close to the symmetry axis, as is the case for inverse magnetostatic computations needed for the design of angle-sensing end-of-shaft systems. We offer numerically stabilized formulas for the field as well as access to a free-to-use solution library Magpylib [4] written in Python, enabling fast and stable field evaluation that can be particularly beneficial for designing end-of-shaft systems but of course also far beyond that particular application.

Author Contributions

Conceptualization, M.O. and P.L.; methodology, M.O., P.L. and L.R.; software: M.O. and P.L.; validation, P.L., formal analysis, L.R., P.L. and M.O.; investigation, P.L., resources: M.O. and P.L.; writing—original draft preparation, P.L.; writing—review and editing, P.L.; visualization, P.L.; supervision, M.O.; project administration, M.O.; funding acquisition, M.O. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been supported by Silicon Austria Labs GmbH (SAL), owned by the Republic of Austria, the Styrian Business Promotion Agency (SFG), the federal state of Carinthia, the Upper Austrian Research (UAR), and the Austrian Association for the Electric and Electronics Industry (FEEI).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

Authors P.L. and M.O. were employed by Silicon Austria Labs GmbH, and L.R. was employed by Sensitec GmbH. The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as potential conflicts of interest.

References

  1. Cichon, D.; Psiuk, R.; Brauer, H.; Töpfer, H. A Hall-Sensor-Based Localization Method With Six Degrees of Freedom Using Unscented Kalman Filter. IEEE Sens. J. 2019, 19, 2509–2516. [Google Scholar] [CrossRef]
  2. Ortner, M.; Leitner, P.; Slanovc, F. Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a current Loop. Magnetism 2023, 3, 11–31. [Google Scholar] [CrossRef]
  3. Caciagli, A.; Baars, R.J.; Philipse, A.P.; Kuipers, B.W. Exact expression for the magnetic field of a finite cylinder with arbitrary uniform magnetization. J. Magn. Magn. Mater. 2018, 456, 423. [Google Scholar] [CrossRef]
  4. Ortner, M.; Bandeira, L.G.C. Magpylib: A free python package for magnetic field computation. SoftwareX 2020, 11, 100466. [Google Scholar] [CrossRef]
Figure 1. End-of-shaft magnetic positioning system. A magnet is mounted at the end of a rotating shaft whose field is detected in the subjacent sensor array.
Figure 1. End-of-shaft magnetic positioning system. A magnet is mounted at the end of a rotating shaft whose field is detected in the subjacent sensor array.
Proceedings 97 00210 g001
Figure 2. Precision (number of significant figures) of the analytic field computation (Bρ, Bφ, Bz) (left, middle, right) in the sensing area (indicated by blue frames). The complete loss of precision for ρ → 0 (upper panel) is successfully remedied by our numerical stabilization (lower panel), giving at least 10 significant figures in the area of interest.
Figure 2. Precision (number of significant figures) of the analytic field computation (Bρ, Bφ, Bz) (left, middle, right) in the sensing area (indicated by blue frames). The complete loss of precision for ρ → 0 (upper panel) is successfully remedied by our numerical stabilization (lower panel), giving at least 10 significant figures in the area of interest.
Proceedings 97 00210 g002
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Leitner, P.; Rauber, L.; Ortner, M. Numerically Stable Magnetic Field Expressions for End-of-Shaft Angle Sensing Systems. Proceedings 2024, 97, 210. https://doi.org/10.3390/proceedings2024097210

AMA Style

Leitner P, Rauber L, Ortner M. Numerically Stable Magnetic Field Expressions for End-of-Shaft Angle Sensing Systems. Proceedings. 2024; 97(1):210. https://doi.org/10.3390/proceedings2024097210

Chicago/Turabian Style

Leitner, Peter, Lukas Rauber, and Michael Ortner. 2024. "Numerically Stable Magnetic Field Expressions for End-of-Shaft Angle Sensing Systems" Proceedings 97, no. 1: 210. https://doi.org/10.3390/proceedings2024097210

Article Metrics

Back to TopTop