None.
Not Applicable.
This relates a magnetic compass arrangement for use in a machine and, more particularly, to a method of using a magnetic compass arrangement in a movable machine or vehicle, such as for example an excavator. Sensor arrangements which sense the direction of the magnetic field of the earth and provide outputs for display and use by a control system have been used for some time. Such arrangements have been subjected to, and have had to compensate for, “hard iron” effects and “soft iron” effects. Both of these effects distort the shape of the earth's flux lines in the local area of the sensor, but do so in different ways. Hard iron effects arise from permanent magnets and magnetized iron or steel in the vehicle. Hard iron effects cause the earth's magnetic field to be offset in a particular direction and do not change as the machine, such as an excavator, is rotated about a vertical axis. The errors induced by hard iron effects go through a single cycle during a complete rotation of the machine. Soft iron effects arise from the interaction of the earth's magnetic field with the magnetically permeable material of the excavator. Soft iron effects change as the machine is rotated, and the errors induced by soft iron effects go through two cycles during a complete rotation of the machine.
Typically, the earth's magnetic field is sensed with three magnetic field sensors which are oriented to detect the strength of the earth's field in three orthogonal directions, the X, Y, and Z directions of the sensor's coordinate frame of reference. From the relative outputs of the three sensors it is a simple matter to determine the relative orientation and strength of the field with respect to the sensor. It will be appreciated that if the sensor coordinate reference frame is not aligned with the local level plane coordinate reference frame of the worksite, then the sensed indications of the magnetic field from the X, Y and Z coordinate reference frame of the sensor must be transformed to the local level plane coordinate reference frame to determine the direction of the flux and therefore the heading of the machine with respect to the worksite.
Various approaches have been used in the past to compensate magnetic compass systems for hard iron effects and soft iron effects. Many of these prior art calibration techniques have required extensive measurement of magnetic field strength with the machine and compass oriented in various directions, as a part of an extended cumbersome calibration routine.
A method of determining the heading of an excavator at a worksite uses a magnetic field sensor, mounted on the excavator. The magnetic field sensor provides indications of the magnitude of the magnetic field of the earth in the X, Y and Z directions of the sensor. The method uses inclinometers that provide an indication of the pitch and roll of the excavator, a gyroscopic sensor that senses rotation of the excavator about the Z axis of the magnetic field sensor, and a processor circuit, having an associated memory. The processor circuit is responsive to the magnetic field sensor, the inclinometers, and the gyroscopic sensor. The method includes creating and storing a calibration table of data, sensing the magnetic field at the excavator with the magnetic field sensor, providing indications of the magnitude of the magnetic field in the X, Y and Z directions of the sensor, transforming the sensed indications of the magnetic field from the X, Y and Z coordinate reference frame of the sensor to the local level plane coordinate reference frame using the outputs from the inclinometers, determining the hard iron components of the transformed sensed indication of the magnetic field and removing such hard iron components to produce corrected indications of the magnetic field in the local level plane coordinate reference frame, and comparing the corrected indications to the stored, scaled data to determine the heading of the excavator. The step of creating and storing a calibration table of data includes rotating the excavator at substantially constant speed about a generally vertical Z axis, storing the outputs from the magnetic field sensor, and the gyroscopic sensor, determining the beginning and end of a complete rotation of the excavator based on the repetition of data values from the magnetic field sensor, scaling the data received from the gyroscopic sensor during the complete rotation and the corresponding data received from the magnetic field sensor into substantially equal angular increments, and storing such scaled data.
Creating and storing a calibration table of data may further include compensating the stored outputs for hard iron induced errors. Creating and storing a calibration table of data may further include benching the excavator by rotating it to a predetermined reference heading, and determining the corresponding data from the table which represents the predetermined heading, whereby the balance of the data represents headings of the excavator in angular increments away from the predetermined reference heading. Scaling the data received from the gyroscopic sensor during the complete rotation and the corresponding indications data received from the magnetic field sensor into substantially equal angular increments may comprise scaling the data received from the gyroscopic sensor during the complete rotation and the corresponding indications data received from the magnetic field sensor into one degree increments.
Determining the hard iron components of the transformed sensed indication of the magnetic field may comprise positioning the excavator to have a heading toward magnetic north, sensing the magnetic field at the excavator with the magnetic field sensor, providing indications of the magnitude of the magnetic field in the X, Y and Z directions of the sensor, sensing the pitch and roll of the excavator, pitching the excavator by a few degrees, sensing the magnetic field at the excavator with the magnetic field sensor, providing indications of the magnitude of the magnetic field in the X, Y and Z directions of the sensor, and sensing the pitch and roll of the excavator.
Excavating and construction machine control systems commonly incorporate magnetic compasses among a number of sensors. Such compasses sense the orientation of the machine or a portion of the machine in relation to the magnetic field of the earth. This heading information, combined with other sensor generated data, is compared against desired contour data and the machine is controlled accordingly.
Although magnetic compass systems are relatively simple and dependable, conventional calibration techniques for electronic compass systems are difficult to implement and fall short of providing a highly accurate solution for electronic compasses mounted to large excavation machines. The massive iron content of such a machine either adds to or distorts the earth's magnetic field vector, making it difficult to achieve an accurate calibration. Further, such machines typically include electric motors and other sources of electromagnetic fields which add to or subtract from the effects of the earth's magnetic field, introducing further errors in heading measurement.
For the operator to control the operation of the excavator either manually or through an automated control system, information regarding both the location and orientation of the excavator must be determined. The location of the excavator may be determined in any one of a number of ways, including using a laser positioning system, using a GPS positioning system, using a system that combines laser and GPS positioning, or using a robotic total station. The relative positions of the boom 12, the dipper 16, and the bucket 20 may be determined by angle encoders, gravity based inclinometers, or similar sensors associated with pivot joints 14, 18, and 22, or by string encoders associated with cylinders 24, 26, and 28, or by some combination of such sensors. The orientation of the excavator 10 with respect to true vertical is determined by inclinometer 36, mounted on the chassis 11. The inclinometer 36 operates in two axes and provides an indication of the angle of roll and the angle of pitch of the chassis 11. As explained more completely, below, the system further includes a magnetic field sensor 38 that provides indications of the magnitude of the magnetic field of the earth in the X, Y and Z directions of the sensor reference frame. Additionally system includes a gyroscope sensor 40 that senses the rotation of the excavator about the Z axis 34 of the magnetic field sensor 38. As will be explained below, a processor circuit 50, having an associated memory 52 (
The heading of the excavator is the direction in which the longitudinal axis of the chassis 11 is aligned. This is determined by the magnetic compass system which detects the relative orientation of the chassis 11 to the magnetic field of the earth. The magnetic compass system enhances accuracy by taking into account soft iron effects and hard iron effects.
In order to compensate for soft iron effects, the machine is rotated through a complete rotation. The inclination of the chassis 11 is noted, along with the levels of the magnetic field sensed in the X, Y and Z directions of the magnetic field sensor 38. The gyroscope 40 is used to break up the rotation of the machine into small angular increments, such as 360 equal one-degree increments.
The difficulty encountered when using the integrated gyro signal to build a soft iron calibration table is that the output of the gyroscopic sensor is slightly non-linear. Each gyroscopic sensor undergoes a factory calibration, but in order to achieve superior results, the gyroscope must be recalibrated on the machine, as well. Additionally, sensor aging, temperature, and the magnitude of the rotational rate contribute to the need to repeatedly recalibrate the gyroscopic sensor on the machine over its useful life. When the gyroscope is rescaled appropriately, it provides a highly accurate measure of angular position, permitting an accurate calibration table to be compiled. It has been found that the uncompensated outputs of the magnetic field sensor may be used to determine when a full rotation has been made, since those outputs return to the same level upon a complete 360 degree rotation.
Next, the effects of hard iron on the magnetic sensor are extracted based on specific equations which require the local inclination angle of the earth's magnetic vector. To determine the local inclination angle of the earth's magnetic vector, we take a measurement of the magnetic sensors, along with the pitch and roll of the sensors when the machine is facing magnetic north. The operator then pitches the machine a few degrees. A new set of magnetic sensor readings and pitch and roll readings is captured. From this information, the local inclination angle is determined, as explained below.
At this point, the horizontal soft iron effects are removed, the horizontal hard iron effects are removed, and the vertical hard iron effects are removed. In order to improve the machine heading accuracy even further, the vertical soft iron effects are removed. This is done by characterizing the Z axis magnetic sensor during the machine rotation portion of the calibration procedure.
This system may be used as a heading sensor for an excavator. As the machine rotates around in position, the system continuously provides accurate heading information that is used as an input for precise control. When the excavator is moved to a different location at the work site, the recalibration process may be repeated for maximum accuracy.
Reference is now made to
Next we derive the rotation matrix between the heading sensor plane and earth normal. Reference is now made to
x′=x 10
tan α=z/y
cos α=y/l
l=y/cos α
sin (α−ψ)=y′/l
cos (α−ψ)=y′/l
z′=l sin (α−ψ)=(y/cos α) sin (α−ψ)
sin (α−ψ)=sin α cos ψ−cos α sin ψ
z′=y(tan α cos ψ−sin ψ)=y[(z/y) cos ψ−sin ψ]
z′=−y sin ψ+z cos ψ 11
y′=l cos (α−ψ)=(y/cos α) cos (α−ψ)
cos (α−ψ)=cos α cos ψ+sin α sin ψ
y′=y(cos ψ+tan α sin ψ)=y[cos ψ+(z/y) sin ψ]
y′=y cos ψ+z sin ψ 12
Using equations 10, 11 and 12, above, to define the rotation matrix in roll:
y′=y 13
tan β=x/z
cos β=z/l
l=z/cos β
sin (β−μ)=x′/l
cos (β−μ)=z′/l
x=z(tan β cos μ−sin μ)=z[(x/z) cos μ−sin μ]
x′=x cos μ−z sin μ 14
z′=l cos (β−μ)=(z/cos β) cos (β−μ)
cos (β−μ)=cos β cos μ+sin β sin μ
z′=z(cos μ+tan β sin μ)=z[cos μ+(x/z) sin μ]
z′=x sin μ+z cos μ 15
Using equations 13, 14 and 15, above, to derive the rotation matrix in pitch:
Multiply the pitch rotation matrix by the roll matrix to develop the complete rotation matrix from earth normal to heading sensor plane.
To rotate from heading sensor plane to earth normal use the transpose of R.
Since we only need the X and Y components of the earth's magnetic field to calculate heading with equations 4 through 8 above, use the following equations:
Hx=Hx′ cos μ+Hz′ sin μ 16
Hy =Hx′ sin μ sin ψ+Hy′ cos ψ−Hz′ cos μ sin ψ 17
Next, we derive earth's magnetic components in heading sensor plane with hard iron influence.
HHS=RHEN
H
HSmeas
=RH
EN
+H
HI
H
HSmeas
=He·RM+H
HI 18
H
HSmeasLVL
−H
HSmeasSLP
=He·R
LVL
M+H
HI
−He·R
SLP
M−H
HI
H
HSmeasLVL
−H
HSmeasSLP
=He·[R
LVL
M−R
SLP
M]
H
HSmeasLVL
−H
HSmeasSLP
=He·[R
LVL
−R
SLP
]M 19
Expanding equation 19:
(HHSmeasLVL−HHSmeasSLP)x=He[cos φ cos ρ (cos μL−cos μS)+cos φ sin ρ (sin μL sin ψL−sin μS sin ψS)−sin φ(sin μL cos ψL−sin μS cos ψS)] 20
(HHSmeasLVL−HHSmeasSLP)y×He[cos φ sin ρ (cos ψL−cos ψS)+sin φ (sin ψL−sin ψS)] 21
(HHSmeasLVL−HHSmeasSLP)z=He[cos φ cos ρ (sin μL−sin μS)−cos φ sin ρ (cos μL sin ψL−cos μSsin ψS)+sin φ (cos μL cos ψL−cos μS cos ψS)] 22
Since the left side of 19 is composed of on machine measurements, we write:
K=(HHSmeasLVL−HHSmeasSLP)×/(HHSmeasLVL−HHSmeasSLP)z
K=He([cos φ cos ρ (cos μL−cos μS)+cos φ sin ρ (sin μL sin ψL−sin μS sin ψS)−sin φ(sin μL cos ψL−sin μS cos ψS)]/He[cos φ cos ρ (sin μL−sin μS)−cos φ sin ρ (cos μL sin ψL−cos μS sin ψS)+sin φ (cos μL cos ψL−cos μS cos ψS)]
cos φ cos ρ (cos μL−cos μS)+cos φ sin ρ (sin μL sin ψL−sin μS sin ψS)−sin φ(sin μL cos ψL−sin μS cos ψS)32K cos φ cos ρ (sin μL−sin μS)−K cos φ sin ρ (cos μL sin ψL−cos μS sin ψS)+K sin φ (cos μL cos ψL−cos μS cos ψS)
cos ρ (cos μL−cos μS)+sin ρ (sin μL sin ψL−sin μS sin ψS)−tan φ(sin μL cos ψL−sin μS cos ψS)=K cos ρ (sin μL−sin μS)−K sin ρ (cos μL sin ψL−cos μS sin ψS)+K tan φ (cos μL cos ψL−cos μS cos ψS)
tan φ(sin μL cos ψL−sin μS cos ψS)+K tan φ (cos μL cos ψL−cos μS cos ψS)=−K cos ρ (sin μL−sin μS)+K sin ρ (cos μL sin ψL−cos μS sin ψS)+cos ρ (cos μL−cos μS)+sin ρ (sin μL sin ψL−sin μS sin ψS)
φ=tan−1{[K sin ρ (cos μL sin ψL−cos μS sin ψS)−K cos ρ (sin μL−sin μS)+cos ρ (cos μL−cos μS)+sin ρ (sin μL sin ψL−sin μS sin ψS)]/8 (sin μL cos ψL−sin μS cos ψS)+K(cos μL cos ψL−cos μS cos ψS)]} 23
Next, we find the hard iron component in the X direction by expanding equation 18 for HHSmeasX for both level and sloped:
H
HSmeasX
=He (cos φ cos ρ cos μ+sin μ sin ψ cos φ sin ρ−sin μ cos ψ sin φ)+HHIX
H
HSmeasX
L
=He (cos φ cos ρ cos μL+sin μL sin ψL cos φ sin ρ−sin μL cos ψL sin φ)+HHIX
H
HSmeasX
S
=He (cos φ cos ρ cos μS+sin μS sin ψS cos φ sin ρ−sin μS cos ψS sin φ)+HHIX
(HHSmeasX
Ratio=(cos φ cos ρ cos μL+sin μL sin ψL cos φ sin ρ−sin μL cos ψL sin φ)/(cos φ cos ρ cos μS+sin μS sin ψS cos φ sin ρ−sin μS cos ψS sin φ)
H
HSmeasX
L
−H
HIX=(HHSmeasX
H
HIX
−H
HIXRatio=HHSmeasX
H
HIX=(HHSmeasX
We find the hard iron component in the Z direction by expanding equation 18 for HHSmeasZ for both level and sloped:
H
HSmeasZ
=He (cos φ cos ρ sin μ−cos φ sin ρ cos μ sin ψ+sin φ cos μ cos ψ)+HHIZ
H
HSmeasZ
L
=He (cos φ cos ρ sin μL−cos φ sin ρ cos μL sin ψL+sin φ cos μL cos ψL)+HHIZ
H
HSmeasZ
S
=He (cos φ cos ρ sin μS−cos φ sin ρ cos μS sin ψS+sin φ cos μS cos ψS)+HHIZ
(HHSmeasZ
Ratio=(cos φ cos ρ sin μL−cos φ sin ρ cos μL sin ψL+sin φ cos μL cos ψL)/(cos φ cos ρ sin μS−cos φ sin ρ cos μS sin ψS+sin φ cos μS cos ψS)
H
HSmeasZ
L
−H
HIZ=(HHSmeasZ
H
HIZ
−H
HIZRatio=HHSmeasZ
Next, we find the hard iron component in the Y direction by collecting magnetic data with the machine rotated ccw and cw about the northerly direction with the understanding that the earth's magnetic field strength is constant (for the time required to calibrate and as the machine changes orientation):
He
2=(HHSmeasX
He
2=(HHSmeasX
(HHSmeasX
(HHSmeasY
H
HSmeasY
CCW
2−2 HHSmeasY
2 HHSmeasY
H
HIY=[(HHSmeasX
Next, we turn to the soft iron calibration. The soft iron calibration is necessary in order to remove any non-linearity caused by distortions of the earth's magnetic field. There are numerous published methods to solve this issue. The most common, and least resource intensive method, is to best fit a unit circle in the horizontal plane. There are limits to the accuracy obtainable with this approach, however. The best way to solve this problem is to rotate the sensor one complete revolution and compare the calculated heading against a “source of truth,” i.e., an indication of actual heading. With a source of truth, a lookup table can be created to compensate for the distortions. The main difficulty with this task is locating a source of truth at the calibration site.
The present method uses a gyroscope on the machine to determine the angular orientation of the measured values taken during the revolution of the sensor. If we integrate the gyro signal, we develop a table of values at evenly spaced angular increments during one complete revolution. The difficulty with this approach is that the gyroscopic sensor output has errors due to non-linearity, temperature, and null offset drift. To solve these problems, the method rescales the gyro output during the calibration process. A single magnetometer axis can provide the sensor with a reference point indicating that the machine and the sensor have rotated exactly 360 degrees. The scale factor can then be adjusted until the integration of the gyroscope signal is exactly 360 degrees through each pass of the reference point. In order to solve the null offset drift problem, the machine is stationary at the start of the calibration to measure the offset. The rotational data collection part of the calibration is accomplished with the machine rotating at a uniform rotational speed. The drift in field values should be minimal during this short period of time.
Now that a source of heading truth has been established, the system internally populates a soft iron calibration lookup table. The soft iron algorithm is illustrated in the flowchart of
Since the rotation is about the Z axis 34, the truth signal is in the compass plane. The soft iron table, however, is computed in the earth normal plane. For calibrations performed on fairly level surfaces, the difference between compass plane and earth normal plane is negligible. Below is a table summarizing the maximum error between compass plane and earth normal plane for various slopes, if the truth signal is not transformed to earth normal plane:
Translate the compass plane truth signal to earth normal, as follows. First, find the maximum/minimum pitch and the rotational offset for a given initial pitch and initial roll.
Offset=a tan(−sin(InitialRoll)/sin(InitialPitch));
PitchAmplitude=−a sin(sin(InitialRoll)*sin(Offset)−sin(InitialPitch)*cos(Offset));
Calculate the {X, Y, Z} coordinates for a given rotational offset after integrating the gyro signal:
X=−cos(PitchAmplitude)*sin(IntegratedAngle-Offset+270°)
Y=sin(IntegratedAngle-Offset)
Z=sin(PitchAmplitude)*sin(IntegratedAngle-Offset+270°)
These equations were determined by developing a simultaneous set of equations after defining three vectors. The three vectors were: i) Along the X axis in the compass plane (determined from InitialPitch). Call this vector V1. ii) Along the Y axis in the compass plane (determined from InitialRoll). Call this vector V2. iii) The normal vector about V1 and V2. Call this vector N.
Next, the cross product rule was used to establish 6 sets of equations to find the unknown vector which we will call B.
V1×B=len(V1)*len(B)*sin(IntegratedAngle)*N
V2×B=len(V2)*len(B)*sin(IntegratedAngle +270°)*N
len(V1)=len(V2)=len(B)=1
Once the X/Y coordinates are found, we can easily find the earth normal heading: a tan 2(Y/X).
Referring again to
The soft iron calibration works well to compensate for horizontal distortions of the earth's magnetic field. However, it cannot compensate for any distortions created in the vertical axis. Through experimentation it was discovered that this vertical distortion can be compensated for by characterizing the distortion through one complete revolution. If we assume that the Z axis of the magnetic sensor is installed parallel to the Z axis 34 of machine rotation, measurements collected on the Z axis magnetometer should be constant. Deviations from this are a measure of the vertical soft iron distortion. To characterize and subsequently compensate for this, the amplitude and phase shift of the Z axis measurements through one full revolution are computed.
These characteristics are a function of heading. We first use the raw measurements to compute a rough heading estimate, compensate the Z axis measurement through the characteristic equation, and then re-compute the final heading measurement. We can do this for two reasons: i) The soft iron effects are sinusoidal so between any 5-10 degrees in heading the effects will be similar, and ii) Z axis accuracy is not as critical as X/Y axis accuracy (especially with smaller slopes).
It should be appreciated that in some circumstances it may not be possible for the machine to make an entire 360 degree rotation as a part of the process of building the soft iron calibration table. For example, the terrain or structures close to the machine may prevent such movement. In this instance a partial rotation of the machine may be made, with data being collected during the partial rotation. Since the uncompensated outputs of the magnetic field sensor cannot be used to rescale or recalibrate the gyroscopic sensor when less than a full rotation is being made, it will be appreciated that the accuracy achieved when operating in this manner will be less.