Magnetic Source Detection Using an Array of Planar Hall Effect Sensors and Machine Learning Algorithms
Abstract
:1. Introduction
- Reduction in Sensor Count: Traditional magnetic field mapping methods require arrays with more than 50 sensors to achieve high spatial resolution. This work demonstrates equivalent results using only nine sensors with the help of machine learning algorithms;
- ML-Powered Mapping: An FCNN was developed to process data from the sparse sensor array, significantly enhancing the magnetic field map’s resolution and accuracy, without relying on a specific physical model, compared to deterministic methods;
- Use of PHE Sensors for Magnetic Field Mapping: This study is the first to employ PHE sensors in a compact 3 × 3 grid for precise magnetic field mapping, highlighting their potential for high-resolution applications;
- Application of Small Sensors: The use of small elliptical PHE sensors demonstrates their feasibility for constructing dense sensor arrays in constrained environments, such as medical and industrial applications.
2. Materials and Methods
2.1. The Magnetic Source
2.2. The Magnetic Sensors
2.3. The Interface
2.4. Data Processing
- LMA approach:
- The general problem, solved by LMA [34], can be formulated as
- The LMA is a local scheme that solves the inverse problem of the magnetic field generated by a given source using the data recorded at the sensors. For a current loop, the magnetic moment is related to the current I and the area A of the loop. Specifically, the magnetic moment is given by . For a circular loop with radius , the area A is , and the magnetic moment becomes . The magnetic field at a point located at a distance r from the current loop (in the far-field or dipole approximation) is
- B is the magnetic field at the sensor in Tesla;
- I is the current in the loop (in amperes);
- is the radius of the current loop;
- is the distance from the loop to the sensor located at ;
- is the permeability of free space ().
- Thus, the magnetic field at the sensor is
- (a)
- We divide the cylindrical source into 15 equal sub-sources (see Figure 4);
- (b)
- We solve by LMA for each segment separately and obtain 15 positions and current values;
- (c)
- We build a magnetic heat map by interpolating the field computed at the LMA solution and the recorded field of the 9 senors, using Equation (4) to convert from current to magnetic intensity.
- 2.
- FCNN model training:
- We use a machine learning (ML) methodology for several compelling factors. First, the simulation process allows us to generate a substantial amount of labeled data required by the learning algorithm. Second, the ML approach is inherently powerful due to its ability to train the model without relying on assumptions about the physical model of the problem. This property enables almost any modifications of the problem type and the retraining of the model without compromising its accuracy. Finally, once the model has been trained offline, the real-time predictions are significantly faster compared to any heuristic approaches.
- We chose the FCNN due to its straightforwardness and practicality. The localization problem, i.e., determining the 2D coordinates of the anomaly, may be addressed as a straightforward regression problem. This can be effectively solved using an FCNN, yielding a high level of accuracy.
3. Results
3.1. Theoretical Magnetic Map
3.2. Measurement Setup of Nine PHE Sensor Array
3.3. Simulations
3.4. Mapping Using LMA Approach
3.5. Mapping Using ML Approach
3.5.1. FCNN Model Training
- FCNN meta parameters:We implement our network in Python using PyTorch. The network architecture consists of an input layer with 2500 neurons, 2 hidden layers (the first has 750 neurons and the second has 500 neurons), and an output layer, which has 2500 neurons. The total number of trainable parameters in the network is 3,503,750. The Adam optimization method with a learning rate of was chosen. The training process involves a total of 2000 simulations.These simulations were restricted in a two-dimensional area of 50 mm × 50 mm. In each simulation, the following parameters were randomly chosen according to a normal distribution:
- The coordinates of the center of mass of the coil, ;
- The orientation of the coil in the x–y plane, ;
- The length of the coil, l;
- The current intensity, I.
The mean and the variance for each parameter are given in Table 1.The training process was conducted for a total of 200 epochs using NVIDIA A100, with cuda version 12.1. - Loss function:For training the FCNN we decided to use a loss function that combines a global and a local estimation error. The purpose was optimizing the network convergence from the full heat map point of view but still emphasizing the most significant physical structure, namely, the coil’s center of mass, which can be considered as an anchor point.The global part of the loss function is given by the Structural Similarity Index Measure (SSIM) [35]. Unlike traditional metrics such as mean squared error (MSE) or peak signal-to-noise ratio (PSNR), which primarily focus on pixel-wise differences, SSIM considers changes in structural information, luminance, and contrast. This often makes it more aligned with human visual perception. SSIM is a combination of luminance, contrast, and structure. We chose the SSIM components’ adjustment parameters to be .The local term of the loss function, noted as , is defined by
3.5.2. Prediction Results
3.5.3. Performance of the ML Model Against Simulated Measurements
- is the original image function;
- is the perpendicular distance from the origin to the line of projection;
- is the angle of projection relative to the x-axis;
- is the Dirac delta function that constrains the projection to a particular line at a distance .
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Zuo, S.; Heidari, H.; Farina, D.; Nazarpour, K. Miniaturized magnetic sensors for implantable magnetomyography. Adv. Mater. Technol. 2020, 5, 2000185. [Google Scholar] [CrossRef]
- Saha, R.; Tonini, D.; Hopper, M.S.; Goyal, A.; Yuen, J.; Oh, Y.; Sanger, Z.; Faramarzi, S.; Shiao, M.; Van Helden, D.; et al. Micromagnetic Neural Stimulation and Spintronic Neural Sensing. In Proceedings of the 2024 IEEE International Magnetic Conference-Short Papers (INTERMAG Short Papers), Rio de Janeiro, Brazil, 5–10 May 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1–2. [Google Scholar]
- Fu, Q.; Wang, X.; Guo, J.; Guo, S.; Cai, Z. Magnetic Localization Technology of Capsule Robot Based on Magnetic Sensor Array. In Proceedings of the 2020 IEEE International Conference on Mechatronics and Automation (ICMA), Beijing, China, 13–16 October 2020; Volume 10, pp. 267–272. [Google Scholar] [CrossRef]
- Huang, G.W.; Jeng, J.T. Implementation of 16-channel AMR sensor array for quantitative mapping of two-dimension current distribution. IEEE Trans. Magn. 2018, 54, 1–5. [Google Scholar] [CrossRef]
- Ye, C.; Wang, Y.; Wang, M.; Udpa, L.; Udpa, S.S. Frequency domain analysis of magnetic field images obtained using TMR array sensors for subsurface defect detection and quantification. NDT E Int. 2020, 116, 102284. [Google Scholar] [CrossRef]
- Wu, Z.; Huang, H.; Zhao, G.; Liu, J. TMR-Array-Based Pipeline Location Method and Its Realization. Sustainability 2023, 15, 9816. [Google Scholar] [CrossRef]
- Chen, C.H.; Chen, P.W.; Chen, P.J.; Liu, T.H. Indoor positioning using magnetic fingerprint map captured by magnetic sensor array. Sensors 2021, 21, 5707. [Google Scholar] [CrossRef]
- Munschy, M.; Boulanger, D.; Ulrich, P.; Bouiflane, M. Magnetic mapping for the detection and characterization of UXO: Use of multi-sensor fluxgate 3-axis magnetometers and methods of interpretation. J. Appl. Geophys. 2007, 61, 168–183. [Google Scholar] [CrossRef]
- Christou, C.T.; Jacyna, G.M. Vehicle detection and localization using Unattended Ground Magnetometer Sensors. In Proceedings of the 2010 13th International Conference on Information Fusion, Edinburgh, UK, 26–29 July 2010; pp. 1–8. [Google Scholar] [CrossRef]
- Yoshiaki, A.; Shigenori, K.; Jun, H.; Yoshinori, O.; Yoshihisa, N.; Taishi, W.; Yuki, M.; Gen, U. Multichannel SQUID magnetoneurograph system for functional imaging of spinal cords and peripheral nerves. IEEE Trans. Appl. Supercond. 2021, 31, 1600405. [Google Scholar]
- Kim, J.; Lee, J.; Jun, J.; Le, M.; Cho, C. Integration of Hall and giant magnetoresistive sensor arrays for real-time 2-D visualization of magnetic field vectors. IEEE Trans. Magn. 2012, 48, 3708–3711. [Google Scholar] [CrossRef]
- Ribeiro, P.; Neto, M.; Cardoso, S. Strategy for determining a magnet position in a 2-D space using 1-D sensors. IEEE Trans. Magn. 2018, 54, 9401605. [Google Scholar] [CrossRef]
- Miao, L.; Zhang, T.; Zuo, C.; Chen, Z.; Yang, X.; Ouyang, J. A Rapid Localization Method Based on Super Resolution Magnetic Array Information for Unknown Number Magnetic Sources. Sensors 2024, 24, 3226. [Google Scholar] [CrossRef]
- Xiao, C.; Liu, S.; Zhou, G.h. Real-time localization of a magnetic object with total field data. In Proceedings of the 2008 World Automation Congress, Waikoloa, HI, USA, 28 September–2 October 2008; IEEE: Piscataway, NJ, USA, 2008; pp. 1–4. [Google Scholar]
- Alimi, R.; Fisher, E.; Nahir, K. In Situ Underwater Localization of Magnetic Sensors Using Natural Computing Algorithms. Sensors 2023, 23, 1797. [Google Scholar] [CrossRef]
- Yang, W.; Hu, C.; Meng, M.Q.H.; Song, S.; Dai, H. A six-dimensional magnetic localization algorithm for a rectangular magnet objective based on a particle swarm optimizer. IEEE Trans. Magn. 2009, 45, 3092–3099. [Google Scholar]
- Song, S.; Hu, C.; Meng, M.Q.H. Multiple objects positioning and identification method based on magnetic localization system. IEEE Trans. Magn. 2016, 52, 9600204. [Google Scholar] [CrossRef]
- Hu, S.; Tang, J.; Ren, Z.; Chen, C.; Zhou, C.; Xiao, X.; Zhao, T. Multiple underwater objects localization with magnetic gradiometry. IEEE Geosci. Remote. Sens. Lett. 2018, 16, 296–300. [Google Scholar] [CrossRef]
- Pham, D.M.; Aziz, S.M. A real-time localization system for an endoscopic capsule. In Proceedings of the 2014 IEEE Ninth International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP), Singapore, 21–24 April 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 1–6. [Google Scholar]
- Ouyang, G.; Abed-Meraim, K. A Survey of Magnetic-Field-Based Indoor Localization. Electronics 2022, 11, 864. [Google Scholar] [CrossRef]
- Ouyang, G.; Abed-Meraim, K. Analysis of Magnetic Field Measurements for Indoor Positioning. Sensors 2022, 22, 4014. [Google Scholar] [CrossRef]
- Fan, L.; Kang, C.; Wang, H.; Hu, H.; Zhang, X.; Liu, X. Adaptive Magnetic Anomaly Detection Method Using Support Vector Machine. IEEE Geosci. Remote. Sens. Lett. 2022, 19, 8001705. [Google Scholar] [CrossRef]
- Ashraf, I.; Hur, S.; Park, Y. Application of Deep Convolutional Neural Networks and Smartphone Sensors for Indoor Localization. Appl. Sci. 2019, 9, 2337. [Google Scholar] [CrossRef]
- Galván-Tejada, C.E.; Zanella-Calzada, L.A.; García-Domínguez, A.; Magallanes-Quintanar, R.; Luna-García, H.; Celaya-Padilla, J.M.; Galván-Tejada, J.I.; Vélez-Rodríguez, A.; Gamboa-Rosales, H. Estimation of indoor location through magnetic field data: An approach based on convolutional neural networks. ISPRS Int. J. Geo-Inf. 2020, 9, 226. [Google Scholar] [CrossRef]
- Liu, T.; Wu, T.; Wang, M.; Fu, M.; Kang, J.; Zhang, H. Recurrent Neural Networks based on LSTM for Predicting Geomagnetic Field. In Proceedings of the 2018 IEEE International Conference on Aerospace Electronics and Remote Sensing Technology (ICARES), Singapore, 4–7 December 2018; pp. 1–5. [Google Scholar] [CrossRef]
- Jang, H.J.; Shin, J.M.; Choi, L. Geomagnetic Field Based Indoor Localization Using Recurrent Neural Networks. In Proceedings of the GLOBECOM 2017—2017 IEEE Global Communications Conference, Singapore, 4–8 December 2017; pp. 1–6. [Google Scholar] [CrossRef]
- Chen, S.; Zhu, M.; Zhang, Q.; Cai, X.; Bo, X. Accurate magnetic object localization using artificial neural network. In Proceedings of the 2019 15th International Conference on Mobile Ad-Hoc and Sensor Networks (MSN), Shenzhen, China, 11–13 December 2019; pp. 25–30. [Google Scholar]
- Zhang, Y.; Lee, J.; Wainwright, M.; Jordan, M.I. On the learnability of fully-connected neural networks. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, Fort Lauderdale, FL, USA, 20–22 April 2017; Volume 54, pp. 83–91. [Google Scholar]
- Lahav, D.; Schultz, M.; Amrusi, S.; Grosz, A.; Klein, L. Planar Hall Effect Magnetic Sensors with Extended Field Range. Sensors 2024, 24, 4384. [Google Scholar] [CrossRef] [PubMed]
- Nhalil, H.; Das, P.T.; Schultz, M.; Amrusi, S.; Grosz, A.; Klein, L. Thickness dependence of elliptical planar Hall effect magnetometers. Appl. Phys. Lett. 2020, 117, 262403. [Google Scholar] [CrossRef]
- Gehanno, V.; Freitas, P.P.; Veloso, A.; Ferrira, J.; Almeida, B.; Soasa, J.; Kling, A.; Soares, J.; Da Silva, M. Ion beam deposition of Mn-Ir spin valves. IEEE Trans. Magn. 1999, 35, 4361–4367. [Google Scholar] [CrossRef]
- Nhalil, H.; Givon, T.; Das, P.T.; Hasidim, N.; Mor, V.; Schultz, M.; Amrusi, S.; Klein, L.; Grosz, A. Planar Hall effect magnetometer with 5 pT resolution. IEEE Sensors Lett. 2019, 3, 2501904. [Google Scholar] [CrossRef]
- Krishnan, S.R.; Seelamantula, C.S. On the selection of optimum Savitzky-Golay filters. IEEE Trans. Signal Process. 2012, 61, 380–391. [Google Scholar] [CrossRef]
- Marquardt, D.W. An algorithm for least-squares estimation of nonlinear parameters. J. Soc. Ind. Appl. Math. 1963, 11, 431–441. [Google Scholar] [CrossRef]
- Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef] [PubMed]
- Brady, M.L. A fast discrete approximation algorithm for the Radon transform. SIAM J. Comput. 1998, 27, 107–119. [Google Scholar] [CrossRef]
- Henry, J.; Natalie, T.; Madsen, D. Pix2pix Gan for Image-to-Image Translation; Research Gate Publication: Berlin, Germany, 2021; pp. 1–5. [Google Scholar]
- Xiong, Y.; Guo, S.; Chen, J.; Deng, X.; Sun, L.; Zheng, X.; Xu, W. Improved SRGAN for remote sensing image super-resolution across locations and sensors. Remote. Sens. 2020, 12, 1263. [Google Scholar] [CrossRef]
Parameter | Mean | Standard Deviation |
---|---|---|
(mm) | ||
(radians) | ||
l (mm) | ||
I (mA) |
Loss Function | Results | |||
---|---|---|---|---|
MSE Value | X Offset (mm) | Y Offset (mm) | ||
1.0 | 0.0 | 2.4615 | 0.5 | 1.02 |
0.5 | 0.5 | 2.6621 | 0.162 | 0.9 |
0.25 | 0.75 | 2.6484 | 0.157 | 0.051 |
0.1 | 0.9 | 2.5768 | 0.145 | 0.045 |
0.0 | 1.0 | 2.467 | 0.142 | 0.042 |
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. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Vizel, M.; Alimi, R.; Lahav, D.; Schultz, M.; Grosz, A.; Klein, L. Magnetic Source Detection Using an Array of Planar Hall Effect Sensors and Machine Learning Algorithms. Appl. Sci. 2025, 15, 964. https://doi.org/10.3390/app15020964
Vizel M, Alimi R, Lahav D, Schultz M, Grosz A, Klein L. Magnetic Source Detection Using an Array of Planar Hall Effect Sensors and Machine Learning Algorithms. Applied Sciences. 2025; 15(2):964. https://doi.org/10.3390/app15020964
Chicago/Turabian StyleVizel, Miki, Roger Alimi, Daniel Lahav, Moty Schultz, Asaf Grosz, and Lior Klein. 2025. "Magnetic Source Detection Using an Array of Planar Hall Effect Sensors and Machine Learning Algorithms" Applied Sciences 15, no. 2: 964. https://doi.org/10.3390/app15020964
APA StyleVizel, M., Alimi, R., Lahav, D., Schultz, M., Grosz, A., & Klein, L. (2025). Magnetic Source Detection Using an Array of Planar Hall Effect Sensors and Machine Learning Algorithms. Applied Sciences, 15(2), 964. https://doi.org/10.3390/app15020964