Calib08

Embed Size (px)

Citation preview

  • 8/9/2019 Calib08

    1/33

    SMART CALIBRATION OF EXCAVATORS

    AN ESGI54 PROJECT FROM MIKROFYN

    M. BRO, K. DRING, L.-P. ELLEKILDE, M. S. HANSEN, S. MARKVORSEN,D. SPENCE, M. STOLPE, AND D. SLVASON

    1. Introduction

    Excavators dig holes. But where is the bucket? The purpose of

    this report is to treat four different problems concerning calibrations ofposition indicators for excavators in operation at concrete constructionsites. All four problems are related to the question of how to determinethe precise geographic and/or site-relative position of a given excava-tor and its bucket. However, our presentations and solutions to theproblems can, nevertheless, be read and studied in any order and in-dependently of each other.

    This also implies and induces a gentle warning to the reader: Thenotationneed not be consistently transferable from one section to an-other.

    Outline of paper . The 4 problems are treated in the respectivesections according to the following list:

    Problem A: Magnetic Compass Calibration: Sections 2and 3 and Appendices A and B.

    Problem B: Inclinometer Calibration: Section 4. Problem C: Center Finding from Circular GPS Mo-

    tion: Section 5. Problem D: Distant Pitch Generation via Rotation:

    Section 6.

    2. Problem A: Magnetic Compass Calibration

    In this section we consider the question of how to determine theheadingh of a rotating objectE(like a magnetometer mounted on thecap of an excavator) givenpitchp,rollr and (distorted) components ofEarths magnetic field B in a magnetic compass frame situated onE .This is a classical problem in the context of navigation systems [2, 1]encountered in many different fields e.g. aviation [3, 4, 5], robotics [6],

    and space engineering [7].1

  • 8/9/2019 Calib08

    2/33

    2 ESGI54 EXCAVATOR CALIBRATION

    2.1. Magnetic fields model. To a good approximation the directionof Earths magnetic field B only depends on the latitude which can be

    used to determine the orientation of an object. Assuming thatE isfree to move in all three dimensions B will induce a sphere of radiusBcentered at the origo of the compass coordinate system. However,there are two local effects distorting the field components measuredby a magnetic compass known as hard and soft iron effects in thenavigation systems literature. Both are properties of ferromagneticmaterials and are collectively known as ferrous effects.

    2.1.1. Hard iron effects. In ferromagnetic materials the constituent atomseach have a magnetic moment and quantum mechanical interactionsbetween electrons give rise to an alignment of these moments. This

    permanent magnetization is the hard iron effect resulting in a transla-tion

    (2.1) Bm =B + H,

    of the magnetic field measured by the compass (index mmeans mea-sured, since this is (in the model so far) the effective field, which ismeasured by the magnetometer).

    H H + SH

    No perturbation

    B + SBB

    B

    Hard iron effects Hard and soft iron effects

    Figure 1. Due to the presence of materials with var-ious magnetic properties a magnetic compass will onlymeasure a distorted version of the Earths magnetic fieldB. This should be included in a calibration scheme toobtain a precise determination of the heading.

    2.1.2. Soft iron effects. However, not all ferromagnetic materials ex-hibit a permanent magnetization. The quantum mechanical interac-tions alluded to above are of a local nature and on a larger scale dipole-dipole interactions tend to anti-align macroscopic magnetic domains1.This explains why the introduction of an external field may increase

    1Regions where the magnetic moments are aligned.

  • 8/9/2019 Calib08

    3/33

    ESGI54 EXCAVATOR CALIBRATION 3

    the magnetization. Material characteristics such as anisotropies intro-duce a directional dependency of the measured magnetic field.

    The contribution of soft iron effects to the effective measured mag-netic field is thus modeled as follows:

    (2.2) S(B +H) ,

    where Sis some unknown operator which we may represent by a 3 3matrix in the magnetometer coordinate system, which is calledC2. Weassume that the materials in question have no memory i.e. we neglecthysteresis effects. In this caseS describes the angular dependency ofthe measured magnetic field.

    In the present approach we will assume that this operator (this ma-trix) S is constant (having constant coordinates inC2) and that thehard iron contributionH is constant as well (having also constant coor-dinates inC2). A refined - but correspondingly much more complicated- model of the soft and hard iron effects should relax these assumptions.The geometry of the excavator, i.e. the geometry of the embedded softand hard iron, is surely not constant - if it were, then the excavator(including the motor) would be completely rigid and thence not veryuseful.

    Under these assumptions, taking both hard and soft iron effects to-gether, we have a distorted effective magnetic field, which is measuredby the magnetometer:

    (2.3) Bm = C(B +H),

    where (using Ito denote the identity):

    (2.4) C = I+ S

    as shown in Fig. 1. For more information on the physics of ferromag-netism - see Appendix A.

    2.2. Coordinate transforms. We consider coordinate systems witha fixed common originO:

    (1) The World coordinate system:

    C1 ={O, x1, y1, z1, ex1, ey1, ez1} ,where thez1-axis is considered vertical, i.e. directed opposite tothe force of gravity, so that the (x1, y1)-plane is horizontal. Thex1-axis is assumed to be directed in a fixed direction which hasbeen defined and set up by the surveyors on site location. Thisdirection is NOT necessarily true North or any approximation

    thereof.

  • 8/9/2019 Calib08

    4/33

  • 8/9/2019 Calib08

    5/33

    ESGI54 EXCAVATOR CALIBRATION 5

    M(r,p,h) = M3(h)M2(p)M1(r) =

    cos(h)cos(p) sin(h)cos(r) cos(h)sin(p)sin(r) sin (h)sin(r) cos(h)sin(p)cos(r)

    sin(h)cos(p) cos (h)cos(r) sin (h)sin(p)sin(r) cos(h)sin(r) sin (h)sin(p)cos(r)

    sin(p) cos (p)sin(r) cos (p)cos(r)

    M1(r,p,h) = M11

    (r)M12

    (p)M13

    (h) =

    cos(h)cos(p) sin (h)cos(p) sin (p)

    sin(h)cos(r) cos(h)sin(p)sin(r) cos (h)cos(r) sin(h)sin(p)sin(r) cos (p)sin(r)

    sin(h)sin(r) cos(h)sin(p)cos(r) cos(h)sin(r) sin(h)sin(p)cos(r) cos (p)cos(r)

    .

    The latter matrix is just the transpose of the former, since both ofthem are orthogonal matrices.

    2.3. Equations from combined model and transform. In the fol-lowing subsection 2.3.1 we first consider the simplest possible model fordetermining the heading from a given measurement. Then, in subsec-tion 2.3.2, the hard and soft iron effects are taken into account usinga most general linear model for their influences, as developed above insection 2.1.

    2.3.1. The pure Sphere Case. First we consider the non-disturbed case:no hard and no soft iron, only the ambient constant magnetic field Bfrom the Earth is present. The coordinates of this field in the coordinate

    systemC1 are constants:BC1 =

    ab

    c

    We also assume, that the magnetometer is perfect, so that it mea-sures the exact coordinates of this vector in the magnetometer coordi-nate systemC2:

    BC2 =

    a

    m

    bm

    cm

    Then

    (2.7)

    a

    m

    bm

    cm

    = M1(r,p,h)

    ab

    c

    Note that for each measurement we thus know am, bm, cm fromthe magnetometer displays, and r and p from inclinometer displays.The value ofr follows from both of the two inclinometer displays viaequation (2.5).

    The unknown values are thus h and a, b, c. The latter 3 could bemeasured by some other device for comparison, but we will develop a

    procedure to actually find the B-field as well as the heading h.

  • 8/9/2019 Calib08

    6/33

    6 ESGI54 EXCAVATOR CALIBRATION

    For each measurement we thus have 3 equations (one for each coor-dinate, see below) and 4 unknowns. Among the 4 unknowns, however,

    3 of them are constants, i.e. they do not vary from one measurementto the other.

    For each measurement the 3 equations alluded to are the following,which are directly equivalent to equation (2.7):

    (2.8)

    am = cos (h)cos(p) a

    + sin (h)cos(p) b

    + sin (p) c ,

    bm = cos (h) ( sin(p)sin(r) a + cos (r) b)

    + sin (h) ( cos(r) a sin(p)sin(r) b)+ cos (p)sin(r) c ,

    cm = cos (h) ( sin(p)cos(r) a sin(r) b)+ sin (h)(sin(r) a sin(p)cos(r) b)+ cos (p)cos(r) c .

    Note that if we knew the values ofa, b, and c (the constant ambi-ent magnetic field), then we would now have (generically speaking) 3equations to determine the heading h. Each of the equations is solvedin h in a similar way as in problem D.

    On the other hand, suppose we let h = 0 (or, say, let h be in anypreferred set of easily identified directions on the excavation site, e.g.h {0, /2, }) then for this (these) particularknown heading(s) weget values ofa, b, and c by just one reading of the magnetometer foreach chosen value ofh, here is the case for h= 0:

    ab

    c

    = M(r,p, 0)

    a

    m

    bm

    cm

    =

    cos(p) am

    sin(p)sin(r) bm

    sin(p)cos(r) cm

    cos(r) bm sin(r) cmsin(p) am + cos (p)sin(r) bm + cos (p)cos(r) cm

    With a constant known heading we may do several measurements,

    by varying the values ofp and r. Each extra measurement gives rise tostabilize the determination ofa,b, and c in a, say, least square sense,cf. section 5.

    With these values ofa,b, andc we then change the heading to someunknown valueh. The value ofh is then determined by one or a series

    of measurements: With the fixed heading change firstr and thenp and

  • 8/9/2019 Calib08

    7/33

    ESGI54 EXCAVATOR CALIBRATION 7

    always read off the display of corresponding values ofr,p,am,bm, andcm.

    The value ofh is then determined by any one of the 3 equations in(2.8). For N measurements at the heading h we have generically 3Nequations to determine the value ofh.

    Each one of these equations is of the following type:

    (2.9) cos(h) +sin(h) =

    Let x = sin(h) so that cos(h) =

    1 x2, assuming first that theheading is forward, i.e. h [/2, /2] with respect to the fixeddirection of the x1-axis in the World systemC1. Then

    x = 2 + 2 2

    2 + 2

    Again, as in problem D, generically there will be 4 solutions, 4 head-ing values satisfying equation (2.9). However, only one of them willbe in the intersection of all sets of solutions stemming from the 3Nequations.

    This then finishes the strategy in case of no perturbation terms inthe magnetic field, i.e. the pure sphere case. The general case is nowreduced to the sphere case as follows:

    2.3.2. The General Case. The strategy is much the same as above:First we determine the constants in the problem, and then for eachsingle measurement we apply these constants to determine the heading.

    The constants in the general setting are: The hard iron contributionH (constant coordinates inC2), the constant ambient field (constantcoordinates inC1) and the distortion matrix C(constant coordinatesinC2). The matrix C is assumed to be highly regular, since it willusually be a relatively small perturbation (by S) of the identity matrix,cf. Figure 1 and equations (2.3) and (2.4). But it is important to note,that unlike several of our (best) references we do NOT assume anystructural simplicity (like e.g. symmetry) of this matrix. Thus oursolution will take care of any constant first order perturbation effectsresulting from soft iron and scaling mismatch etc.

    The intermixed variables are stillr ,p andh. We recall from subsec-tion 2.1:

    Bm = C(B +H) ,

    where Hdenotes the fixed hard magnetic field in the excavator systemC2. Equivalently the coordinate expression with respect to systemC2is therefore:

    (2.10) BmC2 = CC2(BC2+ HC2) .

  • 8/9/2019 Calib08

    8/33

    8 ESGI54 EXCAVATOR CALIBRATION

    Setting

    HC2 =

    and CC2 = c11 c12 c13c21 c22 c23

    c31 c32 c33

    we get:(2.11)

    am

    bm

    cm

    =

    c11 c12 c13c21 c22 c23

    c31 c32 c33

    M1(r,p,h)

    ab

    c

    +

    .

    The problem is to find the constants cij, the constants a, b, c, , ,and eventually the variable h (for each measurement).

    The idea is again first to tell as much about the constants withoutknowing h except for the zero directional case or (as above for h insome set of easily identifiable heading values, e.g. h {0, /2, }.For example for h= 0 we get (for each choice ofr and p) 3 equationsfor the 15 unknown constant values. Thus we need only (generically)5 measurements (with known precise values ofh) to determine the 15constants. Once found, we insert these constants into equation (2.11)and then solve for h (as in the pure case discussed above) for all otherorientations.

    This direct method does not use the fact that the measurements ide-ally do lie on an ellipsoid, as displayed in Figure 1! Nor does it use theinformation hidden in M1(r,p,h), that this coordinate shift matrix isorthogonal, so that it preserves lengths. We apply these two observa-tions now.

    From the ellipsoidal fitting algorithm developed in the next section 3we obtain the best fit ellipsoid in R3 to the complete and accumulatedset of measured values of (am, bm, cm). This ellipsoid gives (from theoutput of this algorithm) a (non unique) constant regular deformation

    mapping (a 33 matrix) K, and a constant translation vector d =(d1, d2, d3), so that with a fixed choice of known K and the knowntranslation vector d, we have the following correspondence

    (2.12)

    a

    m

    bm

    cm

    = K

    a

    m0

    bm0cm0

    +

    d1d2

    d3

    ,

    where

    am0bm0

    cm0

  • 8/9/2019 Calib08

    9/33

    ESGI54 EXCAVATOR CALIBRATION 9

    is thereby a well-defined vector representative of the measured vector

    am

    bm

    cm

    Since the fitting of the ellipsoid is not exact for every values of(am, bm, cm), the pre-image representative (am0, b

    m0, c

    m0 ) of this measure-

    ment is not exactly a unit vector. This, therefore, is the point wherewe may, and do, normalize the measurements to lie on an ellipsoid, i.e.we simply normalize the representatives (am0, b

    m0, c

    m0 ) to lie on a sphere.

    From now on we thus assume, that the vectors (am0, bm0, c

    m0 ) are unit

    representatives of the measurements (am, bm, cm).

    If we let C1 = D , then D is also a regular matrix being close tothe identity, and we have from (2.11):

    (2.13) D

    a

    m

    bm

    cm

    = M1(r,p,h)

    ab

    c

    +

    Inserting equation (2.12) into (2.13) gives:

    (2.14) D

    K

    am0bm0cm0

    +

    d1d2d3

    = M1(r,p,h)

    abc

    +

    .

    Since D and K are constant matrices, and (d1, d2, d3), (a,b,c), and(,,) are constant vectors, we conclude

    (2.15) DK

    a

    m0

    bm0cm0

    = M1(r,p,h)

    ab

    c

    and

    (2.16) D

    d1d

    2d3

    =

    .

    But then (from (2.15)):

    (2.17) DK =

    a2 + b2 + c2M0 ,

    where M0 is an orthogonal matrix.In total we get the following (almost pure spherical case) from equa-

    tion (2.15):

    (2.18) M0

    am0bm0

    cm0

    = M

    1(r,p,h)

    a

    b

    c

    ,

  • 8/9/2019 Calib08

    10/33

    10 ESGI54 EXCAVATOR CALIBRATION

    where

    abc

    = 1a2 + b2 + c2

    abc

    are the coordinates inC1 of the (normalized) magnetic field B/B.

    Equation (2.18) is then the main equation for solving the generalcase. It represents the promised reduction of the general case to thepure sphere case, which was considered and solved in subsection 2.3.1.The end-strategy is now the same - taking due notice of the fact thatwe have to deal also with the unknown, but constant, orthogonal ma-trix M0:

    To repeat, suppose we let h = 0 (or, say, h in any preferred set ofeasily identified directions on the excavation site, e.g. h {0, /2, })then for this (these) particularknown heading(s) (given by some fixedreference direction on site) we get from (2.18) 3 linear equations to

    determine both the normalized B coordinates (a, b, c) as well as theunknown orthogonal factor matrix M0. Essentially the linear problemin question has only 6 unknowns because M0is orthogonal and is thusdetermined by 3 rotation angles. In principle we therefore only need 2magnetometer- and inclinometer- readings for given (possibly different)precise heading values.

    Having determined these constants the strategy to determine theheading from any set of magnetometer- and inclinometer-reading isthen precisely identical to the strategy lined up in subsection 2.3.1 forthe pure sphere case.

    3. Ellipsoidal data fitting

    The problem of fitting an ellipse or an ellipsoid to measured data

    has many applications in diverse areas such as image processing [8]and astronomy [9]. In this section we will present the ellipsoid fittingproblem as a least squares optimization problem and propose severaldirect and iterative methods to solve it. This section closes with severaltwo and three dimensional numerical examples.

    3.1. Least squares estimators. Given a set of measured data points{xj}Nj=1 we want to find an ellipsoid described by(3.1) E(Ae, c) ={x Rn |(x c)TAe(x c) = 1}that fits the points well. Here, Ae

    Snb is a symmetric positive

    definite matrix andc Rn is the center of the ellipsoid. One possibility

  • 8/9/2019 Calib08

    11/33

    ESGI54 EXCAVATOR CALIBRATION 11

    to fit an ellipsoid to the set of data points is to minimize the algebraicdistance, i.e. to solve one of the optimization problems

    (3.2) minAe,c

    Nj=1

    ((xj c)TAe(xj c) 1)2 subject toAe0

    or

    (3.3) minAe,c

    Nj=1

    |(xj c)TAe(xj c) 1)|subject toAe0.

    Both (3.2) and (3.3) are nonlinear least-squares problems. Anotherpossibility is to minimize the geometric distancefrom the points to the

    ellipsoid (orthogonal regression), i.e. to solve the optimization problem

    minAe,c

    Nj=1

    dist(xj, E(Ae, c))2

    where dist(x, E(Ae, c)) is the Euclidean distance from the point x tothe ellipsoid Edescribed by the parameters Ae and c. Since there, tothe knowledge of the author, does not exist a closed expression on theEuclidean distance between a point in space and an ellipsoid, we fromnow on focus on the algebraic least squares fitting problem.

    3.1.1. An alternative representation. Another possibility is to considera second order surface in Rn as the set

    (3.4) S(A,b,d) ={x Rn |xTAx+ bTx+ d= 0},whereASnn is a symmetric matrix, b Rn, and d is a scalar. Thesecond order surface is an ellipsoid ifA is positive definite and 4d 0 & not(isinf(D))); beta =V(:,PosR); lambda = D(PosR,PosC);% Scale the eigenvector such that beta*C*beta = 1;

    mu = sqrt(1/(beta*C*beta)); beta = mu*beta;

    The ellipse is after the solution of the generalized eigenvalue problemand scaling given by

    A=

    a11 a12/2a12/2 a22

    =

    1 2/22/2 3

    , b=

    b1b2

    =

    45

    , d= 6.

    Unfortunately, the above presented method can not be easily extended

    to ellipsoids. However, the method from [11] is used as the foundationfor an iterative method for fitting ellipsoids.

    3.3. Least squares fitting of ellipsoids. The presentation in thissection closely follows the presentation in [13]. We also adopt thenotation from this article which is in conflict with the notation fromthe previous section. In a similar fashion as in the above section weintroduce the vector v and the variables vector as

    v=

    x2 y2 z2 2yz 2xz 2xy 2x 2y 2z 1T

    and

    =

    a11 a22 a33 a23 a13 a12 b1 b2 b3 d

    .

  • 8/9/2019 Calib08

    14/33

    14 ESGI54 EXCAVATOR CALIBRATION

    An ellipsoid can now be described by

    (3.9) T

    v= 0Let

    I= a11+ a22+ a33,J= a11a22+ a22a33+ a11a33 a223 a213 a212.

    It is shown in [13] that a sufficient (but not necessary) condition for(3.9) to represent and ellipsoid is that 4J I2 >0. In [13] the authorspropose to search among scalarsk until the solution to the least squaresproblem (cf. below), with the constraint kJ I2, is an ellipsoid. Wedefine the design matrixDRN10 as

    D:= v1 v2 vN

    T

    and the scatter matrix S := DTD R1010. Furthermore, we definethe matrix Cas

    C :=

    C1 064046 044

    ,

    with

    C1 =

    C11 034034 kI33

    , C11=

    1

    k2 1 k

    2 1

    k2 1 1 k

    2 1

    k2 1 k

    2 1 1

    .

    With this definition ofCwe can write the (scaled version of the) ellip-

    soid specific constraint kJ I2 = 1 asTC= 1.

    The least squares problem (3.5) (without the constraint that A,b,dshould define an ellipsoid) can now be written as

    (3.10)minimize

    12

    TS

    subject to TC= 1.

    The optimality conditions for (3.10) are given by the generalized eigen-value problem

    (3.11) S=C TC= 1.

    The search algorithm propose in [13] is stated below.

    Step 0. Set k to some large positive number u.Step 1. Find the solution to the generalized eigenvalue problem

    S=C TC= 1.

    Let be the eigenvector corresponding to the positive realeigenvalue.

    Step 2. If the fitting is an ellipsoid then stop, otherwise goto Step 3.

  • 8/9/2019 Calib08

    15/33

    ESGI54 EXCAVATOR CALIBRATION 15

    Step 3. (a) While the fitting is not an ellipsoid and k 3, replace kbyk/2 and re fit the data.

    (b) Set a= max{3, k} and u= 2k.(c) Set k = (a + u)/2 and fit the data. If the fitted shape is

    an ellipsoid then set a = k, else set u = k.(d) If|u a|< (small tolerance) then stop, otherwise go to

    (c).

    The ellipse is, in this case, after the solution of the generalized eigen-value problem and scaling given by

    A=

    a11 a12 a13a12 a22 a23a13 a23 a33

    , b=

    1

    2

    b1b2b3

    =

    1

    2

    789

    , d= 10.

    3.4. Fitting of ellipsoids using semidefinite programming. Analternative to the direct methods presented above is to cast the ellipsoidfitting problem as a so-called linear semidefinite program (SDP) [14].This class of optimization problems are often encountered in the areasoptimal design and optimal control. Linear semidefinite programs areconvex optimization problems and can efficiently be solved to globaloptimality using interior point methods. We first illustrate how thealgebraic least squares problems (3.5) and (3.6) can be rewritten aslinear semidefinite programs. The presentation follows to a large extent

    the article [15].We throughout this section use that notation A0 (A0) ifA ispositive definite (positive semi-definite). Let us consider the followinglinear semidefinite program in the variables (A,b,d,h) where h is avector in RN.

    (3.12)

    minimizeA,b,d,h

    nj=1

    hj

    subject to

    1 gj(A,b,d)

    gj(A,b,d) hj

    0, j = 1, . . . , N ,

    AT =A

    0, tr(A) = 1,

    where the functions gj(A,b,d) are given by

    gj(A,b,d) =

    xj 1 A b/2

    bT/2 d

    xj

    1

    .

    These functions can also be written as

    gj(A,b,d) = (xj)TAxj + bTxj + d.

    The matrix inequality

    1 gj(A,b,d)gj(A,b,d) hj

    0

  • 8/9/2019 Calib08

    16/33

    16 ESGI54 EXCAVATOR CALIBRATION

    is linear in the variables A,b,d and this conditions is satisfied if andonly if

    hj((xj)TAxj + bTxj + d)2.Du to the minimization of the objective function in (3.12) this problemis equivalent to the least squares problem (3.5) with the normalizationthat tr(A) = 1.

    The least squares problem (3.6) can be rewritten as the linear semi-definite program

    (3.13)

    minimizeA,b,d,h

    nj=1

    hj

    subject to hj gj(A,b,d)0, j= 1, . . . , N ,hj+ gj(A,b,d)0, j= 1, . . . , N ,AT =A0, tr(A) = 1.

    The linear constraintshjgj(A,b,d)0 andhj+gj(A,b,d)0 assurethat hj |(xj)TAxj + bTxj + d| for all j.

    Linear semidefinite programming can also be used to model the prob-lem of finding the smallest ellipsoid containing all the given points. Thesolution to this problem is of course sensitive to outliers. The volumeof the ellipsoid is proportional to tr(A1e ). We therefor use the variableP to represent the inverse ofAe. The minimum volume problem canbe formulated as

    (3.14)

    minimizeP,c

    tr(P)

    subject to

    P (xj c)

    (xj c)T 1

    0, j = 1, . . . , N ,P =PT 0.

    3.5. Numerical examples. There exist many variants and implemen-tations of interior point methods for solving linear semidefinite pro-grams. Generally, these codes are free for academic use but not forcommercial use. The semidefinite programs which arise in the numer-ical examples are solved using the robust and efficient Matlab packageSeDuMi [16]. This method is called through the Matlab optimizationinterface Yalmip [17]. The direct method presented in Section 3.2 isalso implemented in Matlab.

    3.5.1. Two-dimensional examples. Solutions to the various least squaresfitting problems are presented on two sets of manually generated two-dimensional data. The two sets of data points are given by

    X1=

    1 2 5 7 9 37 6 8 7 5 7

    and X2 =

    1 2 5 7 9 3 6 87 6 8 7 5 7 2 4

    .

    The optimal ellipses for these two sets of data are plotted in Figure 2

    and 3, respectively.

  • 8/9/2019 Calib08

    17/33

    ESGI54 EXCAVATOR CALIBRATION 17

    1 2 3 4 5 6 7 8 9

    3

    4

    5

    6

    7

    8

    9

    Figure 2. Fitting of ellipses to the given dataX1. SDPformulation (3.12) (full lines). SDP formulation (3.13)(dashed lines). Minimum volume ellipse (3.14) (dottedlines). Direct method (3.7) (dash-dotted lines). The cen-ters are marked with.

    1 2 3 4 5 6 7 8 9

    2

    3

    4

    5

    6

    7

    8

    Figure 3. Fitting of ellipses to the given dataX2. SDPformulation (3.12) (full lines). SDP formulation (3.13)(dashed lines). Minimum volume ellipse (3.14) (dottedlines). Direct method (3.7) (dash-dotted lines). The cen-ters are marked with.

    3.5.2. Three-dimensional examples. The solutions to the various least

    squares fitting problems are presented on a set of manually generated

  • 8/9/2019 Calib08

    18/33

    18 ESGI54 EXCAVATOR CALIBRATION

    three-dimensional data. The data points are given by

    X=1 2 5 7 9 37 6 8 7 5 7

    0 1 1 2 3 4 .

    An optimal ellipsoid for these data points is plotted in Figure 4.

    2

    4

    6

    8

    10

    64

    20

    6

    4

    2

    0

    2

    4

    6

    8

    10

    Figure 4. Fitting of ellipses to the given data X. SDPformulation (3.12) was used to solve the fitting problem.

    4. Problem B: Inclinometer Calibration

    The task of calibrating an excavator is divided into three parts:

    Calibration of the planar arm made of booms, stick and bucket,

    calibration the rotation around the excavator roll axis,

  • 8/9/2019 Calib08

    19/33

    ESGI54 EXCAVATOR CALIBRATION 19

    and for excavators with multiple degrees of freedom in thebucket, these needs calibration as well.

    Of these we have only focussed on the first two.The task of calibrating involves determining all relevant distances

    and angular offsets, in order to obtain the complete forward kinematicsof the excavator. The calibration has to be simple enough, such thatit can take place anywhere around the world, with only the most basictools.

    We will only demonstrate our approach for an excavator with oneboom, one stick and a bucket, however it generalizes to any number ofbooms.

    4.1. Calibrating the planar arm. In order to obtain the forwardkinematics of the arm, we need to find the lengths of the boom, stickand bucket, which we will call a1,a2 and a3. The inclinometers, whichhave been mounted on the arm, might be rotated slightly, thus we willneed angular offsets 1, 2 and 3 to compensate. To find these wecan do the forward kinematics from link i 1 to i as a homogeneoustransformation matrix, which using the notation from [18] becomes

    (4.1) i1i T(i, i, ai1) =

    cos(i+ i) sin(i+ i) 0 ai1sin(i+ i) cos(i+ i) 0 0

    0 0 1 00 0 0 1

    These can can be multiplied together to give us the transformation ofthe bucket relative to the base of the arm.

    (4.2) 0BucketT =01 T(1, 1, 0)

    12T(2, 2, a1)

    23T(3, 3, a2)

    3BucketT(0, 0, a3)

    By positioning the bucket at different known locations, we can create aset of equations, which has ais and is as unknowns. However, thesetrigonometric equations would be very difficult to solve, thus we find itto be better to model the angular offsets as distance offsets, such thatthe transformation from one link to the next becomes

    (4.3) i1i T(i, ai1, bi1) =

    cos(i)

    sin(i) 0 ai1

    sin(i) cos(i) 0 bi10 0 1 00 0 0 1

    Multiplied together as in equation 4.2 we now get a set of linear equa-tions, which can be solved to obtain aiandbi. Furthermore, we can usean over-determined set of equations and obtain a least square solutionto reduce the influence of measurement errors.

    In the remaining of this section, we will denote the expressions forthe xand y position of the bucket X(, a, b) and Y(, a, b)

    The strategy we have used to obtain known positions requires just

    a horizontal string with known length, l, as shown in figure 5. The

  • 8/9/2019 Calib08

    20/33

    20 ESGI54 EXCAVATOR CALIBRATION

    excavator then has to touch each end of the string with the bucket,which then gives us

    X(1, a1, b1) = x0(4.4)

    Y(1, a1, b1) = y0(4.5)

    X(2, a2, b2) = x0+ l(4.6)

    Y(2, a2, b2) = y0(4.7)

    (4.8)

    These 4 equations introduces 2 new unknowns, namelyx0andy0corre-sponding to the nearest endpoint of the string. By moving the bucketto 4 different positions on the string, we get 4 more equations

    Y(3, a3, b3) = y0(4.9)Y(4, a4, b4) = y0(4.10)

    Y(5, a5, b5) = y0(4.11)

    Y(6, a6, b6) = y0(4.12)

    (4.13)

    such that we have a total of 8 equations and 8 unknowns.It has been a specific wish from Mikrofyn, to limit the number of

    constraints on each position, because it is easier for the operator toselect 4 points on a horizontal string, where onlyy is known, than it isto select 2 points, where both xand y are known.

    Figure 5. Setup for calibration of an excavator arm

    4.2. Experiments. To verify our approach we have made a number ofexperiments with a virtual2 excavator, which we have tried to calibrate.Real world measurements will unavoidably contain errors, which wehave modeled by adding random values betweenerror, where erroris changed between 0 and 0.01m. We have conducted 7 experiments

    2We define our own excavator with known forward kinematic

  • 8/9/2019 Calib08

    21/33

    ESGI54 EXCAVATOR CALIBRATION 21

    Input Error (meter) Mean Output Error (meter) Std. dev. (meter)0 0 0

    0.001 0.0312246 0.06072220.002 0.0408307 0.03907110.004 0.113529 0.1760950.006 0.204772 0.2691710.008 0.16426 0.1604920.010 0.303892 0.375018

    Table 1. Results of calibrating the planar arm, using 8 equations

    Input Error (meter) Mean Output Error (meter) Std. dev. (meter)

    0 0 00.001 0.00818001 0.00634540.002 0.0133622 0.01025700.004 0.0260865 0.02487920.006 0.0491877 0.03125150.008 0.0686618 0.05117110.010 0.0764688 0.0702551

    Table 2. Results of calibrating the planar arm, using 15 equations

    with different input errors and for each of these we have made 50 runs,

    which give mean output errors and standard deviations as shown intable 1.

    For these experiments we have used just 8 equations, correspondingto the number of unknowns. Since we are dealing with a linear setof equations we can use a redundant set of data, which will minimizethe output error. Using 15 equations instead of 8, gives substantiallysmaller errors, as can be seen in table 2. Unfortunately the positiveeffect of adding more equations seem to reach a certain limit, where itno longer influences the results.

    4.3. Discussion of arm calibration. We have observed that certainconditions have a significant impact on how the output errors grow.Most noteworthy is the importance of spanning as much of the config-uration space as possible, because otherwise the system becomes closeto singular. In other words it is important that the horizontal string isas long as possible.

    The accuracy of the different measurements has different impact onthe result. An error when reaching the two endpoints of the stringcannot be eliminated using redundant data, because they capture theonly known distance of the system.

    Defining more distances, and perhaps using two strings in different

    heights would most likely give a more robust calibration.

  • 8/9/2019 Calib08

    22/33

    22 ESGI54 EXCAVATOR CALIBRATION

    4.4. Calibration of the excavator roll axis. As previously men-tioned the calibration of the excavator arm is broken into multiple

    phases. During the first phase the geometry of the arm is calibrated,as previously explained, and secondly the position of base point of theexcavator arm relative to the excavator roll axis is calibrated.

    The second step of the calibration relies on known geometry of theexcavator arm thus we simply assume successful completion of the firstphase prior to the second. Figure 6 illustrates the setup used duringthe calibration of the excavator roll. The Excavator frame E is

    Y

    Z

    X

    E

    A B

    W Y

    Z

    X

    X 1

    X 2

    ref

    (orsomearbitraryfixedreference)

    North

    Figure 6. Topview of the calibration setup used duringcalibration of the excavator roll axis.

    attached to the excavator itself (the rotating top part - the yellow one- not the belts) and its Z-axis coincides with the excavator roll axis.Furthermore, the Y, Z-plane is parallel to the plane of the arm.

    Like in the previous case, points X1 and X2 extends a string whichis used during the calibration. As before it is important to know thelength L of the string as well as its spatial direction (i.e. heading and

    level) relative to theWorld

    reference frameW. Once again we simplymake sure that the string is leveled off exactly horizontally (which bydefinition is parallel to the X, Y-plane of the World frame). Theheading is found using the excavator compass which is in fact possiblebecause a proper compass always measures the heading as a rotationaround some axis, which is vertical regardless of the inclination of thecompass. Under these circumstances the easiest thing is to reuse thestring from the previous phase and move the excavator to the side ofthe string rather than moving the string itself. In this way we alreadyknow the length of the string as well its level (which is horizontal).The heading ref is obtained by noting the heading of the excavator

    during the process of extending the string at the beginning of the first

  • 8/9/2019 Calib08

    23/33

    ESGI54 EXCAVATOR CALIBRATION 23

    phase of the calibration. In this way it will be possible to measure theheading of the excavator relative to the heading of the string, when

    moving the excavator to the side of the string at the beginning of thesecond phase.

    Let = compass refbe the heading of the excavator, and andbe the inclination of the excavator measured as a rotation aroundthe Y- and X-axis respectively. Then the orientation of the excavatorrelative to the Worldreference can be written as:

    (4.14) WER( , , ) =RZ()RY()RX()

    Furthermore, using the (by now) well calibrated forward kinematics ofthe arm it is possible to relate a given configuration q to the position

    B(q) of the bucket point relative to the base of the arm. Letting Adenote the unknown base point of the arm relative to the origo of theExcavator frame, allows us to write the position WB(,,, q) ofthe bucket point in Worldcoordinates as:

    (4.15) WB(,,, q) =WE R( , , ) [A + B(q)]

    Now, this is of course a 3D relation but as the keen reader might haveobserved the relative heights (distance along theZ-axes) of the differentpoints and reference frames are still insufficiently specified. This hasbeen done purposefully because in the following we will address this as

    a planar problem.During the calibration the operator of the excavator will have toposition the bucket point B on a number of points, including X1 andX2, along the string. At least two points (the end points) are necessary,but more points are desired to reduce the influence of measurementerrors. Doing a sequence ofn measurements yields the following over-determined system of linear equations:

    (4.16)

    WB(1, 1, 1, q1)

    X

    =

    X1XW

    B(1, 1, 1, q1)Y

    =

    X1Y

    WB(2, 2, 2, q2)

    Y =

    X1Y

    ...WB(n1, n1, n1, qn1)

    Y

    =

    X1YW

    B(n, n, n, qn)X

    =

    X1X

    + LWB(n, n, n, qn)

    Y

    =

    X1Y

    which can be solved for the four unknowns [X1]X, [X1]Y, [A]Xand [A]Y.

    Experimental work has been very sparse but the correctness of the

    method has been verified. It is however expected that this phase of the

  • 8/9/2019 Calib08

    24/33

    24 ESGI54 EXCAVATOR CALIBRATION

    calibration procedure will show the same problems related to measure-ment noise as the previous one.

    5. Problem C: Center finding from Circular GPS motion

    5.1. Problem description. Apart from the compass and the incli-nometers, the excavator is also equipped with a GPS receiver in orderto determine its position on the construction site. The receiver is placedon a corner of the drivers cap. Therefore, we know the position of thatcorner in the GPS coordinate system; but since there is only one re-

    ceiver, we know nothing about the orientation of the excavator in theGPS system.

    The problem is therefore to determine the position of the origin of theexcavators internal coordinate system in the GPS coordinate systemusing the GPS data in addition to the information about roll, pitch,and heading (see section 2). The origin is defined as the unique fixedpoint of any rotation of the drivers cab.

    This information should be used for controlling the motion of thebucket, but when the bucket is in use the only motion of the drivers

    cab is rotation about a vertical axis through the origin of the co-movingframe. Therefore, the GPS receiver traces out a circular path, wherethe center of the circle is the sought origin. When the machine isdriving, the GPS traces out any kind of curve. However, it is not im-portant to determine the exact position of the origin in this situation,but a warning should be given to the driver that his position is inac-curate.

    The formulation of the problem can therefore be boiled down to this:

    Problem 5.1. Make a routine that

    (1) detects whether the GPS receiver is following a circular path atany time

    (2) determines the center of the circle in case (1) is fulfilled

    A circle is a plane curve, and it is uniquely determined by threepoints since a circle in the xy-plane is given by:

    (5.1) (x xc)2 + (y yc)2 =R2where (xc, yc) is the center of the circle and R is the radius, i.e. the

    equation determining the circle contains three parameters.

  • 8/9/2019 Calib08

    25/33

    ESGI54 EXCAVATOR CALIBRATION 25

    From equation (5.1) it is seen that when three points on the circleare known it is possible to determine the radius and the center of the

    circle by solving this system of linear equations:

    (5.2)

    2x1 2y1 12x2 2y2 1

    2x3 2y3 1

    xcyc

    xc2 + yc

    2 R2

    =

    x1

    2 y12x22 y22x32 y32

    where (x1, y1), (x2, y2) and (x3, y3) are the known points on the circle

    x

    y

    z

    x

    yz

    Figure 7. The two coordinate systems. The trans-

    formation from the GPS coordinate system (x,y,z) tothe co-moving coordinate system is done by the matrixM1(r,p,h). The inverse transformation is done by thematrixM(r,p,h) (see section 2)

    The problem is relatively simple when the excavator is moving in oneplane. On the construction site however, the excavator can be tiltedin a number of ways and therefore the circle we are looking for is notnecessarily contained in thexy-plane of the GPS coordinate system but

    in some other plane. Therefore we introduce a co-moving coordinatesystem (x,y,z) which follow the plane of the circle (see figure 7), i.e.:

    (x xc)2 + (yyc)2 =R2 .The origin can be determined in GPS coordinates by transforming theincoming GPS data into the (x,y,z) coordinates using the rotationmatrix M1(r,p,h) from section 2, solving the linear system in thesecoordinates, and finally transforming the coordinates of the center backto GPS coordinates using the rotation matrixM(r,p,h) from section 2.

    There is however a rather difficult problem: when the excavator is

    driving our routine will be searching for circles, but in what plane? We

  • 8/9/2019 Calib08

    26/33

    26 ESGI54 EXCAVATOR CALIBRATION

    might need to determine the xy-plane at all times in order to determinewhether two points might be part of the same circle. This is not a

    trivial matter since even when the excavator stays in the same plane,the (r,p,h)-coordinates change when it rotates around its vertical axis.A possibility is to compare the normal vectors of the different planes. Anormal vector of the xy-plane is obtained by rotating a normal vectorof the xy-plane, e.g. ez, using the matrix M

    1(r,p,h) (see section2). However, it is not a discussion we have had the time to go into,although it is absolutely necessary to answer the question in order togive a full solution of the problem.

    5.2. Center finding techniques. For an excavator at a fixed position

    with only the drivers cap turning, the problem of finding the center ofthe excavator is simple, since it will only be a matter of fitting a circleto the measuring points (p1,...,pi,...,pN) received from the GPS.If the excavator is working on a construction site, it will typically alter-nate between digging (the center of rotation of the excavator is fixed)and moving around the construction site. Now the problem is to find asequence of the measuring points which lie on a circle with the knownradius Rex, which is the distance from the center of the excavator tothe GPS receiver.To make the problem more simple the excavator is assumed to be mov-ing on a plane field, i.e. two coordinates (x, y) is sufficient (see the

    discussion at the end of the previous subsection).

    A solution strategy for finding the center of a moving excavator couldthen be:

    (1) Step 1: Coarse search:A coarse search is performed to find the first measuring pointpi which lies on a circle.Given three measuring points pi, pi+1, pi+2, the center (xc, yc)and the radius Ri of the presumed circle is calculated usingequation (5.2). If|Rex Ri| < for some predefined constant >0 the measuring points probably lie on a circle with radiusRex, i.e. the excavators position is fixed and the cap is turning,otherwise if|Rex Ri|> , then i is incrementet by 1.

    Even though|Rex Ri|< for somei, the coarse search willcontinue because of the possibility that the three measuringpoints pi, pi+1, pi+2 by coincidence lie on a circle with radiusclose to Rex.Therefore, the coarse search continues for i + 3 and i + 6. Nowif|Rex Ri+3|< or|Rex Ri+6|< are satisfied, the searchwill stop and a more exact center of the circle will be calculated

    in the next step.

  • 8/9/2019 Calib08

    27/33

    ESGI54 EXCAVATOR CALIBRATION 27

    (2) Step 2: Least-squares fittingIdeally, only three measuring points are necessary to find the

    center (xc, yc) of the excavator. But due to measuring errors,some fitting to a sequence of measured points is necessary.

    If the planar measuring points is denoted by (xi, yi), ..., (xj, yj),a fitting in a least-squares sense is only a matter of solving theoverdetermined linear system: 2xi 2yi 1... ... ...

    2xj 2yj 1

    xcyc

    x2c+ y2c R2

    =

    x2i y2i...

    x2j y2j

    by denoting this equation Ax= b the best solution in a leastsquare sense is:

    x= A+b ,

    whereA+ is the Moore-Penrose inverse of the matrix A.

    As long as the position of the excavator is fixed, new mea-suring points from the GPS can just be added to the measuringpoints being used for calculating the center of the excavator instep 2, and by that obtaining a more accurate center.

    But if the new measuring point does not lie on the circle, acoarse search (step 1) should be performed again to find a newstarting point for a new circle.

    (3) Step 3: Check that new measuring points lie on thecircle

    To check if a new measuring point (xj+1, yj+1) lies on thecircle found in step 2, the point is inserted into the equation ofa circle

    (xj+1 xc)2 + (yj+1 yc)2 =Rj+1where (xc, yc) is the center found in step 2. If|Rex Rj+1|< cwherec >0 is some predefined constant, then the new measur-ing point is just added to the points in step 2, otherwise step 1is performed.

    5.3. Conclusion. Our solution strategy is merely a sketch. An imple-mentation is necessary to verify if it is robust or not.

    Moreover, to make the strategy applicable to an actual excavator ata construction site, the method should be generalized to work for anarbitrary shape of the field, i.e. the excavator can be tilted in arbitrary

    directions.

  • 8/9/2019 Calib08

    28/33

    28 ESGI54 EXCAVATOR CALIBRATION

    6. Problem D: Distant Pitch generation via Rotation

    We consider a fixed (world) Cartesian coordinate systemC1 ={O, x1, y1, z1, ex1, ey1, ez1} ,

    where the z1-axis is considered vertical, i.e. directed opposite to theforce of gravity, so that the (x1, y1)-plane is horizontal.

    Another Cartesian coordinate system C2is then constructed by trans-lating and orienting the systemC1:

    C2 ={P, x2, y2, z2,dx2 ,dy2 ,dz2} .The relation between the two systems is determined partly by the trans-lation vector, which in (

    C1)

    coordinates are, say:

    OP(C1) = ab

    c

    ,

    and partly by the orientation given by values of roll r, pitch p, andheading h as developed in section A. The coordinates of the following(selected two) basis vectors of systemC2 with respect to systemC1 arethen:

    dx2 (C1) =

    sin(p)

    and

    dy2 (C1) =

    sin(r)

    ,

    where the denote some not important (for the present task) func-tions ofr, p, and h. (The complete transformation is given in section2, byM(r,p,h) equation (2.6), modulo the use of parameter r. In thepresent section we do user to denote the actual inclinometer display.)

    The resulting coordinate transformation then reads in total: x1y1

    z1

    =

    sin(p) sin(r)

    x2y2

    z2

    +

    ab

    c

    .

    Suppose now that the coordinate systemC2 is rotated the angle around the z2-axis of the coordinate systemC2. Then the pitch value(the angle to the horizontal (x1, y1)-plane) of the new resulting 1st axis(to be named the x3-axis below) becomes some angle .

    Problem 6.1. The problem is the inverse: For any given find - ifpossible - the values of rotation angles which will give the pitch value

    by the above mentioned rotation.

  • 8/9/2019 Calib08

    29/33

    ESGI54 EXCAVATOR CALIBRATION 29

    y1

    y2

    x1

    z1

    z2

    x2

    Figure 8. An oriented link to a rotating device (bucketwith (x2, y2, z2) system). Now rotate the bucket aroundthe z2-axis. What happens then to the angle betweenthe horizontal plane and thex2-axis (the bucket pitch) ?

    6.1. Conditions and number of solutions.

    Statement 6.2. There are solutions (rotational-values) to problem6.1 if and only if the given value of satisfies:

    (6.1) sin2() sin2(r) + sin2(p) .

    Suppose that , r, and p are given values satisfying this condition.Then:For = 0,r = 0, andp = 0: Every value ofis a solution,[, ].For = 0 or r= 0 or p= 0: If equality occurs in the conditionabove, then there are 2 solutions; otherwise there are 4 solutions. These

    solutions are given by those[, ] which satisfy:

    (6.2) sin() = sin(r)sin() sin(p)

    sin2(r) + sin2(p) sin2()

    sin2(r) + sin2(p) .

    Remark 6.3. The solutions do not depend on the parametersh,a, b, c,which was (maybe?) to be expected.

    How to see this: The rotation by around the z2-axis in systemC2results in a new system:

    C3 ={P, x3, y3, z3,wx3 ,wy3 ,wz3} ,

  • 8/9/2019 Calib08

    30/33

    30 ESGI54 EXCAVATOR CALIBRATION

    which is related to systemC2 via the coordinate transformation: x2y2

    z2

    = cos() sin() 0sin() cos() 00 0 1

    x3y3z3

    .In total, the transformation from systemC1 to systemC3 is therefore: x1y1

    z1

    =

    sin(p) sin(r)

    cos() sin() 0sin() cos() 0

    0 0 1

    x3y3

    z3

    + ab

    c

    .

    Hence the first basis vector wx3 of the systemC3 has coordinates withrespect to the systemC1 which are obtained as the first column in theproduct matrix

    sin(p) sin(r)

    cos() sin() 0sin() cos() 0

    0 0 1

    =

    sin(p) cos() + sin(r)sin()

    Thus

    wx3(C1) =

    sin(p)cos() + sin(r)sin()

    .

    Since sin() is, by definition of the pitch , the projection ofwx3 onthe z1-axis, we have:

    (6.3) sin() = sin(p)cos() + sin(r) sin() .

    Now letx= sin() so that cos() =1 x2 and letS= sin(),A1=sin(p), and finallyA2 = sin(r). Inserting these shorthand notations intoequation (6.3) then gives:

    A1(

    1 x2) +A2 x = S ,or equivalently:

    (6.4) (S A2 x)2 A21(1 x2) = 0 ,x2 (A21+ A

    22) +x (2A2S) + (S2 A21) = 0 ,

    x = A2S A1

    A21+ A

    22 S2

    A21+ A22

    ,

    which is in accordance with equation (6.2) in the statement above.Clearly the condition in equation (6.1) is necessary for the existence ofsolutions because otherwise the discriminant of the second order equa-tion would be negative. It is also sufficient, because the values of thex-solutions are numerically less than 1, so that x= sin() really does

    give -solutions. Indeed (for ease of mind) this follows from inserting

  • 8/9/2019 Calib08

    31/33

    ESGI54 EXCAVATOR CALIBRATION 31

    x = 1 and x=1 into equation (6.4) and observe that the left handside is positive in both cases.

    AppendixA. Magnetism

    For a fuller treatment of this subject see any graduate textbook onclassical electrodynamics e.g. [19].

    The magnetic properties of materials are primarily given by the or-bital angular momentum of electrons in the constituent atoms, changesin their orbital angular momentum, and their spin.

    Absence of both permanent spin and orbital angular momentum con-tributions gives rise to diamagnetism. Here an external magnetic fieldBextperturbs the motions of electrons around the atomic nuclei leadingto an induced field Bind opposite ofBext (Lenz law).

    When atoms have permanent magnetic moments these will tend toalign with Bext leading to an increase in the effective magnetic field.This phenomenon is known as paramagnetism.

    However, both dia- and paramagnetism are weak effects comparedto that offerromagnetism. While the former can be understood from a

    classical treatment of noninteracting atoms ferromagnetism is a quan-tum mechanical, collective effect.

    A.1. Ferromagnetism. Spin is a quantum mechanical property of el-ementary particle that intuitively can be understood as an internalorbital angular momentum.

    Electrons are fermions and according to Paulis exclusion principle[20] two electrons of identical spin cannot have the same position inspace. It is therefore energetically favorable for two electrons two haveparallel spins since this will lower the electrostatic repulsion experi-

    enced by each particle. This is known as the exchange interaction.This effect can give rise to a permanent magnetization even in theabsence of an external field. In the navigation systems literature thisis known ashard iron effects. To understand why not all ferromagneticmaterials have a permanent magnetization we need one further concept.The exchange interaction is short-ranged and for sufficiently large re-gions of aligned spins the magnetic dipole-dipole interaction makes itfavorable to anti-align such regions known as magnetic domains.

    Applying an external field will now tend to align domains. How andto what extent such an alignment actually takes place depends stronglyon the characteristics - e.g. anisotropy - of the material in question.

    This field dependent phenomenon is known as soft iron effects.

  • 8/9/2019 Calib08

    32/33

    32 ESGI54 EXCAVATOR CALIBRATION

    AppendixB. Matlab files for the Ellipsoidal datafitting

    The numerical examples are programmed in the Matlab modelingand mathematics language. We give a short description of the six fileswhich were used to solve the numerical examples. The codes can beobtained upon request from Department of Mathematics, TechnicalUniversity of Denmark.

    main.m

    Main driver file (script file).

    fit_ellipse.m

    Fits an two-dimensional ellipse to data using the direct method de-

    scribed in Section 3.2 (function).fit_ellipse_imp.m

    Fits a two-dimensional ellipse to data using an improved version (nu-merically more stable) of the direct method described in Section 3.2(function).

    fit_ellipsoid_sdp.m

    Fits a two-dimensional ellipse or a three-dimensional ellipsoid to datausing the three linear semidefinite formulations presented in section 3.4(function)

    plot_points.m

    Plots the given data points (function)

    plot_ellipsoid.m

    Plots a given ellipse/ellipsoid (function).

    The group working on the excavator problems

    Marie Bro, Dept. of Math. DTU - [email protected]

    Kasper Dring, MIP, SDU - [email protected] Lars-Peter Ellekilde, MIP, SDU - [email protected] Mikael S. Hansen, Dept. of Math. DTU - [email protected] Steen Markvorsen, Dept. of Math. DTU - [email protected] Lars Overgaard, Mikrofyn - [email protected] Katja Skaanning, Inst. Math. Sci. KU - [email protected] David Spence Dept. of Math. DTU - [email protected] Mathias Stolpe, Dept. of Math. DTU - [email protected] Dorthe Slvason, MIP, SDU - [email protected]

  • 8/9/2019 Calib08

    33/33

    ESGI54 EXCAVATOR CALIBRATION 33

    References

    [1] H. U. Auster, K. H. Fornacon, E. Georgescu, K. H. Glassmeier, andU. Motschmann. Calibration of flux-gate magnetometers using relative mo-tion. Meas. Sci. Technol., 13:11241131, 2002.

    [2] D. Gebre-Egziabher, G. Elkaim, J. D. Powell, and B. Parkinson.A non-linear, two-step estimation algorithm for calibrating solid-state strapdown magnetometers. In Proc. of the Int. Conf. on Integrated Navigation Systems, pages 290297, May 28-30 2001.http://waas.stanford.edu/ wwu/papers/gps/PDF/demozins201.pdf.

    [3] M. J. Caruso and L. S. Withanawasam. Vehicle detec-tion and compass applications using AMR magnetic sensors.http://www.ssec.honeywell.com/magnetic/datasheets/amr.pdf.

    [4] M. J. Caruso. Applications of magnetic sensors for low cost compass systems.http://www.ssec.honeywell.com/magnetic/datasheets/lowcost.pdf.

    [5] M. J. Caruso. Applications of magnetoresistive sensors in navigation systems.http://www.ssec.honeywell.com/magnetic/datasheets/sae.pdf.

    [6] J. Miller. Mini rover 7: Electronic compassing for mobile robotics. CircuitCellar, 165:1422, april 2004.

    [7] J. M. G. Merayo, P. Brauer, F. Primdahl, and J. R.Petersen. Absolute magnetic calibration and alignmentof vector magnetometers in the earths magnetic field.http://server4.oersted.dtu.dk/research/CSC/publica/Papers/ESASP Acalib.PDF.

    [8] N. Grammalidis and M. Strintzis. Head detection and tracking by 2-D and 3-Dellipsoid fitting. IEEE, 2000.

    [9] R.L. Branham. A new method for calculating the velocity ellipsoid. Astronomy& Astrophysics, 421:977982, 2004.

    [10] I. Markovsky, A. Kukush, and S. van Huffel. Consistent least squares fittingof ellipsoids. Numerische Mathematik, 98(177-194), 2004.[11] M. Pilu, A. Fitzgibbon, and R.B. Fisher. Ellipse-specific direct least squares fit-

    ting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1999.[12] R. Halir and J. Flusser. Numerically stable direct least squares

    fitting of ellipses. Unknown journal, 1998. Available fromhttp://oversite.lcs.mit.edu/350661.html.

    [13] Q. Li and J.G Griffiths. Least squares ellipsoid specific fitting. In Proceedingsof the Geometric Modeling and Processing 2004 (GMP04), 2004.

    [14] Vandenberghe and Boyd. Semidefinite programming. SIAM Reviev, 1996.[15] G. Calafiore. Approximation of n-dimensional data using spherical and ellip-

    soidal primitives.IEEE Transactions on Systems, Man, and Cybernetics - PartA: Systems and Humans, 32(2):269278, March 2002.

    [16] J.F. Sturm. Using SeDuMi 1.02, a MATLAB toolbox for optimization oversymmetric cones. Optimization Methods and Software, 11(1):625653, 1999.Available from http://sedumi.mcmaster.ca/.

    [17] J. Lofberg. YALMIP : A toolbox for modeling and optimization in MATLAB.InProceedings of the CACSD Conference, Taipei, Taiwan, 2004. Available fromhttp://control.ee.ethz.ch/~joloef/yalmip.php.

    [18] John J. Craig.Introduction to Robotics, Mechanics and control. Addison Wes-ley, 1989.

    [19] B. Elbek. Elektromagnetisme. Niels Bohr Institute, Copenhagen, 1997.[20] B. H. Bransden and C. J. Joachain. Quantum Mechanics. Prentice Hall, Har-

    low, 2 edition, 2000.