95

TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

  • Upload
    dangnhu

  • View
    216

  • Download
    2

Embed Size (px)

Citation preview

Page 1: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate
Page 2: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

TRITA-EE 2007:048

Numerical Modeling and Evaluation of

the Small Magnetometer in Low-Mass

Experiment (SMILE)

Space and Plasma PhysicsRoyal Institue of Technology

Israel Alejandro Arriaga Trejo

August 2007

Page 3: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate
Page 4: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

ABSTRACT

Fluxgate magnetometers have played a major role in space missionsdue to their stability, range of operation and low energy consump-tion. Their principle of operation is relatively simple and easy toimplement, a nonlinear magnetic material is driven into saturationby an alternating excitation current inducing a voltage that is mod-ulated by the external field intended to be measured. With the in-creasing use of nanosatellites the instruments and payload on boardhave been reduced considerably in size and weight.The Small Magnetometer in Low-Mass Experiment, SMILE, is aminiaturised triaxial fluxgate magnetometer with volume compen-sation incorporating efficient signal processing algorithms within afield programmable gate array (FPGA). SMILE was designed in col-laboration between the Lviv Centre of Institute of Space Researchin Ukraine where the sensor was developed and the Royal Instituteof Technology (KTH) in Stockholm, Sweden where the electronicsused to operate the instrument were designed and programmed. Thecharacteristic dimensions of the SMILE magnetometer and geome-try of its parts make impractical the task to find an analytical ex-pression for the voltages induced in the pick-up coils to evaluate itsperformance. In this report, the results of numerical simulations ofthe SMILE magnetometer using a commercial finite element method(FEM) based software are presented. The results obtained are com-pared with the experimental data available and will serve as a firststep to understand the behaviour of the nonlinear components thatcould lead to improvements of its design in a future.

Page 5: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

CONTENTS

1. Theoretical Background . . . . . . . . . . . . . . . . . . . 81.1 Maxwell’s Equations . . . . . . . . . . . . . . . . . . 8

1.1.1 Magnetostatics . . . . . . . . . . . . . . . . . 91.1.2 Induced currents . . . . . . . . . . . . . . . . 121.1.3 Inductance . . . . . . . . . . . . . . . . . . . . 131.1.4 Magnetism in matter . . . . . . . . . . . . . . 141.1.5 Boundary conditions . . . . . . . . . . . . . . 17

1.2 A glimpse into the history of magnetism . . . . . . . 18

2. Fluxgate Magnetometers . . . . . . . . . . . . . . . . . . . 222.1 Principle of operation . . . . . . . . . . . . . . . . . . 222.2 Single core sensor . . . . . . . . . . . . . . . . . . . . 23

2.2.1 Induced voltage . . . . . . . . . . . . . . . . . 262.3 Double core sensor . . . . . . . . . . . . . . . . . . . 28

2.3.1 Induced voltage . . . . . . . . . . . . . . . . . 282.4 Volume Compensation . . . . . . . . . . . . . . . . . 29

3. Simulation software . . . . . . . . . . . . . . . . . . . . . . 323.1 The COMSOL Multiphysics software . . . . . . . . . 32

3.1.1 3D Electromagnetics Module . . . . . . . . . . 323.1.2 Mesh generation . . . . . . . . . . . . . . . . 333.1.3 Solvers . . . . . . . . . . . . . . . . . . . . . . 34

3.2 Finite Element Method . . . . . . . . . . . . . . . . . 353.2.1 Distinctive Features . . . . . . . . . . . . . . . 39

4. Accuracy estimation . . . . . . . . . . . . . . . . . . . . . 404.1 Sphere of permeable material inmersed in a uniform

magnetic flux density . . . . . . . . . . . . . . . . . . 404.2 Theoretical solution . . . . . . . . . . . . . . . . . . . 404.3 Numerical Solution . . . . . . . . . . . . . . . . . . . 42

Page 6: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

Contents 2

5. The SMILE Magnetometer . . . . . . . . . . . . . . . . . . 475.1 Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . 475.2 Electronics . . . . . . . . . . . . . . . . . . . . . . . . 48

6. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516.1 Fluxgate element . . . . . . . . . . . . . . . . . . . . 516.2 Double core . . . . . . . . . . . . . . . . . . . . . . . 596.3 Excitation circuit . . . . . . . . . . . . . . . . . . . . 636.4 Compensation coils . . . . . . . . . . . . . . . . . . . 68

7. Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Appendix 79

Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

A. Code for sphere of permeable material . . . . . . . . . . . 80

B. Code for the simulation of the double core . . . . . . . . . 87

Page 7: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

LIST OF FIGURES

1.1 The upper figure shows the dependance of the relativepermeability µr with the magnetic field for a nonlin-ear material. In the bottom figure, a characteristicB −H curve is shown. . . . . . . . . . . . . . . . . . 18

2.1 In the single core configuration a nonlinear magneticmaterial is surrounded by excitation coils where thecurrent that saturates the core periodically flows. . . 24

2.2 B − H curve of the core, the saturation is attainedfor Hmax = 10A/m with Bsat = 0.5T. . . . . . . . . . 26

2.3 (Top) Excitation field with amplitude H0 = 15A/mand period τ = 125µs. (Centre) Magnetic flux den-sity inside the magnetic material. No external mag-netic field is present. (Bottom) Induced voltage inthe sensing coil for N = 1 and Asns = 1 cm2. . . . . 27

2.4 (Top) Excitation field with amplitude H0 = 15A/mand period τ = 125µs. (Centre) Magnetic flux den-sity inside the magnetic material. An external mag-netic field Hext = 3A/m is present. (Bottom) Inducedvoltage in the sensing coil for N = 1 and Asns = 1cm2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

2.5 Double core sensor used in the SMILE magnetome-ter. The cores are two tapes of an amorphous alloywith dimension 16x1x0.02mm. The excitation coilsare wound around each core and are connected in se-ries (800turns). The pick-up coils surround the wholeconfiguration. . . . . . . . . . . . . . . . . . . . . . . 29

2.6 Excitation field driving the cores. Both cores arewound by the same coil in opposite direction and areconsdiered to be identical, the excitation fields sat-isfy the relation Hexc1 = −Hexc2. The period of theexcitation field is τ = 125µs. . . . . . . . . . . . . . . 30

Page 8: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

List of Figures 4

2.7 Magnetic flux density inside the cores when an exter-nal magnetic field Hext = 3A/m is present. . . . . . . 30

2.8 Induced voltage in the sensing coil for N = 1, Asns =2 cm2 and τ = 125µs for the double core sensor. . . 31

3.1 Mesh of the SMILE model in COMSOL. The geome-try has been decomposed in a total of 68873 elements. 34

3.2 Base function and its derivative for k = 2, when thegeometry has been meshed with n = 5 elements. . . . 36

3.3 Solution of Poisson equation in the unit interval [0, 1]using the FEM for ρ = 1 and ǫ = 1. The approxi-mate solutions were calculated using 5 and 10 meshelements of the unit interval. . . . . . . . . . . . . . . 38

4.1 Sphere of permeable material inmersed in an uni-form magnetic flux density of 1mT. The radius ofthe sphere is 1cm and µr = 4 × 104. . . . . . . . . . . 41

4.2 Comparison of the numerical and theoretical solutionat z = -45mm. The length of the simulation box is30cm and the SPOOLES solver together with a finemesh were used to obtain the numerical solution. . . 43

4.3 Comparison of the numerical and theoretical solutionat z = -20mm. The length of the simulation box is30cm and the SPOOLES solver together with a finemesh were used to obtain the numerical solution. . . 44

4.4 Comparison of the numerical and theoretical solutionat z = 0mm. The length of the simulation box is 30cmand the SPOOLES solver together with a fine meshwere used to obtain the numerical solution. . . . . . . 45

4.5 Estimated error for the numerical solutions obtainedusing different meshing modes. . . . . . . . . . . . . . 46

5.1 SMILE magnetometer. The sensor has a mass of 21gand dimensions of 2cm per side. . . . . . . . . . . . 48

5.2 Electronic board containing the FPGA, microcon-troller and additional components used to operatethe instrument. The board was designed at the de-prtament of Space and Plasma Physics in The RoyalInstitute of Technology (KTH). . . . . . . . . . . . . 49

Page 9: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

List of Figures 5

5.3 Block diagram of the different modules implementedin the electronic board. . . . . . . . . . . . . . . . . . 49

6.1 COMSOL model of the fluxgate element with cor-responding pick-up coils used in the SMILE magne-tometer. . . . . . . . . . . . . . . . . . . . . . . . . 52

6.2 Measured inductance of the three pick-up coils of Sen-sor 6. . . . . . . . . . . . . . . . . . . . . . . . . . . 52

6.3 Magnetic flux density produced when a current of10µA flows through the pick-up coils. The number ofelements used to mesh the geometry is 43088. . . . . 54

6.4 Inductance of the pick-up coils as a function of therelative permeability of the cores. . . . . . . . . . . . 55

6.5 Magnetic flux through a circular region with radiusb = 8cm situated at z = 0cm. The radius of thesphere is a = 1cm and the magnitude of the inductionfield B0 = 1mT. . . . . . . . . . . . . . . . . . . . . . 56

6.6 B-H curves for different values of the α parameter.The maximum induction field is 0.36T. . . . . . . . . 57

6.7 Inductance of the pick-up coils for different values ofthe α parameter in model (6.6). . . . . . . . . . . . . 57

6.8 Measured and simulated inductance of the pick-upcoils for Sensor 6. . . . . . . . . . . . . . . . . . . . . 60

6.9 Measured and simulated inductance for Sensor 6 fordifferent turns in the pick-up coils. . . . . . . . . . . 60

6.10 Measured and simulated inductance for Sensor 6 fordifferent saturation values. . . . . . . . . . . . . . . . 61

6.11 Nonlinear cores with respective excitation coils. Eachexcitation coils consists of 800 turns. . . . . . . . . . 62

6.12 Magnetic flux through the pick-up coils for differentvalues of the excitation current and external induc-tion field. . . . . . . . . . . . . . . . . . . . . . . . . 62

6.13 Distribution of the magnetic flux density [T] alongthe axis of one core when no external magnetic fieldis present. . . . . . . . . . . . . . . . . . . . . . . . . 63

6.14 Magnetic flux density (norm) [T] inside the cores fordifferent excitation currents and external fields. . . . 64

6.15 Magnetic field (norm) [A/m] inside the cores for dif-ferent excitation currents and external fields. . . . . . 65

Page 10: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

List of Figures 6

6.16 Relative permeability of the cores for different exci-tation currents and external fields. . . . . . . . . . . 66

6.17 Excitation current used to saturate the cores. . . . . 676.18 Magnetic flux and induced voltage in the pick-up coils

when different external induction fields are present. . 676.19 Resonant circuit used to generate the excitation cir-

cuit. The circuit elements r and Lc represent the in-put resistance and inductance of the excitation coilsrespectively. . . . . . . . . . . . . . . . . . . . . . . . 68

6.20 Inductance of the excitation coils. . . . . . . . . . . . 696.21 Block diagram model of the resonant circuit shown

in Figure 6.19 used in Simulink to determine the ex-citation current. . . . . . . . . . . . . . . . . . . . . . 69

6.22 (Top). A periodic rectangular pulse modulated witha ramp is used to drive the resonant circuit. (Bottom)Excitation current generated. . . . . . . . . . . . . . 70

6.23 Excitation current generated for different amplitudesof the voltage source. . . . . . . . . . . . . . . . . . . 70

6.24 Compensation coils. . . . . . . . . . . . . . . . . . . . 716.25 Compensation field [T] produced when a 1mA cur-

rent is used to bias the coils. The geometry was par-titioned with a total of 29257 elements. . . . . . . . . 72

6.26 Compensation field [T] along the axis of axis of sym-metry of the fluxgate element. . . . . . . . . . . . . . 72

6.27 Linear model used to fit the data in Table 6.2. . . . . 74

Page 11: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

LIST OF TABLES

6.1 Inductance of the pick-up coils. . . . . . . . . . . . . 536.2 Compensating field for different currents driving the

compensation coils. . . . . . . . . . . . . . . . . . . . 73

Page 12: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. THEORETICAL BACKGROUND

The present chapter is intended to settle the theory upon which theSMILE magnetometer bases its principle of operation. An overviewof magnetism of steady currents is adresssed at the beginning fol-lowed by a description of magnetic materials. The scope used todiscuss the properties of magnetism in matter is a macroscopic one(phenomenological) without going in details of quantum propertiesof atoms that constitute magnetic materials. The material intro-duced in this chapter is based on references [15], [8], [23], [14] and[17]. For the historical approach references [26] and [27] were con-sulted.

1.1 Maxwell’s Equations

It is an experimental fact that electromagnetic interactions in aphysical system can be described by Maxwell’s equations

∇ · E =ρ

ǫ0(1.1)

∇ · B = 0 (1.2)

∇×E +∂B

∂t= 0 (1.3)

∇× B −1

c2∂E

∂t= µ0J (1.4)

with appropiate boundary conditions according to the geometryanalysed and the so called constitutive relations which provide in-formation about the medium.

D = ǫE (1.5)

Page 13: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 9

B = µH (1.6)

J = σE (1.7)

The E and B fields completely charaterise the electric and mag-netic fields in the system.

In the systems which are the object of our study the fields do notvary rapidly in time and the effects of the finite velocity of prop-agation of electric and magnetic fields can be considered to be in-stantaneous at two distinct points, known as the quasistatic approx-imation. With these assumptions is possible to simplify Maxwell’sequations:

∇ · E =ρ

ǫ0(1.8)

∇ · B = 0 (1.9)

∇×E +∂B

∂t= 0 (1.10)

∇× B = µ0J (1.11)

The set of equations (1.8)-(1.11) together with (1.5) - (1.7) will beused to describe quantitatively the principle of operation of fluxgatemagnetometers.

1.1.1 Magnetostatics

Although it is completely valid to assert that a magnetic field isjust a relativistic effect of an electric field described in a movingreference frame with respect to an inertial frame where no magneticinteraction is detected, a more conventional treatment is followedhere. During the year of 1820 Andre-Marie Ampere, after havingattended the presentation of Francois Arago at the Paris Academyof Sciences, completed the work initiated by Hans Christian Ørstedby conducting experiments with current carrying wires[27]. In one ofhis experiments Ampere discovered that two rectilinear wires attractor repell each other depending on the direction of the currents that

Page 14: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 10

flow through them. This effect is not restricted to straight wires only,indeed any two closed circuits carrying steady currents interact witheach other as Ampere realised. The force excerted by a circuit C1

carrying a current i1 on a circuit C2 with current i2 is given by theBiot-Savart law

FC1→C2=µ0

4πi1i2

C1

C2

dl2 × (dl1 × r)

r3(1.12)

the constant µ0 is the permeability of free space and is defined as

µ0 = 4π × 10−7newton/ampere2 (1.13)

It is possible to rewrite (1.12) as

FC1→C2= i2

C2

dl2 ×µ0

4πi1

C1

dl1 × r

r3(1.14)

The integral on the right hand side of equation (1.14) defines avector valued function B : S ⊂ R3 → R3, the magnetic flux density,

B =µ0

4πi1

C1

dl1 × r

r3(1.15)

which is specified by the geometry and current flowing throughC1. By symmetry, the circuit C2 also produces a magnetic fluxdensity as a result of the current circulating in it. The magneticflux density is measured in Teslas [T] in the International System ofUnits.

In general, for a distribution of steady currents in a region V inspace, the magnetic flux density is given by

B =µ0

V

J × r

r3d3r (1.16)

where J is the current density distribution.As can be shown by direct substitution, the magnetic flux den-

sity defined by (1.16) is consistent with (1.9). The fact that thedivergence of B is always zero has important physical consequences.First of all, the non existence of free magnetic monopoles1 and sec-

1 Several experiments have been conducted to detect magnetic monoples. On February 14,1982 Blass Cabrera at Stanford University recorded an event that would have indicated thepass of a monopole through his laboratory with his instruments [3].

Page 15: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 11

ond, the field lines of the magnetic flux density always form closedtrajectories, i.e., they can not originate from a point and diverge.

Since every vector valued function with zero divergence can beexpressed as the curl of a vector field it is possible to write

B = ∇ × (A + ∇ψ) (1.17)

for some vector field A and scalar field ψ. The vector valuedfunction A : V ⊂ R3 → R3 proposed in (1.17) is known in the liter-ature as the magnetic vector potential and it has been shown that itsusage does not change the physics of the problem[8]. The equationthat should satisfy the magnetic vector potential A is obtained bysubstituting (1.17) in (1.11):

∇2A = ∇(∇ · A) − µ0J (1.18)

If the Coulomb gauge is used, ∇·A = 0, Poisson’s equation resultsand the magnetic potential can be calculated as

A =µ0

V

J

rd3r (1.19)

the unit of A is the Ampere [A].When the vector field B of a distribution of currents in space iscalculated at points situated far from the sources, the denominatorin (1.16) or equivalently in (1.19) can be expanded in series leadingto an expansion of B (or A). For the magnetic vector potential wehave,

A = AM + AD + AO + . . . (1.20)

The first term of the expansion in A always vanishes meanwhilethe second term depends on the distribution of the currents in space.This second term is referred as the magnetic dipole moment of theconfiguration

AM =µ0

m× r

r3(1.21)

where the vector m is the dipole moment and is defined as

m =1

2

V

r × Jd3r (1.22)

Page 16: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 12

The magnetic dipole moment plays an important role in physicsas the dominant term in expression (1.20). It is the term that has themajor contribution to the magnetic field at distances far from thesources since the remaining ones decrease considerably fast. Earth’smagnetic field is well described with a dipole moment m = 8 ×1022Am2, tilted about 11 degrees with respect to the rotation axis.The magnetic field at the surface of the Earth is about 30µT atthe equator and up to 60µT near the poles. It is on the top ofthis geomagnetic background that small disturbances due to auroralcurrents (space physics) or crustal mineral deposits (in explorationgeophysics) need to be measured. Accurate vector measurementsincluding stable and precise orientation of the vector magnetometeraxes are required since the disturbances created by auroral currentsare in the order of 50−500nT. The Earth is not the only planet witha characteristic dipole field, in other planets the dipole field dictatesthe dynamics of charged particles in vast region of space (that canbe much larger than the planet itself), called magnetosphere. Forinstance, the magnetosphere of Mercury has been also approximatedwith a dipole displaced from its centre[1].

1.1.2 Induced currents

When experiments showed that charge in motion produced mag-netic fields that influenced the orientation of permanent magnetsand magnetised needles, physicists started to wonder if the inverseeffect could be possible, this is, that a magnetic field originated themotion of charges. During the year 1820, the galvanometer was al-ready invented and measure the current through a wire was possible.Experiments where a conductor was placed near a permanent mag-net were performed expecting that the field produced by the magnetinduced a current in the conductor. If the configuration remainedstatic no induced current was detected. Michael Faraday realisedthat is possible to induce a current but in order to achieve it theconfiguration should not remain static. Indeed he noticed that whenthe magnetic flux through the circuit composed by the conductorand galvanometer changed with time, a deflection in the needle ofthe instrument was observed.Let Γ represent a closed path that delimits a surface S, the fluxthrough S is defined as

Page 17: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 13

Φ =

S

B · da (1.23)

Faraday induction law states that the line integral of E aroundΓ equals the rate of change of the flux Φ through S

Γ

E · dl = −dΦ

dt(1.24)

The integral in the left side of (1.24) is called the induced elec-tromotance and is measured in volts [V].

1.1.3 Inductance

When two electrical circuits C1 and C2 are placed near one to theother, the magnetic flux density produced by the current flowingthrough C1 will contribute to the magnetic flux generated in C2

by the current flowing through it. The symmetric effect is alsoobserved, the magnetic flux desity due to the current in C2 affectsthe flux produced by the induction field in C1. It is possible tocharacterise quantitatively this magnetic coupling of circuits withthe mutual inductance,

M12 =µ0

C1

C2

dl1 · dl2r

(1.25)

and the magnetic flux produced by circuit C1 on C2 can be de-termined by

Φ12 = M12i1 (1.26)

The integral in (1.25) is known in literature as Neumann integraland it is symmetric with respect to the subscripts as one wouldexpect from the physics of the problem.Since every circuit is coupled to itself by its own magnetic flux it isnatural to introduce the concept of self-inductance,

Φ = Li (1.27)

where i is the current flowing through the circuit. The mutualand self-inductance depend only on the geometry of the circuits andare measured in henrys [H].

Page 18: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 14

1.1.4 Magnetism in matter

Experiments have shown that three kinds of magnetic materialsexist[23]. In two of these groups the interaction with magnetic fieldsis feeble even if they are in presence of strong magnetic fields, on theother hand in the remaining group the interaction is quite strongand can be perceived macroscopically without any special instru-ment. Paramagnetic and diamagnetic materials constitute the firsttwo groups mentioned and the other one is constituted by ferro-magnetic materials. Magnetism is a quantum effect and henceforthquantum mechanics gives complete account of magnetism in matter,nonetheless classical models can be used to model macroscopicallymagnetised bodies.

Ferromagnetic materials can be modeled as a distribution of mag-netic dipole moments. The vector valued function M : S ⊂ R3 →R3 which gives the density of these dipoles at every point withinthe magnetised body is referred in literature as magnetisation. Us-ing (1.21) it is possible to calculate the magnetic vector potential atany point outside the magnetised body. The magnetic potential ofa body with magnetisation M is given by

A =µ0

S

M× n

rd2r +

µ0

V

∇× M

rd3r (1.28)

where V denotes the volume occupied by the body and S thesurface delimiting this volume. The potential given by (1.28) iscomposed of two terms and it is equivalent to the potential that asurface current density distributed on S with value

λm = M× n (1.29)

and a volume current density in V given by

Jm = ∇ ×M (1.30)

would produce. A letter m was added as a subscript in expres-sions (1.29) and (1.30) to emphasise that these are not conductioncurrents as the ones present in conductors. The current given by(1.30) is the result of the magnetisation of the body. The magneticflux density produced by this current (and by the surface currentdensity) is obtained by taking the curl of (1.28). For a physical sys-tem where conduction currents and currents due to magnetisation

Page 19: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 15

are present, the magnetic flux density is calculated as the superpo-sition of the respective fields produced by each current.If the nature of the different kind of currents is distinguished, (1.11)can be written as

∇ ×B = µ0(Je + Jm) (1.31)

where Je denotes the conduction currents. Using (1.30) resultsin

∇ × (B

µ0−M) = Je (1.32)

The term in parenthesis in (1.32) is the vector valued functionH : R3 → R3 defined as the magnetic field

H =B

µ0− M (1.33)

The units of the magnetic field vector are ampere/meter. Byrewriting (1.32) in terms of the magnetic field H one arrives to

∇ × H = Je (1.34)

When there are no free currents and only currents resulting frommagnetisation are present (1.34) reduces to

∇ × H = 0 (1.35)

and the scalar magnetic potential φm : R3 → R proposed byPierre Simon de Laplace can be introduced. The scalar magneticpotential is not uniquely determined just as the potential used inelectrostatics. The magnetic field can be obtained by taking thegradient of the scalar potential.

H = −∇φm (1.36)

Equation (1.36) is mathematically identical to the electrostaticsituation where the electric field can be derived from a scalar po-tential by taking its gradient. Indeed if the analogy is continued themagnetic charge density ρm, can be determined by taking the diver-gence of H. It should be stressed that this is only a mathematicalartifice that does not have physical reality.

ρm = ∇ · H (1.37)

Page 20: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 16

Even though the magnetic charge density is a mathematical arti-fice, it can serve to introduce and visualise a physical field of majorimportance in the design of fluxgate sensors, the demagnetising fieldHD : R3 → R3. It is well known that a uniformly magnetised spherecan be modeled as a distribution of magnetic charge on its surfacewith one hemisphere containing charge of one sign and the remaingof opposite sign. The magnetic field in the interior of the sphere asa result of this charge distribution is uniform and it is directed inopposite direction to the magnetisation field. The field is said to tryto oppose the magnetisation field and henceforth its name. In gen-eral the demagnetising field is not antiparallel to the magnetisationfield, only for a uniformly ellipsoid (the sphere being a particularcase) this is true. The relation between HD and M is given by

HD = −DM (1.38)

where D is the demagnetising tensor.

Linear Isotropic materials

In general there is no physical law deduced from basic principles thatrelates the B and H fields within a magnetised sample, nonethelessfor linear isotropic materials it is possible to introduce the magneticsusceptibility as

M = χmH (1.39)

From (1.33) one can write B in terms of the magnetisation andthe magnetic field

B = µ0(H + M) (1.40)

by substituting (1.39) in (1.40) it is possible to relate the mag-netic flux density and the magnetic field within an isotropic mag-netic material

B = µ0µrH (1.41)

where

µr = 1 + χm (1.42)

Page 21: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 17

is the relative permeability. It should be noticed from (1.39) and(1.42) that χm and µr are dimensionless constants.

Ferromagnetic materials

For ferromagnetic substances like iron, the constitutive relation amongB and H is nonlinear and non single valued[14],

B = B(H) (1.43)

A typical curve showing the relationship given by (1.43) is de-picted in Figure 1.1 and it is called hysteresis loop. The most im-portant feature of the curve is the induction saturation Bsat, whichplays a major role in the principle of operation of fluxgate magne-tometers. The width of the hysteresis loop determines the magnetichardness of the material (its sensitivity for past magnetisation his-tory). It is common to use soft magnetic materials as cores in thefluxgate magnetometer for a robust operation and low losses.In specialised literature it is common to find an additional definitionfor the permeability of a material[19]. The differential permeabilityis defined as the slope at every point in the B −H curve,

µd =1

µ0

dB

dH(1.44)

1.1.5 Boundary conditions

In order to find a unique solution to Maxwell’s equations that de-scribe the phenomena observed in a given region of study where twodifferent media are present, a set of restrictions that the magneticfield (or the magnetic flux density) should satisfy in the boundarythat delimits the interface must be imposed. These set of restrictionsare referred as boundary conditions,

(B2 − B1) · n = 0 (1.45)

B2 × n =µ2

µ1B1 × n (1.46)

where the subscripts denote the value of the magnetic flux densityand permeability for each medium. Equation (1.45) states that the

Page 22: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 18

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1

−0.5

0

0.5

1x 10

−3

Magnetic Field H[A/m]

Mag

netic

Flu

x D

ensi

ty B

[T]

−1 −0.5 0 0.5 10

1

2

3

4x 10

4

Magnetic Field H[A/m]

Rel

ativ

e pe

rmea

bilit

y µ r

Fig. 1.1: The upper figure shows the dependance of the relative permeability µr withthe magnetic field for a nonlinear material. In the bottom figure, a charac-teristic B − H curve is shown.

normal component of the magnetic flux density at the interface iscontinuous (in the mathematical sense) meanwhile the tangentialcomponent is discontinuous.

1.2 A glimpse into the history of magnetism

Those who cannot remember the past are condemned torepeat it George Santayana

The following section is intended to serve as a brief reference tothe history of magnetism. The history of magnetism is vast and in-teresting and is the result of the contribution of many illustrated aswell as affortunated persons that were eager to unravel the misteriesthat Nature hides. Nowadays, most of the technological achieve-ments that we enjoy in society are the result of the discoveries ofthose men that were able to understand the basic principles of anunified aspect of nature, electromagnetism.

Magnets and their nature have been known for long time to thehumankind. The latin poet Titus Lucretius Carus, author of Dererum natura poem, wrote about the inherent attraction of iron

Page 23: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 19

by magnets whose name derived from the northern part of Greece,Magnesia[7]. The repulsion and attraction of magnets was an empir-ical fact also observed as well as the intrinsic aligment of lodestoneswith the geographical north-south direction. Besides their physicalproperties, magnets and lodestones were endowed with additionalproperties and powers with the pass of time. It was said that theirusage restored husbands to wives, heal poissoned women, expelleddemons and detected gold among other things. During the year of1269, in the city of Lucera in Italy, Petrus Peregrinus de Maharn-curia, wrote the Epistola Petri Peregrini de Maricourt ad Sygerumde Foucaucort, miltem, de magnete (Letter on the Magnet of PeterPeregrinus of Maricourt to Sygerius of Foucaucourt, Soldier) wherehe summarised all the knowldege about lodestones and instrumentsusing them till then. It is important to mention that apparentelyPetrus Peregrinus was the firts to shape a piece of lodestone into asphere, since in the letter he explained how an iron needle interactedwith it. Influenced by the dogmas of his epoch, he attributed theorientation of hanging lodestones to heaven forces in the celestialsphere.

Almost 300 years had to pass for the human kind until anotherstep was made toward the deciphering of the real nature of mag-netism. In the year 1600, William Gilbert (1544-1603) the royalphysician of Queen Elizabeth I published his De Magnete, Magneti-cisque Corporibus, et de Magno Magnete Tellure (On the Magnet:Magnetic Bodies Also, and On the Great Magnet the Earth). Theimportance of Gilbert’s treatise is that he confronted the supersti-tions in which magnetism was held captive. Gilbert correctly pro-posed in his work that the Earth itself behaves as a big magnet.Besides that, Gilbert carried on a series of experiments to studyin a objective manner the magnetic field. Nonetheless Gilbert alsobelieved that inside magnets there was a kind of essence that per-turbated the dormant soul of iron with their presence in order toexplain the attraction observed.

During the eighteenth century admirable progress was done withelectricity (phenomenon considered to be completely independent ofmagnetism). In this century Peter van Musschenbrok (1692-1761)discovered by accident that electricity can be stored, constructing thefirst capacitor in the Netherlands (Leyden jars). In France, CharlesAugustus Coulumb (1736-1806) quantitatively proved the inverse

Page 24: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 20

square nature of electric attraction with his torsion balance. But themajor achievement reached during this epoch is without hesitationthe voltaic cell developed in Italy by Alessandro Volta (1745-1827)after having heard of the experiments conducted by Luigi Galvani(1737-1798) professor of anatomy at the University of Bologna andhis assistant Giovanni Aldini.

Advances in magnetism would have to wait until the nineteenthcentury when experiments with electricty were done in laboratoriesin Europe and in part of America. In Denmark, a man influenced bythe famous german philosopher Immanuel Kant (1724-1804) startedto wonder about the possibility of a relation between electricity andmagnetism. His name was Hans Christian Ørsted (1777-1851) whoduring a public lecture placed a compass near a thin platinum wirethat conducted electricity and noticed together with the audiencethe deflection of the compass. The results of this public demonstra-tion were presented in Paris on September 4, 1820 by Francois Arago(1786-1853) to the Academie des Sciences. They were really aston-ishing to the scientific community of that time since electricty andmagnetism were considered two unrelated phenomena. Among theattendants to the meeting in Paris was Andre Marie Ampere (1775-1836). It is said that within a few weeks Ampere had reproducedØrsted’s experiments and discovered that a short solenoid behavedin the same way as a permanent magnet near a current carryingwire; this encouraged him to affirm that magnetism was the resultof circular currents flowing inside magnets. A major breakthroughin the progress of magnetism was acheived in England by MichaelFaraday (1791-1867). Faraday’s life can be considered a Cinderellascience tale, where the courage of a man to discover the basic prin-ciples behind nature made him succeed in life. Faraday lacked ofa formal education in science, indeed it was by reading newspapersthat he started to get in touch with it. He worked in a bindingshop and one of his clients invited him to attend a series of lecturesgiven by Sir Humphry Davy (1778-1829). Faraday took notes of thelectures and bind them. Davy was impressed by the work done byFaraday and this opened him the doors to work as an assistant inhis the laboratory. The lack of a mathematical training in Faraday’sformation was more than compensated with his ability to performexperiments and explain in a neat way the basic principles behindthem. In the beginning Faraday was not attracted by magnetism; he

Page 25: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

1. Theoretical Background 21

started to work in it by an invitation of his friend Richard Phillips,editor of the Annals of Philosophy, who persuaded him to write anarticle about the knowldege by then of electricty and magnetism. Itis well known the results of this work, Faraday performed a consid-erable number of experiments to undertsand the action at distanceobserved in interactions with magnets. One of the most remarkablecontributions was the concept of field, a corner stone concept in thestudy of physics. Faraday also discovered the law of induction, giv-ing the basis for a enormous stride in technological achievements(generation of electricity). The man who integrated all the knowl-edge in a single elegant frame was the Scotish scientist James ClerkMaxwell(1831-1879). Maxwell was the opposite to Farday, he wasan excellent theoretical physicist. From his youth Maxwell startedto show his mathematical skills when he correctly stated in an essaycontest that the rings of Saturn could not be solid bodies. He gavesolid mathematical fundation to Faraday’s ideas. When he formu-lated the equations of electromagnetism in mathematical terms hewas able to predict theoretically a missing term in Ampere’s law,the displacemet current. This was one of the milestones in humanhistory, when the basic laws of electromagnetism were started to beunderstood.The understanding of the electromagnetic field has lead us to enjoythe benefits of the generation of electicity, mobile communications,medical applications, exploration of space, among others achieve-ments.

Page 26: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. FLUXGATE MAGNETOMETERS

Fluxgate magnetometers are sensors designed to measure magneticfields and date back to the beginning of the 1900’s. They were usedduring the Second World War to detect submarines and since the1950’s, with the start of the space era, became an essential payloadin space missions. Even though different configurations have beentested and reported in literature their principle of operation is basi-cally the same and relatively simple. A nonlinear magnetic materialis driven periodically into saturation by an alternating current in-ducing a voltage rich in even harmonics of the excitation currentfrequency when an external induction field is present. Using differ-ent signal processing techniques in the time or frequency domain,the information contained in the induced voltage can be used to de-termine the magnitude of the external field. The performance of thefluxgate magnetometers is considerably improved when volume com-pensation is used. With volume compensation a set of coils nullifythe external magnetic field in the region where the fluxgate elementis situated, eliminating nonlinearities in the sensor and allowing itto work as a zero level indicator.

In this chapter the theory of operation of the single and dou-ble core geometries are described. The analysis is restricted tothese geometries since the Small Magnetometer in Low-Mass Experi-ment (SMILE) sensor uses these configurations to measure magneticfields.

2.1 Principle of operation

The basic components that constitute an elementary fluxgate mag-netometer are a nonlinear magnetic material surrounded by a pri-mary winding and a secondary set of coils used to measure the in-duced voltage. Through the winding flows a current that saturatesperiodically the magnetic core in both directions, inducing a volt-

Page 27: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 23

age in the sensing coils as a result of the change in magnetic fluxwith time. The external magnetic flux through the sensing coils isgated with changes of the relative permeability due to the saturationof the core by the excitation current. In the absence of an externalmagnetic field the voltage induced will contain the odd harmonics ofthe excitation current frequency. If the sensor is placed in a regionwhere a magnetic field is present the symmetry found previouslywill be broken and this will be manifested in the voltage inducedwhich will contain harmonics not found in the driving signal. Allthe information about the external magnetic field can be deducedby analysing the harmonics added to the sensing coils signal. Differ-ent configurations have been proposed to measure magnetic fields.In specialised literature two groups are distinguished[20]: paralleland orthogonal sensors. With parallel sensors, the magnetic fieldproduced by the excitation current is parallel to the external fieldcomponent to be measured meanwhile with orthogonal geometriesthe direction of the aforementioned fields are perpendicular to eachother. In this report the analysis is focused on a specific pair ofparallel sensors: the single and double core sensor (also known asVacquier sensor) since the SMILE magnetometer bases its principleof operation on them.

2.2 Single core sensor

The most basic fluxgate parallel detector is the single core sensorwhich consist of a nonlinear magnetic core (a soft magnetic material)surrounded by excitation and sensing coils. The geometry of theconfiguration is shown in Figure 2.1.

The excitation coils are driven by an alternating current that pro-duces a magnetic field which varies the permeability of the core anhenceby saturates it. The core is saturated equally in both directionby the positive and negative excursions of the excitation current inthe absence of an external magnetic field. With an external fieldthe core remains saturated for a longer time in one direction thanthe other; unbalance shown in the harmonic content of the inducedvoltage.

It is possible to determine the waveform of the induced voltageat the pick-up coils for the single core geometry using Maxwell’sequations and further assumptions as it is shown in refereces [20]

Page 28: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 24

Fig. 2.1: In the single core configuration a nonlinear magnetic material is surroundedby excitation coils where the current that saturates the core periodicallyflows.

and [21]. The magnetic flux density inside the magnetic core isgiven by (1.40) which is writen again for convenience

B = µ0(H + M) (2.1)

When the sensor is operating in the linear region (1.39) can beused to relate the magnetizing field and the magnetic field in theinterior of the core. A demagnetising field will be present due to thegeometry of the core (open ends),

M = χmH (2.2)

HD = −DM (2.3)

H = Hext −DM (2.4)

In general the demagnetising and the magnetisation fields arenot collinear vectors as was pointed out in Section 1.1.4. For thesimplicity of the analysis it is found in the literature that the de-magnetising factor is considered to be a scalar. From (2.1), (2.2),(2.3) and (2.4) it is possible to obtain

Page 29: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 25

M =µr − 1

1 +D(µr − 1)Hext (2.5)

H =Hext

1 +D(µr − 1)(2.6)

B = µ0µr

1 +D(µr − 1)Hext (2.7)

where the expression relating the magnetic susceptibility and therelative permeability has been used. From (2.6) it can be seen thatthe magnetic field inside the core differs from the external magneticfield, the demagnetising factor being responsible of this departure.Equation (2.7) is commonly rewritten as,

B =µr

1 +D(µr − 1)Bext (2.8)

with the apparent permeability µa : R → R defined by[20],

µa =µr

1 +D(µr − 1)(2.9)

The voltage induced in the sensing coils is obtained using Fara-day’s law and can be approximated by

Vsns = −NsnsAsns

dB

dt(2.10)

where the subscript sns was added to indicate parameters associ-ated with the geometry of the pick-up (or sensing) coils; N denotesthe number of turns and A the area. The vector notation can beabandoned since all the vector fields considered are colinear. Using(2.8), (2.9) and (2.10) results in,

Vsns = −NsnsAsns

[

(1 −D)dµr

dt

[1 +D(µr − 1)]2Bext +

µr

1 +D(µr − 1)

dBext

dt

]

(2.11)Since fluxgate magnetometers measure slowly varying magnetic

fields, the second term in (2.11) can be disregarded leading to

Vsns = −NsnsAsns

(1 −D)dµr

dt

[1 +D(µr − 1)]2Bext (2.12)

Page 30: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 26

−10 −5 0 5 10

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

H[A/m]

B[T

]

Fig. 2.2: B − H curve of the core, the saturation is attained for Hmax = 10A/m withBsat = 0.5T.

known in literature as the fluxgate equation [24]. The dynamicsof the systems under consideration is completely specified by thisequation.

2.2.1 Induced voltage

In order to determine the induced voltage in the pick-up coils it isnecessary to solve (2.12) nonetheless, it is possible to estimate theshape of the induced signal by using simplified waveforms for theexcitation field and further assumptions such as zero demagnetisingfactors. In Figure 2.2 an idealised B − H curve for a nonlinearmagnetic core is shown; the behaviour of the magnetic material isdescribed by a piecewise linear model and the demagnetising fieldignored to simplify even more the analysis,

B (H) =

−Bsat if H ≤ −HmaxBsat

HmaxH if −Hmax < H ≤ Hmax

Bsat if H > Hmax

(2.13)

Let us assume for the moment that no external field Hext ispresent and that the excitation current driving the core produces

Page 31: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 27

0 20 40 60 80 100 120−15

−10

−5

0

5

10

15

Time[µs]

Exc

itatio

n fie

ld[A

/m]

0 20 40 60 80 100 120−1

−0.5

0

0.5

1

Time[µs]

Mag

netic

flux

den

sity

[T]

0 20 40 60 80 100 120

−2

−1

0

1

2

Time[µs]

Indu

ced

volta

ge(V

)

Fig. 2.3: (Top) Excitation field with amplitude H0 = 15A/m and period τ = 125µs.(Centre) Magnetic flux density inside the magnetic material. No externalmagnetic field is present. (Bottom) Induced voltage in the sensing coil forN = 1 and Asns = 1 cm2.

a field of the form,

Hexc (t) =

4H0

τt if t ≤ τ

4

−4H0

τ(t− τ

4) +H0 if τ

4< t ≤ 3τ

44H0

τ(t− 3τ

4) −H0 if t > τ

(2.14)

where H0 and τ represent the maximum amplitude of the excita-tion field and the period of the driving signal respectively. Due to thenonlinear characteristics of the core, the external flux is gated outin the pick-up coils in a symmetric way since saturation is achievedin both directions during equal time intervals (see Figure 2.3).

When an external magnetic field Hext is present, the field pro-duced by the excitation current will have an offset which will unbal-ance the time intervals during which the core is saturated not beingequal any more (see Figure 2.4).

The induced voltage can be calculated from Farday’s law andusing signal processing techniques in the time domain (correlationfilter) or in the frequency domain (harmonic content analysis) theexternal field can determined.

Page 32: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 28

0 20 40 60 80 100 120−15

−10

−5

0

5

10

15

Time[µs]

Exc

itatio

n fie

ld[A

/m]

0 20 40 60 80 100 120−1

−0.5

0

0.5

1

Time[µs]

Mag

netic

flux

den

sity

[T]

0 20 40 60 80 100 120

−2

−1

0

1

2

Time[µs]

Indu

ced

volta

ge(V

)

Fig. 2.4: (Top) Excitation field with amplitude H0 = 15A/m and period τ = 125µs.(Centre) Magnetic flux density inside the magnetic material. An externalmagnetic field Hext = 3A/m is present. (Bottom) Induced voltage in thesensing coil for N = 1 and Asns = 1 cm2.

2.3 Double core sensor

The double core configuration or Vacquier sensor is composed of twocores wound by the same wire in opposite directions to ensure thatthe current flowing through the excitation coils will drive the coresinto saturation in opposite directions in a symmetric way when noexternal field is present. The pick-up coils may surround each coreindependently or both of them. In the first case the sensing coils areconnected in series. If the double core sensor is situated in a regionwhere no external induction field is present the voltage measured inthe pick-up coils will be zero, since the magnetic flux on each corecancels mutually. When an external magnetic field is present theflux will not cancel any more and a signal with twice the frequencyof the excitation current is induced in the pick-up coils. Figure 2.5shows one of the double core sensor that forms part of the SMILEsensor.

2.3.1 Induced voltage

Like in the previous section, it is possible to illustrate the waveforminduced in the pick-up coils by using piecewise linear models for the

Page 33: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 29

Fig. 2.5: Double core sensor used in the SMILE magnetometer. The cores are twotapes of an amorphous alloy with dimension 16x1x0.02mm. The excitationcoils are wound around each core and are connected in series (800turns). Thepick-up coils surround the whole configuration.

excitation fields; for an analytical approach of the Vacquier sensorrefer to [19]. For the analysis of this configuration, identical coresare considered and are saturated in opposite directions by the samecurrent. Assuming the same B−H characteristics for the single coresensor, the magnetic flux density inside the cores when no externalfield is present is plotted in Figure 2.6. It is necessary to break thesymmetry with an external field to measure a non zero voltage inthe pick-up coils (Figure 2.7).

2.4 Volume Compensation

The compensation technique is used to nullify the external mag-netic field in the region where the fluxgate sensor is located. Twoapproaches have been proposed in literature to accomplish this[20]:component compensation and volume compensation. By using feed-back coils, the external magnetic field component parallel to theaxis of the fluxgate sensor can be cancelled. With this arrangement,each fluxgate element is equipped with its own set of feedback coilsand the current used to drive them is extracted from the pick-up

Page 34: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 30

0 20 40 60 80 100 120

−10

0

10

Time[µs]

H1[A

/m]

0 20 40 60 80 100 120

−10

0

10

Time[µs]

H2[A

/m]

0 20 40 60 80 100 120−1

0

1

Time[µs]

B1[T

]

0 20 40 60 80 100 120−1

0

1

Time[µs]

B2[T

]

Fig. 2.6: Excitation field driving the cores. Both cores are wound by the same coilin opposite direction and are consdiered to be identical, the excitation fieldssatisfy the relation Hexc1 = −Hexc2. The period of the excitation field isτ = 125µs.

0 20 40 60 80 100 120

−10

0

10

Time[µs]

H1[A

/m]

0 20 40 60 80 100 120

−10

0

10

Time[µs]

H2[A

/m]

0 20 40 60 80 100 120−1

0

1

Time[µs]

B1[T

]

0 20 40 60 80 100 120−1

0

1

Time[µs]

B2[T

]

Fig. 2.7: Magnetic flux density inside the cores when an external magnetic field Hext =3A/m is present.

Page 35: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

2. Fluxgate Magnetometers 31

0 20 40 60 80 100 120−1

0

1

Time[µs]

B1[T

]

0 20 40 60 80 100 120−1

0

1

Time[µs]

B2[T

]

0 20 40 60 80 100 120−0.5

0

0.5

Time[µs]

B1 +

B2

0 20 40 60 80 100 120−10

0

10

Time[µs]

Indu

ced

volta

ge(V

)

Fig. 2.8: Induced voltage in the sensing coil for N = 1, Asns = 2 cm2 and τ = 125µsfor the double core sensor.

coils by means of a feedback loop. The main disadvantage of com-ponent compensation is that the fluxgate elements are sensitive totransverse magnetic fields, both present externally and those gen-erated by compensating coils of other elements. This places strictrequirements on mutual mechanical alignment and stability of thefluxgate elements. The effect of the external transverse fields can-not be removed, however. It is possible to avoid these drawbacks ifthe fluxgate elements are located in a common null field region withvector feedback. With this approach a set of compensation coils inthree orthogonal directions create a field that will cancel completelyan exterior field in the region where the fluxgate sensors are located.The advantage of this configuration is that the axes of of the sen-sor are defined by the orientation of the compensating coils only.For tri-axial sensors it has been found experimentally that a volumecompensated sensor offers major advantages than independent coilsfor each axis [22].

Page 36: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. SIMULATION SOFTWARE

The software used to simulate the sensor elements that form part ofthe SMILE magnetometer was COMSOL Multiphysics. COMSOLMultiphysics is a commercial software for simulation of scientificand engineering models described by a system of partial differentialequations using the Finite Element Method (FEM). In this chaptera brief introduction to COMSOL Multiphysics and the libraries usedto model the components is given. For a detailed description of thesoftware refer to [4].

3.1 The COMSOL Multiphysics software

COMSOL Multiphysics is an interactive software for modeling andsimulation of scientific and engineering problems based on a partialdifferential equation formulation. The software contains a GraphicUser Interface (GUI) that allows the user to create the geometry ofthe problem under study and additional tools to mesh the modeland solve it. A set of predefined libraries are available and coverwide areas of physics such as: fluid mechanics, chemistry, photonics,quantum mechanics, electromagnetism among others. Once a modelhas been solved it is possible to visualise the solution obtained andif necessary use the post processing tools for further analysis of thedata. It is also possible to create the geometry of the model withCOMSOL Script, a programming language where the models can besaved in .M files and can be accesed with the interface to Matlab.

3.1.1 3D Electromagnetics Module

All the models presented in this document were simulated withthe Electromagnetics module of COMSOL v3.2 (AC/DC module inCOMSOL v3.3). This is a specialised module containing a diversityof libraries designed to solve electromagnetic related problems. Sincethe purpose of the project is to model the components of the SMILE

Page 37: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 33

magnetometer for a static regime, the 3D Magnetostatic class wasselected. This library solves simultaneoulsy the system of equationsgiven by[5],

−∇ · (−σv × (∇× A) + σ∇V − Je) = 0 (3.1)

∇× (µ−10 µ−1

r ∇×A − M) − σv × (∇× A) + σ∇V = Je (3.2)

where σ, v and V represent the electrical conductivity, the ve-locity of the medium and electric potential respectively. Since onlymagnetostatics simulations were performed, the system of equationsis simplified to

∇× (µ−10 µ−1

r ∇× A −M) = Je (3.3)

Boundary conditions

Different boudary conditions can be specified in the surfaces that de-limit the geometry of the models specified to be consistent with thephysical situations simulated. The boundary conditions available inthe quasistatic library are: magnetic field, surface current, electricinsulation, magnetic potential, magnetic insulation and continuityamong others. For a detailed description of the different boundaryconditions in COMSOL, refer to [5]. The magnetic insulation,

n× A = 0 (3.4)

and the continuity condition,

n× (H1 −H2) = 0 (3.5)

were the most used ones in the simulations performed.

3.1.2 Mesh generation

In order to find a solution for a given model in COMSOL it isnecessary to mesh the geometry before applying the finite elementmethod. Different parameters can be specified independently bythe user such as the maximum element size of the elements, theirgrowth rate, and resolution of curved regions. A set of mesh modes

Page 38: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 34

Fig. 3.1: Mesh of the SMILE model in COMSOL. The geometry has been decomposedin a total of 68873 elements.

are included in COMSOL v3.2 and v3.3 with predefined values forthese parameters which in most of the cases sucessfully mesh thegiven geometry.The majority of the models used to simulate parts of the SMILEmagnetometer were meshed with the extremely coarse, speciallythose where the cores are included. With this mode the numberof elements produced was below 50000, for which the memory ofthe computer was sufficient to obtain a solution. Figure 3.1 showsa meshed model of the SMILE magnetometer including all its com-ponents. Due to the relative dimensions of the cores compared withother parts of the sensor, the number of elements increases consid-erably even though the coarsest mesh mode is used.

3.1.3 Solvers

COMSOL Multiphysics includes a variety of solvers appropiate tothe nature of the problem analysed. The results reported in thisdocument were obtained with time independent linear and nonlinearsolvers. The solver used was SPOOLES1. COMSOL v3.3 includes a

1 Sparse Object Oriented Linear Equations Solver.

Page 39: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 35

solver that uses efficiently double processor architectures and savesconsiderable time of computation, the PARDISO solver.

3.2 Finite Element Method

The finite element method is a numerical method used to solve par-tial differential equations. It started to be applied in electromagneticproblems during the 1960s and it is well suited to analyse complexgeometries[25]. The basic ideas behind courtaines are[25]: (i) dis-cretise the analysed geometry in elements, (ii) define a set of basisfunctions over each element, (iii) construct an approximate solutionusing the basis functions, (iv) apply Garlekin’s method to obtain asystem of equations and (v) solve the resultant system to determinethe contribution of each basis function to the approximation[18].The essence of the method is exemplified by applying it to a 1Dproblem. For this purpose, the Poisson equation will be solved inthe unit interval [0, 1],

−∇2Φ =ρ

ǫ(3.6)

with boundary conditions

Φ(0) = Φ(1) = 0 (3.7)

Mesh

It is necessary to discretise first the geometry where the solution iscomputed. For the case considered the simplest discretization is auniform partition of the unit interval in n segments, being the normof the partition h,

h =1

n(3.8)

and each node in the mesh labeled by xk, k = 0, 1, . . . , n.

Basis Functions

The set of basis functions used in the FEM are well localised2. Themost common are polynomial approximations of the form,

2 Compact support

Page 40: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 36

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

x

φ 2(x)

0 0.2 0.4 0.6 0.8 1−6

−4

−2

0

2

4

6

x

dφ2/d

x

Fig. 3.2: Base function and its derivative for k = 2, when the geometry has beenmeshed with n = 5 elements.

ϕk (x) =

0 if 0 ≤ x < xk−1x−xk−1

hif xk−1 ≤ x < xk

xk+1−x

hif xk ≤ x < xk+1

0 if xk+1 ≤ x ≤ 1

(3.9)

Equation (3.9) defines a set of well localised functions in the unitinterval. Figure 3.2 shows the second base function and its derivativewhen the geometry is divided in 5 subintervals (elements).

Approximate solution

The approximate solution to (3.6) is constructed with the basis func-tions ϕk(x) as

Φ(x) =∑

n−1k=1akϕk(x) (3.10)

where the coefficients ak are determined using the Garlekin method.

Page 41: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 37

Garlekin method

The system of equations that the ak coefficients should satisfy isobtained by substituting (3.10) in (3.11)

∫ 1

0

ǫdΦ

dx

dϕk

dxdx =

∫ 1

0

ρϕkdx (3.11)

for k = 1, 2, . . . , n − 1. Equation (3.11) is a particular case ofthe most general integral used in Garlekin’s method. The Garlekinmethod is a technique developed by the russian mathematican BorisGrigoryevich Garlekin to determine the weighting coefficients of anexpansion of the form

Φ(x) = a1ϕ1(x) + a2ϕ2(x) + . . .+ anϕn(x) (3.12)

for an approximate solution to the differential equation

LΦ = f (3.13)

such that the error of the approximation is orthogonal to thebasis functions, where L is a differential operator and f is the inho-mogeneous term. The system of equations resulting from (3.11) isof the form

Ma = f (3.14)

with

M =1

h

2 −1 0 . . . 0−1 2 −1 . . . 00 −1 2 . . . 00 0 −1 . . . 0...

......

. . ....

0 0 0 . . . −1

(3.15)

a =

a1

a2...

an−1

(3.16)

Page 42: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 38

0 0.2 0.4 0.6 0.8 10

0.02

0.04

0.06

0.08

0.1

0.12

0.14

x

Φ(x

)

N = 5N = 10Theoretical

Fig. 3.3: Solution of Poisson equation in the unit interval [0, 1] using the FEM forρ = 1 and ǫ = 1. The approximate solutions were calculated using 5 and 10mesh elements of the unit interval.

and

f = hρ

ǫ

12...

n− 1

(3.17)

It can be seen that M is a sparse matrix and the elements inthe diagonal are non vanishing. This is a characteristic feature ofthe FEM, the matrices obtained are tridiagonal. The advantage ofsparse matrices is that efficient algorithms such as Gauss eliminationcan be implemented in computer programs to obtain an inverse.

In Figure 3.3 the approximate and analytical solutions for (3.6)are shown. For the numerical approximation 5 and 10 elements wereused to mesh the unit interval. As the number of elements increasesthe discrepancy between the real and the approximated solution isreduced.In general, the method previously outlined is extended to two andthree dimensions. For 2D problems the mesh elements consist oftriangular or quadrilateral regions and for 3D cases the geometry is

Page 43: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

3. Simulation software 39

discretised with tetrahedral elements.It is important to mention that for the 1D situation described above,the FEM reduced to the method of Finite Differences (FDM). Ingeneral these methods are not equal, the FEM is used to find ap-proximations to solutions of differential equations meanwhile theFDM is an approximation to the differential equation itself [9].

3.2.1 Distinctive Features

The FEM has proven to be a powerful technique to solve not onlyEM problems. Among its most distinctive features are that it canbe used to analyse complex geometries taking into account inho-mogeneties of the medium. Besides that, the resultant system ofequations obtained is characterised by sparse matrices with most oftheir entries equal to zero allowing the use efficient computer meth-ods to solve them.Like every numerical method the FEM has also disadvantages. Themost critical probably being the mesh of the geometry even thoughconsiderable advances have been achieved nowadays with computerprograms in this area. A direct consequence of the discretization ofthe geometry is the dimensions of the matrices used to calculate thecoeffiecients of the basis functions which can surpass the memoryrequired to find a solution.

Page 44: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. ACCURACY ESTIMATION

In order to have an estimate of the accuracy of the solutions obtainedwith the numerical approximation, different simulations were per-formed with a model whose theoretical solution is well known. Themodel used is a sphere of permeable material immersed in a regionpervaded by a uniform induction field. The results obtained indicatethat the accuracy of the numerical approximations depends on thenumber of elements used in the mesh as well as the extent of regionwhere the solution is computed.

4.1 Sphere of permeable material inmersed in a uniform magnetic

flux density

The model used as reference to compare the theoretical solutionwith the numerical approximations was a sphere of relative perme-ability µr = 4 × 104, radius of 1cm situated in a region where auniform magnetic flux density of 1mT is present. The geometry ofthe problem is depicted in Figure 4.1.

4.2 Theoretical solution

It is possible to find a closed expression that characterises the mag-netic flux density in the interior and exterior of the sphere shown inFigure 4.1. As can be noticed from the description of the problem,no free currents are present, therefore it is possible to express thesolution via the scalar potential introduced in section 1.1.4. Thesymmetry of the configuration allows to use spherical coordinates(r, θ, φ). The magnetic scalar potential should satisfy Laplace’sequation and be of the form

φim =

∞∑

n=0

αnrnPn(cosθ) (4.1)

Page 45: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. Accuracy estimation 41

Fig. 4.1: Sphere of permeable material inmersed in an uniform magnetic flux densityof 1mT. The radius of the sphere is 1cm and µr = 4 × 104.

for points situated in the interior of the sphere and

φem = −H0rcosθ +

∞∑

n=0

βnr−(n+1)Pn(cosθ) (4.2)

for those situated in the exterior; where a and H0 denote theradius of the sphere and the external magnetic field respectively.The coefficients αn and βn can be determined by applying boundaryconditions at r = a,

∂φem

∂θ(r = a) =

∂φim

∂θ(r = a) (4.3)

µ0∂φe

m

∂r(r = a) = µ0µr

∂φim

∂r(r = a) (4.4)

which lead to the system of equations for the only two non-vanishing coefficients α1 and β1

β1

a2− aα1 = aH0 (4.5)

Page 46: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. Accuracy estimation 42

µrα1 +2β1

a3= −H0 (4.6)

By solving the linear system given by (4.5) and (4.6) the magneticscalar potential can be expressed in a closed form as

φim = −

3H0

µr + 2rcosθ (4.7)

φem = −H0rcosθ + a3H0

µr − 1

µr + 2

cosθ

r2(4.8)

The components of the magnetic flux density and the magneticfield can be derived from (4.7) and (4.8). For the magnetic fluxdensity, its components in cartesian coordinates are,

Bix = 0 (4.9)

Biy = 0 (4.10)

Biz = 3

µr

µr + 2B0 (4.11)

Bex = 3a3B0

µr − 1

µr + 2

xz

(x2 + y2 + z2)5

2

(4.12)

Bey = 3a3B0

µr − 1

µr + 2

yz

(x2 + y2 + z2)5

2

(4.13)

Bez =

[

1 − a3µr − 1

µr + 2

x2 + y2 − 2z2

(x2 + y2 + z2)5

2

]

B0 (4.14)

4.3 Numerical Solution

The numerical simulations were implemented using COMSOL Mul-tiphysics v.3.2. With the results obtained it was realised that theaccuracy of the solution depends on the number of mesh elementsand the dimensions of the region where the model is meshed whichwe shall refer henceforward as the simulation box. The results im-proved as the dimensions of the simulation box were considerablygreater than the radius of the sphere and a finer mesh was used,

Page 47: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. Accuracy estimation 43

−0.05

0

0.05

−0.05

0

0.05

1

1.01

1.02

1.03

1.04

x 10−3

x[m]

Slice at z =−0.045m

y[m]

|BT

heor

y|[T]

−0.05

0

0.05

−0.05

0

0.05

1

1.01

1.02

1.03

x 10−3

x[m]

Slice at z =−0.045m

y[m]

|BC

omso

l|[T]

−0.05

0

0.05

−0.05

0

0.050

1

2

3

4

x 10−6

x[m]

Slice at z =−0.045m

y[m]

||BT

heor

y|−|B

Com

sol||[

T]

−0.05

0

0.05

−0.05

0

0.050

0.1

0.2

0.3

0.4

x[m]

Slice at z =−0.045m

y[m]

|1−

|BC

omso

l|/|B

The

ory||*

100%

Fig. 4.2: Comparison of the numerical and theoretical solution at z = -45mm. Thelength of the simulation box is 30cm and the SPOOLES solver together witha fine mesh were used to obtain the numerical solution.

however this increased the time for computation and memory used.Figure 4.2 to 4.4 show the solution obtained with the simulationsoftware and the theoretical one in a 30x30x30cm region. The mag-nitude of the magnetic flux density is plotted at slices parallel tothe xy plane at three different heights. The plots in the upper partof the figures show the magnitude of the magnetic flux density, thecalculated and the one obtained numerically. In the lower part, theabsolute and percentual error are plotted. As can be seen from theaforementioned figures, with these parameters the absolute error isat least two orders of magnitude less than that of the solutions.It can be noticed also, that discrepancy of the solutions tends toincrease as the slice used to compare them approaches a height ofz = 0cm and decreasess for planes situated far from the sphere.

Page 48: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. Accuracy estimation 44

−0.05

0

0.05

−0.05

0

0.050.95

1

1.05

1.1

1.15

1.2

1.25

x 10−3

x[m]

Slice at z =−0.02m

y[m]

|BT

heor

y|[T]

−0.05

0

0.05

−0.05

0

0.050.95

1

1.05

1.1

1.15

1.2

1.25

x 10−3

x[m]

Slice at z =−0.02m

y[m]|B

Com

sol|[T

]

−0.05

0

0.05

−0.05

0

0.050

0.5

1

1.5

2

x 10−5

x[m]

Slice at z =−0.02m

y[m]

||BT

heor

y|−|B

Com

sol||[

T]

−0.05

0

0.05

−0.05

0

0.050

0.5

1

1.5

2

x[m]

Slice at z =−0.02m

y[m]

|1−

|BC

omso

l|/|B

The

ory||*

100%

Fig. 4.3: Comparison of the numerical and theoretical solution at z = -20mm. Thelength of the simulation box is 30cm and the SPOOLES solver together witha fine mesh were used to obtain the numerical solution.

Page 49: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. Accuracy estimation 45

−0.05

0

0.05

−0.05

0

0.050

0.5

1

1.5

2

2.5

3

x 10−3

x[m]

Slice at z =0m

y[m]

|BT

heor

y|[T]

−0.05

0

0.05

−0.05

0

0.050

1

2

3

4

x 10−3

x[m]

Slice at z =0m

y[m]|B

Com

sol|[T

]

−0.05

0

0.05

−0.05

0

0.050

1

2

3

4

5

6

x 10−5

x[m]

Slice at z =0m

y[m]

||BT

heor

y|−|B

Com

sol||[

T]

−0.05

0

0.05

−0.05

0

0.050

2

4

6

8

10

12

x[m]

Slice at z =0m

y[m]

|1−

|BC

omso

l|/|B

The

ory||*

100%

Fig. 4.4: Comparison of the numerical and theoretical solution at z = 0mm. Thelength of the simulation box is 30cm and the SPOOLES solver together witha fine mesh were used to obtain the numerical solution.

Page 50: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

4. Accuracy estimation 46

10 15 20 25 30 35 40 45 500.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

Length of simulation box [cm]

Rel

ativ

e er

ror

normalcoarsecoarserextra coarseextremely coarse

Fig. 4.5: Estimated error for the numerical solutions obtained using different meshingmodes.

In order to quantify the deviation of the numerical solution withthe theoretical one, an estimated error using the norm of the mag-netic flux density was calculated in a fixed region τ for differentmesh modes and simulation boxes. With |BC|, |BT| : τ ⊂ R3 → Rdenoting the norm of the magnetic flux density of the numerical andtheoretical solutions respectively in the τ region, the estimated errorε : τ ⊂ R3 → R was calculated as

ε =

∫ ∫ ∫

τ

∣1 − |BC|

|BT|

∣dxdydz

∫ ∫ ∫

τdxdydz

(4.15)

Figure 4.5 summarises the results of the simulations performedwith different lengths of simulation boxes and mesh modes. Thedimensions of the τ region were kept constant for all the cases shownto 5x5x5cm. As can be seen from the figure the results improve asthe simulation box increases its size and a finer mesh is used.

Page 51: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

5. THE SMILE MAGNETOMETER

The Small Magnetometer in Low-Mass Experiment, SMILE, is aminiaturised state of the art fluxgate magnetometer that combinesthe use of a miniature triaxial sensor with volume compensationand digital signal processing routines implemented in a field pro-grammable gate array (FPGA) to measure low varying magneticfields. SMILE is the result of the collaboration bewtween the LvivCentre of the Institute of Space Research in Ukraine, where the sen-sor was designed, and the Royal Institute of Technology in Stock-holm, Sweden where the electronics used to operate the sensor wereimplemented and programmed. In this chapter a brief descriptionof the SMILE magnetometer and the electronics used to operate theinstrument is given. For a deep technical description of the sensorplease refer to [11]. The visual material printed in this chapter isreproduced with permission of Dr. Nickolay Ivchenko from the De-partment of Space and Plasma Physics, KTH in Stockholm, Sweden.

5.1 Sensor

The sensor, developed at the Lviv Centre of the Institute of SpaceResearch in Lviv, Ukraine uses the fluxgate principle with volumecompensation, described in Chapter 2, to measure magnetic fields.The fluxgate elements (three in total, one for each direction) consistof two tapes of an amorphous alloy with dimensions 16x1x0.02mm,adhered onto fiber glass substrates and surrounded by the excitationcoils. Three cylindrial spooles, around which the pick-up coils arewound, are used to contain the cores and fix their relative positionswithin the cubic geometry of the instrument (see Figure 5.1).

The compensation coils are wound around the cubic frame con-taining the fluxgate elements. Each compensation coil consists ofthree rectangular coils connected in series. A set of compensationcoil is provided for each double core arrangement. The distinguish-

Page 52: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

5. The SMILE Magnetometer 48

ing features of the SMILE magnetometer are its dimensions, reducedmass and materials employed in its design. The sensor has dimen-sions of 20x20x20mm, a mass of 21g and most of its parts are madeof Macor.

Fig. 5.1: SMILE magnetometer. The sensor has a mass of 21g and dimensions of 2cmper side.

5.2 Electronics

The electronics used to operate the sensor were designed at theRoyal Institute of Technology (KTH) in Stockholm, Sweden at thedepartement of Space and Plasma Physics. The circuit board con-tains a field programmable gate array (FPGA), a microcontroller,and additional analog components. It is in the FPGA where thefunctionality of the instrument relies since it contains the digitalsignal processing (DSP) core, clock generator and digital to analogconversion (DAC) logic. In Figure 5.2 the electronic board with thecomponents used to operate the sensor are shown and in Figure 5.3a block diagram showing the different electronic subsystems.

Excitation current

In order to saturate the cores an alternating current must flowthrough the excitation coils. This current is generated by a reso-nant circuit driven by the FPGA. The frequency of the excitationcurrent is 8kHz.

Page 53: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

5. The SMILE Magnetometer 49

Fig. 5.2: Electronic board containing the FPGA, microcontroller and additional com-ponents used to operate the instrument. The board was designed at thedeprtament of Space and Plasma Physics in The Royal Institute of Technol-ogy (KTH).

ADC DSP

Communications

Filters

Microcontroller

Filters

Exc

Pickup coils

Compensation coils

Excitationcoils

DAC DAC DAC

Sensor

Fig. 5.3: Block diagram of the different modules implemented in the electronic board.

Page 54: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

5. The SMILE Magnetometer 50

Pick-up signal

Before the signal measured in the pick-up coils is processed, it isfiltered using a low pass filter with cut off frequency of 64kHz. Thefiltered signal from each pick-up coils is digitised using an ADC andsent to the DSP core in the FPGA for further processing.

DSP core

The DSP core, programmed in the FPGA, is the responsible fordetermining the external magnetic fields and calculate the currentvalues used to drive the compensation coils. When the digitisedsignal from the pick-up coils reach this module a correlation filteris used to determine the residual field for each axis over one periodof the excitation current. The coefficients used in the filter arestored in the internal registers of the FPGA, one set of coefficientsper axis. The results are used to calculate the currents drivingeach compensation coil. The values for the compensation currentscalculated by the DSP are converted to their analogue representationusing an efficient combination of a Pulse Width Modulation scheme(PWM) and a Delta Sigma (DS) scheme to reduce the number oftransitions and errors during the conversion.

Microcontroller

The FPGA has an interface to a microcontroller used for communi-cation and control. The SMILE magnetometer, part of the Physicsin Space Instrumentation, to be launched in the Mexican-Russiannanosatellite UNAMSAT-MAI by the end of the year 2007 uses theCAN protocol for communication and control of the instrument.

Page 55: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. RESULTS

In this chapter the results of the simulations performed are pre-sented. The simulations include the fluxgate element, id est, doublecore with associated pick-up coils, the field produced by a set ofcompensation coils and the excitation circuit used to generate thecurrent driving the cores into saturation. The parameters intro-duced in the simulations were those specified by designer (numberof turns in windings, dimensions of the sensor parts) and the fewexperimental and measured data available such as the estimatedinduction field for saturation of the cores.

6.1 Fluxgate element

The configuration shown in Figure 6.1 was used to reproduce theinductance curves experimentally obtained, determine the satura-tion of the cores and the excitation coils inductance. It includesthe nonlinear cores, with dimensions of 16x1x0.02mm, excitationand pick-up coils. Simplifications were done in the geometry con-sidered to avoid an excessive number of elements in the mesh; thesubstrates supporting the tapes were not included in the model andthe windings were regarded as uniform solid bodies.

Experimental data

In Figure 6.2 the dc measured inductances for the three fluxgateelements of the SMILE magnetometer are shown. The experimentalpoints were obtained by connecting a dc current source through theexcitation coils and measuring the inductance of the pick-up coilswith an LC meter. These curves were used as references to verifythe results obtained with the simulations since the range of currentsconsidered encompasses regions of maximum permeability for thecores (for currents less than 1mA) as well as saturation regions.

Page 56: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 52

Fig. 6.1: COMSOL model of the fluxgate element with corresponding pick-up coilsused in the SMILE magnetometer.

0 2 4 6 8 100

0.5

1

1.5

2

2.5

3

3.5

4

Excitation current[mA]

Indu

ctan

ce[m

H]

Sensor 6

Fig. 6.2: Measured inductance of the three pick-up coils of Sensor 6.

Page 57: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 53

Inductance of the pick-up coils

According to the designer’s specifications a total of 575 turns arecontained in the pick-up coils with an average radius of 2.475mm and8mm height. The inductance of a solenoid with these dimensionscan be evaluated using Wheeler’s formula[13],

L =(NR)2

9R + 10H(6.1)

where N is the number of turns, R its average radius (in inches),H its height (in inches) and L is given in µH. In Table 6.1 the the-oretical, measured and simulated inductances of the pick-up coilsare listed. The minimum values of the curves shown in Figure 6.2correspond to the three values reported in the second row as the mea-sured inductance. The reason for this selection is that, as the currentflowing through the excitation coils increases the cores start to sat-urate and their differential relative permeability decreases reachingits lowest value, µr = 1, when complete saturation is achieved. Thelater situation is equivalent to have an air core inductor, i.e., as ifonly the pick-up coils were present.The inductance obtained via the simulation was calculated usingthe expression (1.27), by applying a current of 10µA to the pick-upcoils model and determining the magnetic flux through them. Fieldlines of the magnetic flux density produced when the aforementionedcurrent flows through the pick-up coils are shown in Figure 6.3.

Inductance(µH)Theoretical 779.60Measured 758.9, 718.8, 749.9Simulation 711.48

Tab. 6.1: Inductance of the pick-up coils.

Inductance as a function of permeability

Different simulations were conducted with variations of the geome-try shown in Figure 6.1 to understand the basic physical behaviourof the system, in particular how the inductance of the pick-up coilsvaries with the relative permeability of the cores. For this purpose,the pick-up coils and the two cores were considered in these simula-tions disregarding for the moment the excitation coils. Both cores

Page 58: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 54

Fig. 6.3: Magnetic flux density produced when a current of 10µA flows through thepick-up coils. The number of elements used to mesh the geometry is 43088.

were assumed to have an homogeneus relative permeability and theself inductance of the pick-up coils was calculated for different valuesof µr. The results are shown in Figure 6.4.

The minimum value in Figure 6.4 corresponds to the inductanceof an air core inductor, since µr = 1, and it increases as the relativepermeability does it until a limit value above 3mH is reached. Thereason for the asymptotic behaviour of the L− µr curve can be ex-plained using the results obtained with a similar problem, the sphereof permeable material in an homogeneous induction field (Chapter4). As can be seen from expression (4.11), the induction field Binside the sphere is bounded below by 3B0 as µr increases. Withoutloss of generality and to simplify the algebra involved, the magneticflux through a circular region of radius b at z = 0 and commoncentre to the sphere can be determined,

Φ = Φi(b) + Φe(b) (6.2)

where Φi(b) and Φe(b) denote the magnetic flux in the interiorand exterior of the sphere respectively,

Φi(b) = 3µr

µr + 2πa2B0 (6.3)

Page 59: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 55

0 2 4 6 8 10

x 104

0.5

1

1.5

2

2.5

3

3.5

µr

Indu

ctan

ce o

f pic

k−up

coi

l[mH

]

Fig. 6.4: Inductance of the pick-up coils as a function of the relative permeability ofthe cores.

Φe(b) = π(b2 − a2)B0 + 2πa3µr − 1

µr + 2

(

1

b−

1

a

)

B0 (6.4)

In Figure 6.5 is plotted the magnetic flux through a circular re-gion of radius b = 8cm where it can be seen that the flux reaches alimit value as the permeability increases. This is the same physicsbehind the L−µr curve shown in Figure 6.4. As the permeability ofthe cores increases, the B field in their interior reaches a limit valueand henceby the inductance is a bounded curve.

Nonlinear model

In order to take into account the nonlinear magnetic properties ofmaterials it is necessary to introduce a µ − B curve in COMSOLto specify the relative permeability of the cores as a function of themagnetic flux density. This can be done by specifying a B−H curveand using the relation,

µr =|B|

µ0|H(B)|(6.5)

The model used to represent the B−H curve was an arc tangent,

Page 60: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 56

0 200 400 600 800 100020

21

22

23

24

25

26

µr

Φ[µ

Wb]

Fig. 6.5: Magnetic flux through a circular region with radius b = 8cm situated atz = 0cm. The radius of the sphere is a = 1cm and the magnitude of theinduction field B0 = 1mT.

B =2Bsat

πtan−1(αH) (6.6)

where Bsat is the induction field for which the cores are saturatedand α is a free parameter used to control the slope of the curve. Fewexperimental data was at disposal; according to design the estimatedparameters for the cores were: saturation induction ∼ 0.36T, andstatic coercive force of 0.44A/m.

With the geometry shown in Figure 6.1 and expression (6.6) tospecify the nonlinear behaviour of the cores, a number of simulationswere executed to calculate the inductance of the pick-up coils. Theresults are plotted in Figure 6.7 for the B−H curves depicted in Fig-ure 6.6. The best result obtained was for α = 0.08m/A and as canbe seen this parameter determines the characteristics of the induc-tance curves. It would be expected that for α greater than 0.08m/Aa higher value for the maximum inductance could be achieved butit was found that the solutions obtained stopped to converge andthe results were not physically acceptable. Figure 6.8 shows themeasured inductances for the fluxgate elements of Sensor 6 and thesimulated inductance corresponding to N = 575, Bsat = 0.36T and

Page 61: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 57

−1000 −500 0 500 1000−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

H[A/m]

B[T

]

α = 2e−2

α = 4e−2

α = 6e−2

α = 8e−2

Fig. 6.6: B-H curves for different values of the α parameter. The maximum inductionfield is 0.36T.

0 2 4 6 8 10

0.8

1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

Excitation current[mA]

Indu

ctan

ce[m

H]

Inductance of pick−up coils

α = 2e−2α = 4e−2α = 6e−2α = 8e−2

Fig. 6.7: Inductance of the pick-up coils for different values of the α parameter inmodel (6.6).

Page 62: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 58

α = 0.08m/A.Since limited experimental data was available, the inductance of thepick-up coils was calculated for different number of turns and satu-ration inductions to determine possible factors for the discrepancyin the curves shown in Figure 6.8. The results of the simulationsperformed when the number of turns was varied, keeping constantthe saturation induction for the cores are plotted in Figure 6.9 mean-while in Figure 6.10 is plotted the inductance of the pick-up coils fordifferent values of saturation induction keeping constant the num-ber of turns. From the results of Figures 6.4, 6.9, 6.10 and Table6.1 it is infered that the reasons for the difference of the simulatedand experimental curves are the nonlinear model proposed and thequality of the mesh used in the simulations.It can be seen from Table 6.1 that the simulated and measured in-ductances for the pick-up coils, when the cores are not considered,tend to agree and are within a range of 10% of the theoretical value.This confirms that the number of turns in the pick-up coils is in theorder of the value specified by designer. From Figure 6.10 it is ob-served that the induction field for saturation does not play a majorrole in the difference since it is possible to use Bsat = 0.5T and stillretain the initial linear region of the curve within the experimen-tal range (around 1mA) and its behaviour for currents above 4mAincreasing the inductance only 0.2mH compared to the curve withBsat = 0.36T.The consequences of using different mesh qualities in the modelscan be noticed in Table 6.1 and Figure 6.8. The reported value forthe simulated inductance in the aforementioned table, 711.48mH,was obtained with a model containing around 40 000 elements,meanwhile the minimum value in Figure 6.8, which is 667.23µHfor µr = 1, was obtained with a 23 266 elements model. Both in-ductances are supposed to be equal since the situations consideredcorrespond to an air core inductor. The reason for such a differ-ence in the number of mesh elements is the number of componentspresent in the geometries; the model in Figure 6.3 contained onlythe pick-up coils and it was possible to use the coarse mode togetherwith a refinement for the analysis. When the cores were introduced,the extremely coarse mode was used instead, due to the large num-ber of elements that the relative dimensions of the cores producewith another mode. Even though the coarsest mesh was used, a

Page 63: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 59

refinement of the geometry was impractical since the number of el-ements in the mesh grew rapidly (above 100 000 elements) makingimpossible to solve the model at least for the characteristics of thecomputer used (Core 2 Duo Intel, 1862MHz, 1024MB) which on theaverage was able to solve models with 50 000 elements.On the other hand, the mathematical expression used to charac-terise the nonlinear beheaviour of the cores is an important factorfor the difference in the curves shown in Figure 6.8. It is possibleto calculate the permeability of the cores from equation (6.6) andusing expression (1.44),

µd(H) =2Bsatα

µ0π·

1

1 + α2H2(6.7)

where the maximum value is obtained for H = 0A/m, givingµd ≈ 1.45 × 104. The maximum inductance calculated with thesimulations is consistent with this value according to Figure 6.4,indeed the permeability must be greater than 4×104 to have a 3mHinductance in the pick-up coils. By solving (6.7) for α it is possibleto determine the interval for which the relative permeability is suchthat the inductance of the pick-up coils would be 3mH,

α ≥πµ0µr

2B(6.8)

and by substituting figures it is found, α ≥ 0.21m/A. As wasmentioned previously, the maximum value for α used in the simula-tions is 0.08m/A since the solutions did not converge for greater val-ues. Even if it were possible for α to assume values greater than thethreshold determined with (6.8) the maximum inductance achievedwould be sligthly greater than 3mH (see Figure 6.4).

6.2 Double core

In this section the results of the simulations performed to study thebehaviour of the cores for different excitation currents and extre-nal induction fields are presented. Several scenarios were simulatedwith the configuration shown in Figure 6.11 in order to obtain a setof quasistatic solutions from where the response of the fluxgate ele-ment could be calculated for arbitrary situations. Expression (6.6)was used to specify the nonlinear characteristics of the cores with

Page 64: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 60

0 2 4 6 8 100

0.5

1

1.5

2

2.5

3

3.5

4

Excitation current[mA]

Indu

ctan

ce[m

H]

Sensor 6

MeasuredMeasuredMeasuredSimulation

Fig. 6.8: Measured and simulated inductance of the pick-up coils for Sensor 6.

0 2 4 6 8 100

0.5

1

1.5

2

2.5

3

3.5

4

Excitation current[mA]

Indu

ctan

ce[m

H]

Sensor 6

N = 600N = 640N = 680MeasuredMeasuredMeasured

Fig. 6.9: Measured and simulated inductance for Sensor 6 for different turns in thepick-up coils.

Page 65: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 61

0 2 4 6 8 100

0.5

1

1.5

2

2.5

3

3.5

4

Excitation current[mA]

Indu

ctan

ce[m

H]

Sensor 6

B

sat = 0.5T

Bsat

= 0.7T

Bsat

= 0.9T

MeasuredMeasuredMeasured

Fig. 6.10: Measured and simulated inductance for Sensor 6 for different saturationvalues.

the same values for α and Bsat reported in the previous section. Fig-ure 6.12 summarises the results obtained, where the magnetic fluxthrough the pick-up coils as a function of the excitation current isplotted for uniform external induction fields.

It is possible to determine the spatial variation of the magneticflux density in the interior of the cores, in Figure 6.13 its magnitudealong the axis of one core is shown. The small ripples observed inFigure 6.13 are due to the mesh of the core which in general is notproduced in a symmetric way. These assymetries in the distributionof the elements along the geometry analysed produce a flux whichdeparts slightly from zero in the absence of an external inductionfield, contrary to what is expected from theory, making necessary toremove these effects in the post-processing stage. The distributionof the magnetic flux density along the cores for different currents andexternal fields can be easily noticed using color maps. Figure 6.14,6.15 and Figure 6.16 show the intensity of the magnetic flux density,magnetic field and the relative permeability of the cores respectively.From these figures it can be verified that a symmetric situation ispresent when the cores are not exposed to an external field and isgradually broken as the external field increases in magnitude.

The results shown in Figure 6.12 were used to determine the

Page 66: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 62

Fig. 6.11: Nonlinear cores with respective excitation coils. Each excitation coils con-sists of 800 turns.

0 5 10 150

1

2

3

4

5

6

7

8

9

10

Excitation current [mA]

Mag

netic

flux

[µW

b]

0µT2µT4µT6µT8µT10µT15µT20µT

Fig. 6.12: Magnetic flux through the pick-up coils for different values of the excitationcurrent and external induction field.

Page 67: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 63

−8 −6 −4 −2 0 2 4 6 80

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

z[mm]

Mag

netic

flux

den

sity

[T]

6µA2mA2.5mA5mA10mA

Fig. 6.13: Distribution of the magnetic flux density [T] along the axis of one core whenno external magnetic field is present.

magnetic flux and the induced voltage in the pick-up coils when ashaped current like the one used in the real circuit flows throughthe excitation coils (see Figures 6.17 and 6.18).

6.3 Excitation circuit

Figure 6.19 shows a simplified model of the resonant circuit used togenerate the current driving the cores into saturation. The resistor rand the inductance LC denote the input resistance and inductance ofthe excitation coils respectively, for a fluxgate element. The voltagesource shown generates a square waveform with an 8kHz frequency.

The circuit of Figure 6.19 is a nonlinear circuit since LC dependson the current flowing through the excitation coils, LC = LC(i),nonetheless it is possible to determine the current and voltage inevery node of the circuit by applying Kirchhoff’s laws,

Ldi1

dt+

1

C

∫ t

0

(i1 − i2) dτ = vs (6.9)

ri2 +

(

LC + i2dLC

di2

)

di2

dt+

1

C

∫ t

0

(i2 − i1) dτ = 0 (6.10)

Page 68: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 64

Fig. 6.14: Magnetic flux density (norm) [T] inside the cores for different excitationcurrents and external fields.

Page 69: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 65

Fig. 6.15: Magnetic field (norm) [A/m] inside the cores for different excitation currentsand external fields.

Page 70: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 66

Fig. 6.16: Relative permeability of the cores for different excitation currents and ex-ternal fields.

Page 71: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 67

−100 −50 0 50 100−20

−15

−10

−5

0

5

10

15

20

Time[µs]

Exc

itatio

n cu

rren

t [m

A]

Fig. 6.17: Excitation current used to saturate the cores.

−100 −80 −60 −40 −20 0 20 40 60 80 1000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time[µs]

Mag

netic

flux

[µW

b]

B = 4µT

B = 8µT

B = 10µT

−100 −80 −60 −40 −20 0 20 40 60 80 100−150

−100

−50

0

50

100

150

200

Time[µs]

Indu

ced

volta

ge[m

V]

B = 4µT

B = 8µT

B = 10µT

Fig. 6.18: Magnetic flux and induced voltage in the pick-up coils when different exter-nal induction fields are present.

Page 72: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 68

Fig. 6.19: Resonant circuit used to generate the excitation circuit. The circuit ele-ments r and Lc represent the input resistance and inductance of the exci-tation coils respectively.

where i1, i2 represent the current flowing through the left andright loop of the circuit respectively; vs the voltage source. Thevalues for the capacitor, inductor and resistor used in the simula-tion were r = 12Ω, C = 200nF, L = 3mH which are close to theactual values in the SMILE magnetometer. The inductance of theexcitation coils, Lc, was calculated using the simulation software inthe same way as the inductance of the pick-up coils; the results areshown in Figure 6.20.

The system of equations given by (6.9) and (6.10) together withthe nonlinear model of the excitation coils inductance was solvedusing Simulink. The block diagram used to represent the coupledsystem of equations is depicted in Figure 6.21. In Figure 6.22 theapplied voltage and the resultant current obtained with Simulinkare plotted. The waveform obtained for the excitation current cor-responds to the one generated to sature the cores in the SMILEmagnetometer.

6.4 Compensation coils

The model used to simulate the compensation field is shown in Fig-ure 6.24, where the three blocks represent each section of the com-pensation coils. The number of turns in each section is 90, 55 and

Page 73: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 69

0 5 10 150.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Current[mA]

Ex

cit

ati

on

co

ils

ind

uc

tan

ce

[mH

]

Fig. 6.20: Inductance of the excitation coils.

Fig. 6.21: Block diagram model of the resonant circuit shown in Figure 6.19 used inSimulink to determine the excitation current.

Page 74: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 70

0 0.5 1 1.5 2

−0.5

0

0.5

Time[ms]

Vol

tage

(V

)

0 0.5 1 1.5 2−10

−5

0

5

10

Time[ms]

Exc

itatio

n cu

rren

t (m

A)

Fig. 6.22: (Top). A periodic rectangular pulse modulated with a ramp is used to drivethe resonant circuit. (Bottom) Excitation current generated.

3.98 4 4.02 4.04 4.06 4.08 4.1 4.12 4.14−15

−10

−5

0

5

10

15

Time[ms]

Cur

rent

[mA

]

vs = 0.5V

vs = 1.0V

vs = 1.5V

Fig. 6.23: Excitation current generated for different amplitudes of the voltage source.

Page 75: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 71

Fig. 6.24: Compensation coils.

90 respectively according to the information provided in [6]. Thegeometry depicted in Figure 6.24 resembles a pair of Helmholtz coilwith exception that an additional segment is added in the centreand square coils instead of circular ones are used. This arrangementproduces a quite homogeneous magnetic field in the interior of thecoils, close to their axis of symmetry. Figure 6.25 shows the fieldlines of the magnetic flux density (norm) when a current of 1mA isused to drive the coils.

In the SMILE magnetometer the fluxgate elements are not sit-uated in the axis of symmetry of their compensation coils, indeedthey are located about 3.5mm from the borders. The field in thisregion is not at all homogeneous nonetheless the variations alongthe axis where both cores lie are below 3% of the maximum am-plitude reached. The magnitude of the compensation field wherethe magnetic tapes are located is shown in Figure 6.26. Like thesituation present in Figure 6.13, the stair case appearance is due tothe distribution of the mesh elements.

Table 6.2 shows the results of simulations for different currentsdriving the excitation coils. The magnitude of the field listed is theone measured at the point with coordinates (3.5mm, 3.5mm, 0mm)which correspond to the centre point of the fluxgate element in its

Page 76: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 72

Fig. 6.25: Compensation field [T] produced when a 1mA current is used to bias thecoils. The geometry was partitioned with a total of 29257 elements.

−8 −6 −4 −2 0 2 4 6 826

26.2

26.4

26.6

26.8

27

27.2

Position along axis of the core [mm]

Com

pens

atio

n fie

ld[µ

T]

Fig. 6.26: Compensation field [T] along the axis of axis of symmetry of the fluxgateelement.

Page 77: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 73

position inside the compensation coils.

Current (mA) Compensation field(µT)1 8.9492 17.8983 26.4874 35.7965 44.7456 53.6957 62.6448 71.5939 80.54210 89.491

Tab. 6.2: Compensating field for different currents driving the compensation coils.

By using regresion analysis it is possible to find coefficients a1

and a2 to fit the best linear model for the data listed in Table 6.2,

Bcomp = a1 + a2icomp (6.11)

giving a1 = −330.8zT 1 and a2 = 8.9µT/mA. The value obtainedfor a2 is within the range specified by the designer [16].

1 1zT = 10−21T

Page 78: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

6. Results 74

0 2 4 6 8 10−10

0

10

20

30

40

50

60

70

80

90

Compensation current[mA]

Com

pens

atio

n fie

ld[µ

T]

Fig. 6.27: Linear model used to fit the data in Table 6.2.

Page 79: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

7. CONCLUSIONS

Results of numerical simulations of sensor elements that form partof the SMILE magnetometer using a commercial software based onthe finite element method (FEM) are presented. The results ob-tained tend to confirm the theoretical predictions and reproduceto a certain degree the waveforms obtained experimentally. Eventhough the general behaviour of the inductance curve for the pick-up coils was reproduced, the measured and simulated inductancesdiffer at least in 1mH. The reasons for this discrepancy were in-dentified, being the nonlinear model proposed to characterise themagnetic properties of the cores and the quality of the mesh usedto analyse the given geometries. Nonetheless the results obtainedcan serve to understand the behaviour of the fluxgate elements fordifferent situations. The use of the FEM enabled us to take into ac-count the geometry of the cores without introducing simplificationssuch as the demagnetising factor to find the magnetic fields in theirinterior. Regarding the excitation circuit, it was verified that thesimplified resonant circuit proposed together with the inductanceof the excitation coils obtained with the simulations reproduce theshape of the excitation current used to saturate the cores. In or-der to reduce the difference bewteen the simulated curves and theexperimental ones, a mathematical model that allows a direct ma-nipulation of the relative permeability of the cores as a function ofthe induction field in their interior should be used. In the sameway, the quality of the mesh should be improved with an efficientdistribution of mesh elements in the regions of interest.Future work should include the integration of the whole sensor partsin a single simulation to visualise the distribution of the fields in theinterior of the cores and the way the compensating field is producedthat could lead to improvements in the design of the SMILE magne-tometer. This will demand the use of computer(s) with considerablestorage capacity.

Page 80: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

BIBLIOGRAPHY

[1] Baselga Bacardit, Marta. Modelling of particle flows in the mag-netosphere of Mercury. Master Thesis. Royal Institute of Technol-ogy, Stockholm, 2007.

[2] Bruns, Heinz-Dietrich; Schuster, Christian. Numerical Electro-magnetic Field Analysis for EMC Problems. IEEE Transactionson Electromagnetic Compatibility, vol. 49, no. 2, pp. 253-562 May2007.

[3] Cabrera, Blas. First Results from a Superconductive Detector forMoving Magnetic Monopoles. Phys. Rev. Lett, vol 48, no. 20, pp.1378-1381, May 1982.

[4] COMSOL Multiphysics User’s Guide. COMSOL AB, 2005.

[5] COMSOL Electromagnetics Module User’s Guide. COMSOLAB, 2005.

[6] Edberg, Terry. Evaluation and optimization of the SMILE flux-gate magnetometer. Master Thesis. Royal Institute of Technology,Stockholm, 2007.

[7] Encyclopædia Britannica online. http://www.britannica.com/

[8] Feynman, Richard P. ; Leighton, Robert B. ; Sands, Matthew.The Feynman Lectures on Physics. Volume II The Electromag-netic Field. Addison-Wesley, 1964.

[9] Finite Element Method. http://en.wikipedia.org/wiki/Finite element method

[10] Forslund, Ake. Designing a Miniaturized Fluxgate Magnetome-ter. Master Thesis. Royal Institute of Technology, Stockholm,2006.

[11] Forslund Ake; Ivchenko, Nickolay, et. al. Miniaturized digitalfluxgate magnetometer for small spacecraft applications. submitedto Measurement Science and Technology.

Page 81: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

Bibliography 77

[12] Garcia, Alejandro L. Numerical Methods for Physics. PrenticeHall, 1994.

[13] http://www.microwaves101.com/encyclopedia/inductormath.cfm

[14] Jackson, John David. Classical Electrodynamics. John Wiley &Sons, 1975.

[15] Lorrain, Paul; Corson, Dale. Electromagnetics Fields andWaves. W. H. Freeman and Company, San Francisco, 1970.

[16] Lviv Centre of Institute of Space Research. Miniature flux-gatesensor LEMI-020 No. 06. Technical Description and OperationManual.

[17] Matveyev, Aleksey. Principles of Electrodynamics. ReinholdPublishing Corporation.

[18] Mori, Masatake. The Finite Element Method and Its Applica-tions. MacMillan Publishing Company, 1986.

[19] Primdahl, Fritz. The Fluxgate Mechanism, Part I: The GatingCurves of Parallel and Orthogonal Fluxgates. IEEE Transactionson Magnetics, vol. MAG-6, no. 2, pp. 376-383, June 1970.

[20] Primdahl, Fritz. The fluxgate magnetometer. J. Phys. E: Sci.Instrum., vol 12, pp. 241-253, 1979.

[21] Primdahl, Fritz. The fluxgate ring-core internal field. Measure-ment Science and Technology 13, pp. 1248-1258, 2002.

[22] Primdahl, Fritz; Jensen, P. Anker. Compact spherical coil forfluxgate magnetometer vector feedback. J. Phys. E: Sci. Instrum.,vol 15, pp. 221-226, 1982.

[23] Purcell, Edward M. Electricity and Magnetism. McGraw-HillScience Engineering, 1984.

[24] Ripka, Pavel. Magnetic Sensors and Magnetometers. ArtechHouse, Boston.

[25] Sadiku, Matthew. A simple Introduction to Finite ElementAnalysis of Electromagnetic Problems. IEEE Transactions on Ed-ucation, vol. 32, no. 2, pp. 85-93 May 1989.

Page 82: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

Bibliography 78

[26] Verschuur, Gerrit L. Hidden Attraction. The History and Mys-tery of Magnetism. Oxford University Press, New York, 1993.

[27] Willliams, L. Pearce. Why Ampere did not discover electromag-netic induction. Am. J. Phys. vol 54, no. 4, pp. 306-311, 1986.

Page 83: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

APPENDIX

Page 84: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. CODE FOR SPHERE OF PERMEABLE MATERIAL

function fem = permsph3d(B0, a, mur, l, mesh)% PERMSPH3D Script used to simulate a sphere of permeablematerial% inmersed in an uniform magnetic flux induction direceted% along the positive z axis.%% fem = permsph3d(B0, a, mur, l, mesh)%% The paremeters passed to the function are specified in the% table below%% Parameter — Description% ————————————————————% B0 — Magnetic flux induction where the sphere of% — permeable material is inmersed[T]. Scalar value% a — Radius of the sphere[m]% l — Vector containing the dimensions of the% — simulation box. The first component specifies% — the longitude along the x axis, the second along% — the y axis and the last one the longitude along% — the z axis% mur — Relative permeability (numerical expression)% mesh — Cell array that contains the information of the% — mesh.% — scalar (hauto), ’hmaxsub’, numeric array% — Where hmaxsub is the maximum element size for% — subdomains.%

% Space dimension section of the applicationfem.sdim = ’x’ ’y’ ’z’;

Page 85: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. Code for sphere of permeable material 81

% Draw and geometry section of the model% Sphere centered at the origin with radius asph3 = sphere3(a);% Simulation box used to test the meshblk3 = block3(l(1), l(2), l(3), ’base’, ’center’);fem.geom = geomcsg(sph3 blk3);

% Application mode sectionappl.mode.class = ’MagnetostaticsNoCurrents’;appl.name = ’emnc’;fem.units = ’SI’;% Boundary settingsappl.bnd.type = ’cont’ ’B’;appl.bnd.B0 = 0 0 ’B0’;appl.bnd.ind = [2 2 2 2 2 1 1 1 1 1 1 1 1 2];% Subdomain settingsappl.equ.mur = ’1’ ’mu r’;% Mesh sectionfem.mesh = meshinit(fem, ’hauto’, mesh1, mesh2, mesh3);% Constant sectionfem.const = ’B0’ B0 ’mu r’ mur;% Multiphysics sectionfem.appl = appl;fem = multiphysics(fem);% Meshextend sectionfem.xmesh = meshextend(fem);% Solver sectionfem.sol=femlin(fem, ’method’,’eliminate’, ...’nullfun’,’auto’, ...’blocksize’,5000, ...’complexfun’,’off’, ...’matherr’,’on’, ...’solfile’,’off’, ...’conjugate’,’off’, ...’symmetric’,’on’, ...’solcomp’,’Vm’, ...’outcomp’,’Vm’, ...’rowscale’,’on’, ...’linsolver’,’spooles’, ...

Page 86: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. Code for sphere of permeable material 82

’thresh’,0.1, ...’preorder’,’mmd’, ...’uscale’,’auto’, ...’mcase’,0);

function c = jcontent3(X,Y,Z,F)% JCONTENT3 Approximation to the Jordan content of an hypersurface% defined by F = F(X,Y,Z)%% c = jcontent3(X,Y,Z,F)%% X,Y,Z represent a mesh of the region of interest and F is a% matrix containing the numerical representation of the% hypersurface%% See also jcontent2

s msh = size(F); % The size of the mesh is determined

dx = X(1,2,1)-X(1,1,1);dy = Y(2,1,1)-Y(1,1,1);dz = Z(1,1,2)-Z(1,1,1);

c = 0;for k = 1:s msh(3)-1for l = 1:s msh(1)-1for m = 1:s msh(2)-1c = c + 1/8*(F(l,m,k)+F(l,m+1,k)+F(l+1,m,k)+F(l+1,m+1,k)+...F(l,m,k+1) + F(l,m+1,k+1) + F(l+1,m,k+1) +F(l+1,m+1,k+1));endendendc = c*dx*dy*dz;

Page 87: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. Code for sphere of permeable material 83

function [ec3, et3, ed3] = jcont3(B0, a, mur, reg, np reg, lsb, mesh)% JCONT3 Calculates the content in the solution obtained withComsol and% the theoretical solution for a sphere of permeable material% inmersed in a uniform magnetic flux density.%% [ec3, et3] = jcont3(B0, a, mur, reg, np reg, lsb, mesh)%% Valid parameters passed to the function are%% Parameter — Description% —————————————————————-% B0 — External magnetic flux density directed along the z% — axis[T]% a — Radius of the sphere% mur — Relative permeability% reg — Vector that defines the region where the content is% — determined [xmin xmax ymin ymax zmin zmax]. The% — distances are assumed to be in meters% np reg — Vector containing number of grid points along each% — axis [nx ny nz]% lsb — Vector containing the dimension of the simulation% — box [lx ly lz]. The dimensions are assumed to be in% — meters% mesh — Cell array that defines the mesh parameters in the% — Comsol model hauto, ’hmaxsub’, numeric array,% — ’hgradsub’, numeric array%% ec3 and et3 contain the content of the solution provided by% Comsol and the theoretical one respectively, in the region% defined. ed3 contains the content of the absolute difference.%

%% Region of interest. The region over which the error is estimatedis% defined below. This region does not change is independent of the% dimensions of the simulation box

Page 88: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. Code for sphere of permeable material 84

xmin = reg(1);xmax = reg(2);nx = np reg(1);ymin = reg(3);ymax = reg(4);ny = np reg(2);zmin = reg(5);zmax = reg(6);nz = np reg(3);x = linspace(xmin, xmax, nx);y = linspace(ymin, ymax, ny);z = linspace(zmin, zmax, nz);[X,Y,Z] = meshgrid(x,y,z);

et = jcontent3(X,Y,Z,ones(size(X)));%% Parameters used in the solution with COMSOLfem = permsph3d(B0, a, mur, lsb, mesh);emc = mesh2table(X,Y,Z);[nBc3, nHc3] = postinterp(fem, ’normB’, ’normH’, emc);

nBc3 = remove nan(nBc3);[nBt3, nHt3] = magnorm(B0, a, mur, emc);

[Xm3, Ym3, Zm3, mBc3] = table2mesh(emc(1,:)’, emc(2,:)’,

emc(3,:), nBc3’);[Xm3, Ym3, Zm3, mBt3] = table2mesh(emc(1,:)’, emc(2,:)’,

emc(3,:), nBt3’);ec3 = jcontent3(Xm3,Ym3,Zm3,mBc3);et3 = jcontent3(Xm3,Ym3,Zm3,mBt3);ed3 = jcontent3(Xm3,Ym3,Zm3,abs(mBc3-mBt3)./abs(mBt3));

function t = mesh2table2d(X,Y,z)% MESH2TABLE2D Arranges the coordinates in a mesh into amatrix table% ready to use for postprocessing with COMSOL libraries.%% t = mesh2table2d(X,Y,z)%% The paramteres passed to the function are described in the

Page 89: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. Code for sphere of permeable material 85

% following table%% Parameter — Description% ———————————————————% X,Y — Mesh of the region of interest% z — Scalar that indicates the height of the plane% — where the mesh is done%xt = matrix2vector(X);yt = matrix2vector(Y);zt = ones(1,length(xt))*z;t = [xt; yt; zt];

function t = mesh2table(X,Y,Z)% MESH2TABLE Sorts the coordinates in the mesh grid specifiedby X,Y,Z% in a table.%% t = mesh2table(X, Y, Z)%% The new arrangement is ordered in a matrix where% the first row contains the x coordinates of the mesh, the% second row the y-coordinates and the z coordinates are% stored in the third row.% The mesh is assumed to be composed by planes parallel to the% xy plane, in the form%% [X, Y, Z] = meshgrid(xs, ys, zs)%% where xs, ys and zs are the vectors containing the grid% points of the mesh.

% The size of the matrix Z is determined. It is possible to inferethe% number of slices and gridpoints per plane contained in thematrix Z.smg = size(Z);offset = 1; % Auxiliary pointer

Page 90: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

A. Code for sphere of permeable material 86

for k = 1:smg(3)x(offset:offset + smg(1)*smg(2) - 1) = matrix2vector(X(:,:,k));y(offset:offset + smg(1)*smg(2) - 1) = matrix2vector(Y(:,:,k));z(offset:offset + smg(1)*smg(2) - 1) = matrix2vector(Z(:,:,k));offset = offset + smg(1)*smg(2);endt = [x; y; z];

Page 91: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

B. CODE FOR THE SIMULATION OF THE DOUBLE CORE

% sns ind Script used to calculate the solution using Comsol of thedouble% core fluxgate elementclear allclose allclcload fem indtan5

fem0 = fem;

% Parameters used in the simulationda = (0.36e-3)*(16e-3); % Cross sectional areai exc = linspace(1e-9, 10e-3, 25); % Excitation currentn turns = 800;i sns = 1e-5;n sns = 575;da sns = (0.45e-3)*(8e-3);j sns = i sns*n sns/da sns;

for k = 1:length(i exc)j exc = i exc(k)*n turns/da;fem.const10 = i exc(k);fem.const12 = j exc;fem.const22 = i sns;fem.const24 = j sns;

fem = multiphysics(fem);fem.xmesh = meshextend(fem);

fem.sol=femstatic(fem, ...’init’,fem0.sol, ...

Page 92: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

B. Code for the simulation of the double core 88

’method’,’eliminate’, ...’nullfun’,’auto’, ...’blocksize’,5000, ...’complexfun’,’off’, ...’matherr’,’on’, ...’solfile’,’off’, ...’conjugate’,’off’, ...’symmetric’,’on’, ...’solcomp’,’psi’,’tAxAyAz10’, ...’outcomp’,’psi’,’tAxAyAz10’, ...’rowscale’,’on’, ...’ntol’,1.0E-6, ...’maxiter’,25, ...’nonlin’,’on’, ...’hnlin’,’off’, ...’linsolver’,’pardiso’, ...’preorder’,’mmd’, ...’preroworder’,’on’, ...’pivotperturb’,’1.0E-8’, ...’itol’,1.0E-6, ...’rhob’,400.0, ...’errorchk’,’on’, ...’uscale’,’auto’, ...’mcase’,0);fem0 = fem;clear fem;fem = fem0;

% save solutionstrstep = num2str(k);pthfile = cd;strfile = ’fem ’;strfile = strcat(strfile, strstep);pthfile = strcat(pthfile, strfile);save(pthfile, ’fem’);end

% LGSNS Script used to retrieve magnetic flux from the solutions

Page 93: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

B. Code for the simulation of the double core 89

obtained% with Comsol for different currents

clear allclose allclc

% Currents used to generates the FEM structuresimax = 10e-3;i exc = linspace(1e-9, imax, 25);i sns = 1e-5;% Variables used to load the solutionspth = cd; % the path is retrievednfiles = length(i exc); % number of solutions

z = linspace(-4e-3, 4e-3, 100);

t = linspace(0,2*pi,1000);R = 2.475e-3;x = R*cos(t);y = R*sin(t);

pth = zeros(3,1000);pth(1,:) = x;pth(2,:) = y;

strW = ’Ax’ ’Ay’ ’Az’;for k = 1:nfilesstrfilek = strcat(strfile, num2str(k));load(strfilek);fem.xmesh = meshextend(fem);

for l = 1:length(z)zt = ones(1,1000)*z(l);

pth(3,:) = zt;

l wind = lint(fem, pth, strW);li ind tan(l, k) = 5.75*l wind;

Page 94: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate

B. Code for the simulation of the double core 90

end

clear strfilekstrfilek = strcat(strfile, num2str(k));

end

% Total magnetic fluxfor l = 1:nfiless lphi ind tan(l) = sum(li ind tan(:,l));end

save windtan5

function l = lint(fem, pth, strW)% LINT Approximation to line integral along the trajectory pthfor the solution% stored in the FEM structure sz pth = size(pth);

for k = 1:sz pth(2)-1mdp(:,k) = 1/2*(pth(:,k)+pth(:,k+1));dl(:,k) = pth(:,k+1)-pth(:,k);end

[Ax Ay Az] = postinterp(fem, strW1, strW2, strW3, mdp);A = [Ax; Ay; Az];

l = sum(dot(A,dl));

Page 95: TRITA-EE 2007:048 - diva-portal.se618440/FULLTEXT01.pdf · TRITA-EE 2007:048 Numerical Modeling and Evaluation of ... 3.2 Finite Element Method ... 6.1 COMSOL model of the fluxgate