nd Intenational Foum on Electical Engineeing and Automation (IFEEA 5 Magnetomete Calibation Algoithm Based on Analytic Geomety ansfom Yongjian Yang, Xiaolong Xiao,u Liao College of Compute Science and echnology, Jilin Univesity, Changchun 3, China xiaoxl3@63.com Keywods: magnetomete calibation, tilted ellipse, analytic geomety, geomety tansfom Abstact: Based on the analysis of ad- and Soft- Ion effects of magnetomete s eos, a tilted ellipse model fo two-dimensional plane was fomulated. Accoding to the analytic geomety theoy, a magnetomete calibation algoithm was poposed to calibate the tilted ellipse into a standad cicle by tanslation, otation and scaling thee steps, achieving the aim of magnetomete calibation. he expeimental esults show that the poposed algoithm calibated the tilted ellipse appoximately to a standad cicle which had eliminated the combined ad- and Soft- Ion effects successfully. Intoduction Magnetometes measue the stength of magnetic fields and widely applied in science, engineeing[]. Accoding to the old Magnetic Model[], the stength of geomagnetic field in a place is constant, so magnetometes ae often used to measue it to detemine the geogaphic oientation. But eos occu as magnetomete eadings ae also subject to magnetic distotions and nonideal manufactue techniques such as zeo-offset, had ion, soft ion, scaling and non-othogonality, the fist two can be gouped as ad-ion offset, emaining as Soft-Ion effect[3]. hen calibation algoithm is needed to eliminate them, [4] used a compass swinging algoithm fo two-dimensional heading detemination system, [5] used ecusive least squae algoithm fo thee-dimensional magnetic deviation compensation, [6] used ellipse matching eo compensation algoithm fo two-dimensional magnetic compass; Fo simplicity, this pape fist poposed a two-dimensional algoithm based on analytic geomety tansfom. Ideally, he eadings (mx[i], [i] fom a magnetomete when otating in the hoizontal plane is a standad cicle. Given the eos, the cicle is tansfomed into a tilted ellipse. he poposed algoithm is based on this geomety model, tansfoming the tilted ellipse into the cicle by tanslation, otation, scaling to achieve magnetomete calibation. Expeimental esults show that the algoithm pefomed well to calibate magnetometes in eality. his pape is oganized as follows. In the next section, magnetomete eos ae analyzed, a calibation model is fomulated. he detailed algoithm is pesented in the thid section. Expeimental esults obtained with a low-cost magnetomete ae pesented and discussed in the fouth section. he last section daws concluding emaks and comments on futue wok. Magnetomete eos and calibation model In this section, magnetomete eos ae analyzed, a calibation model is fomulated. Magnetomete eos ad-ion offset he zeo-offset is a vecto Vzeo, the pemanently magnetized feomagnetic components in the vicinity of a magnetomete is a vecto Vh. Both Vzeo and Vh ae time invaiant, and simply add to the eadings which can be gouped as ad-ion offset V. V = Vzeo + Vh ( Soft-Ion effect A linea time-vaying magnetic field geneated by magnetically soft mateials is soft ion 6. he authos - Published by Atlantis Pess 96
distotion which can be modeled by a matix soft. he sensitivities of each sensing axis ae not exactly equal, a diagonal gain matix gain can be modeled. he last non-othogonality eo can be modeled by a matix no caused by non-othogonal sensing axes installation. Soft ion, scaling and non-othogonality can be gouped as Soft-Ion effect, as they togethe make a standad cicle become a tilted ellipse. hen the Soft-Ion matix is Eq.. = no gain soft ( Magnetomete calibation model Given the combined effects of ad- and Soft- Ion, a model between magnetomete eadings m and the tue local geomagnetic is fomulated as Eq. 3. m = + V (3 Deived fom Eq. 3, ( m V (4 { ( m V } ( m V ( m V ( ( m V (5 As the tue local geomagnetic A ( is a constant vecto, and the matix A in Eq. 6 is symmetic, (6 he geneal matix fom expession defining the locus of a vecto Q wandeing on the cuve of an ellipse with cente at Q is (whee A must be a symmetic matix: ( Q Q Q A( Q const (7 As Eq. 5 and Eq.7 ae simila, the locus of magnetomete eadings is an ellipse defined by Eq. 5. he ellipse is centeed at the ad-ion offset V, and has a tilted shape detemined by matix A = ( - -. Algoithm implementation details In this section, the details of poposed algoithm is pesented. Accoding to the geometic theoy, the max distance between two points on an ellipse cuve is the length of the majo-axis, the two points ae the two end points of the majo-axis, and the cente of the two points is the vey cente of ellipse. Using the eadings collected by the magnetomete and Eq. 8 a max( ( [ i] [ j] ( [ i] [ j] (8 mx to find the two points ( [ a ], [ a] hen the cente of the ellipse o the ad-ion offset is: mx mx, [ a ], [ ] ( mx a. 97
V mx[ a] mx[ a ] /, ( [ a] (( [ a ] / (9 Using m -V tanslation to move the ellipse to the oigin, as is shown in Fig.. Fig. anslation of Ellipse he tilted o otation angle β of the ellipse can also be deived fom Fig., sin [ a ] v / a k cos [ a a k ( mx ] v / whee v and v ae the elements of V, a is the length of semi-majo axis. Based on the otation theoy of two-dimensional space[7], otating a tilted ellipse back to a standad ellipse need to pemultiply a otation matix defined in Eq.. cos sin k k R ( ( sin cos k k By otation of e R( ( m V to obtain a standad ellipse. Given the popeties of standad ellipse, the factos of X and Y axis ae: X max(, ( ey max ey min /( ex max ex min Y max(,( /( ( exmax exmin ey max ey min whee eymax is the max element of vecto e, so it is with the othe. Finally X (3 Y R( ( m V (4 he poposed algoithm can be summaized as follows: Using Eq. 8, 9 to find the ad-ion offset V,then use tanslation to obtain 98
m -V ; Using Eq., to find the otation matix R (,then use otation to obtain e R( ( m V ; 3 Using Eq., 3 to find the facto,finally to obtain the calibated value R( ( m V, and find the solution of the afoementioned calibation model compaed with Eq. 4: V V R ( β (5 Expeimental esults In this section, the poposed algoithm is validated using expeimental data fom a low-cost magnetomete installed on a wieless senso node. A set of data points obtained fom a AK8963 3-axis magnetomete(only the X and Y axes data in the hoizontal plane wee ecoded with a.5μ/lsb sensitivity, sampled with a Amega38 MCU(Mico Contolle Unit, tansmitted by a Xbee4 RF(Radio Fequency module, at z. he hadwae is shown in Fig.. Fig. ieless Senso Node Fig. 3 Contast though Calibation By pogamming matlab codes to implement the poposed algoithm and unning on the aw data set to obtain the solution: V V (5.735, 9.5.43 -.696 R( β.468.989 (6 Using Eq. 4, 6 to calibate the aw data is shown in Fig.3. As is shown in Fig. 3, the calibated data locus was appoximate to a standad cicle, which validates the poposed algoithm which had eliminated the combined ad- and Soft- Ion effects successfully. Conclusions he ad- and Soft- Ion effects of magnetomete eos wee analyzed, the magnetomete calibation model was fomulated, and it was shown that the magnetomete aw measuement data sets fom a tilted ellipse. he solution of the expeimental data set was deived and tested using matlab codes. he poposed magnetomete calibation algoithm based on analytic geomety tansfom was deived. Expeimental esults fo low-cost magnetomete show that the poposed 99
algoithm pefomed well by using tanslation, otation, scaling to eliminate the ad- and Soft- Ion effects eos fo two-dimensional magnetomete eadings. Futue wok will include the expansion of the poposed algoithm to the thee dimensional case. Acknowledgements his wok is suppoted by National Natual Science Foundation of China (No. 674. Refeences [] Infomation on https://en.wikipedia.og/w/index.php?title=magnetomete [] Infomation on http://www.ngdc.noaa.gov/geomag/mm/dodmm.shtml. [3] Gebe-Egziabhe, Demoz, Gabiel. Elkaim, J. David Powell, and Badfod. Pakinson 6 Jounal of Aeospace Engineeing 9(: 87. [4] Nathaniel Bowditch. he Ameican Pactical Navigato. Defense Mapping Agency, ydogaphic/opogaphic Cente, Bethesda, Mayland, USA, 995. [5] Pengfei Guo, Chunhong ua, Zhang Ren, Xinchun Ding. Magnetic deviation compensation using ecusive least squae fo ARS [J]. Jounal of Chinese Inetial echnology. 8(. In Chinese. [6] Yong Qin, Jie Zhao, Xiaoyu ang. Digital magnetic compass based on ellipse matching eo compensation algoithm[j]. Jounal of Jilin Univesity: Engineeing and echnology Edition, 9, 39(: 489-493. In Chinese. [7] Infomation on https://en.wikipedia.og/w/index.php?title=rotation_matix