JP2013185898A - State estimation device - Google Patents
State estimation device Download PDFInfo
- Publication number
- JP2013185898A JP2013185898A JP2012050297A JP2012050297A JP2013185898A JP 2013185898 A JP2013185898 A JP 2013185898A JP 2012050297 A JP2012050297 A JP 2012050297A JP 2012050297 A JP2012050297 A JP 2012050297A JP 2013185898 A JP2013185898 A JP 2013185898A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- initial
- state
- value
- posture
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は状態推定装置に関する。 The present invention relates to 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 nonlinear 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,
一般的に、非線形カルマンフィルタは、動的システムの状態を表す複数の物理量の経時的な変化を推定する状態遷移モデルと、推定された動的システムの状態から、動的システムの有する複数のセンサが計測する値(観測値)を推定する観測モデルとを有する。そして、非線形カルマンフィルタは、推定された観測値と、複数のセンサが実際に測定する観測値との差分(観測残差)を用いて、動的システムの状態を表す複数の物理量の各々の推定値(状態変数)を要素とする状態ベクトルを推定し逐次更新することにより、状態ベクトルの各要素の示す値を、実際の物理量(真値)に近づける演算を行う。 In general, a nonlinear Kalman filter is composed of a state transition model that estimates changes over time in a plurality of physical quantities representing the state of a dynamic system, and a plurality of sensors that the dynamic system has based on the estimated state of the dynamic system. And an observation model for estimating a value to be measured (observed value). Then, the nonlinear Kalman filter uses the difference (observation residual) between the estimated observation value and the observation value actually measured by the plurality of sensors to estimate each of the plurality of physical quantities representing the state of the dynamic system. 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).
ところで、非線形カルマンフィルタは、状態ベクトルと、状態ベクトルに基づいて算出される観測残差とを用いて、状態ベクトルを逐次更新する演算であるため、状態ベクトルの初期値の各要素が真値から乖離した値に設定された場合、状態ベクトルの各要素が真値に近い値に収束するまでに長時間を要することがあり、更には、状態ベクトルの各要素が真値とは異なる不正確な値に収束することも起こり得る。この場合、非線形カルマンフィルタは、システムの状態を正確に推定することはできない。 By the way, since the nonlinear Kalman filter is an operation that sequentially updates the state vector using the state vector and the observation residual calculated based on the state vector, each element of the initial value of the state vector deviates from the true value. If the value is set to the specified value, it may take a long time for each element of the state vector to converge to a value close to the true value. Convergence can also occur. In this case, the nonlinear Kalman filter cannot accurately estimate the state of the system.
本発明は、上述した点に鑑みてなされたものであり、非線形カルマンフィルタを用いて正確な状態推定を行うことを解決課題とする。 The present invention has been made in view of the above-described points, and an object of the present invention is to perform accurate state estimation using a nonlinear Kalman filter.
上述した課題を解決するため、本発明に係る状態推定装置は、システムを観測して観測値を各々出力する複数のセンサと、位置情報を出力する位置情報出力部と、物体を撮影し画像情報を出力する画像取得部と、を備える機器に組み込まれ、前記システムの状態を推定する状態推定装置であって、前記システムの状態を推定する値である複数の状態変数を要素とする状態ベクトルと、前記観測値の各々を要素とする観測値ベクトルとを用いて、前記状態ベクトルを更新するカルマンフィルタを1以上備えるカルマンフィルタ演算部と、前記状態ベクトルの初期値である初期ベクトルを生成する初期値生成部と、を備え、前記複数の状態変数は、前記機器の姿勢を推定する状態変数を含み、前記初期値生成部は、1以上の物体を前記画像取得部が撮影した際に前記画像取得部が出力する前記画像情報と、前記位置情報出力部が出力する前記位置情報と、に基づいて、前記機器の姿勢を推定する状態変数の初期値である初期姿勢推定値を算出し、前記初期姿勢推定値を要素とする前記初期ベクトルを生成する、ことを特徴とする。 In order to solve the above-described problems, a state estimation apparatus according to the present invention includes a plurality of sensors that observe a system and output observation values, a position information output unit that outputs position information, and image information obtained by photographing an object. A state estimation device that estimates a state of the system, and is a state vector having a plurality of state variables as elements to estimate the state of the system; , Using an observation value vector having each of the observation values as an element, a Kalman filter operation unit including one or more Kalman filters for updating the state vector, and generating an initial value that is an initial value of the state vector And the plurality of state variables include state variables for estimating the posture of the device, and the initial value generation unit includes one or more objects as the image acquisition unit. Initial posture estimation, which is an initial value of a state variable for estimating the posture of the device, based on the image information output by the image acquisition unit when the image is taken and the position information output by the position information output unit A value is calculated, and the initial vector having the initial posture estimated value as an element is generated.
機器の姿勢は、当該機器の利用者の動作に依存するため、初期姿勢推定値を事前に定められた何らかの固定値とした場合には、初期姿勢推定値と、機器の真の姿勢とは大きく乖離する場合がある。
この発明によれば、画像情報と位置情報とに基づいて初期姿勢推定値を算出する。画像情報に基づいて、機器から見た物体の方向を算出することができる。従って、機器の位置を表す位置情報に基づいて、機器と物体との位置関係を算出できる場合、機器から見た物体の方向と、機器と物体との位置関係とに基づいて、機器の姿勢を算出することができる。これにより、機器の姿勢を推定する状態変数と、機器の真の姿勢とが大きく乖離することを防止することができ、状態推定装置がシステムの状態を正確に推定することが可能となる。
Since the posture of the device depends on the operation of the user of the device, if the initial posture estimated value is set to some predetermined fixed value, the initial posture estimated value and the true posture of the device are large. There may be a gap.
According to this invention, the initial posture estimated value is calculated based on the image information and the position information. Based on the image information, the direction of the object viewed from the device can be calculated. Therefore, when the positional relationship between the device and the object can be calculated based on the position information representing the position of the device, the orientation of the device is determined based on the direction of the object viewed from the device and the positional relationship between the device and the object. Can be calculated. As a result, it is possible to prevent the state variable for estimating the posture of the device from greatly deviating from the true posture of the device, and the state estimation device can accurately estimate the state of the system.
また、上述した状態推定装置において、前記カルマンフィルタ演算部は、並列に動作する所定数の前記カルマンフィルタを備え、前記初期値生成部は、前記画像取得部が、1の物体を撮影して前記画像情報を出力した場合に、前記画像情報に基づいて、前記機器に固定された3軸の座標系である機器座標系において、前記機器から見た前記1の物体の方向を表した第1方向ベクトルを算出する画像処理部と、前記位置情報に基づいて、地球上に固定された3軸の座標系である地上座標系において、前記機器から見た前記1の物体の方向を表した第2方向ベクトルを算出し、前記第1方向ベクトル及び前記第2方向ベクトルに基づいて、初期姿勢候補値を算出し、前記初期姿勢候補値を、前記第2方向ベクトルを回転軸として所定角度ずつ回転させることで、前記所定数の前記初期姿勢推定値を算出する初期姿勢算出部と、前記所定数の前記初期姿勢推定値の各々に対応する、前記所定数の前記初期ベクトルを生成し、これらを前記所定数の前記カルマンフィルタにそれぞれ供給する初期ベクトル生成部と、を備える、ことが好ましい。 Further, in the state estimation device described above, the Kalman filter calculation unit includes a predetermined number of the Kalman filters that operate in parallel, and the initial value generation unit includes the image information obtained by the image acquisition unit capturing a single object. In a device coordinate system, which is a three-axis coordinate system fixed to the device, based on the image information, a first direction vector representing the direction of the one object viewed from the device is A second direction vector representing the direction of the first object viewed from the device in a ground coordinate system, which is a three-axis coordinate system fixed on the earth, based on the image processing unit to be calculated and the position information; And calculating an initial posture candidate value based on the first direction vector and the second direction vector, and rotating the initial posture candidate value by a predetermined angle about the second direction vector as a rotation axis. Generating the predetermined number of the initial posture estimation values, and generating the predetermined number of the initial vectors corresponding to each of the predetermined number of the initial posture estimation values. It is preferable that an initial vector generation unit respectively supplied to the predetermined number of the Kalman filters.
この発明によれば、初期値生成部は、所定数の初期姿勢推定値を算出し、所定数の初期姿勢推定値の各々に対応して、所定数の初期ベクトルを生成する。そして、初期値生成部は、これらの所定数の初期ベクトルを、所定数のカルマンフィルタにそれぞれ供給する。
所定数の初期ベクトルは、互いに異なる値を示す。また、所定数の初期ベクトルの各々は、画像情報に基づいて定められる第1方向ベクトルと、位置情報に基づいて定められる第2方向ベクトルとを用いて算出される。従って、所定数の初期ベクトルの中には、各要素が、実際の物理量から大きく乖離しない値を有する初期ベクトルが含まれる。当該初期ベクトルが供給されるカルマンフィルタは、システムの状態を正確に推定することが可能である。これにより、本発明に係る状態推定装置は、システムの状態を正確に推定することが可能となる。
According to the present invention, the initial value generation unit calculates a predetermined number of initial posture estimation values, and generates a predetermined number of initial vectors corresponding to each of the predetermined number of initial posture estimation values. Then, the initial value generation unit supplies the predetermined number of initial vectors to the predetermined number of Kalman filters.
The predetermined number of initial vectors indicate different values. Each of the predetermined number of initial vectors is calculated using a first direction vector determined based on the image information and a second direction vector determined based on the position information. Therefore, the predetermined number of initial vectors includes initial vectors in which each element has a value that does not greatly deviate from the actual physical quantity. The Kalman filter supplied with the initial vector can accurately estimate the state of the system. Thereby, the state estimation apparatus according to the present invention can accurately estimate the state of the system.
また、上述した状態推定装置において、前記カルマンフィルタ演算部は、1つの前記カルマンフィルタを備え、前記初期値生成部は、前記画像取得部が、2つの物体を撮影して前記画像情報を出力した場合に、前記画像情報に基づいて、前記機器に固定された3軸の座標系である機器座標系において、前記機器から見た前記2つの物体の各々の方向を表した2つの第1方向ベクトルを算出する画像処理部と、前記位置情報に基づいて、地球上に固定された3軸の座標系である地上座標系において、前記機器から見た前記2つの物体の各々の方向を表した2つの第2方向ベクトルを算出し、前記2つの第1方向ベクトル及び前記2つの第2方向ベクトルに基づいて、前記初期姿勢推定値を算出する、初期姿勢算出部と、前記初期姿勢推定値を要素とする前記初期ベクトルを生成し、これを前記カルマンフィルタに供給する初期ベクトル生成部と、を備える、ことが好ましい。 In the state estimation device described above, the Kalman filter calculation unit includes one Kalman filter, and the initial value generation unit is configured when the image acquisition unit captures two objects and outputs the image information. Based on the image information, in a device coordinate system that is a three-axis coordinate system fixed to the device, two first direction vectors representing the directions of the two objects viewed from the device are calculated. And a second coordinate system representing the directions of the two objects viewed from the device in a ground coordinate system that is a three-axis coordinate system fixed on the earth based on the position information. An initial posture calculation unit that calculates a two-direction vector, calculates the initial posture estimation value based on the two first direction vectors and the two second direction vectors, and requires the initial posture estimation value. Generating the initial vector to which a and a initial vector generator to be supplied to the Kalman filter, it is preferable.
この発明によれば、2つの第1方向ベクトル及び2つの第2方向ベクトルに基づいて、初期姿勢推定値を算出するため、初期姿勢推定値は、機器の実際の姿勢を正確に表す値となる。従って、本発明に係る状態推定装置は、正確な状態推定を行うことが可能となる。 According to this invention, since the initial posture estimated value is calculated based on the two first direction vectors and the two second direction vectors, the initial posture estimated value is a value that accurately represents the actual posture of the device. . Therefore, the state estimation apparatus according to the present invention can perform accurate state estimation.
また、上述した状態推定装置は、時刻情報を出力する時刻出力部を備え、前記初期姿勢算出部は、前記位置情報と、前記時刻情報と、に基づいて、前記第2方向ベクトルを算出する、ことが好ましい。 Further, the state estimation device described above includes a time output unit that outputs time information, and the initial posture calculation unit calculates the second direction vector based on the position information and the time information. It is preferable.
この発明に係る物体は、例えば、太陽、月等の天体が該当する。天体は、位置情報と時刻情報とにより、地上座標系において機器から見た物体の方向を特定することができる。すなわち、位置情報と時刻情報とに基づいて算出される第2方向ベクトルは、機器から見た物体の方向を正確に表す。
状態推定装置は、このような第2方向ベクトルに基づいて初期姿勢推定値を算出するため、正確な状態推定を行うことが可能となる。
The object according to the present invention corresponds to celestial bodies such as the sun and the moon. The celestial body can specify the direction of the object viewed from the device in the ground coordinate system based on the position information and the time information. That is, the second direction vector calculated based on the position information and the time information accurately represents the direction of the object viewed from the device.
Since the state estimation device calculates the initial posture estimation value based on such a second direction vector, it is possible to perform accurate state estimation.
また、上述した状態推定装置において、前記物体は、前記地上座標系における座標が既知であり、前記初期姿勢算出部は、前記位置情報と、前記物体の前記地上座標系における座標とに基づいて、前記第2方向ベクトルを算出する、ことを特徴とすることが好ましい。 In the state estimation device described above, the object has known coordinates in the ground coordinate system, and the initial posture calculation unit is based on the position information and the coordinates of the object in the ground coordinate system. It is preferable that the second direction vector is calculated.
この発明に係る物体は、例えば、著名な建造物等のランドマークのうち、地上座標系における座標が既知のランドマークが該当する。地上座標系における座標が既知の物体は、当該座標と、機器の位置情報とに基づいて、機器から見た物体の方向を特定することができる。すなわち、位置情報と、物体の地上座標系における座標とに基づいて算出される第2方向ベクトルは、機器から見た物体の方向を正確に表す。
状態推定装置は、このような第2方向ベクトルに基づいて初期姿勢推定値を算出するため、正確な状態推定を行うことが可能となる。
The object according to the present invention corresponds to a landmark whose coordinates in the ground coordinate system are known among landmarks such as famous buildings. An object whose coordinates in the ground coordinate system are known can specify the direction of the object viewed from the device based on the coordinates and the position information of the device. That is, the second direction vector calculated based on the position information and the coordinates of the object in the ground coordinate system accurately represents the direction of the object viewed from the device.
Since the state estimation device calculates the initial posture estimation value based on such a second direction vector, it is possible to perform accurate state estimation.
<A.実施形態>
本発明の実施の形態について図面を参照して説明する。
<A. Embodiment>
Embodiments of the present invention will be described with reference to the drawings.
[1. 機器構成及びソフトウェア構成について]
図1は、本発明の実施形態に係る携帯機器のブロック図であり、図2は携帯機器の外観を示す斜視図である。携帯機器1(機器)は、携帯機器1の姿勢変化に応じて、携帯機器1が備える画面に表示される地図などの画像を回転させることで、画像によって表されている方位を現実空間の方位に追従させる機能を備える。この機能は、各種センサの出力に基づいてカルマンフィルタの演算を行い、携帯機器1の姿勢や、携帯機器1から見た地磁気の向き等を推定することによって実現される。
[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 (device) rotates the image such as a map displayed on the screen included in the
携帯機器1は、各種の構成要素とバスを介して接続され装置全体を制御するCPU10、CPU10の作業領域として機能するRAM(蓄積部)20、状態推定プログラム100等の各種プログラム及び各種設定情報を記憶したROM30、通信を実行する通信部40、画像を表示する表示部50、GPS衛星からの情報(具体的には、携帯機器1の緯度、経度についての情報)を取得してこれを出力するGPS部60、携帯機器1の外部に存在する物体Objを撮影して画像情報Imgを出力するカメラ110(画像取得部)、携帯機器1の利用者の各種入力に用いられる操作部120、及び、時刻情報Timeを出力する時計130(時刻出力部)を備える。
また、携帯機器1は、地磁気等の磁気を検出して磁気データqを出力する3次元磁気センサ70、加速度を検出して加速度データaを出力する3次元加速度センサ80、及び角速度を検出して角速度データgを出力する3次元角速度センサ90を備える。
なお、本実施形態は、各種プログラム及び各種設定情報をROM30に格納するが、各種プログラム及び各種設定情報のうちの一部または全部をRAM20に格納してもよい。
The
The
In the present embodiment, various programs and various setting information are stored in the
表示部50は、CPU10が状態推定プログラム100を実行することにより推定したシステムの状態に基づいて算出された地磁気の向きや携帯機器1の姿勢等を、矢印等の画像により表示する。なお、表示部50は、カメラ110が物体Objを撮影して物体Objの描かれた画像情報Imgを出力する場合に、当該画像情報Imgに基づいた画像を表示するものであってもよい。
GPS部60は、GPS衛星からの信号を受信して携帯機器1の位置情報Ps(緯度、経度)を出力する。すなわち、GPS部60は、携帯機器1の位置情報Psを取得し、これを出力する「位置情報出力部」として機能する。
操作部120は、携帯機器1の利用者が、カメラ110を用いた物体Objを撮影するための指示の入力に用いられる。
The
The
The
3次元磁気センサ70は、X軸磁気センサ71、Y軸磁気センサ72、及びZ軸磁気センサ73を備える。各センサは、MI素子(磁気インピーダンス素子)、MR素子(磁気抵抗効果素子)などを用いて構成することができる。磁気センサI/F74は、X軸磁気センサ71、Y軸磁気センサ72、及び、Z軸磁気センサ73からの出力信号をAD変換して磁気データqを出力する。この磁気データqは、x軸、y軸およびz軸の3成分によって表されるベクトルデータである。より具体的には、磁気データqは、携帯機器1に固定(厳密には、3次元磁気センサ70に固定)された3軸の直交座標系において、X軸磁気センサ71からの出力値がx軸成分として表され、Y軸磁気センサ72からの出力値がy軸成分として表され、Z軸磁気センサ73からの出力値がz軸成分として表されるベクトルデータである。
以下において、携帯機器1に固定された3軸の直交座標系を、「機器座標系ΣS」と称する。なお、3次元磁気センサ70に固定された座標系、カメラ110に固定された座標系、3次元加速度センサ80に固定された座標系、及び、3次元角速度センサ90に固定された座標系は、厳密には、それぞれ異なる位置に原点を有するが、以下では、説明の便宜上、機器座標系ΣSと総称する場合がある。
The three-dimensional
Hereinafter, the three-axis orthogonal coordinate system fixed to the
ところで、3次元磁気センサ70が検出する磁気データqには、地磁気Bgが含まれる。
地磁気Bgは、磁極北に向かう水平成分と伏角方向の鉛直成分を有する磁界であり、地上のある一点に固定された3軸の直交座標系(以下、「地上座標系ΣG」と称する)において、一定の向き及び大きさを有するベクトルGBgとして表される。
ここで、ベクトルの符号の左上に示す添え字「G」は、当該ベクトルが地上座標系ΣGで表されたベクトルであることを意味する。なお、地上座標系ΣGの原点と、地上座標系ΣGが有する互いに直交する3軸の向きとは、どのように定めてもよい。本実施形態では、地上座標系ΣGを、y軸が磁極北を向き、z軸が鉛直上を向くように定める。
よって、機器座標系ΣSにおいて表した場合、地磁気Bgは、携帯機器1の姿勢μに連動して向きを変える、一定の大きさのベクトルSBg(μ)として表される(なお、ベクトルの符号の左上に示す添え字「S」は、当該ベクトルが機器座標系ΣSで表されたベクトルであることを意味する)。従って、機器座標系ΣSにおいて地磁気Bgを表すベクトルSBg(μ)に基づいて、携帯機器1の姿勢μを求めることができる。
一方、3次元磁気センサ70が搭載される携帯機器1は、着磁性を有する各種金属や、電気回路等、磁界を発生させる部品が備えられることが多い。このため、3次元磁気センサ70が出力するベクトルデータ(磁気データq)は、地磁気Bgを表すベクトルと、携帯機器1に搭載された部品が発する磁界(内部磁界Bi)を表すベクトルとを加算したベクトルとなる。従って、機器座標系ΣSにおける地磁気Bgを表すベクトルSBg(μ)を算出し、携帯機器1から見た地磁気Bgの向きを正確に求めるためには、機器座標系ΣSにおいて、3次元磁気センサが出力する磁気データqの示す座標から、携帯機器1の部品が発する内部磁界Biを表すベクトルSBiを減算する補正処理が必要となる。
このように、検出対象である地磁気Bgの正確な向きを特定するために、補正処理において、3次元磁気センサ70から出力される磁気データqから取り除かれる内部磁界Biを表すベクトルSBiを、3次元磁気センサ70のオフセットと呼ぶ。
Incidentally, the magnetic data q detected by the three-dimensional
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 in a three-axis orthogonal coordinate system (hereinafter referred to as “ground coordinate system Σ G ”) fixed at a certain point on the ground. , it expressed as a vector G Bg having a constant direction and magnitude.
Here, 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. Note that the origin of the ground coordinate system sigma G, and the three axes of the orientation orthogonal to each other with the ground coordinate system sigma G, it may be how determined. In the present embodiment, the ground coordinate system sigma G, oriented magnetic poles north y-axis, z-axis defined as facing upward vertical.
Thus, when expressed in the device coordinate system sigma S, geomagnetism Bg changes the direction in conjunction with the
On the other hand, the
In this way, 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 that is removed from the magnetic data q output from the three-dimensional
3次元加速度センサ80は、X軸加速度センサ81、Y軸加速度センサ82、及びZ軸加速度センサ83を備える。各センサは、ピエゾ抵抗型、静電容量型、熱検知型などのような検知方式であってもよい。加速度センサI/F84は、各センサからの出力信号をAD変換して加速度データaを出力する。この加速度データaは、機器座標系ΣS(厳密には、3次元加速度センサ80に固定された座標系)における慣性力と重力との合力を、x軸、y軸及びz軸の3成分を有するベクトルとして示すデータである。従って、携帯機器1が静止状態または等速直線運動状態にあれば、加速度データaは、機器座標系ΣSにおいて重力加速度の大きさと方向とを示すベクトルデータとなる。
The three-
3次元角速度センサ90は、X軸角速度センサ91、Y軸角速度センサ92、及びZ軸角速度センサ93を備える。角速度センサI/F94は、各センサからの出力信号をAD変換して角速度データgを出力する。角速度データgは、機器座標系ΣS(厳密には、3次元角速度センサ90に固定された座標系)の各軸の回りの角速度を示すベクトルデータである。
The three-dimensional
CPU10は、ROM30に格納されている状態推定プログラム100を実行することによって、携帯機器1の姿勢や3次元磁気センサ70のオフセット等のシステムの状態を表す複数の物理量を推定する。すなわち、携帯機器1は、CPU10が状態推定プログラム100を実行することにより、状態推定装置として機能する。
The
図3は、状態推定装置のうち、CPU10が状態推定プログラム100を実行することにより実現される機能を表す、機能ブロック図である。
図3に示すように、状態推定装置は、互いに異なる複数の初期ベクトルINIを出力する初期値生成部200、並列に動作する複数のカルマンフィルタを用いて並列的に非線形カルマンフィルタの演算を実行し複数の状態ベクトルxを出力するカルマンフィルタ演算部300、カルマンフィルタ演算部300が出力する複数の状態ベクトルxから1つの状態ベクトルxを選択してこれを出力する出力情報制御部400、及び、出力情報制御部400が出力する1つの状態ベクトルxに基づいて出力情報を生成する出力情報生成部500を備える。
FIG. 3 is a functional block diagram showing functions realized by the
As shown in FIG. 3, the state estimation apparatus executes an operation of a nonlinear Kalman filter in parallel using an initial
本実施形態において、カルマンフィルタ部300は、4個のカルマンフィルタKFを備える。各々のカルマンフィルタKFは、非線形カルマンフィルタの演算を行う。
詳細は後述するが、非線形カルマンフィルタの演算とは、状態推定装置が推定するシステムの状態を表すベクトルである状態ベクトルxと、状態推定装置が備えるセンサからの出力値を要素とするベクトルである観測値ベクトルyと、を用いて算出される観測残差zに基づいて、状態ベクトルxを周期的に更新することにより、システムの状態を推定する演算である。なお、状態ベクトルxは、初期ベクトルINIを初期値とする。
以下では、説明の便宜上、4個のカルマンフィルタKFを区別する場合、4個のカルマンフィルタのそれぞれを、KF[1]、KF[2]、KF[3]、KF[4]と表記する。また、4個のカルマンフィルタの中で、第m番目(mは、1≦m≦4を満たす自然数)のカルマンフィルタを、KF[m]と表記する場合がある。
4個のカルマンフィルタKFの各々は、非線カルマンフィルタの演算を実行することで算出される状態ベクトルxと、観測残差zとを出力する。
In the present embodiment, the
Although the details will be described later, the calculation of the nonlinear Kalman filter is an observation that is a vector having as elements the state vector x that represents the state of the system estimated by the state estimation device and the output value from the sensor provided in the state estimation device. This is an operation for estimating the state of the system by periodically updating the state vector x based on the observation residual z calculated using the value vector y. The state vector x has an initial vector INI as an initial value.
Hereinafter, for the sake of convenience of explanation, when the four Kalman filters KF are distinguished, each of the four Kalman filters is represented as KF [1], KF [2], KF [3], and KF [4]. Of the four Kalman filters, the m-th (m is a natural number satisfying 1 ≦ m ≦ 4) Kalman filter may be expressed as KF [m].
Each of the four Kalman filters KF outputs a state vector x calculated by executing a nonlinear Kalman filter operation and an observation residual z.
ここで、状態ベクトルxとは、複数の状態変数を要素とするベクトルである。状態ベクトルxの要素である複数の状態変数の各々は、それぞれ、非線形カルマンフィルタが推定するシステムの状態を示す物理量を表す。
本実施形態は、状態ベクトルxの要素(状態変数)として、携帯機器1の姿勢μ、地磁気の強さr、地磁気の伏角φ、携帯機器1の角速度ω、3次元角速度センサ90のオフセット推定値gOFF、及び、3次元磁気センサ70のオフセット推定値qOFFを採用し、これらを非線形カルマンフィルタの演算における推定の対象とする。
時刻T=kにおける状態ベクトルxkは、以下の式(1)で表される。各状態変数の右下に付された添え字「k」は、当該状態変数が時刻T=kにおける値であることを表す。なお、以下では、各種変数、ベクトル、行列の右下に添え字「k」を付すことで、当該変数、ベクトル、行列等が時刻T=kにおける値であることを示す場合がある。
In this embodiment, as the elements (state variables) of the state vector x, the attitude μ of the
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 each state variable indicates that the state variable is a value at time T = k. In the following description, the subscript “k” may be added to the lower right of various variables, vectors, and matrices to indicate that the variables, vectors, matrices, etc. are values at time T = k.
ここで、地磁気の強さrはスカラーであり、地磁気の伏角φはスカラーであり、角速度ωは3次元ベクトルであり、3次元角速度センサ90のオフセット推定値gOFFは3次元ベクトルであり、3次元磁気センサ70のオフセット推定値qOFFは3次元ベクトルである。
また、姿勢μは、クォータニオンを用いて表現される。クォータニオンとは、物体の姿勢(回転状態)を表す4次元数である。例えば、機器座標系ΣSの各軸と、地上座標系ΣGの各軸とが一致する姿勢μを「基準姿勢」と定義し、基準姿勢をμ=(0、0、0、1)と表現する。このとき、携帯機器1の任意の姿勢μは、単位ベクトルρを回転軸とし、単位ベクトルρの示す方向から見て、基準姿勢を角度ψだけ反時計回りに回転した姿勢として表現できる。当該姿勢μは、クォータニオンを用いて、式(2)で表される。
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, a posture μ in which each axis of the device coordinate system Σ S and each axis of the ground coordinate system Σ G coincide is defined as a “reference posture”, and the reference posture is μ = (0, 0, 0, 1). Express. At this time, an arbitrary posture μ of the
また、観測値ベクトルyとは、3次元磁気センサ70から出力される磁気データq、3次元加速度センサ80から出力される加速度データa、及び、3次元角速度センサ90から出力される角速度データgを要素とするベクトルである。時刻T=kにおける観測値ベクトルykは式(3)で与えられる。
各々のカルマンフィルタKFは、非線形カルマンフィルタの演算を実行し、当該カルマンフィルタKFが有する状態ベクトルxの各要素が真値に近づくように状態ベクトルxを周期的に更新することで、システムの状態を表す複数の物理量を推定する。
ここで、「真値」とは、状態ベクトルxkの各要素に対応する実際の物理量を表す値である。また、以下では、状態ベクトルxkの各要素を真値としたベクトルを、「状態ベクトルの真値」と称する。なお、非線形カルマンフィルタの演算の詳細については、後述する。
説明の便宜上、以下では、第m番目のカルマンフィルタKF[m]が有する状態ベクトルxkに、符号[m]を付す場合がある。また、当該第m番目のカルマンフィルタKF[m]が非線形カルマンフィルタの演算で用いる各種行列、ベクトル等についても、符号[m]を付して表現する場合がある。
なお、詳細は後述するが、本実施形態では、各々のカルマンフィルタKFが更新する状態ベクトルxkとは、厳密には、更新後の状態ベクトルx+ kである。
Each Kalman filter KF executes a nonlinear Kalman filter operation and periodically updates the state vector x so that each element of the state vector x of the Kalman filter KF has a true value, thereby representing a plurality of system states. Estimate the physical quantity of.
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.
For convenience of explanation, in the following description, the code [m] may be attached to the state vector x k of the mth Kalman filter KF [m]. Further, various matrices, vectors, and the like used by the m-th Kalman filter KF [m] in the calculation of the nonlinear Kalman filter may be expressed with the symbol [m].
Although details will be described later, in this embodiment, the state vector x k updated by each Kalman filter KF is strictly the updated state vector x + k .
初期値生成部200は、ROM30に格納された設定情報(具体的には、後述する情報Pobj、位置情報と地磁気の強さ及び伏角とを対応づけた情報、等)、GPS部60が出力する位置情報Ps、カメラ110が出力する画像情報Img等に基づいて、互いに異なる4個の初期ベクトルINI[1]〜INI[4]を生成し、これらを出力する。
4個の初期ベクトルINI[1]〜INI[4]は、それぞれ、4個のカルマンフィルタKF[1]〜KF[4]に供給され、各カルマンフィルタKFが非線形カルマンフィルタの演算を実行する際に使用する状態ベクトルxの初期値として採用される。すなわち、初期ベクトルINI[m]は、状態ベクトルxkの初期値、つまり時刻T=0における状態ベクトルx0である。
The initial
The four initial vectors INI [1] to INI [4] are supplied to the four Kalman filters KF [1] to KF [4], respectively, and are used when each Kalman filter KF executes the operation of the nonlinear Kalman filter. Adopted as the initial value of the state vector x. That is, the initial vector INI [m] is the initial value of the state vector x k , that is, the state vector x 0 at time T = 0.
第m番目のカルマンフィルタKF[m]に供給される初期ベクトルINI[m]は、携帯機器1の姿勢μ[m]の初期値μ0[m](初期姿勢推定値)、地磁気の強さr[m]の初期値r0[m]、地磁気の伏角φ[m]の初期値φ0[m]、携帯機器1の角速度ω[m]の初期値ω0[m]、3次元角速度センサ90のオフセット推定値gOFF[m]の初期値gOFF,0[m]、及び3次元磁気センサ70のオフセット推定値qOFF[m]の初期値qOFF,0[m]を要素として含む。この初期ベクトルINI[m]は、以下の式(4)により示される。
なお、初期ベクトルINI[m]の各要素の生成方法については、後述する。
A method for generating each element of the initial vector INI [m] will be described later.
初期値生成部200は、画像処理部210、初期姿勢算出部220、及び、初期ベクトル生成部230を備える。
画像処理部210は、カメラ110の出力する画像情報Imgに基づいて、携帯機器1から見た物体Objの方向を機器座標系ΣSにおいて表した第1方向ベクトルαを算出する。初期姿勢算出部220は、GPS部60が出力する位置情報Ps、ROM30に格納された情報Pobj、及び、画像処理部210の出力する第1方向ベクトルαに基づいて、姿勢μの初期値μ0[1]〜μ0[4](初期姿勢推定値)を算出する。初期ベクトル生成部230は、初期姿勢算出部220が算出する姿勢μの初期値μ0[1]〜μ0[4]と、ROM30に格納された設定情報(具体的には、位置情報と地磁気の強さ及び伏角とを対応づけた情報)と、に基づいて、初期ベクトルINI[1]〜INI[4]を算出する。
The initial
The
出力情報制御部400は、4個のカルマンフィルタKF[1]〜KF[4]からの出力値に基づいて、4個のカルマンフィルタKF[1]〜KF[4]の中で、推定精度が最も高いカルマンフィルタKF[Sel]を選択する。そして出力情報制御部400は、選択したカルマンフィルタKF[Sel]が出力する状態ベクトルxk[Sel]を、出力情報生成部500に対して供給する。
The output
なお、カルマンフィルタKFの推定精度とは、カルマンフィルタKFがシステムの状態をどの程度正確に推定しているかについて表す指標であり、具体的には、状態ベクトルxkの示す値と状態ベクトルの真値との誤差の大きさに基づいた値(誤差評価値)である。そして、カルマンフィルタKFの推定精度が高い状態とは、状態ベクトルxkの示す値と状態ベクトルの真値との誤差が小さい(つまり、誤差評価値が小さい)状態のことを意味する。
状態ベクトルxkの示す値と状態ベクトルの真値との誤差が小さい場合(つまり、状態ベクトルxkの各要素が真値に近い正確な値を示す場合)、当該状態ベクトルxkを有するカルマンフィルタKFは、システムを正確に推定していると看做すことができる。
The estimation accuracy of the Kalman filter KF is an index representing how accurately the Kalman filter KF estimates the state of the system. Specifically, the value indicated by the state vector x k and the true value of the state vector This is a value (error evaluation value) based on the magnitude of the error. Then, the estimation accuracy of the Kalman filter KF is the high state, the error between the true value of the values and the state vector indicating the state vector x k is small (i.e., smaller error evaluation value) means that the state.
When the error between the value indicated by the state vector x k and the true value of the state vector is small (that is, when each element of the state vector x k indicates an accurate value close to the true value), the Kalman filter having the state vector x k KF can be regarded as accurately estimating the system.
出力情報制御部400は、4個のピークモニタPM[1]〜PM[4]、比較部410、及び、選択部420を備える。
第m番目のピークモニタPM[m]は、以下の式(5)に示すように、第m番目のカルマンフィルタKF[m]が出力する観測残差zk[m]を、時刻T=k−τ0から時刻T=kまでの所定期間モニターし、当該期間における観測残差zk[m]のノルムの最大値を、誤差評価値MAXzk[m]として出力する。
As shown in the following equation (5), the mth peak monitor PM [m] uses the observation residual z k [m] output from the mth Kalman filter KF [m] as time T = k−. Monitoring is performed for a predetermined period from τ 0 to time T = k, and the maximum value of the norm of the observation residual z k [m] in the period is output as the error evaluation value MAX z k [m].
なお、本実施形態では、一定期間における観測残差zk[m]のノルムの最大値を誤差評価値MAXzk[m]として採用するが、本発明はこのような形態に限定されるものではなく、観測残差zk[m]を構成する複数の要素のうち、一部の要素から構成されるベクトルのノルムの所定期間における最大値を誤差評価値として採用してもよい。
詳細は後述するが、本実施形態に係る観測残差zk[m]は、磁気データqに対応する要素、加速度データaに対応する要素、及び、角速度データgに対応する要素により構成されるベクトルである(式(52)参照)。この場合、ピークモニタPM[m]は、例えば、観測残差zk[m]を構成する要素のうち、磁気データqに対応する要素について所定期間モニターし、当該要素のノルムの最大値を誤差評価値MAXzk[m]として採用してもよい。
In the present embodiment, the maximum value of the norm of the observation residual z k [m] in a certain period is adopted as the error evaluation value MAX z k [m]. However, the present invention is limited to such a form. Instead, the maximum value in a predetermined period of the norm of a vector composed of some of the plurality of elements constituting the observation residual z k [m] may be adopted as the error evaluation value.
Although details will be described later, the observation residual z k [m] according to the present embodiment is configured by an element corresponding to the magnetic data q, an element corresponding to the acceleration data a, and an element corresponding to the angular velocity data g. Vector (see equation (52)). In this case, the peak monitor PM [m] monitors, for example, elements corresponding to the magnetic data q among elements constituting the observation residual z k [m] for a predetermined period, and sets the maximum norm of the element as an error. it may be used as the evaluation value MAX z k [m].
比較部410は、4個のピークモニタPM[1]〜PM[4]がそれぞれ出力する誤差評価値MAXzk[1]〜MAXzk[4]のうち、最小となる誤差評価値MAXzk[Sel]に対応するカルマンフィルタKF[Sel]を示す選択値Selを出力する(但し、Selは、1≦Sel≦4を満たす自然数)。
前述のとおり、観測残差zは、状態ベクトルxと観測値ベクトルyとを用いて算出される値であり、観測残差zに基づいて、状態ベクトルxの示す値と状態ベクトルの真値との誤差の大きさを表すことができる。しかし、観測値ベクトルyの各要素が示す値は、ノイズ(例えば、各種センサの測定誤差)が重畳した値であり、時刻の経過と共に変動する値である。従って、観測残差zの各要素が示す値も、時刻の経過と共に変動する、ノイズが重畳した値である。
そこで、本実施形態に係る比較部410は、観測残差zk[m]を所定期間モニターし、所定期間における観測残差zk[m]のノルムの最大値を誤差評価値MAXzk[m]として採用し、誤差評価値MAXzk[m]を用いて、状態ベクトルxkの示す値と状態ベクトルの真値との誤差の大きさを評価する。これにより、本実施形態に係る比較部410は、ノイズの影響を低減させて、状態ベクトルxkの示す値と状態ベクトルの真値との誤差の大きさを正確に評価することができる。
The
As described above, the observation residual z is a value calculated using the state vector x and the observation value vector y. Based on the observation residual z, the value indicated by the state vector x, the true value of the state vector, The magnitude of the error can be expressed. However, the value indicated by each element of the observed value vector y is a value on which noise (for example, measurement errors of various sensors) is superimposed, and is a value that varies with the passage of time. Therefore, the value indicated by each element of the observation residual z is also a value superimposed with noise that varies with the passage of time.
Therefore, the
選択部420は、比較部410が出力する選択値Selに基づいて、カルマンフィルタKF[1]〜KF[4]が出力する状態ベクトルxk[1]〜xk[4]から、状態ベクトルxk[Sel]を選択し、これを出力情報生成部500に対して供給する。
Selecting
出力情報生成部500は、出力情報制御部400が出力する状態ベクトルxk[Sel]に基づいて、地磁気Bgの向きや、携帯機器1の姿勢等の出力情報を算出する。
The output
[2. 初期ベクトルの生成]
上述のとおり、各カルマンフィルタKFが実行する非線形カルマンフィルタの演算とは、状態ベクトルxを、観測残差zに基づいて更新する演算である。より具体的には、非線形カルマンフィルタの演算とは、時刻T=k−1における状態ベクトルxk−1と、時刻T=kにおける観測値ベクトルykとに基づいて算出される観測残差zkを用いて、時刻T=kにおける状態ベクトルxkを推定する演算である。すなわち、時刻T=kにおける状態ベクトルxkは、時刻T=k−1における状態ベクトルxk−1に基づいて算出される。換言すれば、状態ベクトルxkは、初期状態(時刻T=0)から時刻T=k−1に至る全ての状態ベクトルx0〜xk−1に基づいて算出される。
非線形カルマンフィルタの演算において、状態ベクトルxkの各要素が、真値から乖離した値に更新された場合、その後、状態ベクトルxkの各要素が真値に近い値に収束するまでに長時間を要することがあり、更には、状態ベクトルxkの各要素が真値とは異なる不正確な値に収束することがある。この場合、状態推定装置はシステムの状態を正確に推定することはできない。従って、状態推定装置がシステムの状態を正確且つ迅速に推定するためには、状態ベクトルxkの初期値(状態ベクトルx0)である初期ベクトルINIの各要素を、真値に近い正確な値に設定することが望ましい。
そこで、本実施形態に係る初期値生成部200は、初期ベクトルINI[1]〜INI[4]のうち少なくとも1つの初期ベクトルINIの各要素が、真値に近い正確な値となるように、初期ベクトルINI[1]〜INI[4]を生成する。これにより、4個のカルマンフィルタKF[1]〜KF[4]のうち少なくとも1つのカルマンフィルタKFにより、システムの状態を正確に推定することが可能となる。
以下では、初期値生成部200における初期ベクトルINI[1]〜INI[4]の生成について詳述する。
[2. Initial vector generation]
As described above, the calculation of the nonlinear Kalman filter executed by each Kalman filter KF is an operation of updating the state vector x based on the observation residual z. More specifically, the calculation of the nonlinear Kalman filter is an observation residual z k calculated based on the state vector x k−1 at time T = k −1 and the observation value vector y k at time T = k. Is used to estimate the state vector x k at time T = k. That is, the state vector x k at time T = k is calculated based on the state vector x k−1 at time T = k−1. In other words, the state vector x k is calculated based on the initial state (time T = 0) at time T = all of the state vector x leading to k-1 0 ~x k-1 .
In the calculation of the nonlinear Kalman filter, when each element of the state vector x k is updated to a value deviating from the true value, it takes a long time until each element of the state vector x k converges to a value close to the true value. In addition, each element of the state vector x k may converge to an inaccurate value different from the true value. In this case, the state estimation device cannot accurately estimate the state of the system. Therefore, in order for the state estimation device to accurately and quickly estimate the state of the system, each element of the initial vector INI, which is the initial value of the state vector x k (state vector x 0 ), is an accurate value close to the true value. It is desirable to set to.
Therefore, the initial
Hereinafter, generation of initial vectors INI [1] to INI [4] in the initial
[2.1. 姿勢の初期値について]
まず、初期ベクトルINI[m]のうち、携帯機器1の姿勢μ[m]の初期値μ0[m]について検討する。
携帯機器1の姿勢μは、当該携帯機器1の利用者による携帯機器1の所持の仕方に依存して決定される。従って、仮に、姿勢μ[m]の初期値μ0[m]を、事前に定められた1つの固定値(例えば、μ0[m]=[0,0,0,1](基準姿勢))に定める場合、初期値μ0[m]は真の姿勢(真値)から最大で180度ずれることになる。初期値μ0[m]が真の姿勢(真値)から大きく乖離し、初期ベクトルINI[m]がシステムの状態を正確に表さない場合、状態推定装置はシステムの状態を正確に推定することはできない。
そこで、本実施形態では、画像情報Imgと位置情報Psとを用いることで、初期値μ0[1]〜μ0[4]のうち少なくとも1つの初期値μ0が真値に近い正確な値となるように、初期値μ0[1]〜μ0[4](初期姿勢推定値)を生成する。
以下において、初期値μ0[1]〜μ0[4]の生成方法を具体的に説明する。
[2.1. Initial posture values]
First, the initial value μ 0 [m] of the attitude μ [m] of the
The posture μ of the
Therefore, in this embodiment, by using the image information Img and the position information Ps, the initial value μ 0 [1] ~μ 0 [ 4] at least one exact value close initial value mu 0 is the true value of the The initial values μ 0 [1] to μ 0 [4] (initial posture estimated values) are generated so that
Hereinafter, detailed explanation of the method of generating the initial value μ 0 [1] ~μ 0 [ 4].
まず、画像処理部210は、カメラ110が物体Objを撮影した際に出力する画像情報Imgに基づいて、第1方向ベクトルαを算出する。
ここで、第1方向ベクトルαとは、機器座標系ΣSにおいて、携帯機器1(厳密には、カメラ110)から見た物体Objの方向を表す3次元の単位ベクトルである。以下では、第1方向ベクトルαの算出方法の詳細について説明する。
First, the
Here, the first direction vector alpha, in the device coordinate system sigma S, the portable device 1 (strictly speaking, the camera 110) is a three-dimensional unit vector representing the direction of the object Obj viewed from. Below, the detail of the calculation method of the 1st direction vector (alpha) is demonstrated.
カメラ110は、例えば、1以上のレンズと、当該1以上のレンズの光軸に垂直な平面である受光平面上にマトリックス状(またはハニカム状)に配列された複数のイメージセンサとを備える。カメラ110は、物体Objが発した光線(または、物体Objが反射した光線)を、レンズを通過させることで、受光平面上の一部の領域に集光させる。次に、カメラ110は、受光平面上の各々の位置の明るさを、複数のイメージセンサを用いて検出する。そして、カメラ110は、複数のイメージセンサの出力値に基づいて画像を構成するとともに、当該画像における物体Objの位置(2次元座標)である画像情報Imgを生成する。
本実施形態において、画像情報Imgの生成は、カメラ110にて行われるが、図3に示す画像処理部210にて行われてもよい。なお、表示部50は、物体Objの映された画像を表示することができる(図2参照)。従って、携帯機器1の利用者が操作部120介して、画像に映された物体Objを指定することで、画像情報Imgを生成してもよい。
The
In the present embodiment, the generation of the image information Img is performed by the
ここで、簡単のために凸レンズを例に挙げて、レンズを通過する光の動きについて説明する。
レンズの一般的な性質として、レンズの中心を通過する光は、レンズの通過後もその方向を変えずに直進する。また、レンズの焦点を通過する光は、レンズを通過後に、レンズの光軸と平行な光となる。他方、レンズの光軸に平行な光は、レンズを通過後に、レンズの焦点を通過する。このようなレンズの光学的性質を利用することで、点光源の発する光をレンズにより1点(像点)に集光させた場合の結像位置に基づいて、レンズから見た当該光の入射方向を算出することができる。
より具体的には、理想的な凸レンズにおいて、レンズの中心を通る光の経路を表す直線と受光平面との交点が像点となるため、レンズの中心を像点から表したベクトルと、当該光の入射方向を表すベクトルとは、平行となる。また、画像情報Imgは、受光平面上の像点の位置であるので、画像情報Imgに基づいて、レンズの中心を像点から表したベクトルを求めることもできる。よって、画像情報Imgに基づいて、当該光の入射方向を求めることが可能となる。
また、レンズの収差を考慮する場合、或いは、カメラ110が複数のレンズを備える場合であっても、受光平面上の像点の位置と、レンズに入射する光の入射方向とは、1対1に対応する。従って、仮に、レンズの中心を像点から表したベクトルと、当該光の入射方向とを表すベクトルとが、平行とならない場合であっても、ROM30或いはRAM20上に、受光平面上の像点の位置(画像情報Img)と、レンズに入射する光の入射方向とを、対応付けて記憶したルックアップテーブルを設けることにより、画像情報Imgに基づいて、レンズの中心から見た当該光の入射方向とを表すベクトルを求めることが可能となる。
なお、画像情報Imgは、受光平面上の像点の位置の他に、レンズの中心と受光平面との間の距離を含むものであってもよい。受光平面上の像点の位置の他に、受光平面とレンズとの距離を画像情報Imgに含ませることで、受光平面をレンズから遠ざける場合或いは近づける場合であっても、画像情報Imgに基づいて、レンズから見た光の入射方向を算出することが可能となる。
このように、物体Objをカメラ110で撮影した際に出力される画像情報Imgに基づいて、カメラ110から見た物体Objの方向を算出することができる。なお、レンズの光軸は、機器座標系ΣSにおいて一定の方向を向く。従って、画像処理部210は、画像情報Imgに基づいて、携帯機器1から見た物体Objの方向、すなわち、機器座標系ΣSにおいて表した第1方向ベクトルαを算出することができる。
Here, for the sake of simplicity, taking a convex lens as an example, the movement of light passing through the lens will be described.
As a general property of a lens, light passing through the center of the lens travels straight without changing its direction after passing through the lens. The light passing through the focal point of the lens becomes light parallel to the optical axis of the lens after passing through the lens. On the other hand, light parallel to the optical axis of the lens passes through the focal point of the lens after passing through the lens. By utilizing the optical properties of such a lens, the incident light seen from the lens is incident on the basis of the imaging position when the light emitted from the point light source is condensed at one point (image point) by the lens. The direction can be calculated.
More specifically, in an ideal convex lens, the intersection of the light receiving plane and the straight line representing the path of light passing through the center of the lens is the image point, so the vector representing the center of the lens from the image point and the light The vector representing the incident direction is parallel. Further, since the image information Img is the position of the image point on the light receiving plane, a vector representing the center of the lens from the image point can be obtained based on the image information Img. Therefore, the incident direction of the light can be obtained based on the image information Img.
Further, even when the lens aberration is taken into account, or even when the
Note that the image information Img may include the distance between the center of the lens and the light receiving plane in addition to the position of the image point on the light receiving plane. In addition to the position of the image point on the light receiving plane, the distance between the light receiving plane and the lens is included in the image information Img, so that even if the light receiving plane is moved away from or closer to the lens, it is based on the image information Img. The incident direction of light viewed from the lens can be calculated.
In this manner, the direction of the object Obj viewed from the
図3に示すように、初期姿勢算出部220は、撮影対象情報取得部221と、姿勢計算部222とを備える。撮影対象情報取得部221は、GPS部60が出力する位置情報Psと、地上座標系ΣGにおける物体Objの座標と、に基づいて第2方向ベクトルβを算出する。姿勢計算部222は、第1方向ベクトルα及び第2方向ベクトルβに基づいて、携帯機器1の姿勢μの初期値μ0[1]〜μ0[4]を算出する。
ここで、第2方向ベクトルβとは、地上座標系ΣGにおいて、携帯機器1から見た物体Objの方向を表す3次元の単位ベクトルである。
As shown in FIG. 3, the initial
Here, the second direction vector beta, in ground coordinate system sigma G, a three-dimensional unit vector representing the direction of the object Obj viewed from the
なお、本実施形態では、物体Objは、地上座標系ΣGにおける座標が既知のランドマークである。ここで、ランドマークとは、日本各地(或いは世界各地)に存在する建造物、日本各地(或いは世界各地)に存在する地形等である。なお、ランドマークは、建造物等に備え付けられた光源であってもよい。
ROM30には、物体Objの候補となり得る複数のランドマークの各々についての情報Pobjを記憶したルックアップテーブルLUT1が格納される。ここで、情報Pobjの具体的な内容は、各ランドマークの位置を特定するための、経度、緯度、高度等の情報である。なお、情報Pobjは、各ランドマークの形状に関する情報を含んでもよい。また、本実施形態は、情報Pobjを、ROM30に格納されたルックアップテーブルLUT1に記憶するが、情報Pobjを、携帯機器1の外部から通信部40を介して都度取得し、これをRAM20に格納してもよい。
撮影対象情報取得部221は、ルックアップテーブルLUT1を参照して、カメラ110が撮影した物体Objについての情報Pobjを取得する。そして、撮影対象情報取得部221は、情報Pobjに基づいて、地上座標系ΣGにおける当該物体Objの座標を算出するとともに、携帯機器1の位置情報Psに基づいて、地上座標系ΣGにおける携帯機器1の座標を算出する。その後、撮影対象情報取得部221は、地上座標系ΣGにおける当該物体Objの座標から、地上座標系ΣGにおける携帯機器1の座標を減算することにより、第2方向ベクトルβを算出する。
なお、本実施形態において、位置情報Psには、携帯機器1の緯度及び経度が含まれるが、位置情報Psが、携帯機器1の高度を含むものであってもよい。この場合、第2方向ベクトルβをより正確に算出することが可能となる。
In the present embodiment, the object Obj is coordinates in ground coordinate system sigma G is a known landmark. Here, the landmark is a building that exists in various parts of Japan (or around the world), or a landform that exists in various parts of Japan (or around the world). The landmark may be a light source provided in a building or the like.
The
The imaging target
In the present embodiment, the position information Ps includes the latitude and longitude of the
本実施形態では、携帯機器1の利用者が、複数のランドマークから、実際にカメラ110が撮影する物体Objを選択する。
但し、本発明はこのような態様に限定されるものではなく、撮影対象情報取得部221が、位置情報Psと情報Pobjとに基づいて、実際にカメラ110が撮影した物体Objを特定してもよい。
また、CPU10が状態推定プログラム100を実行する際、CPU10は、位置情報Psと情報Pobjとに基づいて、複数のランドマークの中から携帯機器1の利用者が撮影可能な物体Obj(例えば、携帯機器1の近傍に存在するランドマーク)を選択し、当該物体Objを撮影するように促すメッセージを、表示部50に表示してもよい。この場合、CPU10は、位置情報Psと情報Pobjとに基づいて、利用者から見た物体Objの方角を算出し、これを表示部50に表示するものであってもよい。
In the present embodiment, the user of the
However, the present invention is not limited to such an embodiment, and the imaging target
Further, when the
次に、姿勢計算部222は、第1方向ベクトルα及び第2方向ベクトルβに基づいて、携帯機器1の姿勢μの初期値μ0[1]〜μ0[4]を算出する。
以下では、第1方向ベクトルα及び第2方向ベクトルβに基づいて、初期値μ0[1]〜μ0[4]を生成する方法について、具体的に説明する。
Next, the
Hereinafter, a method for generating the initial values μ 0 [1] to μ 0 [4] based on the first direction vector α and the second direction vector β will be specifically described.
段落[0032]において記したとおり、物体の任意の姿勢は、単位ベクトルρを回転軸として、基準姿勢を角度ψだけ回転した姿勢として表現できる。また、単位ベクトルρを回転軸とし、単位ベクトルρの示す方向から見て角度ψだけ反時計回りに回転させる3行3列の回転行列R(ρ,ψ)は、以下の式(6)で表される(ロドリゲスの公式)。従って、物体の任意の姿勢は、クォータニオンの代わりに、回転行列R(ρ,ψ)を用いて表現することもできる。ここで、式(6)に現れる[ρ×]は3行3列の行列であり、単位ベクトルρを式(7)で表した場合、[ρ×]は式(8)により表される。
なお、携帯機器1の姿勢が基準姿勢であるとき、機器座標系ΣSと地上座標系ΣGとが一致する一方、携帯機器1の姿勢が回転行列R(ρ,ψ)で表される場合には、機器座標系ΣSと地上座標系ΣGとの関係も、回転行列R(ρ,ψ)により表現される。具体的には、携帯機器1の姿勢を回転行列R(ρ,ψ)で表した場合、回転行列R(ρ,ψ)は、地上座標系ΣGのx軸、y軸、及びz軸を機器座標系ΣSから表した3つの単位ベクトルを、それぞれ、第1列、第2列、第3列に並べた行列となる。
When the posture of the
以下では、携帯機器1の姿勢を回転行列により表現する場合、「姿勢A」等のように符号「A」を用いる。
ここで、式(9)に示すような、単位ベクトルρCを回転軸として基準姿勢を単位ベクトルρCの示す方向から見て反時計回りに角度ψCだけ回転する回転行列R(ρC,ψC)によって表現される姿勢を、姿勢AC(初期姿勢候補値)とする。そして、携帯機器1の姿勢がACのときに、第1方向ベクトルα及び第2方向ベクトルβが算出されたと仮定する。
この場合、単位ベクトルρCは、第1方向ベクトルα及び第2方向ベクトルβを用いて、式(10)で表される。また、角度ψCは、第1方向ベクトルα及び第2方向ベクトルβを用いて、式(11)で表される。
Here, as shown in Expression (9), a rotation matrix R (ρ C , C) that rotates the reference posture counterclockwise by an angle ψ C when viewed from the direction indicated by the unit vector ρ C with the unit vector ρ C as a rotation axis. Let the posture represented by (ψ C ) be the posture A C (initial posture candidate value). Then, it is assumed that the orientation of the
In this case, the unit vector ρ C is expressed by Expression (10) using the first direction vector α and the second direction vector β. The angle [psi C, using the first direction vector α and the second direction vector beta, represented by the formula (11).
上述のとおり、回転行列R(ρ,ψ)は、機器座標系ΣSにおいて、地上座標系ΣGの3軸を表す3つの単位ベクトルを各列に並べた行列である。従って、回転行列R(ρ,ψ)は、地上座標系ΣGにおいて表現された任意の3次元ベクトルを、機器座標系ΣSにおいて表現するための座標変換行列という性質も有する。
よって、以下の式(12)に示すように、地上座標系ΣGにおいて表した第2方向ベクトルβを、回転行列R(ρ,ψ)によって変換することにより、携帯機器1から見た物体Objの方向、すなわち、機器座標系ΣSにおいて表した第1方向ベクトルαを算出することができる。
Therefore, as shown in the following equation (12), the second direction vector β expressed in ground coordinate system sigma G, by converting the rotation matrix R ([rho, [psi), the object viewed from the
ところで、第1方向ベクトルα及び第2方向ベクトルβが算出された場合であっても、携帯機器1の姿勢を一意に特定することはできない。すなわち、式(9)〜式(11)により、第1方向ベクトルα及び第2方向ベクトルβに基づいて姿勢ACを算出しても、当該姿勢ACは、携帯機器1の姿勢を正確に表さない可能性が高い。
図4(A)は、携帯機器1と物体Objとの位置関係を表す概念図である。なお、図4(A)では、便宜上、地上座標系ΣGの原点と、機器座標系ΣS(機器座標系ΣS1、機器座標系ΣS2)の原点とが一致するように、地上座標系ΣG及び機器座標系ΣSが設けられる場合を想定する。
図4(A)に示すように、携帯機器1の姿勢がAC1である場合に、携帯機器1と物体Objとを結ぶ直線AXを軸として、当該機器を任意の角度θだけ回転させた姿勢をAC2とする。このとき、姿勢AC1の携帯機器1に固定された機器座標系ΣS1から見た物体Objの方向と、姿勢AC2の携帯機器1に固定された機器座標系ΣS2から見た物体Objの方向とは、一致する。すなわち、携帯機器1の姿勢がAC1である場合に算出される第1方向ベクトルαと、携帯機器1の姿勢がAC2である場合に算出される第1方向ベクトルαとは、等しい。
また、第2方向ベクトルβは、地上座標系ΣGにおいて表されるベクトルである。よって、携帯機器1の姿勢が変化しても、携帯機器1の位置(位置情報Ps)が変化しない限りは、第2方向ベクトルβは一定である。すなわち、携帯機器1の姿勢がAC1である場合に算出される第2方向ベクトルβと、携帯機器1の姿勢がAC2である場合に算出される第2方向ベクトルβとは、等しい。
この場合、仮に、第1方向ベクトルα及び第2方向ベクトルβに基づいて姿勢AC1が算出された場合であっても、携帯機器1の真の姿勢は姿勢AC2かもしれない。すなわち、携帯機器1の姿勢がAC1のときに式(12)が成立すれば、携帯機器1の姿勢がAC2のときにも式(12)が成立する。
By the way, even if the first direction vector α and the second direction vector β are calculated, the posture of the
FIG. 4A is a conceptual diagram illustrating the positional relationship between the
As shown in FIG. 4 (A), when the orientation of the
Further, the second direction vector beta, is a vector represented in ground coordinate system sigma G. Therefore, even if the attitude of the
In this case, even if the posture A C1 is calculated based on the first direction vector α and the second direction vector β, the true posture of the
ここで、図4(B)に示すように、第2方向ベクトルβ(直線AX)を軸として任意の角度θだけ回転させる回転行列R(β,θ)を用いて姿勢ACの携帯機器1を回転させることを検討する。
上述のとおり、携帯機器1の姿勢がACのときに式(12)が成立する場合、姿勢ACの携帯機器1を回転行列R(β,θ)により回転させた場合にも式(12)が成立する。すなわち、式(12)が成立する場合には、以下の式(13)も同時に成立する。
ここで、式(14)に示すように、姿勢ACの携帯機器1を回転行列R(β,θ)により回転させた姿勢を「A」とする。この場合、式(15)に示すように、姿勢Aは、第1方向ベクトルα及び第2方向ベクトルβが算出された場合の、携帯機器1の姿勢の一般解を表す。
As described above, when the posture of the
Here, as shown in equation (14), the
本実施形態に係る姿勢計算部222は、図4(B)に示すように、直線AX(第2方向ベクトルβ)を軸として、姿勢ACを(π/2)ずつ回転させることにより、姿勢A[1]〜A[4]を生成する。具体的には、式(16)に示すように、角度θを「0」に設定したときの姿勢をA[1]とする。姿勢A[1]と、姿勢ACとは等しい。次に、式(17)〜式(19)に示すように、角度θを、「π/2」、「π」、「(3π)/2」にそれぞれ設定して、3つの姿勢A[2]、A[3]、A[4]を生成する。
そして、姿勢計算部222は、行列で表された姿勢A[1]〜A[4]を、クォータニオンに変換することで、初期値μ0[1]〜μ0[4]を生成する。
Then, the
なお、3行3列の行列で表される姿勢Aから、クォータニオンで表される姿勢μへの変換は、公知の方法を適宜用いて行えば良い。
ここで、携帯機器1が姿勢μである場合に、地上座標系ΣGにおいて表現されたベクトルを、機器座標系ΣSで表現するための座標変換を行う行列B(μ)は、以下の式(20)で表すことができる。行列Aは、行列B(μ)の逆行列であるので、行列Aの各成分と行列B(μ)の逆行列の各成分とを比較することで、クォータニオンを用いて表される姿勢μの各要素を計算してもよい。また、例えば、以下の公知文献に記載された方法を用いて、行列Aから姿勢μを算出することもできる。
Malcolm D. Shuster and Gregory A. Natanson, “Quaternion Computation from a Geometric Point of View", The Journal of the Astronautical Sciences, Vol. 41, No. 4, October-December 1993, pp. 545-556.
Here, when the
Malcolm D. Shuster and Gregory A. Natanson, “Quaternion Computation from a Geometric Point of View”, The Journal of the Astronautical Sciences, Vol. 41, No. 4, October-December 1993, pp. 545-556.
以上のように、本実施形態に係る初期姿勢算出部220は、画像情報Imgと位置情報Psとを用いて、少なくとも1つが真値に近い値を示す初期値μ0[1]〜μ0[4]を生成することができる。
As described above, the initial
[2.2. 姿勢の初期値以外の値について]
地磁気の強さr[m]の初期値r0[m]、及び地磁気の伏角φ[m]の初期値φ0[m]は、例えば、GPS部60から供給される位置情報Psに基づいて生成することができる。これは、地球上の位置が特定できれば、その位置における地磁気の強さ及び伏角を知ることができるからである。具体的には、ROM30には、位置情報と地磁気の強さ及び伏角とを対応づけて記憶したルックアップテーブルLUT2が格納される。初期値生成部200は、ルックアップテーブルLUT2を参照して、位置情報Psに対応する地磁気の強さ及び伏角を、地磁気の強さr[m]の初期値r0[m]及び地磁気の伏角φ[m]の初期値φ0[m]として設定する。
[2.2. Regarding values other than the initial posture values]
The initial value r 0 [m] of the geomagnetic strength r [m] and the initial value φ 0 [m] of the geomagnetic depression angle φ [m] are based on, for example, the position information Ps supplied from the
角速度ω[m]の初期値ω0[m]は、例えば、携帯機器1が静止していることを仮定して、「0」に設定する。また、3次元角速度センサ90のオフセット推定値gOFF[m]の初期値gOFF,0[m]は、通常「0」近辺に調整されているため、「0」に設定する。
The initial value ω 0 [m] of the angular velocity ω [m] is set to “0” on the assumption that the
3次元磁気センサ70のオフセット推定値qOFF[m]の初期値qOFF,0[m]は、時刻T=0に3次元磁気センサ70から出力される磁気データq0、地上座標系ΣGにおいて地磁気Bgを表したベクトルGBg[m]、姿勢μ[m]の初期値μ0[m]、及び、式(20)に示した行列B(μ)を用いて、以下に示す式(21)により算出される。なお、時刻T=0における地磁気Bgを地上座標系ΣGから表したベクトルGBg[m]は、地磁気の強さr[m]の初期値r0[m]と、地磁気の伏角φ[m]の初期値φ0[m]とを用いて、以下の式(22)で表される。
このように、初期値生成部200は、真値に近い値を示すものが少なくとも1個は含まれるように、互いに異なる4個の初期ベクトルINI[1]〜INI[4]を生成する。そして、カルマンフィルタ演算部300は、4個の初期ベクトルINI[1]〜INI[4]がそれぞれ供給される4個のカルマンフィルタKF[1]〜KF[4]を並列動作させる。
この場合、時刻T=0における状態ベクトルの真値に近い値を示す初期ベクトルINIが供給されて動作するカルマンフィルタKFは、システムの状態を正確に推定することが可能となる。
In this way, the initial
In this case, the Kalman filter KF which operates by being supplied with the initial vector INI indicating a value close to the true value of the state vector at time T = 0 can accurately estimate the state of the system.
[3. 非線形カルマンフィルタによる演算について]
次に、カルマンフィルタKFが行う非線形カルマンフィルタの演算について説明する。
[3. Calculation using nonlinear Kalman filter]
Next, the calculation of the nonlinear Kalman filter performed by the Kalman filter KF will be described.
一般的にカルマンフィルタは、動的システムの状態の経時的な変化を表す状態遷移モデルを用いて、ある時刻(時刻T=k−1)のシステムの状態を示す状態ベクトルx+ k−1から単位時間が経過した後(時刻T=k)の状態ベクトルxkを推定する。この推定値を、推定状態ベクトルx− kと称する。
そして、カルマンフィルタは、各種センサからの出力を要素とする観測値ベクトルykと状態ベクトルxkとの関係を表す観測モデルを用いて、推定状態ベクトルx− kから観測値ベクトルykを推定する。この推定値を、推定観測値ベクトルy− kと称する。
次に、カルマンフィルタは、推定観測値ベクトルy− kと、実際の観測値を要素とする観測値ベクトルykとの差分を観測残差zkとして算出し、観測残差zkに基づいてカルマンゲインKkを算出する。さらに、カルマンフィルタは、観測残差zk、カルマンゲインKk、及び、推定状態ベクトルx− kを用いて、状態ベクトルx+ k−1を更新することにより、更新後の状態ベクトルx+ kを算出する。
以上のような状態ベクトルxkの更新を繰り返すカルマンフィルタの演算により、状態ベクトルxkの各要素を実際の物理量を正確に表した値(真値)に近い正確な値へと近付ける。
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を状態遷移モデルに適用することで、単位時間経過後の複数のシグマポイントを推定する。この推定された複数のシグマポイントを、推定シグマポイントχ− kと称する。次に、シグマポイントカルマンフィルタは、複数の推定シグマポイントχ− kの平均を算出することにより、推定状態ベクトルx− kを求める。
従って、シグマポイントカルマンフィルタを用いてカルマンフィルタの演算を実行する場合、推定観測値ベクトルy− kは、厳密には、推定状態ベクトルx− kの周辺に存在する複数の推定シグマポイントχ− kに基づいて算出される。
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.
本実施形態における、非線形カルマンフィルタの状態遷移モデルは以下に示す式(23)で与えられ、観測モデルは以下に示す式(24)で与えられる。なお、本実施形態では、式(23)に現れる状態方程式f、および、式(24)に現れる観測方程式hは、非線形の方程式である。
以下では、状態ベクトルxkの次元を「dim(x)」と表し、観測値ベクトルykの次元を「dim(y)」と表す。本実施形態では、dim(x)=15であり、dim(y)=9である。また、式(23)に現れるプロセスノイズwk及び式(24)に現れる観測ノイズukは「0」を中心とするガウスノイズである。
式(23)は、時刻T=kにおける状態ベクトルxkが、時刻T=k−1における状態ベクトルxk−1を状態方程式fに代入して得られた値と、時刻T=k−1におけるプロセスノイズwk−1とを加算することにより推定されることを示している。
また、式(24)は、時刻T=kにおける観測値ベクトルykが、時刻T=kにおける状態ベクトルxkを観測方程式hに代入して得られる値と、時刻T=kにおける観測ノイズukとを加算することにより推定されることを示している。
なお、プロセスノイズwkの共分散をQk、観測ノイズukの共分散をUkと表す。
Hereinafter, the dimension of the state vector x k is represented as “dim (x)”, and the dimension of the observation vector y k is represented as “dim (y)”. In the present embodiment, dim (x) = 15 and dim (y) = 9. Further, the process noise w k appearing in the equation (23) and the observation noise u k appearing in the equation (24) are Gaussian noises centered on “0”.
Equation (23) 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.
Further, the expression (24) indicates 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 u 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 the observation noise u k and U k.
時刻T=kにおける観測残差zkは、実際の観測値ベクトルykと、推定観測値ベクトルy− kとに基づいて定められるベクトルであり、以下に示す式(25)で表される。カルマンフィルタは、以下の式(27)に示すように、観測残差zk、推定状態ベクトルx− k、及び、式(26)に示すカルマンゲインKkを用いて、更新後の状態ベクトルx+ kを算出する。また、カルマンフィルタは、以下の式(28)に示すように、状態ベクトルxkの推定誤差の共分散Pkを更新する。
ここで、P− kは、推定状態ベクトルx− kの推定誤差の共分散であり、P+ kは、更新後の状態ベクトルx+ kの推定誤差の共分散である。また、Pyy kは、観測残差zkの共分散であり、Pxy kは、推定状態ベクトルx− kと、推定観測値ベクトルy− kとの相互共分散行列である。
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 .
なお、推定観測値ベクトルy− kは、推定状態ベクトルx− k(厳密には、推定シグマポイントχ− k)を、式(24)に示す観測モデルに適用することで算出される値である。よって、推定観測値ベクトルy− kと実際のセンサ出力に基づく観測値ベクトルykとの差分である観測残差zkは、推定状態ベクトルx− kと実際の物理量を正確に表した値(真値)との近似度を示す値である。
従って、式(27)に示すように、観測残差zkを用いて、推定状態ベクトルx− kを、更新後の状態ベクトルx+ kへと更新することにより、状態ベクトルxkの各要素を真値に近い値へと近付けることができる。
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 (24). . 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 (27), each element of the state vector x k is updated by updating the estimated state vector x − k to the updated state vector x + k using the observation residual z k. Can be brought closer to the true value.
本実施形態に係るカルマンフィルタKFは、アンセンテッド変換を用いたシグマポイントカルマンフィルタを用いて、非線形カルマンフィルタの演算を実行する。
図5は、カルマンフィルタKF[m]の動作を説明するための機能ブロック図である。図5に示すように、遅延部310は、加算器390から出力される更新後の状態ベクトルx+ kを、単位時間(時刻T=k−1から時刻T=kに相当する時間)だけ遅延させることで、状態ベクトルx+ k−1を生成し、これを、シグマポイント生成部320に対して出力する。なお、初回の演算(時刻T=0における演算)では、遅延部310は、初期値生成部200が出力する初期ベクトルINI[m]を、状態ベクトルx+ k−1に適用する。
The Kalman filter KF according to the present embodiment performs a nonlinear Kalman filter operation using a sigma point Kalman filter using unscented transformation.
FIG. 5 is a functional block diagram for explaining the operation of the Kalman filter KF [m]. As illustrated in FIG. 5, the
次に、シグマポイント生成部320は、「dim(x)」行「dim(x)」列の共分散行列P+ k−1及びQk−1を用いて、「2dim(x)+1」個のシグマポイントを生成する。
具体的には、まず、複数のシグマポイントの平均に対して、平均のまわりのシグマポイントの広がりを表すスケーリングパラメータλを用いて、式(29)及び式(30)に示すベクトルσk(1)〜σk(2dim(x))を定義する。
Specifically, first, with respect to the average of a plurality of sigma points, a vector σ k (1) shown in Expressions (29) and (30) is used by using a scaling parameter λ representing the spread of sigma points around the average. ) To σ k (2dim (x)).
このとき、シグマポイント生成部320は、ベクトルσk−1と状態ベクトルx+ k−1とに基づいて、式(31)及び式(32)で示される「2dim(x)+1」個のシグマポイントχ+ k−1(0)〜χ+ k−1(2dim(x))を生成する。
状態遷移演算部330は、式(33)に示すように、時刻T=k−1における「2dim(x)+1」個のシグマポイントχ+ k−1(0)〜χ+ k−1(2dim(x))の各々を、状態方程式fに適用することにより、時刻T=kにおける「2dim(x)+1」個の推定シグマポイントχ− k(0)〜χ− k(2dim(x))を算出する。
次に、推定状態ベクトル算出部340は、式(34)に示すように、時刻T=kにおける「2dim(x)+1」個の推定シグマポイントχ− k(0)〜χ− k(2dim(x))の平均値を計算することで、推定状態ベクトルx− kを算出する。
また、推定状態ベクトル算出部340は、式(35)に示すように、推定状態ベクトルx− kの推定誤差の共分散P− kを算出する。ここで、ベクトルξjは、以下の式(36)に示す、推定シグマポイントχ− k(j)と推定状態ベクトルx− kとの差分を表すベクトルである。
このように、シグマポイント生成部320、状態遷移演算部330、及び、推定状態ベクトル算出部340は、状態ベクトルx+ k−1を状態遷移モデルに適用することで推定状態ベクトルx− kを算出する、状態遷移モデル部710として機能する。
As described above, the sigma
一方、推定観測値算出部350は、式(37)に示すように、時刻T=kにおける「2dim(x)+1」個の推定シグマポイントχ− k(0)〜χ− k(2dim(x))の各々を、観測方程式hに適用することにより、「2dim(x)+1」個の推定観測値γk(0)〜γk(2dim(x))を算出する。
そして、推定観測値ベクトル算出部360は、式(38)に示すように、「2dim(x)+1」個の推定観測値γk(0)〜γk(2dim(x))の平均を演算することにより、推定観測値ベクトルy− kを算出する。
また、推定観測値ベクトル算出部360は、式(39)に示すように、観測残差の共分散Pyy kを算出する。ここで、ベクトルζjは、以下の式(40)に示すように、推定観測値γk(j)と推定観測値ベクトルy− kとの差分を表すベクトルである。
このように、推定観測値算出部350、及び、推定観測値ベクトル算出部360は、推定シグマポイントχ− k(0)〜χ− k(2dim(x))の各々を観測モデルに適用することで推定観測値ベクトルy− kを算出する観測モデル部720として機能する。
Thus, the estimated observation
減算器370は、式(25)に示したように、観測値ベクトルykと、推定観測値ベクトルy− kとの差分として、観測残差zkを算出する。
カルマンゲイン付与部380は、式(41)に示すように、相互共分散行列Pxy kを算出する。そして、カルマンゲイン付与部380は、式(26)に示したように、観測残差の共分散Pyy kと、相互共分散行列Pxy kとに基づいて、カルマンゲインKkを算出し、式(27)の右辺第2項(Kkzk)の演算を実行する。
The Kalman
加算器390は、式(27)に示したように、推定状態ベクトルx− kと、カルマンゲイン付与部380から出力される式(27)の右辺第2項(Kkzk)とを加算することにより、更新後の状態ベクトルx+ kを算出する。また、加算器390は、式(28)に示したように、状態ベクトルxkの推定誤差の共分散Pkを、P− kからP+ kに更新する。
The
このように、減算器370、カルマンゲイン付与部380、及び、加算器390は、観測残差zk、カルマンゲインKk、及び、推定状態ベクトルx− kを用いて、状態ベクトルx+ k−1を更新した更新後の状態ベクトルx+ kを算出する更新部730として機能する。
As described above, the
次に、状態遷移モデル部710において用いられる状態遷移モデルのうち、状態遷移演算部330における演算で用いられる状態方程式fについて説明する。
Next, of the state transition models used in the state transition model unit 710, the state equation f used in the calculation in the state
まず、状態方程式fのうち、時刻T=k−1における姿勢μ+ k−1から、単位時間経過後の時刻T=kにおける姿勢μ− kを推定する演算は、以下に示す式(42)として表される。ここで、μ− kは、時刻kにおける推定状態ベクトルx− kのうち、姿勢μを表す状態変数に対応する要素である。
なお、式(42)の右辺の演算子Ωは、式(43)により定義される。ここで、I3×3は3行3列の単位行列を表す。3次元ベクトルl=(l1,l2,l3)に対して、演算子[l×]は、式(44)で定義される。また、単位時間(時刻T=k−1から時刻T=kまでの測定時間間隔)をΔtで表し、時刻T=kにおける更新後の状態ベクトルx+ kのうち角速度を表す状態変数に対応する要素をω+ kで表したとき、演算子Ωを構成する成分Ψ+ kは、式(45)で定義される。
The operator Ω on the right side of the equation (42) is defined by the equation (43). 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 (44). 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 (45).
姿勢μは、クォータニオンで表現され、式(2)に示すように、正規化条件||μ||=1を満たす必要がある。しかし、シグマポイントカルマンフィルタを用いて状態ベクトルxkを更新する場合、更新後の状態ベクトルx+ kは、式(34)に示すように、推定シグマポイントχ− k(j)の平均として算出される推定状態ベクトルx− kに基づいて定められるため、(更新前の)状態ベクトルx+ k−1のノルムと、更新後の状態ベクトルx+ kのノルムとは、異なる値となることがある。従って、シグマポイントカルマンフィルタの演算を行う場合、(更新前の)状態ベクトルx+ k−1の要素である姿勢μ+ k−1のノルムと、更新後の状態ベクトルx+ kの要素である姿勢μ+ kのノルムとは、異なる値となる可能性が存在する。つまり、シグマポイントカルマンフィルタの演算を行う場合、姿勢μについての正規化条件が満たされなくなる可能性が存在する。
そこで、姿勢μに対して何らかの演算が行われるときには、演算後の結果をそのベクトル自身の大きさで正規化する。
なお、より厳密に正規化条件を保つためには、状態ベクトルxkを構成する要素のうち姿勢μkについては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 the equation (34). 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における地磁気の強さrk及び伏角φkと、時刻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
携帯機器1の角速度ωは、携帯機器1の利用者による携帯機器1の動かし方に依存して変化するため、時刻T=k−1の角速度ωk−1を用いて、時刻T=kにおける角速度ωkを定式化することは難しい。そこで、本実施形態に係る状態遷移モデルでは、便宜上、時刻T=kにおける角速度ωkと、時刻T=k−1における角速度ωk−1とは等しいと仮定する。
Since the angular velocity ω of the
前述のとおり、3次元磁気センサ70のオフセットは、携帯機器1の部品が発する内部磁界Biの方向及び大きさを機器座標系ΣSにおいて表現したベクトルである。従って、携帯機器1の内部状態が一定である間は、3次元磁気センサ70のオフセットも変化しない。一方、携帯機器1の内部状態が変化した場合、例えば、携帯機器1に搭載された部品を流れる電流の大きさが変化した場合や、携帯機器1に搭載された部品の着磁状況が変化した場合には、3次元磁気センサ70のオフセットも変化する。すなわち、携帯機器1の内部状態は、携帯機器1の利用者による携帯機器1の操作や、携帯機器1の外部の環境等に依存して変化する。従って、3次元磁気センサ70のオフセットが変化するタイミングや3次元磁気センサ70のオフセットの変化量を予測することは困難であり、時刻T=k−1における3次元磁気センサ70のオフセット推定値qOFF,K−1を用いて、時刻T=kにおける3次元磁気センサ70のオフセット推定値qOFF,Kを定式化することは難しい。
そこで、本実施形態に係る状態遷移モデルでは、便宜上、時刻T=kにおける3次元磁気センサ70のオフセット推定値qOFF,Kと、時刻T=k−1における3次元磁気センサ70のオフセット推定値qOFF,K−1とは等しいと仮定する。
As described above, the offset of the three-dimensional
Therefore, in the state transition model according to this embodiment, for convenience, the estimated offset value q OFF, K of the three-dimensional
このように、本実施形態に係る状態遷移モデルにおける状態方程式fは、以下に示す式(46)のように、状態ベクトルxkを構成する複数の状態変数のうち、姿勢μkを表す状態変数以外は、前の時刻から変化しないことを表す方程式として、定式化される。
このように、状態ベクトルxkを、状態方程式fに適用した場合、状態ベクトルxkのうち、姿勢μk以外の各要素の示す値は変化しない。
しかし、状態ベクトルxkのうち姿勢μk以外の各要素は、加算器390において、観測残差zkに基づいて真値に近づくように更新される。つまり、式(27)に示すように、状態ベクトルxkの各要素は、状態遷移モデルにより算出される推定状態ベクトルx− kと、複数のセンサからの出力値(観測値ベクトルyk)を用いて算出される観測残差zkとの双方に基づいて、真値に近づくように更新される。
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
次に、観測モデル部720において用いられる観測モデルのうち、推定観測値算出部350における演算で用いられる観測方程式hについて説明する。
Next, among the observation models used in the
3次元角速度センサ90から出力される角速度データgの推定値γgyroは、角速度ωと、角速度センサのオフセット推定値gOFFとを用いて、式(47)で与えられる。
また、地上座標系ΣGにおいて地磁気Bgを表すベクトルGBgは式(48)で与えられる。従って、3次元磁気センサ70から出力される磁気データqの推定値γmagは、磁気センサのオフセット推定値qOFFと、式(20)で示した行列B(μ)とを用いて、式(49)で与えられる。
また、観測モデルにおいて、3次元加速度センサ80から出力される加速度データaの推定値γaccは、式(20)で示した行列B(μ)と、ベクトルGGRVとを用いて、式(50)で与えられる。なお、ベクトルGGRVは、以下の式(51)に示すように、地上座標系ΣGにおいて重力加速度を表したベクトルを、重力加速度の大きさで正規化した3次元のベクトルである。
このように、本実施形態に係る観測モデルにおける観測方程式hは、式(47)、式(49)、及び式(50)により定式化される。
そして、式(3)を式(25)の右辺第1項に代入し、式(47)、式(49)、及び式(50)を用いて式(25)の右辺第2項を表すことにより、式(25)を、以下の式(52)に変形することができる。このとき、観測残差zkは、式(52)により算出される。
Then, substituting Equation (3) into the first term on the right side of Equation (25) and expressing the second term on the right side of Equation (25) using Equation (47), Equation (49), and Equation (50). Thus, the equation (25) can be transformed into the following equation (52). At this time, the observation residual z k is calculated by the equation (52).
[4. 結論]
初期ベクトルINIの各要素を、事前に定めた所定の値とした場合、姿勢μの初期値μ0は、姿勢μの初期値μ0以外の要素(例えば、地磁気の強さrの初期値r0や、地磁気の伏角φの初期値φ0等)に比べて、真値から大きく乖離した値となる可能性が高い。例えば、上述のとおり、初期値μ0を、事前に定められた1つの固定値に定める場合、初期値μ0は真の姿勢(真値)から最大で180度ずれることになる。この場合、状態推定装置は、システムの状態を正しく推定することができない。
これに対して、本実施形態に係る状態推定装置は、画像情報Imgと位置情報Psとを用いて、姿勢μの初期値μ0[1]〜μ0[4]を生成するため、初期値μ0[1]〜μ0[4]のうち少なくとも1つの初期値μ0[Sel]を真値に近い値とすることが可能となる。
真値に近い初期値μ0[Sel]が供給されるカルマンフィルタKF[Sel]は、システムの状態を正確に推定することができる。すなわち、カルマンフィルタKF[Sel]が出力する状態ベクトルxk[Sel]の各要素は、真値に近い正確な値となる。そして、出力情報制御部400は、カルマンフィルタKF[1]〜KF[4]が出力する状態ベクトルxk[1]〜xk[4]から、状態ベクトルxk[Sel]を選択し、これを出力情報生成部500に供給する。この場合、出力情報生成部500は、地磁気Bg、携帯機器1の姿勢等を正確に表す出力情報を生成することができる。
このように、本実施形態に係る状態推定装置は、システムの状態を正確に推定することができる。
[4. Conclusion]
Each element of the initial vector INI, when a predetermined value set in advance, the posture initial value mu 0 of mu, the initial value mu 0 other elements of attitude mu (e.g., initial value r geomagnetic strength r 0 and, in comparison with the initial value phi 0, etc.) of the geomagnetic dip phi, it is likely to be a large discrepancy value from the true value. For example, as described above, when the initial value μ 0 is set to one predetermined fixed value, the initial value μ 0 is shifted by 180 degrees from the true posture (true value) at the maximum. In this case, the state estimation device cannot correctly estimate the state of the system.
On the other hand, the state estimation device according to the present embodiment generates the initial values μ 0 [1] to μ 0 [4] of the posture μ using the image information Img and the position information Ps. μ 0 [1] ~μ 0 [ 4] it is possible to a value close to the true value of at least one initial value mu 0 [Sel] of.
The Kalman filter KF [Sel] supplied with the initial value μ 0 [Sel] close to the true value can accurately estimate the state of the system. That is, each element of the state vector x k [Sel] output from the Kalman filter KF [Sel] has an accurate value close to the true value. The output
Thus, the state estimation apparatus according to the present embodiment can accurately estimate the state of the system.
<B.変形例>
本発明は上述した実施形態に限定されるものではなく、例えば、以下の変形が可能である。また、以下に示す変形例のうちの2以上の変形例は、相互に矛盾しない範囲内で適宜に組み合わせることもできる。
<B. Modification>
The present invention is not limited to the above-described embodiments, and for example, the following modifications are possible. Further, two or more of the modifications shown below can be appropriately combined within a range that does not contradict each other.
(1)変形例1
上述した実施形態において、物体Objは、地上座標系ΣGにおける座標が既知のランドマークであったが、本発明はこのような態様に限定されるものではなく、物体Objは、太陽、月、星等の天体であってもよい。
変形例1に係る状態推定装置は、初期値生成部200の代わりに初期値生成部200aを備える点を除き、上述した実施形態に係る状態推定装置と同様に構成される。図6は、初期値生成部200aの機能ブロック図である。初期値生成部200aは、初期姿勢算出部220の代わりに、初期姿勢算出部220aを備える点を除き、初期値生成部200と同様に構成される。初期姿勢算出部220aは、撮影対象情報取得部221の代わりに、撮影対象情報取得部221aを備える点を除き、初期姿勢算出部220と同様に構成される。
変形例1に係る携帯機器が備えるROMには、物体Objの候補となり得る複数の天体の各々についての情報Pobj2を記憶したルックアップテーブルが格納される。ここで、情報Pobj2の具体的な内容は、各天体の軌道に関する情報(例えば、地球上の位置及び時刻と、当該位置及び時刻において各天体が見える方向とに関する情報)である。撮影対象情報取得部221aは、携帯機器の位置情報Ps、物体Objの情報Pobj2、及び、時刻情報Timeに基づいて、第2方向ベクトルβを生成する。初期姿勢算出部220aは、初期姿勢算出部220と同様に、少なくとも1つが真値に近い値を示す姿勢μの4つの初期値μ0[1]〜μ0[4]を生成することができる。従って、変形例1に係る状態推定装置は、システムの状態を正確に推定することができる。
(1)
In the embodiment described above, the object Obj is coordinates in ground coordinate system sigma G was known landmarks, the present invention is not limited to such a mode, the object Obj is the sun, the moon, It may be a celestial body such as a star.
The state estimation device according to the modified example 1 is configured in the same manner as the state estimation device according to the above-described embodiment except that the initial
The ROM included in the mobile device according to the first modification stores a look-up table storing information Pobj2 about each of a plurality of celestial bodies that can be candidates for the object Obj. Here, the specific content of the information Pobj2 is information on the orbit of each celestial body (for example, information on the position and time on the earth and the direction in which each celestial body can be seen at the position and time). The imaging target
(2)変形例2
上述した実施形態において、携帯機器1は時計130を備えるが、本発明に係る携帯機器はこのような構成に限定されるものではなく、携帯機器1は時計130を備えないものであってもよい。
(2)
In the embodiment described above, the
(3)変形例3
上述した実施形態及び変形例に係る状態推定装置は、4個の初期ベクトルINI[1]〜INI[4]に基づいて動作する4個のカルマンフィルタKF[1]〜KF[4]を備えるものであったが、本発明はこのような形態に限定されるものではなく、所定数Mの初期ベクトルINI[1]〜INI[M]に基づいて並列に動作する所定数MのカルマンフィルタKF[1]〜KF[M]を備えるものであってもよい(Mは、1≦Mを満たす自然数)。
この場合、変形例3に係る初期値生成部200は、所定数Mの初期ベクトルINI[1]〜INI[M]を生成するものであればよい。具体的には、変形例3に係る初期値生成部200は、第1方向ベクトルα及び第2方向ベクトルβに基づいて姿勢AC(姿勢A[1])を算出し、直線AX(第2方向ベクトルβ)を軸として当該姿勢ACを所定角度(2π/M)ずつ回転させることで、姿勢A[2]〜A[M]を算出し、所定数Mの姿勢A[1]〜A[M]から、姿勢μの初期値μ0[1]〜μ0[M]を生成する初期姿勢算出部220と、所定数Mの初期値μ0[1]〜μ0[M]に基づいて、所定数Mの初期ベクトルINI[1]〜INI[M]を生成する初期ベクトル生成部230と、を備えるものであればよい。
また、この場合、出力情報制御部400は、所定数MのカルマンフィルタKF[1]〜KF[M]の中から、推定精度が最も高いカルマンフィルタを選択するものであればよい。
所定数Mが、「4」よりも大きい場合、変形例3に係る状態推定装置は、上述した実施形態に係る状態推定装置に比べて、より正確且つ迅速に、システムの状態を推定することが可能となる。また、所定数Mが、「4」よりも小さい場合、変形例3に係る状態推定装置は、上述した実施形態に係る状態推定装置に比べて、非線形カルマンフィルタの演算における処理負荷を小さく抑えることが可能となるため、状態推定装置が組み込まれる携帯機器の低消費電力化が可能となる。
(3)
The state estimation device according to the embodiment and the modification described above includes four Kalman filters KF [1] to KF [4] that operate based on the four initial vectors INI [1] to INI [4]. However, the present invention is not limited to such a form, and the predetermined number M of Kalman filters KF [1] operating in parallel based on the predetermined number M of initial vectors INI [1] to INI [M]. -KF [M] may be provided (M is a natural number satisfying 1 ≦ M).
In this case, the initial
In this case, the output
When the predetermined number M is larger than “4”, the state estimation device according to the modified example 3 can estimate the state of the system more accurately and quickly than the state estimation device according to the above-described embodiment. It becomes possible. Further, when the predetermined number M is smaller than “4”, the state estimation device according to the modified example 3 can suppress the processing load in the calculation of the nonlinear Kalman filter to be smaller than that of the state estimation device according to the above-described embodiment. Therefore, it is possible to reduce the power consumption of the portable device in which the state estimation device is incorporated.
(4)変形例4
上述した実施形態及び変形例に係る状態推定装置は、カルマンフィルタKFの推定精度を、誤差評価値MAXzk[m]を用いて評価するものであったが、本発明はこのような態様に限定されるものではなく、状態ベクトルxkの示す値と状態ベクトルの真値との誤差の大きさを評価することのできる値であれば、いかなる値を用いてカルマンフィルタKFの推定精度を評価してもよい。例えば、状態ベクトルxkの推定誤差の共分散Pkを用いて、カルマンフィルタKFの推定精度を評価するものであってもよい。
(4)
The state estimation device according to the embodiment and the modification described above evaluates the estimation accuracy of the Kalman filter KF using the error evaluation value MAX z k [m], but the present invention is limited to such an aspect. the invention is not, if the value that can evaluate the magnitude of the error between the true value of the values and the state vector indicating the state vector x k, by evaluating the estimation accuracy of the Kalman filter KF using any value Also good. For example, using a covariance P k of the estimation error of the state vector x k, it may be configured to evaluate the estimation accuracy of the Kalman filter KF.
(5)変形例5
上述した実施形態及び変形例に係る状態推定装置は、カメラ110が1つの物体Objを撮影した際に出力される画像情報Imgに基づいて複数の初期ベクトルINI[1]〜INI[M]を生成し、これらが各々供給される複数のカルマンフィルタKF[1]〜KF[M]を並列に動作させるものであったが、本発明はこのような態様に限定されるものではなく、カメラ110が2つの物体Obj(物体Obj1、物体Obj2)を撮影した際に出力される画像情報Imgに基づいて1つの初期ベクトルINI[1]を生成し、当該初期ベクトルINI[1]が供給されるカルマンフィルタKF[1]を単独で動作させるものであってもよい。
2つの物体Objを撮影して画像情報Imgが生成される場合、当該画像情報Imgに基づいて、2つの物体Objのそれぞれに対応する2つの第1方向ベクトルαと、2つの物体Objのそれぞれに対応する2つの第2方向ベクトルβと、が生成される。この場合、2つの第1方向ベクトルαと、2つの第2方向ベクトルβとに基づいて、携帯機器1の姿勢μの初期値μ0(姿勢A)を一意に特定することができるため、真値に近い値を有する正確な初期ベクトルINI[1]を、カルマンフィルタKF[1]に供給することができる。
(5) Modification 5
The state estimation device according to the embodiment and the modification described above generates a plurality of initial vectors INI [1] to INI [M] based on the image information Img output when the
When the image information Img is generated by photographing the two objects Obj, based on the image information Img, the two first direction vectors α corresponding to the two objects Obj and the two objects Obj, respectively. Two corresponding second direction vectors β are generated. In this case, since the initial value μ 0 (attitude A) of the attitude μ of the
図7は、変形例5に係る状態推定装置のうち、CPU10が変形例5に係る状態推定プログラムを実行することにより実現される機能を表した、機能ブロック図である。
図7に示すように、変形例5に係る状態推定装置は、初期値生成部200の代わりに初期値生成部200bを備える点、カルマンフィルタ演算部300の代わりにカルマンフィルタ演算部300bを備える点、及び、出力情報制御部400を備えない点を除き、実施形態に係る状態推定装置と同様に構成される。
初期値生成部200bは、画像処理部210b、初期姿勢算出部220b、及び、初期ベクトル生成部230bを備える。画像処理部210bは、カメラ110が2つの物体Obj(物体Obj1、物体Obj2)を撮影した際に出力される画像情報Imgに基づいて、機器座標系ΣSにおいて、携帯機器1から見た物体Obj1の方向を表す第1方向ベクトルα1と、携帯機器1から見た物体Obj2の方向を表す第1方向ベクトルα2とを算出する。第1方向ベクトルα1及び第1方向ベクトルα2は、長さが「1」に正規化されたベクトルである。
初期姿勢算出部220bは、撮影対象情報取得部221bと、姿勢計算部222bとを備える。撮影対象情報取得部221bは、カメラ110が撮影した2つの物体Objに係る情報Pobj(または情報Pobj2)と位置情報Psとに基づいて、地上座標系ΣGにおいて、携帯機器1から見た物体Obj1の方向を表す第2方向ベクトルβ1と、携帯機器1から見た物体Obj2の方向を表す第2方向ベクトルβ2とを算出する。第2方向ベクトルβ1及び第2方向ベクトルβ2は、長さが「1」に正規化されたベクトルである。
カメラ110が2つの物体Objを撮影した際の、携帯機器1の姿勢をAとしたとき、式(53)及び式(54)が成立する。式(53)及び式(54)は、式(55)に変形できる。そして、式(53)〜式(55)は、式(56)に変形できる。なお、式(56)において、行列Dαは、式(57)に示す3行3列の行列であり、行列Dβは、式(58)に示す3行3列の行列である。従って、姿勢Aは、式(59)により、一意に算出することができる。姿勢計算部222bは、2つの第1方向ベクトルα1、α2と、2つの第2方向ベクトルβ1、β2とを用いて、式(59)に基づいて、姿勢A(携帯機器1の姿勢μの初期値μ0[1])を算出する。初期ベクトル生成部230bは、初期値μ0[1]に基づいて、初期ベクトルINI[1]を算出する。
カルマンフィルタ演算部300bは、1個のカルマンフィルタKF[1]を備え、カルマンフィルタKF[1]には、初期ベクトルINI[1]が供給される。カルマンフィルタKF[1]は、周期的に状態ベクトルxk[1](厳密には、更新後の状態ベクトルx+ k[1])を出力する。そして、出力情報生成部500は、状態ベクトルxk[1]に基づいて、出力情報を生成する。
上述のとおり、初期ベクトルINI[1]は、状態ベクトルx0[1]の真値に近い正確な値であるため、カルマンフィルタKF[1]は、システムの状態を正確且つ迅速に推定することができる。
As shown in FIG. 7, the state estimation device according to the modified example 5 includes an initial
The initial
The initial
When the
The Kalman
As described above, since the initial vector INI [1] is an accurate value close to the true value of the state vector x 0 [1], the Kalman filter KF [1] can accurately and quickly estimate the state of the system. it can.
なお、CPU10は、カメラ110が1つの物体Objを撮影した場合、実施形態(または変形例1〜4)に係る状態推定プログラム100を実行し、カメラ110が2つの物体Obj(物体Obj1、物体Obj2)を撮影した場合、変形例5に係る状態推定プログラムを実行してもよい。
Note that when the
(6)変形例6
上述した実施形態及び変形例に係る状態推定装置は、シグマポイントカルマンフィルタを用いて非線形カルマンフィルタの演算を実行するものであったが、本発明はこのような形態に限定されるものでは無く、拡張カルマンフィルタ等、公知の非線形カルマンフィルタを適宜適用して演算を行うものでもよい。
図8は、変形例6に係る状態推定プログラムを実行したときに実現される機能を表した機能ブロック図である。図8に示すように、変形例6に係る状態推定装置は、カルマンフィルタKF[m]の代わりにカルマンフィルタKFa[m]を備える点を除き、上述した実施形態及び変形例に係る状態推定装置と同様に構成される。カルマンフィルタKFa[m]は、状態遷移モデル部710を備える代わりに、状態遷移モデル部710aを備える点と、観測モデル部720を備える代わりに、観測モデル部720aを備える点とを除いて、カルマンフィルタKF[m]と同様に構成される。
状態遷移モデル部710aは、状態ベクトルx+ k−1を、式(23)に示す状態遷移モデルに適用することで、推定状態ベクトルx− kを算出する。観測モデル部720aは、推定状態ベクトルx− kを、式(24)に示す観測モデルに適用することにより、推定観測値ベクトルy− kを算出する。
このように、変形例6に係る非線形カルマンフィルタの演算では、複数のシグマポイントを生成することなく、状態ベクトルxkを更新する。
(6) Modification 6
The state estimation device according to the above-described embodiment and the modification executes the operation of the nonlinear Kalman filter using the sigma point Kalman filter, but the present invention is not limited to such a form, and the extended Kalman filter For example, the calculation may be performed by appropriately applying a known nonlinear Kalman filter.
FIG. 8 is a functional block diagram showing functions realized when the state estimation program according to Modification 6 is executed. As illustrated in FIG. 8, the state estimation device according to the modification 6 is the same as the state estimation device according to the above-described embodiment and the modification, except that the Kalman filter KFa [m] is provided instead of the Kalman filter KF [m]. Configured. The Kalman filter KFa [m] is provided with a state
The state
As described above, in the calculation of the nonlinear Kalman filter according to the modified example 6, the state vector x k is updated without generating a plurality of sigma points.
1…携帯機器、10…CPU、60…GPS部、70…3次元磁気センサ、80…3次元加速度センサ、90…3次元角速度センサ、100…状態推定プログラム、110…カメラ、200…初期値生成部、210…画像処理部、220…初期姿勢算出部、221…撮影対象情報取得部、222…姿勢計算部、230…初期ベクトル生成部、300…カルマンフィルタ演算部、400…出力情報制御部、500…出力情報生成部、q…磁気データ、Img…画像情報、Ps…位置情報、Pobj…情報、μ…姿勢、μ0…姿勢μの初期値、x…状態ベクトル、y…観測値ベクトル、z…観測残差、α…第1方向ベクトル、β…第2方向ベクトル、Obj…物体、ΣS…機器座標系、ΣG…地上座標系。
DESCRIPTION OF
Claims (5)
前記システムの状態を推定する値である複数の状態変数を要素とする状態ベクトルと、前記観測値の各々を要素とする観測値ベクトルとを用いて、前記状態ベクトルを更新するカルマンフィルタを1以上備えるカルマンフィルタ演算部と、
前記状態ベクトルの初期値である初期ベクトルを生成する初期値生成部と、
を備え、
前記複数の状態変数は、
前記機器の姿勢を推定する状態変数を含み、
前記初期値生成部は、
1以上の物体を前記画像取得部が撮影した際に前記画像取得部が出力する前記画像情報と、前記位置情報出力部が出力する前記位置情報と、に基づいて、前記機器の姿勢を推定する状態変数の初期値である初期姿勢推定値を算出し、前記初期姿勢推定値を要素とする前記初期ベクトルを生成する、
ことを特徴とする状態推定装置。 The system is incorporated in a device including a plurality of sensors that observe the system and output observation values, a position information output unit that outputs position information, and an image acquisition unit that images an object and outputs image information, A state estimation device for estimating the state of
One or more Kalman filters for updating the state vector using a state vector having a plurality of state variables as elements for estimating the state of the system and an observation value vector having each of the observation values as elements A Kalman filter operation unit;
An initial value generation unit that generates an initial vector that is an initial value of the state vector;
With
The plurality of state variables are:
Including a state variable that estimates the attitude of the device;
The initial value generator is
The posture of the device is estimated based on the image information output by the image acquisition unit when the image acquisition unit captures one or more objects and the position information output by the position information output unit. Calculating an initial posture estimated value that is an initial value of a state variable, and generating the initial vector having the initial posture estimated value as an element;
The state estimation apparatus characterized by the above-mentioned.
並列に動作する所定数の前記カルマンフィルタを備え、
前記初期値生成部は、
前記画像取得部が、1の物体を撮影して前記画像情報を出力した場合に、前記画像情報に基づいて、前記機器に固定された3軸の座標系である機器座標系において、前記機器から見た前記1の物体の方向を表した第1方向ベクトルを算出する画像処理部と、
前記位置情報に基づいて、地球上に固定された3軸の座標系である地上座標系において、前記機器から見た前記1の物体の方向を表した第2方向ベクトルを算出し、前記第1方向ベクトル及び前記第2方向ベクトルに基づいて、初期姿勢候補値を算出し、前記初期姿勢候補値を、前記第2方向ベクトルを回転軸として所定角度ずつ回転させることで、前記所定数の前記初期姿勢推定値を算出する初期姿勢算出部と、
前記所定数の前記初期姿勢推定値の各々に対応する、前記所定数の前記初期ベクトルを生成し、これらを前記所定数の前記カルマンフィルタにそれぞれ供給する初期ベクトル生成部と、を備える、
ことを特徴とする請求項1に記載の状態推定装置。 The Kalman filter operation unit is
A predetermined number of the Kalman filters operating in parallel;
The initial value generator is
In the device coordinate system, which is a three-axis coordinate system fixed to the device, based on the image information, when the image acquisition unit captures one object and outputs the image information, from the device An image processing unit for calculating a first direction vector representing the direction of the one object seen;
Based on the position information, in a ground coordinate system that is a three-axis coordinate system fixed on the earth, a second direction vector representing the direction of the first object viewed from the device is calculated, and the first An initial posture candidate value is calculated based on the direction vector and the second direction vector, and the initial posture candidate value is rotated by a predetermined angle about the second direction vector as a rotation axis, whereby the predetermined number of the initial posture values are calculated. An initial posture calculation unit for calculating a posture estimation value;
An initial vector generation unit that generates the predetermined number of the initial vectors corresponding to each of the predetermined number of the initial posture estimation values, and supplies the initial vectors to the predetermined number of the Kalman filters, respectively.
The state estimation apparatus according to claim 1.
1つの前記カルマンフィルタを備え、
前記初期値生成部は、
前記画像取得部が、2つの物体を撮影して前記画像情報を出力した場合に、前記画像情報に基づいて、前記機器に固定された3軸の座標系である機器座標系において、前記機器から見た前記2つの物体の各々の方向を表した2つの第1方向ベクトルを算出する画像処理部と、
前記位置情報に基づいて、地球上に固定された3軸の座標系である地上座標系において、前記機器から見た前記2つの物体の各々の方向を表した2つの第2方向ベクトルを算出し、前記2つの第1方向ベクトル及び前記2つの第2方向ベクトルに基づいて、前記初期姿勢推定値を算出する、初期姿勢算出部と、
前記初期姿勢推定値を要素とする前記初期ベクトルを生成し、これを前記カルマンフィルタに供給する初期ベクトル生成部と、を備える、
ことを特徴とする請求項1に記載の状態推定装置。 The Kalman filter operation unit is
Comprising one Kalman filter,
The initial value generator is
In the device coordinate system, which is a three-axis coordinate system fixed to the device, based on the image information, when the image acquisition unit captures two objects and outputs the image information, from the device An image processing unit for calculating two first direction vectors representing the directions of the two viewed objects,
Based on the position information, in the ground coordinate system, which is a three-axis coordinate system fixed on the earth, two second direction vectors representing the directions of the two objects viewed from the device are calculated. An initial posture calculating unit that calculates the initial posture estimated value based on the two first direction vectors and the two second direction vectors;
An initial vector generation unit that generates the initial vector having the initial posture estimated value as an element and supplies the initial vector to the Kalman filter;
The state estimation apparatus according to claim 1.
時刻情報を出力する時刻出力部を備え、
前記初期姿勢算出部は、
前記位置情報と、前記時刻情報と、に基づいて、前記第2方向ベクトルを算出する、
ことを特徴とする請求項2または3に記載の状態推定装置。 The state estimation device includes:
A time output unit for outputting time information;
The initial posture calculation unit
Calculating the second direction vector based on the position information and the time information;
The state estimation apparatus according to claim 2 or 3, wherein
前記地上座標系における座標が既知であり、
前記初期姿勢算出部は、前記位置情報と、前記物体の前記地上座標系における座標とに基づいて、前記第2方向ベクトルを算出する、
ことを特徴とする請求項2または3に記載の状態推定装置。 The object is
The coordinates in the ground coordinate system are known;
The initial posture calculating unit calculates the second direction vector based on the position information and coordinates of the object in the ground coordinate system;
The state estimation apparatus according to claim 2 or 3, wherein
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012050297A JP2013185898A (en) | 2012-03-07 | 2012-03-07 | State estimation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012050297A JP2013185898A (en) | 2012-03-07 | 2012-03-07 | State estimation device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013185898A true JP2013185898A (en) | 2013-09-19 |
Family
ID=49387456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012050297A Pending JP2013185898A (en) | 2012-03-07 | 2012-03-07 | State estimation device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013185898A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016169991A (en) * | 2015-03-12 | 2016-09-23 | 株式会社ゼンリンデータコム | Route guidance device, route guidance method, and route guidance program |
WO2020050084A1 (en) * | 2018-09-07 | 2020-03-12 | 国立研究開発法人宇宙航空研究開発機構 | Storage medium having guidance control program stored thereon |
JP2020528553A (en) * | 2017-07-26 | 2020-09-24 | シスナヴ | How to calibrate the magnetometer |
CN113711280A (en) * | 2019-04-15 | 2021-11-26 | 索尼集团公司 | Information processing device, information processing method, communication terminal, communication method, and program |
CN114370870A (en) * | 2022-01-05 | 2022-04-19 | 中国兵器工业计算机应用技术研究所 | Filter updating information screening method suitable for pose measurement Kalman filtering |
-
2012
- 2012-03-07 JP JP2012050297A patent/JP2013185898A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016169991A (en) * | 2015-03-12 | 2016-09-23 | 株式会社ゼンリンデータコム | Route guidance device, route guidance method, and route guidance program |
JP2020528553A (en) * | 2017-07-26 | 2020-09-24 | シスナヴ | How to calibrate the magnetometer |
JP7112482B2 (en) | 2017-07-26 | 2022-08-03 | シスナヴ | How to calibrate a magnetometer |
WO2020050084A1 (en) * | 2018-09-07 | 2020-03-12 | 国立研究開発法人宇宙航空研究開発機構 | Storage medium having guidance control program stored thereon |
CN113711280A (en) * | 2019-04-15 | 2021-11-26 | 索尼集团公司 | Information processing device, information processing method, communication terminal, communication method, and program |
CN114370870A (en) * | 2022-01-05 | 2022-04-19 | 中国兵器工业计算机应用技术研究所 | Filter updating information screening method suitable for pose measurement Kalman filtering |
CN114370870B (en) * | 2022-01-05 | 2024-04-12 | 中国兵器工业计算机应用技术研究所 | Filter update information screening method suitable for pose measurement Kalman filtering |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111156998B (en) | Mobile robot positioning method based on RGB-D camera and IMU information fusion | |
LaValle et al. | Head tracking for the Oculus Rift | |
Michel et al. | A comparative analysis of attitude estimation for pedestrian navigation with smartphones | |
Michel et al. | Attitude estimation for indoor navigation and augmented reality with smartphones | |
CN108846857A (en) | The measurement method and visual odometry of visual odometry | |
JP2014089113A (en) | Posture estimation device and program | |
JP2020528553A (en) | How to calibrate the magnetometer | |
US20140222369A1 (en) | Simplified method for estimating the orientation of an object, and attitude sensor implementing such a method | |
JP2013064695A (en) | State estimating device, offset updating method, and offset updating program | |
JP2013185898A (en) | State estimation device | |
CN110352331A (en) | The method and clouds terrace system of the attitude algorithm of hand-held holder | |
JP2017036970A (en) | Information processor, information processing method, and program | |
Haslwanter | 3D Kinematics | |
Nusbaum et al. | Control theoretic approach to gyro-free inertial navigation systems | |
Troni et al. | Magnetometer bias calibration based on relative angular position: Theory and experimental comparative evaluation | |
JP2013096724A (en) | State estimation device | |
Peng et al. | Design of an embedded icosahedron mechatronics for robust iterative IMU calibration | |
JP5870656B2 (en) | Trajectory calculation device and trajectory calculation method | |
JP2013122384A (en) | Kalman filter and state estimation device | |
KR100563948B1 (en) | Apparatus for attitude determination test of star-sensor and method for display of imaginary constellation | |
Irmisch et al. | Simulation framework for a visual-inertial navigation system | |
JP2015118101A (en) | Information processing device and method and program | |
CN211601925U (en) | Angular deviation measuring system | |
CN111238439B (en) | Angular deviation measuring system | |
JP2013061309A (en) | Kalman filter, state estimation device, method for controlling kalman filter, and control program of kalman filter |