JP2013124871A - Magnetic measurement data calibration apparatus, azimuth angle measurement device, and buffer - Google Patents
Magnetic measurement data calibration apparatus, azimuth angle measurement device, and buffer Download PDFInfo
- Publication number
- JP2013124871A JP2013124871A JP2011272274A JP2011272274A JP2013124871A JP 2013124871 A JP2013124871 A JP 2013124871A JP 2011272274 A JP2011272274 A JP 2011272274A JP 2011272274 A JP2011272274 A JP 2011272274A JP 2013124871 A JP2013124871 A JP 2013124871A
- Authority
- JP
- Japan
- Prior art keywords
- offset
- measurement data
- magnetic
- magnetic measurement
- unit
- 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.)
- Pending
Links
Images
Landscapes
- Measuring Magnetic Variables (AREA)
Abstract
【課題】オフセットの算出及び有効性を判定する磁気測定データとして、より真値に近いオフセットを算出する磁気測定データを得る磁気測定データ校正装置を提供する。
【解決手段】本発明の磁気測定データ校正装置は、磁気測定データのオフセットを求め、磁気測定データを補正する装置であり、加速度センサからの加速度データから傾斜角を求める傾斜角算出部と、傾斜角の角度範囲との組合毎に磁気測定データを記憶させる領域が設けられた磁気測定データバッファと、磁気センサからの磁気測定データを、傾斜角に対応する領域に書き込む磁気測定データ判定部と、磁気測定データからオフセットを求めるオフセット算出部と、算出オフセットと現在使用している設定オフセットのいずれが確からしいかを、磁気測定データバッファに記憶された磁気データにより判定し、確からしいとするオフセットを新たな設定オフセットとするオフセット有効性判定部とを備える。
【選択図】図1An object of the present invention is to provide a magnetic measurement data calibration apparatus for obtaining magnetic measurement data for calculating an offset closer to a true value as magnetic measurement data for determining offset calculation and validity.
An apparatus for calibrating magnetic measurement data according to the present invention is an apparatus for obtaining an offset of magnetic measurement data and correcting the magnetic measurement data, an inclination angle calculating unit for obtaining an inclination angle from acceleration data from an acceleration sensor, and an inclination A magnetic measurement data buffer provided with an area for storing magnetic measurement data for each combination with an angular range of angles, a magnetic measurement data determination unit for writing magnetic measurement data from a magnetic sensor in an area corresponding to an inclination angle, and The offset calculation unit that calculates the offset from the magnetic measurement data, and whether the calculated offset or the currently used set offset is likely is determined from the magnetic data stored in the magnetic measurement data buffer. An offset validity determination unit for setting a new set offset.
[Selection] Figure 1
Description
本発明は、携帯機器に搭載される磁気センサの校正を行う磁気測定データ校正装置、方位角計測装置及びバッファに関する。 The present invention relates to a magnetic measurement data calibration device, an azimuth measurement device, and a buffer for calibrating a magnetic sensor mounted on a portable device.
近年、携帯電話などの携帯機器に3軸の磁気センサ(以下、単に磁気センサ)が搭載され、携帯機器における方位測定に用いられている。
この方位測定に用いる磁気センサは、通常、携帯機器に搭載する前に、3軸ヘルムホルツコイルを用いて、各軸毎のゼロ磁界出力値の調整(以下、オフセット調整)をしておく。
この具体的な調整手順は、予め校正された磁気センサにより、地磁気の測定を行い、その予め校正された磁気センサの出力する3軸各々の磁気測定データを基準磁気測定データとして、方位測定に用いる。
In recent years, a three-axis magnetic sensor (hereinafter simply referred to as a magnetic sensor) is mounted on a mobile device such as a mobile phone and is used for orientation measurement in the mobile device.
The magnetic sensor used for this azimuth measurement is usually adjusted with a zero magnetic field output value for each axis (hereinafter referred to as offset adjustment) using a triaxial Helmholtz coil before being mounted on a portable device.
In this specific adjustment procedure, geomagnetism is measured by a magnetic sensor calibrated in advance, and magnetic measurement data for each of the three axes output from the magnetic sensor calibrated in advance is used as reference magnetic measurement data for azimuth measurement. .
次に、3軸ヘルムホルツコイルにより、基準磁気測定データと逆方向の磁界を、オフセット調整の対象である対象磁気センサに対して印加する。
ここで、対象磁気センサは、オフセットが無い場合、出力する磁気測定データが3軸共に0であり、オフセットを有する場合、出力する磁気測定データが0ではない。
ここで、対象磁気センサが出力する磁気測定データを、対象磁気センサ自身の有するオフセットとして測定し、この磁気測定データにより、磁気センサの出力する磁気測定データのオフセット調整を行う。
すなわち、磁気センサの出力する磁気測定データから、3軸ヘルムホルツコイルで測定したオフセットを、各磁気測定データから減算し、磁気センサの測定結果として方位検出を行うことになる。
Next, a magnetic field in the direction opposite to the reference magnetic measurement data is applied to the target magnetic sensor that is the target of offset adjustment by the three-axis Helmholtz coil.
Here, when the target magnetic sensor has no offset, the magnetic measurement data to be output is 0 for all three axes, and when it has the offset, the magnetic measurement data to be output is not 0.
Here, the magnetic measurement data output from the target magnetic sensor is measured as an offset of the target magnetic sensor itself, and the offset of the magnetic measurement data output from the magnetic sensor is adjusted based on the magnetic measurement data.
That is, the offset measured by the 3-axis Helmholtz coil is subtracted from each magnetic measurement data from the magnetic measurement data output from the magnetic sensor, and the direction is detected as the measurement result of the magnetic sensor.
しかしながら、磁気センサ単体でオフセット調整を行ったとしても、携帯機器には方位を検出する磁気センサ以外にも多くの他の部品が使われており、これら他の部品が発生する磁界が磁気センサに対して影響を与える場合がある。例えば、スピーカに搭載されている磁石、開閉スイッチに設けられている磁石、あるいは携帯機器の部品に施されたニッケルメッキなどから磁界が発生している。 However, even if the offset adjustment is performed with the magnetic sensor alone, many other parts are used in the portable device in addition to the magnetic sensor that detects the orientation, and the magnetic field generated by these other parts is applied to the magnetic sensor. It may have an effect on it. For example, a magnetic field is generated from a magnet mounted on a speaker, a magnet provided on an open / close switch, or nickel plating applied to a component of a portable device.
このため、携帯機器内部に設けられた磁気センサに対して周囲の環境による環境オフセットが生じ、オフセット調整を行った磁気センサ単体から環境オフセットが重畳した磁気測定データが出力されることになる。
したがって、磁気センサ単体でオフセット調整を行った後、搭載される携帯機器の他の部品が発生する磁界により、携帯機器が向いている実際の方位と、磁気センサが出力する磁気測定データから得られる方位とに、環境オフセットによる差異が生じることになる。
For this reason, an environmental offset due to the surrounding environment occurs with respect to the magnetic sensor provided inside the portable device, and magnetic measurement data in which the environmental offset is superimposed is output from the magnetic sensor alone that has performed the offset adjustment.
Therefore, after performing offset adjustment with a single magnetic sensor, the magnetic field generated by other components of the mobile device to be mounted is obtained from the actual orientation of the mobile device and the magnetic measurement data output by the magnetic sensor. A difference due to the environmental offset occurs in the bearing.
また、磁気センサを他の部品とともに携帯機器に搭載した状態で、3軸ヘルムホルツコイルにより環境オフセットを含めたオフセット調整を行うことが考えられる。
しかしながら、各部品の磁力の経時的な変化や、携帯機器の周囲の温度の変化、さらには携帯機器の周囲に強度の磁界を発生する物体の存在により、環境オフセットの値が常に変動してしまう。
Further, it is conceivable to perform offset adjustment including environmental offset by a three-axis Helmholtz coil in a state where the magnetic sensor is mounted on a portable device together with other components.
However, the value of the environmental offset always fluctuates due to changes in the magnetic force of each component over time, changes in the temperature around the portable device, and the presence of an object that generates a strong magnetic field around the portable device. .
したがって、3軸ヘルムホルツコイルにより、携帯機器に搭載した後に、環境オフセットを含めた磁気センサのオフセット調整を行っても、周囲の状況により環境オフセットが刻々変動する。このため、磁気センサの磁気測定データに重畳する環境オフセットの変動により、磁気センサが出力する磁気測定データが真値に対してずれてしまうことになる。
このため、オフセットを再度行う必要があるが、常に3軸ヘルムホルツコイルにより、携帯機器に搭載された磁気センサのオフセット調整を行うことができない。したがって、3軸ヘルムホルツコイルを使用せずに、自身が磁気センサのオフセット調整を行う機能を、携帯機器に対して持たせる必要がある。
Therefore, even if the offset adjustment of the magnetic sensor including the environmental offset is performed after being mounted on the portable device by the three-axis Helmholtz coil, the environmental offset fluctuates every moment depending on the surrounding conditions. For this reason, the magnetic measurement data output from the magnetic sensor shifts from the true value due to the fluctuation of the environmental offset superimposed on the magnetic measurement data of the magnetic sensor.
For this reason, although it is necessary to perform offset again, the offset adjustment of the magnetic sensor mounted in the portable device cannot always be performed by the three-axis Helmholtz coil. Therefore, it is necessary to give the mobile device the function of adjusting the offset of the magnetic sensor without using the 3-axis Helmholtz coil.
このため、携帯機器に搭載されたオフセット調整部が、3軸各々の磁気センサにより、各軸の磁界の強度を多数測定し、測定した磁気測定データを内部のデータバッファに一旦蓄積し、オフセットを正しい値として算出することが行われている(例えば、特許文献1参照)。
すなわち、特許文献1においては、データバッファに蓄積された磁気測定データと、オフセットとの距離が最小となるように、オフセットの値を決定するという手法が用いられている。
For this reason, the offset adjustment unit mounted on the portable device measures a number of magnetic field strengths of each axis by the magnetic sensors of each of the three axes, temporarily stores the measured magnetic measurement data in the internal data buffer, and sets the offset. Calculation as a correct value is performed (see, for example, Patent Document 1).
That is, in
しかし、この特許文献1の構成の問題点は、データバッファに蓄積されている磁気測定データが、特定点の近傍に集中している場合、すなわち、ピッチ角及びロール角からなる傾斜角が同様な位置における磁気測定データが多い場合、オフセットの推定精度が低下してしまう。
すなわち、ゼロ磁界における磁気センサのゼロ磁界出力をキャンセルするオフセットを算出する際、磁気測定データが偏っていると、算出されるオフセットが偏った磁気測定データの影響を受け、真値のオフセットとに対してずれが生じる。
However, the problem of the configuration of
That is, when calculating the offset that cancels the zero magnetic field output of the magnetic sensor in the zero magnetic field, if the magnetic measurement data is biased, the calculated offset is affected by the biased magnetic measurement data and becomes a true offset. In contrast, a shift occurs.
このため、データバッファに磁気測定データを一旦蓄積した後、蓄積した磁気測定データの傾斜角による領域分割を行い、どの程度に蓄積した磁気測定データの取得した傾斜角がばらついているかを求める。ここで、領域分割とは、例えばオフセットを中心とした球の表面を、例えば、正八面体に分割し、磁気測定データの各々が測定された傾斜角に対応する(傾斜角が含まれる)正八面体にグルーピングする。
このグルーピング結果において、磁気測定データが割り当てられた正八面体の数が設定した値より多い(予め設定した閾値を超えた)場合のみ、オフセット算出を行い、このオフセットに対する真値判定(真値に近いか否かの判定)を行う(例えば、特許文献2参照)。
For this reason, after the magnetic measurement data is temporarily stored in the data buffer, the region of the stored magnetic measurement data is divided by the inclination angle to determine how much the acquired inclination angle of the magnetic measurement data varies. Here, the region division is, for example, a regular octahedron that divides the surface of a sphere centered on an offset into, for example, a regular octahedron and corresponds to the tilt angle at which each of the magnetic measurement data is measured (including the tilt angle). Group.
In this grouping result, the offset calculation is performed only when the number of regular octahedrons to which the magnetic measurement data is assigned is larger than the set value (exceeds a preset threshold value), and the true value determination for this offset (close to the true value) (For example, refer to Patent Document 2).
しかしながら、特許文献2は、データバッファに対して磁気測定データを時系列に記憶させるため、以下に示す状態が発生し、正確なオフセットを得る処理が行われないことがある。
a.データバッファに蓄積されている磁気測定データの全てが、上記正八面体のいずれか一つの面に集中して分布している。
b.データバッファに蓄積されている磁気測定データの大半(例えば、80%以上)が、上記正八面体のいずれか一つの面に集中し、残りの磁気測定データが他の面に分布している。
c.領域分割を行う正八面体を生成する際、球の中心となるオフセット点がずれている。
However, since
a. All of the magnetic measurement data stored in the data buffer is concentrated on one of the regular octahedrons.
b. Most of the magnetic measurement data stored in the data buffer (for example, 80% or more) is concentrated on any one surface of the regular octahedron, and the remaining magnetic measurement data is distributed on the other surface.
c. When generating a regular octahedron that performs region division, the offset point that is the center of the sphere is shifted.
すなわち、上記aの状態の場合、キャリブレーションを行う際、現在分布している面と異なる面に対応する磁気測定データを取得するため、携帯機器の向きをあらゆる角度に向ける(円を描くように回転させる)必要がある。
また、携帯機器の向きによっては、磁気測定データのグルーピングされた面の数が、オフセットを算出するための閾値を超えない。このため、オフセットの算出及び更新が行われず、キャリブレーション時間が長くなり、携帯機器の向きを換える動作をユーザが継続させる必要があり、キャリブレーションが面倒な作業となる。
In other words, in the case of the above-described state a, when performing calibration, the orientation of the portable device is directed to any angle in order to acquire magnetic measurement data corresponding to a surface different from the currently distributed surface (like drawing a circle) Need to be rotated).
In addition, depending on the orientation of the mobile device, the number of the grouped surfaces of the magnetic measurement data does not exceed the threshold for calculating the offset. For this reason, the offset is not calculated and updated, the calibration time becomes long, the user needs to continue the operation of changing the orientation of the portable device, and the calibration becomes a troublesome work.
また、上記bの状態の場合、磁気測定データのグルーピングされた面の数が、オフセットを算出する閾値を超えても、正八面体のいずれかの一面に磁気測定データが集中していると、すでに述べたように、集中した面の磁気測定データの影響を受け、正確なオフセットを算出できない。
すなわち、磁気測定データが集中した面が、オフセットを算出する際の重み付けが他の面に対して大きくなり、真値からずれたオフセットが算出されてしまう。
In the case of the state b, if the magnetic measurement data is already concentrated on one of the regular octahedrons even when the number of grouped surfaces of the magnetic measurement data exceeds the threshold for calculating the offset, As described above, it is not possible to calculate an accurate offset due to the influence of the magnetic measurement data of the concentrated surface.
That is, the surface on which the magnetic measurement data is concentrated has a higher weight when calculating the offset than the other surfaces, and an offset deviated from the true value is calculated.
また、上記cの状態の場合、磁気測定データをグルーピングするための正八面体を作成する際、この正八面体のもととなる球がある程度正確なオフセットを中心としている必要がある。しかし、正八面体を生成する直前のオフセットが正確に算出されていない場合、正八面体にグルーピングすると、本来判定されるべき面(傾斜角の領域)とは異なる面に対応付けられてしまう。
このため、グルーピング自体に信頼性が無く、オフセット算出を行うか否かの判定を行う際、誤判定を起こすことになり、真値からずれたオフセットが算出されてしまう場合や、真値のオフセットが得られるにもかかわらずオフセット算出が行われない場合が発生する。
In the case of the state c, when creating a regular octahedron for grouping the magnetic measurement data, it is necessary that the sphere that forms the regular octahedron is centered on an offset that is accurate to some extent. However, if the offset just before the regular octahedron is not calculated correctly, grouping into the regular octahedron will be associated with a surface that is different from the surface (inclination angle region) that should be determined.
For this reason, the grouping itself is unreliable, and when determining whether or not to perform offset calculation, an erroneous determination occurs, and an offset deviating from the true value may be calculated, or the true value offset In some cases, offset calculation is not performed even though
本発明は、このような事情に鑑みてなされたもので、オフセットの算出、あるいは算出したオフセットの有効性を判定するために用いる磁気測定データとして、より真値に近いオフセットを算出する磁気測定データを得ることが可能な磁気測定データ校正装置、方位角計測装置及びバッファを提供することを目的とする。 The present invention has been made in view of such circumstances, and magnetic measurement data for calculating an offset closer to a true value as magnetic measurement data used for calculating an offset or determining the effectiveness of the calculated offset. An object of the present invention is to provide a magnetic measurement data calibration device, an azimuth angle measurement device, and a buffer that can obtain the above.
この発明は上述した課題を解決するためになされたもので、本発明の磁気測定データ校正装置は、互いに直交する3つの測定軸を有し、測定軸方向の地磁気を測定する軸センサからなる磁気センサから出力される前記測定軸毎の地磁気の測定結果である磁気測定データのオフセットを求め、前記磁気測定データを補正する磁気測定データ校正装置であり、加速度センサから供給される加速度データからロール角及びピッチ角を求める傾斜角算出部と、前記ロール角の角度範囲と前記ピッチ角の角度範囲との組合せ毎に、当該組合せに対応した磁気測定データを記憶させる領域が設けられた磁気測定データバッファと、磁気センサから供給される磁気測定データを、当該磁気測定データの測定時に検出された前記ロール角及び前記ピッチ角に対応する前記領域に対して書き込んで記憶させる磁気測定データ判定部と、前記磁気測定データから前記オフセットを所定の計算により求めるオフセット算出部と、オフセット算出部の求めたオフセットである算出オフセットと、現在使用しているオフセットである設定オフセットのいずれが確からしいかを、前記磁気測定データバッファに記憶された磁気データを用いて判定し、確からしいと判定されたオフセットを新たな設定オフセットとするオフセット有効性判定部とを備えることを特徴とする。 The present invention has been made to solve the above-described problems, and a magnetic measurement data calibration apparatus according to the present invention has three measurement axes orthogonal to each other, and includes a magnetic sensor comprising an axis sensor that measures the geomagnetism in the measurement axis direction. A magnetic measurement data calibration device for obtaining an offset of magnetic measurement data that is a measurement result of geomagnetism for each measurement axis output from a sensor, and correcting the magnetic measurement data, wherein a roll angle is determined from acceleration data supplied from an acceleration sensor. And an inclination angle calculation unit for obtaining a pitch angle, and a magnetic measurement data buffer provided with an area for storing magnetic measurement data corresponding to each combination of the angle range of the roll angle and the angle range of the pitch angle And the magnetic measurement data supplied from the magnetic sensor to the roll angle and the pitch angle detected when measuring the magnetic measurement data. A magnetic measurement data determination unit that writes and stores the area to be stored, an offset calculation unit that obtains the offset from the magnetic measurement data by a predetermined calculation, a calculated offset that is an offset obtained by the offset calculation unit, and a current use The offset validity is determined by using the magnetic data stored in the magnetic measurement data buffer to determine which of the set offsets that are offset is likely, and using the offset determined to be likely as the new set offset. And a determination unit.
本発明の磁気測定データ校正装置は、前記オフセット算出部が、測定された磁気測定データの前記測定軸毎の磁気測定データと、前回求められたオフセットとの差分から誤差関数を求める誤差関数計算部と、前記誤差関数及び前回求められた共分散行列からオフセット残差を算出するオフセット残差計算部と、前回の前記磁気測定データの測定時に設定した前記設定オフセットに対し、前記オフセット残差を加算し、前記算出オフセットを算出するオフセット更新部と、測定された前記磁気測定データを用い、以前に測定された前記磁気測定データを母集団とする磁気測定データの共分散行列を更新し、測定された前記磁気測定データを前記母集団に加えて新たな共分散行列を生成する共分散行列更新部とを備えることを特徴とする。 In the magnetic measurement data calibration apparatus of the present invention, the offset calculation unit calculates an error function from the difference between the magnetic measurement data for each measurement axis of the measured magnetic measurement data and the previously obtained offset. An offset residual calculation unit for calculating an offset residual from the error function and the previously obtained covariance matrix, and adding the offset residual to the set offset set at the time of the previous measurement of the magnetic measurement data The offset update unit for calculating the calculated offset and the measured magnetic measurement data are used to update the covariance matrix of the magnetic measurement data using the previously measured magnetic measurement data as a population. And a covariance matrix updating unit that generates a new covariance matrix by adding the magnetic measurement data to the population.
本発明の磁気測定データ校正装置は、前記オフセット算出部が、前記領域に書き込まれている磁気測定データと仮のオフセットとの差分をそれぞれの測定軸毎に算出して二乗して領域毎に加算し、この加算結果を前記磁気測定データバッファに磁気測定データが記憶されている全ての領域で加算し、この加算結果が最小となる前記仮のオフセットを前記算出オフセットとすることを特徴とする。 In the magnetic measurement data calibration apparatus according to the present invention, the offset calculation unit calculates the difference between the magnetic measurement data written in the area and the temporary offset for each measurement axis, squares it, and adds it for each area. Then, the addition result is added to all the areas where the magnetic measurement data is stored in the magnetic measurement data buffer, and the temporary offset that minimizes the addition result is used as the calculated offset.
本発明の磁気測定データ校正装置は、前記オフセット有効性判定部が、前記磁気測定データから算出した前記算出オフセットと、前記磁気測定データバッファに記憶されている磁気データとの差分の標準偏差である第1の標準偏差を求め、また現在使用している前記設定オフセットと、前記磁気測定データバッファに記憶されている磁気データとの差分の標準偏差である第2の標準偏差を求め、前記第1の標準偏差と前記第2の標準偏差とを比較し、比較結果により前記算出オフセット及び前記設定オフセットのいずれを、新たな設定オフセットとするかの判定を行うことを特徴とする。 The magnetic measurement data calibration apparatus of the present invention is a standard deviation of a difference between the calculated offset calculated from the magnetic measurement data by the offset validity determination unit and the magnetic data stored in the magnetic measurement data buffer. A first standard deviation is obtained, and a second standard deviation which is a standard deviation of a difference between the set offset currently used and the magnetic data stored in the magnetic measurement data buffer is obtained, and the first standard deviation is obtained. The standard deviation is compared with the second standard deviation, and it is determined which of the calculated offset and the set offset is a new set offset based on the comparison result.
本発明の方位角計測装置は、互いに直交する3つの測定軸を有し、測定軸方向の地磁気を測定する軸センサからなる磁気センサと、互いに直交する3つの測定軸を有し、測定軸方向の加速度を測定する加速度センサと、前記磁気センサから出力される前記測定軸毎の地磁気の測定結果である磁気測定データのオフセットを求め、前記磁気測定データを補正する磁気測定データ校正部と、前記磁気測定データ校正装置から出力される、前記磁気測定データを校正した磁気校正データから方位角を算出する方位角計測部とを備え、加速度センサから供給される加速度データからロール角及びピッチ角を求める傾斜角算出部と、前記ロール角の角度範囲とピッチ角の角度範囲との組合せ毎に、当該組合せに対応した磁気測定データを記憶させる領域が設けられた磁気測定データバッファと、磁気センサから供給される磁気測定データを、当該磁気測定データの測定時に検出された前記ロール角及び前記ピッチ角に対応する前記領域に対して書き込んで記憶させる磁気測定データ判定部と、前記磁気測定データから前記オフセットを所定の計算により求めるオフセット算出部と、オフセット算出部の求めたオフセットである算出オフセットと、現在使用しているオフセットである設定オフセットのいずれが確からしいかを、前記磁気測定データバッファに記憶された磁気データを用いて判定し、確からしいと判定されたオフセットを新たな設定オフセットとするオフセット有効性判定部とを備えることを特徴とする。 The azimuth measuring device of the present invention has three measurement axes orthogonal to each other, and includes a magnetic sensor composed of an axis sensor for measuring geomagnetism in the measurement axis direction, and three measurement axes orthogonal to each other, and the measurement axis direction An acceleration sensor that measures the acceleration of the magnetic field, a magnetic measurement data calibration unit that obtains an offset of magnetic measurement data that is a measurement result of the geomagnetism for each measurement axis that is output from the magnetic sensor, and corrects the magnetic measurement data; An azimuth angle measurement unit that calculates an azimuth angle from magnetic calibration data obtained by calibrating the magnetic measurement data output from the magnetic measurement data calibration device, and determines a roll angle and a pitch angle from acceleration data supplied from an acceleration sensor. An area for storing magnetic measurement data corresponding to each combination of an inclination angle calculation unit and the roll angle angle range and the pitch angle angle range. The magnetic measurement data buffer provided and the magnetic measurement data supplied from the magnetic sensor are written and stored in the area corresponding to the roll angle and the pitch angle detected when measuring the magnetic measurement data. Any one of a measurement data determination unit, an offset calculation unit that obtains the offset from the magnetic measurement data by a predetermined calculation, a calculated offset that is an offset obtained by the offset calculation unit, and a set offset that is an offset currently used An offset validity determination unit that determines whether it is probable using the magnetic data stored in the magnetic measurement data buffer and uses the offset determined to be probable as a new set offset is provided.
本発明のバッファは、互いに直交する3つの測定軸を有し、測定軸方向の地磁気を測定する軸センサからなる磁気センサから出力される前記測定軸毎の地磁気の測定結果である磁気測定データのオフセットを求め、前記磁気測定データを補正する、加速度センサから供給される加速度データからロール角及びピッチ角を求める傾斜角算出部と、前記磁気測定データから前記オフセットを所定の計算により求めるオフセット算出部と、オフセット算出部の求めたオフセットである算出オフセットと、現在使用しているオフセットである設定オフセットのいずれが確からしいかを、前記磁気測定データバッファに記憶された磁気データを用いて判定し、磁気測定データを前記磁気センサから取得する磁気測定データ判定部と、確からしいと判定されたオフセットを新たな設定オフセットとするオフセット有効性判定部とからなる磁気測定データ校正装置に用いられるバッファであり、前記ロール角の角度範囲と前記ピッチ角の角度範囲との組合せ毎に、当該組合せに対応した磁気測定データを記憶させる領域が設けられ、前記磁気測定データ判定部により、磁気センサから供給される磁気測定データが、当該磁気測定データの測定時に検出された前記ロール角及び前記ピッチ角に対応する前記領域に対して書き込まれることを特徴とする。 The buffer according to the present invention has three measurement axes orthogonal to each other, and outputs magnetic measurement data that is a measurement result of the geomagnetism for each measurement axis output from a magnetic sensor including an axis sensor that measures the geomagnetism in the measurement axis direction. An inclination angle calculation unit for obtaining an offset and correcting the magnetic measurement data, obtaining a roll angle and a pitch angle from acceleration data supplied from an acceleration sensor, and an offset calculation unit for obtaining the offset from the magnetic measurement data by a predetermined calculation And using the magnetic data stored in the magnetic measurement data buffer to determine which of the calculated offset that the offset calculation unit has obtained and the set offset that is currently used offset is likely, A magnetic measurement data determination unit that acquires magnetic measurement data from the magnetic sensor, and is determined to be probable. Is a buffer used in a magnetic measurement data calibration device comprising an offset validity determination unit that uses the offset as a new set offset, and for each combination of the roll angle angle range and the pitch angle angle range, the combination An area for storing magnetic measurement data corresponding to the magnetic measurement data is provided, and the roll angle and the pitch angle detected by the magnetic measurement data determination unit when the magnetic measurement data supplied from the magnetic sensor is measured. It is written in the area corresponding to.
この発明によれば、オフセットの算出、あるいは算出したオフセットの有効性を判定するために用いる磁気測定データとして、3次元空間においてピッチ角及びロール角を所定の間隔の角度範囲にて設定し、3次元空間におけるオフセットを中心とする全方位を示す球面上を、ピッチ角の角度範囲とロール角の角度範囲との組の各々が指定する領域に分割し、磁気測定データバッファにおける領域毎に設定した記憶領域に、ピッチ角及びロール角が対応する磁気測定データを書き込むため、全方位においてばらついた磁気測定データを蓄積することができる。
これにより、この発明によれば、球面状におけるばらついた領域に蓄積された磁気測定データを、オフセットの算出あるいは算出したオフセットの有効性の判定に用いることができ、磁気測定データの特定方向における重み付けによるオフセットの偏りを抑制し、従来に比較してより真値に近いオフセットを算出することができる。
According to the present invention, the pitch angle and the roll angle are set in a three-dimensional space within an angle range of a predetermined interval as magnetic measurement data used for calculating the offset or determining the effectiveness of the calculated offset. The spherical surface showing the omni-direction centered on the offset in the dimensional space is divided into regions designated by each of the pitch angle angle range and roll angle angle range, and each region in the magnetic measurement data buffer is set. Since the magnetic measurement data corresponding to the pitch angle and the roll angle is written in the storage area, the magnetic measurement data that varies in all directions can be accumulated.
As a result, according to the present invention, the magnetic measurement data accumulated in the dispersed region in the spherical shape can be used for calculating the offset or determining the effectiveness of the calculated offset, and weighting the magnetic measurement data in a specific direction. This makes it possible to calculate the offset closer to the true value as compared with the conventional case.
<第1の実施形態>
以下、図面を参照して、本発明の第1の実施形態について説明する。図1は、この発明の第1の実施形態による磁気測定データ校正装置を用いた方位角計測装置の構成例を示す概略ブロック図である。この方位角計測装置は、携帯機器などに搭載される。
本実施形態の方位角計測装置は、磁気測定データ校正装置1、磁気センサ2、加速度センサ3及び方位角計測部4から構成されている。
<First Embodiment>
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing a configuration example of an azimuth measuring device using the magnetic measurement data calibration device according to the first embodiment of the present invention. This azimuth measuring device is mounted on a portable device or the like.
The azimuth measuring device of the present embodiment includes a magnetic measurement
磁気センサ2は、互いに直交する3つの測定軸を有し、測定軸の各々に対応した地磁気を測定する軸センサから構成されている。この磁気センサ2は、例えば、X軸方向の測定軸における磁界の強度を示す磁気測定データMxを測定するX軸方向磁気検出部21、Y軸方向の測定軸における磁界の強度を示す磁気測定データMyを測定するY軸方向磁気検出部22、Z軸方向の測定軸における磁界の強度を示す磁気測定データMzを測定するZ軸方向磁気検出部23とから構成された、X軸、Y軸及びZ軸の3軸の測定軸を有する磁気センサである。ここで、X軸方向磁気検出部21、Y軸方向磁気検出部22及びZ軸方向磁気検出部23は、例えば、ホール素子、磁気抵抗素子、フラックスゲート型磁気素子などが用いられる。また、X軸方向磁気検出部21、Y軸方向磁気検出部22、Z軸方向磁気検出部23の各々の測定軸は直交している。
The
加速度センサ3は、互いに直交する3つの測定軸を有し、測定軸の各々に対応した加速度を測定する軸センサから構成されている。この加速度センサ3は、例えば、X軸方向の測定軸における加速度の強度を示す加速度データSxを測定するX軸加速度検出部31、Y軸方向の測定軸における加速度の強度を示す加速度データSyを測定するY軸加速度検出部32、Z軸方向の測定軸における加速度の強度を示す加速度データSzを測定するZ軸加速度検出部33とから構成された、X軸、Y軸及びZ軸の3軸の測定軸を有する加速度センサである。また、X軸加速度検出部31、Y軸加速度検出部32、Z軸加速度検出部33の各々の測定軸は直交している。
The
磁気測定データ校正装置1は、磁気センサ2から供給される、磁気測定データMx、磁気測定データMy及び磁気測定データMzからなる磁気測定データM(Mx,My,Mz)のオフセットを、加速度センサ3の出力する傾斜角(ロール角及びピッチ角)に基づいて校正した磁気校正データMf(Mfx,Mfy,Mfz)を出力する。
方位角計測部4は、磁気測定データ校正装置1が校正した磁気校正データMf(Mfx,Mfy,Mfz)を用い、方位角計測装置の向いている方位を出力する。
Magnetic measurement
The
次に、磁気測定データ校正装置1は、傾斜角算出部11、磁気測定データ判定部12、磁気測定データバッファ13、オフセット算出部14、磁気測定データ処理部15、オフセット記憶部16及びオフセット有効性判定部17を備えている。
Next, the magnetic measurement
傾斜角算出部11は、以下に説明するように、ロール角及びピッチ角からなる傾斜角を算出する。
すなわち、傾斜角算出部11は、加速度センサ3の検出した重力の傾きの程度から自身の傾斜角を計算する。
次に、図2は、加速度センサ3により求まる絶対座標系と、磁気センサ2の検出するセンサ座標系との各軸のずれを説明する図である。
図2において、3次元の絶対座標系を校正するX軸、Y軸及びZ軸を定義する。そして、X軸を回転軸とした回転角度をピッチ角(p)とし、Y軸を回転軸とした回転角度をロール角(r)とし、Z軸を回転軸とした回転角度を方位角(θ)とする。
The inclination
That is, the inclination
Next, FIG. 2 is a diagram for explaining the deviation of each axis between the absolute coordinate system obtained by the
In FIG. 2, an X axis, a Y axis, and a Z axis for calibrating a three-dimensional absolute coordinate system are defined. The rotation angle with the X axis as the rotation axis is the pitch angle (p), the rotation angle with the Y axis as the rotation axis is the roll angle (r), and the rotation angle with the Z axis as the rotation axis is the azimuth angle (θ ).
上記絶対座標系とは、本実施形態においては、重力ベクトル(重力の方向及び大きさを示すベクトル量)に対してX軸とY軸とにより形成される平面が垂直であり、磁気センサ2の測定する磁気測定データM(Mx,My,Mz)の全てがゼロとなる地点を原点Oとした座標系としている。
また、センサ座標系は、磁気センサ2が測定する磁気測定データM(Mx,My,Mz)が形成する座標系である。このため、磁気センサ2が磁気測定データM(Mx,My,Mz)を測定する測定点毎にセンサ座標系は異なる。
In the present embodiment, the absolute coordinate system means that the plane formed by the X axis and the Y axis is perpendicular to the gravity vector (vector quantity indicating the direction and magnitude of gravity), and the magnetic sensor 2 A coordinate system having the origin O as a point where all of the magnetic measurement data M (Mx, My, Mz) to be measured becomes zero.
The sensor coordinate system is a coordinate system formed by magnetic measurement data M (M x , M y , M z ) measured by the
しかしながら、ユーザが携帯した携帯機器を、絶対座標系におけるX軸及びY軸のなす平面と、磁気センサの測定軸、すなわちセンサ座標系におけるX軸(Mxの測定軸)及びY軸(Myの測定軸)のなす平面とを平行とすることは困難である。
そのため、磁気センサ2により方位角を推定する場合、常に絶対座標系におけるX軸及びY軸のなす平面に対して、磁気センサ2のセンサ座標系におけるX方向の測定軸(X軸検出磁界)とY方向の測定軸(T軸検出磁界)とのなす平面が平行であれば、周囲の環境による磁界の変化などの影響があっても、常に、傾斜センサとして用いた3軸加速度センサの測定する重力ベクトルにより、磁気センサ2、すなわち方位角計測装置の傾斜角を正確に測定することができる。
However, the mobile device user portable, and form planes of X-axis and Y-axis of the absolute coordinate system, the measurement axis of the magnetic sensor, that is, the X axis in the sensor coordinate system (measurement axis of the M x) and Y-axis (M y It is difficult to make the plane formed by the measurement axis) parallel to each other.
Therefore, when the azimuth angle is estimated by the
このときに、方位角計測装置(携帯機器)が地表に対して水平状態である場合、加速度センサ3の出力する加速度計測データを、加速度計測データS(Sx,Sy,Sz)とする。一方、方位角計測装置が地表に対して傾斜状態である場合、加速度センサ3の出力する加速度計測データを、加速度計測データS’(Sx’,Sy’,Sz’)とする。
このとき、加速度計測データS(Sx,Sy,Sz)と加速度計測データS’(Sx’,Sy’,Sz’)との関係は、以下の(1)式により示される。
At this time, when the azimuth measuring device (portable device) is in a horizontal state with respect to the ground surface, the acceleration measurement data output from the
At this time, the relationship between the acceleration measurement data S (S x , S y , S z ) and the acceleration measurement data S ′ (S x ′, S y ′, S z ′) is expressed by the following equation (1). .
そして、ユーザの携帯する携帯機器が傾斜状態にあるとき、この傾斜状態での重力加速度で規格化された加速度センサ3の出力を加速度計測データA(Ax,Ay,Az)とすると、地表面に対して方位計測装置が水平状態にある場合、A(Ax,Ay,Az)=A(0,0,1)であるため、上記(1)式は以下に示す(2)式となる。
When the portable device carried by the user is in an inclined state, the output of the
したがって、傾斜角算出部11は、加速度センサ3の出力する加速度計測データA(Ax,Ay,Az)を用い、ピッチ角(p)が以下に示す(3)式から、また、ロール角(r)が以下に示す(4)式により算出する。
Therefore, the tilt
次に、図3は、磁気測定データバッファ13に記憶される磁気測定データを格納する磁気測定データテーブルの構成例を示す図である。ここで、磁気測定データバッファ13は、磁気測定データを格納する磁気測定データテーブルが記憶されるバッファである。
上記図3において、磁気測定データテーブルは、磁気測定データを取得した位置のロール角及びピッチ角の組合せの傾斜角と、磁気測定データが記憶されているか否かを示すフラグと、磁気測定データを取得した時刻を示す時間情報と、測定された磁気測定データとが、領域毎に記憶される構成となっている。
Next, FIG. 3 is a diagram showing a configuration example of a magnetic measurement data table that stores magnetic measurement data stored in the magnetic
In FIG. 3, the magnetic measurement data table includes an inclination angle of a combination of a roll angle and a pitch angle at a position where the magnetic measurement data is acquired, a flag indicating whether or not the magnetic measurement data is stored, and magnetic measurement data. Time information indicating the acquired time and measured magnetic measurement data are stored for each region.
次に、図4は、オフセットを中心とした球を傾斜角により分割して生成する領域を説明する図である。
領域は、オフセットを中心とした球における磁気測定データの位置が含まれる、ロール角及びピッチ角の各々の範囲を示している。すなわち、磁気測定データバッファ13における領域数は、傾斜角(ロール角及びピッチ角)の測定範囲を一定角度で分割した数で決定される。例えば、オフセットOを中心として全方位を表すためには、ピッチ角pが−90°から90°までの範囲、ロール角rが−180°から180°までの範囲が測定できていれば良い。
Next, FIG. 4 is a diagram for explaining a region generated by dividing a sphere centered at an offset by an inclination angle.
The area indicates each range of the roll angle and the pitch angle including the position of the magnetic measurement data in the sphere with the offset as the center. That is, the number of regions in the magnetic
このとき、ピッチ角及びロール角の各々を30°の一定角度毎に分割すると、ピッチ角pの分割数が6個、またロール角rの分割数が12個となる。
したがって、これらのピッチ角p及びロール角rの各々の角度範囲の組合せの数は72となり、領域は72種類となる。
図3に戻り、磁気測定データバッファ13は、記憶容量として、上述のようにピッチ角及びロール角の組合せ数から決定される領域数に比例した数のバッファ数を設けるように構成する。
したがって、従来のように同一方向のベクトルを有する磁気測定データが集中して蓄積されるのではなく、同一のベクトルを有する磁気測定データが供給された場合、対応する磁気測定データバッファ13の領域に、時間の新しい磁気測定データが蓄積される。このため、3次元空間における全方位の方向を示す球面上の異なる位置の磁気測定データ、すなわちばらついた方向のベクトルを有する磁気測定データが磁気測定データバッファ13に蓄積されることになる。
At this time, when each of the pitch angle and the roll angle is divided at a constant angle of 30 °, the number of divisions of the pitch angle p is 6, and the number of divisions of the roll angle r is 12.
Therefore, the number of combinations of the angle ranges of these pitch angle p and roll angle r is 72, and there are 72 types of regions.
Returning to FIG. 3, the magnetic
Therefore, the magnetic measurement data having the same direction vector is not concentrated and accumulated as in the prior art, but when the magnetic measurement data having the same vector is supplied, the corresponding magnetic
次に、磁気測定データバッファ13における磁気測定データが、図4に示す球面状に近づく理由について以下に説明する。図4においては、傾斜角が変化した場合の磁気測定データの軌跡について説明している。
傾斜角が0(ロール角r及びピッチ角pの双方が0)の状態において、携帯機器を地平面に対して平行な円の円周を一回転させた場合、磁気測定データMzは、図4に示すように、一定の球面上の下、すなわち球の下部の面の円周上の軌跡をたどることになる。
また、傾斜角においてロール角rが0°であり、ピッチ角pが30°である状態において、携帯機器を地平面に対して平行な円の円周を一回転させた場合、磁気測定データMzは、図4に示すように、上述した軌跡をX軸回りに30°傾けた円周上の軌跡をたどることになる。
Next, the reason why the magnetic measurement data in the magnetic
In a state where the tilt angle is 0 (both the roll angle r and the pitch angle p are 0), when the portable device is rotated once around the circumference of a circle parallel to the ground plane, the magnetic measurement data M z is As shown in FIG. 4, the trajectory is traced down on a certain spherical surface, that is, on the circumference of the lower surface of the sphere.
Further, when the roll angle r is 0 ° and the pitch angle p is 30 ° at the tilt angle, the magnetic measurement data M is obtained when the portable device is rotated once around the circle parallel to the ground plane. As shown in FIG. 4, z follows a locus on a circumference obtained by inclining the locus described above by 30 ° around the X axis.
上述した磁気測定データバッファ13に対する磁気測定データの格納方法は、例えば後述する図3あるいは図6に示すように、ピッチ角pの角度範囲を0°から30°、ロール角rの角度範囲を0°から30°の組合せを、領域R1として設定している。磁気測定データバッファ13における領域R1のアドレスバッファに対し、ロール角rの角度範囲とピッチ角pの角度範囲とにおいて、図4に示したそれぞれの円周の間に挟まれる領域の磁気測定データが書き込まれる可能性がある。
すなわち、ロール角r及びピッチ角pの各々の角度範囲を限定することにより、図4の球における磁気測定データの取り得る範囲を限定することができ、しかもその範囲は球面の一部となる。このように、球の面を領域として分割し(すなわち、オフセットを中心とした全方位を角度範囲により領域として分割し)、それぞれの領域に対応する磁気測定データを磁気測定データバッファ13に書き込んで記憶させることにより、各磁気測定データM(Mx,My,Mz)の分布が球面に近づくことになる。
The magnetic measurement data is stored in the magnetic
That is, by limiting the angle ranges of the roll angle r and the pitch angle p, it is possible to limit the range of magnetic measurement data that can be taken in the sphere of FIG. 4, and the range becomes a part of a spherical surface. In this way, the surface of the sphere is divided into regions (that is, all directions around the offset are divided into regions according to the angle range), and magnetic measurement data corresponding to each region is written into the magnetic
また、磁気測定データバッファ13は、予め領域が設定されており、領域R1が例えばロール角rが0度から30度の範囲、ピッチ角pが0度から30度の範囲として設定されている。
また、領域R2がロール角rが0度から30度の範囲、ピッチ角pが31度から60度の範囲として設定され、他の領域R3から領域R72も同様にロール角r及びピッチ角pの範囲で設定されている。
The magnetic
Further, the region R2 is set so that the roll angle r is in the range of 0 to 30 degrees, and the pitch angle p is in the range of 31 to 60 degrees, and the other regions R3 to R72 are similarly set to the roll angle r and the pitch angle p. It is set with a range.
このロール角rの角度範囲とピッチ角pの角度範囲とによる組合せ数、すなわち領域数を設定する際、分割する領域は細かければ細かいほど磁気測定データの軌跡(磁気測定データバッファ13に記憶される磁気測定データの検出する位置)が球面状に近づくことになる。
しかしながら、傾斜角の測定精度より、角度範囲が小さくなると、測定誤差を有するロール角r及びピッチ角pとの組合せにより、異なったバッファアドレスが対応アドレスから読み出されることになる。
すなわち、磁気測定データバッファ13において本来格納すべきバッファアドレスに書き込むことができなくなり、オフセット算出部14の行うオフセット算出処理や、オフセット有効性判定部17が行うオフセット有効性判定処理で誤った結果を出力することになる。
When setting the number of combinations by the angle range of the roll angle r and the angle range of the pitch angle p, that is, the number of regions, the smaller the region to be divided, the smaller the track of the magnetic measurement data (stored in the magnetic measurement data buffer 13). The position of the magnetic measurement data detected) approaches a spherical shape.
However, if the angle range becomes smaller than the measurement accuracy of the tilt angle, different buffer addresses are read out from the corresponding addresses by the combination of the roll angle r and the pitch angle p having measurement errors.
In other words, the magnetic
また、分割する領域は細かければ細かいほど、上述したように、磁気測定データバッファ13における領域数が多くなり、オフセット算出部14がオフセット座標O(Ox,Oy,Oz)を算出する際の時間が増加することになる。
このため、本実施形態においては、ピッチ角pの分割数を18個とし、ロール角rの分割数を36個とし、ピッチ角pの角度範囲及びロール角rの角度範囲の組合せの数である領域数を、648個とする。ここで、角度範囲のステップ数は10°ごとに設定されている。
Further, as the area to be divided becomes finer, the number of areas in the magnetic
Therefore, in the present embodiment, the number of divisions of the pitch angle p is 18, the number of divisions of the roll angle r is 36, and the number of combinations of the angle range of the pitch angle p and the angle range of the roll angle r is the number. The number of areas is 648. Here, the number of steps in the angle range is set every 10 °.
図1に戻り、磁気測定データ判定部12は、磁気センサ2から磁気測定データM(Mx、My、Mz)の取得に同期し、傾斜角算出部11から傾斜角データ(ロール角r及びピッチ角p)を取得する。
すなわち、磁気測定データ判定部12は、磁気測定データM(Mx、My、Mz)と、この磁気測定データM(Mx、My、Mz)を取得した位置の傾斜角とを取得する。
また、磁気測定データ判定部12は、図示しない計時を行うタイマから、磁気測定データMを取得した時刻を読み込む。
これにより、磁気測定データ判定部12は、傾斜角におけるロール角rとピッチ角pとの組合せが含まれる領域を磁気測定データバッファ13において抽出する。
Returning to FIG. 1, the magnetic measurement
That is, the magnetic measurement
Further, the magnetic measurement
Thereby, the magnetic measurement
ここで、磁気測定データ判定部12は、ロール角rの角度範囲とピッチ角pの角度範囲との組合せと、磁気測定データバッファ13のバッファアドレスとを対応付けた対応テーブルが、内部記憶部に予め書き込まれて記憶されている。
したがって、磁気測定データ判定部12は、取得した磁気測定データM(Mx、My、Mz)が検出された位置のピッチ角pとロール角rとが含まれるロール角rの角度範囲とピッチ角pの角度範囲との組合せを内部記憶部から検出する。
そして、磁気測定データ判定部12は、ロール角rの角度範囲とピッチ角pの角度範囲との組合せに対応して記憶されているバッファアドレス(領域毎の記憶位置を示すアドレス)を内部記憶部から読み出す。
Here, the magnetic measurement
Therefore, the magnetic measurement
Then, the magnetic measurement
磁気測定データ判定部12は、磁気測定データバッファ13において、内部記憶部から読み出したバッファアドレスに対して、取得した磁気測定データM(Mx、My、Mz)を磁気測定データの欄(書き込み領域)に書き込んで記憶させる。
このとき、磁気測定データ判定部12は、磁気測定データM(Mx、My、Mz)を書き込むとともに、磁気測定データバッファ13の読み出したバッファアドレスに対応して、傾斜角の欄にロール角r及びピッチ角pを書き込み、フラグの欄に磁気測定データを書き込んだことを示すフラグ情報を書き込み、磁気測定データMと取得した際の時刻を時間情報の欄に書き込む。
In the magnetic
At this time, the magnetic measurement
ここで、磁気測定データ判定部12は、磁気測定データを書き込む領域に、すでに磁気測定データが書き込まれている場合、これから書き込もうとする磁気測定データとすでに書き込まれている磁気測定データとのいずれが新しい磁気測定データかの検出を行う。
すなわち、磁気測定データ判定部12は、これから書き込もうとする磁気測定データとすでに書き込まれている磁気測定データとの各々の時間情報を比較し、時刻が遅いほうの磁気測定データを新しいとして判定する。
これにより、磁気測定データ判定部12は、書き込まれている磁気測定データが新しい場合、書き込もうとする磁気測定データを破棄し、書き込まれている磁気測定データが古い場合、書き込もうとする磁気測定データを上書きする。
Here, when the magnetic measurement data is already written in the area in which the magnetic measurement data is written, the magnetic measurement
That is, the magnetic measurement
Thereby, the magnetic measurement
オフセット算出部14は、磁気測定データバッファ13の磁気測定データテーブルから、各領域のフラグの欄を検索し、フラグ情報が設定されている領域を検出し、この領域から磁気測定データMを読み出し、オフセットの算出を行う。
例えば、オフセット算出部14は、以下の(5)式により、オフセットを算出する。
The offset
For example, the offset
この(5)式において、Ox,Oy,Ozがオフセットの値(オフセット座標O(Ox,Oy,Oz))であり、Rが定数であり、Xi、Yi及びZiの各々が、ぞれぞれの領域における磁気測定データMx、My、Mzである。
したがって、オフセット算出部14は、上述した(5)式を用い、領域毎に、磁気測定データMx、My、Mzの各々から、それぞれOx、Oy、Ozを減算した数値を二乗した数値を加算し、加算した数値からR2を減算し、この減算結果を全領域で加算して評価値Gを求める。このとき、オフセット算出部14は、Ox、Oy、Ozの各々を仮の値として変化させつつ、評価値Gが最小となるOx、Oy、Ozの組合せを求め、この組合せをオフセット座標O(Ox,Oy,Oz)として出力する。
In the equation (5), O x , O y , and O z are offset values (offset coordinates O (O x , O y , O z )), R is a constant, and each of Xi, Yi, and Zi Are the magnetic measurement data M x , M y , M z in the respective regions.
Therefore, the offset
オフセット有効性判定部17は、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)と、磁気測定データバッファ13に記憶されている磁気測定データM(Mx、My、Mz)との領域毎の差分を算出し、全領域における差分の標準偏差σ1を求める。
また、オフセット有効性判定部17は、新たに算出した算出オフセットであるオフセット座標O(Ox,Oy,Oz)と、磁気測定データバッファ13に記憶されている設定オフセットである磁気測定データM(Mx、My、Mz)との領域毎の差分を算出し、全領域における差分の標準偏差σ2を求める。
The offset
The offset
ここで、オフセット有効性判定部17は、標準偏差σ1と標準偏差σ2とを比較し、標準偏差σ1が標準偏差σ2より小さい場合、オフセット記憶部16の書き換えを行わない。
一方、オフセット有効性判定部17は、標準偏差σ2が標準偏差σ1より小さい場合、すなわち、新たなオフセットが、すでにオフセット記憶部16に記憶されているオフセット座標より確からしいと判定した場合、オフセット記憶部16に対して新たなオフセット座標O(Ox,Oy,Oz)を上書きする。
上述した方法により、球面状に近い多数の磁気測定データを用いて、オフセット座標と磁気測定データとの距離との差分の標準偏差σを算出するため、球面を推定する信頼性が高くなる。
Here, the offset
On the other hand, when the standard deviation σ2 is smaller than the standard deviation σ1, that is, when it is determined that the new offset is more likely than the offset coordinates already stored in the offset
Since the standard deviation σ of the difference between the offset coordinate and the distance between the magnetic measurement data is calculated by using the above-described method using a large number of magnetic measurement data close to a spherical shape, the reliability of estimating the spherical surface is increased.
また、上述した標準偏差σを求めて、算出したオフセット座標O(Ox,Oy,Oz)の有効性を判定するのではなく、他の方法において、算出したオフセット座標O(Ox,Oy,Oz)の有効性を判定する構成としても良い。
例えば、オフセット有効性判定部17は、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)と、新たに算出されたオフセット座標O(Ox,Oy,Oz)との差分を求め、この差分を有効性の判定に用いる構成としても良い。
すなわち、オフセット有効性判定部17は、内部記憶部に予め閾値が予め書き込まれて記憶されている。この閾値は、例えば、地磁気の大きさに設定されている。
Further, instead of determining the above-described standard deviation σ and determining the effectiveness of the calculated offset coordinates O (O x , O y , O z ), the calculated offset coordinates O (O x , It is good also as a structure which determines the effectiveness of Oy , Oz ).
For example, the offset
That is, the offset
オフセット有効性判定部17は、求めた差分が閾値を超える場合、新たに算出したオフセット座標O(Ox,Oy,Oz)が誤っている可能性が高いため、新たなオフセット座標O(Ox,Oy,Oz)を破棄し、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)をそのままとする。
一方、オフセット有効性判定部17は、求めた差分が閾値以下の場合、新たに算出したオフセット座標O(Ox,Oy,Oz)が正しい可能性が高いため、新たなオフセット座標O(Ox,Oy,Oz)を、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)に対して上書きする。
If the calculated difference exceeds the threshold value, the offset
On the other hand, when the calculated difference is equal to or smaller than the threshold value, the offset
また、他の有効性を判定する方法として、オフセット有効性判定部17は、オフセット座標O(Ox,Oy,Oz)と磁気測定データバッファ13の各領域の磁気測定データとの距離を、領域毎に算出する。
オフセット有効性判定部17は、領域毎に算出された磁気測定データの各々に対応する距離の中から、最大値と最小値との差を判定値に用いる構成としてもよい。この判定値が大きければ大きいほど、オフセット座標O(Ox,Oy,Oz)が磁気測定データバッファ13の各領域の磁気測定データの各々から等距離にない、すなわち球の中心ではないことを意味している。
As another method for determining the validity, the offset
The offset
ここで、オフセット有効性判定部17は、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)に対応する判定値D1と、新たに算出したオフセット座標O(Ox,Oy,Oz)の判定値D2とを求める。
そして、オフセット有効性判定部17は、判定値D1が判定値D2以下である(D1≦D2)場合、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)が、新たに算出されたオフセット座標O(Ox,Oy,Oz)より有効であると判定する。
したがって、オフセット有効性判定部17は、新たなオフセット座標O(Ox,Oy,Oz)を破棄し、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)をそのままとする。
Here, the offset
When the determination value D1 is equal to or less than the determination value D2 (D1 ≦ D2), the offset
Therefore, the offset
一方、オフセット有効性判定部17は、判定値D1が判定値D2以上である(D1>D2)場合、新たに算出されたオフセット座標O(Ox,Oy,Oz)が、現在使用されているオフセット、すなわちオフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)より有効であると判定する。
したがって、オフセット有効性判定部17は、新たなオフセット座標O(Ox,Oy,Oz)を、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)に対して上書きする。
On the other hand, when the determination value D1 is greater than or equal to the determination value D2 (D1> D2), the offset
Therefore, the offset
オフセット記憶部16は、オフセット座標O(Ox,Oy,Oz)が、オフセット有効性判定部17により書き込まれて記憶されている。
磁気測定データ処理部15は、磁気センサ2から取得された磁気測定データMから、オフセット座標を減算し、この減算結果を補正後の磁気測定データとし、磁気校正データMf(Mfx,Mfy,Mfz)として、方位角計測部4に対して出力する。
方位角計測部4は、磁気測定データ校正装置1が構成した磁気校正データMf(Mfx,Mfy,Mfz)を用い、方位角計測装置の向いている方位を出力する。
In the offset
The magnetic measurement
The
次に、図1及び図5を用いて、本実施形態の磁気測定データ校正装置1における磁気測定データの校正を行う処理について説明する。図5は、磁気センサ2が検出した磁気測定データMを校正する処理の動作例を示すフローチャートである。
ステップS1:
磁気測定データ判定部12は、外部からユーザが設定した全方位におけるピッチ角pの角度範囲及びロール角rの角度範囲とにより、領域数を決定し、磁気測定データバッファ13における各領域を示すバッファアドレスと、領域におけるピッチ角r及びロール角rの角度範囲の組合せとを対応付けた対応テーブルを作成する。ここでのバッファアドレスは、すでに説明したように、磁気測定データバッファ13内における各領域の各欄のアドレスを示している。
そして、磁気測定データ判定部12は、作成した対応テーブルを内部記憶部に書き込んで記憶させる。すなわち、磁気測定データ判定部12は、磁気測定データバッファ13に対して、磁気測定データを書き込む領域を確保する。
Next, a process for calibrating magnetic measurement data in the magnetic measurement
Step S1:
The magnetic measurement
Then, the magnetic measurement
また、磁気測定データ判定部12の内部記憶部に対し、予め固定されたテーブルとして磁気測定データバッファ13における各領域を示すバッファアドレスと、領域におけるピッチ角r及びロール角rの角度範囲の組合せとを対応付けた対応テーブルを書き込んで記憶させておいても良い。
そして、磁気測定データ判定部12は、磁気測定データバッファ13における全ての領域のフラグを初期化する。すなわち、磁気測定データ判定部12は、磁気測定データバッファにおける全てのフラグの欄のフラグ情報を削除し、磁気測定データが書き込まれていない状態に変更する。
Further, a buffer address indicating each area in the magnetic
Then, the magnetic measurement
ステップS2:
磁気測定データ判定部12は、磁気測定データM(Mx,My,Mx)を磁気センサ2から読み込むととともに、傾斜角算出部11に対して傾斜角の算出を行う制御信号を出力する。
この制御信号により、傾斜角算出部11は、加速度センサ3から加速度計測データS(Sx,Sy,Sz)を読み込む。
そして、傾斜角算出部11は、加速度計測データSから、すでに述べたように、ロール角r及びピッチ角pを算出し、算出したロール角r及びピッチ角pの傾斜角データを磁気測定データ判定部12に対して出力する。
Step S2:
The magnetic measurement
With this control signal, the tilt
Then, as described above, the inclination
ステップS3:
磁気測定データ判定部12は、傾斜角データにおけるロール角r及びピッチ角pの各々が含まれるロール角rの角度範囲及びピッチ角pの角度範囲の組合せを、内部記憶部から検索する。
次に、磁気測定データ判定部12は、検索したロール角rの角度範囲及びピッチ角pの角度範囲の組合せに対応する、磁気測定データバッファ13における領域のバッファアドレスを読み出す。
Step S3:
The magnetic measurement
Next, the magnetic measurement
そして、磁気測定データ判定部12は、磁気測定データバッファ13に対して、内部記憶部から読み出したバッファアドレスに、磁気測定データM(Mx,My,Mx)を書き込んで記憶させるとともに、フラグの欄にフラグ情報を書き込む。
また、磁気測定データ判定部12は、磁気測定データMを書き込んだバッファアドレスに対し、磁気測定データM(Mx,My,Mx)を読み込んだ時刻を示す時刻情報と、傾斜角算出部11の算出した傾斜角データとの各々を書き込んで記憶させる。
The magnetic measurement
The magnetic measurement
ステップS4:
オフセット算出部14は、磁気測定データバッファ13からフラグ情報が書き込まれている領域を抽出し、抽出した領域の磁気測定データを読み出す。
そして、オフセット算出部14は、磁気測定データバッファ13から読み出した磁気測定データから、すでに説明したように、オフセット座標O(Ox,Oy,Oz)を算出する。
(5)式を用いる統計的処理の方法による算出を行うことにより、他の方法に比較してより精度の高いオフセット座標O(Ox,Oy,Oz)を得ることができる。
すなわち、球面上にまんべんなく分布する多くの磁気測定データを用いて、統計的な推定を行うため、より真値に近いオフセット座標O(Ox,Oy,Oz)を算出することができる。
Step S4:
The offset
Then, the offset
By performing the calculation by the statistical processing method using the equation (5), it is possible to obtain offset coordinates O (O x , O y , O z ) with higher accuracy than other methods.
That is, since statistical estimation is performed using a lot of magnetic measurement data distributed evenly on the spherical surface, offset coordinates O (O x , O y , O z ) closer to true values can be calculated.
ステップS5:
オフセット有効性判定部17は、すでに説明したいずれかの方法により、新たに算出したオフセット座標O(Ox,Oy,Oz)と、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)とのいずれに有効性があるかの判定を行う。
そして、オフセット有効性判定部17は、新たに算出したオフセット座標O(Ox,Oy,Oz)が、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)より有効性があると判定した場合、オフセット記憶部16に新たに算出したオフセット座標O(Ox,Oy,Oz)を書き込む。
Step S5:
The offset
Then, the offset
一方、オフセット有効性判定部17は、オフセット記憶部16に記憶されているオフセット座標O(Ox,Oy,Oz)が、新たに算出したオフセット座標O(Ox,Oy,Oz)より有効性があると判定した場合、オフセット記憶部16のオフセット座標O(Ox,Oy,Oz)を書き換えない。
そして、磁気測定データ判定部12は、上述したステップS2からステップS5の処理を繰り返して行い、周期的にオフセット記憶部16のオフセット座標O(Ox,Oy,Oz)の更新処理を行う。
On the other hand, the offset
And the magnetic measurement
上述した本実施形態によれば、球の領域を分割し、それぞれの領域に対応する磁気測定データを磁気測定データバッファ13の磁気データ測定テーブルに書き込んで記憶させるため、各領域に記憶されている磁気測定データM(Mx,My,Mz)の分布が球面に近づく。
このため、本実施形態によれば、球の中心座標をまんべんなく取り囲むように、磁気測定データを限られた磁気測定データバッファ13に有効書き込むことができ、オフセット算出部14がこれらの磁気測定データを用いて、精度の高いオフセット座標座標O(Ox,Oy,Oz)を算出することができる。
According to the above-described embodiment, the sphere regions are divided, and the magnetic measurement data corresponding to the respective regions are written in the magnetic data measurement table of the magnetic
For this reason, according to the present embodiment, the magnetic measurement data can be effectively written in the limited magnetic
次に、図6は、磁気測定データバッファ13に記憶される、検出された磁気測定データを格納する磁気測定データテーブルの他の構成例を示す図である。
また、本実施形態においては、図3に示すように、各領域に1個の磁気測定データが記憶される構成の磁気測定データテーブルの構成としていた。
しかしながら、図6に示すように、1つの領域に複数の磁気測定データを蓄積する磁気測定データテーブルの構成としても良い。
Next, FIG. 6 is a diagram showing another configuration example of the magnetic measurement data table stored in the magnetic
Further, in the present embodiment, as shown in FIG. 3, the magnetic measurement data table has a configuration in which one magnetic measurement data is stored in each area.
However, as shown in FIG. 6, a configuration of a magnetic measurement data table that accumulates a plurality of magnetic measurement data in one area may be adopted.
このとき、オフセット算出部14は、(5)式を用い、各領域の磁気測定データ毎にオフセットとの差の二乗を求め、各領域内でこの二乗和を求め、さらに全領域においてこの二乗和を加算し、評価値Gを求める。
また、磁気測定データ判定部12は、各領域に磁気測定データが書き込む際、フラグの欄の全てにフラグ情報が書き込まれている場合、時間情報における最も古い時刻の磁気測定データに上書きする。
これにより、本実施形態において、より球面状に近づく磁気測定データのデータ群を、磁気測定データバッファ13に格納することができる。
At this time, the offset
In addition, when the magnetic measurement data is written in each area, the magnetic measurement
Thereby, in this embodiment, the data group of the magnetic measurement data which approaches a more spherical shape can be stored in the magnetic
<第2の実施形態>
以下、図面を参照して、本発明の第2の実施形態について説明する。図7は、この発明の第2の実施形態による磁気測定データ校正装置を用いた方位角計測装置の構成例を示す概略ブロック図である。この方位各計測装置は、第1の実施形態と同様に、携帯機器などに搭載される。
本実施形態の方位計測装置は、磁気測定データ校正装置1A、磁気センサ2、加速度センサ3及び方位角計測部4から構成されている。
図7において、第1の実施形態と同様の構成については、同一の符号を付し、説明を省略する。
<Second Embodiment>
The second embodiment of the present invention will be described below with reference to the drawings. FIG. 7 is a schematic block diagram showing a configuration example of an azimuth measuring device using the magnetic measurement data calibration device according to the second embodiment of the present invention. Each azimuth measuring device is mounted on a portable device or the like as in the first embodiment.
The azimuth measuring apparatus according to this embodiment includes a magnetic measurement data calibration apparatus 1A, a
In FIG. 7, the same components as those of the first embodiment are denoted by the same reference numerals, and the description thereof is omitted.
磁気測定データ校正装置1Aは、磁気センサ2から供給される、磁気測定データMx、磁気測定データMy及び磁気測定データMzからなる磁気測定データM(Mx,My,Mz)のオフセットを、加速度センサ3の出力する傾斜角(ロール角及びピッチ角)に基づいて校正した磁気校正データMf(Mfx,Mfy,Mfz)を出力する。
以下、第1の実施形態と異なる構成及び動作についてのみ説明する。
Magnetic measurement data correcting device 1A is supplied from the
Only the configuration and operation different from the first embodiment will be described below.
本実施形態において、補正すべきオフセットを、オフセットO(Ox,Oy,Oz)とする。ここで、OxはX軸方向のオフセットであり、OyはY軸方向のオフセットであり、OzはZ軸方向のオフセットである。
また、磁気測定データMn(Mxn,Myn,Mzn)は、n番目の磁気測定データである。また、地磁気ベクトルの大きさ(以下、全磁力)をRとする。
ここで、全磁力は、磁気測定データMn(Mxn,Myn,Mzn)とオフセットO(Ox,Oy,Oz)とを用い、以下の(6)式により、求められる。
In the present embodiment, an offset to be corrected is an offset O (O x , O y , O z ). Here, O x is an offset in the X-axis direction, O y is an offset in the Y-axis direction, and O z is an offset in the Z-axis direction.
The magnetic measurement data M n (M xn , M yn , M zn ) is the nth magnetic measurement data. The magnitude of the geomagnetic vector (hereinafter referred to as total magnetic force) is R.
Here, the total magnetic force is obtained by the following equation (6) using the magnetic measurement data M n (M xn , M yn , M zn ) and the offset O (O x , O y , O z ).
この(6)式の関係は常に成り立つ。すなわち、携帯機器を携帯するユーザの移動の際、携帯機器が回転することにより、磁気測定データにおける各測定軸方向の磁気測定データが変化する。しかしながら、この磁気測定データから検出される全磁力が変化しない限り、磁気測定データをX軸、Y軸及びZ軸からなる3次元空間の座標点として配置すると、磁気測定データは測定軸からなる3次元空間において、同一の球面上のいずれかの位置に存在する(この点については従来例と同様に同一球面上で移動することを仮定している)。
したがって、全磁力が同一であるならば、上述した(6)式の関係は、磁気測定データにおける各測定軸方向の磁気測定データが変化したとしても、常に成り立つことになる。
The relationship of this equation (6) always holds. That is, when the user who carries the portable device moves, the magnetic measurement data in each measurement axis direction in the magnetic measurement data changes as the portable device rotates. However, as long as the total magnetic force detected from the magnetic measurement data does not change, when the magnetic measurement data is arranged as coordinate points in a three-dimensional space consisting of the X axis, the Y axis, and the Z axis, the magnetic measurement data consists of 3 measurement axes. It exists at any position on the same sphere in the dimensional space (this point is assumed to move on the same sphere as in the conventional example).
Therefore, if the total magnetic force is the same, the relationship of the above-described equation (6) always holds even if the magnetic measurement data in each measurement axis direction in the magnetic measurement data changes.
上記(6)式において、4個の磁気測定データMを用いることにより、オフセットOの各測定軸におけるオフセット成分Ox、Oy、Oz、全磁力Rを、算出することができる。
ここで、(1)式を変形するため、以下の(7)式に示す定数Qを定義する。
In the above formula (6), by using the four pieces of magnetic measurement data M, the offset components O x , O y , O z and the total magnetic force R in each measurement axis of the offset O can be calculated.
Here, in order to modify the equation (1), a constant Q shown in the following equation (7) is defined.
上記(6)式を用いて(5)式を行列の構成とすることにより、以下の(8)式のように変形する。 By using the above formula (6) and formulating the formula (5) as a matrix, the following formula (8) is transformed.
上記(8)式を解くことにより、オフセット成分Ox、Oy、Oz、全磁力Rを求めることができる。このとき、(8)式の左辺の逆行列が存在することが必要である。
しかしながら、実際の磁気測定データMには、携帯機器の各部品からのまたは外部からの磁気ノイズが重畳している。
このため、(8)式から算出されるオフセット成分Ox、Oy、Oz、全磁力Rは正確な値を得ることができない場合がある。
したがって、統計的な手法、すなわちRLS(Recursive Least Square:再帰的最小二乗)法を用いて、磁気ノイズを低減することにより、オフセット成分Ox、Oy、Oz、全磁力Rの最も真値に近いと考えられる推定値(以下、最尤推定値)を算出する。最尤推定値が算出できる説明は後述する。以下、本実施形態における、RLS法を用いた磁気測定データの校正について説明する。
By solving the above equation (8), the offset components O x , O y , O z , and the total magnetic force R can be obtained. At this time, it is necessary that an inverse matrix on the left side of the equation (8) exists.
However, magnetic noise from each part of the portable device or from the outside is superimposed on the actual magnetic measurement data M.
For this reason, the offset components O x , O y , O z and the total magnetic force R calculated from the equation (8) may not be able to obtain accurate values.
Therefore, by using a statistical method, that is, RLS (Recursive Least Square) method, by reducing the magnetic noise, the most true value of the offset components O x , O y , O z , the total magnetic force R is obtained. An estimated value considered to be close to (hereinafter, maximum likelihood estimated value) is calculated. The description that the maximum likelihood estimated value can be calculated will be described later. Hereinafter, calibration of magnetic measurement data using the RLS method in the present embodiment will be described.
この磁気測定データ校正装置1Aは、図7に示すように、測定データ入力部10、傾斜角算出部11、磁気測定データ判定部12、磁気測定データバッファ13、オフセット算出部14A、磁気測定データ処理部15、オフセット記憶部16及びオフセット有効性判定部17を備えている。
測定データ入力部10は、X軸方向磁気検出部21、Y軸方向磁気検出部22及びZ軸方向磁気検出部23の各々から入力されるアナログ値の軸センサ測定値を、デジタル値に変換して出力する。ここで、X軸方向磁気検出部21、Y軸方向磁気検出部22及びZ軸方向磁気検出部23の各々は、自身の感知方向で検出した磁場に対応した、アナログ値である電圧値を磁気測定データとして出力する。
また、測定データ入力部10は、アナログ値の磁気測定データM(Mx,My,Mz)を、デジタル値の磁気測定データM(Mx、My、Mz)に変換する際、アナログ値の磁気測定データに含まれているオフセット値を除去するため、磁気センサ単体でのオフセット調整を行うようにしてもよい。
As shown in FIG. 7, the magnetic measurement data calibration apparatus 1A includes a measurement
The measurement
The measurement
図8は、上述したRLSを用いた磁気測定データの構成を行うオフセット算出部14Aの構成例を示すブロック図である。
オフセット算出部14Aは、共分散行列計算部14A_1、共分散行列更新部14A_2、誤差関数計算部14A_3、オフセット残差計算部14A_4、オフセット更新部14A_5及び記憶部14A_6を備えている。
共分散行列計算部14A_2は、後述するオフセット残差計算部14A_4において用いる共分散行列Pの初期値を、以下の(9)式のように設定する。
FIG. 8 is a block diagram illustrating a configuration example of the offset
The offset
The covariance matrix calculation unit 14A_2 sets the initial value of the covariance matrix P used in the offset residual calculation unit 14A_4 described later as shown in the following equation (9).
この(9)式において、共分散行列計算部14A_1は、定数αを、例えば1.000から100.000までの範囲で設定する。
また、(9)式における左辺の4行×4列の行列における磁気測定データを示す列行列を、以下の(10)式のベクトルznとして定義する。
In equation (9), the covariance matrix calculator 14A_1 sets the constant α in a range from 1.000 to 100.000, for example.
In addition, a column matrix indicating magnetic measurement data in a matrix of 4 rows × 4 columns on the left side in the equation (9) is defined as a vector z n in the following equation (10).
また、(9)式における左辺の4行×1列の行列を、以下の(11)式のオフセットのベクトルxnとして定義する。 Further, a matrix of 4 rows × 1 column on the left side in the equation (9) is defined as an offset vector x n in the following equation (11).
上記(11)式は、n番目の磁気測定データを用いて更新された際のオフセットOn(Oxn,Oyn,Ozn)と全磁力から計算された定数Qnからなるベクトルを示す行列である。 The above equation (11) is a matrix indicating a vector composed of an offset O n (O xn , O yn , O zn ) and constant Q n calculated from the total magnetic force when updated using the n-th magnetic measurement data. It is.
誤差関数計算部14A_3は、以下の(12)式を用いて、誤差関数enを算出する。 Error function calculation unit 14A_3, using the following equation (12) calculates an error function e n.
すなわち、誤差関数計算部14A_3は、n番目に測定された磁気測定データMnと、前回算出したオフセットOn−1(n−1番目の磁気測定データMn−1を用いて求めたオフセット)と、前回算出した全磁力Rn−1(n−1番目の磁気測定データMn−1を用いて求めた全磁力)とから、誤差関数enを算出する。
ここで、誤差関数計算部14A_3は、磁気測定データMnとオフセットOnとの距離の二乗と、全磁力Rn−1の二乗を算出し、磁気測定データMnとオフセットOnとの距離の二乗から、全磁力Rn−1の二乗を減算し、減算結果を誤差関数enとする。ここで、磁気測定データMnとオフセットOnとの距離とは、測定軸であるX軸、Y軸及びZ軸からなる3次元空間において、磁気測定データMnとオフセットOn−1とを配置した際の、磁気測定データMnとオフセットOn−1との座標点の距離である。
That is, the error function calculation unit 14A_3 uses the n-th measured magnetic measurement data M n and the previously calculated offset On -1 (the offset obtained using the (n-1) th magnetic measurement data M n-1 ). If, because the (total magnetic force were determined using n-1 th magnetic measurement data M n-1) total force R n-1 previously calculated, to calculate the error function e n.
Here, the error function calculator 14A_3, the distance and the square of the distance between the magnetic measurement data M n and the offset O n, calculates the square of the total magnetic R n-1, a magnetic measurement data M n and the offset O n from square, subtracting the square of the total magnetic R n-1, the subtraction result and the error function e n. Here, the distance between the magnetic measurement data M n and the offset O n, X-axis is the measurement axis, in 3-dimensional space consisting of Y-axis and Z-axis, and the offset O n-1 magnetometric data M n This is the distance between the coordinate points of the magnetic measurement data M n and the offset On -1 when arranged.
オフセット残差計算部14A_4は、誤差関数計算部14A_3の求めた誤差関数enと、前回測定時に求めた共分散行列Pn−1とを用い、以下の(13)式により、オフセット残差ηを算出する。 Offset residual calculator 14A_4 includes error function e n obtained error function calculator 14A_3, using a covariance matrix P n-1 obtained at the previous measurement, the following equation (13), offset residual η Is calculated.
この(13)式において、忘却係数ρは、RLS法で用いられる定数である。一般的に、0.95<ρ<1の範囲に設定される。 In this equation (13), the forgetting factor ρ is a constant used in the RLS method. Generally, it is set in the range of 0.95 <ρ <1.
共分散行列更新部14A_2は、磁気測定データMnを共分散行列の母集団に含めた際の共分散行列Pnを、(10)式の行列znと、(10)式の転置行列zn Tと、磁気測定データM0からMn−1を母集団とする共分散行列Pn−1と、忘却係数ρとを用い、以下に示す(14)式により算出する。すなわち、共分散行列更新部14A_2は、測定された磁気測定データMnを用い、以前に測定された磁気測定データを母集団とする磁気測定データの共分散行列Pn−1を更新し、測定された磁気測定データMnを母集団に加えて新たな共分散行列Pnを生成する。 The covariance matrix updating unit 14A_2 uses the covariance matrix P n when the magnetic measurement data M n is included in the covariance matrix population as the matrix z n in the equation (10) and the transposed matrix z in the equation (10). and n T, the covariance matrix P n-1 to a population of M n-1 from the magnetic measurement data M 0, using the forgetting factor [rho, is calculated by the following shown (14). That is, the covariance matrix updating unit 14A_2 uses the measured magnetic measurement data M n to update the covariance matrix P n−1 of the magnetic measurement data whose population is the previously measured magnetic measurement data, and performs measurement. The obtained magnetic measurement data M n is added to the population to generate a new covariance matrix P n .
オフセット更新部14A_5は、直前の磁気測定データMn−1から求めたオフセットベクトルxn−1と、オフセット残差ηとから、磁気測定データMnに対応するオフセットベクトルxnを、以下の(15)式により算出する。 Offset updating unit 14A_5 is offset vector x n-1 obtained from the magnetometric data M n-1 immediately preceding, from the offset residual eta, the offset vector x n corresponding to the magnetic measurement data M n, the following ( 15) Calculated by the equation.
図7の磁気測定データ処理部15は、磁気測定データMnの磁気測定データMxn、Myn、Mznの各々から、オフセットベクトルXnにおけるOxn、Oyn、Oznをそれぞれ減算し、磁気校正データMf(Mfx,Mfy,Mfz)を算出する。
オフセット更新部14A_5は、後述するオフセット有効性判定部17の制御信号により、有効とされたオフセットベクトルXnに対応する共分散行列Pと、オフセットベクトルxと、全磁力Rとを、記憶部14A_6に書き込んで記憶させる。共分散行列P、オフセットベクトルx及び全磁力Rの各々は、それぞれ書き込まれる際に、次の算出において用いられる直前のデータである、共分散行列Pn−1、オフセットベクトルXn−1及び全磁力Rn−1として書き込まれる。また、同様に、オフセット更新部14A_5は、後述するオフセット有効性判定部17の制御信号により、オフセットベクトルXn−1及び全磁力Rn−1を、オフセット記憶部16に対して書き込んで記憶させる。
また、記憶部14_Aには、共分散行列Pの初期値、忘却係数ρ、(10)式、(11)式、(12)式、(13)式、(14)式、(15)式が予め書き込まれて記憶されている。
The magnetic measurement
The offset update unit 14A_5 stores the covariance matrix P corresponding to the valid offset vector Xn, the offset vector x, and the total magnetic force R in the storage unit 14A_6 according to the control signal of the offset
In addition, the initial value of the covariance matrix P, the forgetting coefficient ρ, the expressions (10), (11), (12), (13), (14), and (15) are stored in the storage unit 14_A. Pre-written and stored.
また本実施形態において、オフセット有効性判定部17は、磁気センサ2から読み込んだ磁気測定データMnから求めたオフセットOnが有効か否かの判定を行い、オフセットOnが有効でないと判定した場合、前回求めたオフセットOn−1を新たなオフセットOnとして用いる。
このとき、オフセット有効性判定部17は、有効性を判定する際に用いる磁気測定データを磁気測定データバッファ13から読み込んで用いる。
すなわち、磁気測定データバッファ13には、すでに説明したように、傾斜角のピッチ角pの角度範囲及びロール角rの角度範囲の組合せ数に対応したデータバッファが設けられている。ここで、磁気測定データバッファ13において、フラグにフラグ情報が書き込まれている領域の磁気測定データがオフセット有効性判定部17の有効性判定の処理に用いられる。例えば、第1の実施形態と同様に、648個の領域が設けられ、このうち200個の磁気測定データMに対応する領域のフラグにフラグ情報が書き込まれている場合、この200個の磁気測定データが磁気測定データM1からM200までの磁気測定データとして、オフセット有効性判定部17により、磁気測定データバッファ13から読み出されて用いられることになる。
In the present embodiment, the offset
At this time, the offset
That is, as already described, the magnetic
ここで、磁気測定データ判定部12は、磁気測定データMnを測定した検出したロール角r及びピッチ角pの組合せが含まれる角度範囲に対応した領域を内部記憶部の対応テーブルから検索し、磁気測定データバッファ13の検索された領域に対して磁気測定データMnを書き込んで記憶させている。
このとき、オフセット有効性判定部17は、1つの領域に複数の磁気測定データが記憶されている(図6の磁気測定データテーブルの構成の)場合、磁気測定データバッファ13の検索された領域における最も古い磁気測定データに、新たな磁気測定データMnを上書きする。すなわち、オフセット有効性判定部17は、磁気測定データ判定部12がオフセット計算をして更新すると判定された磁気測定データのみをデータに書き込んで記憶させる。
Here, the magnetic measurement
At this time, when a plurality of magnetic measurement data are stored in one area (in the configuration of the magnetic measurement data table in FIG. 6), the offset
また、オフセット有効性判定部17は、オフセット記憶部16からオフセットOn−1と、全磁力Rn−1とを読み出し、このオフセットのベクトルをO1(O1x,O1y,O1z)とし、全磁力をR1とする。
オフセット有効性判定部17は、以下の(16)式により、磁気測定データバッファ13に記憶され、フラグにフラグ情報が記述されている磁気測定データM1からMnの各々と、オフセットのベクトルO1との距離d1nをそれぞれ算出する。
Further, the offset
The offset
すなわち、オフセット有効性判定部17は、磁気測定データM毎に、磁気測定データMxからオフセットO1xを減算した結果を二乗し、磁気測定データMyからオフセットO1yを減算した結果を二乗し、磁気測定データMzからオフセットO1zを減算した結果を二乗する。
そして、オフセット有効性判定部17は、それぞれ二乗した結果を加算し、加算結果の平方根を算出することで、距離d1nを求める。ここで、オフセット有効性判定部17は、磁気測定データM1からMnの各々に対応し、距離d11からd1nの各々を求める。
また、オフセット有効性判定部17は、以下の(17)式により、評価値G1を算出する。
That is, for each magnetic measurement data M, the offset
And the offset
Moreover, the offset
すなわち、オフセット有効性判定部17は、距離d11からd1nの各々から、それぞれ全磁力R1を減算し、減算結果毎に二乗して、減算結果の二乗の総和を求めるため、全ての二乗結果を加算し、加算結果である二乗の総和を評価値G1とする。
また、オフセット有効性判定部17は、磁気センサ2から読み込んだ磁気測定データMnから求めたオフセットOnのオフセットのベクトルをO2(O2x,O2y,O2z)とし、このベクトルO2(O2x,O2y,O2z)と、磁気測定データMnとから新たに全磁力R2を求める。
そして、オフセット有効性判定部17は、以下の(18)式により、データバッファに記憶されている磁気測定データM1からMnの各々に対応する距離d2nを算出する。
That is, the offset
Further, the offset
Then, the offset
すなわち、オフセット有効性判定部17は、磁気測定データM毎に、磁気測定データMxからオフセットO2xを減算した結果を二乗し、磁気測定データMyからオフセットO2yを減算した結果を二乗し、磁気測定データMzからオフセットO2zを減算した結果を二乗する。
そして、オフセット有効性判定部17は、それぞれ二乗した結果を加算し、加算結果の平方根を算出することで、距離d2nを求める。ここで、オフセット有効性判定部17は、磁気測定データM1からMnの各々に対応し、距離d21からd2nの各々を求める。
また、オフセット有効性判定部17は、以下の(19)式により、評価値G2を算出する。
That is, the offset
And the offset
Further, the offset
すなわち、オフセット有効性判定部17は、距離d21からd2nの各々から、それぞれ全磁力R2を減算し、減算結果毎に二乗して、減算結果の二乗の総和を求めるため、全ての二乗結果を加算し、加算結果である二乗の総和を評価値G2とする。
評価値G1及びG2を算出すると、オフセット有効性判定部17は、この評価値G1と評価値G2の比較を行う。
このとき、オフセットO1と全磁力R1とが真値になっている場合、評価値G1が真値であり、オフセットO2と全磁力R2とが真値になっている場合、評価値G2が真値である。すなわち、オフセットO1と全磁力R1とが真値に近くなるほど評価値G1が小さくなり、また、オフセットO2と全磁力R2とが真値に近くなるほど評価値G2が小さくなると考えられる。
That is, the offset
When the evaluation values G1 and G2 are calculated, the offset
At this time, when the offset O 1 and the total magnetic force R 1 are true values, the
したがって、オフセット有効性判定部17は、評価値G1及びG2を比較し、評価値G2が評価値G1未満である(G2<G1)場合、新たに算出されたオフセットOn及び全磁力Rnが前回算出したオフセットOn−1及び全磁力Rn−1より真値に近いと判定する。
一方、オフセット有効性判定部17は、評価値G2が評価値G1以上である(G2≧G1)場合、前回算出したオフセットOn−1及び全磁力Rn−1が新たに算出されたオフセットOn及び全磁力Rnより真値に近いか、あるいは同様と判定する。
Therefore, the offset
On the other hand, when the evaluation value G2 is equal to or greater than the evaluation value G1 (G2 ≧ G1), the offset
ここで、オフセット有効性判定部17は、G2<G1の場合、新たに算出されたオフセットOn及び全磁力Rnを、磁気測定データ処理部15へ出力するとともに、オフセットを更新することを示す制御信号を、オフセット更新部14A_5に対して出力する。
オフセット更新部14A_5は、前回算出したオフセットOn−1を更新することを示す制御情報が供給されると、オフセット記憶部16及び記憶部14A_6に記憶されているオフセットOn−1対して、新たに算出されたオフセットOnを上書きする。これにより、記憶部14_6には最新のオフセットOnが保持される。
また、オフセット有効性判定部17は、G2≧G1の場合、オフセット記憶部16及び記憶部14A_6に記憶されているオフセットの値と全磁力Rとを、磁気測定データ処理部15へ出力するとともに、オフセットを更新しないことを示す制御信号を、オフセット更新部14A_5に対して出力する。
オフセット更新部14A_5は、オフセットを更新しないことを示す制御情報が供給されると、記憶部14_6に記憶されている前回算出したオフセットOn−1を上書きせず、前回算出したオフセットOn−1の値の更新処理を行わない。これにより、オフセット記憶部16及び記憶部14A_6には、最新のオフセットとして、前回算出したオフセットOn−1と同じ値のオフセットOnが保持される。
また、第2の実施形態においても、第1の実施形態におけるオフセット有効性判定部17によるオフセット有効性判定と同様の処理を行い、オフセット記憶部16及び記憶部14A_6に格納するオフセットの有効性を判定しても良い。
Here, the offset
Offset updating unit 14A_5, when the control information indicating that updating the offset O n-1 previously calculated is supplied, the offset O n-1 for that is stored in the offset
Further, when G2 ≧ G1, the offset
Offset updating unit 14A_5, when the control information indicating that no update the offset is supplied, without overwriting the offset O n-1 calculated last time is stored in the storage unit 14_6, the offset O n-1 previously calculated Do not update the value of. Thus, in the offset
Also in the second embodiment, the same processing as the offset validity determination by the offset
次に、図7、図8及び図9を用いて、本実施形態の磁気測定データ校正装置1Aにおける磁気測定データの校正を行う処理について説明する。図9は、磁気センサ2が検出した磁気測定データMを校正する処理の動作例を示すフローチャートである。
ステップS11:
磁気測定データ判定部12は、携帯機器の電源が投入されると、第1の実施形態におけるステップS1と同様に、傾斜角におけるピッチ角pの角度範囲及びロール角rの角度範囲の組合せの数に対応した領域を、磁気測定データバッファ13に対して確保する。
また、磁気測定データ判定部12は、確保した領域におけるフラグの欄を全て初期化し、磁気測定データが書き込まれていない状態とし、処理をステップS12へ進める。
Next, processing for calibrating magnetic measurement data in the magnetic measurement data calibration apparatus 1A of the present embodiment will be described with reference to FIGS. FIG. 9 is a flowchart showing an operation example of processing for calibrating the magnetic measurement data M detected by the
Step S11:
When the power of the portable device is turned on, the magnetic measurement
In addition, the magnetic measurement
ステップS12:
共分散行列計算部14A_1は、オフセットO及び全磁力Rの初期化を行う。
このとき、例えば、オフセットOの初期化の値としては磁気センサ2の単体で3軸ヘルムホルツコイルにて測定されたオフセット値が記憶部14_6に予め書き込まれて記憶されている。また、全磁力Rの初期化の値としては、複数の地域における地磁気基準値が記憶部14_6に予め書き込まれて記憶されている。
Step S12:
The covariance matrix calculator 14A_1 initializes the offset O and the total magnetic force R.
At this time, for example, as the initialization value of the offset O, the offset value measured by the triaxial Helmholtz coil of the single
次に、携帯機器に電源を投入した後、ユーザは携帯機器の表示部に表示される複数の地域から、自身の居住地が含まれる地域を選択する。
これにより、共分散行列計算部14A_1は、記憶部14_6から、オフセットOの初期値を読み出すとともに、ユーザの選択した地域に対応して記憶されている地磁気基準値を全磁力Rの初期値として読み出す。
また、GPS(Global Positioning System)機能が携帯機器に搭載されている場合、共分散行列計算部14A_1は、GPSから得られる緯度経度情報が含まれる地域(緯度経度情報の範囲で規定された領域)に対応して記憶されている地磁気基準値を全磁力Rの初期値として読み出すように構成しても良い。
そして、共分散行列計算部14A_1は、処理をステップS13へ進める。
Next, after powering on the portable device, the user selects a region including his / her residence from a plurality of regions displayed on the display unit of the portable device.
As a result, the covariance matrix calculation unit 14A_1 reads the initial value of the offset O from the storage unit 14_6, and reads the geomagnetic reference value stored corresponding to the area selected by the user as the initial value of the total magnetic force R. .
In addition, when a GPS (Global Positioning System) function is mounted on a portable device, the covariance matrix calculation unit 14A_1 includes an area including latitude and longitude information obtained from GPS (an area defined by a range of latitude and longitude information). Alternatively, the geomagnetic reference value stored corresponding to may be read as the initial value of the total magnetic force R.
And covariance matrix calculation part 14A_1 advances a process to step S13.
ステップS13:
次に、共分散行列計算部14A_1は、共分散行列Pの初期化を行う。すなわち、共分散行列計算部14A_1は、記憶部14A_6に予め書き込まれて記憶されている(9)式を読み出し、読み出した(4)式を共分散行列の初期値とする。
そして、共分散行列計算部14A_1は、処理をステップS14へ進める。
Step S13:
Next, the covariance matrix calculation unit 14A_1 initializes the covariance matrix P. That is, the covariance matrix calculation unit 14A_1 reads the equation (9) that is written and stored in advance in the storage unit 14A_6, and sets the read equation (4) as the initial value of the covariance matrix.
And covariance matrix calculation part 14A_1 advances a process to step S14.
ステップS14:
測定データ入力部10は、磁気センサ2のX軸方向磁気検出部21、Y軸方向磁気検出部22及びZ軸方向磁気検出部23の各々から、磁気測定データMnとして磁気測定データMxn、Myn及びMznを読み込む。
そして、測定データ入力部10は、読み込んだ磁気測定データMnを、磁気測定データ判定部12、オフセット算出部14A及び磁気測定データ処理部15へ出力する。
磁気測定データMnを読み込んだ後、磁気測定データ判定部12は、傾斜角算出部11から供給されるピッチ角p及びロール角rの含まれる領域のバッファアドレスを内部記憶部の対応テーブルから検索する。
そして、磁気測定データ判定部12は、検索された磁気測定データバッファ13における領域に対し、磁気測定データMnを書き込む。
Step S14:
The measurement
Then, the measurement
After reading the magnetic measurement data M n , the magnetic measurement
Then, the magnetic measurement
また、誤差関数計算部14A_3は、記憶部14A_6から読み込んだ(12)式に対し、磁気センサ2から読み込んだ磁気測定データMxn、Myn及びMznと、記憶部14A_6から読み込んだオフセットOn−1(Oxn−1,Oyn−1,Ozn−1)とを代入し、誤差関数enを算出する。
すなわち、誤差関数計算部14A_3は、磁気測定データMxnからオフセットOxn−1を減算した結果を二乗し、磁気測定データMynからオフセットOyn−1を減算した結果を二乗し、磁気測定データMznからオフセットOzn−1を減算した結果を二乗する。
そして、誤差関数計算部14A_3は、それぞれの減算した結果を加算し、この加算した結果から、全磁力Rn−1の二乗を減算し、誤差関数enを求める。
誤差関数enを算出した後、誤差関数計算部14A_3は、処理をステップS15へ進める。
また、図9のフローチャートにおけるステップS14からステップS18までのループ(繰り返し処理)において、携帯機器の電源が投入されてから1回目のループの際、オフセットOn−1としては初期化におけるオフセットの数値が用いられ、同様に、全磁力Rn−1としては初期化における全磁力の数値が用いられる。
The error function calculation unit 14A_3 is read from the storage unit 14A_6 to (12), magnetic measurement data M xn read from the magnetic sensor 2, and M yn and M zn, offset O n read from the storage unit 14A_6 -1 (O xn-1, O yn-1, O zn-1) substituted and, to calculate the error function e n.
That is, the error function calculator 14A_3 squares the result of subtracting the offset O xn-1 from the magnetic measurement data M xn , squares the result of subtracting the offset O yn-1 from the magnetic measurement data M yn , and generates the magnetic measurement data. The result of subtracting the offset O zn−1 from M zn is squared.
The error function calculation unit 14A_3 adds the result of each subtraction, from the addition result, by subtracting the square of the total magnetic R n-1, obtaining an error function e n.
After calculating the error function e n, error function calculation unit 14A_3 advances the process to step S15.
Further, in the loop (repetitive processing) from step S14 to step S18 in the flowchart of FIG. 9, in the first loop after the portable device is turned on, the offset On -1 is the numerical value of the offset in initialization. Similarly, the numerical value of the total magnetic force in initialization is used as the total magnetic force R n−1 .
ステップS15:
オフセット残差計算部14A_4は、記憶部14A_6から、(10)式と、(13)式と、忘却係数ρと、前回求めた共分散行列Pn−1とを読み出す。
次に、オフセット残差計算部14A_4は、磁気測定データMnを(10)式に代入してベクトルznの行列を生成し、この生成したベクトルznの行列の転置行列zn Tを生成する。
そして、オフセット残差計算部14A_4は、忘却係数ρ、共分散行列Pn−1、ベクトルzn及び転置行列zn Tの各々を(13)式に代入し、オフセット残差ηを算出し、このオフセット残差ηをオフセット更新部14A_5へ出力する。
オフセット残差ηを算出した後、オフセット残差計算部14A_4は、処理をステップS16へ進める。
Step S15:
The offset residual calculation unit 14A_4 reads the expression (10), the expression (13), the forgetting factor ρ, and the covariance matrix P n−1 obtained last time from the storage unit 14A_6.
Next, the offset residual calculation unit 14A_4 generates a matrix of the vector z n by substituting the magnetic measurement data M n into the equation (10), and generates a transposed matrix z n T of the generated matrix of the vector z n. To do.
Then, the offset residual calculation unit 14A_4 substitutes each of the forgetting coefficient ρ, the covariance matrix P n−1 , the vector z n, and the transposed matrix z n T into the equation (13) to calculate the offset residual η, The offset residual η is output to the offset update unit 14A_5.
After calculating the offset residual η, the offset residual calculation unit 14A_4 advances the process to step S16.
ステップS16:
共分散行列更新部14A_2は、記憶部14A_6から、(10)式と、(14)式と、忘却係数ρと、共分散行列Pn−1とを読み込む。
次に、共分散行列更新部14A_2は、磁気測定データMnを(10)式に代入してベクトルznの行列を生成し、この生成したベクトルznの行列の転置行列zn Tを生成する。
そして、共分散行列更新部14A_2は、忘却係数ρと、共分散行列Pn−1と、ベクトルznと、転置行列zn Tとを、(14)式に代入し、新たな共分散行列Pnを生成し、記憶部14A_6に書き込んで記憶させる。この共分散行列更新部14A_2が記憶部14A_6に書き込んだ共分散行列Pnが、磁界のループにおいては共分散行列Pn−1として用いられる。
今回の磁気測定データMnを含む、今までに共分散行列Pを生成するために用いた磁気測定データMの全てを母集団とする共分散行列Pnを生成した後、共分散行列更新部14A_2は、処理をステップS17へ進める。
Step S16:
The covariance matrix updating unit 14A_2 reads the expression (10), the expression (14), the forgetting factor ρ, and the covariance matrix P n−1 from the storage unit 14A_6.
Next, the covariance matrix update unit 14A_2 generates a matrix of the vector z n by substituting the magnetic measurement data M n into the equation (10), and generates a transposed matrix z n T of the generated matrix of the vector z n. To do.
Then, the covariance matrix updating unit 14A_2 substitutes the forgetting factor ρ, the covariance matrix P n−1 , the vector z n, and the transposed matrix z n T into the equation (14), and creates a new covariance matrix. Pn is generated and written and stored in the storage unit 14A_6. The covariance matrix P n written by the covariance matrix updating unit 14A_2 in the storage unit 14A_6 is used as the covariance matrix P n−1 in the magnetic field loop.
Including this magnetic measurement data M n, after all of the magnetic measurement data M to generate the covariance matrix P n to the population that was used to generate the covariance matrix P ever, the covariance matrix update unit 14A_2 advances the process to step S17.
ステップS17:
オフセット更新部14A_5は、記憶部14A_6から(11)式及び(15)式を読み出す。
次に、オフセット更新部14A_5は、(11)式に対し、前回算出されたオフセットOn−1と全磁力Rn−1とを代入し、オフセットのベクトルxn−1を求める。
そして、オフセット更新部14A_5は、オフセット残差計算部14A_4から供給されるオフセット残差ηと、求めたベクトルとを(15)式に代入し、磁気測定データMnを測定した時点(すなわち現在)におけるオフセットを示すオフセットのベクトルxnを算出する。すなわち、オフセット更新部14A_5は、ベクトルxn−1に対し、オフセット残差ηを加算することにより、新たなオフセットを示すベクトルxnを算出する。
ベクトルxnを算出した後、オフセット更新部14A_5は、処理をステップS18へ進める。
Step S17:
The offset update unit 14A_5 reads the expressions (11) and (15) from the storage unit 14A_6.
Next, the offset updating unit 14A_5 is (11) with respect to formula, and substituting the offset O n-1 calculated last time and the total force R n-1, obtaining the vector x n-1 of the offset.
Then, the offset update unit 14A_5 substitutes the offset residual η supplied from the offset residual calculation unit 14A_4 and the obtained vector into the equation (15), and measures the magnetic measurement data M n (ie, the current time). An offset vector x n indicating the offset at is calculated. That is, the offset update unit 14A_5 calculates a vector xn indicating a new offset by adding the offset residual η to the vector xn-1 .
After calculating the vector x n, offset updating unit 14A_5 advances the process to step S18.
ステップS18:
次に、オフセット有効性判定部17は、磁気測定データバッファ13において、フラグ(フラグ欄)にフラグ情報が記載された領域(傾斜角)を検索し、フラグ情報が記載された傾斜角に対応して記憶されている磁気測定データM1からMnを、磁気測定データバッファ13から読み出すとともに、前回算出されて記憶されたオフセットOn−1(O1)を、オフセット記憶部16から読み出し、磁気測定データM毎に、上述した(16)式により距離d1nを算出する。
そして、オフセット有効性判定部17は、オフセット記憶部16に記憶されている磁気測定データMn−1とオフセットOn−1とを読み出し、(6)式により全磁力R1を算出する。
これにより、オフセット有効性判定部17は、算出した磁気測定データ毎の距離d1nと、全磁力R1とから、(17)式により評価値G1の算出を行う。
Step S18:
Next, the offset
Then, the offset
Thereby, the offset
次に、オフセット有効性判定部17は、フラグにフラグ情報が記載された領域を検索し、フラグ情報が記載された傾斜角に対応して記憶されている磁気測定データM1からMnを、磁気測定データバッファ13から読み出す。
そして、オフセット有効性判定部17は、磁気測定データM1からMnの各々と、今回算出されて記憶されたオフセットOn(O2)とにおいて、磁気測定データM毎に、上述した(18)式により距離d2nを算出する。
また、オフセット有効性判定部17は、磁気測定データMnと、オフセット記憶部16から読み出したオフセットOnとを用い、(6)式により全磁力R2を算出する。
これにより、オフセット有効性判定部17は、算出した磁気測定データ毎の距離d2nと、全磁力R2とから、(19)式により評価値G2の算出を行う。
Next, the offset
Then, the offset
Further, the offset
Thereby, the offset
次に、オフセット有効性判定部17は、算出した評価値G1とG2とを比較し、評価値G2が評価値G1未満であるか否かの判定を行う。
このとき、オフセット有効性判定部17は、評価値G2が評価値G1未満である場合、今回求めたオフセットOnが前回オフセット記憶部16及び記憶部14A_6にオフセットとして書き込まれて記憶されたオフセットOn−1より真値に近いため、今回求めたオフセットOnを更新しないことを判定する。
そして、オフセット有効性判定部17は、オフセット記憶部16及び記憶部14A_6に記憶されているオフセットの値を更新することを示す制御信号を、オフセット更新部14A_5に対して出力する。
この更新を行うことを示す制御情報が供給されると、オフセット更新部14A_5は、記憶部14A_6及びオフセット記憶部16に記憶されているオフセットに対し、今回求めたオフセットOnを上書きし、オフセットの値の更新を行う。
Next, the offset
At this time, when the evaluation value G2 is less than the evaluation value G1, the offset
Then, the offset
When the control information indicating that performing this update is supplied, the offset updating unit 14A_5, compared offset stored in the storage unit 14A_6 and offset
一方、オフセット更新部14A_5は、評価値G2が評価値G1以上である場合、今回求めたオフセットOnに対して、前回オフセット記憶部16及び記憶部14A_6にオフセットとして書き込まれて記憶されたオフセットOn−1の方が真値に近いため、前回書き込まれたオフセットの値を維持したまま更新することを示す制御信号を、オフセット更新部14A_5へ出力する。
この更新を行わないことを示す制御情報が供給されると、オフセット更新部14A_5は、オフセット記憶部16及び記憶部14A_6に記憶されているオフセットO、前回のオフセットOn−1の値を維持したまま上書し、オフセットの値の更新を行う。
On the other hand, the offset updating unit 14A_5, when evaluation value G2 is rated value G1 or more, with respect to the offset O n found this time, the offset O, which is stored is written as an offset to the previous offset
When the control information indicating that this update is not performed is supplied, the offset update unit 14A_5 maintains the values of the offset O and the previous offset On -1 stored in the offset
上述したように、本実施形態によれば、前回求めたオフセットOn−1と、現時点で測定した磁気測定データMnとを用い、誤差関数enが最小となるように、オフセット残差ηを算出し、このオフセット残差ηと前回求めたオフセットOn−1とを用いてオフセットOnを算出するため、磁気測定データMnに重畳する磁気ノイズも最小化することが可能となり、従来に比較してより高い精度により、測定される磁気測定データMnのオフセットOnを求めることができる。 As described above, according to this embodiment, an offset O n-1 previously obtained, using a magnetic measurement data M n measured at the present time, so that the error function e n is minimized, offset residual η calculates, this in order to calculate the offset O n and offset residual η using the offset O n-1 previously obtained, it is possible to minimize magnetic noise that is superimposed on the magnetic measurement data M n, conventional it is the higher accuracy compared to determine the offset O n of the magnetic measurement data M n measured thing.
また、本実施形態によれば、今回の磁気測定データMnからオフセットOnを求めるため、前回求めたオフセットOn−1に加算するオフセット残差ηを求める際、誤差関数をどの程度反映させるかの割合を、前回までの測定値を母集団とする共分散行列Pn−1と、現時点の磁気測定データMnと、忘却係数ρとにより設定しており、従来のように同一球面上を移動させて複数の磁気測定データMを測定する必要が無いため、新たな磁気測定データMnを測定する毎に、前回までのオフセットOn−1から容易に現時点のオフセットOnを求めることが可能となり、環境オフセットの変動に対する従性を向上させることができる。 Further, according to this embodiment, since the current of the magnetic measurement data M n seek offset O n, when determining the offset residual η to be added to the offset O n-1 previously obtained, to what extent reflects the error function Is set by the covariance matrix P n−1 having the previous measured values as the population, the current magnetic measurement data M n, and the forgetting factor ρ, the move because there is no need to measure a plurality of magnetometric data M, each time measuring the new magnetic measurement data M n, to obtain the offset O n-1 easily offset O n the current from up to the previous time It becomes possible to improve the compliance with the fluctuation of the environmental offset.
また本実施形態によれば、オフセットOの算出に使用可能と判定された磁気測定データMが供給される毎に、オフセットOnを算出し、この算出したオフセットOnと前回有効と判定されてオフセット記憶部16に記憶されているオフセットOn−1とのいずれが真値に近いかを、磁気測定データバッファ13を用いて算出した評価値G1とG2とにより比較し、より真値に近いオフセットを選択し、選択したオフセットを記憶部14_6に保持するため、常に最も真値に近いと推定されるオフセットOを磁気測定データMの校正に用いることができ、精度の高い磁気測定データの校正が行えることになる。
ここで、磁気測定データバッファ13において、フラグの欄にフラグ情報が記載された磁気測定データは、オフセットを中心とした球を、ピッチ角p及びロール角rの組合せで分割しており、これらの領域に供給される磁気測定データを格納している。このため、本実施形態によれば、オフセットを中心とした球面上の全体にくまなく分布する磁気測定データにより、真値か否かの判定を行う評価値G1とG2とを算出するため、評価値に偏りがなく、精度の高い有効性の判定が行える。
According to the present embodiment, every time the magnetic measurement data M which has been determined to be used for the calculation of the offset O is supplied, it is determined to calculate the offset On, the offset O n and the previous valid that the calculated offset Which one of the offset On-1 stored in the
Here, in the magnetic
また、測定データ入力部10が以下のようなデータ処理を行うように構成しても良い。測定データ入力部10は、前回オフセットOn−1を算出した磁気測定データMn−1、現時点で測定された磁気測定データMnとの距離dを算出する。この距離dは、すでに説明したように、磁気センサ2のX軸、Y軸及びZ軸方向の各々の測定軸で構成される3次元空間(磁界を示す3次元空間)に磁気測定データMn及びMn−1を配置した際の、それぞれの座標値の距離である。
また、測定データ入力部10は、算出した距離dが予め設定した閾値dsを超えない場合、磁気測定データ校正装置1Aにおいて、新たな磁気測定データMnによるオフセットOnの算出を行わない制御を行う。この場合、記憶部14_6に記憶されるデータは、磁気測定データMn−1において算出された数値が、書き換えられずにそのまま記憶されることになる。
Further, the measurement
The measurement
ここで、閾値dsは、以下のように設定されている。すなわち、閾値dsは磁気センサ2の測定における測定ノイズに対応した数値で決定される。磁気測定データを測定するX軸、Y軸及びZ軸方向の各測定軸の測定ノイズを、それぞれ測定ノイズvx、vy、zvとすると、静止状態においても、時系列に磁気センサ2において測定される磁気測定データ間の距離は、0とはならない。
方位計測装置を静止状態とし、X軸、Y軸及びZ軸方向の各測定軸の磁気測定データの変動幅を予め測定し、この変動幅を含む範囲を測定ノイズvx、vy、zvとする。
Here, the threshold value d s is set as follows. That is, the threshold value d s is determined by a numerical value corresponding to the measurement noise in the measurement of the
With the azimuth measuring device in a stationary state, the fluctuation width of the magnetic measurement data of each measurement axis in the X-axis, Y-axis, and Z-axis directions is measured in advance, and the range including this fluctuation width is measured as noises v x , v y , z v And
したがって、以下に示す(20)式により、測定データ入力部10は閾値dsを求めている。この閾値dsは予め記憶部14_6に書き込まれ記憶されている。ここで、閾値dsは、測定ノイズのベクトル(vx、vy、zv)の長さ、すなわち磁気センサ2の測定軸で構成される3次元空間の原点と、測定ノイズvx、vy、zvの座標値との距離で設定されている。
例えば、X軸、Y軸及びZ軸方向の各測定軸の測定ノイズの標準偏差が1μTである磁気センサを用いた場合、(20)式により求められる変動幅は最大で4.5μTである。この場合、閾値dsを5μTとして設定する。
また、測定データ入力部10は、オフセットOnが求められた後、磁気測定データMnを磁気測定データバッファ13に、ピッチ角p及びロール角rの組合せに対応した領域に書き込んで記憶させる。
Therefore, the measurement
For example, when a magnetic sensor having a standard deviation of measurement noise of 1 μT on each measurement axis in the X-axis, Y-axis, and Z-axis directions is used, the fluctuation range obtained by the equation (20) is 4.5 μT at the maximum. In this case, the threshold value ds is set as 5 μT.
The measurement
上述した構成により、本実施形態においては、同一あるいは同様の磁気測定データ、すなわち距離が小さな磁気測定データにおいて、オフセットを算出する計算を繰り返すことにより、オフセットを大きく推定する、すなわち磁気測定データが全てオフセットであると判定してしまう欠点を解消することが可能である。
第1の実施形態においても、磁気測定データ判定部12が上述した測定データ入力部10のオフセットに用いる磁気測定データMの選択処理を行うように構成しても良い。
With the configuration described above, in the present embodiment, the same or similar magnetic measurement data, that is, magnetic measurement data with a short distance, is repeatedly estimated to calculate the offset by repeating the calculation to calculate the offset, that is, all the magnetic measurement data is It is possible to eliminate the disadvantage that it is determined that the offset.
Also in the first embodiment, the magnetic measurement
<RLS法によりオフセットが最尤推定値として得られることの説明>
以下に、RLS法を用いた場合、共分散行列を用いて最新の磁気測定データMを用いてオフセットOを更新する、すなわちオフセットのベクトルxを更新ことで、常にオフセットOの最尤値(最尤推定値)を得ることができることの説明を行う。
まず、磁気測定データMn(Mxn,Myn,Mzn)から、以下の(21)式を定義する。
<Explanation that offset is obtained as maximum likelihood estimate by RLS method>
In the following, when the RLS method is used, the offset O is updated using the latest magnetic measurement data M using the covariance matrix, that is, the offset vector x is always updated, so that the maximum likelihood value of the offset O (maximum value) is always obtained. The likelihood that the likelihood estimate) can be obtained will be described.
First, the following equation (21) is defined from the magnetic measurement data M n (M xn , M yn , M zn ).
一般的な最小二乗法によれば、現時点までに測定した磁気測定データM1からMnを用い、以下に示す(22)式の評価関数J1を最小とするオフセットのベクトルxを算出することになる。 According to a general least square method, using the magnetic measurement data M 1 to M n measured up to the present time, the offset vector x that minimizes the evaluation function J 1 of the following equation (22) is calculated. become.
次に、(23)式に示すように、ベクトルznの転置行列zn Tを要素とする列行列Znと、(21)式のベクトルynを要素とする列行列Ynとを定義する。 Next, as shown in Expression (23), a column matrix Z n whose elements are the transposed matrix z n T of the vector z n and a column matrix Y n whose elements are the vectors y n of Expression (21) are defined. To do.
上記(23)式の列行列ZnとYnとを用いることにより、(22)式が以下に示す(24)式のように変形することができる。 By using the column matrices Z n and Y n of the above equation (23), the equation (22) can be transformed into the following equation (24).
上記(24)式は、(23)式から判るように、磁気測定データM1からMnまで、すなわち現在までに測定した全ての磁気測定データの要素が含まれている。 Above (24), as seen from (23), the magnetic measurement data M 1 to M n, that is, contains elements of all magnetic measurement data measured so far.
次に、重み付け係数Wnを要素とする行列、すなわち重み付け行列Wnを以下の(25)式のように定義する。 Next, a matrix having the weighting coefficient Wn as an element, that is, a weighting matrix Wn is defined as the following equation (25).
そして、この重み付け行列Wnと、列行列Yn及びZnとを用いて、評価関数J2を以下の(26)式として示す。 Then, using this weighting matrix W n and the column matrices Y n and Z n , the evaluation function J 2 is shown as the following expression (26).
(25)式に示すように、重み付け行列Wnは、磁気測定データM毎を計算に用いる際の重み付け、すなわち特定の磁気測定データMの影響度を高くするために導入している。この重み付け行列Wnが単位行列であるならば、評価関数J2はすでに示した(22)式による評価関数J1と同一の評価値(J2=J1)を求める最小二乗法になる。 As shown in the equation (25), the weighting matrix Wn is introduced in order to increase the influence when the magnetic measurement data M is used for calculation, that is, the influence of the specific magnetic measurement data M. If this weighting matrix W n is a unit matrix, the evaluation function J 2 is a least square method for obtaining the same evaluation value (J 2 = J 1 ) as the evaluation function J 1 according to the equation (22) already shown.
ここで、(26)式の評価関数J2が最小となるオフセットのベクトルxは、以下の(27)式に示すものとなる。 Here, the offset vector x that minimizes the evaluation function J2 of the equation (26) is expressed by the following equation (27).
上記(27)式を(26)式に代入すると、(26)式の評価関数J2が最小、すなわちJ2=0となるため、(27)式が最尤推定値のベクトルxを示していることが判る。 When the above equation (27) is substituted into the equation (26), the evaluation function J 2 of the equation (26) is minimum, that is, J 2 = 0. Therefore, the equation (27) indicates the vector x of the maximum likelihood estimated value. I know that.
また、計算で用いる共分散行列Pnを表すため、行列Unを以下の(28)式により定義する。 Further, in order to represent the covariance matrix P n used in the calculation, the matrix Un is defined by the following equation (28).
(28)式の行列Unの逆行列に対し、(23)式及び(25)式を代入することにより、以下に示す(29)式が得られる。 By substituting the equations (23) and (25) for the inverse matrix of the matrix Un of the equation (28), the following equation (29) is obtained.
ここで、(29)式を解析的に解くため、逆行列の補助定理を用いる。すなわち、逆行列の補助定理において、行列Aがn×n行列、行列bがn×1ベクトル、行列cがn×1ベクトルである場合、以下の(30)式に示す関係が成り立つことになる。 Here, in order to solve Equation (29) analytically, the inverse matrix theorem is used. That is, in the inverse matrix lemma, when the matrix A is an n × n matrix, the matrix b is an n × 1 vector, and the matrix c is an n × 1 vector, the relationship expressed by the following equation (30) is established. .
したがって、(29)式を(30)式に代入すると、以下の(31)式となる。 Therefore, substituting equation (29) into equation (30) yields the following equation (31).
これにより、(29)式は、(31)式の逆行列を求めることにより、以下の(32)式の漸化式として表すことができる。 Thereby, (29) Formula can be expressed as a recurrence formula of the following (32) Formula by calculating | requiring the inverse matrix of (31) Formula.
ここで、(25)式における重み付け行列を、以下に示す(33)式のように設定する。 Here, the weighting matrix in the equation (25) is set as the following equation (33).
上記(33)において、忘却係数ρを0から1の範囲(0<ρ<1)で設定すると、過去に取得した磁気測定データの影響(反映)の度合いが徐々に低くなる。
また、共分散行列Pnを、重み付け係数wnと行列Unで表すと、以下の(34)式となり、(32)式が(14)式と一致することになる。
In the above (33), when the forgetting factor ρ is set in the range of 0 to 1 (0 <ρ <1), the degree of influence (reflection) of the magnetic measurement data acquired in the past gradually decreases.
Further, the covariance matrix P n, expressed in weighting coefficient w n and the matrix U n, and becomes less (34), thereby coinciding with the (32) equation (14) below.
また、以降の計算の都合上、knを以下の(35)式のように定義する。 Further, for the convenience of subsequent calculations, defined by the following expression (35) to k n.
次に、(27)式に対し、(32)式と(35)式とを代入すると、以下に示す(36)式が得られる。 Next, by substituting the equations (32) and (35) into the equation (27), the following equation (36) is obtained.
また、磁気測定データM1からMn−1までのデータで求められたオフセットのベクトルxn−1の推定値、すなわちn−1番目のベクトルxn−1の推定値は以下の(37)式で求められる。 Further, the estimated value of the offset vector x n−1 obtained from the magnetic measurement data M 1 to M n−1 , that is, the estimated value of the n−1th vector x n−1 is the following (37). It is calculated by the formula.
したがって、n番目のベクトルxnの推定値は、上記(37)式を(36)式に代入し、(37)式を変形することで、以下に示す(38)式として表される。 Therefore, the estimated value of the n-th vector xn is expressed as the following equation (38) by substituting equation (37) into equation (36) and modifying equation (37).
そして、この(38)式を変形することにより、以下の(39)式を得る。 Then, the following equation (39) is obtained by modifying the equation (38).
上記(39)式を用いることにより、(38)式の右辺の第3項はkn×ynと簡略化できることから、(38)式から以下に示す(40)式のベクトルxの漸化式を導くことができる。 By using the above equation (39), the third term on the right side of the equation (38) can be simplified to kn × yn. Therefore, the recurrence equation of the vector x in the equation (40) shown below from the equation (38) Can lead.
上記(40)式は、(13)式及び(15)式を統合した式となっている。したがって、上述してきたRLS法により、最新の磁気測定データMを用いてオフセットのベクトルxの更新を行うことにより、常に、ベクトルxの最尤推定値を得ることができる。 The equation (40) is an equation obtained by integrating the equations (13) and (15). Therefore, by updating the offset vector x using the latest magnetic measurement data M by the RLS method described above, the maximum likelihood estimated value of the vector x can always be obtained.
<方位検出装置>
次に、第1の実施形態の磁気測定データ校正装置1、及び第2の実施形態による磁気測定データ校正装置1Aを用いた方位角計測装置の動作を以下に示す。
携帯機器に搭載される方位角計測装置には、図1に示す3軸の磁気検出部からなる磁気センサ2と、3軸の加速度センサ3とを組み合わせた構成が搭載されている。
すなわち、この方位角計測装置は、加速度センサ3により重力を検出し、検出した重力の傾きの程度から自身の傾斜角を計算する。
そして、磁気計測装置において、磁気センサ2により測定された磁気測定データが、例えば、磁気測定データ校正装置1あるいは磁気測定データ校正装置1Aにより、オフセットが校正された磁気校正データMfを生成する。
方位角計測装置は、磁気測定データ校正装置1あるいは磁気測定データ校正装置1Aから出力される磁気校正データMfにより、方位角を算出する。
<Direction detection device>
Next, operations of the azimuth measuring apparatus using the magnetic measurement
The azimuth angle measuring device mounted on the portable device has a configuration in which the
That is, this azimuth measuring device detects gravity by the
Then, in the magnetic measurement device, the magnetic measurement data measured by the
The azimuth angle measuring apparatus calculates the azimuth angle from the magnetic calibration data Mf output from the magnetic measurement
以下に、方位角計測部4が行う磁気校正データMfによる方位角の算出について、図2を用いて説明する。
図2は、すでに説明したように、加速度センサ3により求まる絶対座標系と、3軸磁気センサである磁気計測装置の検出するセンサ座標系との各軸のずれを説明する図である。 そして、方位角計測部4は、傾斜角算出部11が算出したピッチ角p及びロール角rを読み込む。
Hereinafter, the calculation of the azimuth angle by the magnetic calibration data Mf performed by the azimuth
FIG. 2 is a diagram for explaining the deviation of each axis between the absolute coordinate system obtained by the
また、ユーザの携帯する携帯機器が傾斜状態にあるとき、磁気測定データ校正装置1から出力される磁気校正データMfを、磁気測定データM(Mtx,Mty,Mtz)とすると、傾斜角算出部11が(3)式及び(4)式の各々から算出したピッチ角(p)とロール角(r)とにより、以下の(41)式により、水平状態における磁気測定データM(Hx,Hy,V)が求まる。
Further, when the portable device carried by the user is in an inclined state, if the magnetic calibration data M f output from the magnetic measurement
したがって、方位角計測部4は、上記(41)式により算出した磁気測定データM(Hx,Hy,V)を用い、以下に示す(42)式から方位角(θ)を算出する。
Therefore, the
上述したように、本実施形態によれば、環境オフセットを調整し、磁気センサ2の出力する磁気測定データMを校正した(すなわちゼロ磁界における磁気測定データの調整が行われた)磁気校正データMfを用い、かつ3軸磁気センサにより傾斜状態を補正して方位角を求めることが可能となり、常に、方位角測定装置の検出座標系のX軸方向及びY軸方向のなす平面と、絶対座標系における地表面とが水平状態であり、かつオフセットが校正がされた磁気測定データを用いることができるため、高い精度で方位角を求めることが実現できる。
As described above, according to the present embodiment, the environmental offset is adjusted, and the magnetic measurement data M output from the
次に、図1及び図10を用いて、本実施形態の磁気測定データ校正装置1を用いた方位計測装置における磁気測定データから方位角θを求める処理について説明する。図10は、第1の実施形態のオフセット算出部14Aを用いた方位計測装置の方位角θを求める処理の動作例を示すフローチャートである。
ステップS21:
磁気測定データ判定部12は、磁気測定データバッファ13において、ユーザが指定するピッチ角pの角度範囲及びロール角rの角度範囲の組合せ数に対応する数の領域の確保を行う。
磁気測定データ判定部12は、磁気センサ2から磁気測定データM(Mx,My,Mz)を取得する。
このとき、磁気測定データ判定部12は、この磁気測定データM(Mx,My,Mz)を読み込んだタイミングにて、傾斜角算出部11に対して傾斜角(ピッチ角p及びロール角r)を求めることを要求する制御信号を出力する。
Next, a process for obtaining the azimuth angle θ from the magnetic measurement data in the azimuth measuring apparatus using the magnetic measurement
Step S21:
The magnetic measurement
The magnetic measurement
At this time, the magnetic measurement
ステップS22:
次に、傾斜角算出部11は、磁気測定データ判定部12から制御信号が供給されると、加速度センサ3から加速度データS(Sx,Sy,Sz)を読み込む。
ステップS23:
そして、傾斜角算出部11は、読み込んだ加速度データS(Sx,Sy,Sz)から、すでに説明した処理により、傾斜角(ピッチ角p及びロール角r)を求める。
Step S22:
Next, when the control signal is supplied from the magnetic measurement
Step S23:
Then, the tilt
ステップS24:
次に、磁気測定データ判定部12は、磁気測定データバッファ13において、磁気センサ2から供給される磁気測定データM(Mx,My,Mz)を、この磁気測定データM(Mx,My,Mz)を測定した時点のピッチ角p及びロール角rが対応する領域に書き込んで記憶させる。
Step S24:
Next, in the magnetic
ステップS25:
そして、オフセット算出部14は、すでに第1の実施形態において説明したように、オフセットOの算出を行う。
ステップS26:
次に、オフセット有効性判定部17は、新たに算出したオフセットOnと、オフセット記憶部16に記憶されているオフセットOn−1とのいずれが真値に近いかを判定し、より近いほうのオフセットOを、オフセット記憶部16に書き込んで記憶させる。
Step S25:
Then, the offset
Step S26:
Next, the offset
ステップS27:
磁気測定データ処理部15は、磁気センサ2から供給される磁気測定データM(Mx,My,Mz)から、オフセットOを減算し、磁気校正データMf(Mfx,Mfy,Mfz)として、方位角計測部4に対して出力する。
ステップS28:
方位角計測部4は、磁気測定データ校正装置1から供給される磁気校正データMf(Mfx,Mfy,Mfz)が供給されると、傾斜角算出部11から傾斜角(ピッチ角p及びロール角r)を読み込み、方位角θを求める。
Step S27:
The magnetic measurement
Step S28:
When the magnetic calibration data M f (M fx , M fy , M fz ) supplied from the magnetic measurement
また、図1における磁気測定データ校正装置1、及び図7における磁気測定データ校正装置1Aの機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより磁気測定データMの校正処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
Further, a program for realizing the functions of the magnetic measurement
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case, and a program that holds a program for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
以上、この発明の実施形態を図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes design and the like within a scope not departing from the gist of the present invention.
1,1A…磁気測定データ校正装置 2…磁気センサ 3…加速度センサ 4…方位角計測部 10…測定データ入力部 11…傾斜角算出部 12…磁気測定データ判定部 13…磁気測定データバッファ 14,14A…オフセット算出部 14A_1…共分散行列計算部 14A_2…共分散行列更新部 14A_3…誤差関数計算部 14A_4…オフセット残差計算部 14A_5…オフセット更新部 14A_6…記憶部 15…磁気測定データ処理部 16…オフセット記憶部 17…オフセット有効性判定部 21…X軸方向磁気検出部 22…Y軸方向磁気検出部 23…Z軸方向磁気検出部 31…X軸加速度検出部 32…Y軸加速度検出部 33…Z軸加速度検出部
DESCRIPTION OF
Claims (6)
加速度センサから供給される加速度データからロール角及びピッチ角を求める傾斜角算出部と、
前記ロール角の角度範囲と前記ピッチ角の角度範囲との組合せ毎に、当該組合せに対応した磁気測定データを記憶させる領域が設けられた磁気測定データバッファと、
磁気センサから供給される磁気測定データを、当該磁気測定データの測定時に検出された前記ロール角及び前記ピッチ角に対応する前記領域に対して書き込んで記憶させる磁気測定データ判定部と、
前記磁気測定データから前記オフセットを所定の計算により求めるオフセット算出部と、
オフセット算出部の求めたオフセットである算出オフセットと、現在使用しているオフセットである設定オフセットのいずれが確からしいかを、前記磁気測定データバッファに記憶された磁気データを用いて判定し、確からしいと判定されたオフセットを新たな設定オフセットとするオフセット有効性判定部と
を備えることを特徴とする磁気測定データ校正装置。 An offset of magnetic measurement data, which is a measurement result of the geomagnetism for each of the measurement axes, is output from a magnetic sensor having three measurement axes orthogonal to each other and measuring the geomagnetism in the measurement axis direction. It is a magnetic measurement data calibration device that corrects measurement data,
An inclination angle calculation unit for obtaining a roll angle and a pitch angle from acceleration data supplied from an acceleration sensor;
A magnetic measurement data buffer provided with an area for storing magnetic measurement data corresponding to the combination of the angular range of the roll angle and the angular range of the pitch angle;
Magnetic measurement data determination unit for writing and storing magnetic measurement data supplied from a magnetic sensor in the region corresponding to the roll angle and the pitch angle detected when measuring the magnetic measurement data;
An offset calculating unit for obtaining the offset from the magnetic measurement data by a predetermined calculation;
Using the magnetic data stored in the magnetic measurement data buffer, it is determined whether the calculated offset, which is the offset obtained by the offset calculation unit, or the set offset, which is the currently used offset, is likely. And an offset validity determination unit that uses the determined offset as a new set offset.
測定された磁気測定データの前記測定軸毎の磁気測定データと、前回求められたオフセットとの差分から誤差関数を求める誤差関数計算部と、
前記誤差関数及び前回求められた共分散行列からオフセット残差を算出するオフセット残差計算部と、
前回の前記磁気測定データの測定時に設定した前記設定オフセットに対し、前記オフセット残差を加算し、前記算出オフセットを算出するオフセット更新部と、
測定された前記磁気測定データを用い、以前に測定された前記磁気測定データを母集団とする磁気測定データの共分散行列を更新し、測定された前記磁気測定データを前記母集団に加えて新たな共分散行列を生成する共分散行列更新部と
を備えることを特徴とする請求項1に記載の磁気測定データ校正装置。 The offset calculation unit
An error function calculation unit for obtaining an error function from the difference between the magnetic measurement data for each measurement axis of the measured magnetic measurement data and the previously obtained offset;
An offset residual calculation unit for calculating an offset residual from the error function and the previously obtained covariance matrix;
An offset update unit that calculates the calculated offset by adding the offset residual to the set offset set at the time of the previous measurement of the magnetic measurement data;
Using the measured magnetic measurement data, update the covariance matrix of the magnetic measurement data with the previously measured magnetic measurement data as a population, and add the measured magnetic measurement data to the population to newly The magnetic measurement data calibration device according to claim 1, further comprising: a covariance matrix updating unit that generates a covariance matrix.
前記領域に書き込まれている磁気測定データと仮のオフセットとの差分をそれぞれの測定軸毎に算出して二乗して領域毎に加算し、この加算結果を前記磁気測定データバッファに磁気測定データが記憶されている全ての領域で加算し、この加算結果が最小となる前記仮のオフセットを前記算出オフセットとする
ことを特徴とする請求項1に記載の磁気測定データ校正装置。 The offset calculation unit
The difference between the magnetic measurement data written in the area and the temporary offset is calculated for each measurement axis, squared, added for each area, and the addition result is stored in the magnetic measurement data buffer. 2. The magnetic measurement data calibration apparatus according to claim 1, wherein addition is performed in all the stored areas, and the temporary offset that minimizes the addition result is used as the calculated offset.
前記磁気測定データから算出した前記算出オフセットと、前記磁気測定データバッファに記憶されている磁気データとの差分の標準偏差である第1の標準偏差を求め、また現在使用している前記設定オフセットと、前記磁気測定データバッファに記憶されている磁気データとの差分の標準偏差である第2の標準偏差を求め、前記第1の標準偏差と前記第2の標準偏差とを比較し、比較結果により前記算出オフセット及び前記設定オフセットのいずれを、新たな設定オフセットとするかの判定を行う
ことを特徴とする請求項1から請求項3のいずれか一項に記載の磁気測定データ校正装置。 The offset validity determination unit
A first standard deviation which is a standard deviation of a difference between the calculated offset calculated from the magnetic measurement data and the magnetic data stored in the magnetic measurement data buffer is obtained, and the currently used set offset A second standard deviation which is a standard deviation of the difference from the magnetic data stored in the magnetic measurement data buffer is obtained, the first standard deviation is compared with the second standard deviation, and the comparison result is obtained. 4. The magnetic measurement data calibration apparatus according to claim 1, wherein a determination is made as to which of the calculated offset and the set offset is a new set offset. 5.
互いに直交する3つの測定軸を有し、測定軸方向の加速度を測定する加速度センサと、
前記磁気センサから出力される前記測定軸毎の地磁気の測定結果である磁気測定データのオフセットを求め、前記磁気測定データを補正する磁気測定データ校正部と、
前記磁気測定データ校正装置から出力される、前記磁気測定データを校正した磁気校正データから方位角を算出する方位角計測部と
を備え、
加速度センサから供給される加速度データからロール角及びピッチ角を求める傾斜角算出部と、
前記ロール角の角度範囲とピッチ角の角度範囲との組合せ毎に、当該組合せに対応した磁気測定データを記憶させる領域が設けられた磁気測定データバッファと、
磁気センサから供給される磁気測定データを、当該磁気測定データの測定時に検出された前記ロール角及び前記ピッチ角に対応する前記領域に対して書き込んで記憶させる磁気測定データ判定部と、
前記磁気測定データから前記オフセットを所定の計算により求めるオフセット算出部と、
オフセット算出部の求めたオフセットである算出オフセットと、現在使用しているオフセットである設定オフセットのいずれが確からしいかを、前記磁気測定データバッファに記憶された磁気データを用いて判定し、確からしいと判定されたオフセットを新たな設定オフセットとするオフセット有効性判定部と
を備えることを特徴とする方位角計測装置。 A magnetic sensor having three measurement axes orthogonal to each other and including an axis sensor for measuring geomagnetism in the measurement axis direction;
An acceleration sensor having three measurement axes orthogonal to each other and measuring acceleration in the measurement axis direction;
Obtaining a magnetic measurement data offset that is a measurement result of the geomagnetism for each measurement axis output from the magnetic sensor, and correcting the magnetic measurement data;
An azimuth measuring unit that calculates an azimuth from magnetic calibration data calibrated from the magnetic measurement data output from the magnetic measurement data calibration device, and
An inclination angle calculation unit for obtaining a roll angle and a pitch angle from acceleration data supplied from an acceleration sensor;
A magnetic measurement data buffer provided with an area for storing magnetic measurement data corresponding to each combination of the roll angle angle range and the pitch angle angle range;
Magnetic measurement data determination unit for writing and storing magnetic measurement data supplied from a magnetic sensor in the region corresponding to the roll angle and the pitch angle detected when measuring the magnetic measurement data;
An offset calculating unit for obtaining the offset from the magnetic measurement data by a predetermined calculation;
Using the magnetic data stored in the magnetic measurement data buffer, it is determined whether the calculated offset, which is the offset obtained by the offset calculation unit, or the set offset, which is the currently used offset, is likely. An azimuth angle measuring apparatus comprising: an offset validity determining unit that sets the determined offset as a new set offset.
前記ロール角の角度範囲と前記ピッチ角の角度範囲との組合せ毎に、当該組合せに対応した磁気測定データを記憶させる領域が設けられ、前記磁気測定データ判定部により、磁気センサから供給される磁気測定データが、当該磁気測定データの測定時に検出された前記ロール角及び前記ピッチ角に対応する前記領域に対して書き込まれる
ことを特徴とするバッファ。 An offset of magnetic measurement data, which is a measurement result of the geomagnetism for each of the measurement axes, is output from a magnetic sensor having three measurement axes orthogonal to each other and measuring the geomagnetism in the measurement axis direction. An inclination calculation unit that corrects measurement data, obtains a roll angle and a pitch angle from acceleration data supplied from an acceleration sensor, an offset calculation unit that obtains the offset from the magnetic measurement data by a predetermined calculation, and an offset calculation unit It is determined by using the magnetic data stored in the magnetic measurement data buffer whether the calculated offset that is the calculated offset or the set offset that is currently used is likely, and the magnetic measurement data is New magnetic measurement data determination unit to be acquired from sensor and offset determined to be probable A buffer for use in a magnetic measurement data correcting device comprising the offset validity judging unit to set offset,
For each combination of the angle range of the roll angle and the angle range of the pitch angle, an area for storing the magnetic measurement data corresponding to the combination is provided, and the magnetism supplied from the magnetic sensor by the magnetic measurement data determination unit Measurement data is written to the area corresponding to the roll angle and the pitch angle detected when measuring the magnetic measurement data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011272274A JP2013124871A (en) | 2011-12-13 | 2011-12-13 | Magnetic measurement data calibration apparatus, azimuth angle measurement device, and buffer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011272274A JP2013124871A (en) | 2011-12-13 | 2011-12-13 | Magnetic measurement data calibration apparatus, azimuth angle measurement device, and buffer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2013124871A true JP2013124871A (en) | 2013-06-24 |
Family
ID=48776213
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2011272274A Pending JP2013124871A (en) | 2011-12-13 | 2011-12-13 | Magnetic measurement data calibration apparatus, azimuth angle measurement device, and buffer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2013124871A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015169619A (en) * | 2014-03-10 | 2015-09-28 | 旭化成エレクトロニクス株式会社 | Magnetic data correction device and correction parameter creation device |
| CN105716594A (en) * | 2016-01-29 | 2016-06-29 | 中国船舶重工集团公司第七一〇研究所 | Plane six-point calibration method of compass |
-
2011
- 2011-12-13 JP JP2011272274A patent/JP2013124871A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015169619A (en) * | 2014-03-10 | 2015-09-28 | 旭化成エレクトロニクス株式会社 | Magnetic data correction device and correction parameter creation device |
| CN105716594A (en) * | 2016-01-29 | 2016-06-29 | 中国船舶重工集团公司第七一〇研究所 | Plane six-point calibration method of compass |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8437970B2 (en) | Restoring and storing magnetometer calibration data | |
| US7844415B1 (en) | Dynamic motion compensation for orientation instrumentation | |
| CN103941309B (en) | Geomagnetic sensor calibration device and method thereof | |
| US9151610B2 (en) | Validating calibrated magnetometer data | |
| KR101485142B1 (en) | Method and system for a self-calibrated multi-magnetometer platform | |
| CN103575293B (en) | A kind of magnetometer deflection bearing calibration and magnetometer | |
| KR20130143576A (en) | Apparatuses and methods for estimating the yaw angle of a device in a gravitational reference system using measurements of motion sensors and a magnetometer attached to the device | |
| CN103299247B (en) | Apparatus and method for dynamic tracking and compensation of magnetic near field | |
| US20240045001A1 (en) | System and method for fast magnetometer calibration using gyroscope | |
| JP2004525348A (en) | Monitoring the accuracy of the electronic compass | |
| JP2006113019A (en) | Triaxial type electronic compass, and azimuth detecting method using same | |
| RU2717566C1 (en) | Method of determining errors of an inertial unit of sensitive elements on a biaxial rotary table | |
| JP2019120587A (en) | Positioning system and positioning method | |
| TWI452263B (en) | Geomagnetic detection device | |
| JP2013072643A (en) | Magnetic measurement data calibration device and azimuth angle measurement device | |
| JP2005195376A (en) | Azimuth measuring method, and azimuth measuring instrument | |
| KR102908805B1 (en) | How to calibrate a gyrometer fitted to an object | |
| Šipoš et al. | Improvement of electronic compass accuracy based on magnetometer and accelerometer calibration | |
| JP2013124871A (en) | Magnetic measurement data calibration apparatus, azimuth angle measurement device, and buffer | |
| JP6097500B2 (en) | Magnetic measurement data calibration device and azimuth angle measurement device | |
| WO2017090360A1 (en) | Sensor error calculation device, attitude angle calculation device, sensor error calculation method, and attitude angle calculation method | |
| US11079224B2 (en) | Offset derivation device, offset calculation device, and azimuth sensor | |
| JP2012103207A (en) | Output correction circuit of magnetic sensor, output correction method of magnetic sensor, and azimuth angle measurement device | |
| JP5374422B2 (en) | Magnetic field detector | |
| KR101928231B1 (en) | Offset detection device and azimuth angle sensor |