JP2013122384A - Kalman filter and state estimation device - Google Patents

Kalman filter and state estimation device Download PDF

Info

Publication number
JP2013122384A
JP2013122384A JP2011270090A JP2011270090A JP2013122384A JP 2013122384 A JP2013122384 A JP 2013122384A JP 2011270090 A JP2011270090 A JP 2011270090A JP 2011270090 A JP2011270090 A JP 2011270090A JP 2013122384 A JP2013122384 A JP 2013122384A
Authority
JP
Japan
Prior art keywords
state
vector
sensors
value
estimated
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
Application number
JP2011270090A
Other languages
Japanese (ja)
Inventor
Ibuki Handa
伊吹 半田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2011270090A priority Critical patent/JP2013122384A/en
Publication of JP2013122384A publication Critical patent/JP2013122384A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Navigation (AREA)
  • Measuring Magnetic Variables (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform accurate state estimation by using a Kalman filter in the case that temperature change occurs in a sensor.SOLUTION: A state estimation device included in a portable device 1 provided with a plurality of sensors including a three-dimensional geomagnetic sensor 70 with a first temperature detection unit 75 provided to estimate a state of a system includes a Kalman filter arithmetic unit 300. The Kalman filter arithmetic unit 300 includes a state transition model unit 410 for applying a state vector xto a state transition model to calculate an estimation state vector x, and an update unit 430 for calculating an updated state vector xon the basis of an observation residual error zcalculated on the basis of an observation value vector ywith output values of the plurality of sensors as factors and an estimation state vector x, and covariance Qof process noise wregulated in the state transition model unit 410 is determined on the basis of a temperature variation ΔTbeing a variation per unit time of temperature data Toutputted by the first temperature detection unit 75.

Description

本発明は、カルマンフィルタ、及び、状態推定装置に関する。   The present invention relates to a Kalman filter and a state estimation device.

地磁気の向きや、物体の姿勢等を算出する場合、地磁気センサからの出力結果のみに基づいて算出するよりも、地磁気センサの他に加速度センサや角速度センサ等の異種の物理量を測定する複数のセンサの出力結果を統合して算出した方が、短時間で正確な値を求めることができる。   When calculating the direction of geomagnetism, the posture of an object, etc., multiple sensors that measure different physical quantities such as acceleration sensors and angular velocity sensors in addition to the geomagnetic sensor, rather than calculating only based on the output result from the geomagnetic sensor If the output results are integrated and calculated, an accurate value can be obtained in a short time.

異種の物理量を測定する複数のセンサの出力を統合し、動的システムの状態を推定する方法として、カルマンフィルタを用いる方法が知られている。例えば、特許文献1には、3軸の角速度センサ及び3軸の加速度センサと非線形カルマンフィルタとを実装した姿勢角計測装置が開示されている。また、非特許文献1には、3軸角速度センサ、3軸加速度センサ、及び3軸地磁気センサからの出力信号を、拡張カルマンフィルタやアンセンテッド変換を用いたシグマポイントカルマンフィルタを用いて統合し、姿勢を推定する方法が開示されている。   A method using a Kalman filter is known as a method for estimating the state of a dynamic system by integrating the outputs of a plurality of sensors that measure different physical quantities. For example, Patent Document 1 discloses a posture angle measurement device in which a triaxial angular velocity sensor, a triaxial acceleration sensor, and a nonlinear Kalman filter are mounted. In Non-Patent Document 1, output signals from a 3-axis angular velocity sensor, a 3-axis acceleration sensor, and a 3-axis geomagnetic sensor are integrated using an extended Kalman filter or a sigma point Kalman filter using unscented transformation, and the posture is integrated. An estimation method is disclosed.

一般的に、カルマンフィルタは、動的システムの状態を表す複数の物理量の経時的な変化を推定する状態遷移モデルと、推定された動的システムの状態から、動的システムの有する複数のセンサが計測する値(観測値)を推定する観測モデルとを有する。そして、カルマンフィルタは、推定された観測値と、複数のセンサが実際に測定する観測値との差分(観測残差)を用いて、動的システムの状態を表す複数の物理量の各々を推定する値(状態変数)を要素とする状態ベクトルを推定し逐次更新することにより、状態ベクトルの各要素の示す値を、実際の物理量(真値)に近づける演算を行う。   In general, the Kalman filter is a state transition model that estimates changes over time in multiple physical quantities that represent the state of a dynamic system, and multiple sensors in the dynamic system measure from the estimated state of the dynamic system. And an observation model for estimating a value to be performed (observed value). The Kalman filter is a value for estimating each of a plurality of physical quantities representing the state of the dynamic system using a difference (observation residual) between the estimated observation value and the observation value actually measured by the plurality of sensors. A state vector having (state variable) as an element is estimated and sequentially updated, so that the value indicated by each element of the state vector is approximated to an actual physical quantity (true value).

特開平9−5104号公報Japanese Patent Laid-Open No. 9-5104

Wolfgang Gunthner, “Enhancing Cognitive Assistance Systems with Inertial Measurement Units”, Springer, 2008Wolfgang Gunthner, “Enhancing Cognitive Assistance Systems with Inertial Measurement Units”, Springer, 2008

ところで、地磁気センサや角速度センサ等のセンサは、検出対象となる成分以外の成分を検出する場合がある。この場合、センサの検出対象である成分を正確に求めるためには、センサの出力値から、検出対象となる成分以外の成分を取り除く補正処理が必要となる。この補正処理において取り除かれる成分を、センサのオフセットと呼ぶ。
センサのオフセットは、センサの温度変化に伴い変化する場合がある。センサに急激な温度変化が生じ、センサのオフセットが急激に変化する場合、状態ベクトルの各要素の示す値と真値とが乖離し、カルマンフィルタは、動的システムの状態を正確に推定することができなくなる場合がある。
Incidentally, a sensor such as a geomagnetic sensor or an angular velocity sensor may detect a component other than a component to be detected. In this case, in order to accurately determine the component that is the detection target of the sensor, a correction process that removes components other than the component that is the detection target from the output value of the sensor is necessary. The component removed in this correction process is called a sensor offset.
The sensor offset may change as the temperature of the sensor changes. When a sudden temperature change occurs in the sensor and the sensor offset changes abruptly, the value indicated by each element of the state vector deviates from the true value, and the Kalman filter can accurately estimate the state of the dynamic system. It may not be possible.

本発明は、上述した点に鑑みてなされたものであり、センサに温度変化が生じる場合に、正確な状態推定を行うことができるカルマンフィルタの提供を解決課題とする。   The present invention has been made in view of the above points, and an object of the present invention is to provide a Kalman filter that can perform accurate state estimation when a temperature change occurs in a sensor.

上述した課題を解決するため、本発明に係るカルマンフィルタは、互いに直交する3方向の磁気成分を検出し、3軸の座標系においてベクトルデータとして表現される磁気データを順次出力する3次元磁気センサを含む、複数のセンサと、前記3次元磁気センサの温度を検出して温度データを順次出力する温度検出部と、を備えた機器に組み込まれ、システムの状態を推定する状態推定装置に用いられるカルマンフィルタであって、前記3次元磁気センサのオフセットを推定した値を示すオフセット推定ベクトルを含む複数の状態変数を要素とする状態ベクトルを、システムの経時的な変化を表す状態遷移モデルに対して適用することで、単位時間経過後の前記状態ベクトルを推定し、これを推定状態ベクトルとして算出する、状態遷移モデル部と、前記複数のセンサの出力値の各々を要素とする観測値ベクトルに基づいて観測残差を算出し、前記推定状態ベクトルと、前記観測残差とに基づいて、前記状態ベクトルを更新し、これを更新後の状態ベクトルとして算出する、更新部と、を備え、前記単位時間における、前記温度データの変化量を、温度変化量としたとき、前記状態遷移モデルで規定されるプロセスノイズの共分散のうち、前記オフセット推定ベクトルに生じるプロセスノイズの共分散の各成分を、前記温度変化量に基づいて定める、ことを特徴とする。   In order to solve the above-described problem, a Kalman filter according to the present invention is a three-dimensional magnetic sensor that detects magnetic components in three directions orthogonal to each other and sequentially outputs magnetic data expressed as vector data in a three-axis coordinate system. A Kalman filter used in a state estimation device that estimates a state of a system, and is incorporated in a device including a plurality of sensors and a temperature detection unit that detects temperatures of the three-dimensional magnetic sensor and sequentially outputs temperature data A state vector having a plurality of state variables including an offset estimation vector indicating an estimated value of the offset of the three-dimensional magnetic sensor is applied to a state transition model representing a change of the system over time. Thus, the state vector after the unit time has been estimated is calculated as an estimated state vector. And an observation residual based on an observation value vector having each of output values of the plurality of sensors as elements, and updating the state vector based on the estimated state vector and the observation residual An update unit that calculates this as a state vector after update, and when the amount of change in the temperature data in the unit time is a temperature change amount, the process noise defined by the state transition model Among the covariances, each component of the process noise covariance generated in the offset estimation vector is determined based on the temperature change amount.

この発明によれば、3次元磁気センサのオフセット推定値を状態ベクトルの要素(状態変数)とするカルマンフィルタの演算において、状態遷移モデルで規定されるプロセスノイズの共分散を、3次元磁気センサの温度変化量に基づいて定める。
3次元磁気センサのオフセットは、3次元磁気センサの温度変化に伴い、変化する。従って、3次元磁気センサに温度変化が生じ、3次元磁気センサのオフセットが変化する場合、カルマンフィルタの演算で用いる状態ベクトルのうち、3次元磁気センサのオフセットを推定する状態変数の示す値が、真値から乖離する。
これに対して、本発明に係るカルマンフィルタは、状態遷移モデルにおいて規定されるプロセスノイズの共分散を、3次元磁気センサの温度変化量に基づいて定め、3次元磁気センサの温度変化に伴い生じる3次元磁気センサのオフセットの変化を考慮して状態ベクトルの更新を行うため、正確な状態推定が可能となる。
According to the present invention, in the calculation of the Kalman filter using the estimated offset value of the three-dimensional magnetic sensor as an element (state variable) of the state vector, the covariance of the process noise defined by the state transition model is calculated using the temperature of the three-dimensional magnetic sensor. Determine based on the amount of change.
The offset of the three-dimensional magnetic sensor changes as the temperature of the three-dimensional magnetic sensor changes. Therefore, when a temperature change occurs in the three-dimensional magnetic sensor and the offset of the three-dimensional magnetic sensor changes, the value indicated by the state variable for estimating the offset of the three-dimensional magnetic sensor is true among the state vectors used in the calculation of the Kalman filter. Deviates from the value.
On the other hand, the Kalman filter according to the present invention determines the covariance of process noise defined in the state transition model based on the temperature change amount of the three-dimensional magnetic sensor 3 Since the state vector is updated in consideration of the offset change of the three-dimensional magnetic sensor, accurate state estimation can be performed.

また、本発明に係るカルマンフィルタは、複数のセンサと、前記複数のセンサのうち、1以上のセンサの各々の温度を検出し、前記1以上のセンサの各々に対応する温度データを出力する温度検出部と、を備えた機器に組み込まれ、システムの状態を推定する状態推定装置に用いられるカルマンフィルタであって、前記複数のセンサのうち前記1以上のセンサの各々のオフセットを推定した値を要素とするベクトルをオフセット推定ベクトルとしたとき、前記オフセット推定ベクトルを含む複数の状態変数を要素とする状態ベクトルを、システムの経時的な変化を表す状態遷移モデルに対して適用することで、単位時間経過後の前記状態ベクトルを推定し、これを推定状態ベクトルとして算出する、状態遷移モデル部と、前記複数のセンサの出力値の各々を要素とする観測値ベクトルに基づいて観測残差を算出し、前記推定状態ベクトルと、前記観測残差とに基づいて、前記状態ベクトルを更新し、これを更新後の状態ベクトルとして算出する、更新部と、を備え、前記状態遷移モデルで規定されるプロセスノイズの共分散のうち、前記オフセット推定ベクトルに生じるプロセスノイズの共分散の各成分を、前記単位時間における、1以上の前記温度データの各々の温度変化量に基づいて定める、ことを特徴としてもよい。   The Kalman filter according to the present invention detects a temperature of each of one or more sensors among the plurality of sensors and the plurality of sensors, and outputs temperature data corresponding to each of the one or more sensors. And a Kalman filter used in a state estimation device for estimating a system state, wherein a value obtained by estimating an offset of each of the one or more sensors among the plurality of sensors is used as an element. When a vector to be used is an offset estimation vector, a state vector having a plurality of state variables including the offset estimation vector as an element is applied to a state transition model representing a change of the system over time, so that unit time elapses. A state transition model unit that estimates the subsequent state vector and calculates this as an estimated state vector; and the plurality of sensors An observation residual is calculated based on an observed value vector having each force value as an element, the state vector is updated based on the estimated state vector and the observed residual, and this state vector is updated. And an update unit, and among the process noise covariances defined by the state transition model, each component of the process noise covariance generated in the offset estimation vector is one or more in the unit time The temperature data may be determined based on a temperature change amount of each of the temperature data.

この発明によれば、1以上のセンサの各々のオフセットを推定した値を要素に含む状態ベクトルを更新するカルマンフィルタの演算において、状態遷移モデルで規定されるプロセスノイズの共分散が、1以上のセンサの各々の温度変化量に基づいて定められる。
この場合、1以上のセンサの各々に生じる温度変化に伴う、1以上のセンサの各々のオフセットの変化を考慮して、状態ベクトルの更新を行うことが可能となるため、正確な状態推定が可能となる。
According to this invention, the covariance of the process noise defined by the state transition model is one or more sensors in the calculation of the Kalman filter that updates the state vector including the estimated value of the offset of each of the one or more sensors. It is determined based on each temperature change amount.
In this case, since it is possible to update the state vector in consideration of the change in the offset of each of the one or more sensors accompanying the temperature change that occurs in each of the one or more sensors, accurate state estimation is possible. It becomes.

また、上述したカルマンフィルタにおいて、前記複数のセンサには、互いに直交する3方向の磁気成分を検出し、3軸の座標系においてベクトルデータとして表現される磁気データを順次出力する3次元磁気センサと、互いに直交する3軸の周りの角速度を検出し、3軸の座標系においてベクトルデータとして表現される角速度データを順次出力する3次元角速度センサとが含まれ、前記1以上のセンサには、前記3次元磁気センサ、または、前記3次元角速度センサのうち、少なくとも一方が含まれる、ことを特徴とすることが好ましい。   In the above-described Kalman filter, the plurality of sensors include a three-dimensional magnetic sensor that detects magnetic components in three directions orthogonal to each other and sequentially outputs magnetic data represented as vector data in a three-axis coordinate system; A three-dimensional angular velocity sensor that detects angular velocities around three axes orthogonal to each other and sequentially outputs angular velocity data expressed as vector data in a three-axis coordinate system. It is preferable that at least one of a three-dimensional magnetic sensor or the three-dimensional angular velocity sensor is included.

この発明によれば、3次元磁気センサと3次元角速度センサとを備える機器に組み込まれた状態推定装置が行うカルマンフィルタの演算において、3次元磁気センサまたは3次元角速度センサに温度変化が生じても、正確な状態推定を行うことが可能となる。   According to this invention, even if a temperature change occurs in the three-dimensional magnetic sensor or the three-dimensional angular velocity sensor in the calculation of the Kalman filter performed by the state estimation device incorporated in the device including the three-dimensional magnetic sensor and the three-dimensional angular velocity sensor, Accurate state estimation can be performed.

また、本発明に係る状態推定装置は、上述したカルマンフィルタのうちいずれかのカルマンフィルタと、各々の出力が前記観測値ベクトルの要素となる前記複数のセンサと、前記複数のセンサのうち1以上のセンサの温度を各々検出し、前記1以上のセンサに対応する1以上の前記温度データを出力する温度検出部とを備えることを特徴とする。   Moreover, the state estimation apparatus according to the present invention includes any one of the Kalman filters described above, the plurality of sensors whose outputs are elements of the observation vector, and one or more sensors among the plurality of sensors. And a temperature detector that outputs one or more temperature data corresponding to the one or more sensors.

この発明によれば、1以上のセンサの各々のオフセットを推定した値を要素に含む状態ベクトルを更新するカルマンフィルタの演算において、状態遷移モデルで規定されるプロセスノイズの共分散が、1以上のセンサの各々の温度変化量に基づいて定められる。
この場合、状態推定装置は、1以上のセンサの各々に生じる温度変化に伴い生じる、1以上のセンサの各々のオフセットの変化を考慮して、状態ベクトルの更新を行うことが可能となるため、正確な状態推定が可能となる。
According to this invention, the covariance of the process noise defined by the state transition model is one or more sensors in the calculation of the Kalman filter that updates the state vector including the estimated value of the offset of each of the one or more sensors. It is determined based on each temperature change amount.
In this case, since the state estimation device can update the state vector in consideration of the change in the offset of each of the one or more sensors that occurs due to the temperature change that occurs in each of the one or more sensors, Accurate state estimation is possible.

また、上述した状態推定装置において、前記温度検出部は、前記複数のセンサのうち前記1以上のセンサの内部に配置されることを特徴とすることが好ましい。   In the state estimation device described above, it is preferable that the temperature detection unit is disposed inside the one or more sensors among the plurality of sensors.

本発明において、1以上のセンサの各々の温度を検出する温度検出部は、1以上のセンサの各々の内部にそれぞれ配置されるものであってもよいし、1以上のセンサの外部に配置されるものであってもよい。すなわち、温度検出部は、1以上のセンサの各々の温度を検出し、単位時間毎に1以上のセンサの各々に対応する温度データを出力するものであればよい。
温度検出部が1以上のセンサの内部に配置される場合、または、外部に配置される場合のいずれの場合であっても、状態推定装置は、1以上のセンサの各々に生じる温度変化に伴い生じる、1以上のセンサの各々のオフセットの変化を考慮して、状態ベクトルの更新を行うことが可能となるため、正確な状態推定が可能となる。
In the present invention, the temperature detection unit that detects the temperature of each of the one or more sensors may be disposed inside each of the one or more sensors, or may be disposed outside the one or more sensors. It may be a thing. That is, the temperature detection part should just detect the temperature of each of one or more sensors, and outputs the temperature data corresponding to each of one or more sensors per unit time.
Regardless of whether the temperature detection unit is arranged inside one or more sensors or arranged outside, the state estimation device is accompanied by a temperature change occurring in each of the one or more sensors. The state vector can be updated in consideration of the generated offset change of each of the one or more sensors, so that accurate state estimation is possible.

本発明の実施形態に係る携帯機器の構成を示すブロック図である。It is a block diagram which shows the structure of the portable apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る携帯機器の外観を示す斜視図である。It is a perspective view which shows the external appearance of the portable apparatus which concerns on embodiment of this invention. 本発明の実施形態に係るカルマンフィルタ演算部の機能を表す機能ブロック図である。It is a functional block diagram showing the function of the Kalman filter calculating part which concerns on embodiment of this invention. 本発明の変形例1に係るカルマンフィルタ演算部の機能を表す機能ブロック図である。It is a functional block diagram showing the function of the Kalman filter calculating part which concerns on the modification 1 of this invention. 本発明の変形例3に係る携帯機器の構成を示すブロック図である。It is a block diagram which shows the structure of the portable apparatus which concerns on the modification 3 of this invention. 本発明の変形例4に係る携帯機器の構成を示すブロック図である。It is a block diagram which shows the structure of the portable apparatus which concerns on the modification 4 of this invention.

<A.実施形態>
本発明の実施の形態について図面を参照して説明する。
<A. Embodiment>
Embodiments of the present invention will be described with reference to the drawings.

[1. 機器構成及びソフトウェア構成について]
図1は、本発明の実施形態に係る携帯機器のブロック図であり、図2は携帯機器の外観を示す斜視図である。携帯機器1は、画面の姿勢に応じて地図などの画像を回転させることによって、画像によって表されている方位を現実空間の方位に追従させる機能を備える。この機能は、各種センサの出力に基づいてカルマンフィルタの演算を行い、携帯機器1の姿勢と、携帯機器1から見た地磁気Bgの向きとを推定することによって実現される。
[1. Device configuration and software configuration]
FIG. 1 is a block diagram of a portable device according to an embodiment of the present invention, and FIG. 2 is a perspective view showing an appearance of the portable device. The mobile device 1 has a function of causing the azimuth represented by the image to follow the azimuth of the real space by rotating an image such as a map according to the orientation of the screen. This function is realized by calculating the Kalman filter based on the outputs of various sensors and estimating the orientation of the mobile device 1 and the direction of the geomagnetism Bg as viewed from the mobile device 1.

携帯機器1は、各種の構成要素とバスを介して接続され装置全体を制御するCPU10、CPU10の作業領域として機能するRAM(蓄積部)20、状態推定プログラム100等の各種のプログラムやデータを記憶したROM30、通信を実行する通信部40、画像を表示する表示部50、及びGPS部60を備える。
また、携帯機器1は、地磁気Bg等の磁気を検出して磁気データを出力する3次元磁気センサ70、加速度を検出して加速度データを出力する3次元加速度センサ80、及び角速度を検出して角速度データを出力する3次元角速度センサ90を備える。
The mobile device 1 stores various programs and data such as a CPU 10 that is connected to various components via a bus and controls the entire apparatus, a RAM (storage unit) 20 that functions as a work area of the CPU 10, and a state estimation program 100. ROM 30, a communication unit 40 that executes communication, a display unit 50 that displays an image, and a GPS unit 60.
The portable device 1 also detects a magnetic field such as geomagnetism Bg and outputs magnetic data, a three-dimensional magnetic sensor 80 that detects acceleration and outputs acceleration data, and an angular velocity by detecting angular velocity. A three-dimensional angular velocity sensor 90 that outputs data is provided.

表示部50は、CPU10が状態推定プログラム100を実行することにより推定したシステムの状態に基づいて算出された地磁気Bgの向きや携帯機器1の姿勢μ等を、矢印等の画像により表示する。
GPS部60は、GPS衛星からの信号を受信して携帯機器1の位置情報(緯度、経度)を生成する。
The display unit 50 displays the orientation of the geomagnetism Bg calculated based on the state of the system estimated by the CPU 10 executing the state estimation program 100, the orientation μ of the portable device 1, and the like by an image such as an arrow.
The GPS unit 60 receives a signal from a GPS satellite and generates position information (latitude, longitude) of the mobile device 1.

3次元磁気センサ70は、X軸磁気センサ71、Y軸磁気センサ72、及びZ軸磁気センサ73を備える。各センサは、MI素子(磁気インピーダンス素子)、MR素子(磁気抵抗効果素子)などを用いて構成することができる。磁気センサI/F74は、X軸磁気センサ71、Y軸磁気センサ72、及び、Z軸磁気センサ73からの出力信号をAD変換して磁気データmを出力する。この磁気データmは、x軸、y軸およびz軸の3成分によって表されるベクトルデータである。より具体的には、磁気データmは、3次元磁気センサ70に固定された座標系(以下、「センサ座標系Σ」と称する)において、X軸磁気センサ71からの出力値をx軸成分として表し、Y軸磁気センサ72からの出力値をy軸成分として表し、Z軸磁気センサ73からの出力値をz軸成分として表すベクトルデータである。
また、3次元磁気センサ70は、3次元磁気センサ70の温度を検出する第1温度検出部75を備える。磁気センサI/F74は、第1温度検出部75からの出力信号をAD変換して温度データTを出力する。すなわち、第1温度検出部75は、携帯機器1の備えるセンサの温度を検出する温度検出部として機能する。
The three-dimensional magnetic sensor 70 includes an X-axis magnetic sensor 71, a Y-axis magnetic sensor 72, and a Z-axis magnetic sensor 73. Each sensor can be configured using an MI element (magnetoimpedance element), an MR element (magnetoresistance effect element), or the like. The magnetic sensor I / F 74 AD-converts output signals from the X-axis magnetic sensor 71, the Y-axis magnetic sensor 72, and the Z-axis magnetic sensor 73 and outputs magnetic data m. The magnetic data m is vector data represented by three components of the x axis, the y axis, and the z axis. More specifically, in the coordinate system fixed to the three-dimensional magnetic sensor 70 (hereinafter referred to as “sensor coordinate system Σ S ”), the magnetic data m represents the output value from the X-axis magnetic sensor 71 as the x-axis component. The vector data represents the output value from the Y-axis magnetic sensor 72 as a y-axis component and the output value from the Z-axis magnetic sensor 73 as a z-axis component.
The three-dimensional magnetic sensor 70 includes a first temperature detection unit 75 that detects the temperature of the three-dimensional magnetic sensor 70. Magnetic sensor I / F 74 is an output signal from the first temperature detecting section 75 and AD conversion and outputs the temperature data T m. That is, the first temperature detection unit 75 functions as a temperature detection unit that detects the temperature of the sensor included in the mobile device 1.

ところで、3次元磁気センサ70が検出する磁気データmには、地磁気Bgが含まれる。
地磁気Bgは、磁極北に向かう水平成分と伏角方向の鉛直成分を有する磁界であり、地上のある一点に固定された座標系(以下、「地上座標系Σ」と称する)において、一定の向き及び大きさを有するベクトルBgとして表される(なお、ベクトルの符号の左上に示す添え字「G」は、当該ベクトルが地上座標系Σで表されたベクトルであることを意味する)。つまり、センサ座標系Σにおいて、地磁気Bgは、携帯機器1の姿勢μに連動して向きを変える、一定の大きさのベクトルBg(μ)として表される(なお、ベクトルの符号の左上に示す添え字「S」は、当該ベクトルがセンサ座標系Σで表されたベクトルであることを意味する)。従って、センサ座標系Σにおいて地磁気Bgを表すベクトルBg(μ)を算出することで、携帯機器1の姿勢μを求めることができる。
一方、3次元磁気センサ70が搭載される携帯機器1は、着磁性を有する各種金属や、電気回路等、磁界を発生させる部品が備えられることが多い。このため、3次元磁気センサ70が出力するベクトルデータ(磁気データm)は、地磁気Bgを表すベクトルと、携帯機器1に搭載された部品が発する磁界(内部磁界Bi)を表すベクトルとを加算したベクトルとなる。従って、センサ座標系Σにおける地磁気Bgを表すベクトルBg(μ)を算出し、携帯機器1から見た地磁気Bgの向きを正確に求めるためには、センサ座標系Σにおいて、3次元磁気センサが出力する磁気データmの示す座標から、携帯機器1の部品が発する内部磁界Biを表すベクトルBiを減算する補正処理が必要となる。
このように、検出対象である地磁気Bgの正確な向きを特定するために、補正処理において、3次元磁気センサ70から出力される磁気データmから取り除かれる内部磁界Biを表すベクトルBiを、3次元磁気センサ70のオフセットと呼ぶ。
Incidentally, the magnetic data m detected by the three-dimensional magnetic sensor 70 includes geomagnetism Bg.
The geomagnetism Bg is a magnetic field having a horizontal component toward the magnetic pole north and a vertical component in the dip direction, and has a fixed orientation in a coordinate system fixed to a certain point on the ground (hereinafter referred to as “ground coordinate system Σ G ”). and expressed as a vector G Bg having a size (the letter "G" subscript indicates the upper left of the sign of the vector means that the vector is a vector expressed in ground coordinate system sigma G). That is, in the sensor coordinate system Σ S , the geomagnetism Bg is expressed as a vector S Bg (μ) having a certain magnitude that changes its direction in conjunction with the attitude μ of the mobile device 1 (note that the upper left of the sign of the vector) letter "S" subscript indicates the means that the vector is a vector expressed in the sensor coordinate system sigma S). Therefore, by calculating the vector S Bg (mu) representing the geomagnetism Bg in the sensor coordinate system sigma S, it can be obtained of the portable device 1 posture mu.
On the other hand, the portable device 1 on which the three-dimensional magnetic sensor 70 is mounted is often provided with components that generate a magnetic field, such as various magnetized metals and electric circuits. Therefore, the vector data (magnetic data m) output from the three-dimensional magnetic sensor 70 is obtained by adding a vector representing the geomagnetism Bg and a vector representing the magnetic field (internal magnetic field Bi) generated by the component mounted on the portable device 1. It becomes a vector. Therefore, to calculate a vector S Bg (mu) representing the geomagnetism Bg in the sensor coordinate system sigma S, in order to obtain the geomagnetism Bg direction as viewed from the portable device 1 correctly, the sensor coordinate system sigma S, 3-dimensional magnetic A correction process for subtracting the vector S Bi representing the internal magnetic field Bi generated by the component of the mobile device 1 from the coordinates indicated by the magnetic data m output from the sensor is required.
Thus, in order to specify the correct orientation of the geomagnetism Bg that is the detection target, the vector S Bi representing the internal magnetic field Bi removed from the magnetic data m output from the three-dimensional magnetic sensor 70 in the correction process is represented by 3 This is called an offset of the dimensional magnetic sensor 70.

3次元加速度センサ80は、X軸加速度センサ81、Y軸加速度センサ82、及びZ軸加速度センサ83を備える。各センサは、ピエゾ抵抗型、静電容量型、熱検知型などのような検知方式であってもよい。加速度センサI/F84は、各センサからの出力信号をAD変換して加速度データaを出力する。この加速度データaは、3次元加速度センサ80と一体となって運動する携帯機器1に固定された座標系における慣性力と重力との合力を、x軸、y軸及びz軸の3成分を有するベクトルとして示すデータである。従って、携帯機器1が静止状態または等速直線運動状態にあれば、加速度データaは、携帯機器1に固定された座標系において重力加速度の大きさと方向とを示すベクトルデータとなる。   The three-dimensional acceleration sensor 80 includes an X-axis acceleration sensor 81, a Y-axis acceleration sensor 82, and a Z-axis acceleration sensor 83. Each sensor may be a detection method such as a piezoresistive type, a capacitance type, or a heat detection type. The acceleration sensor I / F 84 AD-converts output signals from each sensor and outputs acceleration data a. This acceleration data a has the three components x-axis, y-axis, and z-axis of the resultant force of inertia and gravity in the coordinate system fixed to the portable device 1 that moves integrally with the three-dimensional acceleration sensor 80. Data shown as a vector. Therefore, if the mobile device 1 is in a stationary state or a constant velocity linear motion state, the acceleration data a is vector data indicating the magnitude and direction of gravitational acceleration in a coordinate system fixed to the mobile device 1.

3次元角速度センサ90は、X軸角速度センサ91、Y軸角速度センサ92、及びZ軸角速度センサ93を備える。角速度センサI/F94は、各センサからの出力信号をAD変換して角速度データgを出力する。角速度データgは、各軸の回りの角速度を示すベクトルデータである。   The three-dimensional angular velocity sensor 90 includes an X-axis angular velocity sensor 91, a Y-axis angular velocity sensor 92, and a Z-axis angular velocity sensor 93. The angular velocity sensor I / F 94 AD-converts output signals from the sensors and outputs angular velocity data g. The angular velocity data g is vector data indicating the angular velocity around each axis.

CPU10は、ROM30に格納されている状態推定プログラム100を実行することによって、携帯機器1の姿勢や3次元磁気センサ70のオフセット等のシステムの状態を表す複数の物理量を推定する。すなわち、携帯機器1は、CPU10が状態推定プログラム100を実行することにより、状態推定装置として機能する。   The CPU 10 estimates a plurality of physical quantities representing the system state such as the attitude of the mobile device 1 and the offset of the three-dimensional magnetic sensor 70 by executing the state estimation program 100 stored in the ROM 30. That is, the portable device 1 functions as a state estimation device when the CPU 10 executes the state estimation program 100.

図3は、状態推定装置のうち、CPU10が状態推定プログラム100を実行することにより実現される機能を表した機能ブロック図である。図3に示すように、状態推定装置は、初期値生成部200、カルマンフィルタ演算部300、及び出力情報生成部500を備える。
初期値生成部200は、各種設定情報に基づき、初期ベクトルINIを生成し、これを出力する。
カルマンフィルタ演算部300は、3次元磁気センサ70から出力される磁気データm、3次元加速度センサ80から出力される加速度データa、及び3次元角速度センサ90から出力される角速度データgを要素とする観測値ベクトルyを用いて、初期ベクトルINIを初期値とする状態ベクトルxを逐次更新する非線形カルマンフィルタの演算を実行することで、システムの状態を推定する。
出力情報生成部500は、カルマンフィルタ演算部300から周期的に出力される状態ベクトルxに基づいて、地磁気Bgの向き等の出力情報を算出する。
FIG. 3 is a functional block diagram showing functions realized by the CPU 10 executing the state estimation program 100 in the state estimation apparatus. As illustrated in FIG. 3, the state estimation device includes an initial value generation unit 200, a Kalman filter calculation unit 300, and an output information generation unit 500.
The initial value generation unit 200 generates an initial vector INI based on various setting information and outputs it.
The Kalman filter calculation unit 300 uses magnetic data m output from the three-dimensional magnetic sensor 70, acceleration data a output from the three-dimensional acceleration sensor 80, and angular velocity data g output from the three-dimensional angular velocity sensor 90 as elements. Using the value vector y, the state of the system is estimated by executing an operation of a nonlinear Kalman filter that sequentially updates the state vector x having the initial vector INI as an initial value.
The output information generation unit 500 calculates output information such as the direction of the geomagnetism Bg based on the state vector x periodically output from the Kalman filter calculation unit 300.

ここで、状態ベクトルxとは、複数の状態変数を要素とするベクトルである。状態ベクトルxの要素である複数の状態変数の各々は、非線形カルマンフィルタが推定するシステムの状態を示す複数の物理量を表す。すなわち、状態ベクトルxは、非線形カルマンフィルタが推定するシステムの状態を表すベクトルである。
本実施形態は、状態ベクトルxの要素(状態変数)として、携帯機器1の姿勢μ、地磁気の強さr、地磁気の伏角φ、携帯機器1の角速度ω、3次元角速度センサ90のオフセット推定値gOFF、及び3次元磁気センサ70のオフセット推定値mOFFを採用し、これらを推定の対象とする。
時刻T=kにおける状態ベクトルxは、以下の式(1)で表される。なお、各種変数、ベクトル、行列等の右下に付された添え字「k」は、当該各種変数、ベクトル、行列等の時刻T=kにおける値であることを意味する。

Figure 2013122384
Here, the state vector x is a vector having a plurality of state variables as elements. Each of the plurality of state variables that are elements of the state vector x represents a plurality of physical quantities indicating the state of the system estimated by the nonlinear Kalman filter. That is, the state vector x is a vector representing the state of the system estimated by the nonlinear Kalman filter.
In this embodiment, as the elements (state variables) of the state vector x, the attitude μ of the mobile device 1, the geomagnetic strength r, the geomagnetic dip angle φ, the angular velocity ω of the mobile device 1, and the offset estimation value of the three-dimensional angular velocity sensor 90. g OFF and the estimated offset value m OFF of the three-dimensional magnetic sensor 70 are adopted, and these are used as estimation targets.
The state vector x k at time T = k is expressed by the following equation (1). The subscript “k” attached to the lower right of various variables, vectors, matrices, and the like means that the values of the various variables, vectors, matrices, etc. at time T = k.
Figure 2013122384

ここで、地磁気の強さrはスカラーであり、地磁気の伏角φはスカラーであり、角速度ωは3次元ベクトルであり、3次元角速度センサ90のオフセット推定値gOFFは3次元ベクトルであり、3次元磁気センサ70のオフセット推定値mOFFは3次元ベクトルである。
また、姿勢μは、クォータニオンを用いて表現される。クォータニオンとは、物体の姿勢(回転状態)を表す4次元数である。例えば、センサ座標系Σの各軸と、地上座標系Σの各軸とが一致する姿勢μを基準姿勢と定義し、基準姿勢をμ=(0、0、0、1)と表現する。このとき、携帯機器1の任意の姿勢μは、基準姿勢に対して単位ベクトルρの方向を回転軸として角度ψだけ回転した姿勢として表現できる。回転後の姿勢μは、クォータニオンを用いて、式(2)で与えられる。

Figure 2013122384
Here, the geomagnetism strength r is a scalar, the geomagnetic dip angle φ is a scalar, the angular velocity ω is a three-dimensional vector, the offset estimated value g OFF of the three-dimensional angular velocity sensor 90 is a three-dimensional vector, 3 The estimated offset value m OFF of the three-dimensional magnetic sensor 70 is a three-dimensional vector.
In addition, the posture μ is expressed using quaternions. A quaternion is a four-dimensional number that represents the posture (rotation state) of an object. For example, the respective axes of the sensor coordinate system sigma S, the attitude mu where the respective axes of the ground coordinate system sigma G match is defined as a reference position, the reference orientation mu = expressed as (0, 0, 0, 1) . At this time, the arbitrary posture μ of the mobile device 1 can be expressed as a posture rotated by an angle ψ with the direction of the unit vector ρ as the rotation axis with respect to the reference posture. The posture μ after rotation is given by Equation (2) using a quaternion.
Figure 2013122384

観測値ベクトルyとは、3次元磁気センサ70から出力される磁気データm、3次元加速度センサ80から出力される加速度データa、及び、3次元角速度センサ90から出力される角速度データgを要素とするベクトルである。時刻T=kにおける観測値ベクトルyは式(3)で与えられる。

Figure 2013122384
The observed value vector y includes magnetic data m output from the three-dimensional magnetic sensor 70, acceleration data a output from the three-dimensional acceleration sensor 80, and angular velocity data g output from the three-dimensional angular velocity sensor 90 as elements. It is a vector to do. Observation value vector y k at time T = k is given by equation (3).
Figure 2013122384

カルマンフィルタ演算部300は、上述した状態ベクトルxと観測値ベクトルyとを用いた非線形カルマンフィルタの演算を実行して、状態ベクトルxの各要素が真値に近づくように状態ベクトルxを周期的に更新することで、システムの状態を表す複数の物理量を推定する。
ここで、「真値」とは、状態ベクトルxの各要素に対応する実際の物理量を表す値である。また、以下では、状態ベクトルxの各要素を真値としたベクトルを、「状態ベクトルの真値」と称する。なお、非線形カルマンフィルタの演算の詳細については、後述する。
The Kalman filter operation unit 300 performs the operation of the nonlinear Kalman filter using the state vector x k and the observed value vector y k described above, and obtains the state vector x k so that each element of the state vector x k approaches a true value. By periodically updating, a plurality of physical quantities representing the system state are estimated.
Here, the “true value” is a value representing an actual physical quantity corresponding to each element of the state vector x k . Hereinafter, a vector in which each element of the state vector x k is a true value is referred to as a “true value of the state vector”. Details of the operation of the nonlinear Kalman filter will be described later.

初期値生成部200は、初期ベクトルINIを生成し、これを出力する。
初期ベクトルINIは、以下の式(4)に示すように、状態ベクトルxの初期値、つまり時刻T=0における状態ベクトルxであり、姿勢μの初期値μ、地磁気の強さrの初期値r、地磁気の伏角φの初期値φ、角速度ωの初期値ω、3次元角速度センサ90のオフセット推定値gOFFの初期値gOFF,0、及び3次元磁気センサ70のオフセット推定値mOFFの初期値mOFF,0を要素として含む。

Figure 2013122384
The initial value generation unit 200 generates an initial vector INI and outputs it.
The initial vector INI is the initial value of the state vector x k , that is, the state vector x 0 at time T = 0, the initial value μ 0 of the posture μ, and the geomagnetism strength r, as shown in the following equation (4). the initial value r 0 of the initial value phi 0 geomagnetic dip phi, the angular velocity omega initial value omega 0, the initial value of the offset estimation value g OFF of the three-dimensional angular velocity sensor 90 g OFF, 0, and the three-dimensional magnetic sensor 70 The initial value m OFF, 0 of the offset estimated value m OFF is included as an element.
Figure 2013122384

なお、初期ベクトルINIの各要素は、真値から大きく乖離しないように適宜定めればよい。以下では、初期ベクトルINIの各要素の設定例を示す。   It should be noted that each element of the initial vector INI may be determined as appropriate so as not to greatly deviate from the true value. In the following, a setting example of each element of the initial vector INI is shown.

地磁気の強さrの初期値r、及び地磁気の伏角φの初期値φは、例えば、GPS部60から供給される位置情報に基づいて生成することができる。これは、地球上の位置が特定できれば、その位置における地磁気の強さ及び伏角を知ることができるからである。具体的には、ROM30には、位置情報と地磁気の強さ及び伏角とを対応づけて記憶したルックアップテーブルLUT1が格納される。初期値生成部200は、ルックアップテーブルLUT1を参照して、位置情報に対応する地磁気の強さ及び伏角を、地磁気の強さrの初期値r及び地磁気の伏角φの初期値φとして設定する。
なお、携帯機器1が衛星からの電波の届かない場所(例えば、地下街)にある場合には、GPS部60から位置情報が得られない。そのような場合には、携帯機器1が使われ得る地域の典型的な値を採用すればよい。その値もルックアップテーブルLUT1に格納されている。初期値生成部200は、位置情報の取得が不能な場合には、典型的な値をルックアップテーブルLUT1から読み出す。例えば、日本で販売された携帯機器1については、明石市の地磁気の強さ及び伏角に基づいて、地磁気の強さrの初期値r、及び地磁気の伏角φの初期値φを算出する。
The initial value r 0 of the geomagnetic strength r and the initial value φ 0 of the geomagnetic dip angle φ can be generated based on position information supplied from the GPS unit 60, for example. This is because if the position on the earth can be specified, the geomagnetic strength and the dip angle at that position can be known. Specifically, the ROM 30 stores a look-up table LUT1 that stores the positional information, the geomagnetic strength, and the dip angle in association with each other. The initial value generation unit 200 refers to the lookup table LUT1 and sets the geomagnetic strength and the dip angle corresponding to the position information as the initial value r 0 of the terrestrial magnetic strength r and the initial value φ 0 of the dip angle φ of the geomagnetism. Set.
In addition, when the portable device 1 is in a place where radio waves from the satellite do not reach (for example, an underground shopping center), position information cannot be obtained from the GPS unit 60. In such a case, a typical value in a region where the mobile device 1 can be used may be adopted. The value is also stored in the lookup table LUT1. When the position information cannot be acquired, the initial value generation unit 200 reads a typical value from the lookup table LUT1. For example, for the mobile device 1 sold in Japan, the initial value r 0 of the geomagnetism strength r and the initial value φ 0 of the geomagnetism depression angle φ are calculated based on the geomagnetism strength and the depression angle of Akashi City. .

角速度ωの初期値ωは、例えば、携帯機器1が静止していることを仮定して、「0」に設定する。
また、3次元角速度センサ90のオフセット推定値gOFFの初期値gOFF,0は、通常「0」近辺に調整されているため、「0」に設定する。
姿勢μの初期値μは、例えば、携帯機器1が一定方向に向いて静止していることを仮定して、実際の初期姿勢とのずれを小さくするような値を設定する。
The initial value ω 0 of the angular velocity ω is set to “0”, for example, assuming that the mobile device 1 is stationary.
Further, the initial value g OFF, 0 of the offset estimated value g OFF of the three-dimensional angular velocity sensor 90 is normally adjusted in the vicinity of “0”, so is set to “0”.
As the initial value μ 0 of the posture μ, for example, assuming that the mobile device 1 is stationary in a certain direction, a value that reduces the deviation from the actual initial posture is set.

3次元磁気センサ70のオフセット推定値mOFFの初期値mOFF,0は、時刻T=0に3次元磁気センサ70から出力される磁気データm、地上座標系Σにおいて地磁気Bgを表したベクトルBg、及び、行列B(μ)を用いて、以下に示す式(5)により算出される。
ここで、行列B(μ)は、携帯機器1が姿勢μである場合に、地上座標系Σにおいて表現されたベクトルを、センサ座標系Σで表現するための座標変換行列であり、以下の式(6)で表される。また、時刻T=0における地磁気Bgを地上座標系Σから表したベクトルBgは、地磁気の強さrの初期値rと、地磁気の伏角φの初期値φとを用いて、以下の式(7)で表される。なお、本実施形態では、地上座標系Σを、y軸が磁極北を向き、z軸が鉛直上を向くように定める。

Figure 2013122384
Initial value m OFF, the offset estimate m OFF of the three-dimensional magnetic sensor 70 0, magnetic data m 0 is output at time T = 0 from a 3D magnetic sensor 70, representing the geomagnetism Bg in ground coordinate system sigma G Using the vector G Bg and the matrix B (μ), it is calculated by the following equation (5).
Here, the matrix B (mu), when the portable device 1 is attitude mu, a vector expressed in ground coordinate system sigma G, a coordinate transformation matrix for representing the sensor coordinate system sigma S, below (6) A vector G Bg representing the geomagnetism Bg at the time T = 0 from the ground coordinate system Σ G is expressed as follows using an initial value r 0 of the geomagnetic strength r and an initial value φ 0 of the geomagnetic dip angle φ: (7) In the present embodiment, the ground coordinate system sigma G, oriented magnetic poles north y-axis, z-axis defined as facing upward vertical.
Figure 2013122384

このように、初期値生成部200は、初期ベクトルINIを生成しこれを出力する。そして、カルマンフィルタ演算部300は、初期ベクトルINIを初期値とする状態ベクトルxを更新する非線形カルマンフィルタの演算を実行することで、システムの状態を推定する。以下では、カルマンフィルタ演算部300が行う非線形カルマンフィルタの演算の詳細について説明する。 In this way, the initial value generation unit 200 generates the initial vector INI and outputs it. Then, the Kalman filter calculation unit 300 estimates the state of the system by executing a nonlinear Kalman filter calculation that updates the state vector x k with the initial vector INI as an initial value. Hereinafter, details of the calculation of the nonlinear Kalman filter performed by the Kalman filter calculation unit 300 will be described.

[2. 非線形カルマンフィルタによる演算について]
一般的にカルマンフィルタは、動的システムの状態の経時的な変化を表す状態遷移モデルを用いて、ある時刻(時刻T=k−1)のシステムの状態を示す状態ベクトルx k−1から単位時間が経過した後(時刻T=k)の状態ベクトルxを推定する。この推定値を、推定状態ベクトルx と称する。
そして、カルマンフィルタは、各種センサからの出力を要素とする観測値ベクトルyと状態ベクトルxとの関係を表す観測モデルを用いて、推定状態ベクトルx から観測値ベクトルyを推定する。この推定値を、推定観測値ベクトルy と称する。
次に、カルマンフィルタは、推定観測値ベクトルy と、実際の観測値を要素とする観測値ベクトルyとの差分を観測残差zとして算出し、観測残差zに基づいてカルマンゲインKを算出する。さらに、カルマンフィルタは、観測残差z、カルマンゲインK、及び、推定状態ベクトルx を用いて、状態ベクトルx k−1を更新することにより、更新後の状態ベクトルx を算出する。
以上のような状態ベクトルxの更新を繰り返すカルマンフィルタの演算により、状態ベクトルxの各要素を実際の物理量を正確に表した値(真値)に近い正確な値へと近付ける。
[2. Calculation using nonlinear Kalman filter]
In general, the Kalman filter uses a state transition model that represents a change in the state of a dynamic system over time, and a unit from a state vector x + k−1 that indicates the state of the system at a certain time (time T = k−1). The state vector x k after the elapse of time (time T = k) is estimated. This estimated value is referred to as an estimated state vector x k .
Then, the Kalman filter estimates the observation value vector y k from the estimated state vector x k using an observation model that represents the relationship between the observation value vector y k and the state vector x k whose elements are outputs from various sensors. . This estimated value is referred to as an estimated observation value vector y k .
Next, the Kalman filter estimated observed value vector y - and k, calculates the difference between the observed value vector y k to the actual observed value element as observed residuals z k, based on the observation residuals z k Kalman The gain Kk is calculated. Furthermore, the Kalman filter updates the state vector x + k after updating the state vector x + k−1 using the observation residual z k , the Kalman gain K k , and the estimated state vector x k. calculate.
By the Kalman filter operation that repeatedly updates the state vector x k as described above, each element of the state vector x k is brought close to an accurate value close to a value (true value) that accurately represents the actual physical quantity.

なお、詳細は後述するが、本実施形態ではカルマンフィルタとして、非線形カルマンフィルタであるシグマポイントカルマンフィルタを用いる。
シグマポイントカルマンフィルタは、まず、状態ベクトルx k−1の周囲に複数のシグマポイントχ k−1を設定し、これらの複数のシグマポイントχ k−1を状態遷移モデルに適用することで、単位時間経過後の複数のシグマポイントを推定する。この推定された複数のシグマポイントを、推定シグマポイントχ と称する。次に、シグマポイントカルマンフィルタは、複数の推定シグマポイントχ の平均を算出することにより、推定状態ベクトルx を求める。
従って、シグマポイントカルマンフィルタを用いてカルマンフィルタの演算を実行する場合、推定観測値ベクトルy は、厳密には、推定状態ベクトルx の周辺に存在する複数の推定シグマポイントχ に基づいて算出される。
Although details will be described later, in this embodiment, a sigma point Kalman filter which is a nonlinear Kalman filter is used as the Kalman filter.
The sigma point Kalman filter first sets a plurality of sigma points χ + k−1 around the state vector x + k−1 and applies the plurality of sigma points χ + k−1 to the state transition model. Estimate multiple sigma points after unit time. The plurality of estimated sigma points are referred to as estimated sigma points χ k . Next, the sigma point Kalman filter obtains an estimated state vector x - k by calculating an average of a plurality of estimated sigma points χ - k .
Therefore, when the Kalman filter operation is performed using the sigma point Kalman filter, the estimated observation value vector y k is strictly based on a plurality of estimated sigma points χ k existing around the estimated state vector x k. Is calculated.

本実施形態における、非線形カルマンフィルタの状態遷移モデルは以下に示す式(8)で与えられ、観測モデルは以下に示す式(9)で与えられる。なお、本実施形態では、式(8)に現れる状態方程式f、および、式(9)に現れる観測方程式hは、非線形の関数である。

Figure 2013122384
In this embodiment, the state transition model of the nonlinear Kalman filter is given by the following equation (8), and the observation model is given by the following equation (9). In the present embodiment, the state equation f appearing in Equation (8) and the observation equation h appearing in Equation (9) are non-linear functions.
Figure 2013122384

ここで、状態ベクトルxはdim(x)次元のベクトルであり、観測値ベクトルyはdim(y)次元のベクトルである。本実施形態では、dim(x)=15であり、dim(y)=9である。
ここで、P は、推定状態ベクトルx の推定誤差の共分散であり、P は、更新後の状態ベクトルx の推定誤差の共分散である。また、Pyy は、観測残差zの共分散であり、Pxy は、推定状態ベクトルx と、推定観測値ベクトルy との相互共分散行列である。
また、式(8)に現れるプロセスノイズw及び式(9)に現れる観測ノイズvは「0」を中心とするガウスノイズである。
式(8)は、時刻T=kにおける状態ベクトルxが、時刻T=k−1における状態ベクトルxk−1を状態方程式fに代入して得られた値と、時刻T=k−1におけるプロセスノイズwk−1とを加算することにより推定されることを示している。
また、式(9)は、時刻T=kにおける観測値ベクトルyが、時刻T=kにおける状態ベクトルxを観測方程式hに代入して得られる値と、時刻T=kにおける観測ノイズvとを加算することにより推定されることを示している。
なお、プロセスノイズwの共分散をQ、観測ノイズvの共分散をRと表す。
Here, the state vector x k is a dim (x) -dimensional vector, and the observation value vector y k is a dim (y) -dimensional vector. In the present embodiment, dim (x) = 15 and dim (y) = 9.
Here, P k is the covariance of the estimated error of the estimated state vector x k , and P + k is the covariance of the estimated error of the updated state vector x + k . P yy k is a covariance of the observation residual z k , and P xy k is a mutual covariance matrix of the estimated state vector x k and the estimated observation value vector y k .
Further, the process noise w k appearing in the equation (8) and the observation noise v k appearing in the equation (9) are Gaussian noises centered on “0”.
Equation (8) shows that the state vector x k at time T = k is obtained by substituting the state vector x k-1 at time T = k−1 for the state equation f, and the time T = k−1. It is estimated by adding the process noise w k−1 in FIG.
Equation (9) shows that the observed value vector y k at time T = k is obtained by substituting the state vector x k at time T = k into the observation equation h, and the observed noise v at time T = k. It shows that it is estimated by adding k .
Incidentally, representing the covariance of the process noise w k Q k, the covariance of measurement noise v k and R k.

プロセスノイズwの共分散Qは、以下の式(10)に示すように、行列Qcst,1、行列Qcst,2、及び、行列Qm,kにより構成される15行15列の対称行列である。
ここで、行列Qcst,1は、12行12列の対称行列であり、行列Qcst,1の各成分は定数である。この行列Qcst,1は、状態遷移モデルにおいて状態ベクトルxに生じるプロセスノイズwのうち、3次元磁気センサ70のオフセット推定値mOFF,k以外の要素に生じるプロセスノイズの共分散を表す行列である。行列Qcst,2は、12行3列の零行列である。
行列Qm,kは、3行3列の対称行列であり、状態遷移モデルにおいて状態ベクトルxに生じるプロセスノイズwのうち、3次元磁気センサ70のオフセット推定値mOFF,kに生じるプロセスノイズの共分散を表す行列である。行列Qm,kは、以下の式(11)に示すように、3次元磁気センサ70の温度変化量ΔTm,kに基づいて定められる。なお、式(11)に現れる係数αは、正の実数である。また、行列Qcst,mは、3次元磁気センサ70に温度変化が生じても3次元磁気センサ70のオフセットが変化しないと仮定した状態遷移モデルにおいて、状態ベクトルxに生じるプロセスノイズwのうち、3次元磁気センサ70のオフセット推定値mOFF,kに生じるプロセスノイズの共分散を表す行列である。本実施形態では、行列Qcst,mの各成分は定数とする。
また、式(12)に示すように、温度変化量ΔTm,kは、時刻T=kにおける温度データTm,kと、時刻T=k−1における温度データTm,k−1との差分の絶対値を表す。なお、温度変化量ΔTに対して添え字「k」を付す場合には、時刻T=kと時刻T=k−1との間に生じる、3次元磁気センサ70の温度変化量の絶対値であることを表す。

Figure 2013122384
The covariance Q k of the process noise w k is expressed by 15 rows and 15 columns composed of a matrix Q cst, 1 , a matrix Q cst, 2 , and a matrix Q m, k as shown in the following equation (10). It is a symmetric matrix.
Here, the matrix Q cst, 1 is a 12 × 12 symmetric matrix, and each component of the matrix Q cst, 1 is a constant. This matrix Q cst, 1 represents the covariance of process noise generated in elements other than the estimated offset value m OFF, k of the three-dimensional magnetic sensor 70 among the process noise w k generated in the state vector x k in the state transition model. It is a matrix. The matrix Q cst, 2 is a 12 × 3 zero matrix.
The matrix Q m, k is a symmetric matrix with 3 rows and 3 columns, and the process that occurs in the offset estimation value m OFF, k of the three-dimensional magnetic sensor 70 among the process noise w k that occurs in the state vector x k in the state transition model. It is a matrix representing the covariance of noise. The matrix Q m, k is determined based on the temperature change ΔT m, k of the three-dimensional magnetic sensor 70 as shown in the following equation (11). The coefficient α m appearing in the equation (11) is a positive real number. Further, the matrix Q cst, m represents the process noise w k generated in the state vector x k in the state transition model that assumes that the offset of the three-dimensional magnetic sensor 70 does not change even if the temperature of the three-dimensional magnetic sensor 70 changes. Of these, the matrix represents the covariance of the process noise generated in the offset estimation value m OFF, k of the three-dimensional magnetic sensor 70. In the present embodiment, each component of the matrix Q cst, m is a constant.
Further, as shown in the equation (12), the temperature change amount ΔT m, k is the temperature data T m, k at time T = k and the temperature data T m, k−1 at time T = k−1. Represents the absolute value of the difference. Note that when subjecting the letter "k" subscripts to temperature variation [Delta] T m occurs between time T = k and time T = k-1, the absolute value of the temperature change amount of the three-dimensional magnetic sensor 70 It represents that.
Figure 2013122384

3次元磁気センサ70のオフセットは、3次元磁気センサ70の温度変化に伴い、変化する。より具体的には、3次元磁気センサ70のオフセットの変化の大きさは、3次元磁気センサ70の温度変化量ΔTm,kの大きさに基づいて定められる。
詳細は後述するが、3次元磁気センサ70のオフセットの経時的な変化を定式化することは難しい。つまり、3次元磁気センサ70のオフセットの経時的な変化を、3次元磁気センサ70の温度変化まで考慮したうえで、状態方程式fとして定式化することは難しい。
状態方程式fが3次元磁気センサ70の温度変化を考慮していない場合、状態遷移モデルは、3次元磁気センサ70に温度変化が生じたときに、状態推定装置が推定するシステムの経時的な変化を正確に表現することができなくなる。そして、状態遷移モデルが、システムの経時的な変化を正確に表現していない場合、状態遷移モデルを信頼して状態ベクトルxを更新すると、状態ベクトルxの各要素(特に、3次元磁気センサ70のオフセット推定値mOFF,k)は、真値から乖離した値となる可能性が高い。
このように、状態ベクトルxの各要素が真値から乖離した値となる場合、状態推定装置は、システムの状態を正確に推定できない。また、状態ベクトルxの各要素が真値から乖離した値となった場合、その後、非線形カルマンフィルタの演算を繰り返しても、状態ベクトルxの各要素が真値に近い値に収束するまでに長い時間を要することになる。
The offset of the three-dimensional magnetic sensor 70 changes as the temperature of the three-dimensional magnetic sensor 70 changes. More specifically, the magnitude of the offset change of the three-dimensional magnetic sensor 70 is determined based on the magnitude of the temperature change amount ΔT m, k of the three-dimensional magnetic sensor 70.
Although details will be described later, it is difficult to formulate a change with time of the offset of the three-dimensional magnetic sensor 70. That is, it is difficult to formulate as a state equation f after taking into account the change over time of the offset of the three-dimensional magnetic sensor 70 up to the temperature change of the three-dimensional magnetic sensor 70.
When the state equation f does not take into account the temperature change of the three-dimensional magnetic sensor 70, the state transition model is a change with time of the system estimated by the state estimation device when a temperature change occurs in the three-dimensional magnetic sensor 70. Cannot be expressed accurately. If the state transition model does not accurately represent changes over time in the system, the state vector x k is updated by trusting the state transition model, and each element of the state vector x k (particularly, the three-dimensional magnetic field). The estimated offset value m OFF, k ) of the sensor 70 is likely to be a value deviating from the true value.
Thus, if each element of the state vector x k is a value which deviates from the true value, the state estimation device may not accurately estimate the state of the system. Further, when each element of the state vector x k becomes a value deviating from the true value, even if the calculation of the nonlinear Kalman filter is repeated thereafter, until each element of the state vector x k converges to a value close to the true value. It will take a long time.

これに対して、本実施形態では、式(11)に示した通り、プロセスノイズwの共分散Qのうち、3次元磁気センサ70のオフセット推定値mOFFに対応する成分である行列Qm,kを、3次元磁気センサ70の温度変化量ΔTm,kに基づいて定める。
この場合、状態遷移モデルは、状態方程式fにおいて定式化することができない3次元磁気センサ70の温度変化に伴う3次元磁気センサ70のオフセットの変化を、プロセスノイズwとして考慮する。これにより、本実施形態に係る状態推定装置は、状態遷移モデルと、状態推定装置が推定するシステムの経時的な変化との間に存在する誤差を考慮しつつ、状態ベクトルxの更新を行うことができるため、更新後の状態ベクトルx の各要素が真値から乖離する可能性を低減させることが可能となる。
On the other hand, in the present embodiment, as shown in Expression (11), the matrix Q that is a component corresponding to the offset estimated value m OFF of the three-dimensional magnetic sensor 70 in the covariance Q k of the process noise w k. m, and k, determined based on the temperature change amount [Delta] T m, k of the three-dimensional magnetic sensor 70.
In this case, the state transition model considers the change in the offset of the three-dimensional magnetic sensor 70 accompanying the temperature change of the three-dimensional magnetic sensor 70 that cannot be formulated in the state equation f as the process noise w k . Thereby, the state estimation device according to the present embodiment updates the state vector x k in consideration of an error existing between the state transition model and a system change with time estimated by the state estimation device. Therefore, the possibility that each element of the updated state vector x + k deviates from the true value can be reduced.

なお、センサのオフセットを推定する値を表す状態変数のうち、当該センサの温度変化量に基づいて、当該状態変数に生じるプロセスノイズの共分散が定められる状態変数を、「オフセット推定ベクトル」と称する場合がある。
本実施形態では、センサのオフセットを推定する値を表す状態変数が、3次元角速度センサ90のオフセット推定値gOFF、及び3次元磁気センサ70のオフセット推定値mOFFであるのに対して、センサの温度変化量に基づいて状態変数に生じるプロセスノイズの共分散が定められる状態変数は、3次元磁気センサ70のオフセット推定値mOFFである。つまり、本実施形態では、3次元磁気センサ70のオフセット推定値mOFFが、オフセット推定ベクトルに該当する。
Of the state variables representing values for estimating the sensor offset, a state variable in which the covariance of process noise occurring in the state variable is determined based on the temperature change amount of the sensor is referred to as an “offset estimation vector”. There is a case.
In the present embodiment, the state variables representing the values for estimating the sensor offset are the offset estimated value g OFF of the three-dimensional angular velocity sensor 90 and the offset estimated value m OFF of the three-dimensional magnetic sensor 70, whereas the sensor The state variable in which the covariance of process noise generated in the state variable based on the temperature change amount is determined as the offset estimated value m OFF of the three-dimensional magnetic sensor 70. That is, in this embodiment, the offset estimated value m OFF of the three-dimensional magnetic sensor 70 corresponds to the offset estimation vector.

時刻T=kにおける観測残差zは、実際の観測値ベクトルyと、推定観測値ベクトルy とに基づいて定められるベクトルであり、以下に示す式(13)で表される。カルマンフィルタは、以下の式(15)に示すように、観測残差z、推定状態ベクトルx 、及び、式(14)に示すカルマンゲインKを用いて、更新後の状態ベクトルx を算出する。また、カルマンフィルタは、以下の式(16)に示すように、状態ベクトルxの推定誤差の共分散Pを更新する。
ここで、P は、推定状態ベクトルx の推定誤差の共分散であり、P は、更新後の状態ベクトルx の推定誤差の共分散である。また、Pyy は、観測残差zの共分散であり、Pxy は、推定状態ベクトルx と、推定観測値ベクトルy との相互共分散行列である。

Figure 2013122384
The observation residual z k at time T = k is a vector determined based on the actual observation value vector y k and the estimated observation value vector y k, and is expressed by the following equation (13). As shown in the following equation (15), the Kalman filter uses the observed residual z k , the estimated state vector x k , and the Kalman gain K k shown in equation (14) to update the state vector x +. k is calculated. Further, the Kalman filter updates the covariance P k of the estimation error of the state vector x k as shown in the following equation (16).
Here, P k is the covariance of the estimated error of the estimated state vector x k , and P + k is the covariance of the estimated error of the updated state vector x + k . P yy k is a covariance of the observation residual z k , and P xy k is a mutual covariance matrix of the estimated state vector x k and the estimated observation value vector y k .
Figure 2013122384

なお、推定観測値ベクトルy は、推定状態ベクトルx (厳密には、推定シグマポイントχ )を、式(9)に示す観測モデルに適用することで算出される値である。よって、推定観測値ベクトルy と実際のセンサ出力に基づく観測値ベクトルyとの差分である観測残差zは、推定状態ベクトルx と実際の物理量を正確に表した値(真値)との近似度を示す値である。
従って、式(15)に示すように、観測残差zを用いて、推定状態ベクトルx を、更新後の状態ベクトルx へと更新することにより、状態ベクトルxの各要素を真値に近い値へと近付けることができる。
Note that the estimated observation value vector y k is a value calculated by applying the estimated state vector x k (strictly, the estimated sigma point χ k ) to the observation model shown in Expression (9). . Therefore, the observation residual z k that is the difference between the estimated observation vector y k and the observation vector y k based on the actual sensor output is a value that accurately represents the estimated state vector x k and the actual physical quantity ( This is a value indicating the degree of approximation to the true value.
Therefore, as shown in Expression (15), by using the observation residual z k , the estimated state vector x k is updated to the updated state vector x + k , whereby each element of the state vector x k Can be brought closer to the true value.

カルマンフィルタ演算部300は、アンセンテッド変換を用いたシグマポイントカルマンフィルタを用いて、非線形カルマンフィルタの演算を実行する。
図3に示すように、遅延部310は、加算器390から出力される更新後の状態ベクトルx を、単位時間(時刻T=k−1から時刻T=kに相当する時間)だけ遅延させることで、状態ベクトルx k−1を生成し、これを、シグマポイント生成部320に対して出力する。なお、初回の演算(時刻T=0における演算)では、遅延部310は、初期値生成部200が出力する初期ベクトルINIを、状態ベクトルx k−1に適用する。
The Kalman filter operation unit 300 performs an operation of a nonlinear Kalman filter using a sigma point Kalman filter using unscented transformation.
As illustrated in FIG. 3, the delay unit 310 delays the updated state vector x + k output from the adder 390 by a unit time (time corresponding to time T = k from time T = k−1). As a result, a state vector x + k−1 is generated and output to the sigma point generation unit 320. In the first calculation (calculation at time T = 0), the delay unit 310 applies the initial vector INI output from the initial value generation unit 200 to the state vector x + k−1 .

シグマポイント生成部320は、3次元磁気センサ70が順次出力する温度データTm,kを式(11)に適用し、行列Qm,k−1を算出することで、式(10)に示すプロセスノイズwの共分散Qk−1を算出する。 The sigma point generation unit 320 applies the temperature data T m, k sequentially output by the three-dimensional magnetic sensor 70 to the equation (11), and calculates the matrix Q m, k−1 to obtain the equation (10). The covariance Q k−1 of the process noise w k is calculated.

また、シグマポイント生成部320は、「dim(x)」行「dim(x)」列の共分散行列P k−1及びQk−1を用いて、「2dim(x)+1」個のシグマポイントを生成する。
具体的には、まず、複数のシグマポイントの平均に対して、平均のまわりのシグマポイントの広がりを表すスケーリングパラメータλを用いて、式(17)及び式(18)に示すベクトルσ(1)〜σ(2dim(x))を定義する。

Figure 2013122384
In addition, the sigma point generation unit 320 uses the covariance matrices P + k−1 and Q k−1 in “dim (x)” rows and “dim (x)” columns to generate “2 dim (x) +1” pieces. Generate sigma points.
Specifically, first, with respect to the average of a plurality of sigma points, using the scaling parameter λ representing the spread of the sigma points around the average, the vector σ k (1) expressed by the equations (17) and (18) is used. ) To σ k (2dim (x)).
Figure 2013122384

このとき、シグマポイント生成部320は、ベクトルσk−1と状態ベクトルx k−1とに基づいて、式(19)及び式(20)で示される「2dim(x)+1」個のシグマポイントχ k−1(0)〜χ k−1(2dim(x))を生成する。

Figure 2013122384
At this time, the sigma point generation unit 320 performs “2dim (x) +1” sigma expressed by Expression (19) and Expression (20) based on the vector σ k−1 and the state vector x + k−1. Points χ + k−1 (0) to χ + k−1 (2dim (x)) are generated.
Figure 2013122384

状態遷移演算部330は、式(21)に示すように、時刻T=k−1における「2dim(x)+1」個のシグマポイントχ k−1(0)〜χ k−1(2dim(x))の各々を、状態方程式fに適用することにより、時刻T=kにおける「2dim(x)+1」個の推定シグマポイントχ (0)〜χ (2dim(x))を算出する。

Figure 2013122384
State transition operation unit 330, as shown in equation (21), "2dim (x) +1" number of sigma points χ + k-1 (0) at time T = k-1 ~χ + k -1 (2dim (x) each), by applying the state equation f, time T = "2Dim (x) +1" in the k estimated sigma points χ - k (0) ~χ - k (2dim (x)) Is calculated.
Figure 2013122384

次に、推定状態ベクトル算出部340は、式(22)に示すように、時刻T=kにおける「2dim(x)+1」個の推定シグマポイントχ (0)〜χ (2dim(x))の平均値を計算することで、推定状態ベクトルx を算出する。

Figure 2013122384
Then, the estimated state vector calculating unit 340, as shown in equation (22), time T = "2dim (x) +1" in the k estimated sigma points χ - k (0) ~χ - k (2dim ( The estimated state vector x - k is calculated by calculating the average value of x)).
Figure 2013122384

また、推定状態ベクトル算出部340は、式(23)に示すように、推定状態ベクトルx の推定誤差の共分散P を算出する。ここで、ベクトルξは、以下の式(24)に示す、推定シグマポイントχ (j)と推定状態ベクトルx との差分を表すベクトルである。

Figure 2013122384
Further, the estimated state vector calculating unit 340, as shown in equation (23), the estimated state vector x - calculates the k - covariance P of the estimation error of k. Here, the vector xi] j, the following is shown in equation (24), the estimated sigma point chi - a vector representing the difference between the k - k (j) and the estimated state vector x.
Figure 2013122384

このように、シグマポイント生成部320、状態遷移演算部330、及び、推定状態ベクトル算出部340は、状態遷移モデルにおいて状態ベクトルx k−1に生じるプロセスノイズwの共分散Qk−1を算出するとともに、状態ベクトルx k−1を状態遷移モデルに適用することで推定状態ベクトルx を算出する、状態遷移モデル部410として機能する。 As described above, the sigma point generation unit 320, the state transition calculation unit 330, and the estimated state vector calculation unit 340 have the covariance Q k−1 of the process noise w k generated in the state vector x + k−1 in the state transition model. to calculate the estimated state vector x by applying the state vector x + k-1 to the state transition model - calculating a k, which functions as a state transition model 410.

一方、推定観測値算出部350は、式(25)に示すように、時刻T=kにおける「2dim(x)+1」個の推定シグマポイントχ (0)〜χ (2dim(x))の各々を、観測方程式hに適用することにより、「2dim(x)+1」個の推定観測値γ(0)〜γ(2dim(x))を算出する。

Figure 2013122384
On the other hand, the estimated observation value calculating unit 350, as shown in equation (25), time T = "2dim (x) +1" in the k estimated sigma points χ - k (0) ~χ - k (2dim (x each)), by applying to the observation equation h, to calculate the "2dim (x) +1" number of estimated observations γ k (0) ~γ k ( 2dim (x)).
Figure 2013122384

そして、推定観測値ベクトル算出部360は、式(26)に示すように、「2dim(x)+1」個の推定観測値γ(0)〜γ(2dim(x))の平均を演算することにより、推定観測値ベクトルy を算出する。

Figure 2013122384
Then, the estimated observed value vector calculation unit 360, as shown in equation (26), the average of "2dim (x) +1" number of estimated observations γ k (0) ~γ k ( 2dim (x)) calculation By doing so, the estimated observation value vector y - k is calculated.
Figure 2013122384

また、推定観測値ベクトル算出部360は、式(27)に示すように、観測残差の共分散Pyy を算出する。ここで、ベクトルζは、以下の式(28)に示すように、推定観測値γ(j)と推定観測値ベクトルy との差分を表すベクトルである。

Figure 2013122384
In addition, the estimated observation value vector calculation unit 360 calculates the covariance P yy k of the observation residual as shown in Expression (27). Here, the vector ζ j is a vector representing the difference between the estimated observation value γ k (j) and the estimated observation value vector y k , as shown in the following equation (28).
Figure 2013122384

このように、推定観測値算出部350、及び、推定観測値ベクトル算出部360は、推定シグマポイントχ (0)〜χ (2dim(x))の各々を観測モデルに適用することで推定観測値ベクトルy を算出する観測モデル部420として機能する。 Thus, the estimated observation value calculating unit 350, and the estimated observed value vector calculating unit 360 estimates the sigma points χ - k (0) ~χ - k be applied to each observation model (2dim (x)) Functions as an observation model unit 420 that calculates the estimated observation value vector y k .

減算器370は、式(13)に示したように、観測値ベクトルyと、推定観測値ベクトルy との差分として、観測残差zを算出する。
カルマンゲイン付与部380は、式(29)に示すように、相互共分散行列Pxy を算出する。そして、カルマンゲイン付与部380は、式(14)に示したように、観測残差の共分散Pyy と、相互共分散行列Pxy とに基づいて、カルマンゲインKを算出し、式(15)の右辺第2項(K)の演算を実行する。また、カルマンゲイン付与部380は、式(16)に示したように、状態ベクトルxの推定誤差の共分散Pを、P からP に更新する。

Figure 2013122384
The subtractor 370 calculates an observation residual z k as a difference between the observed value vector y k and the estimated observed value vector y k , as shown in Expression (13).
The Kalman gain assigning unit 380 calculates the mutual covariance matrix P xy k as shown in Expression (29). Then, as shown in Expression (14), the Kalman gain assigning unit 380 calculates the Kalman gain K k based on the covariance P yy k of the observation residual and the mutual covariance matrix P xy k , The calculation of the second term (K k z k ) on the right side of Expression (15) is executed. Moreover, Kalman gain applying unit 380, as shown in equation (16), the covariance P k of the estimation error of the state vector x k, P - updates from k to P + k.
Figure 2013122384

加算器390は、式(15)に示したように、推定状態ベクトルx と、カルマンゲイン付与部380から出力される式(15)の右辺第2項(K)とを加算することにより、更新後の状態ベクトルx を算出する。 The adder 390 adds the estimated state vector x k and the second term (K k z k ) on the right side of the equation (15) output from the Kalman gain assigning unit 380, as shown in the equation (15). Thus, the updated state vector x + k is calculated.

このように、減算器370、カルマンゲイン付与部380、及び、加算器390は、観測残差z、カルマンゲインK、及び、推定状態ベクトルx を用いて、状態ベクトルx k−1を更新した更新後の状態ベクトルx を算出する更新部430として機能する。 As described above, the subtractor 370, the Kalman gain assigning unit 380, and the adder 390 use the observation residual z k , the Kalman gain K k , and the estimated state vector x k to generate a state vector x + k−. It functions as an updating unit 430 that calculates the updated state vector x + k that updates 1 .

次に、状態遷移モデル部410において用いられる状態遷移モデルのうち、状態遷移演算部330における演算で用いられる状態方程式fについて説明する。   Next, of the state transition models used in the state transition model unit 410, the state equation f used in the calculation in the state transition calculation unit 330 will be described.

まず、状態方程式fのうち、時刻T=k−1における姿勢μ k−1から、単位時間経過後の時刻T=kにおける姿勢μ を推定する演算は、以下に示す式(30)として表される。ここで、μ は、時刻kにおける推定状態ベクトルx のうち、姿勢μを表す状態変数に対応する要素である。
なお、式(30)の右辺の演算子Ωは、式(31)により定義される。ここで、I3×3は3行3列の単位行列を表す。3次元ベクトルl=(l,l,l)に対して、演算子[l×]は、式(32)で定義される。また、単位時間(時刻T=k−1から時刻T=kまでの測定時間間隔)をΔtで表し、時刻T=kにおける更新後の状態ベクトルx のうち角速度を表す状態変数に対応する要素をω で表したとき、演算子Ωを構成する成分Ψ は、式(33)で定義される。

Figure 2013122384
First, of the state equation f, from the posture mu + k-1 at time T = k-1, the posture mu at time T = k after the lapse of the unit time - calculation for estimating the k is given by the following equation (30) Represented as: Here, mu - k is estimated state vector x at time k - of k, an element corresponding to the state variable representing the attitude mu.
Note that the operator Ω on the right side of the equation (30) is defined by the equation (31). Here, I 3 × 3 represents a unit matrix of 3 rows and 3 columns. For the three-dimensional vector l = (l 1 , l 2 , l 3 ), the operator [l ×] is defined by equation (32). Further, unit time (measurement time interval from time T = k−1 to time T = k) is represented by Δt, and corresponds to a state variable representing an angular velocity in the state vector x + k after the update at time T = k. When the element is represented by ω + k , the component Ψ + k constituting the operator Ω is defined by Expression (33).
Figure 2013122384

姿勢μは、クォータニオンで表現され、式(2)に示すように、正規化条件||μ||=1を満たす必要がある。しかし、シグマポイントカルマンフィルタを用いて状態ベクトルxを更新する場合、更新後の状態ベクトルx は、式(22)に示すように、推定シグマポイントχ (j)の平均として算出される推定状態ベクトルx に基づいて定められるため、(更新前の)状態ベクトルx k−1のノルムと、更新後の状態ベクトルx のノルムとは、異なる値となることがある。従って、シグマポイントカルマンフィルタの演算を行う場合、(更新前の)状態ベクトルx k−1の要素である姿勢μ k−1のノルムと、更新後の状態ベクトルx の要素である姿勢μ のノルムとは、異なる値となる可能性が存在する。つまり、シグマポイントカルマンフィルタの演算を行う場合、姿勢μについての正規化条件が満たされなくなる可能性が存在する。
そこで、姿勢μに対して何らかの演算が行われるときには、演算後の結果をそのベクトル自身の大きさで正規化する。
なお、より厳密に正規化条件を保つためには、状態ベクトルxを構成する要素のうち姿勢μについてはMRPs (modified Rodrigues parameters)を用いて前時刻との差分情報だけに限定し、カルマンフィルタの外部にある姿勢情報をカルマンフィルタから得られる差分情報に基づいて更新すればよい。
The attitude μ is expressed by a quaternion and needs to satisfy the normalization condition || μ || = 1 as shown in the equation (2). However, when the state vector x k is updated using the sigma point Kalman filter, the updated state vector x + k is calculated as an average of the estimated sigma points χ k (j) as shown in Equation (22). that the estimated state vector x - since that is determined based on k, the norm of the (pre-update) the state vector x + k-1, and the norm of the state vector x + k after update, it may become different values . Accordingly, when the sigma point Kalman filter is calculated, the norm of the posture μ + k−1 that is an element of the state vector x + k−1 (before update) and the posture that is an element of the state vector x + k after update. There is a possibility of a different value from the norm of μ + k . That is, when performing the sigma point Kalman filter calculation, there is a possibility that the normalization condition for the posture μ is not satisfied.
Therefore, when any calculation is performed on the posture μ, the result after the calculation is normalized by the size of the vector itself.
In order to maintain the normalization condition more strictly, the posture μ k among elements constituting the state vector x k is limited to only the difference information from the previous time using MRPs (modified Rodrigues parameters), and the Kalman filter May be updated based on the difference information obtained from the Kalman filter.

地磁気の強さr及び地磁気の伏角φは、変化を予測することが難しい。そこで、本実施形態に係る状態遷移モデルでは、便宜上、時刻T=kにおける地磁気の強さr及び伏角φと、時刻T=k−1における地磁気の強さrk−1及び伏角φk−1とは各々等しい値であると仮定する。
同様に、3次元角速度センサ90のオフセット推定値gOFFは、変化を予測することが難しい。そこで、本実施形態に係る状態遷移モデルでは、便宜上、時刻T=kにおける3次元角速度センサ90のオフセット推定値gOFF,Kと、時刻T=k−1における3次元角速度センサ90のオフセット推定値gOFF,K−1とは等しい値であると仮定する。
It is difficult to predict changes in the geomagnetic strength r and the geomagnetic dip angle φ. Therefore, in the state transition model according to the present embodiment, for the sake of convenience, the geomagnetic strength r k and the dip angle φ k at time T = k, and the geomagnetic strength r k-1 and the dip angle φ k at time T = k−1. It is assumed that −1 is an equal value.
Similarly, it is difficult to predict a change in the estimated offset value g OFF of the three-dimensional angular velocity sensor 90. Therefore, in the state transition model according to the present embodiment, for convenience, the estimated offset value g OFF, K of the three-dimensional angular velocity sensor 90 at time T = k and the estimated offset value of the three-dimensional angular velocity sensor 90 at time T = k−1. Assume that g OFF, K−1 is equal.

携帯機器1の角速度ωは、携帯機器1の利用者による携帯機器1の動かし方に依存して変化するため、時刻T=k−1の角速度ωk−1を用いて、時刻T=kにおける角速度ωを定式化することは難しい。そこで、本実施形態に係る状態遷移モデルでは、便宜上、時刻T=kにおける角速度ωと、時刻T=k−1における角速度ωk−1とは等しいと仮定する。 Since the angular velocity ω of the mobile device 1 changes depending on how the user of the mobile device 1 moves the mobile device 1, the angular velocity ω k−1 at time T = k −1 is used at time T = k. It is difficult to formulate the angular velocity ω k . Therefore, in the state transition model according to the present embodiment, for convenience, it is assumed that the angular velocity ω k at time T = k is equal to the angular velocity ω k-1 at time T = k−1.

前述の通り、3次元磁気センサ70のオフセットは、携帯機器1の部品が発する内部磁界Biの方向及び大きさをセンサ座標系Σにおいて表現したベクトルである。従って、携帯機器1の内部状態が一定である間は、3次元磁気センサ70のオフセットも変化しない。一方、携帯機器1の内部状態が変化した場合、例えば、携帯機器1に搭載された部品を流れる電流の大きさが変化した場合や、携帯機器1に搭載された部品の着磁状況が変化した場合には、3次元磁気センサ70のオフセットも変化する。すなわち、携帯機器1の内部状態は、携帯機器1の利用者による携帯機器1の操作や、携帯機器1の外部の環境等に依存して変化する。従って、3次元磁気センサ70のオフセットが変化するタイミングや3次元磁気センサ70のオフセットの変化量を予測することは困難であり、時刻T=k−1における3次元磁気センサ70のオフセット推定値mOFF,K−1を用いて、時刻T=kにおける3次元磁気センサ70のオフセット推定値mOFF,Kを定式化することは難しい。
そこで、本実施形態に係る状態遷移モデルでは、便宜上、時刻T=kにおける3次元磁気センサ70のオフセット推定値mOFF,Kと、時刻T=k−1における3次元磁気センサ70のオフセット推定値mOFF,K−1とは等しいと仮定する。
As described above, the offset of the three-dimensional magnetic sensor 70, the direction and magnitude of the internal magnetic field Bi to the portable device 1 of the component emits a vector expressed in the sensor coordinate system sigma S. Therefore, the offset of the three-dimensional magnetic sensor 70 does not change while the internal state of the mobile device 1 is constant. On the other hand, when the internal state of the mobile device 1 changes, for example, when the magnitude of the current flowing through the component mounted on the mobile device 1 changes, or the magnetization status of the component mounted on the mobile device 1 changes. In this case, the offset of the three-dimensional magnetic sensor 70 also changes. That is, the internal state of the mobile device 1 changes depending on the operation of the mobile device 1 by the user of the mobile device 1, the environment outside the mobile device 1, and the like. Therefore, it is difficult to predict the timing at which the offset of the three-dimensional magnetic sensor 70 changes and the amount of offset change of the three-dimensional magnetic sensor 70, and the offset estimated value m of the three-dimensional magnetic sensor 70 at time T = k−1. It is difficult to formulate the offset estimated value m OFF, K of the three-dimensional magnetic sensor 70 at time T = k using OFF, K−1 .
Therefore, in the state transition model according to the present embodiment, for convenience, the estimated offset value m OFF, K of the three-dimensional magnetic sensor 70 at time T = k and the estimated offset value of the three-dimensional magnetic sensor 70 at time T = k−1. Assume that m OFF, K−1 is equal.

このように、本実施形態に係る状態遷移モデルにおける状態方程式fは、以下に示す式(34)のように、状態ベクトルxを構成する複数の状態変数のうち、姿勢μを表す状態変数以外は、前の時刻から変化しないことを表す方程式として、定式化される。

Figure 2013122384
As described above, the state equation f in the state transition model according to the present embodiment is a state variable representing the posture μ k among a plurality of state variables constituting the state vector x k as shown in the following equation (34). Other than the above, it is formulated as an equation indicating that it does not change from the previous time.
Figure 2013122384

このように、状態ベクトルxを、状態方程式fに適用した場合、状態ベクトルxのうち、姿勢μ以外の各要素の示す値は変化しない。
しかし、状態ベクトルxのうち姿勢μ以外の各要素は、加算器390において、観測残差zに基づいて真値に近づくように更新される。つまり、式(15)に示すように、状態ベクトルxの各要素は、状態遷移モデルにより算出される推定状態ベクトルx と、複数のセンサからの出力値(観測値ベクトルy)を用いて算出される観測残差zとの双方に基づいて、真値に近づくように更新される。
As described above, when the state vector x k is applied to the state equation f, the value indicated by each element other than the posture μ k in the state vector x k does not change.
However, each element of the state vector x k other than the posture μ k is updated by the adder 390 so as to approach the true value based on the observation residual z k . That is, as shown in Expression (15), each element of the state vector x k includes an estimated state vector x k calculated by the state transition model and output values (observed value vectors y k ) from a plurality of sensors. Based on both of the observation residuals z k calculated using the values, the values are updated so as to approach the true value.

式(15)に示すように、推定状態ベクトルx 及び観測残差zの、更新後の状態ベクトルx に対する寄与の割合は、カルマンゲインKによって定められる。
すなわち、カルマンゲインKの各成分を適切に定めることができれば、更新後の状態ベクトルx に占める推定状態ベクトルx の割合と、更新後の状態ベクトルx に占める観測残差zの割合とが、適切に調整され、更新後の状態ベクトルx の各要素が真値から乖離することを防止することが可能となる。
As shown in equation (15), the estimated state vector x - of k and observation residuals z k, the rate of contribution to the state vector x + k after update is determined by the Kalman gain K k.
In other words, the Kalman gain K k if it is possible to properly determine the components of the estimated state vector x accounts for the state vector x + k after update - k and the ratio of the observed residuals occupying the state vector x + k after update The ratio of z k is appropriately adjusted, and it is possible to prevent each element of the updated state vector x + k from deviating from the true value.

ところで、状態遷移モデルにおいて用いられる状態方程式が、状態推定装置が推定するシステムの経時的な変化を正確に表すことができない場合、状態方程式を用いて算出された推定状態ベクトルx の各要素は、真値から乖離した値となっている可能性が高い。
この場合、例えば、カルマンゲインKの各成分を大きな値とし、式(15)における第2項(K)の各要素を大きな値とすることで、更新後の状態ベクトルx に占める推定状態ベクトルx の割合を相対的に小さくする。これにより、更新後の状態ベクトルx の各要素が真値から乖離することを防止することが可能となる。
By the way, when the state equation used in the state transition model cannot accurately represent the change over time of the system estimated by the state estimation device, each element of the estimated state vector x k calculated using the state equation Is likely to be a value deviating from the true value.
In this case, for example, each component of the Kalman gain K k is set to a large value, and each element of the second term (K k z k ) in Equation (15) is set to a large value, so that the updated state vector x + k The ratio of the estimated state vector x - k to the relative value is relatively small. Thereby, it becomes possible to prevent each element of the updated state vector x + k from deviating from the true value.

本実施形態に係る状態方程式fは、式(34)に示すように、3次元磁気センサ70のオフセット推定値mOFFが一定の値であること(経時的な変化をしないこと)を表した方程式である。しかし、実際には、3次元磁気センサ70に温度変化が生じた場合、3次元磁気センサ70のオフセット(真値)は変化する。そして、3次元磁気センサ70のオフセットの変化の大きさは、3次元磁気センサ70の温度変化量ΔTm,kの大きさに基づいて定められる。すなわち、温度変化量ΔTm,kが大きな値となる場合、状態方程式fを用いて算出される3次元磁気センサ70のオフセット推定値mOFFは、3次元磁気センサ70のオフセットの実際の値(真値)とは乖離した値として算出される。つまり、温度変化量ΔTm,kが大きな値となる場合、状態方程式fは、状態推定装置が推定するシステムを表す物理量の経時的な変化を正確に表現することができない。 The state equation f according to the present embodiment is an equation representing that the estimated offset value m OFF of the three-dimensional magnetic sensor 70 is a constant value (not changing with time) as shown in the equation (34). It is. However, actually, when a temperature change occurs in the three-dimensional magnetic sensor 70, the offset (true value) of the three-dimensional magnetic sensor 70 changes. The magnitude of the offset change of the three-dimensional magnetic sensor 70 is determined based on the magnitude of the temperature change amount ΔT m, k of the three-dimensional magnetic sensor 70. That is, when the temperature change amount ΔT m, k is a large value, the estimated offset value m OFF of the three-dimensional magnetic sensor 70 calculated using the state equation f is the actual value of the offset of the three-dimensional magnetic sensor 70 ( (True value) is calculated as a deviated value. That is, when the temperature change amount ΔT m, k is a large value, the state equation f cannot accurately represent the change over time in the physical quantity representing the system estimated by the state estimation device.

そこで、本実施形態では、式(10)、式(11)、及び式(12)に示すように、3次元磁気センサ70の温度変化量ΔTm,kに基づいて、プロセスノイズwの共分散Qを定める。
プロセスノイズwは、状態方程式fと、状態推定装置が推定するシステムを表す物理量の経時的な変化との間に存在する誤差を表現する。よって、3次元磁気センサ70の温度変化に起因する、状態方程式fと、システムの経時的な変化との間に存在する誤差は、プロセスノイズw(及び、その共分散Q)により表現することが可能となる。
詳細は後述するが、カルマンゲインKは、プロセスノイズwk−1の共分散Qk−1に基づいて定められる。よって、カルマンゲインKは、温度変化量ΔTm,k−1に基づいて定められる。その結果、式(15)に示すカルマンゲインKを用いた状態ベクトルxの更新において、更新後の状態ベクトルx は、3次元磁気センサ70の温度変化に起因して状態方程式fとシステムの経時的な変化との間に生じる誤差を考慮して算出されることになる。
すなわち、本実施形態によれば、3次元磁気センサ70の温度変化に起因して、状態方程式fとシステムの経時的な変化との間に誤差が生じた場合であっても、当該誤差を考慮して更新後の状態ベクトルx が定められるため、更新後の状態ベクトルx の各要素が真値から乖離する可能性を低減させることが可能となる。
Therefore, in the present embodiment, as shown in Expression (10), Expression (11), and Expression (12), the process noise w k is shared based on the temperature change amount ΔT m, k of the three-dimensional magnetic sensor 70. A variance Q k is determined.
The process noise w k expresses an error that exists between the state equation f and the change over time of the physical quantity representing the system estimated by the state estimation device. Therefore, the error existing between the state equation f and the change with time of the system due to the temperature change of the three-dimensional magnetic sensor 70 is expressed by the process noise w k (and its covariance Q k ). It becomes possible.
Although details will be described later, the Kalman gain K k is determined based on the covariance Q k−1 of the process noise w k−1 . Therefore, the Kalman gain K k is determined based on the temperature change amount ΔT m, k−1 . As a result, in the update of the state vector x k using the Kalman gain K k shown in equation (15), the updated state vector x + k is derived from the state equation f due to the temperature change of the three-dimensional magnetic sensor 70. It is calculated in consideration of an error that occurs between changes in the system over time.
That is, according to the present embodiment, even if an error occurs between the state equation f and the change over time of the system due to the temperature change of the three-dimensional magnetic sensor 70, the error is taken into consideration. Thus, since the updated state vector x + k is determined, the possibility that each element of the updated state vector x + k deviates from the true value can be reduced.

以下、カルマンゲインKが、プロセスノイズwk−1の共分散Qk−1に基づいて定められることについて説明する。
まず、式(17)及び式(18)に示すように、複数のシグマポイントχ k−1(1)〜χ k−1(2dim(x))の平均に対する広がりの大きさは、プロセスノイズwk−1の共分散Qk−1に基づいて定められる。そして、式(21)、式(22)、及び式(24)に示すように、複数のシグマポイントχ k−1(1)〜χ k−1(2dim(x))の広がりの大きさに基づいて、ベクトルξ〜ξ2dim(x)の各々が定められる。また、式(23)に示すように、推定状態ベクトルx の推定誤差の共分散P は、ベクトルξ〜ξ2dim(x)に基づいて定められる。このように、推定状態ベクトルx の推定誤差の共分散P は、プロセスノイズwk−1の共分散Qk−1に基づいて定められる。
同様に、式(25)、式(26)、及び式(28)に示すように、複数のシグマポイントχ k−1(1)〜χ k−1(2dim(x))の広がりの大きさに基づいて、ベクトルζ〜ζ2dim(x)の各々が定められる。そして、式(29)に示すように、相互共分散行列Pxy は、ベクトルξ〜ξ2dim(x)と、ベクトルζ〜ζ2dim(x)とに基づいて定められる。また、式(27)に示すように、観測残差の共分散Pyy は、ベクトルζ〜ζ2dim(x)に基づいて定められる。このように、相互共分散行列Pxy と、観測残差の共分散Pyy とは、プロセスノイズwk−1の共分散Qk−1に基づいて定められる。
カルマンゲインKは、式(14)に示すように、相互共分散行列Pxy と、観測残差の共分散Pyy とに基づいて定められる。従って、カルマンゲインKは、プロセスノイズwk−1の共分散Qk−1に基づいて定められることになる。
Hereinafter, it will be described that the Kalman gain K k is determined based on the covariance Q k−1 of the process noise w k−1 .
First, as shown in equations (17) and (18), the magnitude of the spread with respect to the average of a plurality of sigma points χ + k−1 (1) to χ + k−1 (2dim (x)) It is determined based on the covariance Q k−1 of the noise w k−1 . Then, as shown in Expression (21), Expression (22), and Expression (24), the spread of a plurality of sigma points χ + k−1 (1) to χ + k−1 (2dim (x)) is large. Based on this, each of the vectors ξ 1 to ξ 2 dim (x) is determined. Further, as shown in equation (23), the estimated state vector x - k of the estimation error covariance P - k is determined based on the vector ξ 1 ~ξ 2dim (x). Thus, the estimated state vector x - covariance P of k of the estimation error - k is determined based on the covariance Q k-1 of the process noise w k-1.
Similarly, as shown in Expression (25), Expression (26), and Expression (28), the spread of a plurality of sigma points χ + k−1 (1) to χ + k−1 (2dim (x)) Based on the magnitude, each of vectors ζ 1 to ζ 2 dim (x) is determined. As shown in Expression (29), the mutual covariance matrix P xy k is determined based on the vectors ξ 1 to ξ 2 dim (x) and the vectors ζ 1 to ζ 2 dim (x) . Further, as shown in Expression (27), the covariance P yy k of the observation residual is determined based on the vectors ζ 1 to ζ 2dim (x) . Thus, the mutual covariance matrix P xy k and the observation residual covariance P yy k are determined based on the covariance Q k−1 of the process noise w k−1 .
As shown in the equation (14), the Kalman gain K k is determined based on the mutual covariance matrix P xy k and the observation residual covariance P yy k . Therefore, the Kalman gain K k is determined based on the covariance Q k−1 of the process noise w k−1 .

仮に、プロセスノイズwk−1の共分散Qk−1が、温度変化量ΔTm,k−1を考慮せずに定められる場合、カルマンゲインKの各成分も、温度変化量ΔTm,k−1を考慮せずに定められる。この場合、更新後の状態ベクトルx も、温度変化量ΔTm,k−1を考慮せずに定められるため、更新後の状態ベクトルx の各要素が、真値から乖離した値となる可能性が高い。
これに対して、本実施形態に係る状態推定装置は、上述したように、温度変化量ΔTm,k−1に基づいて、プロセスノイズwk−1の共分散Qk−1を定める。
具体的には、状態遷移モデルにおいて状態ベクトルxに生じるプロセスノイズwk−1の共分散Qk−1のうち、3次元磁気センサ70のオフセット推定値mOFF,kに生じるプロセスノイズの共分散を表す行列Qm,k−1は、温度変化量ΔTm,k−1に基づいて定められる。従って、カルマンゲインKのうち、3次元磁気センサ70のオフセット推定値mOFF,kに対応する成分の各々の値は、温度変化量ΔTm,k−1に基づいて決定される。
その結果、更新後の状態ベクトルx のうち3次元磁気センサ70のオフセット推定値mOFF に対応する要素が、3次元磁気センサ70の温度変化量ΔTm,k−1を考慮して算出されるため、更新後の状態ベクトルx のうち3次元磁気センサ70のオフセット推定値mOFF に対応する要素が、3次元磁気センサ70のオフセットの実際の値(真値)とは乖離した値として算出されることを防止することができる。
If the covariance Q k−1 of the process noise w k−1 is determined without considering the temperature change ΔT m, k−1 , each component of the Kalman gain K k is also the temperature change ΔT m, It is determined without considering k-1 . In this case, since the updated state vector x + k is also determined without considering the temperature variation ΔT m, k−1 , the values of the updated state vector x + k deviate from the true values. Is likely.
On the other hand, as described above, the state estimation device according to the present embodiment determines the covariance Q k−1 of the process noise w k−1 based on the temperature change amount ΔT m, k−1 .
Specifically, among the covariance Q k−1 of the process noise w k−1 generated in the state vector x k in the state transition model, the process noise generated in the offset estimated value m OFF, k of the three-dimensional magnetic sensor 70 is shared. The matrix Q m, k−1 representing the variance is determined based on the temperature change amount ΔT m, k−1 . Accordingly, each value of the component corresponding to the estimated offset value m OFF, k of the three-dimensional magnetic sensor 70 in the Kalman gain K k is determined based on the temperature change amount ΔT m, k−1 .
As a result, the element corresponding to the offset estimated value m OFF + k of the three-dimensional magnetic sensor 70 in the updated state vector x + k takes into account the temperature change ΔT m, k−1 of the three-dimensional magnetic sensor 70. Therefore , the element corresponding to the offset estimated value m OFF + k of the three-dimensional magnetic sensor 70 in the updated state vector x + k is the actual value (true value) of the offset of the three-dimensional magnetic sensor 70. Can be prevented from being calculated as a deviating value.

次に、観測モデル部420において用いられる観測モデルのうち、推定観測値算出部350における演算で用いられる観測方程式hについて説明する。   Next, among the observation models used in the observation model unit 420, the observation equation h used in the calculation in the estimated observation value calculation unit 350 will be described.

3次元角速度センサ90から出力される角速度データgの推定値γgyroは、角速度ωと、角速度センサのオフセット推定値gOFFとを用いて、式(35)で与えられる。

Figure 2013122384
The estimated value γ gyro of the angular velocity data g output from the three-dimensional angular velocity sensor 90 is given by Expression (35) using the angular velocity ω and the offset estimated value g OFF of the angular velocity sensor.
Figure 2013122384

また、地上座標系Σにおいて地磁気Bgを表すベクトルBgは式(36)で与えられる。従って、3次元磁気センサ70から出力される磁気データmの推定値γmagは、磁気センサのオフセット推定値mOFFと、式(6)で示した行列B(μ)とを用いて、式(37)で与えられる。

Figure 2013122384
Furthermore, the vector G Bg of the ground coordinate system sigma G represents the geomagnetism Bg is given by equation (36). Therefore, the estimated value γ mag of the magnetic data m output from the three-dimensional magnetic sensor 70 is obtained by using the offset estimated value m OFF of the magnetic sensor and the matrix B (μ) expressed by the expression (6). 37).
Figure 2013122384

また、観測モデルにおいて、3次元加速度センサ80から出力される加速度データaの推定値γaccは、式(6)で示した行列B(μ)と、ベクトルRVとを用いて、式(38)で与えられる。なお、ベクトルRVは、以下の式(39)に示すように、地上座標系Σにおいて重力加速度を表したベクトルを、重力加速度の大きさで正規化した3次元のベクトルである。

Figure 2013122384
Further, in the observation model, the estimated value γ acc of the acceleration data a output from the three-dimensional acceleration sensor 80 is expressed by the equation (6) using the matrix B (μ) expressed by the equation (6) and the vector G G RV. 38). The vector G G RV is a three-dimensional vector obtained by normalizing the vector representing the gravitational acceleration in the ground coordinate system Σ G with the magnitude of the gravitational acceleration, as shown in the following equation (39).
Figure 2013122384

このように、本実施形態に係る観測モデルにおける観測方程式hは、式(35)、式(37)、及び式(38)により定式化される。
そして、式(3)を式(13)の右辺第1項に代入し、式(35)、式(37)、及び式(38)を用いて式(13)の右辺第2項を表すことにより、式(13)を、以下の式(40)に変形することができる。このとき、観測残差zは、式(40)により算出される。

Figure 2013122384
Thus, the observation equation h in the observation model according to the present embodiment is formulated by the equations (35), (37), and (38).
Then, substituting Equation (3) into the first term on the right side of Equation (13) and expressing the second term on the right side of Equation (13) using Equation (35), Equation (37), and Equation (38). Thus, the equation (13) can be transformed into the following equation (40). At this time, the observation residual z k is calculated by Expression (40).
Figure 2013122384

[3. 出力情報について]
出力情報生成部500は、カルマンフィルタ演算部300が周期的に出力する状態ベクトルxに基づいて、携帯機器1の姿勢μを算出し、これを出力情報として出力する。
なお、本実施形態では、出力情報生成部500は姿勢μを出力情報として出力するが、本発明はこのような形態に限られるものではなく、携帯機器1が備える各種センサの出力値と、状態ベクトルxとに基づいて算出される情報を出力情報としてもよい。
例えば、出力情報生成部500は、携帯機器1から見た地磁気Bgの向きを出力情報として算出するものであってもよい。具体的には、出力情報生成部500は、3次元磁気センサ70から出力される磁気データmと、状態ベクトルxの要素である3次元磁気センサ70のオフセット推定値mOFF,kとに基づいて、センサ座標系Σにおける地磁気Bgを表すベクトルBgを算出し、これを出力情報として出力するものであってもよい。
[3. About output information]
The output information generation unit 500 calculates the attitude μ of the mobile device 1 based on the state vector x k periodically output by the Kalman filter calculation unit 300, and outputs this as output information.
In the present embodiment, the output information generation unit 500 outputs the posture μ as output information. However, the present invention is not limited to such a form, and output values and states of various sensors included in the mobile device 1. Information calculated based on the vector x k may be output information.
For example, the output information generation unit 500 may calculate the direction of geomagnetism Bg viewed from the mobile device 1 as output information. Specifically, the output information generation unit 500 converts the magnetic data m k output from the three-dimensional magnetic sensor 70 and the estimated offset value m OFF, k of the three-dimensional magnetic sensor 70 that is an element of the state vector x k. based on, then calculates a vector S Bg representing the geomagnetic Bg in the sensor coordinate system sigma S, it may be configured to output as output information.

[4. 結論]
以上に示したように、本実施形態に係る状態推定装置は、3次元磁気センサ70の温度変化量ΔTm,kに基づいて、行列Qm,kの各成分の値を設定する。
3次元磁気センサ70の温度変化量ΔTm,kが大きな値となる場合、状態遷移モデルにおける3次元磁気センサ70のオフセット推定値mOFFの経時的な変化と、3次元磁気センサ70のオフセット(真値)の経時的な変化とが、異なる場合がある。これに対して本実施形態では、行列Qm,kを、温度変化量ΔTm,kに基づいて定めるため、3次元磁気センサ70の温度が変化し、状態遷移モデルがシステムの経時的な変化を正確に表現できなくなったときに生じる、状態遷移モデルが表現するシステムの経時的な変化と、実際のシステムの経時的な変化との誤差を考慮して状態ベクトルxの更新を行うことが可能となる。これにより、状態ベクトルxの各要素が、真値から乖離する可能性を低減させることが可能となった。すなわち、本実施形態に係る状態推定装置は、非線形カルマンフィルタの演算において、状態ベクトルxの各要素が真値から乖離する可能性を低減させることで、正確且つ高速な状態推定が可能となった。
[4. Conclusion]
As described above, the state estimation device according to the present embodiment sets the value of each component of the matrix Q m, k based on the temperature change amount ΔT m, k of the three-dimensional magnetic sensor 70.
When the temperature change amount ΔT m, k of the three-dimensional magnetic sensor 70 becomes a large value, a change with time of the estimated offset value m OFF of the three-dimensional magnetic sensor 70 in the state transition model and an offset of the three-dimensional magnetic sensor 70 ( The change over time of (true value) may be different. On the other hand, in this embodiment, since the matrix Q m, k is determined based on the temperature change amount ΔT m, k , the temperature of the three-dimensional magnetic sensor 70 changes, and the state transition model changes with time of the system. The state vector x k may be updated in consideration of the error between the change in the system expressed by the state transition model and the change in the actual system over time that occurs when It becomes possible. Thus, each element of the state vector x k has become possible to reduce the possibility of deviation from the true value. That is, the state estimating device according to this embodiment, in the calculation of the nonlinear Kalman filter, that each element of the state vector x k can reduce the possibility of deviation from the true value, has become possible accurate and fast state estimation .

<B.変形例>
本発明は上述した実施形態に限定されるものではなく、例えば、以下の変形が可能である。また、以下に示す変形例のうちの2以上の変形例を組み合わせることもできる。
<B. Modification>
The present invention is not limited to the above-described embodiments, and for example, the following modifications are possible. Also, two or more of the modifications shown below can be combined.

(1)変形例1
上述した実施形態に係る状態推定装置は、シグマポイントカルマンフィルタを用いて非線形カルマンフィルタの演算を実行するものであったが、本発明はこのような形態に限定されるものでは無く、拡張カルマンフィルタ等、公知の非線形カルマンフィルタを適宜適用して演算を行うものでもよい。
図4は、変形例1に係る状態推定プログラムを実行したときに実現される機能を表した機能ブロック図である。図4に示すように、変形例1に係る状態推定装置は、カルマンフィルタ演算部300の代わりにカルマンフィルタ演算部300aを備える点を除き、実施形態に係る状態推定装置と同様に構成される。そして、変形例1に係るカルマンフィルタ演算部300aは、状態遷移モデル部410を備える代わりに、状態遷移モデル部410aを備える点と、観測モデル部420を備える代わりに、観測モデル部420aを備える点とを除いて、カルマンフィルタ演算部300と同様に構成される。
(1) Modification 1
Although the state estimation apparatus according to the above-described embodiment executes the operation of the nonlinear Kalman filter using the sigma point Kalman filter, the present invention is not limited to such a form and is known as an extended Kalman filter or the like. The calculation may be performed by appropriately applying the nonlinear Kalman filter.
FIG. 4 is a functional block diagram showing functions realized when the state estimation program according to the first modification is executed. As illustrated in FIG. 4, the state estimation device according to the first modification is configured in the same manner as the state estimation device according to the embodiment except that a Kalman filter calculation unit 300 a is provided instead of the Kalman filter calculation unit 300. And the Kalman filter calculating part 300a which concerns on the modification 1 is provided with the state model part 410a instead of providing the state transition model part 410, and the point provided with the observation model part 420a instead of providing the observation model part 420, The configuration is the same as that of the Kalman filter calculation unit 300 except for.

状態遷移モデル部410aは、状態ベクトルx k−1を、式(8)に示す状態遷移モデルに適用することで、推定状態ベクトルx を算出する。また、状態遷移モデル部410aは、式(10)〜式(12)に示すように、3次元磁気センサ70の温度変化量ΔTm,kに基づいて、プロセスノイズwの共分散Qを算出する。
観測モデル部420aは、推定状態ベクトルx を、式(9)に示す観測モデルに適用することにより、推定観測値ベクトルy を算出する。
このように、変形例1に係る非線形カルマンフィルタの演算では、複数のシグマポイントを生成することなく、状態ベクトルx を更新する。
The state transition model unit 410a calculates the estimated state vector x k by applying the state vector x + k−1 to the state transition model shown in Expression (8). In addition, the state transition model unit 410a calculates the covariance Q k of the process noise w k based on the temperature change ΔT m, k of the three-dimensional magnetic sensor 70 as shown in the equations (10) to (12). calculate.
The observation model unit 420a calculates the estimated observation value vector y - k by applying the estimated state vector x - k to the observation model shown in Expression (9).
Thus, in the calculation of the nonlinear Kalman filter according to the first modification, the state vector x + k is updated without generating a plurality of sigma points.

一般的に非線形カルマンフィルタは、カルマンゲインKを、プロセスノイズwの共分散Qに基づいて定める。変形例1に係る状態推定装置は、実施形態に係る状態推定装置と同様、プロセスノイズwの共分散Qを、3次元磁気センサ70の温度変化量ΔTm,kに基づいて定める。従って、3次元磁気センサ70の温度変化量ΔTm,kが大きな値となる場合であっても、更新後の状態ベクトルx k+1の各要素が真値から乖離する可能性を低減させることが可能となる。
すなわち、本発明は、状態推定装置が備えるセンサの温度変化に起因する、状態推定精度の劣化を防止することを目的としたものであり、状態推定装置が使用する非線形カルマンフィルタの種類を問わず適用することが可能である。
In general, the nonlinear Kalman filter determines the Kalman gain K based on the covariance Q of the process noise w. Similar to the state estimation device according to the embodiment, the state estimation device according to Modification 1 determines the covariance Q k of the process noise w k based on the temperature change ΔT m, k of the three-dimensional magnetic sensor 70. Therefore, even when the temperature change amount ΔT m, k of the three-dimensional magnetic sensor 70 has a large value, it is possible to reduce the possibility that each element of the updated state vector x + k + 1 deviates from the true value. It becomes possible.
That is, the present invention is intended to prevent deterioration of state estimation accuracy due to a temperature change of a sensor included in the state estimation device, and is applicable regardless of the type of nonlinear Kalman filter used by the state estimation device. Is possible.

(2)変形例2
上述した実施形態及び変形例に係る状態推定装置は、非線形カルマンフィルタを用いた演算を行うことでシステムの状態を推定するものであったが、本発明はこれに限定されるものではなく、線形カルマンフィルタを用いた演算によりシステムの状態を推定するものであってもよい。すなわち、状態方程式f及び観測方程式hは線形関数であってもよい。
一般的に、線形カルマンフィルタは、カルマンゲインKを、プロセスノイズwの共分散Qに基づいて定める。従って、線形カルマンフィルタを用いた演算によりシステムの状態を推定する場合であっても、プロセスノイズwの共分散Qを、3次元磁気センサ70の温度変化量ΔTm,kに基づいて定めることにより、3次元磁気センサ70に温度変化が生じても、状態ベクトルxが真値から乖離した値に更新されることを防止することが可能となる。
(2) Modification 2
Although the state estimation device according to the above-described embodiment and the modification estimates the system state by performing a calculation using a nonlinear Kalman filter, the present invention is not limited to this, and the linear Kalman filter It is also possible to estimate the state of the system by an operation using. That is, the state equation f and the observation equation h may be linear functions.
In general, the linear Kalman filter determines the Kalman gain K based on the covariance Q of the process noise w. Accordingly, even when the state of the system is estimated by calculation using a linear Kalman filter, the covariance Q k of the process noise w k is determined based on the temperature change ΔT m, k of the three-dimensional magnetic sensor 70. Accordingly, even if temperature change occurs in the three-dimensional magnetic sensor 70, it becomes possible to prevent the state vector x k is updated to a value deviated from the true value.

(3)変形例3
上述した実施形態及び変形例に係る状態推定装置は、温度検出部がセンサの内部に配置されるものであったが、本発明はこのような構成に限定されるものではなく、温度検出部がセンサの外部に配置されるものであってもよい。
図5は、変形例3に係る携帯機器1aを表すブロック図である。携帯機器1aは、第1温度検出部75aを備える点と、3次元磁気センサ70の代わりに3次元磁気センサ70aを備える点とを除き、実施形態に係る携帯機器1と同様に構成される。
3次元磁気センサ70aは、X軸磁気センサ71、Y軸磁気センサ72、及び、Z軸磁気センサ73と、これら磁気センサ71〜73からの出力信号をAD変換して、磁気データmを出力する磁気センサI/F74aとを備える。第1温度検出部75aは、3次元磁気センサ70aの温度を検出し、温度データTを出力する。すなわち、第1温度検出部75aは、携帯機器1aの備えるセンサの温度を検出する温度検出部として機能する。
変形例3に係る状態推定装置は、3次元磁気センサ70aの外部に配置される第1温度検出部75aが、3次元磁気センサ70aの温度を検出するため、プロセスノイズwの共分散Qを、3次元磁気センサ70aの温度変化量に基づいて定めることができる。これにより、状態ベクトルxが真値から乖離した値に更新されることを防止することができる。
(3) Modification 3
In the state estimation device according to the embodiment and the modification described above, the temperature detection unit is arranged inside the sensor, but the present invention is not limited to such a configuration, and the temperature detection unit It may be arranged outside the sensor.
FIG. 5 is a block diagram illustrating a mobile device 1a according to the third modification. The portable device 1a is configured in the same manner as the portable device 1 according to the embodiment, except that the first temperature detection unit 75a is provided and a three-dimensional magnetic sensor 70a is provided instead of the three-dimensional magnetic sensor 70.
The three-dimensional magnetic sensor 70a AD-converts output signals from the X-axis magnetic sensor 71, the Y-axis magnetic sensor 72, the Z-axis magnetic sensor 73, and the magnetic sensors 71 to 73, and outputs magnetic data m. And a magnetic sensor I / F 74a. First temperature detecting section 75a detects the temperature of the three-dimensional magnetic sensor 70a, and outputs the temperature data T m. That is, the 1st temperature detection part 75a functions as a temperature detection part which detects the temperature of the sensor with which the portable apparatus 1a is provided.
In the state estimation device according to the modified example 3, the first temperature detection unit 75a arranged outside the three-dimensional magnetic sensor 70a detects the temperature of the three-dimensional magnetic sensor 70a, so that the covariance Q k of the process noise w k is detected. Can be determined based on the temperature variation of the three-dimensional magnetic sensor 70a. Thus, it is possible to prevent the state vector x k is updated to a value deviated from the true value.

(4)変形例4
上述した実施形態及び変形例は、3次元磁気センサ70の温度を表す温度データTに基づいて、プロセスノイズwの共分散Qを定めるものであったが、本発明はこのような形態に限定されるものでは無く、3次元磁気センサ70の温度を表す温度データTに加え、3次元角速度センサ90の温度を表す温度データTを考慮して、プロセスノイズwの共分散Qを定めてもよい。
図6は、変形例4に係る携帯機器1bを表すブロック図である。携帯機器1bは、3次元角速度センサ90の代わりに、3次元角速度センサ90aを備える点を除いて、携帯機器1と同様に構成される。
3次元角速度センサ90aは、3次元角速度センサ90aの温度を検出する第2温度検出部95を備える点と、角速度センサI/F94の代わりに角速度センサI/F94aを備える点とを除いて、3次元角速度センサ90と同様に構成される。角速度センサI/F94aは、X軸角速度センサ91、Y軸角速度センサ92、及び、Z軸角速度センサ93からの出力信号をAD変換して角速度データgを出力するとともに、第2温度検出部95からの出力信号をAD変換して、温度データTを出力する。
すなわち、変形例4において、第1温度検出部75及び第2温度検出部95は、携帯機器1bの備えるセンサの温度を検出する温度検出部600として機能する。
(4) Modification 4
Embodiments and modifications described above, based on the temperature data T m indicative of the temperature of the three-dimensional magnetic sensor 70, but were those determining the covariance Q k of the process noise w k, the present invention is such a form In addition to the temperature data T m representing the temperature of the three-dimensional magnetic sensor 70, the covariance Q of the process noise w k is considered in consideration of the temperature data T g representing the temperature of the three-dimensional angular velocity sensor 90. k may be determined.
FIG. 6 is a block diagram illustrating a mobile device 1b according to the fourth modification. The portable device 1b is configured in the same manner as the portable device 1 except that a three-dimensional angular velocity sensor 90a is provided instead of the three-dimensional angular velocity sensor 90.
The three-dimensional angular velocity sensor 90a is 3 except for the point provided with the second temperature detecting unit 95 that detects the temperature of the three-dimensional angular velocity sensor 90a and the point provided with the angular velocity sensor I / F 94a instead of the angular velocity sensor I / F 94. The dimensional angular velocity sensor 90 is configured similarly. The angular velocity sensor I / F 94a AD-converts output signals from the X-axis angular velocity sensor 91, the Y-axis angular velocity sensor 92, and the Z-axis angular velocity sensor 93 to output angular velocity data g, and from the second temperature detection unit 95. the output signal to the AD conversion, and outputs the temperature data T g.
That is, in the modification 4, the 1st temperature detection part 75 and the 2nd temperature detection part 95 function as the temperature detection part 600 which detects the temperature of the sensor with which the portable apparatus 1b is provided.

変形例4に係る状態推定装置において、プロセスノイズwの共分散Qは、以下の式(41)に示す値に設定される。すなわち、プロセスノイズwの共分散Qは、以下の式(41)に示すように、行列Qcst,11、行列Qcst,12、行列Qcst,13、行列Qcst,23、行列Qg,k、及び、行列Qm,kにより構成される。
ここで、行列Qcst,11は9行9列の対称行列であり、行列Qcst,11の各成分は定数である。また、行列Qcst,12は9行3列の零行列であり、行列Qcst,13は9行3列の零行列であり、行列Qcst,23は3行3列の零行列である。行列Qm,kは、実施形態と同様に、式(11)及び式(12)により定められる3行3列の対称行列である。
行列Qg,kは、以下の式(42)及び式(43)に基づいて定められる。ここで、温度変化量ΔTg,kは、以下の式(43)に示すように、時刻T=kにおける温度データTg,kと、時刻T=k−1における温度データTg,k−1との差分の絶対値を表す値である。また、係数αは、正の実数である。行列Qcst,gは、3次元角速度センサ90aに温度変化が生じても3次元角速度センサ90aのオフセットが変化しないと仮定した状態遷移モデルにおいて、状態ベクトルxに生じるプロセスノイズwのうち、3次元角速度センサ90aのオフセット推定値gOFF,kに生じるプロセスノイズの共分散を表す行列である。本実施形態では、行列Qcst,gの各成分は定数とする。

Figure 2013122384
In the state estimation device according to the modified example 4, the covariance Q k of the process noise w k is set to a value shown in the following equation (41). That is, the covariance Q k of the process noise w k, as shown in the following equation (41), the matrix Q cst, 11, matrix Q cst, 12, matrix Q cst, 13, matrix Q cst, 23, matrix Q g, k and a matrix Q m, k .
Here, the matrix Q cst, 11 is a 9 × 9 symmetric matrix, and each component of the matrix Q cst, 11 is a constant. The matrix Q cst, 12 is a 9 × 3 zero matrix, the matrix Q cst, 13 is a 9 × 3 zero matrix, and the matrix Q cst, 23 is a 3 × 3 zero matrix. The matrix Q m, k is a 3 × 3 symmetric matrix defined by the equations (11) and (12), as in the embodiment.
The matrix Q g, k is determined based on the following equations (42) and (43). Here, the amount of temperature change [Delta] T g, k, as shown in the following equation (43), time T = temperature data T g in k, k a, the time T = temperature at k-1 data T g, k- It is a value representing the absolute value of the difference from 1 . The coefficient α g is a positive real number. The matrix Q cst, g is the process noise w k generated in the state vector x k in the state transition model that assumes that the offset of the three-dimensional angular velocity sensor 90a does not change even if the temperature changes in the three-dimensional angular velocity sensor 90a. It is a matrix showing the covariance of the process noise generated in the offset estimated value g OFF, k of the three-dimensional angular velocity sensor 90a. In the present embodiment, each component of the matrix Q cst, g is a constant.
Figure 2013122384

このように、変形例4に係る状態推定装置は、温度検出部600を備えるため、3次元磁気センサ70の温度変化と、3次元角速度センサ90aの温度変化との双方を考慮して、状態ベクトルxを更新することが可能となる。
これにより、3次元磁気センサ70及び3次元角速度センサ90aの双方の温度が変化した場合であっても、状態ベクトルxの各要素が真値から乖離した値となる可能性を低減することが可能となり、正確且つ高速な状態推定が可能となる。
As described above, since the state estimation device according to the modification 4 includes the temperature detection unit 600, the state vector in consideration of both the temperature change of the three-dimensional magnetic sensor 70 and the temperature change of the three-dimensional angular velocity sensor 90a. It becomes possible to update xk .
Thus, even when the temperature of both the three-dimensional magnetic sensor 70 and the three-dimensional angular velocity sensor 90a is changed, that the elements of the state vector x k to reduce the possibility that a value which deviates from the true value This makes it possible to accurately and quickly estimate the state.

なお、変形例4では、3次元角速度センサ90aのオフセット推定値gOFFと、3次元磁気センサ70のオフセット推定値mOFFとを要素とする6次元のベクトルが、オフセット推定ベクトルに該当する。 In the fourth modification, a six-dimensional vector having the offset estimated value g OFF of the three-dimensional angular velocity sensor 90a and the offset estimated value m OFF of the three-dimensional magnetic sensor 70 as elements corresponds to the offset estimated vector.

変形例4において、温度検出部600は、3次元磁気センサ70及び3次元角速度センサ90aの内部に配置されているが、温度検出部600は、3次元磁気センサ70及び3次元角速度センサ90aの外部に配置されるものであってもよい。
具体的には、第1温度検出部75は3次元磁気センサ70の外部に配置されるものであってもよく、第2温度検出部95は3次元角速度センサ90aの外部に配置されるものであってもよい。
In the modification 4, the temperature detection unit 600 is disposed inside the three-dimensional magnetic sensor 70 and the three-dimensional angular velocity sensor 90a, but the temperature detection unit 600 is outside the three-dimensional magnetic sensor 70 and the three-dimensional angular velocity sensor 90a. It may be arranged in.
Specifically, the first temperature detector 75 may be disposed outside the three-dimensional magnetic sensor 70, and the second temperature detector 95 is disposed outside the three-dimensional angular velocity sensor 90a. There may be.

(5)変形例5
上述した実施形態及び変形例において、状態推定装置は、3次元磁気センサ70、3次元加速度センサ80、及び3次元角速度センサ90を備えたが、本発明はこのような形態に限定されるものではなく、これら3種類のセンサのうち一部のセンサのみを備えるものであってもよい。また、これら3種類のセンサ以外のセンサを備えるものであってもよい。
つまり、本発明に係る状態推定装置は、異種の物理量を測定する複数のセンサを備え、これら複数のセンサの出力を統合しシステムの状態を推定するカルマンフィルタの演算を行うものであればよい。
(5) Modification 5
In the embodiment and the modification described above, the state estimation device includes the three-dimensional magnetic sensor 70, the three-dimensional acceleration sensor 80, and the three-dimensional angular velocity sensor 90. However, the present invention is not limited to such a form. Alternatively, only some of these three types of sensors may be provided. Moreover, you may provide sensors other than these three types of sensors.
That is, the state estimation apparatus according to the present invention may be any apparatus that includes a plurality of sensors that measure different physical quantities and that performs a Kalman filter operation that estimates the state of the system by integrating the outputs of the plurality of sensors.

例えば、状態推定装置が、異種の物理量を測定する5つのセンサを備え、当該5つのセンサのうち、3つのセンサ(以下、「第1センサ群」と称する)の各々のオフセットを推定の対象とする場合を想定する。
この場合、状態推定装置は、第1センサ群を構成する3つのセンサのうち、1以上のセンサ(以下、「第2センサ群」と称する)の各々の温度を検出する温度検出部を備えるものであってもよい。この例において、温度検出部は、第2センサ群を構成する1以上のセンサの各々に対応する1以上の温度データを出力する。そして、状態推定装置は、温度検出部が出力する1以上の温度データの各々の変化量に基づいて、状態遷移モデルにおいて生じるプロセスノイズの共分散を定める。
すなわち、この例において、第2センサ群を構成する1以上のセンサの各々のオフセットを推定した値を要素とするベクトルが、オフセット推定ベクトルに該当する。そして、状態推定装置は、状態遷移モデルにおいて規定されるプロセスノイズの共分散のうち、オフセット推定ベクトルに生じるプロセスノイズの共分散を、温度検出部が出力する1以上の温度データの各々の変化量に基づいて定める。
これにより、第2センサ群を構成する1以上のセンサのうちいずれかの温度が変化した場合であっても、状態ベクトルxの各要素が真値から乖離した値となる可能性を低減することが可能となり、正確且つ高速な状態推定が可能となる。
For example, the state estimation device includes five sensors that measure different physical quantities, and among the five sensors, the offset of each of three sensors (hereinafter referred to as “first sensor group”) is an object of estimation. Assume that
In this case, the state estimation device includes a temperature detection unit that detects the temperature of each of one or more sensors (hereinafter referred to as “second sensor group”) among the three sensors constituting the first sensor group. It may be. In this example, the temperature detection unit outputs one or more temperature data corresponding to each of the one or more sensors constituting the second sensor group. Then, the state estimation device determines the covariance of process noise generated in the state transition model based on the amount of change in each of the one or more temperature data output from the temperature detection unit.
That is, in this example, a vector whose element is a value obtained by estimating the offset of each of one or more sensors constituting the second sensor group corresponds to the offset estimation vector. Then, the state estimation device includes a process noise covariance generated in the offset estimation vector among the process noise covariances defined in the state transition model, and a change amount of each of the one or more temperature data output by the temperature detection unit. Determine based on.
Accordingly, even when any temperature among the one or more sensors constituting the second sensor group have been changed, to reduce the possibility that the elements of the state vector x k is a value which deviates from the true value Therefore, accurate and high-speed state estimation becomes possible.

なお、変形例5に係る状態推定装置は、5つのセンサを備え、第1センサ群は3つのセンサより構成されているが、これはあくまでも例示である。すなわち、本発明に係る状態推定装置は、2以上のセンサを備えるものであればよく、第1センサ群は、状態推定装置の備える2以上のセンサのうち1以上のセンサから構成されるものであればよい。また、この場合、第2センサ群は、第1センサ群を構成する1以上のセンサの全てを含んでもよいし、第1センサ群を構成する1以上のセンサの一部のセンサから構成されるものであってもよい。
状態推定装置が備えるセンサの種類や、センサの個数に関わらず、センサの温度変化量に基づいてプロセスノイズの共分散を定めることにより、状態ベクトルxが真値から乖離した値に更新されることを防止することが可能となる。
In addition, although the state estimation apparatus which concerns on the modification 5 is provided with five sensors and the 1st sensor group is comprised from three sensors, this is an illustration to the last. That is, the state estimation device according to the present invention only needs to include two or more sensors, and the first sensor group includes one or more sensors among the two or more sensors included in the state estimation device. I just need it. In this case, the second sensor group may include all of the one or more sensors constituting the first sensor group, or may include a part of the one or more sensors constituting the first sensor group. It may be a thing.
Regardless of the type of sensors provided in the state estimation device and the number of sensors, the state vector xk is updated to a value deviating from the true value by determining the covariance of the process noise based on the sensor temperature change amount. This can be prevented.

1…携帯機器、10…CPU、50…表示部、70…3次元磁気センサ、75…第1温度検出部、80…3次元加速度センサ、90…3次元角速度センサ、100…状態推定プログラム、200…初期値生成部、300…カルマンフィルタ演算部、500…出力情報生成部500、m…磁気データ、T…温度データ、ΔTm,k…温度変化量、x…状態ベクトル、w…プロセスノイズ、Q…プロセスノイズの共分散、y…観測値ベクトル、z…観測残差。
DESCRIPTION OF SYMBOLS 1 ... Portable apparatus, 10 ... CPU, 50 ... Display part, 70 ... Three-dimensional magnetic sensor, 75 ... 1st temperature detection part, 80 ... Three-dimensional acceleration sensor, 90 ... Three-dimensional angular velocity sensor, 100 ... State estimation program, 200 ... initial value generation unit, 300 ... Kalman filter calculation unit, 500 ... output information generation unit 500, m ... magnetic data, Tm ... temperature data, ΔTm , k ... temperature change amount, x ... state vector, wk ... process noise , Q k ... process noise covariance, y ... observation vector, z ... observation residual.

Claims (5)

互いに直交する3方向の磁気成分を検出し、3軸の座標系においてベクトルデータとして表現される磁気データを順次出力する3次元磁気センサを含む、複数のセンサと、
前記3次元磁気センサの温度を検出して温度データを順次出力する温度検出部と、
を備えた機器に組み込まれ、
システムの状態を推定する状態推定装置に用いられるカルマンフィルタであって、
前記3次元磁気センサのオフセットを推定した値を示すオフセット推定ベクトルを含む複数の状態変数を要素とする状態ベクトルを、
システムの経時的な変化を表す状態遷移モデルに対して適用することで、
単位時間経過後の前記状態ベクトルを推定し、これを推定状態ベクトルとして算出する、
状態遷移モデル部と、
前記複数のセンサの出力値の各々を要素とする観測値ベクトルに基づいて観測残差を算出し、
前記推定状態ベクトルと、前記観測残差とに基づいて、前記状態ベクトルを更新し、
これを更新後の状態ベクトルとして算出する、
更新部と、を備え、
前記単位時間における、前記温度データの変化量を、温度変化量としたとき、
前記状態遷移モデルで規定されるプロセスノイズの共分散のうち、
前記オフセット推定ベクトルに生じるプロセスノイズの共分散の各成分を、
前記温度変化量に基づいて定める、
ことを特徴とする、カルマンフィルタ。
A plurality of sensors including a three-dimensional magnetic sensor that detects magnetic components in three directions orthogonal to each other and sequentially outputs magnetic data expressed as vector data in a three-axis coordinate system;
A temperature detector that detects the temperature of the three-dimensional magnetic sensor and sequentially outputs temperature data;
Built into equipment with
A Kalman filter used in a state estimation device for estimating a state of a system,
A state vector having a plurality of state variables including an offset estimation vector indicating a value obtained by estimating an offset of the three-dimensional magnetic sensor,
By applying to the state transition model that represents the change of the system over time,
Estimating the state vector after elapse of unit time, and calculating this as an estimated state vector;
A state transition model part;
An observation residual is calculated based on an observation value vector having each of output values of the plurality of sensors as an element,
Updating the state vector based on the estimated state vector and the observation residual;
This is calculated as an updated state vector,
An update unit, and
When the amount of change in the temperature data in the unit time is a temperature change amount,
Of the process noise covariances defined by the state transition model,
Each component of the covariance of the process noise that occurs in the offset estimation vector is
Based on the amount of temperature change,
A Kalman filter characterized by that.
複数のセンサと、
前記複数のセンサのうち、1以上のセンサの各々の温度を検出し、前記1以上のセンサの各々に対応する温度データを出力する温度検出部と、
を備えた機器に組み込まれ、
システムの状態を推定する状態推定装置に用いられる
カルマンフィルタであって、
前記複数のセンサのうち前記1以上のセンサの各々のオフセットを推定した値を要素とするベクトルをオフセット推定ベクトルとしたとき、
前記オフセット推定ベクトルを含む複数の状態変数を要素とする状態ベクトルを、
システムの経時的な変化を表す状態遷移モデルに対して適用することで、
単位時間経過後の前記状態ベクトルを推定し、これを推定状態ベクトルとして算出する、
状態遷移モデル部と、
前記複数のセンサの出力値の各々を要素とする観測値ベクトルに基づいて観測残差を算出し、
前記推定状態ベクトルと、前記観測残差とに基づいて、前記状態ベクトルを更新し、
これを更新後の状態ベクトルとして算出する、
更新部と、を備え、
前記状態遷移モデルで規定されるプロセスノイズの共分散のうち、
前記オフセット推定ベクトルに生じるプロセスノイズの共分散の各成分を、
前記単位時間における、1以上の前記温度データの各々の温度変化量に基づいて定める、
ことを特徴とする、カルマンフィルタ。
Multiple sensors,
A temperature detection unit that detects a temperature of each of the one or more sensors among the plurality of sensors and outputs temperature data corresponding to each of the one or more sensors;
Built into equipment with
A Kalman filter used in a state estimation device for estimating a state of a system,
When a vector whose element is an estimated value of each of the one or more sensors among the plurality of sensors is an offset estimation vector,
A state vector including a plurality of state variables including the offset estimation vector,
By applying to the state transition model that represents the change of the system over time,
Estimating the state vector after elapse of unit time, and calculating this as an estimated state vector;
A state transition model part;
An observation residual is calculated based on an observation value vector having each of output values of the plurality of sensors as an element,
Updating the state vector based on the estimated state vector and the observation residual;
This is calculated as an updated state vector,
An update unit, and
Of the process noise covariances defined by the state transition model,
Each component of the process noise covariance that occurs in the offset estimation vector is
Based on the temperature change amount of each of the one or more temperature data in the unit time,
A Kalman filter characterized by that.
前記複数のセンサには、
互いに直交する3方向の磁気成分を検出し、3軸の座標系においてベクトルデータとして表現される磁気データを順次出力する3次元磁気センサと、
互いに直交する3軸の周りの角速度を検出し、3軸の座標系においてベクトルデータとして表現される角速度データを順次出力する3次元角速度センサとが含まれ、
前記1以上のセンサには、
前記3次元磁気センサ、または、前記3次元角速度センサのうち、少なくとも一方が含まれる、
ことを特徴とする、
請求項2に記載のカルマンフィルタ。
The plurality of sensors include
A three-dimensional magnetic sensor that detects magnetic components in three directions orthogonal to each other and sequentially outputs magnetic data expressed as vector data in a three-axis coordinate system;
A three-dimensional angular velocity sensor that detects angular velocity around three axes orthogonal to each other and sequentially outputs angular velocity data expressed as vector data in a three-axis coordinate system;
The one or more sensors include
At least one of the three-dimensional magnetic sensor or the three-dimensional angular velocity sensor is included.
It is characterized by
The Kalman filter according to claim 2.
請求項1乃至3のうちいずれか1項に記載のカルマンフィルタと、
各々の出力が前記観測値ベクトルの要素となる前記複数のセンサと、
前記複数のセンサのうち1以上のセンサの温度を各々検出し、前記1以上のセンサに対応する1以上の前記温度データを出力する温度検出部と
を備える
ことを特徴とする状態推定装置。
A Kalman filter according to any one of claims 1 to 3,
The plurality of sensors, each output being an element of the observation vector;
A state estimation device comprising: a temperature detection unit that detects temperatures of one or more sensors among the plurality of sensors and outputs one or more temperature data corresponding to the one or more sensors.
前記温度検出部は、
前記複数のセンサのうち前記1以上のセンサの内部に配置される
ことを特徴とする、
請求項4に記載の状態推定装置。
The temperature detector is
It is disposed inside the one or more sensors among the plurality of sensors.
The state estimation apparatus according to claim 4.
JP2011270090A 2011-12-09 2011-12-09 Kalman filter and state estimation device Pending JP2013122384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011270090A JP2013122384A (en) 2011-12-09 2011-12-09 Kalman filter and state estimation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011270090A JP2013122384A (en) 2011-12-09 2011-12-09 Kalman filter and state estimation device

Publications (1)

Publication Number Publication Date
JP2013122384A true JP2013122384A (en) 2013-06-20

Family

ID=48774422

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011270090A Pending JP2013122384A (en) 2011-12-09 2011-12-09 Kalman filter and state estimation device

Country Status (1)

Country Link
JP (1) JP2013122384A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015114221A (en) * 2013-12-12 2015-06-22 セイコーエプソン株式会社 Signal processing device, detection device, sensor, electronic device, and movable body
JP2017191039A (en) * 2016-04-14 2017-10-19 セイコーエプソン株式会社 Magnetic field measurement device and calibration method for the same
JP2018128467A (en) * 2018-05-11 2018-08-16 セイコーエプソン株式会社 Signal processing device, detection device, sensor, electronic device, and movable body
US10215785B2 (en) 2013-12-12 2019-02-26 Seiko Epson Corporation Signal processing device, detection device, sensor, electronic apparatus and moving object
CN110765717A (en) * 2019-10-22 2020-02-07 哈尔滨理工大学 FPGA-based extended Kalman filter circuit structure design method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015114221A (en) * 2013-12-12 2015-06-22 セイコーエプソン株式会社 Signal processing device, detection device, sensor, electronic device, and movable body
US10215785B2 (en) 2013-12-12 2019-02-26 Seiko Epson Corporation Signal processing device, detection device, sensor, electronic apparatus and moving object
JP2017191039A (en) * 2016-04-14 2017-10-19 セイコーエプソン株式会社 Magnetic field measurement device and calibration method for the same
JP2018128467A (en) * 2018-05-11 2018-08-16 セイコーエプソン株式会社 Signal processing device, detection device, sensor, electronic device, and movable body
CN110765717A (en) * 2019-10-22 2020-02-07 哈尔滨理工大学 FPGA-based extended Kalman filter circuit structure design method

Similar Documents

Publication Publication Date Title
US20140122015A1 (en) Attitude estimation method and apparatus
CN104969030B (en) Inertial device, methods and procedures
JP2013064695A (en) State estimating device, offset updating method, and offset updating program
JP5061264B1 (en) Small attitude sensor
JP6705972B2 (en) Attitude estimation device, attitude estimation method, control program, and recording medium
Wu et al. A novel approach for attitude estimation based on MEMS inertial sensors using nonlinear complementary filters
JP6191145B2 (en) Offset estimation apparatus and program
WO2014119799A1 (en) Inertial device, method, and program
JP7025215B2 (en) Positioning system and positioning method
JP2013096724A (en) State estimation device
Troni et al. Adaptive Estimation of Measurement Bias in Three-Dimensional Field Sensors with Angular Rate Sensors: Theory and Comparative Experimental Evaluation.
KR20140025319A (en) Apparatuses and methods for dynamic tracking and compensation of magnetic near field
JP2013122384A (en) Kalman filter and state estimation device
CN109000639B (en) Attitude estimation method and device of multiplicative error quaternion geomagnetic tensor field auxiliary gyroscope
Sokolović et al. INS/GPS navigation system based on MEMS technologies
Castellanos et al. A low-cost air data attitude heading reference system for the tourism airplane applications
JP5678748B2 (en) Terminal device and geomagnetic environment determination program
CN112577518A (en) Inertial measurement unit calibration method and device
JP2013061309A (en) Kalman filter, state estimation device, method for controlling kalman filter, and control program of kalman filter
JP2013185898A (en) State estimation device
JP2014219340A (en) Offset correction method and offset correction device
JP7404227B2 (en) Method and apparatus for characterizing orientation determined from measurements of magnetic fields
Hemanth et al. Calibration of 3-axis magnetometers
JP2013088162A (en) State estimation apparatus
Gao et al. A novel robust Kalman filter on AHRS in the magnetic distortion environment