JP5641236B2 - Geomagnetic measurement apparatus, offset determination method, and offset determination program - Google Patents

Geomagnetic measurement apparatus, offset determination method, and offset determination program Download PDF

Info

Publication number
JP5641236B2
JP5641236B2 JP2011062689A JP2011062689A JP5641236B2 JP 5641236 B2 JP5641236 B2 JP 5641236B2 JP 2011062689 A JP2011062689 A JP 2011062689A JP 2011062689 A JP2011062689 A JP 2011062689A JP 5641236 B2 JP5641236 B2 JP 5641236B2
Authority
JP
Japan
Prior art keywords
center point
magnetic data
magnetic
dimensional
offset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011062689A
Other languages
Japanese (ja)
Other versions
JP2012198112A (en
Inventor
伊吹 半田
伊吹 半田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2011062689A priority Critical patent/JP5641236B2/en
Priority to US13/422,152 priority patent/US9031805B2/en
Priority to CN201210077860.6A priority patent/CN102692608B/en
Priority to EP12002040.9A priority patent/EP2503286A3/en
Publication of JP2012198112A publication Critical patent/JP2012198112A/en
Application granted granted Critical
Publication of JP5641236B2 publication Critical patent/JP5641236B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measuring Magnetic Variables (AREA)

Description

本発明は、地磁気測定装置、オフセット決定方法、及びオフセット決定プログラムに関する。   The present invention relates to a geomagnetic measurement apparatus, an offset determination method, and an offset determination program.

近年、携帯電話等の携帯機器や、自動車等の移動体に搭載され、地磁気を検出する3次元磁気センサが開発されている。一般に、3次元磁気センサは、磁界のベクトルを互いに直交する3方向の成分に分解してスカラー量を検知するための3つの磁気センサモジュールを備え、3つの磁気センサモジュールが各々出力するスカラー量を3つの成分とする3次元のベクトルデータを出力する。   In recent years, a three-dimensional magnetic sensor that is mounted on a mobile device such as a mobile phone or a mobile body such as an automobile and detects geomagnetism has been developed. In general, a three-dimensional magnetic sensor includes three magnetic sensor modules for detecting a scalar quantity by decomposing a vector of a magnetic field into three orthogonal components, and each of the three magnetic sensor modules outputs a scalar quantity. Outputs three-dimensional vector data as three components.

ところで、3次元磁気センサが搭載される携帯電話等の機器は、着磁性を有する各種金属や、電気回路等、磁界を発生させる部品が備えられることが多い。この場合、3次元磁気センサが出力するベクトルデータは、地磁気を表すベクトルの他に、機器に搭載された部品が発する磁界等を表すベクトルも含む値となる。
従って、地磁気の値を正確に知るためには、3次元磁気センサが出力するベクトルデータから、機器の部品が発する内部磁界等の外乱成分を表すベクトルを取り除く補正処理が必要となる。
このように、検出対象である地磁気の正確な値を得るために、補正処理において、3次元磁気センサから出力されるデータから取り除かれる外乱成分の値をオフセットと呼ぶ。
By the way, a device such as a mobile phone on which a three-dimensional magnetic sensor is mounted is often provided with various components that generate magnetic fields, such as various types of magnetized metals and electric circuits. In this case, the vector data output from the three-dimensional magnetic sensor is a value including a vector representing a magnetic field generated by a component mounted on the device in addition to a vector representing geomagnetism.
Therefore, in order to accurately know the value of geomagnetism, it is necessary to perform a correction process for removing a vector representing a disturbance component such as an internal magnetic field generated by a component of the device from vector data output from the three-dimensional magnetic sensor.
Thus, in order to obtain an accurate value of the geomagnetism that is the detection target, the value of the disturbance component that is removed from the data output from the three-dimensional magnetic sensor in the correction process is called an offset.

内部磁界は、機器の部品が発する磁界である。すなわち、内部磁界は、機器に対して一定の方向を向き、一定の大きさを有する磁界である。このような内部磁界は、機器に搭載された3次元磁気センサから見た場合には、機器をどのような姿勢に変化させた場合であっても、一定の方向と一定の大きさを有するベクトルとして表される。
一方、地磁気は、磁極北に向かう水平成分と伏角方向の鉛直成分とを有する磁界であり、地面に対して、一定の方向と、一定の大きさとを有する、一様な磁界である。従って、地面に対して機器の姿勢を変化させる場合には、機器から見た地磁気の方向も変化することになる。すなわち、機器に搭載された3次元磁気センサから見た場合、地磁気は、機器の姿勢の変化に伴い向きが変化する一定の大きさを持ったベクトルとして表される。
特許文献1には、このような地磁気及び内部磁界の性質を利用することで、3次元磁気センサの姿勢を変化させつつ取得した複数の磁気データに基づいて、内部磁界を表す一定の向き及び大きさを有するベクトルを算出し、この内部磁界を表すベクトルをオフセットとして出力データから取り除く補正処理を行うことで、正確な地磁気の値を得る方法が開示されている。
The internal magnetic field is a magnetic field generated by device components. That is, the internal magnetic field is a magnetic field that is directed in a certain direction with respect to the device and has a certain magnitude. Such an internal magnetic field is a vector having a certain direction and a certain magnitude when viewed from a three-dimensional magnetic sensor mounted on the device, regardless of the posture of the device. Represented as:
On the other hand, the geomagnetism is a magnetic field having a horizontal component toward the north of the magnetic pole and a vertical component in the dip direction, and is a uniform magnetic field having a certain direction and a certain magnitude with respect to the ground. Therefore, when the posture of the device is changed with respect to the ground, the direction of geomagnetism viewed from the device also changes. That is, when viewed from a three-dimensional magnetic sensor mounted on a device, the geomagnetism is expressed as a vector having a certain magnitude whose direction changes with a change in the posture of the device.
In Patent Document 1, by utilizing such properties of the geomagnetism and the internal magnetic field, based on a plurality of magnetic data acquired while changing the attitude of the three-dimensional magnetic sensor, a certain direction and magnitude representing the internal magnetic field are disclosed. A method for obtaining an accurate geomagnetism value by calculating a vector having a certain length and performing correction processing for removing the vector representing the internal magnetic field from the output data as an offset is disclosed.

特開2007−240270号公報JP 2007-240270 A

ところで、3次元磁気センサが搭載される携帯電話等の機器の近くに、スピーカやパソコン等の磁界を発生させる物体が存在する場合、3次元磁気センサは、前述した地磁気及び内部磁界の他に、機器の外部の物体が発する外部磁界も検出する。一般的に、外部磁界は、外部磁界を発生させる物体と3次元磁気センサとの相対的位置関係等によって、向き及び大きさが変化する不均一な磁界である。   By the way, in the case where an object that generates a magnetic field such as a speaker or a personal computer exists near a device such as a mobile phone on which the three-dimensional magnetic sensor is mounted, the three-dimensional magnetic sensor has the above-described geomagnetism and internal magnetic field, It also detects external magnetic fields emitted by objects outside the device. In general, an external magnetic field is a non-uniform magnetic field whose direction and magnitude vary depending on the relative positional relationship between an object that generates an external magnetic field and a three-dimensional magnetic sensor.

従来の方法では、このような不均一な外部磁界の存在の有無や、不均一な外部磁界による影響の大きさを知ることは出来なかった。従って、従来の方法では、不均一な外部磁界が存在する環境下で算出された内部磁界のベクトルが大きな誤差を持つ場合であっても、外部磁界が存在しない環境下で計算された正しい値であると判断し、これをオフセットとして採用してしまうため、オフセットに大きな誤差を含むことがあるという問題が存在した。
同様に、磁界のベクトルを互いに直交する2方向の成分に分解してスカラー量を検知するための2つの磁気センサモジュールを備え、2つの磁気センサモジュールが各々出力するスカラー量を2つの成分とする2次元のベクトルデータを出力する2次元磁気センサにおいても、オフセットに大きな誤差を含む場合があるという問題が存在した。
そこで、本発明は上述した事情を鑑み、外部磁界の影響の程度を評価することより、オフセット値の採用の可否を決定することを解決課題とする。
In the conventional method, it is impossible to know the presence / absence of such a non-uniform external magnetic field and the magnitude of the influence of the non-uniform external magnetic field. Therefore, in the conventional method, even when the internal magnetic field vector calculated in the environment where the non-uniform external magnetic field exists has a large error, the correct value calculated in the environment where no external magnetic field exists is used. Since it is determined that it is present and this is adopted as an offset, there is a problem that a large error may be included in the offset.
Similarly, two magnetic sensor modules for detecting a scalar quantity by decomposing a magnetic field vector into two orthogonal components are provided, and the scalar quantity output by each of the two magnetic sensor modules is set as two components. Even in a two-dimensional magnetic sensor that outputs two-dimensional vector data, there is a problem that a large error may be included in the offset.
The present invention has been made in view of the circumstances described above, and more to evaluate the degree of influence of an external magnetic field, and solves problems and determining whether to adopt the offset value.

上述した課題を解決するため、本発明に係る地磁気測定装置は、磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する3方向の磁気成分をそれぞれ検出する3次元磁気センサと、前記機器の姿勢を変化させた場合に前記3次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と前記蓄積手段に蓄積された複数の磁気データで示される座標が、球面と曲面とを重ね合わせることで得られる非球面の立体の表面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記立体の表面との誤差を表す目的関数を用いて、前記目的関数の表す誤差の値を最小化するときの、前記目的関数における前記曲面を表す成分に基づく第1評価値を算出し、前記第1評価値が所定の大きさ以下であるか否かを判定する歪判定手段と、前記歪判定手段の判定結果が肯定である場合に、前記磁気データのうち前記部品の発生する磁界の成分を表す3軸の座標であるオフセットを更新するオフセット更新手段と、を備えることを特徴とする。 In order to solve the above-described problems, a geomagnetism measuring apparatus according to the present invention is incorporated in a device having a part that generates a magnetic field, and detects a magnetic component in three directions orthogonal to each other. overlapping means for storing the magnetic data sequentially output from the 3-dimensional magnetic sensor in the case of changing the posture, the coordinates indicated by the plurality of magnetic data stored in the storage means, and a spherical surface and a curved surface Assuming that it is probabilistically distributed in the vicinity of the surface of the aspheric solid obtained by combining , using the objective function representing the error between the coordinates indicated by the plurality of magnetic data and the surface of the solid, the objective function determine when to minimize the value of the error, and calculates a first evaluation value based on component representing the curved surface in the objective function, the first evaluation value to or less than a predetermined magnitude represented by A distortion determination section that, when the a determination result of the distortion determination unit is affirmative, the offset updating means for updating the offset the coordinates of the three-axis representing the magnetic field generated by the components of the part of the magnetic data, It is characterized by providing.

この発明によれば、歪判定手段において、複数の磁気データで示される座標が、球面と曲面とを重ね合わせて得られる球面以外の歪んだ形状を有する立体の表面近傍に確率的に分布すると仮定して、複数の磁気データで示される座標と立体の表面との誤差を表す目的関数を導入する。この目的関数は、球面を表す成分と、曲面を表す成分とから形成される。そして、目的関数のうち曲面を表す成分による影響を評価する第1評価値によって、複数の磁気データで示される座標が、目的関数のうち球面を表す成分で表される球面の表面からどの程度離れているかを評価することができる。すなわち、第1評価値により、立体の形状が、球面の形状からどの程度の差異を有するものであるか(つまり、どの程度の歪を有するか)についての評価することができる。
このような、歪判定手段を備えることにより、複数の磁気データが立体の表面近傍に分布するときに、立体が球面と実質的に同一の形状を有するほど近似している場合には、複数の磁気データで示される座標が球面近傍にも分布すると看做すことができる。複数の磁気データで示される座標が球面近傍に分布する場合、複数の磁気データで示される座標を近傍に有する球面の中心点が内部磁界を表すベクトルの示す座標であるため、複数の磁気データで示される座標を近傍に有する球面の中心点をオフセットとして採用する。一方、立体が球面とは大きく異なる歪んだ形状を有する場合には、複数の磁気データで示される座標が球面近傍に分布するとは看做せないため、複数の磁気データで示される座標を近傍に有する球面の中心点をオフセットとして採用することを防止することが可能になる。すなわち、上述した地磁気測定装置は適切な値のみをオフセットとして採用することが可能であるという利点を有する。この結果大きな誤差が含まれる値を、オフセットとして採用しないので、誤った地磁気を検出することを防止できる。
According to the present invention, in the strain determination means, it is assumed that the coordinates indicated by the plurality of magnetic data are probabilistically distributed near the surface of a solid having a distorted shape other than the spherical surface obtained by superimposing the spherical surface and the curved surface. Then, an objective function representing an error between the coordinates indicated by the plurality of magnetic data and the surface of the solid is introduced. This objective function is formed from a component representing a spherical surface and a component representing a curved surface. Then, by the first evaluation value that evaluates the influence of the component representing the curved surface of the objective function, how far the coordinates indicated by the plurality of magnetic data are away from the surface of the spherical surface represented by the component representing the spherical surface of the objective function Can be evaluated. That is, the first evaluation value can be used to evaluate how much the three-dimensional shape has a difference from the spherical shape (that is, how much distortion is present).
By providing such a distortion determination means, when a plurality of magnetic data are distributed near the surface of a solid, if the solid is so approximate that it has substantially the same shape as a spherical surface, It can be considered that the coordinates indicated by the magnetic data are distributed near the spherical surface . When the coordinate represented by a plurality of magnetic data is distributed in a spherical near, since the center point of the spherical surface having the coordinates indicated by the plurality of magnetic data in the vicinity is a coordinate indicated by the vector representing the internal magnetic field, a plurality of magnetic data A spherical center point having the indicated coordinates in the vicinity is adopted as an offset. On the other hand, if the solid has a distorted shape that is significantly different from the spherical surface, the coordinates indicated by the plurality of magnetic data cannot be considered to be distributed near the spherical surface. the center point of the spherical surface having it is possible to prevent the adoption as an offset. That is, the above-described geomagnetic measurement apparatus has an advantage that only an appropriate value can be adopted as an offset. As a result , since a value including a large error is not adopted as an offset, it is possible to prevent erroneous geomagnetism from being detected.

また、上述した地磁気測定装置において、前記第1評価値が前記所定の大きさよりも大きな値となる場合に、利用者に前記機器の位置を変化させずに前記機器の姿勢を変化させるように促す手段を備えることが好ましい。   In the geomagnetism measuring apparatus described above, when the first evaluation value is larger than the predetermined size, the user is prompted to change the posture of the device without changing the position of the device. Preferably means are provided.

この発明によれば、上述した地磁気測定装置は、歪判定手段において第1評価値が所定の大きさよりも大きいと判定される場合、すなわち、3次元磁気センサから出力される複数の磁気データの示す座標が立体の表面近傍に分布するときに立体の形状が球面から大きな歪を有する場合、利用者に対して機器の位置を変化させずに機器の姿勢を変化させるように促す手段を備える。
3次元磁気センサは、測定対象である地磁気の他に、機器に備えられた部品の発する内部磁界と、外部の物体の発する外部磁界とを検出する。外部磁界は、外部の物体と3次元磁気センサとの相互位置関係に依存して、方向及び大きさを変化させる不均一な磁界である。そして、この不均一な外部磁界の影響が大きい場合には、複数の磁気データは、球面とは大きく異なる歪んだ形状を有する立体の表面近傍に分布することになり、複数の磁気データで示される座標が球面近傍に分布するとは看做せないため、球面の中心点をオフセットとして採用することができなくなる。
しかし、このような不均一な外部磁界も、外部磁界を発生させる外部の物体との相互位置関係が変化しない場合には、一定の方向を向いた一定の大きさの磁界にすぎない。つまり、3次元磁気センサの位置を変化させずに姿勢を変化させる場合、外部磁界は、3次元磁気センサによって、一定の大きさを有し方向のみを変化させる磁界として検出される。この場合、3次元磁気センサから出力される複数の磁気データで示される座標は、ある球面近傍に分布することになる。そして、この球面の中心点は、機器に備えられた部品の発する磁界(内部磁界)の成分を示す座標とほぼ同一の座標となるため、複数の磁気データで示される座標を近傍に有する球面の中心点をオフセットとして採用することが可能となる。
従って、上述した地磁気測定装置は、利用者に機器の位置を変化させずに機器の姿勢を変化させるように促す手段を備えることにより、不均一な外部磁界が存在する場所でも、適切なオフセットを算出することができるような動作を利用者に促すことが可能となる。
According to the present invention, the above-described geomagnetism measuring device shows a plurality of magnetic data output from the three-dimensional magnetic sensor when the strain determination means determines that the first evaluation value is larger than a predetermined size. When the coordinates are distributed in the vicinity of the surface of the solid, when the shape of the solid has a large distortion from the spherical surface, there is provided means for urging the user to change the posture of the device without changing the position of the device.
The three-dimensional magnetic sensor detects, in addition to the geomagnetism as a measurement target, an internal magnetic field generated by a component provided in the device and an external magnetic field generated by an external object. The external magnetic field is a non-uniform magnetic field that changes direction and magnitude depending on the mutual positional relationship between an external object and the three-dimensional magnetic sensor. When the influence of the non-uniform external magnetic field is large, the plurality of magnetic data are distributed in the vicinity of the surface of a solid having a distorted shape that is significantly different from the spherical surface, and are indicated by the plurality of magnetic data. Since it cannot be considered that the coordinates are distributed in the vicinity of the spherical surface, the center point of the spherical surface cannot be adopted as an offset.
However, such a non-uniform external magnetic field is only a magnetic field of a certain magnitude directed in a certain direction when the mutual positional relationship with an external object that generates the external magnetic field does not change. That is, when the posture is changed without changing the position of the three-dimensional magnetic sensor, the external magnetic field is detected by the three-dimensional magnetic sensor as a magnetic field having a certain magnitude and changing only the direction. In this case, the coordinates indicated by the plurality of magnetic data output from the three-dimensional magnetic sensor are distributed in the vicinity of a certain spherical surface. And since the center point of this spherical surface is almost the same as the coordinate indicating the component of the magnetic field (internal magnetic field) generated by the component provided in the device, the spherical surface having the coordinates indicated by a plurality of magnetic data nearby. The center point can be used as an offset.
Therefore, the geomagnetism measuring apparatus described above is provided with means for prompting the user to change the posture of the device without changing the position of the device, so that an appropriate offset can be obtained even in a place where a non-uniform external magnetic field exists. It is possible to prompt the user to perform an operation that can be calculated.

また、上述した地磁気測定装置は、前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、中心点算出用球面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される3軸の座標と前記中心点算出用球面との誤差を最小化するように、前記中心点算出用球面の中心点を算出する中心点算出手段を、更に備え、前記目的関数における前記曲面を表す成分は、前記複数の磁気データの各々に対応する各要素からなるベクトルであり、前記各要素は、第1評価行列を係数行列とする3変数の二次形式により表現される関数に対して、前記中心点を原点とする座標系において前記磁気データを表す3軸の値を代入することで得られる値であり、前記第1評価値は、前記第1評価行列のノルムであり、前記オフセットは、前記中心点であることが好ましい。 Further, the above-described geomagnetism measurement apparatus indicates that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the center point calculation spherical surface, and is indicated by the plurality of magnetic data. Center point calculating means for calculating a center point of the center point calculating sphere so as to minimize an error between the three-axis coordinates and the center point calculating sphere, wherein the curved surface in the objective function is The component to be expressed is a vector composed of each element corresponding to each of the plurality of magnetic data, and each element corresponds to a function expressed by a quadratic form of three variables having a first evaluation matrix as a coefficient matrix. is a value obtained by substituting the values of three axes that represent the magnetic data in a coordinate system with its origin the center point, the first evaluation value, Ri norm der of the first evaluation matrix, wherein The offset is Heart point der Rukoto is preferable.

この発明によれば、歪判定手段で用いる目的関数における曲面を表す成分は、二次形式で表される関数に対して複数の磁気データで示される座標の各々に対応する値を代入して得た値を要素とするベクトルにより表現される。
すなわち、曲面を表す成分は、複数の磁気データで示される座標の各々と球面との誤差の各々が、二次形式で表される同一の関数が示す曲面上に存在するという制約の下、誤差を表現するベクトルである。この曲面を表す成分によって、複数の磁気データで示される座標と、球面との誤差を、二次形式で表される関数が示す曲面によって吸収することができる。
仮に、複数の磁気データで示される座標と球面との誤差を、何ら制約の無い変数を要素とするベクトルで表す場合、ベクトルの各要素、すなわち、複数の磁気データに対応する誤差の各々は、互いに独立なものとして表現される。そして、複数の磁気データで示される座標と球面との誤差を最小化した場合、このベクトルにより表される複数の誤差は、全体として対称性を有し、方向依存性の無い、ホワイトノイズとなる。
これに対して、歪判定手段で用いる目的関数は、曲面を表す成分を導入することで、このようなホワイトノイズとは別に、曲面を表す成分に起因する誤差を表現することが可能となり、これまで一律にホワイトノイズとみなしていた誤差から、ホワイトノイズではない曲面を表す成分に起因する誤差を分離することが可能となった。
従って、上述した地磁気測定装置は、複数の磁気データで示される座標と球面との誤差のうち、曲面を表す成分に起因する誤差を分離することにより、曲面を表す成分による影響を評価することが可能となり、地磁気測定装置が検出する磁気データに含まれる誤差が単なるホワイトノイズであるのか、それとも、ホワイトノイズ以外の何らかの外乱成分を含むのかを判断することができるのと同時に、そのホワイトノイズ以外の外乱成分の影響の大きさを評価することができるという利点を有する。
According to the present invention, the component representing the curved surface in the objective function used in the strain determination means is obtained by substituting values corresponding to each of the coordinates indicated by the plurality of magnetic data into the function represented in the quadratic form. It is expressed by a vector whose element is the value.
That is, the component representing the curved surface has an error under the restriction that each of the errors between the coordinates indicated by the plurality of magnetic data and the spherical surface exists on the curved surface indicated by the same function expressed in quadratic form. Is a vector that expresses With the component representing the curved surface, an error between the coordinates represented by the plurality of magnetic data and the spherical surface can be absorbed by the curved surface represented by the function represented by the quadratic form.
If the error between the coordinates and the spherical surface indicated by a plurality of magnetic data is represented by a vector having a variable without any restrictions as an element, each element of the vector, that is, each of the errors corresponding to the plurality of magnetic data, Expressed as independent of each other. When the error between the coordinates indicated by the plurality of magnetic data and the spherical surface is minimized, the plurality of errors represented by this vector are white noise having symmetry as a whole and having no direction dependency. .
On the other hand, the objective function used in the distortion determination means can express an error caused by a component representing a curved surface separately from such white noise by introducing a component representing a curved surface. It is now possible to separate errors caused by components representing curved surfaces that are not white noise from errors that were uniformly regarded as white noise.
Therefore, the geomagnetism measuring apparatus described above can evaluate the influence of the component representing the curved surface by separating the error caused by the component representing the curved surface from the error between the coordinates and the spherical surface indicated by the plurality of magnetic data. It is possible to determine whether the error included in the magnetic data detected by the geomagnetism measuring device is just white noise, or whether it contains some disturbance component other than white noise, and at the same time, This has the advantage that the magnitude of the influence of the disturbance component can be evaluated.

また、上述した地磁気測定装置において、前記中心点算出手段は、前記複数の磁気データで示される座標が、3次元的な広がりを持って分布していることを評価する第2評価値を算出し、前記第2評価値が所定の大きさ以上の場合に、前記中心点を算出することが好ましい。   In the above-described geomagnetism measuring apparatus, the center point calculating unit calculates a second evaluation value for evaluating that the coordinates indicated by the plurality of magnetic data are distributed with a three-dimensional spread. It is preferable to calculate the center point when the second evaluation value is equal to or larger than a predetermined size.

この発明によれば、第2評価値により、複数の磁気データで示される座標の3次元的な広がりの大きさを評価することにより、正確な中心点を導出することができないような複数の磁気データに基づく中心点算出処理を行うことを防止することができる。
これにより、不適切な中心点をオフセットとして採用することを避け、誤差の大きな地磁気の値を検出することを防止することができるという利点を有すると共に、不適切な磁気データに基づいた不適切な中心点を導出する中心点算出処理を行うことを未然に防止することで、正しいオフセットを採用するまでの時間を短縮することができるという利点を有する。
According to the present invention, a plurality of magnetic points in which an accurate center point cannot be derived by evaluating the size of the three-dimensional spread of coordinates indicated by the plurality of magnetic data using the second evaluation value. It is possible to prevent the center point calculation process based on the data.
This has the advantage of avoiding the use of an inappropriate center point as an offset and preventing the detection of a geomagnetic value with a large error, and is also inappropriate based on inappropriate magnetic data. By preventing the center point calculation process for deriving the center point, it is possible to reduce the time until the correct offset is adopted.

また、上述した地磁気測定装置において、前記中心点算出手段は、下記の第2目的関数f(x)の値を最小にするxを、前記中心点として算出することが好ましい。

Figure 0005641236
In the geomagnetism measuring apparatus described above, it is preferable that the center point calculating means calculates x that minimizes the value of the second objective function f 1 (x) below as the center point.
Figure 0005641236

この発明によれば、簡単な計算によりオフセットの候補となる中心点を導出することができる。従って、上述した地磁気測定装置は、処理速度の向上という利点を有する。   According to the present invention, it is possible to derive a center point as an offset candidate by simple calculation. Therefore, the geomagnetism measuring apparatus described above has the advantage of improving the processing speed.

また、上述した地磁気測定装置において、前記目的関数は、前記第1評価行列をEとし、前記中心点をxとしたとき、Eを変数とするf(E、x)で表され、前記第1評価値は、f(E、x)を最小化するEのノルムであることが好ましい。

Figure 0005641236
In the geomagnetism measuring apparatus described above, the objective function is represented by f 2 (E, x), where E is a variable, where E is the first evaluation matrix and x 0 is the center point. The first evaluation value is preferably a norm of E that minimizes f 2 (E, x).
Figure 0005641236

この発明によれば、目的関数及び第1評価値を、簡単な計算によって求めることが可能である。
従って、上述した地磁気測定装置は、短時間で適切なオフセットを採用することが可能であり、正確な地磁気の値を、地磁気測定装置の組み込まれた機器のCPUに過大な負荷を与えることなく、常時正確な地磁気を測定することができるという利点を有する。
According to the present invention, the objective function and the first evaluation value can be obtained by simple calculation.
Therefore, the above-mentioned geomagnetism measuring apparatus can adopt an appropriate offset in a short time, and an accurate geomagnetism value can be obtained without overloading the CPU of the device in which the geomagnetism measuring apparatus is incorporated. This has the advantage that accurate geomagnetism can be measured at all times.

また、上述した地磁気測定装置において、前記第2評価値は、下記の行列Aの最小固有値であることが好ましい。

Figure 0005641236
In the geomagnetism measuring apparatus described above, it is preferable that the second evaluation value is a minimum eigenvalue of the following matrix A.
Figure 0005641236

この発明によれば、上述した地磁気測定装置は、簡単な計算により複数の磁気データで示される座標の3次元的な広がりの大きさを評価する第2評価値を算出することが可能である。従って、上述した地磁気測定装置は、処理速度の向上という利点を有する。   According to the present invention, the above-described geomagnetism measuring apparatus can calculate the second evaluation value for evaluating the size of the three-dimensional extent of the coordinates indicated by the plurality of magnetic data by simple calculation. Therefore, the geomagnetism measuring apparatus described above has the advantage of improving the processing speed.

次に、本発明に係る地磁気測定装置は、
磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する2方向の磁気成分をそれぞれ検出する2次元磁気センサと、
前記機器の姿勢を変化させた場合に前記2次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、前記部品の発生する磁界の成分を示す座標を中心点とする円周近傍に確率的に分布すると仮定して、前記複数の磁気データで示される2軸の座標と前記円周との誤差を最小化するように、前記円周の中心点を算出する中心点算出手段と、
前記複数の磁気データで示される座標が、円周と第1曲線とを重ね合わせることで得られる円周以外の形状の第2曲線の近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記第2曲線との誤差を表す第3目的関数を用いて、前記第3目的関数の表す誤差の値を最小化するときの、前記第3目的関数における前記第1曲線を表す成分に基づく第3評価値を算出し、前記第3評価値が所定の大きさ以下の場合に、前記中心点を、前記2次元磁気センサのオフセットとして採用する、歪判定手段とを備えることを特徴とする。
Next, the geomagnetism measuring apparatus according to the present invention is:
A two-dimensional magnetic sensor that is incorporated in a device including a component that generates a magnetic field and detects magnetic components in two directions orthogonal to each other;
Storage means for storing magnetic data sequentially output from the two-dimensional magnetic sensor when the posture of the device is changed;
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the circumference centered on the coordinates indicating the magnetic field component generated by the component, Center point calculating means for calculating a center point of the circumference so as to minimize an error between the coordinates of the two axes indicated by the magnetic data and the circumference;
Assuming that the coordinates indicated by the plurality of magnetic data are probabilistically distributed in the vicinity of the second curve having a shape other than the circumference obtained by superimposing the circumference and the first curve, the plurality of magnetic data The first curve in the third objective function when the error value represented by the third objective function is minimized by using the third objective function representing the error between the coordinates indicated by the data and the second curve. And a distortion determination unit that calculates a third evaluation value based on a component representing the value and adopts the center point as an offset of the two-dimensional magnetic sensor when the third evaluation value is equal to or smaller than a predetermined magnitude. It is characterized by that.

この発明によれば、2次元磁気センサから出力される複数の磁気データが円周とは異なる形状の第2曲線の近傍に分布するとき、この第2曲線の形状がどの程度、円周に近いかによって、円周の中心点をオフセットとして採用するか否を判定するので、算出された円周の中心点の値に大きな誤差が含まれる場合に、これをオフセットとして採用することを防止し、誤った地磁気を検出することを防止できる。 According to the present invention, when the plurality of magnetic data output from the two-dimensional magnetic sensor are distributed in the vicinity of the second curve having a shape different from the circumference, how close the shape of the second curve is to the circumference. Depending on what, it is determined whether or not to adopt the center point of the circumference as an offset, so when a large error is included in the value of the calculated center point of the circumference, it is prevented to adopt this as an offset, It is possible to prevent detection of erroneous geomagnetism.

次に、本発明に係る地磁気測定装置に用いられるオフセット決定方法は、
磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する3方向の磁気成分をそれぞれ検出する3次元磁気センサと、前記機器の姿勢を変化させた場合に前記3次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と、を備える地磁気測定装置に用いられるオフセット決定方法であって、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、前記部品の発生する磁界の成分を示す座標を中心点とする中心点算出用球面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される3軸の座標と前記中心点算出用球面との誤差を最小化するように、前記中心点算出用球面の中心点を算出し、
前記複数の磁気データで示される座標が、球面と曲面とを重ね合わせることで得られる非球面の立体の表面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記立体の表面との誤差を表す目的関数を用いて、前記目的関数の表す誤差の値を最小化するときの、前記目的関数における前記曲面を表す成分に基づく第1評価値を算出し、前記第1評価値が所定の大きさ以下の場合に、前記中心点を、前記3次元磁気センサのオフセットとして採用する、ことを特徴とする。
Next, the offset determination method used in the geomagnetism measuring apparatus according to the present invention is:
A three-dimensional magnetic sensor that is incorporated in a device having a part that generates a magnetic field and detects magnetic components in three directions orthogonal to each other, and is sequentially output from the three-dimensional magnetic sensor when the posture of the device is changed. An offset determining method used in a geomagnetism measuring device comprising: a storage means for storing magnetic data;
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the center point calculation spherical surface with the coordinates indicating the magnetic field component generated by the component as the center point , Calculating a center point of the center point calculating sphere so as to minimize an error between the three-axis coordinates indicated by the plurality of magnetic data and the center point calculating sphere;
Assuming that the coordinates indicated by the plurality of magnetic data are probabilistically distributed near the surface of an aspheric solid obtained by superimposing a spherical surface and a curved surface, the coordinates indicated by the plurality of magnetic data and the A first evaluation value based on a component representing the curved surface in the objective function when the error value represented by the objective function is minimized is calculated using an objective function representing an error with the surface of the solid, When one evaluation value is equal to or smaller than a predetermined size, the center point is employed as an offset of the three-dimensional magnetic sensor.

この発明によれば、複数の磁気データが立体の表面近傍に分布するとき、この立体の形状がどの程度、球面に近いかによって、中心点算出用球面の中心点をオフセットとして採用するか否を判定するので、中心点算出用球面の中心点の値に大きな誤差が含まれる場合にこれをオフセットとして採用することを防止し、誤った地磁気を検出することを防止できる。 According to the present invention, when a plurality of magnetic data are distributed near the surface of a solid, whether or not the center point of the center point calculation spherical surface is adopted as an offset depends on how close the shape of the solid is to the spherical surface. Therefore, when a large error is included in the value of the center point of the center point calculation spherical surface , it is possible to prevent this from being adopted as an offset and to prevent erroneous geomagnetism.

次に、本発明に係る地磁気測定装置に用いられるオフセット決定プログラムは、
磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する3方向の磁気成分をそれぞれ検出する3次元磁気センサと、前記機器の姿勢を変化させた場合に前記3次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と、を備える地磁気測定装置に用いられるオフセット決定プログラムであって、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、前記部品の発生する磁界の成分を示す座標を中心点とする中心点算出用球面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される3軸の座標と前記中心点算出用球面との誤差を最小化するように、前記中心点算出用球面の中心点を算出する処理と、
前記複数の磁気データで示される座標が、球面と曲面とを重ね合わせることで得られる非球面の立体の表面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記立体の表面との誤差を表す目的関数を用いて、前記目的関数の表す誤差の値を最小化するときの、前記目的関数における前記曲面を表す成分に基づく第1評価値を算出し、前記第1評価値が所定の大きさ以下の場合に、前記中心点を、前記3次元磁気センサのオフセットとして採用する処理とを、コンピュータに実行させることを特徴とする。
Next, the offset determination program used in the geomagnetism measuring apparatus according to the present invention is:
A three-dimensional magnetic sensor that is incorporated in a device having a part that generates a magnetic field and detects magnetic components in three directions orthogonal to each other, and is sequentially output from the three-dimensional magnetic sensor when the posture of the device is changed. An offset determining program for use in a geomagnetism measuring device comprising a storage means for storing magnetic data.
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the center point calculation spherical surface with the coordinates indicating the magnetic field component generated by the component as the center point , so as to minimize the error between the coordinates and the center point calculation spherical three axes indicated by the plurality of magnetic data, the processing for calculating the center point of the center point calculation spherical,
Assuming that the coordinates indicated by the plurality of magnetic data are probabilistically distributed near the surface of an aspheric solid obtained by superimposing a spherical surface and a curved surface, the coordinates indicated by the plurality of magnetic data and the A first evaluation value based on a component representing the curved surface in the objective function when the error value represented by the objective function is minimized is calculated using an objective function representing an error with the surface of the solid, When one evaluation value is equal to or smaller than a predetermined size, the computer is caused to execute a process of adopting the center point as an offset of the three-dimensional magnetic sensor.

この発明によれば、複数の磁気データが立体の表面近傍に分布するとき、この立体の形状がどの程度、球面に近いかによって、中心点算出用球面の中心点をオフセットとして採用するか否を判定するので、中心点算出用球面の中心点の値に大きな誤差が含まれる場合にこれをオフセットとして採用することを防止し、誤った地磁気を検出することを防止できる。 According to the present invention, when a plurality of magnetic data are distributed near the surface of a solid, whether or not the center point of the center point calculation spherical surface is adopted as an offset depends on how close the shape of the solid is to the spherical surface. Therefore, when a large error is included in the value of the center point of the center point calculation spherical surface , it is possible to prevent this from being adopted as an offset and to prevent erroneous geomagnetism.

本発明の実施形態に係る3次元磁気センサが検出する磁界の概要を説明する概念図である。It is a conceptual diagram explaining the outline | summary of the magnetic field which the three-dimensional magnetic sensor which concerns on embodiment of this invention detects. 本発明の実施形態に係る3次元磁気センサが検出する地磁気と内部磁界とについて説明する概念図である。It is a conceptual diagram explaining the geomagnetism and internal magnetic field which the three-dimensional magnetic sensor which concerns on embodiment of this invention detects. 本発明の実施形態に係る3次元磁気センサが検出する地磁気、内部磁界、及び外部磁界について説明する概念図である。It is a conceptual diagram explaining the geomagnetism, the internal magnetic field, and the external magnetic field which the three-dimensional magnetic sensor which concerns on embodiment of this invention detects. 本発明の実施形態に係る3次元磁気センサが検出する地磁気、内部磁界、及び外部磁界について説明する概念図である。It is a conceptual diagram explaining the geomagnetism, the internal magnetic field, and the external magnetic field which the three-dimensional magnetic sensor which concerns on embodiment of this invention detects. 本発明の実施形態に係る3次元磁気センサが搭載される機器の構成を示すブロック図である。It is a block diagram which shows the structure of the apparatus by which the three-dimensional magnetic sensor which concerns on embodiment of this invention is mounted. 本発明の実施形態に係る処理の流れを示したフローチャートである。It is the flowchart which showed the flow of the process which concerns on embodiment of this invention. 本発明の実施形態に係る中心点算出処理の処理を説明する概念図である。It is a conceptual diagram explaining the process of the center point calculation process which concerns on embodiment of this invention. 本発明の実施形態に係る磁気データ分布判定処理の必要性を説明する概念図である。It is a conceptual diagram explaining the necessity of the magnetic data distribution determination process which concerns on embodiment of this invention. 本発明の実施形態に係る磁気データ分布判定処理を説明する概念図である。It is a conceptual diagram explaining the magnetic data distribution determination process which concerns on embodiment of this invention. 本発明の実施形態に係る歪み判定処理を説明する概念図である。It is a conceptual diagram explaining the distortion determination process which concerns on embodiment of this invention. 本発明の実施形態に係る歪み判定処理を説明する概念図である。It is a conceptual diagram explaining the distortion determination process which concerns on embodiment of this invention. 本発明のシミュレーションで使用されたデータについて説明する図である。It is a figure explaining the data used by the simulation of this invention. 本発明のシミュレーション結果表である。It is a simulation result table | surface of this invention.

以下、本発明の実施の形態を説明する。   Embodiments of the present invention will be described below.

[1. 3次元磁気センサが検出する磁界の概要]
本実施形態では、3次元磁気センサが検出する磁界として、検出対象である地磁気の他に、3次元磁気センサが搭載される機器の部品が発する磁界である内部磁界、及び機器の外部の物体が発する外部磁界の存在を想定している。
これらの3種類の磁界は、磁界の向き、大きさ、及び均一性において、各々異なる性質を有するものである。つまり、これらの磁界を3次元磁気センサで検出する場合、3次元磁気センサの位置、姿勢が変化すると、3次元磁気センサから出力される磁界を示すベクトルデータの向き及び大きさも変化するが、この出力データの変化の仕方は、3種類の磁界の各々で差異を有する。
以下、図1乃至図4を用いて、本実施形態において想定するこれら3種類の磁界の概要、及び、これらの磁界を3次元磁気センサが検出した場合に出力されるベクトルデータについて説明する。
[1. Outline of magnetic field detected by 3D magnetic sensor]
In this embodiment, as a magnetic field detected by the three-dimensional magnetic sensor, in addition to the geomagnetism that is the detection target, an internal magnetic field that is a magnetic field generated by a component of the device on which the three-dimensional magnetic sensor is mounted, and an object outside the device The existence of an external magnetic field is assumed.
These three types of magnetic fields have different properties in the direction, magnitude, and uniformity of the magnetic field. That is, when these magnetic fields are detected by a three-dimensional magnetic sensor, if the position and orientation of the three-dimensional magnetic sensor change, the direction and magnitude of vector data indicating the magnetic field output from the three-dimensional magnetic sensor also change. The method of changing the output data has a difference in each of the three types of magnetic fields.
Hereinafter, an outline of these three types of magnetic fields assumed in the present embodiment and vector data output when the three-dimensional magnetic sensor detects these magnetic fields will be described with reference to FIGS.

図1は、機器1に搭載された3次元磁気センサ60の周囲に存在する磁界の種類及び性質について説明する図である。
3次元磁気センサ60の周囲に存在する磁界には、計測対象である地磁気Bgの他に、3次元磁気センサ60の搭載された機器1の部品が発する内部磁界Bi、及び機器1の周囲に存在する物体2が発する外部磁界Bxが存在する。
FIG. 1 is a diagram for explaining the types and properties of magnetic fields existing around the three-dimensional magnetic sensor 60 mounted on the device 1.
The magnetic field existing around the three-dimensional magnetic sensor 60 includes, in addition to the geomagnetism Bg to be measured, the internal magnetic field Bi generated by the components of the device 1 on which the three-dimensional magnetic sensor 60 is mounted, and the surroundings of the device 1. There is an external magnetic field Bx emitted by the object 2 that performs.

地磁気Bgは、磁極北に向かう方向を持つベクトルであり、一様な向き及び大きさを有する磁界である。厳密には、地磁気Bgの向き及び大きさは、地域によって異なるが、例えば、異なる都市に移動する等の大きな移動をしない場合には、一様な向き及び大きさを有する。
内部磁界Biは、機器1の部品が発する磁界であり、内部磁界Biの向きは、機器1から見て一定の方向を有する。すなわち、機器1上に搭載された3次元磁気センサ60から見た場合、機器1の姿勢を変化させても、内部磁界Biは、一定の方向及び大きさを有する磁界として検知される。例えば、利用者が機器1を手で持って手首を回すと、機器1の姿勢が変化する。このとき、地磁気Bgは磁極北を向いているので、3次元磁気センサ60で検出される地磁気Bgの3軸各々の成分は変化する。一方、3次元磁気センサ60において3次元磁気センサ60と内部磁界を発生する部品との相対的な位置関係は固定であるから、機器1の姿勢を変化させても、内部磁界Biの3軸各々の成分は一定である。
外部磁界Bxは、外部の物体2の発する磁界であり、物体2からの距離及び方向によって、磁界の向き及び大きさが変化する不均一な磁界である。すなわち、機器1上に搭載された3次元磁気センサ60から見た場合、外部磁界Bxは、物体2と3次元磁気センサ60との相互位置関係に依存して、方向及び大きさを変化させる磁界として検知される。
The geomagnetism Bg is a vector having a direction toward the magnetic pole north, and is a magnetic field having a uniform direction and magnitude. Strictly speaking, the direction and size of the geomagnetism Bg varies depending on the region, but has a uniform direction and size, for example, when a large movement such as moving to a different city is not performed.
The internal magnetic field Bi is a magnetic field generated by components of the device 1, and the direction of the internal magnetic field Bi has a certain direction when viewed from the device 1. That is, when viewed from the three-dimensional magnetic sensor 60 mounted on the device 1, the internal magnetic field Bi is detected as a magnetic field having a certain direction and magnitude even if the posture of the device 1 is changed. For example, when the user holds the device 1 with his hand and turns his wrist, the posture of the device 1 changes. At this time, since the geomagnetism Bg faces the north of the magnetic pole, the components of each of the three axes of the geomagnetism Bg detected by the three-dimensional magnetic sensor 60 change. On the other hand, in the three-dimensional magnetic sensor 60, the relative positional relationship between the three-dimensional magnetic sensor 60 and the component that generates the internal magnetic field is fixed. The components of are constant.
The external magnetic field Bx is a magnetic field generated by the external object 2 and is a non-uniform magnetic field in which the direction and magnitude of the magnetic field change depending on the distance and direction from the object 2. That is, when viewed from the three-dimensional magnetic sensor 60 mounted on the device 1, the external magnetic field Bx is a magnetic field that changes its direction and magnitude depending on the mutual positional relationship between the object 2 and the three-dimensional magnetic sensor 60. Detected as

説明の便宜上、図1に示すような地上座標系Σ及びセンサ座標系Σを導入する。図1に記載された各ベクトルの左上に付された添字Gは、当該ベクトルが地上座標系Σにおいて表現されたベクトルであることを意味する。
地上座標系Σは、地上に固定された座標系であり、地上の任意の一点を原点とし、互いに直交する3つの方向、例えば、東、北、及び鉛直上向きを、それぞれx軸、y軸、及びz軸とする座標系である。ここで、地上座標系Σから見たときの3次元磁気センサ60の位置及び姿勢を、それぞれ、位置Ps、及び姿勢θsと表現することにする。
センサ座標系Σは3次元磁気センサ60に固定された座標系であり、3次元磁気センサ60の有する3つの各々のセンサモジュールの出力する値を、それぞれ、x軸、y軸、z軸上にプロットするように設けられた座標系である。すなわち、3次元磁気センサ60が出力する磁気データは、センサ座標系Σのベクトルデータとして表現される。
なお、地上座標系Σから見た場合、センサ座標系Σの原点は位置Psであり、姿勢は姿勢θsである。
For convenience of explanation, a ground coordinate system Σ G and a sensor coordinate system Σ S as shown in FIG. 1 are introduced. Subscript G attached to the upper left of each vector described in Figure 1 means that the vector is a vector expressed in ground coordinate system sigma G.
The ground coordinate system Σ G is a coordinate system fixed on the ground. The origin is an arbitrary point on the ground, and three directions orthogonal to each other, for example, east, north, and vertical upward are respectively represented by the x axis and the y axis. , And the z-axis coordinate system. Here, the position and orientation of the three-dimensional magnetic sensor 60 as viewed from the ground coordinate system sigma G, respectively, to be expressed with the position Ps, and orientation [theta] s.
Sensor coordinate system sigma S is a coordinate system fixed to the 3D magnetic sensor 60, the output values of each of the three sensor modules having the three-dimensional magnetic sensor 60, respectively, x-axis, y-axis, the z-axis Is a coordinate system provided for plotting. That is, the magnetic data output from the 3D magnetic sensor 60 is expressed as vector data of the sensor coordinate system sigma S.
Incidentally, when viewed from the ground coordinate system sigma G, the origin of the sensor coordinate system sigma S is the position Ps, the attitude is attitude [theta] s.

図2は、地磁気Bg及び内部磁界Biが、3次元磁気センサ60によってどのような値として検知されるかについて示す図である。すなわち、図2は、3次元磁気センサ60の地上座標系Σから見た姿勢θsをθ〜θと変化させつつ磁界を測定した場合に、3次元磁気センサ60が出力するN個の磁気データq〜qを、センサ座標系Σにおいてプロットした図である(Nは5以上の自然数)。なお、図2では、地磁気Bg及び内部磁界Biのみが存在し、外部磁界Bxは存在しない場合を想定している。また、図2に記載された各ベクトルの左上に付された添字Sは、当該ベクトルがセンサ座標系Σにおいて表されたベクトルであることを意味する。
内部磁界Biは、センサ座標系Σにおいて、3次元磁気センサ60の位置Ps及び姿勢θsに依存しない、一定の方向及び大きさを持つベクトルBi(センサ座標系Σの原点から中心点x0Gへと向かうベクトル)として表現される。
一方、地磁気Bgは、センサ座標系Σにおいて、大きさは一定であるが、向きは3次元磁気センサ60の姿勢θsに伴い変化する。つまり、地磁気Bgは、センサ座標系Σにおいて、3次元磁気センサ60の姿勢θsに依存した向きを有する、一定の大きさのベクトルBg(θs)として表現され、θsを変化させた場合には、中心点x0Gを中心とする球面上に位置することになる。
従って、3次元磁気センサ60が出力する磁気データq〜qは、センサ座標系Σにおいて、中心点x0Gを中心点とし、地磁気Bgの大きさを半径とする、球面S上に分布することになる。仮に、内部磁界Biの大きさが0の場合には、中心点x0Gと、センサ座標系Σの原点とは一致することになる。
なお、3次元磁気センサ60は、測定誤差を有するため、磁気データq〜qは、厳密には、球面Sの近傍に確率的に分布する。
FIG. 2 is a diagram showing what values the geomagnetism Bg and the internal magnetic field Bi are detected by the three-dimensional magnetic sensor 60. That is, FIG. 2, the three-dimensional magnetic sensor 60 when the posture θs as viewed from the ground coordinate system sigma G was measured magnetic field while changing the theta 1 through? N, N pieces of output from the three-dimensional magnetic sensor 60 magnetic data q 1 to q N, is a plot in the sensor coordinate system sigma S (N is 5 or more natural number). In FIG. 2, it is assumed that only the geomagnetism Bg and the internal magnetic field Bi exist, and the external magnetic field Bx does not exist. Also, subscript S attached to the upper left of each vector described in Figure 2, it means that the vector is a vector expressed in the sensor coordinate system sigma S.
Internal magnetic field Bi is in the sensor coordinate system sigma S, 3-dimensional position-independent Ps and orientation θs of magnetic sensors 60, vector S Bi (center point x from the origin of the sensor coordinate system sigma S having a certain direction and magnitude ( Vector toward 0G ).
On the other hand, geomagnetism Bg resides in a sensor coordinate system sigma S, is a size of a predetermined orientation varies with the posture θs of the three-dimensional magnetic sensor 60. That is, the geomagnetic Bg resides in a sensor coordinate system sigma S, having an orientation that depends on the orientation [theta] s of the 3D magnetic sensor 60 is represented as a constant magnitude of the vector S Bg ([theta] s), in the case of changing the [theta] s Is located on a spherical surface centered at the center point x0G .
Accordingly, the magnetic data q 1 to q N output from the 3D magnetic sensor 60 in the sensor coordinate system sigma S, the center point of the center point x 0G, the magnitude of the geomagnetism Bg radius, on a spherical surface S G Will be distributed. If, when the size of the internal magnetic field Bi is 0, the center point x 0G, will coincide with the origin of the sensor coordinate system sigma S.
The three-dimensional magnetic sensor 60, since it has a measurement error, the magnetic data q 1 to q N is strictly to stochastically distributed in the vicinity of the sphere S G.

このような磁気データq〜qから、球面Sの中心点x0Gの座標を計算することで、内部磁界を表すベクトルBiを求めることができ、3次元磁気センサ60の出力値である磁気データq〜qから内部磁界Biを引き算することにより、地磁気Bgを計算することが可能となる。すなわち、3次元磁気センサ60で検出される磁気が地磁気Bg及び内部磁界Biである場合、球面Sの中心点x0Gは、3次元磁気センサ60のオフセットcに対応する。 By calculating the coordinates of the center point x0G of the spherical surface S G from such magnetic data q 1 to q N , the vector S Bi representing the internal magnetic field can be obtained, and the output value of the three-dimensional magnetic sensor 60 can be obtained. By subtracting the internal magnetic field S Bi from certain magnetic data q 1 to q N , it is possible to calculate the geomagnetism S Bg. That is, if the magnetic detected by 3-dimensional magnetic sensor 60 is a geomagnetic Bg and internal magnetic field Bi, the center point x 0G spherical S G corresponds to the offset c of the three-dimensional magnetic sensor 60.

図3は、外部磁界Bxが存在する場合に、3次元磁気センサ60の位置PsをP〜Pと変化させると共に、姿勢θsをθ〜θと変化させて磁界を測定したときの、3次元磁気センサ60が出力する磁気データq〜qを、センサ座標系Σにおいてプロットした図である。
外部磁界Bxは不均一な磁界であり、地上座標系Σにおける位置に応じて、向き及び大きさが変化する。従って、3次元磁気センサ60の位置Psを変化させた場合には、3次元磁気センサ60が検知する外部磁界Bxの向き及び大きさも変化する。このような外部磁界Bxは、センサ座標系Σにおいて、3次元磁気センサ60の姿勢θs及び位置Psに依存して方向及び大きさの両方を変化させるベクトルBx(θs、Ps)として表現される。
そして、3次元磁気センサ60の姿勢θs及び位置Psを変化させつつ測定した磁気データq〜qは、内部磁界Bi、地磁気Bg(θs)、及び外部磁界Bx(θs、Ps)のそれぞれのベクトルの和として出力される。従って、磁気データq〜qは、センサ座標系Σにおいて、中心点x0Gを中心とする球面Sと、球面とは異なる歪んだ形状を有する曲面SXとを重ね合わせた立体SDの表面近傍に分布することになる。ここで、曲面SXは、センサ空間Σにおいて外部磁界Bx(θs、Ps)を表す曲面であり、3次元磁気センサ60が出力する磁気データq〜qのうち、内部磁界Biと、外部磁界Bx(θs、Ps)との和を表す。
3, when the external magnetic field Bx is present, the position Ps of the 3D magnetic sensor 60 with varying the P 1 to P N, the posture θs by changing the theta 1 through? N when measuring a magnetic field a diagram of the magnetic data q 1 to q N, plotted in the sensor coordinate system sigma S output by the three-dimensional magnetic sensor 60.
External magnetic field Bx is a heterogeneous magnetic field, according to the position in the ground coordinate system sigma G, direction and magnitude changes. Therefore, when the position Ps of the three-dimensional magnetic sensor 60 is changed, the direction and magnitude of the external magnetic field Bx detected by the three-dimensional magnetic sensor 60 also changes. Such external magnetic fields Bx, in the sensor coordinate system sigma S, is represented as a three-dimensional magnetic sensor 60 and orientation [theta] s and direction depending on the position Ps and size vector S Bx varying both the ([theta] s, Ps) The
The magnetic data q 1 to q N measured while changing the posture θs and the position Ps of the three-dimensional magnetic sensor 60 are the internal magnetic field S Bi, the geomagnetism S Bg (θs), and the external magnetic field S Bx (θs, Ps). Is output as the sum of the vectors. Accordingly, the magnetic data q 1 to q N, in the sensor coordinate system sigma S, a spherical S G centered on the center point x 0G, stereoscopic SD superimposed with a curved surface SX having different distorted shape than spherical It will be distributed near the surface. Here, the curved surface SX is a curved surface representing the external magnetic field S Bx (θs, Ps) in the sensor space Σ S , and the internal magnetic field S Bi among the magnetic data q 1 to q N output from the three-dimensional magnetic sensor 60. Represents the sum of the external magnetic field S Bx (θs, Ps).

立体SDは、球面とは異なる形状を有するため、このような立体SDの表面近傍に分布する磁気データq〜qから、内部磁界Biの値を示す中心点x0Gのベクトルを求めることは困難である。
但し、外部磁界Bxが微弱である場合には、立体SDは球面に近い形状となる。
図4(A)は、外部磁界Bxが微弱である場合に、3次元磁気センサ60が出力する磁気データq〜qを、センサ座標系Σにおいてプロットした図である。外部磁界Bxが微弱である場合、3次元磁気センサ60が出力する磁気データq〜qは、地磁気を表すベクトルBg(θs)の描く中心点x0Gを中心とする球面Sと、外部磁界を表すベクトルBx(θs、Ps)の描く曲面SXとの重ね合わせである、球面に近い形状の立体SDの表面近傍に分布することになる。この場合、磁気データq〜qから、中心点x0Gとほぼ一致するベクトルを求めることが可能である。
Since the solid SD has a shape different from the spherical surface, a vector of the center point x0G indicating the value of the internal magnetic field S Bi is obtained from the magnetic data q 1 to q N distributed near the surface of the solid SD. It is difficult.
However, when the external magnetic field Bx is weak, the solid SD has a shape close to a spherical surface.
FIG. 4 (A), when the external magnetic field Bx is weak, a diagram of the magnetic data q 1 to q N, plotted in the sensor coordinate system sigma S output by the three-dimensional magnetic sensor 60. When the external magnetic field Bx is weak, the magnetic data q 1 to q N output from the three-dimensional magnetic sensor 60 includes a spherical surface S G centered at a center point x 0G drawn by a vector S Bg (θs) representing geomagnetism, It is distributed in the vicinity of the surface of the solid SD having a shape close to a spherical surface, which is a superposition with the curved surface SX drawn by the vector S Bx (θs, Ps) representing the external magnetic field. In this case, a vector that substantially matches the center point x 0G can be obtained from the magnetic data q 1 to q N.

なお、不均一な外部磁界Bxは、3次元磁気センサ60によって、均一な磁界として検出される場合がある。例えば、不均一な外部磁界Bxが存在する場合であっても、N個の磁気データq〜qを取得する際に、利用者が機器1を手で握って回転させるのではなく、機器1の位置(厳密には、3次元磁気センサ60の位置)を固定したままその姿勢のみを変化させる場合には、外部磁界Bxは、センサ空間Σにおいて、3次元磁気センサ60の姿勢θsに基づいて、その方向のみを変化させる一定の大きさのベクトルBx(θs)として表現される。この場合、3次元磁気センサ60から出力されるN個の磁気データq〜qは、図4(B)に示すように、センサ空間Σにおいて、ほぼ球面の形状を有する立体SDの表面近傍に分布する。そして、立体SDの形状がほぼ球面となる場合、その中心点は、球面Sの中心点x0G(すなわち、内部磁界Biを表す座標)とほぼ等しくなる。この場合、磁気データq〜qから、中心点x0Gとほぼ一致するベクトルを求めることが可能である。 The non-uniform external magnetic field Bx may be detected as a uniform magnetic field by the three-dimensional magnetic sensor 60. For example, even when there is a non-uniform external magnetic field Bx, when acquiring N pieces of magnetic data q 1 to q N , the user does not hold the device 1 with his hand and rotate it. 1 position (strictly speaking, the position of the three-dimensional magnetic sensor 60) in case of changing only the posture while fixing the can, the external magnetic field Bx is the sensor space sigma S, in the three-dimensional magnetic sensor 60 position θs Based on this, it is expressed as a vector S Bx (θs) having a constant magnitude that changes only its direction. In this case, N pieces of the magnetic data q 1 to q N output from a 3D magnetic sensor 60, as shown in FIG. 4 (B), in the sensor space sigma S, the surface of the three-dimensional SD having a substantially spherical shape Distributed in the vicinity. Then, if the shape of the three-dimensional SD is substantially spherical, the center point, the center point x 0G spherical S G (i.e., coordinates representing the internal magnetic field S Bi) substantially equal to the. In this case, a vector that substantially matches the center point x 0G can be obtained from the magnetic data q 1 to q N.

そこで、本実施形態では、磁気データq〜qに基づいて、外部磁界Bxの及ぼす影響の大きさ、すなわち、立体SDがどの程度球面に近い形状を有するものであるかについて評価し、評価結果に基づいて、当該球面の中心点をオフセットcとして採用するか否かを判定する。以下、具体的な方法について説明する。 Therefore, in the present embodiment, based on the magnetic data q 1 to q N , the magnitude of the influence of the external magnetic field Bx, that is, how close the solid SD has a spherical shape is evaluated. Based on the result, it is determined whether or not the center point of the spherical surface is adopted as the offset c. Hereinafter, a specific method will be described.

[2. 機器構成及びソフトウェア構成]
図5は、本発明の実施形態に係る機器1の構成を示すブロック図である。
機器1は、各種の構成要素とバスを介して接続され装置全体を制御するCPU10、CPU10の作業領域として機能するRAM20、各種のプログラムやデータを記憶したROM30、通信を実行する通信部40、画像を表示する表示部50、地磁気を検出して地磁気データを出力する3次元磁気センサ60、を備える。
3次元磁気センサ60は、X軸地磁気センサ61、Y軸地磁気センサ62、及びZ軸地磁気センサ63を備える。各センサは、MI素子(磁気インピーダンス素子)、MR素子(磁気抵抗効果素子)などを用いて構成することができる。地磁気センサI/F64は、各センサから出力信号をAD変換して磁気データを出力する。この磁気データは、X軸地磁気センサ61、Y軸地磁気センサ62、及びZ軸地磁気センサ63からの出力を、センサ座標系Σにおけるベクトルデータとして、センサ座標系Σの、x軸、y軸およびz軸の3成分によって示される。
CPU10は、ROM30に格納されている磁気データ処理プログラム70を実行することによって、3次元磁気センサ60の出力からオフセットを導出するとともに、正確な地磁気の向き及び大きさの出力を行う。
表示部50は、磁気データ処理プログラム70により出力された地磁気の向きを示す方位情報を、矢印等によって表示する。なお、磁気データ処理プログラム70は、地図アプリケーション等との連携を想定し、地磁気の向きを示す方位情報である矢印等を地図上に表示しても良い。
CPU10、RAM20、3次元磁気センサ60、及び磁気データ処理プログラム70は、3次元磁気センサ60が検出する磁気データに基づき、正確な地磁気の向き及び大きさを示す地磁気データを算出する、地磁気測定装置として機能する。この地磁気データは、地上座標系Σにおいて磁極北に向かう方向を持つベクトルを、センサ座標系Σから見たベクトルデータとして、x軸、y軸およびz軸の3成分によって示される。
[2. Device configuration and software configuration]
FIG. 5 is a block diagram showing a configuration of the device 1 according to the embodiment of the present invention.
The device 1 includes a CPU 10 that is connected to various components via a bus and controls the entire apparatus, a RAM 20 that functions as a work area of the CPU 10, a ROM 30 that stores various programs and data, a communication unit 40 that performs communication, an image And a three-dimensional magnetic sensor 60 for detecting geomagnetism and outputting geomagnetic data.
The three-dimensional magnetic sensor 60 includes an X-axis geomagnetic sensor 61, a Y-axis geomagnetic sensor 62, and a Z-axis geomagnetic sensor 63. Each sensor can be configured using an MI element (magnetoimpedance element), an MR element (magnetoresistance effect element), or the like. The geomagnetic sensor I / F 64 AD-converts the output signal from each sensor and outputs magnetic data. The magnetic data is output from the X-axis geomagnetic sensor 61, Y-axis geomagnetic sensor 62 and the Z-axis geomagnetic sensor 63, as vector data in the sensor coordinate system sigma S, of the sensor coordinate system sigma S, x-axis, y-axis And indicated by the three components of the z-axis.
The CPU 10 executes the magnetic data processing program 70 stored in the ROM 30 to derive an offset from the output of the three-dimensional magnetic sensor 60 and to output an accurate geomagnetism direction and magnitude.
The display unit 50 displays azimuth information indicating the direction of geomagnetism output by the magnetic data processing program 70 by using an arrow or the like. Note that the magnetic data processing program 70 may display an arrow or the like, which is azimuth information indicating the direction of geomagnetism, on a map, assuming cooperation with a map application or the like.
The CPU 10, RAM 20, three-dimensional magnetic sensor 60, and magnetic data processing program 70 calculate a geomagnetic data indicating an accurate geomagnetic direction and magnitude based on the magnetic data detected by the three-dimensional magnetic sensor 60. Function as. The geomagnetic data, a vector having a direction toward the magnetic pole N in ground coordinate system sigma G, as vector data as viewed from the sensor coordinate system sigma S, x-axis, indicated by the three components of the y-axis and z-axis.

磁気データ処理プログラム70は、バッファ管理モジュール71、オフセット導出モジュール72、及び方位導出モジュール73等のモジュール群で構成される。
バッファ管理モジュール71は、3次元磁気センサ60から順次出力される磁気データをバッファに蓄積する。これら複数の磁気データの蓄積手段としては、RAM20を用いる。
オフセット導出モジュール72は、バッファ管理モジュール71に蓄積されている複数の磁気データを用いて、オフセットを導出し、導出したオフセットを保持する。オフセットの保持手段としては、RAM20を用いる。
方位導出モジュール73は、3次元磁気センサから順次出力される磁気データを、オフセット導出モジュール72によって保持されるオフセットにより補正して、正確な方位情報を生成する。なお、方位導出モジュール73は、適当な周期でバッファ管理モジュール71及びオフセット導出モジュール72を呼び出し、オフセット更新の指示を与える。
The magnetic data processing program 70 is composed of a module group such as a buffer management module 71, an offset derivation module 72, and an orientation derivation module 73.
The buffer management module 71 stores magnetic data sequentially output from the three-dimensional magnetic sensor 60 in a buffer. The RAM 20 is used as a means for storing the plurality of magnetic data.
The offset deriving module 72 derives an offset using a plurality of magnetic data stored in the buffer management module 71, and holds the derived offset. The RAM 20 is used as the offset holding means.
The azimuth derivation module 73 corrects the magnetic data sequentially output from the three-dimensional magnetic sensor with the offset held by the offset derivation module 72 to generate accurate azimuth information. The azimuth derivation module 73 calls the buffer management module 71 and the offset derivation module 72 at an appropriate period, and gives an offset update instruction.

[3. 処理の流れ]
図6は、オフセット導出処理の流れを示すフローチャートである。このフローチャートは、方位導出モジュール73が、バッファ管理モジュール71及びオフセット導出モジュール72を呼び出しオフセット更新の指示を与えた場合に実行される。
方位導出モジュール73は、周期的にオフセット更新を指示する。これは、外部磁界や内部磁界が変化する場合があるからである。内部磁界は、機器1の内部状態が変化した場合、例えば、機器1に搭載された部品を流れる電流の大きさが変化した場合や、機器1に搭載された部品の着磁状況等の変化に伴い変化する。外部磁界は、不均一な磁界であるから、機器1が移動すれば、変化する。従って、オフセット更新を周期的に実行することによって、正確な地磁気を測定することが可能となる。
[3. Process flow]
FIG. 6 is a flowchart showing the flow of the offset derivation process. This flowchart is executed when the direction deriving module 73 calls the buffer management module 71 and the offset deriving module 72 and gives an instruction to update the offset.
The direction deriving module 73 periodically instructs offset updating. This is because the external magnetic field and the internal magnetic field may change. The internal magnetic field is generated when the internal state of the device 1 is changed, for example, when the magnitude of the current flowing through the component mounted on the device 1 is changed, or when the magnetization state of the component mounted on the device 1 is changed. It changes with it. Since the external magnetic field is a non-uniform magnetic field, it changes as the device 1 moves. Therefore, accurate geomagnetism can be measured by periodically performing the offset update.

ステップS100では、初期化処理及び磁気データ取得処理を行う。初期化処理では、バッファ管理モジュール71が呼び出され、RAM20に記憶した磁気データが廃棄される。なお、本実施形態では、磁気データの全部を廃棄するが、RAM20に蓄積されたデータのうち古い方から一定割合のデータのみを廃棄しても良い。そして、磁気データ取得処理において、3次元磁気センサ60から出力されるN個の磁気データq〜qを、RAM20に格納する(Nは精度よくオフセットを導出するために必要な磁気データの規定測定回数を表す5以上の自然数)。
ステップS101では、磁気データ分布判定処理を行う。磁気データ分布判定処理は、ステップS100でRAM20等に蓄積されたN個の磁気データq〜qが、後続するステップS102で実施される中心点算出処理において使用するデータとして適切なものであるか、すなわち、中心点算出のために適切な分布を有するものであるかを判定する。そして、判定結果が適切である場合にはステップS102に進み、適切でない場合には終了する。
In step S100, initialization processing and magnetic data acquisition processing are performed. In the initialization process, the buffer management module 71 is called and the magnetic data stored in the RAM 20 is discarded. In the present embodiment, all of the magnetic data is discarded, but only a certain percentage of the data stored in the RAM 20 from the oldest may be discarded. Then, the magnetic data acquisition process, the N number of the magnetic data q 1 to q N output from a 3D magnetic sensor 60 is stored in the RAM 20 (N is the provision of magnetic data required to derive accurately offset A natural number of 5 or more representing the number of measurements).
In step S101, magnetic data distribution determination processing is performed. Magnetic data distribution determination process, N pieces of the magnetic data q 1 to q N stored in the RAM20 and the like in step S100, is appropriate as data to be used in the center point calculation process performed in a subsequent step S102 That is, it is determined whether the distribution has an appropriate distribution for calculating the center point. If the determination result is appropriate, the process proceeds to step S102, and if it is not appropriate, the process ends.

ステップS102では、中心点算出処理を行う。中心点算出処理は、N個の磁気データq〜qがある球面(中心点算出用球面)Sの近傍に確率的に分布すると仮定して、当該球面Sの中心点xをオフセットの候補として算出する。
ステップS103では、歪判定処理を行う。歪判定処理は、N個の磁気データq〜qに基づいて、N個のデータの分布の形状が、前述した図2及び図4のような、ある点を中心とする球面の近傍に分布するものであるかについて判定する。具体的には、歪判定処理は、N個の磁気データq〜qが、中心点算出処理において算出した中心点xを中心とする球面Sの近傍に分布するものであるかについて判定する。そして、磁気データq〜qが中心点xを中心とする球面Sの近傍に分布するものであると判断した場合、すなわち、磁気データq〜qが図2及び図4に示すような球面に近い形状の立体の表面近傍に分布すると判断した場合には、中心点xをオフセットcとして採用する。一方、磁気データq〜qが図3に示すような球面以外の歪のある形状の立体の表面近傍に分布すると判断した場合には、中心点xをオフセットcとして採用せず、終了する。
In step S102, a center point calculation process is performed. The center point calculation process assumes that the N magnetic data q 1 to q N are probabilistically distributed in the vicinity of a spherical surface (center point calculating spherical surface) S, and the center point x 0 of the spherical surface S is offset. Calculate as a candidate.
In step S103, distortion determination processing is performed. In the distortion determination process, based on the N pieces of magnetic data q 1 to q N , the distribution shape of the N pieces of data is in the vicinity of a spherical surface centered on a certain point as shown in FIGS. Judge whether it is distributed. Specifically, the distortion determination process determines whether the N pieces of magnetic data q 1 to q N are distributed in the vicinity of the spherical surface S centered on the center point x 0 calculated in the center point calculation process. To do. If it is determined that those distributed in the vicinity of the spherical surface S of the magnetic data q 1 to q N is centered at the center point x 0, i.e., magnetic data q 1 to q N are shown in FIGS. 2 and 4 to employ a center point x 0 as an offset c when it is determined that distributed in the vicinity of the surface of the near shape of the solid in such sphere as. On the other hand, when it is determined that the magnetic data q 1 to q N are distributed in the vicinity of the surface of a solid having a shape other than the spherical surface as shown in FIG. 3, the center point x 0 is not adopted as the offset c, and the process ends. To do.

なお、本実施形態では、ステップS101またはS103において、適切でないと判断された場合、処理を終了するが、本発明はこれに限定されるものではない。
例えば、ステップS101またはS103において、適切でないと判定された場合、処理をステップS100に戻しても良いし、何らかのメッセージを表示部50に出力した上で処理を一旦停止させ、ユーザからの指示を待ってステップS100から処理を再開させても良い。
N個の磁気データq〜qを取得する際に、利用者が機器1を手で握って回転させるのではなく、機器1の位置を固定したままその姿勢のみを変化させるようにすると、外部磁界Bxの影響を低く抑えることができる(図4(B)参照)。そのため、ステップS103において適切でないと判定された場合には、機器1の位置を固定したまま回転させることを、利用者に対して指示しても良い。利用者に対する指示は、機器1の表示部50に画像や動画等を表示したり、音声等を用いたりすることで、行っても良い。
In the present embodiment, if it is determined in step S101 or S103 that it is not appropriate, the process is terminated, but the present invention is not limited to this.
For example, if it is determined in step S101 or S103 that it is not appropriate, the process may be returned to step S100, or after a message is output to the display unit 50, the process is temporarily stopped and an instruction from the user is waited for. The processing may be resumed from step S100.
When acquiring N pieces of magnetic data q 1 to q N , if the user does not hold and rotate the device 1 with his hand, but only change the posture of the device 1 while fixing the position, The influence of the external magnetic field Bx can be kept low (see FIG. 4B). Therefore, when it is determined in step S103 that it is not appropriate, the user may be instructed to rotate the device 1 while the position of the device 1 is fixed. The user may be instructed by displaying an image, a moving image, or the like on the display unit 50 of the device 1 or using a voice or the like.

以下において、これら、ステップS101〜S103において行う、磁気データ分布判定処理、中心点算出処理、及び歪判定処理の詳細について説明する。
なお、説明の便宜上、まずステップS102の中心点算出処理について説明し、次に、ステップS101の磁気データ分布判定処理について説明する。
Details of the magnetic data distribution determination process, the center point calculation process, and the distortion determination process performed in steps S101 to S103 will be described below.
For convenience of explanation, the center point calculation process in step S102 will be described first, and then the magnetic data distribution determination process in step S101 will be described.

[3.1. 中心点算出処理]
図7を参照しながら、ステップS102の中心点算出処理について説明する。
中心点算出処理では、3次元磁気センサ60が出力する磁気データq〜qが、地磁気Bg及び内部磁界Biのみを検知し、不均一な外部磁界Bxの影響は受けないか、極めて小さいと仮定して処理を行う。具体的には、中心点算出処理は、センサ座標系Σにおいて、複数の磁気データq〜qが、半径rの球面Sの近傍に確率的に分布すると仮定して、球面Sの中心点xを算出する処理である。
なお、不均一な外部磁界Bxの影響を受けていない場合、または外部磁界Bxの影響が小さい場合には、半径rは地磁気Bgの大きさを表し、球面S及びその中心点xは、地磁気Bgを表す球面S及びその中心点x0Gと等しくなる。
また、不均一な外部磁界Bxが存在する場合であっても、機器1の位置(厳密には、3次元磁気センサ60の位置)を固定して姿勢のみを変化させつつ複数の磁気データq〜qを測定した場合には、半径rは地磁気Bgを表すベクトルと外部磁界Bxを表すベクトルとを足し算したベクトルの大きさを表し、球面Sの中心点xは、地磁気Bgを表す球面Sの中心点x0Gとほぼ等しくなる。
以下では、特に断りの無い限り、ベクトルや座標等は、センサ空間Σにおいて表現されたものであるとする。
[3.1. Center point calculation process]
The center point calculation process in step S102 will be described with reference to FIG.
In the center point calculation process, if the magnetic data q 1 to q N output from the three-dimensional magnetic sensor 60 detect only the geomagnetism Bg and the internal magnetic field Bi and are not affected by the non-uniform external magnetic field Bx or extremely small. The process is assumed. Specifically, the center point calculation process assumes that a plurality of magnetic data q 1 to q N are probabilistically distributed in the vicinity of the spherical surface S with the radius r in the sensor coordinate system Σ S. a process of calculating the point x 0.
Note, if you are not affected by the non-uniform external magnetic fields Bx, or when the influence of an external magnetic field Bx is small, the radius r denotes the magnitude of the geomagnetism Bg, sphere S and the center point x 0 is geomagnetism equal to the spherical S G and the center point x 0G represents a bg.
Even if there is a non-uniform external magnetic field Bx, a plurality of pieces of magnetic data q 1 are obtained while changing only the posture while fixing the position of the device 1 (strictly, the position of the three-dimensional magnetic sensor 60). when measured to q N, the radius r denotes the magnitude of the vector obtained by addition of a vector representing the vector with the external magnetic field Bx representing the geomagnetism Bg, the center point x 0 of the sphere S, the sphere representing the geomagnetism Bg It becomes almost equal to the center point x0G of S G.
In the following, unless otherwise specified, are vectors and coordinates and the like, and those expressed in the sensor space sigma S.

複数の磁気データq〜qが、半径rの球面S上に存在すると仮定する場合、各磁気データ と、球面Sの中心点xとの距離はrであるため、以下の式(1)〜(3)が成立する。

Figure 0005641236
When it is assumed that a plurality of magnetic data q 1 to q N are present on the spherical surface S having a radius r, the distance between each magnetic data q i and the center point x 0 of the spherical surface S is r. (1) to (3) are established.
Figure 0005641236

ここで、複数の磁気データq〜qの重心をqとする。重心qは、式(4)で表される。
また、重心qを原点とする重心座標系Σを導入する。この場合、センサ座標系Σにおいて表現された磁気データq及び中心点xと、重心座標系Σにおいて表現された磁気データ及び中心点との間に、以下の式(6)及び式(7)の関係が成立する。

Figure 0005641236
Here, the center of gravity of the plurality of magnetic data q 1 to q N is defined as q c . The center of gravity q c is expressed by Expression (4).
Also, introducing a barycentric coordinate system sigma C to the center of gravity q c origin. In this case, between the magnetic data q i and the center point x 0 expressed in the sensor coordinate system Σ S and the magnetic data C q i and the center point C x 0 expressed in the centroid coordinate system Σ C , the following The relationship of Formula (6) and Formula (7) is materialized.
Figure 0005641236

センサ座標系Σにおける球面Sの方程式(1)は、重心座標系Σにおいて式(8)として表現される。そして、式(8)に対して、式(6)及び(7)を代入することで、式(9)が得られる。

Figure 0005641236
Equation of sphere S in the sensor coordinate system sigma S (1) is expressed as Equation (8) in the centroid coordinates sigma C. Then, Expression (9) is obtained by substituting Expressions (6) and (7) into Expression (8).
Figure 0005641236

式(9)のqに対して、磁気データq〜qの各々を代入した結果を、磁気データの個数Nで割り算することにより、以下の式(10)を得ることができる。そして、式(10)と、式(9)を展開した式(11)との差分を取ることで、変数qに依存しない項を消去し、式(12)を得ることができる。

Figure 0005641236
The following formula (10) can be obtained by dividing the result of substituting each of the magnetic data q 1 to q N for q i in formula (9) by the number N of magnetic data. Then, by taking the difference between the expression (10) and the expression (11) obtained by expanding the expression (9), a term that does not depend on the variable q i can be eliminated and the expression (12) can be obtained.
Figure 0005641236

このように、磁気データである変数qが、球面S上に存在することを示す球面の公式である式(1)は、磁気データq、重心q、及び中心点xから構成される式(12)に変形された。この式(12)の変数qに対して、N個の磁気データq〜qをそれぞれ代入することで得られるN個の方程式は、行列Xを用いて式(13)として表現される。

Figure 0005641236
Thus, equation (1), which is a spherical formula indicating that the variable q i that is magnetic data exists on the spherical surface S, is composed of the magnetic data q i , the center of gravity q c , and the center point x 0. (12). For the variable q i of Equation (12), the N equations obtained by substituting the N magnetic data q 1 to q N respectively, is expressed as equation (13) using the matrix X .
Figure 0005641236

式(13)は、全ての磁気データq〜qの座標が、中心点xを中心とする球面S上に完全に一致する場合には解を有する。しかし、3次元磁気センサ60の測定誤差等を考慮すると、全ての磁気データq〜qの座標が、球面Sと完全に一致する位置に存在することは無いため、式(13)は解を持たない。
そこで、統計的な手法により尤もらしい解を得るために、式(17)で表される誤差を吸収するベクトルδ1を導入する。

Figure 0005641236
Expression (13) has a solution when the coordinates of all the magnetic data q 1 to q N completely coincide on the spherical surface S centered on the center point x 0 . However, in consideration of the measurement error of the three-dimensional magnetic sensor 60, the coordinates of all the magnetic data q 1 to q N do not exist at positions that completely coincide with the spherical surface S. Does not have.
Therefore, in order to obtain a plausible solution by a statistical method, a vector δ1 that absorbs the error represented by Expression (17) is introduced.
Figure 0005641236

このようなベクトルδ1のノルムを最小にするベクトルx、換言すれば、(δ1)(δ1)を最小化するようなベクトルxが、球面Sの中心点xとして尤もらしいものであるといえる。
ここで、以下の式(19)で示される目的関数f(x)を定義すると、目的関数f(x)を最小化するxが、球面Sの中心点xとして尤もらしい値となる。中心点xは、式(21)において示される行列Aが正則である場合には、式(20)により求めることができる。

Figure 0005641236
このように、球面近傍に磁気データq〜qが確率的に分布すると仮定して、複数の磁気データq〜qで示される3軸の座標と球面との誤差を最小化することで算出された球面Sの中心点xが、オフセットcの候補となる。 Vector x for such a norm of a vector .delta.1 minimized, in other words, it can be said that (.delta.1) vector x that minimizes the T (.delta.1) is what plausible as the center point x 0 of the spherical S .
Here, when the objective function f 1 (x) represented by the following equation (19) is defined, x that minimizes the objective function f 1 (x) is a plausible value as the center point x 0 of the spherical surface S. . The center point x 0, if the matrix A shown in Equation (21) is non-singular, it can be obtained by equation (20).
Figure 0005641236
As described above, assuming that the magnetic data q 1 to q N are probabilistically distributed in the vicinity of the spherical surface, the error between the three-axis coordinates indicated by the plurality of magnetic data q 1 to q N and the spherical surface is minimized. The center point x0 of the spherical surface S calculated in ( 1) is a candidate for the offset c.

[3.2. 磁気データ分布判定処理]
次に、ステップS101における、磁気データ分布判定処理について説明する。
前述した、中心点算出処理において中心点xを求める方法は、磁気データq〜qがセンサ座標系Σにおいて十分に3次元的な広がりを有することを前提とする。しかし、3次元磁気センサ60の姿勢θsは、ユーザが手で機器1を動かすことにより変化するものであるため、機器1の動かし方が不適切な場合には、磁気データq〜qがセンサ座標系Σにおいて3次元的な広がりを有さない場合がある。
例えば、図8に示すように、磁気データq〜qがセンサ座標系Σの平面π上に2次元的に分布する場合には、中心点xを算出することはできない。平面π上の円πの近傍に磁気データq〜qが存在する場合、球面Sの中心点xは球面Sπ1の中心点x01であるかもしれないし、球面Sπ2の中心点x02であるかもしれず、中心点xが直線π上のどの位置であるか特定することが出来ないからである。
[3.2. Magnetic data distribution judgment process]
Next, the magnetic data distribution determination process in step S101 will be described.
Aforementioned, the method for determining the center point x 0 at the center point calculation process, the magnetic data q 1 to q N is assumed to have a sufficiently three-dimensionally spread in the sensor coordinate system sigma S. However, since the orientation θs of the three-dimensional magnetic sensor 60 changes when the user moves the device 1 by hand, if the method of moving the device 1 is inappropriate, the magnetic data q 1 to q N are it may not have a three-dimensional expanse in the sensor coordinate system sigma S.
For example, as shown in FIG. 8, when the magnetic data q 1 to q N are distributed two-dimensionally on the plane π of the sensor coordinate system sigma S is unable to calculate the center point x 0. If there is a magnetic data q 1 to q N in the vicinity of the circle [pi C on the plane [pi, the center point x 0 of the sphere S is to may be a center point x 01 spherical S .pi.1, the center point of the spherical surface S .pi.2 This is because it may be x 02 and it is not possible to specify which position on the straight line π L the center point x 0 is.

従って、中心点xを算出するためには、図9に示すように、磁気データq〜qがセンサ座標系Σにおいて、3次元的に広がりを持って分布していることが必要となる。磁気データq〜qがどの程度3次元的に分布しているかについての判定は、式(21)に示される行列Aを用いて行うことができる。
行列Aは、磁気データq〜qの分散共分散行列のN倍に相当する行列である。行列Aの固有値を大きい順番にλ、λ、λとし、それぞれの固有値に対応する大きさ1の固有ベクトルをu、u、uとする。また、磁気データqを、前述した重心qを原点とする重心座標系Σにおいて表したベクトルをと表す。このとき、固有値λ(j=1、2、3)は、固有ベクトルu方向の分散σ に等しい。
図9に示すように、各固有ベクトルu〜uを重心座標系Σの原点qを起点となるように配置する。このとき、例えばj=1の場合について考える。固有値λは、ベクトルを、固有ベクトルuへ射影した長さLi1の二乗(Li1を、N個の磁気データ(i=1、2、…N)について平均した値に等しくなる。つまり、磁気データq〜qが、重心qを原点とした場合に、固有ベクトルuの方向に対してどの程度の広がり有するかについては、対応する固有値λの大きさにより判断できる。
Therefore, in order to calculate the center point x 0, as shown in FIG. 9, it requires that the magnetic data q 1 to q N is in the sensor coordinate system sigma S, are distributed with a three-dimensionally spread It becomes. The determination as to how three-dimensionally the magnetic data q 1 to q N are distributed can be made using the matrix A shown in Expression (21).
The matrix A is a matrix corresponding to N times the variance-covariance matrix of the magnetic data q 1 to q N. The eigenvalues of the matrix A are λ 1 , λ 2 , and λ 3 in descending order, and the eigenvectors of size 1 corresponding to the respective eigenvalues are u 1 , u 2 , and u 3 . In addition, a vector representing the magnetic data q i in the centroid coordinate system Σ C having the centroid q C as an origin is represented as C q i . At this time, the eigenvalue λ j (j = 1, 2, 3) is equal to the variance σ 2 j in the eigenvector u j direction.
As shown in FIG. 9, to place each eigenvector u 1 ~u 3 as the starting point the origin q C of the center of gravity coordinates sigma C. At this time, for example, consider the case of j = 1. The eigenvalue λ 1 is the average of the square (L i1 ) 2 of the length L i1 obtained by projecting the vector C q i onto the eigenvector u 1 with respect to the N pieces of magnetic data C q i (i = 1, 2,... N). Is equal to the value obtained. That is, it can be determined by the magnitude of the corresponding eigenvalue λ j how much the magnetic data q 1 to q N have a spread with respect to the direction of the eigenvector u j when the center of gravity q C is the origin.

最小の固有値λに対応する固有ベクトルuの方向が、最も広がりが小さい方向であるため、磁気データq〜qが3次元的に分布しているといえるためには、最小固有値λの値が、一定の閾値λ以上であればよい。
磁気データ分布判定処理では、式(21)に示される行列Aの最小固有値λを磁気データの分布を評価する評価値とし、その値が閾値λ以上であれば、磁気データq〜qの分布が十分に3次元的であると判断し、ステップS102へと進み、前述した中心点算出処理を行う。一方、最小固有値λが、閾値λ未満である場合には、磁気データq〜qの分布は3次元的な広がりを有さない2次元的な分布であると判断する。この場合は、処理を終了する。
Since the direction of the eigenvector u 3 corresponding to the minimum eigenvalue λ 3 is the direction in which the spread is the smallest, it can be said that the magnetic data q 1 to q N are three-dimensionally distributed, the minimum eigenvalue λ 3 values may be any predetermined threshold value lambda 0 or more.
In the magnetic data distribution determination process, the minimum eigenvalue λ 3 of the matrix A shown in Expression (21) is used as an evaluation value for evaluating the distribution of the magnetic data. If the value is equal to or greater than the threshold λ 0 , the magnetic data q 1 to q It is determined that the distribution of N is sufficiently three-dimensional, the process proceeds to step S102, and the above-described center point calculation process is performed. On the other hand, when the minimum eigenvalue λ 3 is less than the threshold λ 0, it is determined that the distribution of the magnetic data q 1 to q N is a two-dimensional distribution having no three-dimensional spread. In this case, the process ends.

[3.3. 歪判定処理]
次に、ステップS103の歪判定処理について説明する。
図3に示したように、外部磁界Bxが一様ではなく、かつ、外部磁界Bxの影響が大きい場合には、3次元磁気センサ60の出力する磁気データq〜qは、ステップS102で算出された中心点xを中心とする球面Sの近傍には分布せず、球面とは異なる歪んだ形状の立体SDの表面近傍に分布することになる。この場合、ステップS102の中心点算出処理で算出された球面Sの中心点xは、地磁気Bgを表す球面Sの中心点x0Gとは異なる座標となるため、オフセットとしての意味を有さず、球面Sの中心点xをオフセットcとして採用することを避ける必要がある(図10参照)。
[3.3. Distortion judgment processing]
Next, the distortion determination process in step S103 will be described.
As shown in FIG. 3, when the external magnetic field Bx is not uniform and the influence of the external magnetic field Bx is large, the magnetic data q 1 to q N output from the three-dimensional magnetic sensor 60 are obtained in step S102. calculated the center point x 0 in the vicinity of the sphere S having its center is not distributed, it will be distributed in the vicinity of the surface of the three-dimensional SD of different distorted shape than spherical. In this case, the center point x 0 of the spherical S calculated by the center point calculating process in step S102, since the different coordinate with the center point x 0G spherical S G representing the geomagnetism Bg, have a meaning as an offset not, it is necessary to avoid adopting a center point x 0 of sphere S as the offset c (see FIG. 10).

但し、立体SDの形状が、球面の形状に十分に近い場合には、球面Sの中心点xをオフセットcとして採用することができる。例えば、図4(A)に示すように、外部磁界Bxの影響が小さい場合には、センサ座標系Σにおいて、3次元磁気センサ60の出力する磁気データq〜qが、ステップS102で算出された中心点xを中心とする球面Sの近傍に分布することになり、且つ、当該球面S及びその中心点xは、地磁気Bgを表す球面S及びその中心点x0Gとほぼ等しくなる(図11(C)参照)。
また、図4(B)に示すように、機器1の位置(厳密には、3次元磁気センサ60)を固定したままその姿勢のみを変化させて磁気データq〜qを取得する等、外部磁界Bxが3次元磁気センサ60によってほぼ一様な磁界として検出される場合には、磁気データq〜qが、ステップS102で算出された中心点xを中心とする球面Sの近傍に分布することになる。そして、この場合、球面Sは地磁気Bgを表す球面Sとは異なるが、球面Sの中心点xは、球面Sの中心点x0Gとほぼ等しくなる(図11(B)参照)。
歪判定処理は、磁気データq〜qが立体SDの表面近傍に分布すると仮定した場合に、立体SDの形状が球面の形状とどの程度近いものであるかを評価し、立体SDの形状が球面の形状に十分に近いと評価された場合に、球面Sの中心点xをオフセットcとして採用する処理である。
However, the shape of the three-dimensional SD is, if sufficiently close to the shape of the spherical surface may be employed center point x 0 of sphere S as an offset c. For example, as shown in FIG. 4 (A), when the influence of an external magnetic field Bx is small, in the sensor coordinate system sigma S, the magnetic data q 1 to q N for outputting the three-dimensional magnetic sensor 60, at step S102 will be distributed calculated the center point x 0 in the vicinity of the sphere S having its center, and, the spherical surface S and the center point x 0 is approximately a sphere S G and the center point x 0G representing the geomagnetism Bg (See FIG. 11C).
Further, as shown in FIG. 4B, the magnetic data q 1 to q N are acquired by changing only the position of the device 1 (strictly speaking, the three-dimensional magnetic sensor 60) while the position is fixed. near the outside when the magnetic field Bx is detected as substantially uniform magnetic field by the three-dimensional magnetic sensor 60, the magnetic data q 1 to q N is sphere S centered on the center point x 0 calculated in step S102 Will be distributed. In this case, the spherical S is different from the sphere S G representing the geomagnetism Bg, the center point x 0 of the sphere S is substantially equal to the center point x 0G spherical S G (see FIG. 11 (B)).
The strain determination process evaluates how close the shape of the solid SD is to the shape of the spherical surface , assuming that the magnetic data q 1 to q N are distributed near the surface of the solid SD, and the shape of the solid SD There, if evaluated to sufficiently close to the shape of the spherical surface, it is a process of employing the center point x 0 of sphere S as an offset c.

上述した中心点算出処理では、磁気データq〜qが球面Sの近傍に分布するとした場合の磁気データq〜qの座標と球面Sとの誤差を目的関数fを用いて評価した。
これに対して歪判定処理では、まず、磁気データq〜qが、球面とは異なる歪んだ形状の立体SDの表面近傍に分布すると仮定し、式(22)に示す、磁気データq〜qと立体SDとの誤差を表す目的関数f(E、x)を導入する。
この、目的関数f(E、x)は、球面を表す成分「X(x−q)−j」の他に、式(23)に示す曲面を表す成分k(E)を有する。つまり、立体SDは、球面と、曲面を表す成分k(E)との重ね合わせであり、曲面を表す成分k(E)の影響を評価することにより、立体SDの形状が球面の形状とどの程度近いものであるかを評価することができる。
なお、曲面を表す成分k(E)による影響の大きさ(すなわち、立体SDの形状が球面の形状とどの程度近いものであるか)については、後述する式(28)及び(29)で示される評価値f(E)に基づいて評価することができる。そして、評価値f(E)が閾値以下であれば、立体SDの形状は球面Sと看做せる範囲内であり、中心点算出処理で算出した中心点xをオフセットcとして採用する。一方、評価値f(E)が閾値を上回る場合には、中心点xをオフセットcとして採用しない。

Figure 0005641236
In the above-mentioned center point calculation process, using the objective function f 1 of the error between the coordinates and spherical S of the magnetic data q 1 to q N when the magnetic data q 1 to q N is to be distributed in the vicinity of the sphere S Evaluation did.
On the other hand, in the distortion determination process, first, it is assumed that the magnetic data q 1 to q N are distributed near the surface of the three-dimensional SD having a distorted shape different from the spherical surface, and the magnetic data q 1 shown in Expression (22). An objective function f 2 (E, x) representing an error between ˜q N and the solid SD is introduced.
This objective function f 2 (E, x) has a component k (E) representing a curved surface shown in Expression (23) in addition to a component “X (x−q c ) −j” representing a spherical surface. That is, the solid SD is a superposition of the spherical surface and the component k (E) representing the curved surface. By evaluating the influence of the component k (E) representing the curved surface, the shape of the solid SD can be compared with the spherical shape. It can be evaluated whether it is close to the extent.
Note that the magnitude of the influence of the component k (E) representing the curved surface (that is, how close the shape of the solid SD is to the shape of the spherical surface ) is shown by equations (28) and (29) described later. The evaluation value f 3 (E) can be evaluated. If the evaluation value f 3 (E) is equal to or less than the threshold value, the shape of the solid SD is within the range that can be regarded as the spherical surface S, and the center point x 0 calculated by the center point calculation process is adopted as the offset c. On the other hand, when the evaluation value f 3 (E) exceeds the threshold value, the center point x 0 is not adopted as the offset c.
Figure 0005641236

式(23)に示した通り、曲面を表す成分k(E)はn次元のベクトルである。曲面を表す成分k(E)の第i行目の要素ke(q−x)は、以下の式(25)で表される関数ke(p)に対して、中心点xを原点とする座標系から見た磁気データqを表すベクトル(q−x)を代入することにより与えられる値である。関数ke(p)は、式(24)に示す評価行列Eを係数行列とし、式(26)に示される3変数p=(p、p、p)の二次形式で表される関数である。なお、評価行列Eは、式(24)に示したように、対称行列である。

Figure 0005641236
As shown in Expression (23), the component k (E) representing the curved surface is an n-dimensional vector. The element ke (q i −x 0 ) of the i-th row of the component k (E) representing the curved surface has the center point x 0 as the origin with respect to the function ke (p) represented by the following equation (25). Is a value given by substituting a vector (q i −x 0 ) representing magnetic data q i viewed from the coordinate system. The function ke (p) is expressed in a quadratic form of three variables p = (p x , p y , p z ) shown in the equation (26), with the evaluation matrix E shown in the equation (24) as a coefficient matrix. It is a function. The evaluation matrix E is a symmetric matrix as shown in the equation (24).
Figure 0005641236

前述した式(17)乃至式(19)では、磁気データq〜qの座標と、球面Sとの誤差を、ベクトルδ1によって吸収しようとした。ベクトルδ1を構成する1行目〜N行目の各要素は、それぞれ独立した変数である。従って、ベクトルδ1によって誤差を吸収する場合には、各磁気データq〜qと、球面Sとの誤差の各々は、互いに制約の無い独立した値となる。つまり、ベクトルδ1によって表されるN個の誤差は、それぞれが独立に確率的に定められるものであることを前提として表現されたものであり、N個の誤差は全体として、対称性を有し、かつ方向依存性の無いホワイトノイズであった。
従って、式(17)及び式(19)においては、磁気データq〜qの座標と、球面Sとの誤差を、対称性を持ち方向依存性の無いホワイトノイズとみなし、そのホワイトノイズである誤差を最小化するような解を求めるものであった。
In the equations (17) to (19) described above, the error between the coordinates of the magnetic data q 1 to q N and the spherical surface S is to be absorbed by the vector δ1. Each element of the first to Nth rows constituting the vector δ1 is an independent variable. Accordingly, when the error is absorbed by the vector δ1, each of the errors between the magnetic data q 1 to q N and the spherical surface S becomes an independent value without any restriction. That is, the N errors represented by the vector δ1 are expressed on the assumption that each of them is independently determined probabilistically, and the N errors have symmetry as a whole. The white noise has no direction dependency.
Therefore, in the equations (17) and (19), the error between the coordinates of the magnetic data q 1 to q N and the spherical surface S is regarded as white noise that has symmetry and does not depend on the direction. The solution was to minimize some error.

一方、式(22)が示す目的関数f(E、x)は、磁気データq〜qの座標と、球面との誤差を、式(25)で示した二次形式で表される関数ke(p)を各成分とするベクトルである曲面を表す成分k(E)によって吸収しようとするものである。3変数の二次形式は、変数が2次の項から構成される関数であり、このような関数により、3次元空間上の様々な曲面、例えば、直線、平面、柱面、球面、楕円面、錐面、1葉双曲面、2葉双曲面、及び各種放物面等を描くことができる。すなわち、式(22)は、磁気データq〜qの座標と、球面との誤差を、二次形式によって表される3次元空間上の曲面により吸収するものである。
従って、各磁気データq〜qと、球面との誤差の各々は、互いに独立したものではなく、各磁気データq〜qに対応するN個の誤差の全てが同一の関数ke(p)により表される曲面上に存在するという制約を持った値として表現される。
目的関数f(E、x)により、各磁気データq〜qに対応するN個の誤差が、それぞれ独立に確率的に定められるホワイトノイズの場合とは別に、滑らかな曲面を表す成分k(E)による球面からの歪という性質を有する誤差についても表現することが可能となった。すなわち、目的関数f(E、x)を導入することで、各磁気データq〜q球面との誤差を、ホワイトノイズに起因する誤差と、曲面を表す成分k(E)による歪に起因する誤差とに分離することが可能となった。
On the other hand, the objective function f 2 (E, x) represented by the equation (22) represents an error between the coordinates of the magnetic data q 1 to q N and the spherical surface in the secondary form represented by the equation (25). It is intended to be absorbed by the component k (E) representing the curved surface, which is a vector having the function ke (p) as each component. The quadratic form of the three variables is a function in which the variable is composed of quadratic terms. By such a function, various curved surfaces in a three-dimensional space, for example, straight lines, planes, columnar surfaces, spherical surfaces, elliptical surfaces A conical surface, a 1-leaf hyperboloid, a 2-leaf hyperboloid, various parabolas, and the like can be drawn. That is, Expression (22) absorbs an error between the coordinates of the magnetic data q 1 to q N and the spherical surface by a curved surface in a three-dimensional space represented by a quadratic form.
Thus, each magnetic data q 1 to q N, each of the error between the sphere is mutually independent and not, each magnetic data q 1 to q all N error corresponding to the N identical function ke ( It is expressed as a value having a constraint that it exists on the curved surface represented by p).
A component that represents a smooth curved surface separately from the case of white noise in which N errors corresponding to each of the magnetic data q 1 to q N are independently stochastically determined by the objective function f 2 (E, x). An error having the property of distortion from a spherical surface due to k (E) can also be expressed. That is, by introducing the objective function f 2 (E, x), the error between each magnetic data q 1 to q N and the spherical surface is changed to the error caused by white noise and the distortion caused by the component k (E) representing the curved surface. It became possible to separate into errors caused by.

なお、式(19)が示す目的関数f(x)及び、式(22)が示す目的関数f(E、x)は、純粋にセンサ座標系Σにおける幾何的な形状を表す方程式ではない。式(19)は、純粋に幾何的な意味を持つ球面の方程式である式(1)に対して、複数の磁気データq〜qの値を代入して得た平均値である式(10)等により操作された結果として得られた式であり、幾何的な意味と共に、統計的な意味も有した式である。従って、式(22)についても、幾何的な意味と共に、統計的な意味も有する式であり、式(22)において現れる曲面を表す成分k(E)の要素である関数ke(p)は、センサ座標系Σにおける曲面をそのまま表現するものではない。
しかし、式(19)及び式(22)は、球面の方程式に基づいた演算により導出されたものに過ぎないため、これらの式から純粋に幾何的な形状を表す方程式を再現することが可能である。すなわち、関数ke(p)は、センサ座標系Σにおける曲面を表すものと看做すことができる。
Incidentally, formula (19) is the objective function f 1 (x) and indicating, the objective function f 2 (E, x) indicated by the equation (22), in the equation purely representative of the geometric shape in the sensor coordinate system sigma S Absent. Equation (19) is an equation (1) that is an average value obtained by substituting the values of a plurality of magnetic data q 1 to q N into Equation (1) that is a spherical equation having a purely geometric meaning. 10) is an expression obtained as a result of the operation in accordance with the above and the like, and has a statistical meaning as well as a geometric meaning. Therefore, the expression (22) is an expression having both a geometric meaning and a statistical meaning, and the function ke (p) that is an element of the component k (E) representing the curved surface appearing in the expression (22) is It does not directly represent the curved surface in the sensor coordinate system sigma S.
However, since the equations (19) and (22) are only derived by operations based on spherical equations, it is possible to reproduce purely geometrical equations from these equations. is there. That is, the function ke (p) can be regarded as representing the curved surface in the sensor coordinate system sigma S.

目的関数f(E、x)の値が0となる場合、すなわち、下記の式(27)が成立する場合、磁気データq〜qは、立体SDの表面と完全に一致するように分布する。

Figure 0005641236
ここで、図10及び図11を参照しながら、磁気データq〜qが立体SDの表面と完全に一致することを示す式(27)が成立する場合と、磁気データq〜qが球面Sと完全に一致することを示す式(13)が成立する場合とについて検討する。 When the value of the objective function f 2 (E, x) is 0, that is, when the following equation (27) is satisfied, the magnetic data q 1 to q N are set so as to completely coincide with the surface of the solid SD. Distributed.
Figure 0005641236
Here, with reference to FIG. 10 and FIG. 11, the case where the formula (27) indicating that the magnetic data q 1 to q N completely coincides with the surface of the solid SD is established, and the magnetic data q 1 to q N. Let us consider the case where the formula (13) indicating that the S is completely coincident with the spherical surface S is satisfied.

式(27)が成立する場合、磁気データq〜qは、図10に示すように、立体SDの表面に完全に一致するように分布する。そして、外部磁界Bxが不均一で且つその影響が大きい場合には、地磁気Bgを表す球面Sと外部磁界Bxを表す曲面SXとの重ね合わせである立体SDは、球面とは大きく異なる形状を有することになるため、立体SDの形状と球面Sの形状とは大きく異なり、式(27)のうち曲面を表す成分k(E)の影響が大きくなる。
このような場合には、立体SD上に分布する磁気データq〜qが球面S上に分布していると看做すことはできず、球面Sの中心点xの値は、意味の無い値となる。さらに、このような場合には、球面Sと球面Sとは異なるものである可能性が高ため、球面Sの中心点xと球面Sの中心点x0Gとが一致しない可能性が高い。
このように、式(27)が成立し、且つ、曲面を表す成分k(E)の影響が大きい場合には、球面Sの中心点xと球面Sの中心点x0Gとが一致しない可能性が高く、球面Sの中心点xをオフセットcとして採用することを避ける必要がある。
When Expression (27) is established, the magnetic data q 1 to q N are distributed so as to completely coincide with the surface of the solid SD as shown in FIG. When the external magnetic field Bx is and its impact greater in nonuniform, three-dimensional SD is a superposition of the curved surface SX representing the spherical S G and the external magnetic field Bx representing the geomagnetism Bg is significantly different shape from the spherical Therefore, the shape of the solid SD is significantly different from the shape of the spherical surface S, and the influence of the component k (E) representing the curved surface in the equation (27) becomes large.
In such a case, it cannot be considered that the magnetic data q 1 to q N distributed on the solid SD are distributed on the spherical surface S, and the value of the center point x 0 of the spherical surface S means It becomes the value without. Furthermore, in such a case, since there is high possibility that different from the sphere S and the sphere S G, possibly the center point x 0G the center point x 0 and sphere S G of the spherical S does not match high.
Thus, established formula (27), and, when the influence of component k (E) representing the curved surface is large, the center point x 0G the center point x 0 and sphere S G of the spherical S do not match more likely, it is necessary to avoid adopting a center point x 0 of sphere S as an offset c.

一方、式(27)が成立する場合であっても、式(13)も同時に成立する場合、すなわち、式(27)のうち曲面を表す成分k(E)が「0」となる場合には、球面Sの中心点xをオフセットcとして採用することができる。
例えば、図11(A)に示すような、外部磁界Bxが存在しない場合を検討する。この例では、外部磁界Bxを表す曲面SXが存在しないため、地磁気Bgを表す球面Sと外部磁界Bxを表す曲面SXとの重ね合わせである立体SDは、球面Sと等しくなり、その形状は球面となる。従って、式(27)のうち曲面を表す成分k(E)が「0」となり、式(13)と式(27)とが等しくなる。つまり、球面S及び立体SDは、地磁気Bgを表す球面Sと等しくなる。
このような場合、球面Sの中心点xと球面Sの中心点x0Gとが一致するため、球面Sの中心点xをオフセットcとして採用することができる。
On the other hand, even if Expression (27) holds, if Expression (13) also holds simultaneously, that is, if the component k (E) representing the curved surface in Expression (27) is “0”. it can employ the center point x 0 of sphere S as an offset c.
For example, consider the case where the external magnetic field Bx does not exist as shown in FIG. In this example, because there is no curved SX representing the external magnetic field Bx, stereoscopic SD is a superposition of the curved surface SX representing the spherical S G and the external magnetic field Bx representing the geomagnetism Bg is equal to the spherical S G, the shape Becomes a spherical surface. Accordingly, the component k (E) representing the curved surface in Expression (27) is “0”, and Expression (13) and Expression (27) are equal. That is, the spherical S and steric SD is equal to the sphere S G representing the geomagnetism Bg.
In this case, since the center point x 0G the center point x 0 and sphere S G of the spherical S coincide, it is possible to adopt a center point x 0 of sphere S as an offset c.

また、式(27)が成立する場合であっても、式(13)も同時に成立すると看做すことができる場合、すなわち、曲面を表す成分k(E)が小さい場合(曲面を表す成分k(E)≒0となる場合)には、球面Sの中心点xをオフセットcと看做して採用することができる。
例えば、図11(B)に示すように、外部磁界Bxが3次元磁気センサ60によってほぼ一様な磁界として検出される場合を検討する。この例では、外部磁界Bxを表す曲面SXの形状を、中心点x0Gを中心とする球面と看做すことができるため、球面Sと曲面SXとの重ね合わせである立体SDの形状もほぼ球面となる。そのため、立体SDを表す式(27)のうち曲面を表す成分k(E)による影響は小さくなる。つまり、式(27)と同時に式(13)も同時に成立すると看做すことができ、立体SDと球面Sとがほぼ等しいものとなる。
よって、立体SD上に分布する磁気データq〜qは、球面S上にも分布していると看做せるため、球面Sの中心点xの値は意味を持つ値となる。また、球面Sと中心点x0Gを中心とする球面に近い形状の立体SDとは、ほぼ等しいものとなるため、球面Sの中心点xと、球面Sの中心点x0Gとは、ほぼ同一の座標になる。
従って、図11(B)に示すような場合にも、球面Sの中心点xをオフセットcとして採用することができる。
Further, even when Expression (27) is satisfied, it can be considered that Expression (13) is also satisfied at the same time, that is, when the component k (E) representing the curved surface is small (component k representing the curved surface). (E) in this case) to be ≒ 0, the center point x 0 of the spherical S can be employed regarded as offset c.
For example, as shown in FIG. 11B, consider a case where the external magnetic field Bx is detected as a substantially uniform magnetic field by the three-dimensional magnetic sensor 60 . In this example, the shape of the curved surface SX representing the external magnetic field Bx, it is possible to consider a spherical surface centered on the center point x 0G, sphere S G and shape of the three-dimensional SD is a superposition of the curved surface SX Is also almost spherical. Therefore, the influence of the component k (E) representing the curved surface in the expression (27) representing the solid SD is reduced. That is, it can be considered that Expression (13) is simultaneously established simultaneously with Expression (27), and the solid SD and the spherical surface S are substantially equal.
Therefore, since the magnetic data q 1 to q N distributed on the solid SD can be considered to be distributed on the spherical surface S, the value of the center point x 0 of the spherical surface S is a meaningful value. Further, the spherical surface S and the center point stereo SD having a shape close to a sphere centered at x 0G, since it becomes approximately equal, the center point x 0 of sphere S, the center point x 0G spherical S G is The coordinates are almost the same.
Therefore, even if, as shown in FIG. 11 (B), it can be employed center point x 0 of sphere S as an offset c.

また、式(27)が成立する場合であっても、式(13)も同時に成立すると看做すことができる場合として、図11(C)に示すような、3次元磁気センサ60によって検出される不均一な外部磁界Bxの大きさが十分に小さい場合について検討する。
この例では、外部磁界Bxを表す曲面SXの影響を無視することができる。つまり、地磁気Bgを表す球面Sと外部磁界Bxを表す曲面SXとの重ね合わせである立体SDは、地磁気Bgを表す球面Sとほぼ等しいと看做すことができるため、立体SDの形状は球面に近くなる。そのため、立体SDを表す式(27)のうち曲面を表す成分k(E)による影響は小さくなる。つまり、式(27)と同時に式(13)も同時に成立すると看做すことができ、立体SDと球面Sとがほぼ等しいものとなる。
よって、立体SD上に分布する磁気データq〜qは、球面S上にも分布していると看做せるため、球面Sの中心点xの値は意味を持つ値となる。また、球面Sと中心点x0Gを中心とする球面Sとは、ほぼ等しいものとなるため、球面Sの中心点xと、球面Sの中心点x0Gとは、ほぼ同一の座標になる。
従って、図11(C)に示すような場合にも、球面Sの中心点xをオフセットcとして採用することができる。
Further, even if the equation (27) is satisfied, it can be considered that the equation (13) is also satisfied at the same time, and is detected by the three-dimensional magnetic sensor 60 as shown in FIG. Consider the case where the magnitude of the non-uniform external magnetic field Bx is sufficiently small.
In this example, the influence of the curved surface SX representing the external magnetic field Bx can be ignored. That is, since the three-dimensional SD is a superposition of the curved surface SX representing the spherical S G and the external magnetic field Bx representing the geomagnetism Bg can be regarded as substantially equal to the spherical S G representing the geomagnetism Bg, solid SD shape Becomes close to a spherical surface. Therefore, the influence of the component k (E) representing the curved surface in the expression (27) representing the solid SD is reduced. That is, it can be considered that Expression (13) is simultaneously established simultaneously with Expression (27), and the solid SD and the spherical surface S are substantially equal.
Therefore, since the magnetic data q 1 to q N distributed on the solid SD can be considered to be distributed on the spherical surface S, the value of the center point x 0 of the spherical surface S is a meaningful value. Also, since the spherical surface S and the spherical surface S G centered on the central point x 0G are substantially equal, the central point x 0 of the spherical surface S and the central point x 0G of the spherical surface S G are substantially the same coordinates. become.
Therefore, even if, as shown in FIG. 11 (C), it can be employed center point x 0 of sphere S as an offset c.

このように、曲面を表す成分k(E)による影響が小さい場合、立体SD上に分布する磁気データq〜qは、球面S上にも分布すると看做すことができ、球面Sの中心点xをオフセットcとして採用することができる。以下では、曲面を表す成分k(E)の影響の大きさを評価する方法について述べる。 Thus, when the influence of the component k (E) representing the curved surface is small, it can be considered that the magnetic data q 1 to q N distributed on the solid SD is also distributed on the spherical surface S. the center point x 0 can be adopted as the offset c. Hereinafter, a method for evaluating the magnitude of the influence of the component k (E) representing the curved surface will be described.

ここで、以下の式(28)及び(29)に示す評価値f(E)を、曲面を表す成分k(E)による影響の大きさを評価する評価値として定義する。
評価値f(E)の値が0となる場合には、式(27)は式(13)と一致し、立体SDが球面Sと等しくなる。また、評価値f(E)の値が0とならない場合であっても、一定の閾値δe以下であれば、立体SDが球面Sに近い形状を有するものであると判断できる。これらの場合には、磁気データq〜qが球面Sの近傍に分布するため、前述した中心点算出処理により求められた球面Sの中心点xをオフセットcとして採用することができる。
なお、評価値f(E)の値が、閾値δe以下である場合、目的関数f(E、x)を最小化する解x=x02は、球面Sの中心点xとほぼ同一の値となるため、中心点xをオフセットcとして採用する代わりに、目的関数f(E、x)を最小化する解x=x02をオフセットcとして採用しても良い。

Figure 0005641236
Here, the evaluation value f 3 (E) shown in the following equations (28) and (29) is defined as an evaluation value for evaluating the magnitude of the influence of the component k (E) representing the curved surface.
When the value of the evaluation value f 3 (E) is 0, Expression (27) matches Expression (13), and the solid SD is equal to the spherical surface S. Even if the value of the evaluation value f 3 (E) does not become 0, it can be determined that the solid SD has a shape close to the spherical surface S if it is equal to or less than the certain threshold value δe. In these cases, since the magnetic data q 1 to q N are distributed in the vicinity of the spherical surface S, the center point x 0 of the spherical surface S obtained by the center point calculation process described above can be used as the offset c.
When the evaluation value f 3 (E) is equal to or less than the threshold value δe, the solution x = x 02 that minimizes the objective function f 2 (E, x) is almost the same as the center point x 0 of the spherical surface S. Therefore, instead of using the center point x 0 as the offset c, a solution x = x 02 that minimizes the objective function f 2 (E, x) may be used as the offset c.
Figure 0005641236

以下に、評価値f(E)を求める方法について説明する。
まず、式(25)に示した関数ke(p)は、二次形式で表される関数であるため、以下の式(30)のように、ベクトルの内積として表現できる。
また、n次元のベクトルである曲面を表す成分k(E)の第i行目の要素ke(q−x)は、式(30)の変数pに対して、ベクトル(q−x)を代入した値であるため、式(32)によって示されるベクトルke(i)、及び、式(33)によって表される評価行列Eの各成分を並べたベクトルeを用いて、式(31)のように表せる。

Figure 0005641236
A method for obtaining the evaluation value f 3 (E) will be described below.
First, since the function ke (p) shown in Expression (25) is a function expressed in a quadratic form, it can be expressed as an inner product of vectors as in Expression (30) below.
Further, the i-th row element ke components k (E) representing the curved surface is a n-dimensional vector (q i -x 0), relative to the variable p in equation (30), the vector (q i -x 0 )), the equation is obtained by using the vector ke 2 (i) represented by the equation (32) and the vector e in which the components of the evaluation matrix E represented by the equation (33) are arranged. It can be expressed as (31).
Figure 0005641236

ここで、式(34)で示す行列Xを導入する。行列Xは、第i行目に、式(32)によって示されるベクトルke(i)を転置したものと、ベクトル(q−x)を転置したものを並べた行列である。

Figure 0005641236
We introduce the matrix X 2 represented by the formula (34). The matrix X 2 is a matrix in which the transposed vector ke 2 (i) represented by Expression (32) and the transposed vector (q i −x 0 ) are arranged in the i-th row.
Figure 0005641236

式(34)で表される行列Xを用いることで、式(22)に示される目的関数f(E、x)を、式(35)で表される目的関数f(e)に変形することができる。
なお、式(35)におけるベクトルeは、式(33)に示したベクトルeと、式(37)に示したベクトルeとを並べたベクトルである。また、式(37)のベクトルeは、式(18)に示す変数xから、式(4)に示した重心qを引いたものである。

Figure 0005641236
By using the matrix X 2 represented by the equation (34), the objective function f 2 (E, x) represented by the equation (22) is changed to the objective function f 4 (e) represented by the equation (35). It can be deformed.
The vector e in Expression (35) is a vector in which the vector e 2 shown in Expression (33) and the vector e 3 shown in Expression (37) are arranged. Further, the vector e 3 in Expression (37) is obtained by subtracting the center of gravity q c shown in Expression (4) from the variable x shown in Expression (18).
Figure 0005641236

式(35)で表される目的関数f(e)を最小化する解eは、以下の式(38)式で表現される連立方程式に対して、ガウス消去法や、コレスキー分解法などを適用することで、によって求められる。

Figure 0005641236
The solution e 0 for minimizing the objective function f 4 (e) represented by the equation (35) is obtained by using a Gaussian elimination method or a Cholesky decomposition method with respect to the simultaneous equations represented by the following equation (38). And so on by applying.
Figure 0005641236

このようにして得た解eに基づき、式(24)により評価行列Eを復元する。そして、式(28)に示した評価値f(E)の値、即ち、評価行列Eのノルムを求める。評価行列Eのノルムは、評価行列Eの固有値の絶対値の最大値に等しいため、ヤコビ法や、冪乗法により求めることができる。
前述の通り、評価値f(E)の値が閾値δe以下である場合には、中心点算出処理により求められた球面Sの中心点x、または、目的関数f(E、x)を最小化する解x=x02のいずれも、オフセットcとして採用することができる。解x02は、解eのうち、式(36)のeに相当する部分を、式(37)に代入することにより求められる。
Based on the solution e 0 obtained in this way, the evaluation matrix E is restored by equation (24). Then, the value of the evaluation value f 3 (E) shown in Expression (28), that is, the norm of the evaluation matrix E is obtained. Since the norm of the evaluation matrix E is equal to the maximum absolute value of the eigenvalues of the evaluation matrix E, it can be obtained by the Jacobian method or the power method.
As described above, when the evaluation value f 3 (E) is less than or equal to the threshold δe, the center point x 0 of the spherical surface S obtained by the center point calculation process or the objective function f 2 (E, x) the none of the solutions x = x 02 for minimizing, can be adopted as the offset c. Solution x 02 is out of the solution e 0, the portion corresponding to e 3 of the formula (36) obtained by substituting the equation (37).

[4. シミュレーション]
中心点算出処理、及び歪判定処理の有効性を検証するために、シミュレーションを実施した。以下に、シミュレーションの前提条件及びその結果について述べる。
なお、シミュレーションは、前述した3次元磁気センサ60の代わりに、2次元磁気センサを用いて行う。2次元磁気センサは、前述した地磁気Bg、外部磁界Bx、及び内部磁界Biの磁界のベクトルを、互いに直交する2方向の成分に分解してスカラー量を検知するための2つの磁気センサモジュールを備え、2つの磁気センサモジュールが各々出力するスカラー量を2つの成分とする2次元のベクトルデータを出力するものであり、Z軸センサ63を備えない点を除いて、3次元磁気センサ60と同様に構成される。
[4. simulation]
In order to verify the effectiveness of the center point calculation process and the distortion determination process, a simulation was performed. In the following, the preconditions of the simulation and the results are described.
The simulation is performed using a two-dimensional magnetic sensor instead of the three-dimensional magnetic sensor 60 described above. The two-dimensional magnetic sensor includes two magnetic sensor modules for detecting the scalar quantity by decomposing the magnetic field vectors of the geomagnetism Bg, the external magnetic field Bx, and the internal magnetic field Bi into two orthogonal components. Two-dimensional vector data having two components each of the scalar quantities output by the two magnetic sensor modules is output, and the same as the three-dimensional magnetic sensor 60 except that the Z-axis sensor 63 is not provided. Composed.

[4.1. 2次元での中心点算出処理及び歪判定処理]
2次元磁気センサを用いる場合のオフセット導出処理(初期化処理、磁気データ取得処理、磁気データ分布判定処理、中心点算出処理、及び歪判定処理)は、3次元のベクトルデータの代わりに2次元のベクトルデータを用いる点を除いて、前述したオフセット導出処理と同様である。すなわち、2次元磁気センサを用いる場合のオフセット導出処理は、前述の式(1)〜式(38)において、z軸成分を除外した2次元のセンサ座標系ΣS2における演算処理となる。
この場合、中心点算出処理は、2次元のベクトルデータである磁気データq〜qが、2次元平面内の円周Sの近傍に分布すると仮定して、円周Sの中心点xを算出する処理である。また、歪判定処理は、2次元のベクトルデータである磁気データq〜qが、2次元平面内の曲線SDの近傍に分布すると仮定した場合、曲線SDの形状が円周の形状からどの程度相違するかを判定する処理である。さらに、磁気データ分布判定処理は、磁気データq〜qの分散を表す行列Aが2行2列の行列となるため、行列Aが有する2つの固有値のうち、小さい方の固有値が閾値未満である場合には、磁気データq〜qの分布が2次元的な広がりを有さない1次元的な分布であると判断する処理である。
以下では、前述の式(1)〜式(38)を、2次元に適用するために必要な式の変形について述べる。
[4.1. Two-dimensional center point calculation process and distortion determination process]
Offset derivation processing (initialization processing, magnetic data acquisition processing, magnetic data distribution determination processing, center point calculation processing, and distortion determination processing) when using a two-dimensional magnetic sensor is performed using two-dimensional vector data instead of three-dimensional vector data. Except for using vector data, this is the same as the offset derivation process described above. That is, the offset derivation process in the case of using the two-dimensional magnetic sensor, in the above formulas (1) to (38), the calculation process in the two-dimensional sensor coordinate system sigma S2 excluding the z-axis component.
In this case, the center point calculation process assumes that the magnetic data q 1 to q N that are two-dimensional vector data are distributed in the vicinity of the circumference S in the two-dimensional plane, and the center point x 0 of the circumference S. Is a process for calculating. Further, in the strain determination process, when it is assumed that the magnetic data q 1 to q N that are two-dimensional vector data are distributed in the vicinity of the curve SD in the two-dimensional plane, the shape of the curve SD is determined from the shape of the circumference. This is a process for determining whether or not the degree is different. Further, in the magnetic data distribution determination process, since the matrix A representing the dispersion of the magnetic data q 1 to q N is a 2-by-2 matrix, the smaller eigenvalue of the two eigenvalues of the matrix A is less than the threshold value. Is a process of determining that the distribution of the magnetic data q 1 to q N is a one-dimensional distribution having no two-dimensional spread.
Hereinafter, modifications of the equations necessary for applying the above-described equations (1) to (38) in two dimensions will be described.

まず、中心点算出処理において、目的関数f(x)を表した式(19)、及び円周Sの中心点xを求める式(20)において使用される、磁気データq、磁気データの重心q、及び中心点xは、2次元空間においては、以下の式(40)乃至(42)となる。なお、ここで変数xは、x=(x、y)Tで表される2次元のベクトルである。

Figure 0005641236
First, in the center point calculation process, magnetic data q i and magnetic data used in Expression (19) representing the objective function f 1 (x) and Expression (20) for determining the center point x 0 of the circumference S are used. The center of gravity q c and the center point x 0 are expressed by the following equations (40) to (42) in the two-dimensional space. Here, the variable x is a two-dimensional vector represented by x = (x, y) T.
Figure 0005641236

また、歪判定処理において、目的関数f(E,x)を表した式(22)において使用される評価行列Eは、2次元空間においては、以下の式(43)となる。

Figure 0005641236
In the distortion determination process, the evaluation matrix E used in Expression (22) representing the objective function f 2 (E, x) is expressed by the following Expression (43) in the two-dimensional space.
Figure 0005641236

そして、式(28)の評価値f(E)、及び式(35)の目的関数f(e)を導出する過程で使用する、関数ke(p)、ベクトルke(i)、行列X、及びベクトルeは、2次元空間においては、以下の式(44)〜式(49)となる。

Figure 0005641236
Then, the function ke (p), the vector ke 2 (i), the matrix used in the process of deriving the evaluation value f 3 (E) of Expression (28) and the objective function f 4 (e) of Expression (35) X 2 and the vector e are expressed by the following equations (44) to (49) in the two-dimensional space.
Figure 0005641236

[4.2. シミュレーションデータ]
図12を参照しつつ、シミュレーションで使用する磁気データq〜qの生成方法、及びその前提条件について説明する。
まず、ケースAとして、図12(1)に示すように、観測誤差が存在せず、外部磁界Bxによる磁界の不均一性も存在しない場合を想定した、磁気データq1A〜qNAを準備した。具体的には、中心点をcsim=(0,0)とする半径rsimの円周Ssim上に、x軸からの角度φが1度刻みとなるように、磁気データq1A〜qNAが観測された場合を想定した。なお、データ数Nは、N=181(すなわち、角度φは、0≦φ≦180)とし、磁気データq1A〜qNAが円周Ssim上の上半分に均等に分布することとした。
中心点csimは、真のオフセット、つまり、センサの測定誤差が存在せず、外部磁界Bxが一切存在しないか完全に一様であるという、シミュレーション上の前提条件として与えられた値である。このような中心点csimは、実際の観測によって得られる磁気データから算出することは不可能であるが、シミュレーションにおける前提条件として設定している。なお、中心点csimは、内部磁界Biを表すベクトルの座標値を意味するものであるが、シミュレーションでは便宜上、中心点csimの座標を(0,0)としている。
[4.2. Simulation data]
With reference to FIG. 12, a method for generating magnetic data q 1 to q N used in the simulation and its preconditions will be described.
First, as case A, as shown in FIG. 12 (1), magnetic data q 1A to q NA were prepared assuming no observation error and no magnetic field inhomogeneity due to the external magnetic field Bx. . Specifically, the magnetic data q 1A to the magnetic data q 1A to so that the angle φ from the x axis is in increments of 1 degree on the circumference S sim having the radius r sim with the center point c sim = (0,0) T The case where qNA was observed was assumed. The number of data N is N = 181 (that is, the angle φ is 0 ≦ φ ≦ 180), and the magnetic data q 1A to q NA are evenly distributed in the upper half of the circumference S sim .
The center point c sim is a true offset, that is, a value given as a precondition in simulation that there is no sensor measurement error and that the external magnetic field Bx does not exist at all or is completely uniform. Such a center point c sim cannot be calculated from magnetic data obtained by actual observation, but is set as a precondition in the simulation. The center point c sim means a coordinate value of a vector representing the internal magnetic field Bi, but in the simulation, the coordinate of the center point c sim is (0, 0) T for convenience.

次に、ケースBとして、図12(2)に示すように、ケースAで準備された磁気データq1A〜qNAの各々の座標に対して、x軸方向及びy軸方向にそれぞれ正規乱数値を重畳させた磁気データq1B〜qNBを準備した。この磁気データq1B〜qNBは、磁気データq1A〜qNAに対して観測誤差であるホワイトノイズが加えられた場合を想定している。 Next, as case B, as shown in FIG. 12 (2), normal random values in the x-axis direction and the y-axis direction with respect to the coordinates of the magnetic data q 1A to q NA prepared in case A, respectively. Are prepared as magnetic data q 1B to q NB . These magnetic data q 1B to q NB assume a case where white noise, which is an observation error, is added to the magnetic data q 1A to q NA .

また、ケースCとして、図12(3)に示すように、ケースAで準備された磁気データq1A〜qNAの各々の座標を半径方向に適当にずらすことにより、円周Ssim上とは異なる滑らかに歪んだ曲線SDを描くような磁気データq1C〜qNCを準備した。 Further, as shown in FIG. 12C, as the case C, the coordinates on the circumference S sim can be obtained by appropriately shifting the coordinates of the magnetic data q 1A to q NA prepared in the case A in the radial direction. Magnetic data q 1C to q NC that draw different smoothly distorted curves SD were prepared.

[4.3. 指標の算出]
ケースA乃至Cにおいて設定した複数の磁気データに対して、前述した中心点算出処理及び歪判定処理を行った。具体的には、ケースA乃至Cの各々に対して、まず、複数の磁気データが、ある円周S上に存在すると仮定し、式(20)を用いて円周Sの中心点xを算出し、次に、式(28)で与えられる評価値f(E)の値を算出した。
[4.3. Indicator calculation]
The center point calculation process and the distortion determination process described above were performed on the plurality of magnetic data set in cases A to C. Specifically, for each of cases A to C, first, it is assumed that a plurality of magnetic data exist on a certain circumference S, and the center point x 0 of the circumference S is determined using equation (20). Then, the value of the evaluation value f 3 (E) given by the equation (28) was calculated.

また、比較のために、本出願人が特開2007−107921号公報で開示している式(51)に表される評価値fの値を算出した。評価値fは、磁気データq〜qが、中心点をxとする半径rの円周(または球面)からどの程度の誤差を有するかについて、判定するものである。なお、この評価値fにおいて使用される半径rは、前述した中心点xと、各磁気データq〜qとの距離に基づいて、式(52)により算出する。

Figure 0005641236
For comparison, the applicant was calculated evaluation value f 5 represented by formula (51) which is disclosed in JP-A-2007-107921. The evaluation value f 5 is used to determine how much the magnetic data q 1 to q N have an error from the circumference (or spherical surface) of the radius r having the center point x 0 . Incidentally, the radius r to be used in this evaluation value f 5 is the center point x 0 described above, based on the distance between each magnetic data q 1 to q N, is calculated by the equation (52).
Figure 0005641236

更に、中心点算出手段により算出された中心点xと、シミュレーションの前提条件として与えられた真のオフセットを表す中心点csim=(0,0)との距離を表す、誤差δxを、式(53)に基づいて算出した。
なお、この誤差δxは、真のオフセットである中心点csimが既知であるシミュレーションにおいてのみ算出可能な値である。誤差δxにより、本実施形態における評価値f(E)及び公知の評価値fのそれぞれが示す評価値の妥当性について、判断する。

Figure 0005641236
Further, an error δx representing the distance between the center point x 0 calculated by the center point calculating means and the center point c sim = (0, 0) T representing the true offset given as a precondition for the simulation, It calculated based on Formula (53).
The error δx is a value that can be calculated only in a simulation in which the center point c sim that is a true offset is known. Based on the error δx, the validity of the evaluation value indicated by each of the evaluation value f 3 (E) and the known evaluation value f 5 in this embodiment is determined.
Figure 0005641236

[4.4. シミュレーション結果]
図13のシミュレーション結果表を参照しつつ、シミュレーション結果について以下に述べる。
まず、シミュレーション結果表の第1列に記載した、ケースA乃至Cにおける誤差δxについて説明する。誤差δxは、ケースAでは0.00%となり、ケースBでは2.79%となるのに対して、ケースCでは7.78%という、ケースBと比較して大きな値となった。これは、ケースCにおいて、中心点算出処理により算出した中心点xが、真のオフセットである中心点csimから大きな誤差を有するものであることを意味している一方、ケースBでは、中心点xと真のオフセットである中心点csimとの誤差が、ケースCに比べて小さいことを意味している。
すなわち、ケースCの場合、中心点xは誤差が大きく、オフセットとして採用することを避ける必要があるのに対して、ケースBの場合は、中心点xの誤差は小さく、オフセットとして採用しても構わないことを意味している。
[4.4. simulation result]
The simulation result will be described below with reference to the simulation result table of FIG.
First, the error δx in cases A to C described in the first column of the simulation result table will be described. The error δx is 0.00% in case A, 2.79% in case B, and 7.78% in case C, which is a large value compared to case B. This means that in case C, the center point x 0 calculated by the center point calculation process has a large error from the center point c sim which is the true offset, while in case B, the center point x 0 This means that an error between the point x 0 and the center point c sim which is a true offset is smaller than that in the case C.
That is, in Case C, the center point x 0 is the error is large, whereas it is necessary to avoid adopting as an offset, the Case B, the error of the center point x 0 is small, is adopted as an offset It means that it doesn't matter.

次に、シミュレーション結果表の第2列に記載された、ケースA乃至Cにおける評価値f(E)の値について説明する。評価値f(E)の値は、ケースAでは4.36×10−14となり、ケースBでは6.07×10−2となるのに対して、ケースCでは2.42×10−1というケースBと比較して大きな値となった。つまり、誤差δxが大きいケースCでは、評価値f(E)も大きな値を示し、誤差δxが小さいケースBでは、評価値f(E)の値も小さい値を示すこととなった。すなわち、評価値f(E)に基づいて、中心点xと、真のオフセットである中心点csimとの誤差δxを評価することができた。 Next, the value of the evaluation value f 3 (E) in cases A to C described in the second column of the simulation result table will be described. The value of the evaluation value f 3 (E) is 4.36 × 10 −14 in case A and 6.07 × 10 −2 in case B, whereas it is 2.42 × 10 −1 in case C. Compared to Case B, it was a large value. That is, in the case C where the error δx is large, the evaluation value f 3 (E) also shows a large value, and in the case B where the error δx is small, the evaluation value f 3 (E) also shows a small value. That is, based on the evaluation value f 3 (E), the error δx between the center point x 0 and the center point c sim that is the true offset could be evaluated.

シミュレーション結果表の第3列に記載された、ケースA乃至Cにおける公知の評価値fの値について説明する。評価値fの値は、ケースAでは7.25×10−14となり、ケースBでは3.14×10−3となるのに対して、ケースCでは3.01×10−3となった。
誤差δxが大きな値を示すケースCよりも、誤差δxが小さな値を示すケースBの方が、評価値fの値は大きい値を示した。すなわち、評価値fによっては、中心点xと真のオフセットである中心点csimとの誤差δxを評価することは不可能である。
Listed in the third column of the simulation result table, the value of the known evaluation value f 5 in Case A to C will be described. The value of the evaluation value f 5 is 7.25 × 10 −14 in case A, 3.14 × 10 −3 in case B, and 3.01 × 10 −3 in case C. .
Than Case C error δx is a larger value, towards the case B where the error δx exhibits a small value, the evaluation value f 5 showed a large value. That is, depending on the evaluation value f 5 , it is impossible to evaluate the error δx between the center point x 0 and the center point c sim which is a true offset.

このように、誤差δxが大きな値を示すケースCでは、評価値f(E)及び評価値fの双方が大きな値を示したのに対して、誤差δxが小さな値を示すケースBでは、評価値f(E)は小さな値を示したのに対して、評価値fの値は大きな値を示した。
このことから、評価値f(E)が、中心点xと真のオフセットである中心点csimとの誤差δxを評価し得る関数であることが分かった。
換言すれば、評価値f(E)は、磁気データq〜qが、円周からノイズを有して分布する場合と、円周とは異なる歪んだ形状を有する曲線上に分布するものである場合とを、判断することができる関数であることが分かった。
Thus, in case C where the error δx shows a large value, both the evaluation value f 3 (E) and the evaluation value f 5 showed a large value, whereas in case B where the error δx shows a small value, The evaluation value f 3 (E) showed a small value, whereas the evaluation value f 5 showed a large value.
From this, it was found that the evaluation value f 3 (E) is a function that can evaluate the error δx between the center point x 0 and the center point c sim that is the true offset.
In other words, the evaluation value f 3 (E) is distributed on the curve having the distorted shape different from the case where the magnetic data q 1 to q N are distributed with noise from the periphery. It turned out that it is a function which can judge the case where it is a thing.

[5. 結論]
以上に示したように、本実施形態では、オフセット導出処理として、複数の磁気データq〜qが適切な分布を有するかを判定する磁気データ分布判定処理、複数の磁気データq〜qからオフセットの候補である中心点xを算出する中心点算出処理、及び、複数の磁気データq〜qから算出された中心点xをオフセットとして採用することが妥当であるかを判断する歪判定処理、の3つの処理を設けることにより、不適切なオフセットを採用することを防止して、内部磁界Biに近い値を示す適切な中心点xのみをオフセットとして採用することを可能とした。
すなわち、本実施形態のオフセット導出処理は、正確なオフセットによる、正確な地磁気の値の算出が可能になるという利点を有する。
[5. Conclusion]
As described above, in the present embodiment, as the offset derivation process, the magnetic data distribution determination process for determining whether or not the plurality of magnetic data q 1 to q N have an appropriate distribution, and the plurality of magnetic data q 1 to q A center point calculation process for calculating a center point x 0 that is a candidate for offset from N , and whether it is appropriate to employ the center point x 0 calculated from a plurality of magnetic data q 1 to q N as an offset. distortion determination process of determining, by providing the three processes, to prevent adopting incorrect offsets, to adopt as an offset only suitable central point x 0 which indicates a value close to the internal magnetic field Bi It was possible.
That is, the offset derivation process of the present embodiment has an advantage that an accurate geomagnetism value can be calculated with an accurate offset.

また、中心点算出処理では、複数の磁気データq〜qが、中心点xを中心とした球面Sの近傍に分布すると仮定することで、複数の磁気データq〜qより中心点xを算出し、これをオフセットの候補とした。
このような中心点算出処理は、オフセットの候補を簡単な演算により算出できるという利点を有し、処理速度の向上という利点を有するものである。
Further, at the center point calculation process, by a plurality of magnetic data q 1 to q N is assumed to be distributed in the vicinity of the sphere S around the center point x 0, the center of a plurality of magnetic data q 1 to q N calculating a point x 0, which was used as a candidate of an offset.
Such a center point calculation process has the advantage that offset candidates can be calculated by a simple calculation, and has the advantage of improving the processing speed.

また、中心点算出処理では、中心点xの算出にあたり、複数の磁気データq〜qの重心qを原点とする重心座標系Σにおいて、複数の磁気データq〜qの値を表現することで計算を行った。
これにより、3次元磁気センサ60の出力値である、センサ座標系Σにおける磁気データq〜qの値をそのまま用いて計算する場合に比べて、データのサイズを小さくすることができ、処理に必要なメモリのサイズの節約をすると共に、処理速度を向上させるという利点を有する。
Further, in the center point calculation process, in calculating the center point x 0 , in the center of gravity coordinate system Σ C with the center of gravity q c of the plurality of magnetic data q 1 to q N as the origin, the plurality of magnetic data q 1 to q N is calculated. Calculations were performed by expressing values.
Accordingly, the output value of the three-dimensional magnetic sensor 60, as compared with the case of calculating using as the value of the magnetic data q 1 to q N in the sensor coordinate system sigma S, it is possible to reduce the size of the data, This has the advantage of saving the size of the memory required for processing and improving the processing speed.

また、磁気データ分布判定処理において、行列Aの最小固有値λを求め、その値が閾値λ以上であることを判定することにより、磁気データq〜qがセンサ座標系Σにおいて十分に3次元的な広がりを有することを判断することで、正確な中心点xを導出することができないような磁気データq〜qに基づく中心点算出処理を行うことを防止することを可能とした。
これにより、不適切な中心点xをオフセットとして採用することを避けることで、誤差の大きな地磁気の値を検出することを防止することができるという利点を有すると共に、不適切な磁気データq〜qに基づいた不適切な中心点xを導出する中心点算出処理を行うことを未然に防止することで、正しいオフセットを採用するまでの時間を短縮することができるという利点を有する。
Also, well in magnetic data distribution determining processing, for determining the minimum eigenvalue lambda 3 of the matrix A, by determining that the value is the threshold value lambda 0 or more, the magnetic data q 1 to q N is in the sensor coordinate system sigma S It is possible to prevent the center point calculation process based on the magnetic data q 1 to q N from being able to derive an accurate center point x 0 by determining that the center point has a three-dimensional spread. It was possible.
Thus, by avoiding to adopt an incorrect central point x 0 as an offset, which has the advantage that it is possible to prevent detecting a value of a large geomagnetic errors, improper magnetic data q 1 to make the center point calculation process for deriving an incorrect center point x 0 which is based on to q N is possible to prevent, with the advantage that it is possible to shorten the time to adopt the correct offset.

また、歪判定処理では、評価値f(E)を導入することで、磁気データq〜qを表面近傍に有する立体SDの形状が、球面の形状にどの程度近いものであるかについて評価することができた。これにより、中心点算出処理において、磁気データq〜qが球面Sの近傍に分布すると仮定して導出された中心点xを、オフセットとして採用することの妥当性を評価することが可能となり、不適切なオフセットが採用されることを有効に防止することが可能となった。 Also, in the distortion determination process, by introducing the evaluation value f 3 (E), how close the shape of the solid SD having the magnetic data q 1 to q N near the surface is to the shape of the spherical surface I was able to evaluate. Thereby, in the center point calculation process, it is possible to evaluate the validity of adopting the center point x 0 derived on the assumption that the magnetic data q 1 to q N are distributed in the vicinity of the spherical surface S as an offset. Thus, it is possible to effectively prevent an inappropriate offset from being employed.

なお、評価値f(E)は、磁気データq〜qが、ある球面から、単にホワイトノイズに相当する誤差を有して分布する場合と、球面とは異なる歪んだ形状の立体SDの表面近傍に分布する場合とを、区別すること可能としたという意義も有する。
例えば、従来の評価値fでは、磁気データq〜qが球面Sから誤差を有して分布する場合に、その誤差が、ホワイトノイズによるものであるのか、それとも、不均一な外部磁界Bxによるものであるのかを判断できなかった。つまり、磁気データq〜q球面から大きく歪んだ形状を有する立体SDの表面近傍に分布している場合であっても、単純に球面からのホワイトノイズとしての誤差として評価するにとどまっていた。
これに対して、本実施形態の評価値f(E)は、ホワイトノイズによる誤差と、不均一な外部磁界Bxの影響による誤差とを区別することが可能である。従って、誤差が単なるホワイトノイズである場合に算出された中心点xは、内部磁界Biを表すベクトルとの誤差が小さいためオフセットとして採用される。一方、不均一な外部磁界Bxによる誤差が存在する場合に算出された中心点xは、内部磁界Biを表すベクトルBiとの誤差が大きいためオフセットとしての採用を防止することができる。
これにより、本実施形態のオフセット導出処理は、正しいオフセット算出までの測定回数の低減化を可能とすると共に、不正確な値をオフセットとして採用することを未然に防止することが可能になるという利点を有する。
The evaluation value f 3 (E) is a three-dimensional SD having a distorted shape different from the spherical surface when the magnetic data q 1 to q N are distributed from a certain spherical surface with an error corresponding to white noise. It also has the meaning that it is possible to distinguish the case where it is distributed in the vicinity of the surface.
For example, in the conventional evaluation value f 5 , when the magnetic data q 1 to q N are distributed with an error from the spherical surface S, the error is due to white noise or a non-uniform external magnetic field. It could not be judged whether it was due to Bx. That is, even when the magnetic data q 1 to q N are distributed in the vicinity of the surface of the three-dimensional SD having a shape greatly distorted from the spherical surface, it is merely evaluated as an error as white noise from the spherical surface. It was.
On the other hand, the evaluation value f 3 (E) of the present embodiment can distinguish between an error due to white noise and an error due to the influence of the non-uniform external magnetic field Bx. Therefore, the error is the center point x 0 which is calculated when it is just white noise is employed as the offset for error between the vector representing the internal magnetic field Bi is small. Meanwhile, the center point x 0 which is calculated when the error due to non-uniform external magnetic field Bx is present, it is possible to prevent the adoption of an offset for a large error between the vector S Bi representing the internal magnetic field Bi.
As a result, the offset derivation process of the present embodiment enables the reduction in the number of measurements until the correct offset is calculated, and also prevents the inaccurate value from being adopted as an offset beforehand. Have

また、歪判定処理では、目的関数f(E、x)にn次元のベクトルである曲面を表す成分k(E)を導入した。曲面を表す成分k(E)の第i行目の要素は、二次形式である関数ke(p)に対して、磁気データqから中心点xを引き算したベクトル(q−x)を代入することにより与えられる値である。
従来は、磁気データq〜qの座標と、球面Sとの誤差を、式(17)に示すようなベクトルδ1によって吸収していた。ベクトルδ1を構成する1行目〜N行目の各要素は、それぞれ独立した変数であるため、ベクトルδ1によって表現されるN個の誤差の各々は、互いに制約の無い独立した値となる。つまり、ベクトルδ1によっては表されるN個の誤差は、それぞれが独立に確率的に定められるものであり、N個の誤差は全体として、対称性を有し、かつ方向依存性の無いホワイトノイズであった。
これに対して、本実施形態では、二次形式である関数ke(p)を要素とするn次元のベクトルである曲面を表す成分k(E)により、各磁気データq〜qと、球面との誤差の各々を表現することにより、各磁気データq〜qに対応するN個の誤差の各々が、関数ke(p)により表される曲面上に存在するという制約を持った値として表現される。つまり、各磁気データq〜qに対応するN個の誤差が、それぞれが独立に確率的に定められるホワイトノイズの場合とは別に、滑らかな曲面による球面からの歪という性質を有する誤差である場合についても表現することが可能となった。これにより、球面からの誤差から、ホワイトノイズに起因する部分と、曲面による歪に起因する部分とを分離することが可能となった。
従って、本実施形態のオフセット導出処理は、磁気データq〜q球面との誤差のうち、外部磁界Bxによる歪による影響の大きさを判断することができ、中心点算出処理において算出された中心点xをオフセットとして採用することができない外部磁界Bxによる歪が存在する場合を、的確に判断することが可能になった。
In the distortion determination process, a component k (E) representing a curved surface that is an n-dimensional vector is introduced into the objective function f 2 (E, x). The element in the i-th row of the component k (E) representing the curved surface is a vector (q i −x 0 ) obtained by subtracting the center point x 0 from the magnetic data q i with respect to the function ke (p) that is a quadratic form. ) Is a value given by substituting.
Conventionally, an error between the coordinates of the magnetic data q 1 to q N and the spherical surface S is absorbed by a vector δ 1 as shown in Expression (17). Since each element in the first to Nth rows constituting the vector δ1 is an independent variable, each of the N errors expressed by the vector δ1 is an independent value without any restriction. That is, N errors represented by the vector δ1 are each determined independently and probabilistically, and the N errors as a whole are white noise having symmetry and no direction dependency. Met.
On the other hand, in the present embodiment, each of the magnetic data q 1 to q N is represented by a component k (E) representing a curved surface that is an n-dimensional vector having a function ke (p) that is a quadratic form as an element, By expressing each of the errors with the spherical surface , each of the N errors corresponding to each of the magnetic data q 1 to q N has a restriction that it exists on the curved surface represented by the function ke (p). Expressed as a value. That, N number of errors corresponding to each magnetic data q 1 to q N is the case of white noise, each determined probabilistically independently separately, an error having the property that the distortion from the spherical by a smooth curved surface It became possible to express some cases. This makes it possible to separate a portion caused by white noise and a portion caused by distortion caused by a curved surface from an error from a spherical surface.
Therefore, the offset derivation process of the present embodiment can determine the magnitude of the influence of distortion due to the external magnetic field Bx among the errors between the magnetic data q 1 to q N and the spherical surface, and is calculated in the center point calculation process. and the case where distortion is present due to external magnetic field Bx which can not be adopted as the offset of the center point x 0, it has become possible to accurately determine.

1…機器、2…物体、10…CPU、60…3次元磁気センサ、Bg…地磁気、Bi…内部磁界、Bx…外部磁界、Σ…地上座標系、Σ…センサ座標系、q…磁気データ、x…中心点、x0G…中心点(地磁気)、E…評価行列、Ps…位置、θs…姿勢、S…球面、S…球面(地磁気)、SX…曲面、SD…立体、r…球面の半径、f(x)…目的関数、f(E、x)…目的関数、f(E)…評価値、k(E)…曲面を表す成分。 1 ... apparatus, 2 ... object, 10 ... CPU, 60 ... 3-dimensional magnetic sensor, Bg ... geomagnetism, Bi ... internal magnetic field, Bx ... external magnetic field, sigma G ... ground coordinate system, sigma S ... sensor coordinate system, q i ... Magnetic data, x 0 ... center point, x 0G ... center point (geomagnetic), E ... evaluation matrix, Ps ... position, θs ... attitude, S ... spherical surface, S G ... spherical surface (geomagnetic), SX ... curved surface, SD ... solid R, radius of the spherical surface, f 1 (x), objective function, f 2 (E, x), objective function, f 3 (E), evaluation value, k (E), a component representing a curved surface.

Claims (10)

磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する3方向の磁気成分をそれぞれ検出する3次元磁気センサと、
前記機器の姿勢を変化させた場合に前記3次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と
前記蓄積手段に蓄積された複数の磁気データで示される座標が、球面と曲面とを重ね合わせることで得られる非球面の立体の表面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記立体の表面との誤差を表す目的関数を用いて、前記目的関数の表す誤差の値を最小化するときの、前記目的関数における前記曲面を表す成分に基づく第1評価値を算出し、前記第1評価値が所定の大きさ以下であるか否かを判定する歪判定手段と
前記歪判定手段の判定結果が肯定である場合に、前記磁気データのうち前記部品の発生する磁界の成分を表す3軸の座標であるオフセットを更新するオフセット更新手段と、
を備える地磁気測定装置。
A three-dimensional magnetic sensor that is incorporated in a device including a component that generates a magnetic field and detects magnetic components in three directions orthogonal to each other;
Storage means for storing magnetic data sequentially output from the three-dimensional magnetic sensor when the posture of the device is changed ;
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed near the surface of an aspheric solid obtained by superimposing a spherical surface and a curved surface, the plurality of magnetic data A first evaluation value based on a component representing the curved surface in the objective function when minimizing an error value represented by the objective function using an objective function representing an error between the coordinates indicated by 3 and the surface of the solid And a distortion determination means for determining whether or not the first evaluation value is equal to or smaller than a predetermined magnitude ;
An offset update means for updating an offset that is a coordinate of three axes representing a magnetic field component generated by the component in the magnetic data when the determination result of the distortion determination means is affirmative;
A geomagnetism measuring device.
前記第1評価値が前記所定の大きさよりも大きな値となる場合に、利用者に前記機器の位置を変化させずに前記機器の姿勢を変化させるように促す手段を備える
ことを特徴とする請求項1に記載の地磁気測定装置。
When the first evaluation value is larger than the predetermined size, there is provided means for urging the user to change the posture of the device without changing the position of the device. Item 2. The geomagnetism measuring device according to item 1.
前記地磁気測定装置は、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、中心点算出用球面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される3軸の座標と前記中心点算出用球面との誤差を最小化するように、前記中心点算出用球面の中心点を算出する中心点算出手段を、
更に備え、
前記目的関数における前記曲面を表す成分は、前記複数の磁気データの各々に対応する各要素からなるベクトルであり、
前記各要素は、第1評価行列を係数行列とする3変数の二次形式により表現される関数に対して、前記中心点を原点とする座標系において前記磁気データを表す3軸の値を代入することで得られる値であり、
前記第1評価値は、前記第1評価行列のノルムであり、
前記オフセットは、前記中心点である、
ことを特徴とする請求項1または2に記載の地磁気測定装置。
The geomagnetism measuring device is
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed near the center point calculation spherical surface, the three-axis coordinates indicated by the plurality of magnetic data and the center point Center point calculating means for calculating the center point of the center point calculating sphere so as to minimize an error from the calculation sphere,
In addition,
The component representing the curved surface in the objective function is a vector composed of elements corresponding to each of the plurality of magnetic data,
For each element, a 3-axis value representing the magnetic data in a coordinate system with the center point as the origin is substituted for a function expressed in a three-variable quadratic form with the first evaluation matrix as a coefficient matrix. Is the value obtained by
The first evaluation value, Ri norm der of the first evaluation matrix,
The offset is the center point.
The geomagnetism measuring apparatus according to claim 1 or 2.
前記中心点算出手段は、
前記複数の磁気データで示される座標が、3次元的な広がりを持って分布していることを評価する第2評価値を算出し、前記第2評価値が所定の大きさ以上の場合に、前記中心点を算出する
ことを特徴とする請求項1乃至3のうちいずれか1項に記載の地磁気測定装置。
The center point calculating means includes
A second evaluation value for evaluating that the coordinates indicated by the plurality of magnetic data are distributed with a three-dimensional spread is calculated, and when the second evaluation value is equal to or larger than a predetermined size, The geomagnetic measurement apparatus according to any one of claims 1 to 3, wherein the center point is calculated.
前記中心点算出手段は、下記の第2目的関数f(x)の値を最小にするxを、前記中心点として算出する
ことを特徴とする請求項1乃至4のうちいずれか1項に記載の地磁気測定装置。
Figure 0005641236
The center point calculation means calculates x, which minimizes the value of the following second objective function f 1 (x), as the center point. 5. The geomagnetic measuring device described.
Figure 0005641236
前記目的関数は、前記第1評価行列をEとし、前記中心点をxとしたとき、Eを変数とするf(E、x)で表され、
前記第1評価値は、f(E、x)を最小化するEのノルムである
ことを特徴とする請求項5に記載の地磁気測定装置。
Figure 0005641236
The objective function is represented by f 2 (E, x), where E is a variable, where E is the first evaluation matrix and x 0 is the center point.
The geomagnetic measurement apparatus according to claim 5, wherein the first evaluation value is a norm of E that minimizes f 2 (E, x).
Figure 0005641236
前記第2評価値は、下記の行列Aの最小固有値である
ことを特徴とする請求項5または6に記載の地磁気測定装置。
Figure 0005641236
The geomagnetic measurement apparatus according to claim 5 or 6, wherein the second evaluation value is a minimum eigenvalue of the following matrix A.
Figure 0005641236
磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する2方向の磁気成分をそれぞれ検出する2次元磁気センサと、
前記機器の姿勢を変化させた場合に前記2次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、前記部品の発生する磁界の成分を示す座標を中心点とする円周近傍に確率的に分布すると仮定して、前記複数の磁気データで示される2軸の座標と前記円周との誤差を最小化するように、前記円周の中心点を算出する中心点算出手段と、
前記複数の磁気データで示される座標が、円周と第1曲線とを重ね合わせることで得られる円周以外の形状の第2曲線の近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記第2曲線との誤差を表す第3目的関数を用いて、前記第3目的関数の表す誤差の値を最小化するときの、前記第3目的関数における前記第1曲線を表す成分に基づく第3評価値を算出し、前記第3評価値が所定の大きさ以下の場合に、前記中心点を、前記2次元磁気センサのオフセットとして採用する、歪判定手段と
を備える地磁気測定装置。
A two-dimensional magnetic sensor that is incorporated in a device including a component that generates a magnetic field and detects magnetic components in two directions orthogonal to each other;
Storage means for storing magnetic data sequentially output from the two-dimensional magnetic sensor when the posture of the device is changed;
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the circumference centered on the coordinates indicating the magnetic field component generated by the component, Center point calculating means for calculating a center point of the circumference so as to minimize an error between the coordinates of the two axes indicated by the magnetic data and the circumference;
Assuming that the coordinates indicated by the plurality of magnetic data are probabilistically distributed in the vicinity of the second curve having a shape other than the circumference obtained by superimposing the circumference and the first curve, the plurality of magnetic data The first curve in the third objective function when the error value represented by the third objective function is minimized by using the third objective function representing the error between the coordinates indicated by the data and the second curve. And a distortion determination unit that calculates a third evaluation value based on a component representing, and adopts the center point as an offset of the two-dimensional magnetic sensor when the third evaluation value is equal to or smaller than a predetermined size. Geomagnetic measuring device.
磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する3方向の磁気成分をそれぞれ検出する3次元磁気センサと、
前記機器の姿勢を変化させた場合に前記3次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と、
を備える地磁気測定装置に用いられるオフセット決定方法であって、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、前記部品の発生する磁界の成分を示す座標を中心点とする中心点算出用球面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される3軸の座標と前記中心点算出用球面との誤差を最小化するように、前記中心点算出用球面の中心点を算出し、
前記複数の磁気データで示される座標が、球面と曲面とを重ね合わせることで得られる非球面の立体の表面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記立体の表面との誤差を表す目的関数を用いて、前記目的関数の表す誤差の値を最小化するときの、前記目的関数における前記曲面を表す成分に基づく第1評価値を算出し、前記第1評価値が所定の大きさ以下の場合に、前記中心点を、前記3次元磁気センサのオフセットとして採用する、
ことを特徴とする、オフセット決定方法。
A three-dimensional magnetic sensor that is incorporated in a device including a component that generates a magnetic field and detects magnetic components in three directions orthogonal to each other;
Storage means for storing magnetic data sequentially output from the three-dimensional magnetic sensor when the posture of the device is changed;
An offset determination method used in a geomagnetism measuring apparatus comprising:
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the center point calculation spherical surface with the coordinates indicating the magnetic field component generated by the component as the center point , Calculating a center point of the center point calculating sphere so as to minimize an error between the three-axis coordinates indicated by the plurality of magnetic data and the center point calculating sphere ;
Assuming that the coordinates indicated by the plurality of magnetic data are probabilistically distributed near the surface of an aspheric solid obtained by superimposing a spherical surface and a curved surface, the coordinates indicated by the plurality of magnetic data and the A first evaluation value based on a component representing the curved surface in the objective function when the error value represented by the objective function is minimized is calculated using an objective function representing an error with the surface of the solid, When the evaluation value is equal to or smaller than a predetermined size, the center point is employed as an offset of the three-dimensional magnetic sensor.
An offset determination method characterized by the above.
磁界を発生させる部品を備えた機器に組み込まれ、互いに直交する3方向の磁気成分をそれぞれ検出する3次元磁気センサと、
前記機器の姿勢を変化させた場合に前記3次元磁気センサから順次出力される磁気データを蓄積する蓄積手段と、
を備える地磁気測定装置に用いられるオフセット決定プログラムであって、
前記蓄積手段に蓄積された前記複数の磁気データで示される座標が、前記部品の発生する磁界の成分を示す座標を中心点とする中心点算出用球面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される3軸の座標と前記中心点算出用球面との誤差を最小化するように、前記中心点算出用球面の中心点を算出する処理と、
前記複数の磁気データで示される座標が、球面と曲面とを重ね合わせることで得られる非球面の立体の表面近傍に確率的に分布すると仮定して、前記複数の磁気データで示される座標と前記立体の表面との誤差を表す目的関数を用いて、前記目的関数の表す誤差の値を最小化するときの、前記目的関数における前記曲面を表す成分に基づく第1評価値を算出し、前記第1評価値が所定の大きさ以下の場合に、前記中心点を、前記3次元磁気センサのオフセットとして採用する処理とを、
コンピュータに実行させるオフセット決定プログラム。
A three-dimensional magnetic sensor that is incorporated in a device including a component that generates a magnetic field and detects magnetic components in three directions orthogonal to each other;
Storage means for storing magnetic data sequentially output from the three-dimensional magnetic sensor when the posture of the device is changed;
An offset determination program used in a geomagnetism measuring device comprising:
Assuming that the coordinates indicated by the plurality of magnetic data stored in the storage means are probabilistically distributed in the vicinity of the center point calculation spherical surface with the coordinates indicating the magnetic field component generated by the component as the center point , so as to minimize the error between the coordinates and the center point calculation spherical three axes indicated by the plurality of magnetic data, the processing for calculating the center point of the center point calculation spherical,
Assuming that the coordinates indicated by the plurality of magnetic data are probabilistically distributed near the surface of an aspheric solid obtained by superimposing a spherical surface and a curved surface, the coordinates indicated by the plurality of magnetic data and the A first evaluation value based on a component representing the curved surface in the objective function when the error value represented by the objective function is minimized is calculated using an objective function representing an error with the surface of the solid, A process of adopting the center point as an offset of the three-dimensional magnetic sensor when one evaluation value is a predetermined size or less;
An offset determination program to be executed by a computer.
JP2011062689A 2011-03-22 2011-03-22 Geomagnetic measurement apparatus, offset determination method, and offset determination program Expired - Fee Related JP5641236B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2011062689A JP5641236B2 (en) 2011-03-22 2011-03-22 Geomagnetic measurement apparatus, offset determination method, and offset determination program
US13/422,152 US9031805B2 (en) 2011-03-22 2012-03-16 Geomagnetic field measurement device, offset determination method, and computer readable recording medium therefor
CN201210077860.6A CN102692608B (en) 2011-03-22 2012-03-22 Geomagnetic field measuring device, offset determination and computer readable recording medium storing program for performing
EP12002040.9A EP2503286A3 (en) 2011-03-22 2012-03-22 Geomagnetic field measurement device, offset determination method, and computer readable recording medium therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011062689A JP5641236B2 (en) 2011-03-22 2011-03-22 Geomagnetic measurement apparatus, offset determination method, and offset determination program

Publications (2)

Publication Number Publication Date
JP2012198112A JP2012198112A (en) 2012-10-18
JP5641236B2 true JP5641236B2 (en) 2014-12-17

Family

ID=47180487

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011062689A Expired - Fee Related JP5641236B2 (en) 2011-03-22 2011-03-22 Geomagnetic measurement apparatus, offset determination method, and offset determination program

Country Status (1)

Country Link
JP (1) JP5641236B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6019585B2 (en) * 2012-01-06 2016-11-02 ヤマハ株式会社 Terminal device
JP6191145B2 (en) * 2013-01-31 2017-09-06 ヤマハ株式会社 Offset estimation apparatus and program
JP2017166895A (en) * 2016-03-15 2017-09-21 カシオ計算機株式会社 Electronic apparatus, sensor calibration method, and sensor calibration program
KR102387818B1 (en) * 2016-10-10 2022-04-18 디스이즈엔지니어링 주식회사 Object controller

Also Published As

Publication number Publication date
JP2012198112A (en) 2012-10-18

Similar Documents

Publication Publication Date Title
US9341475B2 (en) Geomagnetism measurement apparatus
US9031805B2 (en) Geomagnetic field measurement device, offset determination method, and computer readable recording medium therefor
US9335383B2 (en) Magnetic field generating device and offset calculating method
JP6191145B2 (en) Offset estimation apparatus and program
JP2013064695A (en) State estimating device, offset updating method, and offset updating program
JP5469670B2 (en) Geomagnetic detector
JP5706576B2 (en) Offset estimation apparatus, offset estimation method, offset estimation program, and information processing apparatus
JP5927776B2 (en) Portable device
KR20200124734A (en) Method and apparatus for planar magnetometer calibration, heading determination, gyroscope auxiliary magnetometer amplitude calibration, magnetometer amplitude and alignment calibration, magnetometer mapping and sensor fusion
JP5866893B2 (en) Geomagnetic measuring device
KR20140025319A (en) Apparatuses and methods for dynamic tracking and compensation of magnetic near field
JP2012242267A5 (en)
JP5641236B2 (en) Geomagnetic measurement apparatus, offset determination method, and offset determination program
US10325005B2 (en) Apparatuses and methods for calibrating magnetometer attitude-independent parameters
JP5899726B2 (en) Geomagnetism measuring device, geomagnetism measuring method, and geomagnetism measuring program
JP6019585B2 (en) Terminal device
JP5772265B2 (en) Geomagnetic measurement apparatus, offset determination method, and offset determination program
JP2013096724A (en) State estimation device
JP2012189323A (en) Magnetic data processing apparatus, magnetic data processing method and magnetic data processing program
Hu et al. An improved method for the magnetometer calibration based on ellipsoid fitting
JP2011022025A (en) Magnetic data processing device, magnetic data processing method, and magnetic data processing program
JPWO2011129288A1 (en) Geomagnetic detector
JP5498209B2 (en) Magnetic field detector
KR20170092356A (en) System for calibrating azimuth of 3-axis magnetic sensor
JP2013088162A (en) State estimation apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140122

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141001

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141014

R150 Certificate of patent or registration of utility model

Ref document number: 5641236

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees