Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To...

7
978-1-5090-2042-3/16/$31.00 © 2016 IEEE 27 Particle Swarm Optimization Algorithm In Calibration of MEMS-based low-cost Magnetometer Mohamed Ayoub Ouni and Rene Jr. Landry Departement de genie electrique Ecole de technologie superieure 1100, rue Notre-Dame Ouest Montreal (Qc) Canada I H3C lK3 e-mail: [email protected] Abstract-In land platform navigation, many systems as Global Positioning System (GPS) and Inertial Nav- igation Systems (INS) are used to get the position and the orientation solutions. Magnetometers are comple- mentary sensors used in the navigation algorithms to achieve heading information based on utilizing Attitude and Heading Reference System (AHRS) model. How- ever, low-cost magnetometers decrease the precision of the navigation system due to their inherent errors. Thus, a calibration process should be conducted as a first step to compensate the deterministic errors. This paper proposes a method to calibrate a three- axis magnetometer using the Particle Swarm Optimiza- tion (PSO) algorithm and the International Geomag- netic Reference Field (IGRF) model. The improved PSO represents the main contribution of the proposed method, which allows the determination of the cali- bration parameters for each magnetometer data, and the IGRF model is used to determine the true total Earth's Magnetic Field (EMF) in each time step. In this work, we compare the precision of the standard PSO against the proposed method which provides higher robustness by achieving a better compensation of the errors effects (hard and soft iron, etc.). Since the hard and soft iron are the most significant errors in a Micro-Electro-Mechanical Systems (MEMS) based low-cost magnetometers, the proposed method aims to compensate these errors with a minimal error relative to the reference EMF. Several tests have been made to evaluate the performance of the proposed method. The raw measurements of a MEMS-based on the low- cost magnetometer have been collected in Montreal (Canada) using a real car in different environments (under high-voltage lines, city center, highway, tunnel, etc.) full of distortion sources for the magnetic field. The proposed method always gets a better accuracy and precision even in a harsh environment for a low- cost magnetometer. Index Terms-Calibration, Magnetometer, hard iron, soft iron, Particle Swarm Optimization (PSO) algorithm, International Geomagnetic Reference Field (IGRF) Model. I. INTRODUCTION Land navigation mostly relies on global positioning system receivers, which can offer an acceptable accuracy in normal conditions when there are no CPS outages. However, they suffer from significant degradations in the reliability of the delivered solution in harsh environments (tunnels, urban areas, etc.) or under a high dynamic (accidents, aggressive driving, etc.). A promising solution is to use low-cost MEMS-based inertial navigation system, which contains accelerometers, gyroscopes, and a micro- processor. These INS allows developing the navigation algorithm to provide an accurate position and orientation for land vehicular navigation by integrating specific forces in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such as a magnetometer to get the heading information through an integrated AHRS model. However, different stochastic and deterministic errors in the low-cost sensors reduce the navigation system's precision. Therefore, to achieve a high accuracy solution with the fusion of these sensors, a calibration process must be conducted as a first step to compensate the deterministic errors [2]. Thus, the calibration process of low-cost sensors becomes an impor- tant tasks in pre-processing for the navigation algorithms. In navigation domain, the calibration of the magnetome- ter is an old and difficult problem which is studied by several research as in [3], [4], [5] and [6]. Besides, it also a significant task when compared to the INS calibration, because the measurements of the magnetic field obtained from the magnetometer are corrupted by additional per- turbations including hard and soft iron errors [7]. More- over, the EMF vector is not constant and it is hard to determine their initial values [7]. Hard and soft iron errors have the most important roles to limit the accuracy and the robustness of magnetometer-based applications. This is due to the nature of these errors, which are not constant by nature and depend on the surrounding environment. Several magnetometer calibration methods determine the calibration parameters from a specific test, as a ro- tation of 360 0 , and then these parameters are applied ev- erywhere. But, since the magnetometer is full of inevitable errors and some of these errors depend on the surrounding environment, the calibration parameters must be adapted if the environment change. In harsh environments, the

Transcript of Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To...

Page 1: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

978-1-5090-2042-3/16/$31.00 © 2016 IEEE 27

Particle Swarm Optimization Algorithm InCalibration of MEMS-based low-cost Magnetometer

Mohamed Ayoub Ouni and Rene Jr. Landry

Departement de genie electriqueEcole de technologie superieure

1100, rue Notre-Dame OuestMontreal (Qc) Canada I H3C lK3

e-mail: [email protected]

Abstract-In land platform navigation, many systemsas Global Positioning System (GPS) and Inertial Nav­igation Systems (INS) are used to get the position andthe orientation solutions. Magnetometers are comple­mentary sensors used in the navigation algorithms toachieve heading information based on utilizing Attitudeand Heading Reference System (AHRS) model. How­ever, low-cost magnetometers decrease the precisionof the navigation system due to their inherent errors.Thus, a calibration process should be conducted as afirst step to compensate the deterministic errors.This paper proposes a method to calibrate a three­axis magnetometer using the Particle Swarm Optimiza­tion (PSO) algorithm and the International Geomag­netic Reference Field (IGRF) model. The improvedPSO represents the main contribution of the proposedmethod, which allows the determination of the cali­bration parameters for each magnetometer data, andthe IGRF model is used to determine the true totalEarth's Magnetic Field (EMF) in each time step. In thiswork, we compare the precision of the standard PSOagainst the proposed method which provides higherrobustness by achieving a better compensation of theerrors effects (hard and soft iron, etc.). Since thehard and soft iron are the most significant errors ina Micro-Electro-Mechanical Systems (MEMS) basedlow-cost magnetometers, the proposed method aims tocompensate these errors with a minimal error relativeto the reference EMF. Several tests have been madeto evaluate the performance of the proposed method.The raw measurements of a MEMS-based on the low­cost magnetometer have been collected in Montreal(Canada) using a real car in different environments(under high-voltage lines, city center, highway, tunnel,etc.) full of distortion sources for the magnetic field.The proposed method always gets a better accuracyand precision even in a harsh environment for a low­cost magnetometer.

Index Terms-Calibration, Magnetometer, hardiron, soft iron, Particle Swarm Optimization (PSO)algorithm, International Geomagnetic Reference Field(IGRF) Model.

I. INTRODUCTION

Land navigation mostly relies on global positioningsystem receivers, which can offer an acceptable accuracyin normal conditions when there are no CPS outages.

However, they suffer from significant degradations in thereliability of the delivered solution in harsh environments(tunnels, urban areas, etc.) or under a high dynamic(accidents, aggressive driving, etc.). A promising solutionis to use low-cost MEMS-based inertial navigation system,which contains accelerometers, gyroscopes, and a micro­processor. These INS allows developing the navigationalgorithm to provide an accurate position and orientationfor land vehicular navigation by integrating specific forcesin the navigation solution [1]. To compensate the drifterrors, others sensors are used in the navigation algorithm,such as a magnetometer to get the heading informationthrough an integrated AHRS model. However, differentstochastic and deterministic errors in the low-cost sensorsreduce the navigation system's precision. Therefore, toachieve a high accuracy solution with the fusion of thesesensors, a calibration process must be conducted as a firststep to compensate the deterministic errors [2]. Thus, thecalibration process of low-cost sensors becomes an impor­tant tasks in pre-processing for the navigation algorithms.

In navigation domain, the calibration of the magnetome­ter is an old and difficult problem which is studied byseveral research as in [3], [4], [5] and [6]. Besides, it alsoa significant task when compared to the INS calibration,because the measurements of the magnetic field obtainedfrom the magnetometer are corrupted by additional per­turbations including hard and soft iron errors [7]. More­over, the EMF vector is not constant and it is hard todetermine their initial values [7]. Hard and soft iron errorshave the most important roles to limit the accuracy andthe robustness of magnetometer-based applications. Thisis due to the nature of these errors, which are not constantby nature and depend on the surrounding environment.

Several magnetometer calibration methods determinethe calibration parameters from a specific test, as a ro­tation of 3600

, and then these parameters are applied ev­erywhere. But, since the magnetometer is full of inevitableerrors and some of these errors depend on the surroundingenvironment, the calibration parameters must be adaptedif the environment change. In harsh environments, the

Page 2: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

28

Fig. 1: Disturbance of ferrous object in uniform magneticfield [10]

The magnetic field vector measured by a low-cost mag­netometer contains other errors that exists in any low­cost sensor such as scale factors, sensor offset and mis­alignments. According to [2], even if there is no magneticintensity, the magnetometer output signal often containsa small voltage offset, this is called "sensor offset". Thescale factors represents the proportional ratio between themagnetometer input and output. The misalignment error

effects of these errors become significant, and so theresults of the calibration parameters are not acceptable.Additionally, the calibration task of the magnetometerremains complex in the environments where there are lotsof ferromagnetic materials. In conclusion, estimating con­tinuously these errors is needed to improve the navigationsolution especially when using a low-cost magnetometer.

This paper presents a calibration model for low-costmagnetometer based on the PSG algorithm and IGRFmodel. A short description of the magnetometer errors andthe mathematical background for calibration are given inSection II, while Section III presents a brief discussion ofthe PSG technique, the IGRF model and the proposedimproved approach. The calibration test results with realmagnetometer data are given in Section IV. The paperends with a conclusion in Section V.

(2)m = S me + b

III. CALIBRATION APPROACH

In this section, we will explain the main parts of theproposed method. We start by a general description ofthe PSG technique and the IGRF model. Then, the im­proved modifications, the relationship and the mechanismbetween them are explained in detailed.

A. Particle Swarm Optimization (PSO)The PSG technique is based on the Swarm Intelligence

(SI) [1], which is an approach of the Artificial Intelligence(AI). The PSG is a new concept for the calibration of theMEMS sensors. The basic PSG algorithm is an iterativealgorithm based on three steps and three parameters

is caused by the slight angle generated between the sensorX-axis and the body-vertical axis during the installation[2]. More exhaustive description of these errors can befound in [3], [5], [9] and [11].

B. Mathematical background for calibrationIn the literature, various magnetic field sensor models

have been developed. According to [11], the overall modelis given by

m = M Insf (Msi me + hhi) + Soff + n w (1)

where m = [mx my mzjT is the measured magnetic fieldvector, me = [mex m ey mezjT is the true magnetic fieldvector, M Insf is a matrix that includes the errors due tomisalignments and scale factors, M si corresponds to thesoft iron errors, hhi to the hard iron errors, Soff to thesensor offset errors and n w to the sensor noise (modeledas white Gaussian noise).The overall model given by Equation (1) can be rewrittento simplify the mathematical formulation by combiningthe error terms that have the same mathematical result[11]. Therefore, we can model together the non-linearerrors (soft iron, misalignments and scale factors) andlinear error (hard iron and sensor offset) [11]. Additionally,the sensor noise term can be ignored due to its smallimpact compared to the other errors and is not part ofthe model used [1]. Therefore, the magnetometer modelis:

where S = M Insf M si is the combination of the non-linearerrors including soft iron errors, and b = M Insf hhi +Soff

is the combined bias caused by the combination of thelinear errors which contains hard iron errors.

For simplicity, in this paper, S is named as "Scalefactor" and b as "bias". The main goal of this paper is tocompensate continuously the errors in the magnetometersignal. Especially, it is the compensation of the hard andsoft iron errors. Since we grouped the hard and soft ironerrors in two terms which are b = [bx by bzjT andS = diag([sx Sy szl) and so, Sand b become the calibra­tion parameters to be determined through the proposedmethod.

II. RELATED CONCEPTS

A. Magnetometer errors

It is well known that the magnetometer is sensitiveto the magnetic field [1], and thus any ferromagneticmaterials in its vicinity can change the surrounding sensedmagnetic field. This point introduces the definition of thehard and soft iron errors.

• Hard iron errors: are caused by magnetized metalsor magnets around the sensor. This nearby ferromag­netic materials produce a constant additive magneticfield that affects the magnetometer's axes [8]. Sincethis error is constant, it can be modeled as a constanterror on the magnetometer measurements [9].

• Soft iron errors: are caused by materials that generatemagnetic fields in response to EMF (See Figure 1).Contrary to the hard iron errors, the soft iron errorsdepends on magnetometer orientation [3]. Addition­ally, the compensation of the soft iron effects is a bitmore difficult than for hard iron effects [10].

D+Ferrousobject

Page 3: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

29

where W is the inertia factor, C1 is the self-confidence,C2 is the swarm confidence and rand1,2 are a randomnumbers uniformly distributed in the range [0, 1].

The PSO algorithm stops when the maximum change inthe best fitness becomes smaller than specified tolerance,or the maximum number of a specified iteration is reached.In each iteration, the PSO algorithm repeats these stepsuntil optimal value is reached or a stop criteria is met

(7)

(8)

TABLE I: Range of the weight factors

[12]. The stop criteria is fixed by the user according to theproblem statement (it is modified in this paper).In this paper, the PSO algorithm is adapted to achievehigh compensation of the hard and soft effects, as dis­cussed in Section III-C.According to [12], the weight factors should be in a specificrange (see Table I) to ensure the convergence of thealgorithm to a local optimum.

_______________ Range Minimum MaximumWeight factors~

Inertia factor (w) 0.4 1.4Self-confidence (cd 1.5 2Swarm confidence (C2) 2 2.5

C. Proposed Improved Approach

Starting by rewriting Equations (5) and (6), we includeanother independent random number, randv , in Equation(5), and we multiply the last term in Equation (6) by acoefficient m. Therefore, Equations (5) and (6) become:

Different suggested approaches are proposed in the lit­erature, as in [6], [12], [13], [14], [15] and [16], to determinethe weight factors. For example, [13] and [16], suggestedthe setting of the Self-confidence (C1) and Swarm confi­dence (C2) to be C1 + C2 = 4.1. Additionally, to choosew, the algorithm should be running with w = 0.9 andthen reduce it to a value of 0.4. This operation allows toknow how the algorithm proceeds with different values ofwand also to discover the value which lets the algorithmto converge faster.

B. International Geomagnetic Reference Field (IGRF)

The IGRF is one of the magnetic field models as theWorld Magnetic Model (WMM), which are used com­monly for navigational purposes [17]. The IGRF model isa standard mathematical description of the Earth's mag­netic field which is used to calculate magnetic declinationand other components of the magnetic field [17]. It isupdated every five years by the International AssociationGeomagnetism and Aeronomy (IAGA), the latest beingthe 12th generation that is valid for the period 1900-2020[18]. The IGRF model needs navigation and coordinateinformation to calculate the components of the magneticfield. The overall accuracy of the IGRF model is less than10 in declination and 0.01 mG in EMF [17], [19]. The IGRFmodel is available in Matlab [20], and the version 1.12 ofthis model under Matlab is used in our framework.

(6)

(5)

(4)i xbV o = -

b.twhere b.t is the time, X max and Xmin are the vectorsof lower and upper limit values, rand is uniformlydistributed random variables in the range [0, 1].

• Evaluation of fitness values: this step determines thebest position of particles by determining the twofollowing parameters: (1) the best global value, p~,

in the current swarm and (2) the best position ofeach particle, pi, among the current and all previousmoves. These values are determined using the objec­tive function (to calculate the fitness values), whichis defined in Section III-C.

• Velocities and Positions updates: after determiningthe fitness values of iteration k, the next step isdesigned to update the velocities and the positionsin the iteration k + 1 of all particles as follows:

i i (pi - X~)Vk+l = W . Vk + C1 . rand1 . b.t

(pg-xi

)+ C2 . rand2 . k b.t k

(features) to be determined during each iteration [12]. Thethree steps are: (1) generating particles' positions/veloci­ties, (2) evaluation of fitness and (3) positions/velocitiesupdate. The three parameters are:

• Position x~: particle's position in the search space.• Velocity v~: velocity of the particle's position, used

to compute the next position.• Fitness values f(xU: determines, in each iteration,

which particle has the best fitness value and the bestposition of each particle in the swarm.

i (i1 i2 iN) i (i1 i2 iN)where x k = x k ' x k , ... , x k ,vk = v k ' v k , ... , v k andi is the ith particle of iteration k with N dimensionalsolutions for x~ and v~.

In the search space, each particle has its own features(Position, Velocity and Fitness value). The particles area set of feasible solutions employed by the PSO technique[1], [13].The PSO algorithm consists of the following steps:

• Initialization of the swarm of particles: choosing arandom positions, xb, and velocities, vb, inside thesearch space by using Equations (3) and (4) [13].

xb = Xmin + rand· (xmax - Xmin) (3)

Page 4: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

30

Highwilycoursewithviaducts

Dlrtction of the trilvel

Hlj;hDistortlonoftheEMF

Stop criteria is OK?

Calibration parameters

No

ReferenceEMF

ND

3-axis Ma netometer

Proposed method

GPS receiver

IV. EXPERIMENTAL RESULTS

As discussed in Section III-C and as initial conditions,the weight factors in this paper are chosen as: w = 0.9,Cl = 2, C2 = 2 and m = 0.74. Here, the number of particlesand iterations are selected to be 18 and 45, respectively,which are large enough to get good results because, theselatter two depend on the used hardware performance.

Fig. 3: Route test illustrated on map (Map data: Google,DigitalGlobe) and events description

Fig. 2: Architecture of the proposed calibration method

A. Description of materials and the Route test

Several tests have been made to evaluate the perfor­mance of the proposed method. The materials used inthose experiments are: a low-cost magnetometer and aGPS receiver integrated in a Micro-Intelligent Black Box(Micro-IBB), which has been developed by the LASSENAlaboratory [23]. Table II summaries the features of thesedevices.The raw data have been collected using a real car onMay 25, 2015 in Montreal (Canada). The travel, shownin Figure 3, was 22.1 km long and lasts approximately 20minutes.

(9)

where m is the inertial control and randv is a uniformlydistributed random variable in the range [0,1].The difference between Equation (5) and (7) is that theinertia factor corresponding to w in (5) and randv . win (7). In this case, w is a static factor in Equation (5)while randv . w is a dynamic factor in Equation (7). So,the inertia force becomes a uniformly distributed randomnumber in the range [0, w] in Equation (7). This term isresponsible for the control of the current direction andvelocity of the particles [13]. Since it is static in Equation(5), the particles will be pushed in its old direction.Consequently, if the old direction is wrong then the resultwill not converge or will need more time to converge. So,with Equation (7), the inertia can push particles to findand explore new positions and directions in new regions[15], [21].The inertial control m controls how the velocity affectsthe update in the position [15], [22]. In Equation (8), theaim of the modification is to accelerate the convergence tothe global optimum solution, i.e. to clamp the velocity toavoid it from exploding [13].For the i th magnetometer sample of the iteration k, thebias and scale factors values corresponds to the valuesof x~ of the optimal solutions. So, for each magnetome­ter sample (see Figure 2), we calculate the best fitnessvalue (Equation (9)) obtained by the objective function tooptimize the calibration parameters. To obtain the bestfitness value, we calculate over n iterations the fitnessvalues by using the values of the bias (b) and scale factors(8) updated with Equations (8) and (7). The best fitnessvalue is the smallest values among all the fitness valuescalculated. The bias and scale factors that provide, in thekth iteration, the best fitness value are considered as thecalibration parameters optimized for the i th magnetometerdata.

The algorithm repeats this cycle until a stopping conditionis met such as: minimal error is obtained, traveled alldata. To obtain the real bias and scale factors with thePSO algorithm as well as to maintain the minimum errorbetween the known reference and the calibrated magni­tude, we implemented a processing criterion. This oneconsists in searching the bias and the scale factor in aspecific range, which is the interval [-2 2] for both. Infact, the computed bias and scale factors obtained fromthe calibration algorithm could not match the real valuesof these parameters if the proposed criterion is not addedas it is shown in [1].In this paper, the IGRF model is used to calculate themagnitude of the EMF, II mei II, of the ith sample data byentering the longitude, latitude and height of the currentplace from the GPS receiver. II mei II is considered as areference of magnitude of the EMF. Figure 2 shows a blockdiagram of the complete calibration procedure.

Page 5: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

31

TABLE II: Devices features(al

_____ DeviceFeature _____

FrequencySensitivitySensibility

Magnetometer(LSM303DLHC)

200 Hz0.5 G

±2.5 G

GPS receiver(u-blox: LEA-6T-0)

<5 Hz-160 dBm

N/A

§: 1.5~

"C3 1..,~::EO.5 ......~_

600 800

340

(bl

T400 600 800 1000

Time [s]

-Raw X-axis -Raw Y-axis -Raw Z-axis

·1

·1.5

1.5

_ 0.5!2.• 0-

~_O.5~a~~

1.5~~--~---~-----iSecllon2

Section 1

920

§:1.5

Time [5]

§: 1

=~ o.

" 1

i05.~~~~~M~~~

Fig. 6: Raw and calibrated measurements for Section 1and 2

Fig. 5: Magnitude and components of the raw magneticfield obtained with the low-cost magnetometer

B. Results and discussion

1) Route test: Figure 4 shows the magnitude and com­ponents of the EMF obtained with the IGRF modelduring the test. The maximum variation reached in thecomponents of the reference EMF is 3· 10-4 G, preciselyin Z-axis as shown in Figure 4d. This small variation islogical since the distance traveled is only 22.1 km. For along driving mission, the variation will be greater and theEMF can not be supposed as constant. Consequently, therole of the IGRF model becomes necessary.Figure 5 shows the magnitude and components of theraw magnetic field obtained through the low-cost mag­netometer. In this figure, there is a high distortion ofthe magnetic field during two periods (Sections 1 and 2).This distortion is due to the passage under high-voltageunderground lines in the Ville-Marie tunnel [24], whichproduce an additive magnetic field implying hard and softiron effects. This distorsion will be compensated thereafterusing our calibration method.Figure 6 shows the raw and reference EMF as well as thecalibrated data using the standard PSG and the proposedmethod for sections 1 and 2. The proposed method getsmore accuracy in terms of compensation of the hard andsoft iron effects. Figure 7 presents the errors obtained inthe first and the second section of Figure 6. This figureclearly shows that these errors are much smaller with theproposed calibration approach.

Secllon2

Time [5)

Section 1

Fig. 7: Error between reference and calibrated magnitudefor Section 1 and 2

(bl

(d)

400 600 1000Time [5]

(al0.177

~0.177

.~ 0.177

~ 0.1769c~ 0.1768

u:: 0.1768

400 600 1000Time[s]

(el

.... 0.5087!2..~ 0.5086

~ 0.5086c~ 0.5085

u:: 0.5085

0.5084400 600 1000 0

Time[s]

0.5405

~-8 0.54043.~ 0.5404~

0.5404

0.5405~-------~

-0.04610'------,....,---...,..---,-,----!

-0.0458~-------~

_ -0.0459!2..~ -0.0459

X -0.046co~ -0.046

u:: -0.0461

Fig. 4: Magnitude and components of the EMF obtainedwith IGRF model

Page 6: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

32

2) Rotation test: To validate the performance of theproposed method, we applied our calibration methodto the magnetometer measurements when the sensor isturned 3600 during a few seconds by hand on a flat surfaceand then it is rotated arbitrarily around its three axes. Atthe beginning of the test, the Z-axis is pointing towardsthe center of the Earth and the X and Y-axis are in thehorizontal plane. Figure 8a shows the good convergence ofour method, where the X-axis plotted with respect to theY-axis forms a circle centered on zero. In addition, Figure8c shows a perfect sphere with a radius II rnei II and center(0,0,0) of the calibrated data with the proposed method.Even if the raw signal contains peaks, these latter can beremoved using our method (see Figure 8b), while it is notthe case for the standard PSO.

(.)

the calculation of the heading during all the route test andespecially in Sections 1 and 2.

200,-----,-------,------,-----r=~:;;;;;;h,;d~___:__:I

'50

'00

50

TABLE III: Performance of proposed method

Table III, recapitulates the accuracy and the statisti­cally significant results for all the tests.

Fig. 8: Calibration results. (a): Rotation test of 3600

around the XY-plane. (b) and (c): Arbitrary rotationaround the three axes of the magnetometer.

-ZOOOC---'=OOo-------040=-0-----=600o-------O.=-00---,:7:00=-0----::1200Time [5]

[1] A. Ali, S. Siddharth, Z. Syed, and N. El-Sheimy, "Particle swarmoptimization algorithm based low cost magnetometer calibra­tion," Archives of Photogrammetry, Cartography and RemoteSensing, vol. 22, no. 1, pp. 9-23, 2011.

[2] Y. X. Liu, X. S. Li, X. J. Zhang, and Y. B. Feng, "Novel cal­ibration algorithm for a three-axis strapdown magnetometer,"Sensors, vol. 14, no. 5, pp. 8485-8504, 2014.

[3] D. Gebre-Egziabher, G. Elkaim, J. D. Powell, and B. Parkinson,"A non-linear, two-step estimation algorithm for calibratingsolid-state strapdown magnetometers," in 8th International St.Petersburg Conference on Navigation Systems (IEEEIAIAA),2001.

REFERENCES

Fig. 9: Heading during the route test

V. CONCLUSION

In this paper, a method of calibration has been pre­sented for MEMS-based low-cost magnetometer. Thismethod uses the artificial intelligence, which is a newconcept in the calibration of the MEMS low-cost sensors,to compensate the hard and soft iron errors continuously.The results show a good performance in terms of accuracyin different situations and, especially, in harsh environmentfor low-cost magnetometer. The first main advantage ofthis method is the simple implementation. In fact, thisalgorithm does not need the error modeling matrix as inKalman filtering, and then the mathematical computationis simplified. The second advantage is the robustness ofthis algorithm since the convergence is ensured even inhigh distortion of the magnetic field. This calibrationapproach can be employed in real time and then, it willbe highly needed in case of many applications fields tocalibrate a MEMS-based low-cost magnetometer and im­proves the accuracy. In addition, the proposed method canbe applied for any type of recording of the magnetometerdata and it does not need a specific test as rotation of 3600

or around its three axes.

-0.5X-axis [G)

-0.4 -0.2 0 0.2 0.4 0.6X-axis (G]

°OC---;,";;"""O----0':;;-0----03:;;-0----c4:;;-0~Time[s)

0.'

3) Impact of the calibration algorithm on the headingdetermination: Here, we prove the performance of theproposed method when it is a part of the navigationalgorithm even with a basic model of calculation of theheading. Figure 9 shows the heading with raw and cali­brated data. It shows that, the proposed method improves

~ RMSE STD MEANTest

Standard PSO (Section 1) 0.0998 0.0825 0.0561Proposed method (Section 1) 0.0033 0.0033 2.21e-5Standard PSO (Section 2) 0.0809 0.0777 0.0225Proposed method (Section 2) 0.0037 0.0037 4.7e-5Standard PSO (360° rotation) 0.0363 0.0359 0.0059Proposed method (360° rotation) 2.836e-4 2.836e-4 5e-7

Page 7: Particle Swarm Optimization Algorithm in Calibration of ...in the navigation solution [1]. To compensate the drift errors, others sensors are used in the navigation algorithm, such

33

[4] S. A. H. Tabatabaei, A. Gluhak, and R. Tafazolli, "A fastcalibration method for triaxial magnetometers," IEEE Trans­actions on Instrumentation and Measurement, vol. 62, no. 11,pp. 2929-2937, 2013.

[5] J. Vasconcelos, G. Elkaim, C. Silvestre, P. Oliveira, andB. Cardeira, "Geometric approach to strapdown magnetometercalibration in sensor frame," IEEE Transactions on Aerospaceand Electronic systems, vol. 47, no. 2, pp. 1293-1306,2011.

[6] Z. Wu, Y. Wu, X. Hu, and M. Wu, "Calibration of three­axis magnetometer using stretching particle swarm optimizationalgorithm," IEEE Transactions on Instrumentation and Mea­surement, vol. 62, no. 2, pp. 281-292, 2013.

[7] T. Von Marcard, "Design and implementation of an attitudeestimation system to control orthopedic components," Master'sthesis, Chalmers University of Technology, Sweden, 2010.

[8] S. Kwanmuang, L. Ojeda, and J. Borenstein, "Magnetometer­enhanced personal locator for tunnels and gps-denied outdoorenvironments," in SPIE Defense, Security, and Sensing. Inter­national Society for Optics and Photonics, 2011, pp. 801900­801900.

[9] K. Mohamadabadi, A. Jeandet, M. Hillion, and C. Coillot, "Au­tocalibration method for anisotropic magnetoresistive sensorsusing offset coils," Sensors Journal, IEEE, vol. 13, no. 2, pp.772-776, 2013.

[10] M. J. Caruso, "Applications of magnetic sensors for low costcompass systems," in Position Location and Navigation Sympo­sium. IEEE, 2000, pp. 177-184.

[11] M. H. Afzal, "Use of Earth's Magnetic Field for pedestriannavigation," Ph.D. dissertation, University of Calgary, Canada,July 2011.

[12] R. Hassan, B. Cohanim, O. De Week, and G. Venter, "Acomparison of particle swarm optimization and the geneticalgorithm," in Proceedings of the 1st AIAA multidisciplinarydesign optimization specialist conference, 2005, pp. 1-13.

[13] W. Elshamy, "Using artificial intelligence models in systemidentification," Master's thesis, Faculty of Engineering at CairoUniversity, Egypt, 2013.

[14] A. Ali, "Low-cost sensors-based attitude estimation for pedes­trian navigation in GPS-denied environments," Ph.D. disserta­tion, University of Calgary, Canada, September 2013.

[15] B. Jiao, Z. Lian, and X. Gu, "A dynamic inertia weight particleswarm optimization algorithm," Chaos, Solitons €3 Fractals,vol. 37, no. 3, pp. 698-705, 2008.

[16] M. Clerc and J. Kennedy, "The particle swarm-explosion, sta­bility, and convergence in a multidimensional complex space,"IEEE Transactions on Evolutionary Computation, vol. 6, no. 1,pp. 58-73, 2002.

[17] Government of Canada. (2015, 04) Natural re-sources canada. Accessed: 2015-02-15. [Online]. Available:http://www.geomag.nrcan.gc.ca/mag_fld/magref-en.php

[18] NOAA. (2015, 04) 12th generation igrf releaseddecember, 2014. Accessed: 2015-10-15. [Online]. Available:http://www.ngdc.noaa.gov/IAGA/vmod/

[19] F. Lowes. (2010) The international geomagnetic reference field:A "health" warning. Accessed: 2015-3-26. [Online]. Available:http://www.ngdc.noaa.gov/IAGA/vmod/igrfhw.html

[20] MathWorks, Inc. (2015) International geomagnetic referencefield (IGRF) model. Accessed: 2015-3-3. [Online]. Available:http://www.mathworks.com/matlabcentral/fileexchange/34388­international-geomagnetic-reference-field-igrf-model

[21] H. M. Emara, W. Elshamy, and A. Bahgat, "Parameter iden­tification of induction motor using modified particle swarmoptimization algorithm," in IEEE International Symposium onIndustrial Electronics, 2008, pp. 841-847.

[22] M. Clerc, "Standard particle swarm optimisation," HAL openaccess archive, vol. hal-00764996, pp. 1-15, Decembre 2012.

[23] A. Mixte, "Projet ibnav : deloppement d'un prototype decapture de mouvements et de navigation interieure base surl'utilisation de plateformes imu-mems a faible coiit," Master'sthesis, Ecole de Technologie superieure, Canada, 2015.

[24] M.-E. Fortin, D. Talbot, and M.-P. Chouinard, "Rapportd'analyse environnementale pour Ie projet de reconstruction duposte de lorimier a 315-25 kV et lignes souterraines a 315 kV sur

Ie territoire de la ville de montreal par hydro-quebec," Hydro­Quebec, Tech. Rep., 2014.