Fast, cheap, and scalable magnetic tracker with an array of magnetoresistors
Valerio Biancalana, Roberto Cecchi, Piero Chessa, Giuseppe Bevilacqua, Yordanka Dancheva, Antonio Vigilante
FFast, cheap, and scalable magnetic tracker with an array of magnetoresistors
Valerio Biancalana, Roberto Cecchi, Piero Chessa, GiuseppeBevilacqua, Yordanka Dancheva, and Antonio Vigilante Dept. of Information Engineering and Mathematics - DIISM,University of Siena – Via Roma 56, 53100 Siena, Italy ∗ Dept. of Physical Sciences, Earth and Environment - DSFTA,University of Siena – Via Roma 56, 53100 Siena, Italy Aerospazio Tecnologie srl, Strada di Ficaiole, 53040 Rapolano Terme (SI), Italy Department of Physics and Astronomy, University College London,Gower Street, London WC1E 6BT, United Kingdom
We present the hardware of a cheap multi-sensor magnetometric setup, where a relatively largeset of magnetic field components is measured in several positions by calibrated magnetoresistivedetectors. The setup is developed with the scope of mapping the (inhomogeneous) field generatedby a known magnetic source, which is measured as superimposed to the (homogeneous) geomagneticfield. The final goal is to use the data produced by this hardware to reconstruct position and orien-tation of the magnetic source with respect to the sensor frame, simultaneously with the orientationof the frame with respect to the environmental field. Possible applications of the setup are shortlydiscussed, together with a synthetic description of the data elaboration and analysis.
INTRODUCTION
Magnetic field measurements can be performed witha variety of sensors, whose sensitivity, robustness, dy-namic range, linearity, reliability, speed, simplicity, andcost range in very broad intervals. The state-of-art sen-sors in terms of sensitivity are based on the superconduc-tor quantum interference devices (SQUIDs) that surpassthe sensitivity level of 1fT / √ Hz. The main drawbackof SQUIDs is the need of cryogenics. Optical atomicmagnetometry constitutes another technology that insome implementations – particularly in the so calledSpin-Exchange-Relaxation-Free (SERF)– may competewith SQUIDs in terms of sensitivity. It enables alsothe construction of relatively simple and robust sensorswith sensitivity at the pT / √ Hz level and below, includ-ing miniaturized devices, and implementations with ahigh-frequency response. Optical atomic magnetometers(OAMs) do not require cryogenics. On the other hand,they are based on spectroscopy in high quality vapourcells and commonly ligthed with laser sources, both fea-tures making them expensive and not easily integrablein solid state devices. When these extreme performancesare not required, fluxgate technology offers an eligible al-ternative, on the basis of which different grades of sensorsare produced with a rather wide range of sensitivities andcosts. When sensitivities of the order of nT / √ Hz are suf-ficient, beside low cost fluxgate sensors, the solid-statetechnology offers nowadays extremely cheap and easy-use devices based on the magnetoresistive effects. Themagnetoresistive effect (discovered and formerly studiedby lord Kelvin [1, 2]) in its giant [3], tunnel [4], andanisotropic [5] occurrences is profitably used to measurefields of several tens of micro Tesla, i.e. of the order ∗ [email protected] of the geomagnetic field, with typical sensitivities in thenT / √ Hz range and bandwidth extending up to kHz, or–depending on the implementation– to MHz and beyond[6]. Devices based on magnetoresitance (MR) with sensi-tivity levels attaining the pT / √ Hz above 1 kHz have beenreported [7]. The magnetoresistive sensors (similarly toSQUIDs and fluxgates, and in contrast to typical OAMmagnetometers) are vectorial in nature, i.e. respond tosingle components of the magnetic field: an assembly ofthree orthogonally oriented sensors enables a completemeasurement of the magnetic field vector. Other popu-lar solid state sensors are based on the Hall effect, theirsensitivity and accuracy is worse than MR and they aremore commonly used to roughly estimate (or rather justto detect) relatively strong fields. A synthetic, roughoverview of the available technologies and of the accessi-ble bandwidth and sensitivity intervals for magnetomet-ric measurements is provided in Fig.1The success of MR technology is also related to itseasy integration with silicon-based electronic devices. In-tegrated circuits (ICs) containing one or more magne-toresistive elements became recently very popular, andtheir cost decreased by order of magnitudes in the lastdecade thanks to large-scale production: nowadays two-or three-axis devices are widely used as sensors for elec-tronic compasses, such as those contained in smartphonesand drones. Other applications of these cheap sensorsinclude virtual and augmented realities, navigation, non-destructive evaluation, and various industrial activities[6, 8, 9]. Modern MR ICs contain not only magnetoresis-tive sensors but also signal conditioning and DAQ elec-tronics, together with special reset circuits that facilitatethe MR use and improve reliability and reproducibility oftheir response, as well as circuitry for digital data trans-fer.We concentrated our attention on a family of ICs de-signed for inter-integrated-circuit (I C) protocol trans-mission of 3D magnetic data, which allow for an acqui- a r X i v : . [ phy s i c s . i n s - d e t ] O c t Figure 1. Indicative and approximate representation of typi-cal field and frequency ranges for different kinds of magnetom-etry technologies and of their possible applications. Magne-toresistors match requirements for navigation and tracking,while higher sensitivity is needed for biomagnetic detection(as in magnetocardiography MCG and magnetoencephalogra-phy MEG), where SQUIDs and AOM are the eligible choices.AOM in their radio-frequency (RF) implementations offer ex-cellent performance at high frequencies. Flux gate sensorsare produced in different grades of performance, and partiallyoverlap with the MR applicability. Hall sensors are relegatedto evaluating stronger fields, with quite small precision. sition and data transfer rate as fast as 200 readings (3data per read) per second. Due to the typical presenceof a single sensor per user, in most cases these ICs have astatic, not reconfigurable I C address. Some devices haveindeed reconfigurable address. In the case of the IC usedin our prototypes, two address configuration pins (for amaximum of four chips per bus) are available. This lim-itation leads, when a sensor array is needed, to developcontrol-interface circuits with a parallelized architecture.At a cost of the obviously heavier circuitry, such an ap-proach brings the second (but not secondary) advantageof accelerating the data acquisition and making it simul-taneous all over the sensor set.The aim of our work is to acquire at a relatively highrate (hundreds samples per second) magnetometric datasets that can be elaborated to reconstruct the positionof magnetic field sources, i.e. to track their spatial co-ordinates and the angles of their orientation. In thefrequent case of a simple source like a magnetic dipole[10–12], the tracking procedure does provide three spa- tial coordinates and three components of the magneticdipole. As soon as the measurement is performed in anexternal field (such as the geomagnetic field, which canbe assumed homogeneous over the volume of the sensorframe), three more field components have to be workedout, that is a total of 6 + 3 = 9 tracking data to be ex-tracted per measurement. These 9 data contain redun-dant information in the case of repeated measurements,because both the modulus of the dipole moment and themodulus of the ambient field can be assumed constant.In other terms, rotations of the dipole around its direc-tion and rotations of the sensors around the ambient fielddo not cause field variations: those rotations correspondto blind co-ordinates . In other terms, in the assumptionthat the intensity of the magnetic source and/or of theenvironmental field are constant, the number of freedomdegrees (and hence of the fit parameters) would be re-duced from 9 down to 8 or 7.The information about the two blind co-ordinatescould be retrieved by using a non-dipolar source (e.g.a set of two rigidly connected dipoles) and complement-ing the environmental magnetic field with a measure ofthe gravitational field. In this paper, we will not ad-dress these possible improvements. The use of non punc-tual sources, with the introduction of multipolar termsthat break the dipole-symmetry has been successfully at-tempted and reported in the literature [13].Similarly, the system could be used to track two ormore dipolar sources arbitrarily located with respect toeach other [14, 15]. In this case, the enhancement in thesource degrees of freedom would require more comput-ing resources and an increase of the minimum number ofsensors.The capability of tracking objects with adequately fasttime response is a challenging and intriguing achieve-ment, with important implications in several researchand application areas. In particular, tracking methodsbased on magnetometric measurements offer a minimallyinvasive methodology and has been studied/proposed ina variety of applications, including medical diagnostics[16] tracking of vehicles [17], biology [18], and robotics[19].Further possible applications may arise in diverse otherareas, also depending on the precision and the speed thatcan be achieved, like body part tracking (such as eye,tongue, hand, finger), human-computer interfaces, vir-tual and augmented reality, etc..Several approaches have been proposed to face the in-verse problem of reconstructing the field source param-eters from the field measurement (see e.g. ref. [20] andreferences therein). Depending on the application, re-quired accuracy, precision, robustness and speed of thetracking procedure may change, and different method-ologies can be applied.
I. SETUP OVERVIEW
We have designed and built an interface circuit ca-pable of operating arrays made of up to eight three-axis MR sensors, which can be variously disposed andgrouped in the space. A picture of a sensor array and
Figure 2. The prototype of the electronics equipped witha sensor array designed to perform eye tracking. The eightthree-axial sensors appear in the two parallel PCBs on the left,while the acquisition, recording and data-transfer electronicsis implemented in the PCB on the right, where batteries andUSB connector are visible. The flat connection allows to in-terface the PCBs with 3+5 or 4+4 sensor arrays. interface electronics is shown in Fig.2. A PCB hostingmicro-controller, eeprom memories, internal and exter-nal supply circuitry and USB interface is connected totwo sensor boards, which can host 4+4 or 5+3 IC sen-sors (as in the case shown in that figure). Each sen-sor has a dedicated I C bus for communicating with themicro-controller. The latter may send commands (andreceive data) simultaneously to (from) the eight sensors.The data can be either immediately transmitted to thecomputer or stored into an eeprom memory for succes-sive download. The second option is used in the calibra-tion procedure (see Sec.IV below). Details of the avail-able functionalities and consequent possible operationsare provided in the next sections. These are designed inview of producing fast (real time) tracking devices witha high throughput rate (hundred trackings per second)and precision (submillimetric spatial and 2 degree angu-lar resolutions).
II. SENSOR SPECIFICATIONS
The Isentek IC 8308 [21] is a three axis magnetome-ter based on anisotropic magnetoresistance effect, whosemain characteristics are reported in Tab.II. The chip im-plements reset, temperature compensation and analog-to-digital conversion circuitry, and communicates troughan I C port. Both on-demand and continuous data out-puts can be queried. The maximum data acquisitionrate is 200 Sa/s, and different kinds of internal filterscan be activated to improve the the S/N ratio at ex-pense of the actual bandwidth. Sensitivity and offsethave non-negligible deviations from ideality so that a cal- parameter value unit sensitivity drift with temperature 0.023 % / ◦ Czero-field offset 300 nToffset drift with temperature 27 nT/ ◦ Cdynamic range 500 µ Tlinear response 200 µ Tnonlinearity/FS < 10 − -range (FS) 200 or 500 µ Thysteresis/FS < 10 − -supply voltage 3.3 Vsize 3 × × adc resolution 14 bitmax output data rate 200 Sa/smax I C clock 400 kHzTable I. The IC IST 8308 main features and characteristics. ibration is necessary (see Sec.IV). These parameters mayalso change with time and (slightly) with temperature, sothat an adequate measurement accuracy can be kept atthe cost of repeated calibrations. It is worth noting thatthe temperature compensation circuitry helps reducingthis problem since the effects of typical daily environ-mental temperature drifts can be neglected. In our im-plementation, a temperature sensor has been included,so that the user knows both the temperature at whichthe calibration data were collected and the current tem-perature: when the deviation exceeds a threshold level,an alert is provided, making a new calibration advisable.A data-consistency analysis is also available to point outthe need of recalibrating the unit, as discussed at the endof Sec.IV.
III. SCALABILITY
The system developed aims to measure simultaneouslythe environmental field and the field generated by a small,closely located magnetic source (dipolar magnet). Thefinite dynamic range of the sensors makes necessary todeal with fields contributions of comparable intensities.This condition should be fulfilled at least on a sensorsubset providing a number of independent data sufficientto localize the magnet, i.e. not smaller than the numberof freedom degrees of the system.Good operating conditions can be identified as those inwhich the dipole generates on the sensors fields rangingfrom 1/10 to 10 times the ambient one. So, keeping inmind the environmental field normal value of some tens of µ T, the 1 /r dependence of the dipolar field, and the typ-ical magnetization values of permanent magnets (about1T/ µ for the used Nd devices), one finds that the bestcondition is fulfilled when the sensor-magnet distance isabout 50 times larger than the linear size of the mag-net. E.g., a one cm magnet produces a field comparableto the Earth one at about a half-meter distance. Thechip size being sub-millimetric, this thumb rule applieswhen scaling down the system size as long as the sensor-magnet distance still remains much larger than the sensorsize (e.g., magnets as small as 1 mm size can be used ata distance of about 5 cm from the sensors).Of course, accordingly to the required tracking accu-racy, the sensor positions must be known with an ad-equate precision. In our case, the latter is determinedby the PCB mount and is submillimetric. However, thedetermination of the sensor positions can be improvedon the basis of magnetometric data analysis [22], and insome of our preliminary prototypes such kind of proce-dure resulted to be crucial to guarantee the reliability ofthe tracking algorithms. IV. SENSOR CALIBRATION
MR sensors have a relatively accurate response interms of linearity, but suffer from important offset andvariable gain. Moreover both gain and offset may varywith temperature and change in time. In addition, un-predictable values are found after powering up the device.An important improvement has been introduced onthe basis of a pulsed field cycling technique. This tech-nique of reset field pulses has been also studied to im-prove the ultra-low frequency performance of MR devices[23]. Modern magnetoresistance ICs contain apposite in-puts to apply reset pulses (strong current pulses flow in aconductor built in the proximity of the magnetoresistiveelement, in order to re-magnetize its components in anappropriate and reproducible way).In more integrated devices the current pulses are pro-duced internally and the reset field cycle is automaticallyapplied at the restart. The reset operation brings thesensor to work properly (reasonably low offsets and rea-sonably ideal gains along all the axes); nonetheless when-ever good accuracy is required, some calibration proce-dure [24] is advisable or necessary. In fact, the final offsetvalue is substantially non-zero, and the gain may differby several percents among the sensors contained in a sin-gle IC. An accurate evaluation of the offsets and gainsmakes it possible to convert the raw data into field mea-surements, so to overcome these non idealities.Our setup includes in the hardware, in the firmware,and in the software apposite parts devoted to facilitatethe calibration procedure. Similarly to what describedin Ref.[24], the calibration procedure is accomplished byrecording many data (simultaneously for all the 3D sen-sors of the array), while rotating the system freely andrandomly in a (nominally) homogeneous field. In thismeasurement, each sensor feels the magnetic inductionvector ~B as it moves on a spherical surface centered in thezero-field point of a Cartesian co-ordinate system: when-ever the measured quantities ~V does not span a sphericalsurface, this can be due to non-zero offsets, to unequalgains, and to non-linear terms in the sensors’ response. Inthe hypothesis of a linear response, the measured quanti-ties describe an off-center ellipsoid rather than a centeredspherical surface: the displacement of the center is then caused by the offsets, while the eccentricity is due to thegain anisotropy.It is worth noting that similar calibration proceduresbased on static measurements have been proposed, aswell. It is indeed possible to build up a tri-axial fieldgenerator, finely calibrate it with the help of a scalarmagnetometer and then use it to produce a rotating fieldof an assigned intensity. The latter can be, in turn, ap-plied to calibrate vectorial sensors such as triaxial mag-netoresistive devices [25].An optimization procedure is used to determine off-sets and gains for all the sensors, and to save those val-ues for successive data conversion. As described below(see Sec.V), this kind of calibration measurement is morefavourably performed with no cable connection. Theoptimization is usually done over data sets containingseveral hundreds measurement (a maximum of N=2000measurements is set by the eeprom memory size), andthe minimized quantity being f = X i,j,k,n (cid:20) B − (cid:16) T ( k ) ij (cid:16) V ( k ) j,n − O ( k ) j (cid:17)(cid:17) (cid:21) , (1)where k is the sensor index running from 0 to K − O ( k ) j are the offset vectors to be determined, T ( k ) ij are elementsof triangular matrices (to be determined), n denotes themeasurement index (running from 1 to N), and B isthe field modulus. The latter can be assigned arbitrar-ily, or from an independent measurement performed byscalar sensor (e.g. an atomic magnetometer) if quantita-tive field and dipole-moment estimations are required.The elements T ( k ) ij are ideally equal for i = j (the in-verse gains), while the off-diagonal elements are ideallyzero for i > j . In contrast, the diagonal element can bedifferent from each other if the gain is not isotropic, andthe off-diagonal element could be non-zero, in the case ofpossible small misalignments (imperfect orthogonality) ofthe three axes.Let the optimal offsets and conversion matrices begiven by O ( k − opt ) j and T ( k − opt ) ij , respectively, and let’sdefine B ( k ) i,n = X j T ( k − opt ) ij ( V ( k ) j,n − O ( k − opt ) j ) (2)that is the i th component of the field in the position r k of the k th sensor, as obtained from the sensors output V j in the n th measurement.Once the offsets are removed and the response has beenmade isotropic, further calibration is necessary to refer allthe sensors to one co-ordinate system. To this aim, thedata recorded in the mentioned calibration measurementare compared to each other. One sensor (let it be the 0 th one) is selected as a reference one, and a rotation matrixis determined for each sensor with k = 1 ...K −
1, by min-imizing the vector differences between the field measuredby that sensor and the reference one. In our implemen-tation the rotation matrices are defined in terms of Eulerangles, and the minimized quantities are: g = X i,j,n (cid:16) B (0) i,n − R ( k ) i,j B ( k ) j,n (cid:17) , (3)where R ( k ) i,j = R i,j ( θ ( k ) , φ ( k ) , ψ ( k ) ) are rotation matricesdefined by the three angles θ ( k ) , φ ( k ) , ψ ( k ) to be deter-mined for each k = 1 ...K − ~V ( k ) into mag-netic induction vectors ~B ( k ) and each sensor (apart fromthe reference one) requires the determination of three ro-tation angles. The whole set of m = 9 K + 3( K − m = 93 in the considered caseof K = 8 sensors) is saved at the end of a calibrationprocedure and made available to perform the ~V → ~B conversions in the subsequent measurements.Once the calibration parameters have been deter-mined, a field estimation referenced to a unique Cartesianframe is available. This enables an additional procedureto check the validity persistence of the calibration pa-rameters. This validation is performed by comparing thefield components measured by the K sensors in homoge-neous field with their median value. In particular, thesoftware evaluates, for each sensor, the quantity E k = 1 N − N X n =1 3 X i =1 (cid:0) B k,n,i − ˜ B n,i (cid:1) , (4)where B k,n,i denotes the i th component of the field asmeasured by the k th sensor at the n th measurement in aset of N , and ˜ B n,i denotes the median value of the i th component of the field measured by the K sensors at the n th measurement. The presence of anomalously large E k values produces an alert, and the user can disregard thedata from the corresponding sensor(s) in the subsequenttracking, or decide to execute a new calibration. V. POWER SUPPLY
The circuit is normally supplied through the USB port,however it is possible to start it in a battery-supply mode,in order to acquire and store the calibration data with nocable constraints. To this aim, there is a button connect-ing the battery, and a button starting the calibrationmeasurement, When the calibration measurement starts,a circuit maintains the battery connection. During thisself-supplied operation, a flashing LED denotes the ac-quisition. At the end of the acquisition, the self-suppliedmode is maintained for a 30 s, during which the oper-ator can connect the cable. In this manner, the circuitremains supplied, and no reset pulses are applied. This feature is designed to guarantee that the acquired dataaccurately describe the sensor response, since the lattercould be modified in the case of a ICs reboot, due to theautomatically applied reset pulses.
VI. PARALLEL I C BUSES
Apart from the problem arose from the fixed I C ad-dress (a feature that characterize many MR IC types)it is advantageous to parallelize the communication withsets of ICs, both to accelerate the global data acquisi-tion rate and to enable simultaneous (i.e. mutually time-consistent) measurements. We have studied and devel-oped a simple, but effective circuit enabling both paralleldata reading from the sensors and fast composite datatransmission to PC. The developed electronics may com-municate (for hardware configuration and for data trans-fer) with eight ( K = 8) chips at once, providing thusup to K × C bus or by the composite data transmis-sion rate over the USB port: in the present implementa-tion a rate as large as 100 Sa/s (2400 data/second) hasbeen demonstrated, while a 200 Sa/s (4800 data/second)is the limit set by the IC specifications. Concerning theUSB communication, it is a potential bottle neck. Itis machine dependent and may vary unpredictably e.g.with the number of processes running in the computer,and particularly with the presence of other connected in-terfaces.
VII. FIRMWARE
An overview of the firmware principle of operation isrepresented in Fig.3. When the system starts up, theperipherals of the microcontroller are configured and thevariables used (MCU Init) are initialized. In particular,among the configured peripherals, it is worth mentioningthe ADC converter which measures the supply voltageand the timer for the real time operating system (RTOS)described below. In addition, a map of the sensors thatare actually connected is built. The latter is then usedwhen the data are transferred from the parallel I C busesto the on-board memory or to the USB interface, as de-scribed in Sec.VI.Subsequently a test is performed to verify if the systemhas been started by connecting the USB cable or by press-ing the power button: in the second case a switch (mosfettransistor) is closed, to maintain the battery power sup-ply when the power button is released by the user.At the same time it is evaluated whether the sys-tem calibration button (P0) was also pressed duringthe power-up phase; in this case a flag variable calledcal_Flag is set to True. This flag is used during the op-eration of the RTOS. The next operation (Sensor Init) is
Figure 3. General flowchart of the firmware. the initialization of the sensors that have been detectedand included in the sensor map.Now the RTOS can start. A scheduler rules the execu-tion sequence and times of the various programs (tasks)within an iterated cycle. During this cycle it is evaluated–for each task– whether it is time to run it on the basisof the time elapsed after the last execution: individualtime intervals are defined for each task.The tasks to be performed are:• Reading the state of the buttons (Read buttons)(every 5 ms)• Granting communication between the module andthe PC via an USB interface (USB) (every 10 ms).If the buffer contains a character, this is added atthe end of a string variable. If this character isa line termination character, the string variable isanalyzed by a subroutine (Parser) and, if it is rec-ognized as a valid command, such command is ex-ecuted.• Performing other operations (every 1 s). These op-erations consist in testing whether the USB cablehas been connected then disconnecting the batteryfrom the system to prevent unnecessary discharge;if, during a calibration procedue, the P0 button ispressed, the system is switched off; the same thinghappens after a preselected period of time followingthe end of the system calibration. • Reading the MR sensors: the period is determinedby the
Conv _ rate or Cal _ rate variable• Reading the temperature sensor (every 100ms)The flowcharts of two significative tasks are representedas an example in Fig.4 Figure 4. Flowcharts describing the EXEC and USB-communication tasks implemented in the firmware
VIII. DATA TRANSFER
The data transfer can be performed both in ASCIIformat (useful for debugging) and in binary format. Themeasurement can be executed both one by one (on de-mand) and continuously. In the second case, a "start-conversion" command is sent, and a continuous data fluxis transferred (the DAQ rate has been previously set andcan be as large as 200 Sa/s) until a "stop-conversion"command is sent. In these conditions the binary trans-mission is compulsory to prevent data overflow. A pe-culiar transmission protocol has been designed to detecttransmission errors. As seen in Sec.II, the data are signedtwo-byte integers. However, the 14 bit resolution makesimpossible that some values are generated. We use thisfeature to implement a one-byte transmission check. Thevalues are transmitted after having been added to 2 (soto make all of them positive) and after having doubledthe result (so to make all the data values even). Underthis condition, neither the most significant byte nor theleast one can be "FF", and such reserved "FF" value isused as a end-of-line marker in the USB communication.The received data are then truncated at the "FF" byte,and the whole data set is disregarded whenever "FF" doesnot occur after K × × IX. DATA ELABORATION
The computer program that controls the device is writ-ten in LabView. It contains several units designed to• Initialize the communications• Select the sensor settings (dynamical range, filters,acquisition rate)• Check the temperature• Download the raw calibration data from the eeprom• Analyze the calibration data and infer the conver-sion parameter set• Start the measurement• Convert the raw data into magnetic values• Analyze the magnetic data to track the magneticsource• Show and save the tracking outputThe first operations are made at the start or on demand,while the last two tasks are performed online and requireaccurate programming to prevent data overflow with con-sequent lost data or delayed system response. Particularcare must be devoted to the data analysis program thatinfers the magnet position and orientation from the mag-netometric measurement. Details about this problem willbe extensively provided elsewhere, while here we shortlysummarize the methodologies applied to this aim.The software implemented to extract tracking datafrom magnetometric data is based on a standard best-fit procedure using a Levenberg Marquardt algorithm[11, 26–28]. The input data are the magnetometric valuesand a set of sensor co-ordinates, and the best-fit proce-dure uses a model with the field of an arbitrarily locatedand oriented dipole field superimposed to a homogeneousfield. The fit output consists of 9 values representingthree spatial co-ordinate of the dipole, three dipole mo-ment components, and three background field compo-nents (we are neglecting the redundancy mentioned inthe Sec.). The need of determining 9 co-ordinates makesevident that the thumb-rule discussed in Sec.III shouldapply for at least three 3D sensors, with obvious advan-tages in terms of accuracy and reliability when a largernumber of sensors are close enough, as to detect the in-homogeneous field generated by the dipole. Assuming that the magnet moves slowly with respect to the acqui-sition rate, every fit output is profitably used as a guessfor the next evaluation [14]. As known, a reliable guesshelps greatly accelerating the convergence of non-linearfunctions as those used in the present case.To date, a last-step-output guess has proved to workefficiently in tests with sources moving at a speed of afew cm/s and rotating at a few rad/s. More advancedguessing, based on the analysis of a longer tracking his-tory, could be developed for faster magnetic sources andwill be assessed in future work.We verified that an ordinary personal computer witha single last-track guess, is capable to run the best-fitprocedure in a time shorter than the 10ms acquisitiontime, so to provide an estimation of the dipole positionand orientation before that a new data set is acquired,thus getting substantially a real-time functionality.
X. RESULTS
In this section, we report few examples of tracking re-sults obtained with the described system and a prelimi-nary characterization of its performance. All these dataare obtained with a Nd magnet 0.5 mm in thickness and 2mm in diameter as a dipolar source, using the prototypeshown in Fig.2. In this case (as visible in Fig.2) the arraycontains 3+5 sensors on two parallel PCBs displaced by16 mm from each other, along the z direction . Hereafterthe z positions are referred to the 3-sensors PCB, i.e. the xy plane is defined as that containing that PCB, whilethe 5-sensors PCB lays on the z = 16 mm plane. Themagnet can be slowly driven by means of a gearmotor tofollow a circular trajectory 10 mm in radius around the z direction.The Fig.5 shows a reconstructed trajectory as it is ob-tained with the sensor array in static condition and thedipole (which is oriented radially) that rotates on the z = 26 mm plane.The Fig.6, upper plot, shows a reconstructed trajec-tory obtained with the magnet performing a similar cir-cular trajectory on the z = 29 mm plane. This time,the sensor array, which are rigidly assembled with themagnet driver, is held in hands and moved freely to testthe robustness of the measurement with respect to thereorientation in the environmental magnetic field.The motion applied to the assembly is approximately arotation (about one turn back and forward) around the x axis. In this case, the system measures the environmen-tal field with significantly changing components, whosevalues are represented in the middle plot of Fig.6, as eval-uated along the tracking procedure. Finally, the bottomplot shows the corresponding time evolution of the po-sition co-ordinates. The figure proves that the recon-structed trajectory is negligibly disturbed by the arraymotion. The experiment is performed in a "normal" roomcontaining furniture with ferromagnetic frames, comput-ers, and other sources of potential magnetic interference. Figure 5. Position track of a rotating magnet measured withthe sensor array in static conditions. The acquisition rate ishere set to 1/30 s.
Preliminary quantitative estimates of the position un-certainty are based on the variance of the detected 3Dposition: in static condition, we measure a RMS σ r =( σ x + σ y + σ z ) / of 131 µ m when the magnet is held stillon the on the z axis, at z = 27 mm. In these conditions,the relative RMS of the measured environmental field andof the dipole modulus are respectively is σ B /B = 0 . σ m /m = 0 . σ r =270 µ m and σ m /m = 1 . σ m /m values of about 7.6%and 9.8%, respectively. These large values could be as-cribed to small uncertainties in the positions of sensorsas well as to non-linearities in their responses. Despitethis large variance in the dipole estimation, the quality ofspatial tracking in Fig.6 is comparable with that of Fig.5:noticeably the worse uncertainty in the dipole vector de-termination is not associate with a relevant degradationof the position tracking.As expected, the tracking performance with a givenmagnet drops dramatically when it is displaced too far Figure 6. The upper plot shows the position tracking of arotating dipole as for Fig.5. Here the sensor array, which isrigidly assembled with the magnet-driver, it is held in handsand freely rotated, while the magnet-driver moves the dipolewith respect to the sensor array. The middle plot shows thecomponents of the estimated environmental field, with two ofthem heavily affected by the assembly motion. The lowestplot shows the evolution of the spatial co-ordinates, with twoof them following the sine/cosine law dictated by the dipolerotation, and negligibly affected by the varying array orienta-tion with respect to the environmental field. from the sensor array, as to make the dipole field com-parable with the system noise, or too uniform over thearray size. This behaviour is well confirmed the dataplotted in Fig.7. This figure shows the absolute positionerror (RMS of the reconstructed position) and the rel-ative RMS of the dipole modulus, as a function of the z co-ordinate of the magnet, i.e. at increasing distancesfrom the array.Concerning the speed, we proved that the system mayacquire and track continuously at the maximum samplingrate (currently set by the firmware at 100 Sa/s) on astandard personal computer (e.g. on an i5-7400 CPU, 3GHz, 64 bit). Figure 7. Error (RMS) evaluated from repeated estimations ofdipole position (left axis) and dipole moment modulus (rightaxis) as a function of the distance z from the PCB’s, as ob-tained by moving the magnet along an axis passing by thearray center. XI. CONCLUSION
We have built and tested a cheap and reliable hardwarebased on commercial magnetoresistive sensors that, after appropriate calibration procedures, provides a set of 24magnetometric measurement data with a rate as large as100 Sa/s. The hardware contains a microprocessor en-abling immediate data transfer to a personal computer,which in turns executes data elaboration to extract mul-tidimensional (from 7D to 9D) spatial and angular co-ordinates of the magnetic source with respect to the sen-sor array and of the latter with respect to ambient field.The tracker is scalable in size and can be of interest forseveral kinds of applications ranging from medical diag-nostics to virtual and augmented reality. The subject ofthis work, in virtue of its interesting potentialities and ofits demonstrated performance in terms of precision andachieved speed, belongs to the contents of a recently ap-plied patent [29].
ACKNOWLEDGMENTS
The authors acknowledge the valuable technical sup-port of Leonardo Stiaccini (DSFTA). [1] W. Thomson, Philosophical Transactions of the RoyalSociety of London , 649 (1856).[2] W. Thomson, Proceedings of the RoyalSociety of London , 546 (1857),https://royalsocietypublishing.org/doi/pdf/10.1098/rspl.1856.0144.[3] M. N. Baibich, J. M. Broto, A. Fert, F. N. Van Dau,F. Petroff, P. Etienne, G. Creuzet, A. Friederich, andJ. Chazelas, Phys. Rev. Lett. , 2472 (1988).[4] S. Yuasa and D. D. Djayaprawira, Journal of Physics D:Applied Physics , R337 (2007).[5] T. McGuire and R. Potter, IEEE Transactions on Mag-netics , 1018 (1975).[6] N. G. Tawfik, Y. Hussein, and E. Azab, in (2018) pp. 1–4.[7] S. H. Liou, X. Yin, S. E. Russek, R. Heindl, F. C. S. D.Silva, J. Moreland, D. P. Pappas, L. Yuan, and J. Shen,IEEE Transactions on Magnetics , 3740 (2011).[8] A. Jander, C. Smith, and R. Schneider, in , Vol. 5770 (2005) pp. 1 – 13.[9] L. Jogschies, D. Klaas, R. Kruppe, J. Rittinger, P. Tap-timthong, A. Wienecke, L. Rissing, and M. C. Wurz,Sensors , 28665 (2015).[10] T. Nara, S. Suzuki, and S. Ando, IEEE Transactions onMagnetics , 3291 (2006).[11] C. Hu, M. Li, S. Song, W. Yang, R. Zhang, and M. Q. .Meng, IEEE Sensors Journal , 903 (2010).[12] J. B. N. Bhashyam Balaji, Proc.SPIE , 9091.1(2014). [13] W. Yang, C. Hu, M. Q. . Meng, S. Song, and H. Dai,IEEE Transactions on Magnetics , 3092 (2009).[14] W. Yang, C. Hu, M. Li, M. Q. . Meng, and S. Song,IEEE Transactions on Magnetics , 4023 (2010).[15] S. Song, C. Hu, and M. Q. . Meng, IEEE Transactionson Magnetics , 1 (2016).[16] C. Di Natali, M. Beccani, and P. Valdastri, IEEE Trans-actions on Magnetics , 3524 (2013).[17] N. Wahlström and F. Gustafsson, IEEE Transactions onSignal Processing , 545 (2014).[18] J. J. Jun, A. Longtin, and L. Maler, PLOS ONE , 1(2013).[19] T. D. Than, G. Alici, H. Zhou, and W. Li, IEEE Trans-actions on Biomedical Engineering , 2387 (2012).[20] M. Birsan, IEEE Transactions on Magnetics , 409(2011).[21] IST 8308 - 3D magnetometer - a brief datasheet , iSentek(2017), rev. 1.0.[22] M. Li, S. Song, C. Hu, W. Yang, L. Wang, andM. Q. . Meng, in (2009) pp. 1561–1566.[23] D. F. He and M. Shiwa, Review of Scientific Instruments , 094703 (2011), https://doi.org/10.1063/1.3640412.[24] J. M. G. Merayo, P. Brauer, F. Primdahl, J. R. Petersen,and O. V. Nielsen, Measurement Science and Technology , 120 (2000).[25] A. Zikmund, M. Janosek, M. Ulvr, and J. Kupec, IEEETransactions on Instrumentation and Measurement ,1242 (2015). [26] K. Levenberg, Quarterly of Applied Mathematics , 164(1944).[27] D. W. Marquardt, Journal of the Society for Industrialand Applied Mathematics , 431 (1963).[28] C. Hu, M. Q.-H. Meng, and M. Mandal, Interna-tional Journal of Information Acquisition02