JP2012037405A - Sensor device, electronic apparatus, and offset correction method of angular velocity sensor - Google Patents

Sensor device, electronic apparatus, and offset correction method of angular velocity sensor Download PDF

Info

Publication number
JP2012037405A
JP2012037405A JP2010178381A JP2010178381A JP2012037405A JP 2012037405 A JP2012037405 A JP 2012037405A JP 2010178381 A JP2010178381 A JP 2010178381A JP 2010178381 A JP2010178381 A JP 2010178381A JP 2012037405 A JP2012037405 A JP 2012037405A
Authority
JP
Japan
Prior art keywords
angular velocity
sensor
acceleration
sensor device
initial state
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.)
Withdrawn
Application number
JP2010178381A
Other languages
Japanese (ja)
Inventor
Yusuke Kinoshita
裕介 木下
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2010178381A priority Critical patent/JP2012037405A/en
Publication of JP2012037405A publication Critical patent/JP2012037405A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Gyroscopes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a sensor device that self-determines correction timing and corrects an offset of an angular velocity sensor, an electronic apparatus, and an offset correction method of the angular velocity sensor.SOLUTION: An initial state detection part 210 calculates acceleration based upon an output of the angular velocity sensor, and detects as an initial state a state in which the calculated acceleration is substantially equal to gravity acceleration. An angular velocity calculation part 220 calculates axis vectors in respective detection axis directions in the initial state based upon attitude information in the initial state, and calculates an angular velocity of rotation on an arbitrary axis based upon the axis vectors, acceleration components in the respective detection axis directions, and temporal changes of the acceleration components. An angular velocity determination part 230 determines that an angular velocity applied to the angular velocity sensor is 0 when the angular velocity that the angular velocity calculation parts 220 calculates is substantially 0. An offset correction part 40 corrects an offset of the output of the angular velocity sensor when it is determined that the angular velocity applied to the angular velocity sensor is 0.

Description

本発明は、センサー装置、電子機器及び角速度センサーのオフセット補正方法に関する。   The present invention relates to a sensor device, an electronic apparatus, and an offset correction method for an angular velocity sensor.

近年、角速度を検出するセンサーモジュールや姿勢角を検知する姿勢角検知ユニットを利用した様々なシステムや電子機器が利用されている。これらのシステムや電子機器では、ジャイロセンサー(角速度センサー)のバイアスオフセット(ゼロ点オフセット)を排除しなければ静止時に静止していることを正しく検出することができないため、性能を向上させる上で、このバイアスオフセットを如何にして排除するかが最も重要な課題になっている。   In recent years, various systems and electronic devices using sensor modules that detect angular velocities and attitude angle detection units that detect attitude angles have been used. In these systems and electronic devices, it is impossible to correctly detect that the camera is stationary at rest unless the bias offset (zero offset) of the gyro sensor (angular velocity sensor) is excluded. The most important issue is how to eliminate the bias offset.

従来より、製品の製造時等にバイアスオフセットを計測し、製品に組み込まれた不揮発性の記憶素子等に補正データを書き込むことでバイアスオフセットを補正する手法や、製品の使用時に静止状態を検出してオフセットのキャリブレーションを行う手法が実現されている。前者の手法では、バイアスオフセットの初期ばらつきを補正することができるが、温度変動等によるユーザー使用時のバイアス変動に対応することができない。一方、後者の手法では、ユーザーの使用環境において生じているバイアスのオフセットを使用環境においてキャリブレーション補正することができる。そのため、製造時の補正からの変動分や、線形関数で補正しきれない温度変動分を補正することができる。   Conventionally, bias offset is measured during product manufacturing, etc., and bias data is corrected by writing correction data in a nonvolatile memory element incorporated in the product, or a stationary state is detected when the product is used. Thus, a method for performing offset calibration is realized. The former method can correct the initial variation of the bias offset, but cannot cope with the bias variation at the time of user use due to temperature variation or the like. On the other hand, in the latter method, a bias offset occurring in the user's usage environment can be corrected for calibration in the usage environment. For this reason, it is possible to correct fluctuations from the correction at the time of manufacture and temperature fluctuations that cannot be corrected by the linear function.

特開2010−019751号公報JP 2010-019751 A 特許4314566号公報Japanese Patent No. 4314566 特許2857091号公報Japanese Patent No. 2857091

しかしながら、使用環境下でバイアスオフセットのキャリブレーションを行う手法は、いずれもアプリケーション機能に連動して行われるものであった。例えば、特許文献1の手法ではプレイヤが弓を引く瞬間、特許文献2の手法では掃除機の充電時や方向転換時、特許文献3の手法ではナビゲーション装置の起動時にキャリブレーションを行うなど、アプリケーション側でキャリブレーションを行うタイミングを決定している。つまり、アプリケーションに組み込まれたキャリブレーション補正アルゴリズムとして実現されており、センサーユニット単体ではキャリブレーションのタイミングを決定する機能を有するものではなかった。そのため、アプリケーションの開発者がキャリブレーション補正の適切なタイミングを熟慮し、補正アルゴリズムを作成する手間が発生していた。   However, all the methods for calibrating the bias offset in the usage environment are performed in conjunction with the application function. For example, in the method of Patent Document 1, the player draws a bow, in the method of Patent Document 2, calibration is performed at the time of charging the vacuum cleaner or when the direction is changed, and in the method of Patent Document 3, calibration is performed when the navigation device is activated. The timing for performing calibration is determined. That is, it is realized as a calibration correction algorithm incorporated in the application, and the sensor unit alone does not have a function for determining the timing of calibration. For this reason, it takes time for an application developer to consider the appropriate timing of calibration correction and create a correction algorithm.

本発明は、以上のような問題点に鑑みてなされたものであり、本発明のいくつかの態様によれば、補正タイミングを自己判定して角速度センサーのオフセット補正を行うことができるセンサー装置、電子機器及び角速度センサーのオフセット補正方法を提供することができる。   The present invention has been made in view of the above problems, and according to some aspects of the present invention, a sensor device capable of self-determining the correction timing and performing offset correction of the angular velocity sensor, An offset correction method for an electronic device and an angular velocity sensor can be provided.

(1)本発明は、角速度センサーと、3つ以上の加速度センサーと、を含むセンサー装置であって、前記加速度センサーの出力に基づいて、前記角速度センサーに加わる角速度が0であるか否かを判定する判定部と、前記判定部により前記角速度が0であると判定された時に、前記角速度センサーの出力のオフセットを補正するオフセット補正部と、を含む、センサー装置である。   (1) The present invention is a sensor device including an angular velocity sensor and three or more acceleration sensors, and whether or not the angular velocity applied to the angular velocity sensor is 0 based on the output of the acceleration sensor. A sensor device comprising: a determination unit that determines; and an offset correction unit that corrects an offset of an output of the angular velocity sensor when the determination unit determines that the angular velocity is zero.

センサー装置が停止していれば角速度センサーに角速度が加わらないので、この時の角速度センサーの出力電圧が0点電圧になる。そのため、このタイミングであれば0点電圧のオフセットを適切に補正することができる。本発明によれば、加速度センサーの出力に基づいて角速度センサーに角速度が加わらないタイミングを検出することができるので、そのタイミングで自動的に角速度センサーのオフセットを補正することができる。すなわち、本発明によれば、アプリケーション機能によらずセンサー装置単体で角速度センサーのオフセットを補正することができる。そのため、このセンサー装置を使用すれば、従来の手法のようにアプリケーション側に補正アルゴリズムを実装する必要がなく、ユーザーに負荷をかけずに角速度センサーのゼロ点オフセットを補正することができる。   Since the angular velocity is not applied to the angular velocity sensor if the sensor device is stopped, the output voltage of the angular velocity sensor at this time becomes zero point voltage. Therefore, at this timing, the offset of the zero point voltage can be corrected appropriately. According to the present invention, the timing at which the angular velocity is not applied to the angular velocity sensor can be detected based on the output of the acceleration sensor, so that the offset of the angular velocity sensor can be automatically corrected at that timing. That is, according to the present invention, the offset of the angular velocity sensor can be corrected by the sensor device alone regardless of the application function. Therefore, if this sensor device is used, it is not necessary to implement a correction algorithm on the application side as in the conventional method, and the zero point offset of the angular velocity sensor can be corrected without imposing a load on the user.

また、本発明によれば、使用環境下で角速度センサーのゼロ点の変動を検知して補正することができる。   Further, according to the present invention, it is possible to detect and correct the fluctuation of the zero point of the angular velocity sensor under the usage environment.

(2)このセンサー装置において、前記判定部は、前記加速度センサーの各々の検出軸方向の加速度成分の時間変化に基づいて、前記角速度センサーに加わる角速度が0であるか否かを判定するようにしてもよい。   (2) In this sensor device, the determination unit determines whether or not an angular velocity applied to the angular velocity sensor is zero based on a temporal change of an acceleration component in each detection axis direction of the acceleration sensor. May be.

(3)このセンサー装置において、前記判定部は、前記加速度センサーの出力に基づいて当該センサー装置に加わる加速度を算出し、算出した加速度と重力加速度が略一致する状態を初期状態として検出する初期状態検出部と、前記初期状態における当該センサー装置の姿勢情報に基づいて前記初期状態における各検出軸方向の軸ベクトルを算出し、当該軸ベクトルと各検出軸方向の加速度成分と当該加速度成分の時間変化とに基づいて当該センサー装置が任意の軸回りに回転する角速度を算出する角速度算出部と、前記角速度算出部が算出した角速度が略0である場合に、前記角速度センサーに加わる角速度が0であると判定する角速度判定部と、を含むようにしてもよい。   (3) In this sensor device, the determination unit calculates an acceleration applied to the sensor device based on the output of the acceleration sensor, and detects a state where the calculated acceleration and the gravitational acceleration substantially coincide with each other as an initial state. Based on the attitude information of the sensor device in the initial state and the detection unit, the axis vector in each detection axis direction in the initial state is calculated, and the time variation of the axis vector, the acceleration component in each detection axis direction, and the acceleration component And the angular velocity calculating unit that calculates the angular velocity at which the sensor device rotates about an arbitrary axis, and the angular velocity calculated by the angular velocity calculating unit is substantially zero, the angular velocity applied to the angular velocity sensor is zero. And an angular velocity determination unit that determines that.

このセンサー装置によれば、加速度センサーが検知できないような小さい遠心力が加わった場合でも、初期状態からの加速度成分の時間変化をモニターすることで、角速度センサーに加わる角速度を検知することができる。そのため、角速度センサーのオフセット補正を行うタイミングの判定精度を高めることができる。   According to this sensor device, even when a small centrifugal force that cannot be detected by the acceleration sensor is applied, the angular velocity applied to the angular velocity sensor can be detected by monitoring the temporal change in the acceleration component from the initial state. Therefore, the determination accuracy of the timing for performing the offset correction of the angular velocity sensor can be improved.

(4)このセンサー装置において、前記角速度判定部は、前記角速度算出部が算出した角速度が略0の状態が所定時間継続した場合に、前記角速度センサーに加わる角速度が0であると判定するようにしてもよい。   (4) In this sensor device, the angular velocity determination unit determines that the angular velocity applied to the angular velocity sensor is zero when the angular velocity calculated by the angular velocity calculation unit is substantially zero for a predetermined time. May be.

このようにすれば、センサー装置に所定時間継続して角速度が加わっていないのか瞬時的に角速度が0となっただけなのかを区別し、前者の場合だけ角速度センサーのオフセット補正を行うようにすることができる。   In this way, it is discriminated whether the angular velocity is continuously applied to the sensor device for a predetermined time or whether the angular velocity is instantaneously zero, and the offset correction of the angular velocity sensor is performed only in the former case. be able to.

(5)このセンサー装置において、前記判定部は、前記加速度センサーの出力に基づいて当該センサー装置に加わる加速度を算出する加速度算出部と、前記加速度算出部が算出した加速度と重力加速度が略一致する場合に、前記角速度センサーに加わる角速度が0であると判定する角速度判定部と、を含むようにしてもよい。   (5) In this sensor device, the determination unit substantially matches an acceleration calculation unit that calculates acceleration applied to the sensor device based on an output of the acceleration sensor, and an acceleration calculated by the acceleration calculation unit and a gravitational acceleration. In this case, an angular velocity determination unit that determines that the angular velocity applied to the angular velocity sensor is 0 may be included.

センサー装置が回転状態にあると、角速度センサーは角速度を検出するので、そのタイミングでは適切なオフセット補正を行うことができない。一方、センサー装置に遠心力が働けば、加速度センサーが遠心力により発生する遠心加速度を検出するため、その検出加速度は重力加速度と一致しない。そのため、このセンサー装置によれば、加速度センサーの検出加速度が重力加速度と一致するか否かを判定する簡便な演算処理により、遠心力が加わっていない適切なタイミングで角速度センサーのオフセットを補正することができる。   When the sensor device is in a rotating state, the angular velocity sensor detects the angular velocity, and therefore, appropriate offset correction cannot be performed at that timing. On the other hand, if a centrifugal force acts on the sensor device, the acceleration sensor detects the centrifugal acceleration generated by the centrifugal force, so the detected acceleration does not coincide with the gravitational acceleration. Therefore, according to this sensor device, the offset of the angular velocity sensor can be corrected at an appropriate timing when centrifugal force is not applied by a simple calculation process that determines whether or not the acceleration detected by the acceleration sensor matches the gravitational acceleration. Can do.

(6)このセンサー装置において、前記角速度判定部は、前記加速度算出部が算出した加速度と重力加速度が略一致する状態が所定時間継続した場合に、前記角速度センサーに加わる角速度が0であると判定するようにしてもよい。   (6) In this sensor device, the angular velocity determination unit determines that the angular velocity applied to the angular velocity sensor is 0 when a state in which the acceleration calculated by the acceleration calculation unit and the acceleration of gravity substantially coincide with each other continues for a predetermined time. You may make it do.

このようにすれば、センサー装置に所定時間継続して遠心力が加わっていないのか瞬時的に遠心力が0となっただけなのかを区別し、前者の場合だけ角速度センサーのオフセット補正を行うようにすることができる。   In this way, whether the centrifugal force is continuously applied to the sensor device for a predetermined time or whether the centrifugal force is instantaneously zero is distinguished, and the angular velocity sensor offset correction is performed only in the former case. Can be.

(7)このセンサー装置において、前記判定部は、前記加速度センサーの出力に基づいて当該センサー装置に加わる加速度を算出し、算出した加速度と重力加速度が略一致する状態を初期状態として検出する初期状態検出部と、前記初期状態における当該センサー装置の姿勢情報に基づいて前記初期状態における各検出軸方向の軸ベクトルを算出し、当該軸ベクトルと各検出軸方向の加速度成分と当該加速度成分の時間変化とに基づいて当該センサー装置が任意の軸回りに回転する角速度を算出する角速度算出部と、制御信号に応じて第1の判定モードと第2の判定モードを切り替える判定モード制御部と、前記第1の判定モードでは、前記初期状態検出部が前記初期状態を検出した場合に前記角速度センサーに加わる角速度が0であると判定し、前記第2の判定モードでは、前記角速度算出部が算出した角速度が略0である場合に前記角速度センサーに加わる角速度が0であると判定する角速度判定部と、を含むようにしてもよい。   (7) In this sensor device, the determination unit calculates an acceleration applied to the sensor device based on an output of the acceleration sensor, and detects an initial state where the calculated acceleration and the gravitational acceleration substantially coincide with each other. Based on the attitude information of the sensor device in the initial state and the detection unit, the axis vector in each detection axis direction in the initial state is calculated, and the time variation of the axis vector, the acceleration component in each detection axis direction, and the acceleration component An angular velocity calculation unit that calculates an angular velocity at which the sensor device rotates about an arbitrary axis, a determination mode control unit that switches between a first determination mode and a second determination mode according to a control signal, and the first In the first determination mode, it is determined that the angular velocity applied to the angular velocity sensor is zero when the initial state detection unit detects the initial state. And, in the second determination mode, may include a angular velocity determination unit determines that the angular velocity is zero applied to the angular velocity sensor when an angular velocity where the velocity calculation unit has calculated is substantially zero.

このようにすれば、このセンサー装置を使用するアプリケーションに応じて、第1の判定モードと第2の判定モードのいずれを使用するかで、角速度センサーのオフセット補正タイミングの判定精度を変更することができる。すなわち、第1の判定モードにすれば、遠心力の検出による簡易な判定になり、第2の判定モードにすれば、加速度センサーで検出できないような微小な遠心力が加わった場合でもセンサー装置に加わる角速度が0か否かを判定することができる。   In this way, the determination accuracy of the offset correction timing of the angular velocity sensor can be changed depending on which of the first determination mode and the second determination mode is used according to the application using the sensor device. it can. That is, if the first determination mode is set, the determination is simple based on the detection of the centrifugal force. If the second determination mode is set, the sensor device can be applied even when a minute centrifugal force that cannot be detected by the acceleration sensor is applied. It can be determined whether or not the applied angular velocity is zero.

(8)このセンサー装置において、前記角速度判定部は、前記第1の判定モードでは、前記初期状態検出部が所定時間継続して前記初期状態を検出した場合に前記角速度センサーに加わる角速度が0であると判定し、前記第2の判定モードでは、前記角速度算出部が算出した角速度が略0の状態が所定時間継続した場合に前記角速度センサーに加わる角速度が0であると判定するようにしてもよい。   (8) In this sensor device, in the first determination mode, the angular velocity determination unit has an angular velocity applied to the angular velocity sensor of 0 when the initial state detection unit detects the initial state for a predetermined time. In the second determination mode, it is determined that the angular velocity applied to the angular velocity sensor is zero when the angular velocity calculated by the angular velocity calculator is substantially zero for a predetermined time. Good.

このようにすれば、第1の判定モードでは、センサー装置に所定時間継続して遠心力が加わっていないのか瞬時的に遠心力が0となっただけなのかを区別し、前者の場合だけ角速度センサーのオフセット補正を行うようにすることができる。また、第2の判定モードでは、センサー装置に所定時間継続して角速度が加わっていないのか瞬時的に角速度が0となっただけなのかを区別し、前者の場合だけ角速度センサーのオフセット補正を行うようにすることができる。   In this way, in the first determination mode, it is distinguished whether the centrifugal force is continuously applied to the sensor device for a predetermined time or whether the centrifugal force is instantaneously zero, and only in the former case, the angular velocity is determined. Sensor offset correction can be performed. In the second determination mode, whether the angular velocity is continuously applied to the sensor device for a predetermined time or whether the angular velocity is instantaneously zero is discriminated, and the offset correction of the angular velocity sensor is performed only in the former case. Can be.

(9)本発明は、上記のいずれかのセンサー装置を含む、電子機器である。   (9) The present invention is an electronic device including any one of the sensor devices described above.

(10)本発明は、角速度センサーと、3つ以上の加速度センサーと、を含むセンサー装置において、前記角速度センサーの出力のオフセットを補正する角速度センサーのオフセット補正方法であって、前記加速度センサーの出力に基づいて、前記角速度センサーに加わる角速度が0であるか否かを判定する判定ステップと、前記判定ステップで前記角速度が0であると判定された時に、前記角速度センサーの出力のオフセットを補正するオフセット補正ステップと、を含む、角速度センサーのオフセット補正方法である。   (10) The present invention provides an angular velocity sensor offset correction method for correcting an offset of an output of the angular velocity sensor in a sensor device including an angular velocity sensor and three or more acceleration sensors, and the output of the acceleration sensor And determining whether the angular velocity applied to the angular velocity sensor is zero, and correcting the offset of the output of the angular velocity sensor when the angular velocity is determined to be zero in the determining step. An offset correction method for an angular velocity sensor, including an offset correction step.

(11)この角速度センサーのオフセット補正方法において、前記判定ステップは、前記加速度センサーの出力に基づいて前記センサー装置に加わる加速度を算出し、算出した加速度と重力加速度が略一致する状態を初期状態として検出する初期状態検出ステップと、前記初期状態における前記センサー装置の姿勢情報に基づいて前記初期状態における各検出軸方向の軸ベクトルを算出し、当該軸ベクトルと各検出軸方向の加速度成分と当該加速度成分の時間変化とに基づいて前記センサー装置が任意の軸回りに回転する角速度を算出する角速度算出ステップと、前記角速度算出ステップで算出した角速度が略0である場合に、前記角速度センサーに加わる角速度が0であると判定する角速度判定ステップと、を含むようにしてもよい。   (11) In this angular velocity sensor offset correction method, the determination step calculates an acceleration applied to the sensor device based on an output of the acceleration sensor, and sets a state in which the calculated acceleration and gravity acceleration substantially coincide with each other as an initial state. An initial state detecting step to detect, and an axis vector in each detection axis direction in the initial state is calculated based on posture information of the sensor device in the initial state, the axis vector, an acceleration component in each detection axis direction, and the acceleration An angular velocity calculating step for calculating an angular velocity at which the sensor device rotates about an arbitrary axis based on a temporal change of a component, and an angular velocity applied to the angular velocity sensor when the angular velocity calculated in the angular velocity calculating step is substantially zero And an angular velocity determination step of determining that is 0.

第1実施形態のセンサー装置の概略構成図。The schematic block diagram of the sensor apparatus of 1st Embodiment. 第1実施形態のオフセット補正処理を行うタイミングの判定原理について説明するための図。The figure for demonstrating the determination principle of the timing which performs the offset correction process of 1st Embodiment. 第1実施形態のオフセット補正処理の第1の例を示すフローチャート図。The flowchart figure which shows the 1st example of the offset correction process of 1st Embodiment. 第1実施形態のオフセット補正処理の第2の例を示すフローチャート図。The flowchart figure which shows the 2nd example of the offset correction process of 1st Embodiment. 第2実施形態のセンサー装置の概略構成図。The schematic block diagram of the sensor apparatus of 2nd Embodiment. Z−X−Z系のオイラー角について説明するための図。The figure for demonstrating the Euler angle of a Z-X-Z type | system | group. 第2実施形態のオフセット補正処理の第1の例を示すフローチャート図。The flowchart figure which shows the 1st example of the offset correction process of 2nd Embodiment. 第2実施形態のオフセット補正処理の第2の例を示すフローチャート図。The flowchart figure which shows the 2nd example of the offset correction process of 2nd Embodiment. 第3実施形態のセンサー装置の概略構成図。The schematic block diagram of the sensor apparatus of 3rd Embodiment. 第3実施形態のオフセット補正処理の第1の例を示すフローチャート図。The flowchart figure which shows the 1st example of the offset correction process of 3rd Embodiment. 第3実施形態のオフセット補正処理の第2の例を示すフローチャート図。The flowchart figure which shows the 2nd example of the offset correction process of 3rd Embodiment. 本実施形態の電子機器の構成例を示す機能ブロック図。FIG. 3 is a functional block diagram illustrating a configuration example of an electronic apparatus according to the embodiment.

以下、本発明の好適な実施形態について図面を用いて詳細に説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下で説明される構成の全てが本発明の必須構成要件であるとは限らない。   DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. The embodiments described below do not unduly limit the contents of the present invention described in the claims. Also, not all of the configurations described below are essential constituent requirements of the present invention.

1.センサー装置
(1)第1実施形態
[構成]
図1は、第1実施形態のセンサー装置の概略構成図である。
1. Sensor device (1) First embodiment [Configuration]
FIG. 1 is a schematic configuration diagram of a sensor device according to the first embodiment.

図1に示すように、第1実施形態のセンサー装置1Aは、3つの加速度センサー10x、10y、10zを含む。加速度センサー10x、10y、10zは、検出軸が互いに直交するように固定して配置されており、それぞれの検出軸方向に加わる加速度の大きさに応じたDC電圧の検出信号を出力する。   As shown in FIG. 1, the sensor device 1A of the first embodiment includes three acceleration sensors 10x, 10y, and 10z. The acceleration sensors 10x, 10y, and 10z are fixedly arranged so that the detection axes are orthogonal to each other, and output a detection signal of a DC voltage corresponding to the magnitude of acceleration applied in the respective detection axis directions.

また、センサー装置1Aは、3つの角速度センサー(ジャイロセンサー)20x、20y、20zを含む。角速度センサー20x、20y、20zは、検出軸が互いに直交するように固定して配置されており、それぞれの検出軸回りに加わる角速度の大きさに応じたDC電圧の検出信号を出力する。   The sensor device 1A includes three angular velocity sensors (gyro sensors) 20x, 20y, and 20z. The angular velocity sensors 20x, 20y, and 20z are fixedly arranged so that the detection axes are orthogonal to each other, and output a detection signal of a DC voltage corresponding to the magnitude of the angular velocity applied around each detection axis.

本実施形態では、加速度センサー10xと角速度センサー20xは互いの検出軸が一致するように配置されており、この検出軸をx軸とする。同様に、加速度センサー10yと角速度センサー20yは互いの検出軸が一致するように配置されており、この検出軸をy軸とする。同様に、加速度センサー10zと角速度センサー20zは互いの検出軸が一致するように配置されており、この検出軸をz軸とする。   In the present embodiment, the acceleration sensor 10x and the angular velocity sensor 20x are arranged so that their detection axes coincide with each other, and this detection axis is taken as the x-axis. Similarly, the acceleration sensor 10y and the angular velocity sensor 20y are arranged so that their detection axes coincide with each other, and this detection axis is taken as the y-axis. Similarly, the acceleration sensor 10z and the angular velocity sensor 20z are arranged so that their detection axes coincide with each other, and this detection axis is taken as the z-axis.

センサー装置1Aは、判定部30を含む。判定部30は、加速度センサー10x、10y、10zの出力に基づいて、角速度センサー20x、20y、20zに加わる角速度が0であるか否かを判定する。   The sensor device 1A includes a determination unit 30. The determination unit 30 determines whether or not the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is 0 based on the outputs of the acceleration sensors 10x, 10y, and 10z.

本実施形態では、判定部30は、加速度算出部110を含む。加速度算出部110は、加速度センサー10x、10y、10zの出力に基づいてセンサー装置1Aに加わる加速度を算出する。本実施形態では、加速度算出部110は、加速度センサー10x、10y、10zの各出力電圧を所定の周期でサンプリングし、A/D変換して得られるx軸、y軸、z軸方向の加速度成分g、g、gの2乗和g +g +g を計算する。 In the present embodiment, the determination unit 30 includes an acceleration calculation unit 110. The acceleration calculation unit 110 calculates the acceleration applied to the sensor device 1A based on the outputs of the acceleration sensors 10x, 10y, and 10z. In the present embodiment, the acceleration calculation unit 110 samples the output voltages of the acceleration sensors 10x, 10y, and 10z at a predetermined cycle, and performs acceleration components in the x-axis, y-axis, and z-axis directions obtained by A / D conversion. The sum of squares g x 2 + g y 2 + g z 2 of g x , g y , and g z is calculated.

また、本実施形態では、判定部30は、角速度判定部120を含む。角速度判定部120は、加速度算出部110が算出した加速度と重力加速度Gが略一致する場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。本実施形態では、角速度判定部120は、g +g +g =Gであれば、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。 In the present embodiment, the determination unit 30 includes an angular velocity determination unit 120. The angular velocity determination unit 120 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero when the acceleration calculated by the acceleration calculation unit 110 and the gravitational acceleration G substantially match. In the present embodiment, the angular velocity determination unit 120 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is 0 if g x 2 + g y 2 + g z 2 = G 2 .

例えば、角速度判定部120は、加速度算出部110が算出した加速度と重力加速度Gが略一致する状態が所定時間継続した場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定するようにしてもよい。   For example, the angular velocity determination unit 120 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is 0 when the acceleration calculated by the acceleration calculation unit 110 and the gravitational acceleration G substantially coincide with each other for a predetermined time. You may do it.

センサー装置1Aは、オフセット補正部40を含む。オフセット補正部40は、判定部30により角速度センサー20x、20y、20zに加わる角速度が0であると判定された時に、角速度センサー20x、20y、20zの出力のオフセット(ゼロ点オフセット)を補正する。本実施形態では、角速度センサー20x、20y、20zはゼロ点電圧の調整機能を有しており、オフセット補正部40は、オフセット補正処理のタイミングにおける角速度センサー20x、20y、20zの出力電圧と仕様上のゼロ点電圧との誤差に応じたゼロ点調整信号を角速度センサー20x、20y、20zに供給することで、これらの出力電圧を仕様上のゼロ点電圧と一致させる。   The sensor device 1 </ b> A includes an offset correction unit 40. The offset correction unit 40 corrects the offset (zero point offset) of the output of the angular velocity sensors 20x, 20y, and 20z when the determination unit 30 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero. In the present embodiment, the angular velocity sensors 20x, 20y, and 20z have a zero point voltage adjustment function, and the offset correction unit 40 is based on the output voltage of the angular velocity sensors 20x, 20y, and 20z at the timing of the offset correction processing and the specifications. By supplying a zero point adjustment signal corresponding to an error from the zero point voltage to the angular velocity sensors 20x, 20y, and 20z, these output voltages are made to coincide with the specified zero point voltages.

このように、本実施形態のセンサー装置1Aは、加速度センサー10x、10y、10zの出力電圧を周期的にサンプリングして順次得られる加速度の2乗和(g +g +g )と重力加速度の2乗(G)が一致したタイミングで、角速度センサー20x、20y、20zの出力のオフセット(ゼロ点オフセット)を自動的に補正する。 As described above, the sensor device 1A according to this embodiment includes the sum of squares of acceleration (g x 2 + g y 2 + g z 2 ) obtained sequentially by periodically sampling the output voltages of the acceleration sensors 10x, 10y, and 10z. The offsets (zero point offsets) of the outputs of the angular velocity sensors 20x, 20y, and 20z are automatically corrected at the timing when the gravitational acceleration squares (G 2 ) coincide.

[オフセット補正タイミングの判定原理]
次に、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理を行うタイミングの判定原理について、図2(A)及び図2(B)を用いて説明する。
[Judgment principle of offset correction timing]
Next, the determination principle of the timing for performing the offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment will be described with reference to FIGS. 2 (A) and 2 (B).

センサー装置1Aを地球上で使用する場合、センサー装置1Aには常に重力が加わる。そのため、センサー装置1Aが停止もしくは等速直線運動をしていれば、図2(A)に示すように、加速度センサー10x、10y、10zは重力加速度のみを検出する。図2(A)において、g、g、gはx軸、y軸、z軸方向の加速度成分を、Gは重力加速度をそれぞれ表している。すなわち、g、g、gのベクトル和はGと一致し、次の式(1)が成立する。 When the sensor device 1A is used on the earth, gravity is always applied to the sensor device 1A. Therefore, if the sensor device 1A is stopped or is moving at a constant linear velocity, as shown in FIG. 2A, the acceleration sensors 10x, 10y, and 10z detect only gravitational acceleration. In FIG. 2A, g x , g y , and g z represent acceleration components in the x-axis, y-axis, and z-axis directions, and G represents gravity acceleration. That is, the vector sum of g x , g y , and g z coincides with G, and the following expression (1) is established.

Figure 2012037405
Figure 2012037405

一方、センサー装置1Aが任意の軸回りの回転運動をすれば遠心力が加わるため、図2(B)に示すように、加速度センサー10x、10y、10zは重力加速度と遠心力による遠心加速度とを検出する。図2(B)において、g、g、gはx軸、y軸、z軸方向の加速度成分を、Gは重力加速度を、Rは遠心加速度を、nは回転軸をそれぞれ表している。すなわち、g、g、gのベクトル和はGとRのベクトル和と一致し、次の式(2)が成立する。 On the other hand, if the sensor device 1A rotates about an arbitrary axis, centrifugal force is applied. Therefore, as shown in FIG. 2 (B), the acceleration sensors 10x, 10y, and 10z obtain the gravitational acceleration and the centrifugal acceleration due to the centrifugal force. To detect. In FIG. 2B, g x , g y , and g z represent acceleration components in the x-axis, y-axis, and z-axis directions, G represents gravitational acceleration, R represents centrifugal acceleration, and n represents a rotation axis. Yes. That is, the vector sum of g x , g y , and g z coincides with the vector sum of G and R, and the following equation (2) is established.

Figure 2012037405
Figure 2012037405

ここで、センサー装置1Aが停止もしくは等速直線運動をしていれば(回転運動をしていなければ)、センサー装置1Aには角速度が加わらないので、角速度センサー20x、20y、20zはすべてゼロ点電圧を出力する。そのため、式(1)が成立する時は角速度センサー20x、20y、20zのオフセット補正(ゼロ点補正)を行うことができる。   Here, if the sensor device 1A is stopped or is moving at a constant linear velocity (unless it is rotating), no angular velocity is applied to the sensor device 1A. Therefore, the angular velocity sensors 20x, 20y, and 20z are all zero points. Output voltage. Therefore, offset correction (zero point correction) of the angular velocity sensors 20x, 20y, and 20z can be performed when Expression (1) is established.

一方、センサー装置1Aが任意の軸回りの回転運動をしていれば、センサー装置1Aにはこの回転運動の角速度が加わり、角速度センサー20x、20y、20zは、この角速度のx軸成分、y軸成分、z軸成分を検出することになる。そのため、角速度センサー20x、20y、20zの少なくとも1つの出力電圧はゼロ点電圧にならないので、式(2)が成立する(式(1)が成立しない)時はオフセット補正(ゼロ点補正)を行うことができない。   On the other hand, if the sensor device 1A is rotating about an arbitrary axis, the angular velocity of this rotational motion is added to the sensor device 1A, and the angular velocity sensors 20x, 20y, and 20z are x-axis components of this angular velocity, y-axis. The component and the z-axis component are detected. Therefore, since at least one output voltage of the angular velocity sensors 20x, 20y, and 20z does not become a zero point voltage, offset correction (zero point correction) is performed when Expression (2) is satisfied (Expression (1) is not satisfied). I can't.

そこで、角速度判定部120は、式(1)が成立するか否かによってセンサー装置1Aに加わる角速度が0か否かを判定し、角速度センサー20x、20y、20zのオフセット補正処理のタイミングを制御する。ただし、実際には、加速度センサー10x、10y、10zの出力オフセットやセンサー装置1Aの使用環境におけるノイズ等の環境因により、センサー装置1Aが停止若しくは等速運動をしていても加速度センサー10x、10y、10zによって検出される加速度gが重力加速度Gと微妙に一致しないことが想定される。そのため、角速度判定部120は、例えば、g +g +g とGの差が微小値Δ以下であれば、すなわちG−Δ≦g +g +g ≦G+Δを満たせば、センサー装置1Aに加わる角速度が0であると判定するようにしてもよい。この微小値Δは、センサー装置1Aを使用するアプリケーション側の仕様等によって適切な値が設定される。 Therefore, the angular velocity determination unit 120 determines whether or not the angular velocity applied to the sensor device 1A is 0 depending on whether or not the equation (1) is satisfied, and controls the timing of the offset correction processing of the angular velocity sensors 20x, 20y, and 20z. . However, actually, even if the sensor device 1A stops or moves at a constant speed due to environmental factors such as output offset of the acceleration sensors 10x, 10y, and 10z and noise in the environment where the sensor device 1A is used, the acceleration sensors 10x and 10y It is assumed that the acceleration g detected by 10z does not slightly match the gravitational acceleration G. Therefore, the angular velocity determination unit 120, for example, if the difference between g x 2 + g y 2 + g z 2 and G 2 is a small value Δ or less, that is, G 2 −Δ ≦ g x 2 + g y 2 + g z 2 ≦ G. If 2 + Δ is satisfied, it may be determined that the angular velocity applied to the sensor device 1A is zero. The minute value Δ is set to an appropriate value depending on the specification on the application side using the sensor device 1A.

[オフセット補正処理]
図3は、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理の第1の例を示すフローチャート図である。
[Offset correction processing]
FIG. 3 is a flowchart showing a first example of offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment.

まず、加速度算出部110が、加速度センサー10x、10y、10zの検出信号をサンプリングし、x軸、y軸、z軸方向の加速度成分g,g,gを計算する(ステップS10)。 First, the acceleration calculation unit 110 samples detection signals from the acceleration sensors 10x, 10y, and 10z, and calculates acceleration components g x , g y , and g z in the x-axis, y-axis, and z-axis directions (step S10).

次に、加速度算出部110がg +g +g を計算する(ステップS20)。 Next, the acceleration calculation unit 110 calculates g x 2 + g y 2 + g z 2 (step S20).

次に、角速度判定部120がg +g +g とGが一致するか否かを判定し(ステップS30)、g +g +g ≠Gの場合は(ステップS30のN)、ステップS10とS20の処理を再度行う。 Next, the angular velocity determination unit 120 determines whether or not g x 2 + g y 2 + g z 2 and G 2 match (step S30), and when g x 2 + g y 2 + g z 2 ≠ G 2 ( Step S30 N), Steps S10 and S20 are performed again.

一方、g +g +g =Gの場合は(ステップS30のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS40)。 On the other hand, if g x 2 + g y 2 + g z 2 = G 2 (Y in step S30), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S40).

図4は、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理の第2の例を示すフローチャート図である。図4において、図3と同じ処理を行うステップには同じ符号を付しており、その説明を省略又は簡略する。   FIG. 4 is a flowchart showing a second example of offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment. 4, steps that perform the same processing as in FIG. 3 are denoted by the same reference numerals, and description thereof is omitted or simplified.

まず、角速度判定部120が所定時間T1の計測を開始する(ステップS2)。   First, the angular velocity determination unit 120 starts measuring the predetermined time T1 (step S2).

次に、加速度算出部110がステップS10とS20の処理を行った後、角速度判定部120がg +g +g とGが一致するか否かを判定し(ステップS30)、g +g +g ≠Gの場合は(ステップS30のN)、角速度判定部120が所定時間T1の計測を再度開始し(ステップS2)、加速度算出部110がステップS10とS20の処理を再度行う。 Next, after the acceleration calculation unit 110 performs the processes of steps S10 and S20, the angular velocity determination unit 120 determines whether g x 2 + g y 2 + g z 2 and G 2 match (step S30). When g x 2 + g y 2 + g z 2 ≠ G 2 (N in step S30), the angular velocity determination unit 120 starts measurement of the predetermined time T1 again (step S2), and the acceleration calculation unit 110 performs steps S10 and S20. Repeat the process.

一方、g +g +g =Gの場合は(ステップS30のY)、角速度判定部120が、ステップS2で計測を開始してから所定時間T1が経過したか否かを判定し(ステップS32)、所定時間T1が経過していない場合は(ステップS32のN)、所定時間T1が経過するまで、ステップS10、S20、S30の処理を繰り返し行う。ただし、所定時間T1が経過する前に、ステップS30の判定処理でg +g +g ≠Gとなった場合は、角速度判定部120が所定時間T1の計測を再度開始する。 On the other hand, if g x 2 + g y 2 + g z 2 = G 2 (Y in step S30), the angular velocity determination unit 120 determines whether or not a predetermined time T1 has elapsed since the measurement was started in step S2. However, if the predetermined time T1 has not elapsed (N in step S32), the processes of steps S10, S20, and S30 are repeated until the predetermined time T1 has elapsed. However, if g x 2 + g y 2 + g z 2 ≠ G 2 in the determination process in step S30 before the predetermined time T1 has elapsed, the angular velocity determination unit 120 starts measuring the predetermined time T1 again.

所定時間T1が経過した場合は(ステップS32のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS40)。   When the predetermined time T1 has elapsed (Y in step S32), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S40).

このようにすれば、センサー装置1Aに所定時間T1以上継続して遠心力が加わっていないのか瞬時的に遠心力が0となっただけなのかを区別し、前者の場合だけ角速度センサー20x、20y、20zのオフセット補正を行うようにすることができる。   In this way, it is distinguished whether the centrifugal force is continuously applied to the sensor device 1A for a predetermined time T1 or whether the centrifugal force is instantaneously zero, and only in the former case, the angular velocity sensors 20x, 20y are distinguished. , 20z offset correction can be performed.

以上に説明した第1実施形態のセンサー装置によれば、加速度センサーが検出する加速度が重力加速度と一致するか否かを判定する簡便な演算処理により、遠心力が加わっていない適切なタイミングで角速度センサーのオフセットを補正することができる。すなわち、第1実施形態のセンサー装置によれば、アプリケーション機能によらずセンサー装置単体で角速度センサーのオフセットを補正することができる。そのため、このセンサー装置を使用すれば、従来の手法のようにアプリケーション側に補正アルゴリズムを実装する必要がなく、ユーザーに負荷をかけずに角速度センサーのゼロ点オフセットを補正することができる。   According to the sensor device of the first embodiment described above, the angular velocity can be determined at an appropriate timing when centrifugal force is not applied by a simple calculation process that determines whether or not the acceleration detected by the acceleration sensor matches the gravitational acceleration. The sensor offset can be corrected. That is, according to the sensor device of the first embodiment, the offset of the angular velocity sensor can be corrected by the sensor device alone regardless of the application function. Therefore, if this sensor device is used, it is not necessary to implement a correction algorithm on the application side as in the conventional method, and the zero point offset of the angular velocity sensor can be corrected without imposing a load on the user.

また、第1実施形態のセンサー装置によれば、使用環境下で角速度センサーのゼロ点の変動を検知して補正することができる。そのため、場合によっては、出荷前に角速度センサーのオフセット調整をs実施したり、温度特性の補正用データを記憶素子に書き込む必要がなくなる。さらに、使用環境に応じて角速度センサーのオフセット補正量を調整することができるので、温度変化にも対応して角速度センサーのオフセット補正を行うことができる。特に、温度特性の補正用データがあったととしても補正が困難な非線形の温度変化にも対応することができる。   Further, according to the sensor device of the first embodiment, it is possible to detect and correct the fluctuation of the zero point of the angular velocity sensor under the usage environment. Therefore, in some cases, it is not necessary to perform an offset adjustment of the angular velocity sensor before shipping or to write temperature characteristic correction data in the storage element. Furthermore, since the offset correction amount of the angular velocity sensor can be adjusted according to the use environment, the offset correction of the angular velocity sensor can be performed in response to a temperature change. In particular, even if there is correction data for temperature characteristics, it is possible to cope with non-linear temperature changes that are difficult to correct.

(2)第2実施形態
[構成]
図5は、第2実施形態のセンサー装置の概略構成図である。図5において、図1と同じ構成要素には同じ符号を付しており、その説明を省略又は簡略する。
(2) Second Embodiment [Configuration]
FIG. 5 is a schematic configuration diagram of the sensor device of the second embodiment. 5, the same components as those in FIG. 1 are denoted by the same reference numerals, and the description thereof is omitted or simplified.

図5に示すように、第2実施形態のセンサー装置1Bは、3つの加速度センサー10x、10y、10z、3つの角速度センサー(ジャイロセンサー)20x、20y、20zに加えて、3つの地磁気センサー60x、60y、60zを含んで構成されている。地磁気センサー60x、60y、60zは、検出軸(x軸、y軸、z軸)が互いに直交するように固定して配置されており、それぞれの検出軸方向に加わる地磁気の大きさに応じたDC電圧の検出信号を出力する。   As shown in FIG. 5, the sensor device 1B of the second embodiment includes three acceleration sensors 10x, 10y, 10z, three angular velocity sensors (gyro sensors) 20x, 20y, 20z, three geomagnetic sensors 60x, 60y and 60z are included. The geomagnetic sensors 60x, 60y, and 60z are arranged so that the detection axes (x axis, y axis, and z axis) are orthogonal to each other, and DC corresponding to the magnitude of the geomagnetism applied in the respective detection axis directions. Outputs voltage detection signal.

本実施形態では、加速度センサー10x、角速度センサー20x、地磁気センサー60xは互いの検出軸が一致するように配置されており、この検出軸をx軸とする。同様に、加速度センサー10y、角速度センサー20y、地磁気センサー60yは互いの検出軸が一致するように配置されており、この検出軸をy軸とする。同様に、加速度センサー10z、角速度センサー20z、地磁気センサー60zは互いの検出軸が一致するように配置されており、この検出軸をz軸とする。   In the present embodiment, the acceleration sensor 10x, the angular velocity sensor 20x, and the geomagnetic sensor 60x are arranged so that their detection axes coincide with each other, and this detection axis is taken as the x-axis. Similarly, the acceleration sensor 10y, the angular velocity sensor 20y, and the geomagnetic sensor 60y are arranged so that their detection axes coincide with each other, and this detection axis is taken as the y-axis. Similarly, the acceleration sensor 10z, the angular velocity sensor 20z, and the geomagnetic sensor 60z are arranged such that their detection axes coincide with each other, and this detection axis is taken as the z-axis.

本実施形態では、このx軸、y軸、z軸を3つの座標軸とする直交座標系をセンサー座標系と呼ぶことにする。一方、空間上に固定された3つの直交する座標軸(X軸、Y軸、Z軸)による直交座標系を絶対座標系と呼ぶことにする。絶対座標系のX軸、Y軸、Z軸は、例えば、X軸の正の方向が北、Y軸の正の方向が西、Z軸の正の方向が重力方向と一致するように定義される。   In the present embodiment, an orthogonal coordinate system having the x, y, and z axes as three coordinate axes is referred to as a sensor coordinate system. On the other hand, an orthogonal coordinate system using three orthogonal coordinate axes (X axis, Y axis, and Z axis) fixed in space is referred to as an absolute coordinate system. The X, Y, and Z axes of the absolute coordinate system are defined, for example, so that the positive direction of the X axis is north, the positive direction of the Y axis is west, and the positive direction of the Z axis is coincident with the direction of gravity. The

センサー装置1Bは、姿勢情報検出部70を含んで構成されている。姿勢情報検出部70は、加速度センサー10x、10y、10z、角速度センサー20x、20y、20z、地磁気センサー60x、60y、60zの各検出信号に基づいて、センサー装置1Bの現在の姿勢情報を算出する。   The sensor device 1B includes an attitude information detection unit 70. The posture information detection unit 70 calculates the current posture information of the sensor device 1B based on the detection signals of the acceleration sensors 10x, 10y, 10z, the angular velocity sensors 20x, 20y, 20z, and the geomagnetic sensors 60x, 60y, 60z.

本実施形態では、絶対座標系(XYZ座標系)とセンサー座標系(xyz座標系)が一致する状態を基準としてセンサー装置1Bの姿勢をZ−X−Z系のオイラー角で表現する。Z−X−Z系のオイラー角は、図6(A)に示すように、絶対座標系(XYZ座標系)をZ軸回りに角度φだけ回転させたX’Y’Z’座標系に変換し、次にX’Y’Z’座標系をX’軸回りに角度θだけ回転させたX’’Y’’Z’’座標系に変換し、最後にX’’Y’’Z’’座標系をZ’’軸回りに角度ψだけ回転させたX’’’Y’’’Z’’’座標系に変換した時、X’’’Y’’’Z’’’座標系がセンサー座標系(xyz座標系)と一致する時の(φ,θ,ψ)である。本実施形態では、Z−X−Z系のオイラー角(φ,θ,ψ)を、姿勢角(φ,θ,ψ)ということにする。   In the present embodiment, the posture of the sensor device 1B is expressed by the Euler angle of the ZXZ system with reference to a state in which the absolute coordinate system (XYZ coordinate system) and the sensor coordinate system (xyz coordinate system) match. As shown in FIG. 6A, the Euler angle of the ZXZ system is converted into an X′Y′Z ′ coordinate system obtained by rotating the absolute coordinate system (XYZ coordinate system) by an angle φ around the Z axis. Next, the X'Y'Z 'coordinate system is converted into an X "Y" Z "coordinate system rotated by an angle θ around the X' axis, and finally X" Y "Z" When the coordinate system is converted to the X '' 'Y' '' Z '' 'coordinate system rotated by the angle ψ around the Z' 'axis, the X' '' Y '' 'Z' '' coordinate system is the sensor (Φ, θ, ψ) when matching with the coordinate system (xyz coordinate system). In the present embodiment, the Euler angles (φ, θ, ψ) of the Z-X-Z system are referred to as posture angles (φ, θ, ψ).

つまり、本実施形態では、姿勢情報検出部70は、姿勢情報として姿勢角(φ,θ,ψ)の情報を出力する。   That is, in this embodiment, the posture information detection unit 70 outputs posture angle (φ, θ, ψ) information as posture information.

センサー装置1Bは、判定部50を含む。判定部50は、加速度センサー10x、10y、10zの出力に基づいて、角速度センサー20x、20y、20zに加わる角速度が0であるか否かを判定する。   The sensor device 1B includes a determination unit 50. The determination unit 50 determines whether or not the angular velocities applied to the angular velocity sensors 20x, 20y, and 20z are zero based on the outputs of the acceleration sensors 10x, 10y, and 10z.

本実施形態では、判定部50は、初期状態検出部210を含む。初期状態検出部210は、加速度センサー10x、10y、10zの出力に基づいてセンサー装置1Aに加わる加速度を算出し、算出した加速度と重力加速度Gが略一致する状態を初期状態として検出する。本実施形態では、初期状態検出部210は、加速度センサー10x、10y、10zの各出力電圧を所定の周期でサンプリングし、A/D変換して得られるx軸、y軸、z軸方向の加速度成分g、g、gの2乗和g +g +g を計算し、g +g +g =Gの状態を初期状態として検出する。 In the present embodiment, the determination unit 50 includes an initial state detection unit 210. The initial state detection unit 210 calculates an acceleration applied to the sensor device 1A based on the outputs of the acceleration sensors 10x, 10y, and 10z, and detects a state in which the calculated acceleration and the gravitational acceleration G substantially coincide with each other as an initial state. In the present embodiment, the initial state detection unit 210 samples the output voltages of the acceleration sensors 10x, 10y, and 10z at a predetermined cycle, and performs acceleration in the x-axis, y-axis, and z-axis directions obtained by A / D conversion. The sum of squares g x 2 + g y 2 + g z 2 of the components g x , g y , and g z is calculated, and a state of g x 2 + g y 2 + g z 2 = G 2 is detected as an initial state.

ただし、実際には、加速度センサー10x、10y、10zの出力オフセットやセンサー装置1Bの使用環境におけるノイズ等の環境因により、センサー装置1Bが停止若しくは等速運動をしていても加速度センサー10x、10y、10zによって検出される加速度gが重力加速度Gと微妙に一致しないことが想定される。そのため、初期状態検出部210は、例えば、g +g +g とGの差が微小値Δ以下であれば、すなわちG−Δ≦g +g +g ≦G+Δを満たした時に初期状態を検出する。この微小値Δは、センサー装置1Bを使用するアプリケーション側の仕様等によって適切な値が設定される。 However, actually, even if the sensor device 1B stops or moves at a constant speed due to environmental factors such as an output offset of the acceleration sensors 10x, 10y, and 10z and noise in the environment where the sensor device 1B is used, the acceleration sensors 10x and 10y It is assumed that the acceleration g detected by 10z does not slightly match the gravitational acceleration G. Therefore, the initial state detection unit 210, for example, if the difference between g x 2 + g y 2 + g z 2 and G 2 is a small value Δ or less, that is, G 2 −Δ ≦ g x 2 + g y 2 + g z 2 ≦ The initial state is detected when G 2 + Δ is satisfied. The minute value Δ is set to an appropriate value according to the specification on the application side using the sensor device 1B.

ここで、図2(B)に示した遠心加速度Rがある程度大きい場合にはg +g +g =Gが成立しないので、初期状態検出部210により初期状態が検出されることはないが、遠心加速度Rが極めて小さい場合には初期状態検出部210により初期状態が検出される場合が想定される。そこで、以下に説明するように、判定部50は、初期状態検出部210により初期状態が検出された場合は、その後の加速度検出成分の時間変化をモニターすることで実際の角速度ωが0か否かを判定する。 Here, when the centrifugal acceleration R shown in FIG. 2B is large to some extent, g x 2 + g y 2 + g z 2 = G 2 does not hold, so that the initial state detection unit 210 detects the initial state. However, when the centrifugal acceleration R is extremely small, it is assumed that the initial state is detected by the initial state detection unit 210. Therefore, as described below, when the initial state is detected by the initial state detection unit 210, the determination unit 50 monitors whether or not the actual angular velocity ω is zero by monitoring subsequent changes in the acceleration detection component. Determine whether.

そのため、本実施形態では、判定部50は、角速度算出部220を含む。角速度算出部220は、初期状態におけるセンサー装置1Bの姿勢情報に基づいて初期状態におけるx軸、y軸、z軸方向の軸ベクトルを算出し、当該軸ベクトルとx軸、y軸、z軸方向の加速度成分と当該加速度成分の時間変化とに基づいてセンサー装置1Bが任意の軸回りに回転する角速度ωを算出する。本実施形態では、角速度算出部220は、後述する式(7)、式(8)、式(9)により、軸ベクトルとしてx軸、y軸、z軸方向の単位ベクトルa 、a 、a を計算する。また、角速度算出部220は、後述する式(24)、式(25)、式(26)により、加速度センサー10x、10y、10zが検出する加速度成分g、g、gを含むD、D、Dを計算する。さらに、角速度算出部220は、D、D、Dの1階微分(実際には1階差分)と2階微分(実際には2階差分))を計算する。そして、角速度算出部220は、単位ベクトルa 、a 、a と、D、D、Dと、D、D、Dの1階微分と、D、D、Dの2階微分を用いて、後述する式(40)によりωを計算する。 Therefore, in this embodiment, the determination unit 50 includes an angular velocity calculation unit 220. The angular velocity calculation unit 220 calculates axis vectors in the x-axis, y-axis, and z-axis directions in the initial state based on the attitude information of the sensor device 1B in the initial state, and the axis vectors and the x-axis, y-axis, and z-axis directions The angular velocity ω at which the sensor device 1B rotates around an arbitrary axis is calculated based on the acceleration component of the sensor and the time change of the acceleration component. In the present embodiment, the angular velocity calculation unit 220 uses the unit vectors a x R and a y in the x-axis, y-axis, and z-axis directions as axis vectors according to expressions (7), (8), and (9) described later. R 1 and a z R are calculated. Further, the angular velocity calculation unit 220 includes D 1 including acceleration components g x , g y , and g z detected by the acceleration sensors 10 x , 10 y , and 10 z according to expressions (24), (25), and (26) described later. , D 2 and D 3 are calculated. Furthermore, the angular velocity calculation unit 220 calculates first-order derivatives (actually first-order differences) and second-order derivatives (actually second-order differences) of D 1 , D 2 , and D 3 . The angular velocity calculating unit 220, the unit vector a x R, a y R, and a z R, and D 1, D 2, D 3, and the first derivative of the D 1, D 2, D 3 , D 1, Using the second derivative of D 2 and D 3 , ω 2 is calculated by the equation (40) described later.

また、本実施形態では、判定部50は、角速度判定部230を含む。角速度判定部230は、角速度算出部220が算出した角速度が略0である場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。本実施形態では、角速度判定部230は、ω=0であれば、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。 In the present embodiment, the determination unit 50 includes an angular velocity determination unit 230. The angular velocity determination unit 230 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero when the angular velocity calculated by the angular velocity calculation unit 220 is approximately zero. In the present embodiment, the angular velocity determination unit 230 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero if ω 2 = 0.

例えば、角速度判定部230は、角速度算出部220が算出した角速度ωが略0の状態が所定時間継続した場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定するようにしてもよい。   For example, the angular velocity determination unit 230 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero when the state where the angular velocity ω calculated by the angular velocity calculation unit 220 is substantially zero continues for a predetermined time. Also good.

なお、オフセット補正部40は、第1実施形態と同様であるため、その説明を省略する。   The offset correction unit 40 is the same as that in the first embodiment, and a description thereof will be omitted.

このように、本実施形態のセンサー装置1Bは、初期状態におけるx軸、y軸、z軸方向の軸ベクトルと、加速度センサー10x、10y、10zの出力電圧を周期的にサンプリングして順次得られるx軸、y軸、z軸方向の加速度成分と、当該加速度成分の時間変化とに基づいて計算される角速度ωの2乗が0となるタイミングで、角速度センサー20x、20y、20zの出力のオフセット(ゼロ点オフセット)を自動的に補正する。   As described above, the sensor device 1B according to the present embodiment is obtained sequentially by periodically sampling the axis vectors in the x-axis, y-axis, and z-axis directions in the initial state and the output voltages of the acceleration sensors 10x, 10y, and 10z. The offset of the output of the angular velocity sensors 20x, 20y, and 20z at the timing when the square of the angular velocity ω calculated based on the acceleration component in the x-axis, y-axis, and z-axis directions and the temporal change of the acceleration component becomes zero. (Zero point offset) is automatically corrected.

[オフセット補正タイミングの判定原理]
次に、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理を行うタイミングの判定原理について説明する。
[Judgment principle of offset correction timing]
Next, the principle of determining timing for performing the offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment will be described.

本実施形態では、絶対座標系(XYZ座標系)とセンサー座標系(xyz座標系)が一致する状態を基準として、センサー装置1Bの姿勢をZ−X−Z系のオイラー角で表現する。   In the present embodiment, the attitude of the sensor device 1B is expressed by the Euler angle of the ZXZ system with reference to the state where the absolute coordinate system (XYZ coordinate system) and the sensor coordinate system (xyz coordinate system) match.

図6(A)に示すように、絶対座標系(XYZ座標系)をZ軸回りに角度φだけ回転させたX’Y’Z’座標系に変換する回転行列Rは次式(3)で与えられる。 As shown in FIG. 6A, a rotation matrix R 1 for converting an absolute coordinate system (XYZ coordinate system) into an X′Y′Z ′ coordinate system obtained by rotating the absolute coordinate system (XYZ coordinate system) by an angle φ around the Z axis is expressed by the following equation (3): Given in.

Figure 2012037405
Figure 2012037405

さらに、図6(B)に示すように、X’Y’Z’座標系をX’軸回りに角度θだけ回転させたX’’Y’’Z’’座標系に変換する回転行列Rは次式(4)で与えられる。 Further, as shown in FIG. 6B, a rotation matrix R 2 for converting the X′Y′Z ′ coordinate system into an X ″ Y ″ Z ″ coordinate system rotated by an angle θ around the X ′ axis. Is given by the following equation (4).

Figure 2012037405
Figure 2012037405

さらに、図6(C)に示すように、X’’Y’’Z’’座標系をZ’’軸回りに角度ψだけ回転させたX’’’Y’’’Z’’’座標系に変換する回転行列Rは次式(5)で与えられる。 Further, as shown in FIG. 6C, an X ′ ″ Y ′ ″ Z ′ ″ coordinate system obtained by rotating the X ″ Y ″ Z ″ coordinate system by an angle ψ around the Z ″ axis. The rotation matrix R 3 to be converted into is given by the following equation (5).

Figure 2012037405
Figure 2012037405

このX’’’Y’’’Z’’’座標系がセンサー座標系(xyz座標系)と一致するなら、センサー装置1Bの姿勢を表現するZ−X−Z系のオイラー角(姿勢角)は(φ,θ,ψ)である。   If the X ′ ″ Y ′ ″ Z ′ ″ coordinate system matches the sensor coordinate system (xyz coordinate system), the Euler angle (posture angle) of the ZXZ system that expresses the posture of the sensor device 1B. Is (φ, θ, ψ).

従って、センサー装置1Bの姿勢角を(0,0,0)から(φ,θ,ψ)に変換する回転行列Rは、次式(6)で与えられる。   Therefore, the rotation matrix R for converting the attitude angle of the sensor device 1B from (0, 0, 0) to (φ, θ, ψ) is given by the following equation (6).

Figure 2012037405
Figure 2012037405

本実施形態では、センサー装置1Bが基準姿勢の時(姿勢角が(0,0,0)の時)は、絶対座標系(XYZ座標系)とセンサー座標系(xyz座標系)が一致するので、x軸、y軸、z軸方向の3つの単位ベクトルは、それぞれ絶対座標系(XYZ座標系)において(1,0,0)、(0,1,0)、(0,0,1)で表される。   In the present embodiment, when the sensor device 1B is in the reference posture (when the posture angle is (0, 0, 0)), the absolute coordinate system (XYZ coordinate system) and the sensor coordinate system (xyz coordinate system) match. , X-axis, y-axis, and z-axis directions are represented by (1,0,0), (0,1,0), (0,0,1) in the absolute coordinate system (XYZ coordinate system), respectively. It is represented by

本実施形態では、加速度センサー10x、10y、10zの検出軸は常にセンサー座標系のx軸、y軸、z軸とそれぞれ一致するので、センサー装置1Bが基準姿勢の時(姿勢角が(0,0,0)の時)、加速度センサー10x、10y、10zの検出軸方向の単位ベクトルa、a、aは、それぞれa=(1,0,0)、a=(0,1,0)、a=(0,0,1)になっている。 In the present embodiment, since the detection axes of the acceleration sensors 10x, 10y, and 10z always coincide with the x-axis, y-axis, and z-axis of the sensor coordinate system, respectively, when the sensor device 1B is in the reference posture (the posture angle is (0, 0,0)), the unit vectors a x , a y , and a z in the detection axis direction of the acceleration sensors 10x, 10y, and 10z are a x = (1, 0, 0) and a y = (0, 1, 0) and a z = (0, 0, 1).

従って、センサー装置1Bの姿勢角が(φ,θ,ψ)の時のx軸、y軸、z軸方向の単位ベクトルa 、a 、a は、それぞれ次の式(7)、式(8)、式(9)で表される。 Therefore, when the posture angle of the sensor device 1B is (φ, θ, ψ), the unit vectors a x R , a y R , and a z R in the x-axis, y-axis, and z-axis directions are expressed by the following formulas (7 ), Formula (8), and formula (9).

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

次に、センサー装置1Bが姿勢角(φ,θ,ψ)で停止又は等速直線運動していると仮定し、この状態からセンサー装置1Bが任意の軸ベクトルn=(n、n、n)の回りに角度δだけ回転する場合を考えると、この回転を表す回転行列Δは、次式(10)で表される。 Next, it is assumed that the sensor device 1B is stopped at a posture angle (φ, θ, ψ) or is linearly moving at a constant speed, and from this state, the sensor device 1B has an arbitrary axis vector n = (n x , n y , Considering the case of rotating around an angle δ around n z ), a rotation matrix Δ representing this rotation is expressed by the following equation (10).

Figure 2012037405
Figure 2012037405

したがって、軸ベクトルn=(n、n、n)の回りに角度δだけ回転した後のx軸、y軸、z軸方向の単位ベクトルa RΔ、a RΔ、a RΔは、それぞれ次の式(11)、式(12)、式(13)で表される。 Thus, axial vector n = (n x, n y , n z) x -axis after the rotation by an angle δ around the, y-axis, z-axis direction of the unit vector a x RΔ, a y RΔ, a z RΔ is Are represented by the following equations (11), (12), and (13), respectively.

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

従って、単位ベクトルa RΔ、a RΔ、a RΔが、重力方向の単位ベクトルp=(0,0,1)とそれぞれ成す角度γ、γ、γは、それぞれ次の式(14)、式(15)、式(16)で計算される。 Therefore, the angles γ x , γ y , and γ z formed by the unit vectors a x , a y , and a z with the unit vector p = (0, 0, 1) in the direction of gravity are respectively expressed by the following formulas ( 14), equation (15), and equation (16).

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

ここで、図2(B)で示した遠心加速度Rが極めて小さい場合は、加速度センサー10x、10y、10zが検出する加速度成分g、g、gは、重力加速度Gのx軸、y軸、z軸方向の成分と一致する。すなわち、g=G・cosγ、g=G・cosγ、g=G・cosγなので、式(14)、式(15)、式(16)より、それぞれ次の式(17)、式(18)、式(19)が導かれる。なお、式(17)、式(18)、式(19)におけるD、D、Dはそれぞれ式(20)、式(21)、式(22)で与えられる。 Here, when the centrifugal acceleration R shown in FIG. 2B is extremely small, the acceleration components g x , g y , and g z detected by the acceleration sensors 10x, 10y, and 10z are the x-axis of the gravitational acceleration G, y This coincides with the components in the axial and z-axis directions. That is, since g x = G · cos γ x , g y = G · cos γ y , and g z = G · cos γ z , the following formula (17) is obtained from formula (14), formula (15), and formula (16), respectively. Equation (18) and Equation (19) are derived. Note that D 1 , D 2 , and D 3 in Expression (17), Expression (18), and Expression (19) are given by Expression (20), Expression (21), and Expression (22), respectively.

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

式(17)、式(18)、式(19)をまとめると、次の式(23)が得られる。   When the equations (17), (18), and (19) are put together, the following equation (23) is obtained.

Figure 2012037405
Figure 2012037405

この式(23)に対してクラメルの公式を適用すると、D、D、Dがそれぞれ次の式(24)、式(25)、式(26)により求まる。 When Kramel's formula is applied to this equation (23), D 1 , D 2 , and D 3 are obtained by the following equations (24), (25), and (26), respectively.

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

、D、Dは、それぞれ式(20)、式(21)、式(22)により与えられるので、D、D、Dの1階微分はそれぞれ次の式(27)、式(28)、式(29)で計算される。 Since D 1 , D 2 , and D 3 are given by Expression (20), Expression (21), and Expression (22), respectively, the first derivatives of D 1 , D 2 , and D 3 are respectively expressed by the following expressions (27) , (28) and (29).

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

、D、Dの2階微分は、式(27)、式(28)、式(29)をさらに微分して、それぞれ次の式(30)、式(31)、式(32)で計算される。 The second derivatives of D 1 , D 2 , and D 3 are obtained by further differentiating the expressions (27), (28), and (29), and the following expressions (30), (31), and (32), respectively. ).

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

ここで、式(20)、式(21)、式(22)から、次式(33)の関係式が得られる。   Here, a relational expression of the following expression (33) is obtained from the expressions (20), (21), and (22).

Figure 2012037405
Figure 2012037405

また、式(27)、式(28)、式(29)から、次式(34)の関係式が得られる。   Further, a relational expression of the following expression (34) is obtained from the expressions (27), (28), and (29).

Figure 2012037405
Figure 2012037405

また、式(30)、式(31)、式(32)から、次式(35)の関係式が得られる。   Further, the relational expression of the following expression (35) is obtained from the expressions (30), (31), and (32).

Figure 2012037405
Figure 2012037405

式(33)、式(34)、式(35)をまとめると、次の式(36)が得られる。   When the equations (33), (34), and (35) are put together, the following equation (36) is obtained.

Figure 2012037405
Figure 2012037405

この式(36)に対してクラメルの公式を適用すると、n、n、nがそれぞれ次の式(37)、式(38)、式(39)により求まる。 Applying Cramer formula for this equation (36), n x, n y, n z is each of the following equation (37), equation (38), obtained by the equation (39).

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

Figure 2012037405
Figure 2012037405

最後に、式(27)と式(28)からδを消去することで、次の式(40)により、センサー装置1Bに加わる角速度ωの2乗が求まる。   Finally, by eliminating δ from the equations (27) and (28), the square of the angular velocity ω applied to the sensor device 1B is obtained by the following equation (40).

Figure 2012037405
Figure 2012037405

ここで、センサー装置1Bが初期状態のまま停止もしくは等速直線運動をしていれば(回転運動をしていなければ)、センサー装置1Bには角速度が加わらないので、角速度センサー20x、20y、20zはすべてゼロ点電圧を出力する。この時、g、g、gの時間変化は0でありD1、D2、D3は一定値となるため、D1、D2、D3を1階微分した値はすべて0になる。そのため、式(40)により計算されるωが0になる。 Here, if the sensor device 1B is stopped in the initial state or is in a linear motion at a constant speed (if it is not rotating), no angular velocity is applied to the sensor device 1B, so the angular velocity sensors 20x, 20y, 20z All output zero-point voltage. At this time, the time changes of g x , g y , and g z are 0, and D1, D2, and D3 are constant values. Therefore, the values obtained by first-order differentiation of D1, D2, and D3 are all 0. Therefore, ω 2 calculated by the equation (40) becomes zero.

一方、センサー装置1Bが任意の軸n=(n、n、n)回りの回転運動をしていれば、センサー装置1Bにはこの回転運動の角速度が加わり、角速度センサー20x、20y、20zは、この角速度のx軸成分、y軸成分、z軸成分を検出することになる。この時、g、g、gが時間変化するため、式(40)により計算されるωが0にならない。 On the other hand, the sensor apparatus 1B any axis n = (n x, n y , n z) if the rotational motion around, the sensor device 1B joined by an angular velocity of this rotational movement, the angular velocity sensor 20x, 20y, 20z detects the x-axis component, y-axis component, and z-axis component of this angular velocity. At this time, since g x , g y , and g z change with time, ω 2 calculated by Expression (40) does not become zero.

そこで、角速度判定部230は、式(40)で計算されるωが0になるか否かによってセンサー装置1Bに加わる角速度が0か否かを判定し、角速度センサー20x、20y、20zのオフセット補正処理のタイミングを制御する。ただし、実際には、加速度センサー10x、10y、10zの出力オフセットやセンサー装置1Bの使用環境におけるノイズ等の環境因により、センサー装置1Bが停止若しくは等速運動をしていても加速度センサー10x、10y、10zによって検出される加速度gが重力加速度Gと微妙に一致しないことが想定される。そのため、角速度判定部230は、例えば、式(40)で計算されるωが微小値Δ以下であれば、すなわちω≦Δを満たせば、センサー装置1Bに加わる角速度が0であると判定するようにしてもよい。この微小値Δは、センサー装置1Bを使用するアプリケーション側の仕様等によって適切な値が設定される。 Therefore, the angular velocity determination unit 230, an angular velocity applied to the sensor apparatus 1B determines whether 0 or not depending on whether omega 2 which is calculated by the equation (40) becomes zero, the angular velocity sensor 20x, 20y, offset 20z Controls the timing of the correction process. However, actually, even if the sensor device 1B stops or moves at a constant speed due to environmental factors such as an output offset of the acceleration sensors 10x, 10y, and 10z and noise in the environment where the sensor device 1B is used, the acceleration sensors 10x and 10y It is assumed that the acceleration g detected by 10z does not slightly match the gravitational acceleration G. Therefore, the angular velocity determination unit 230 determines that the angular velocity applied to the sensor device 1B is 0, for example, if ω 2 calculated by the equation (40) is less than or equal to a small value Δ, that is, satisfies ω 2 ≦ Δ. You may make it do. The minute value Δ is set to an appropriate value according to the specification on the application side using the sensor device 1B.

[オフセット補正処理]
図7は、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理の第1の例を示すフローチャート図である。
[Offset correction processing]
FIG. 7 is a flowchart showing a first example of offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment.

まず、初期状態検出部210が加速度センサー10x、10y、10zの検出信号をサンプリングし、x軸、y軸、z軸方向の加速度成分g,g,gを計算する(ステップS110)。 First, the initial state detection unit 210 samples detection signals from the acceleration sensors 10x, 10y, and 10z, and calculates acceleration components g x , g y , and g z in the x-axis, y-axis, and z-axis directions (step S110).

次に、初期状態検出部210がg=g +g +g を計算する(ステップS120)。 Next, the initial state detection unit 210 calculates g 2 = g x 2 + g y 2 + g z 2 (step S120).

次に、初期状態検出部210がg +g +g とGが一致するか否かを判定し(ステップS130)、g≠G(初期状態を未検出)の場合は(ステップS130のN)、ステップS110とS120の処理を再度行う。 Next, the initial state detection unit 210 determines whether g x 2 + g y 2 + g z 2 and G 2 match (step S130). If g 2 ≠ G 2 (the initial state is not detected), (N of step S130), the process of step S110 and S120 is performed again.

一方、g=Gの場合は(ステップS130のY)、初期状態検出部210が初期状態を検出し(ステップS140)、角速度算出部220が、式(7)、式(8)、式(9)により、姿勢情報算出部70が算出する姿勢角(φ,θ,ψ)から、初期状態における加速度センサー10x、10y、10zのx軸方向、y軸方向、軸方向の単位ベクトルa ,a ,a を計算する(ステップS150)。 On the other hand, when g 2 = G 2 (Y in step S130), the initial state detection unit 210 detects the initial state (step S140), and the angular velocity calculation unit 220 detects the equations (7), (8), and According to (9), from the posture angle (φ, θ, ψ) calculated by the posture information calculation unit 70, the x-axis direction, y-axis direction, and axial direction unit vector a x of the acceleration sensors 10x, 10y, and 10z in the initial state. R 1 , a y R and a z R are calculated (step S150).

次に、角速度算出部220が、ステップS150で得られた単位ベクトルa ,a ,a とステップS110で得られた加速度成分g,g,gから、式(24)、式(25)、式(26)により、D,D,Dを計算する(ステップS160)。 Next, the angular velocity calculation unit 220 calculates the equation (24) from the unit vectors a x R , a y R , a z R obtained in step S150 and the acceleration components g x , g y , g z obtained in step S110. ), formula (25), the equation (26), calculates the D 1, D 2, D 3 ( step S160).

次に、角速度算出部220が、D,D,Dの1階微分を計算する(ステップS170)。具体的には、角速度算出部220が、ステップS160で計算した今回のD,D,Dと前回のD,D,D(1サンプル前のg,g,gから計算したD,D,D)との各差分(D,D,Dの1階差分)を計算する。 Next, the angular velocity calculation unit 220 calculates first-order derivatives of D 1 , D 2 , and D 3 (Step S170). Specifically, the angular velocity calculation unit 220 calculates the current D 1 , D 2 , D 3 and the previous D 1 , D 2 , D 3 (g x , g y , g z one sample before) calculated in step S160. Each difference (D 1 , D 2 , D 3 first-order difference) with D 1 , D 2 , D 3 ) calculated from ( 1 ) is calculated.

次に、角速度算出部220が、式(30)、式(31)、式(32)により、D,D,Dの2階微分を計算する(ステップS180)。具体的には、角速度算出部220が、ステップS170で計算した今回のD,D,Dの1階差分と前回のD,D,Dの1階差分(1サンプル前のg,g,gから計算したD,D,Dの1階差分)との各差分(D,D,Dの2階差分)を計算する。 Next, the angular velocity calculation unit 220 calculates the second derivative of D 1 , D 2 , and D 3 using Equation (30), Equation (31), and Equation (32) (Step S180). Specifically, the angular velocity calculation unit 220 calculates the first-order difference between the current D 1 , D 2 , and D 3 calculated in step S170 and the previous first-order difference between D 1 , D 2 , and D 3 (one sample before) Each difference ( second difference of D 1 , D 2 , D 3 ) with D 1 , D 2 , D 3 calculated from g x , g y , g z is calculated.

次に、角速度算出部220が、式(40)により、ωを計算する(ステップS190)。 Next, the angular velocity calculation unit 220 calculates ω 2 according to the equation (40) (step S190).

次に、角速度判定部230がω=0か否かを判定し(ステップS200)、ω≠0の場合は(ステップS200のN)、ステップS110〜S190の処理を再度行う。 Next, the angular velocity determination unit 230 determines whether or not ω 2 = 0 (step S200). If ω 2 ≠ 0 (N in step S200), the processes in steps S110 to S190 are performed again.

一方、ω=0の場合は(ステップS200のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS210)。 On the other hand, when ω 2 = 0 (Y in step S200), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S210).

図8は、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理の第2の例を示すフローチャート図である。図8において、図7と同じ処理を行うステップには同じ符号を付しており、その説明を省略又は簡略する。   FIG. 8 is a flowchart showing a second example of offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment. 8, steps that perform the same processing as in FIG. 7 are denoted by the same reference numerals, and the description thereof is omitted or simplified.

まず、初期状態検出部210がステップS110〜S140の処理を行う。   First, the initial state detection unit 210 performs steps S110 to S140.

まず、角速度判定部230が所定時間T2の計測を開始する(ステップS142)。   First, the angular velocity determination unit 230 starts measuring the predetermined time T2 (step S142).

次に、角速度算出部220がステップS150〜S190の処理を行った後、角速度判定部230がω=0か否かを判定し(ステップS200)、ω≠0の場合は(ステップS200のN)、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を再度行う。 Next, after the angular velocity calculation unit 220 performs the processing of steps S150 to S190, the angular velocity determination unit 230 determines whether or not ω 2 = 0 (step S200). If ω 2 ≠ 0 (step S200) N), the initial state detection unit 210 performs the initial state detection processing (steps S110 to S140) again.

一方、ω=0の場合は(ステップS200のY)、角速度判定部230が、ステップS142で計測を開始してから所定時間T2が経過したか否かを判定し(ステップS202)、所定時間T2が経過していない場合は(ステップS202のN)、初期状態検出部210が加速度センサー10x、10y、10zの検出信号をサンプリングしてx軸、y軸、z軸方向の加速度成分g,g,gを計算し(ステップS204)、所定時間T2が経過するまで、ステップS150〜S200の処理を繰り返し行う。ただし、所定時間T2が経過する前に、ステップS200の判定処理でω≠0となった場合は、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を再度行う。 On the other hand, when ω 2 = 0 (Y in step S200), the angular velocity determination unit 230 determines whether or not a predetermined time T2 has elapsed since the measurement was started in step S142 (step S202), and the predetermined time When T2 has not elapsed (N in step S202), the initial state detection unit 210 samples the detection signals of the acceleration sensors 10x, 10y, and 10z, and the acceleration components g x , x- axis, z-axis directions, g y and g z are calculated (step S204), and the processes of steps S150 to S200 are repeated until the predetermined time T2 elapses. However, if ω 2 ≠ 0 in the determination process of step S200 before the predetermined time T2 has elapsed, the initial state detection unit 210 performs the initial state detection process (the processes of steps S110 to S140) again.

所定時間T2が経過した場合は(ステップS202のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS210)。   When the predetermined time T2 has elapsed (Y in step S202), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S210).

このようにすれば、センサー装置1Bに所定時間T2以上継続して角速度が加わっていないのか瞬時的に角速度が0となっただけなのかを区別し、前者の場合だけ角速度センサー20x、20y、20zのオフセット補正を行うようにすることができる。   In this way, it is distinguished whether the angular velocity is continuously applied to the sensor device 1B for a predetermined time T2 or more, or whether the angular velocity is instantaneously zero, and only in the former case, the angular velocity sensors 20x, 20y, 20z are distinguished. The offset correction can be performed.

以上に説明した第2実施形態のセンサー装置によれば、第1実施形態のセンサー装置と同様の効果を奏することができる。さらに、第2実施形態のセンサー装置によれば、加速度センサーが検知できないような小さい遠心力が加わった場合でも、初期状態からの加速度成分の時間変化をモニターすることで、角速度センサーに加わる角速度を検知することができる。そのため、角速度センサーのオフセット補正を行うタイミングの判定精度を高めることができる。   According to the sensor device of the second embodiment described above, the same effects as the sensor device of the first embodiment can be obtained. Furthermore, according to the sensor device of the second embodiment, even when a small centrifugal force that cannot be detected by the acceleration sensor is applied, the angular velocity applied to the angular velocity sensor can be reduced by monitoring the temporal change of the acceleration component from the initial state. Can be detected. Therefore, the determination accuracy of the timing for performing the offset correction of the angular velocity sensor can be improved.

(3)第3実施形態
[構成]
図9は、第3実施形態のセンサー装置の概略構成図である。図9において、図5と同じ構成要素には同じ符号を付しており、その説明を省略又は簡略する。
(3) Third Embodiment [Configuration]
FIG. 9 is a schematic configuration diagram of the sensor device of the third embodiment. 9, the same components as those in FIG. 5 are denoted by the same reference numerals, and the description thereof is omitted or simplified.

図9に示すように、第3実施形態のセンサー装置1Cは、図5の判定部40に代えて判定部80を含む。   As illustrated in FIG. 9, the sensor device 1 </ b> C of the third embodiment includes a determination unit 80 instead of the determination unit 40 of FIG. 5.

本実施形態では、判定部80は、図5と同じ初期状態検出部210と角速度算出部220を含んで構成されている。   In this embodiment, the determination unit 80 includes the same initial state detection unit 210 and angular velocity calculation unit 220 as those in FIG.

また、本実施形態では、判定部80は、判定モード制御部240を含む。判定モード制御部240は、制御信号に応じて第1の判定モードと第2の判定モードを切り替える。この制御信号は、センサー装置1Cの外部から供給されてもよいし、センサー装置1Cの内部で生成してもよい。   In the present embodiment, the determination unit 80 includes a determination mode control unit 240. The determination mode control unit 240 switches between the first determination mode and the second determination mode according to the control signal. This control signal may be supplied from the outside of the sensor device 1C, or may be generated inside the sensor device 1C.

また、本実施形態では、判定部80は、角速度判定部250を含む。角速度判定部250は、第1の判定モードでは、初期状態検出部210が初期状態を検出した場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。本実施形態では、角速度判定部250は、第1の判定モードでは、g +g +g =Gであれば、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。 In the present embodiment, the determination unit 80 includes an angular velocity determination unit 250. In the first determination mode, the angular velocity determination unit 250 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero when the initial state detection unit 210 detects the initial state. In the present embodiment, in the first determination mode, the angular velocity determination unit 250 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is 0 if g x 2 + g y 2 + g z 2 = G 2. To do.

また、角速度判定部250は、第2の判定モードでは、角速度算出部220が算出した角速度が略0である場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。本実施形態では、角速度判定部250は、第2の判定モードでは、ω=0であれば、角速度センサー20x、20y、20zに加わる角速度が0であると判定する。 Further, in the second determination mode, the angular velocity determination unit 250 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero when the angular velocity calculated by the angular velocity calculation unit 220 is approximately zero. In the present embodiment, the angular velocity determination unit 250 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is zero in the second determination mode if ω 2 = 0.

例えば、角速度判定部250は、第1の判定モードでは、初期状態検出部210が所定時間継続して初期状態を検出した場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定するようにしてもよい。また、例えば、角速度判定部250は、第2の判定モードでは、角速度算出部220が算出した角速度ωが略0の状態が所定時間継続した場合に、角速度センサー20x、20y、20zに加わる角速度が0であると判定するようにしてもよい。   For example, in the first determination mode, the angular velocity determination unit 250 determines that the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z is 0 when the initial state detection unit 210 detects the initial state for a predetermined time. You may make it do. In addition, for example, in the second determination mode, the angular velocity determination unit 250 determines the angular velocity applied to the angular velocity sensors 20x, 20y, and 20z when the angular velocity ω calculated by the angular velocity calculation unit 220 is substantially zero for a predetermined time. You may make it determine with it being 0.

このように、本実施形態のセンサー装置1Cは、第1の判定モードでは、加速度センサー10x、10y、10zの出力電圧を周期的にサンプリングして順次得られる加速度の2乗和(g +g +g )と重力加速度の2乗(G)が一致したタイミングで、角速度センサー20x、20y、20zの出力のオフセット(ゼロ点オフセット)を自動的に補正する。また、本実施形態のセンサー装置1Cは、第2の判定モードでは、初期状態におけるx軸、y軸、z軸方向の軸ベクトルと、加速度センサー10x、10y、10zの出力電圧を周期的にサンプリングして順次得られるx軸、y軸、z軸方向の加速度成分と、当該加速度成分の時間変化とに基づいて計算される角速度ωの2乗が0となるタイミングで、角速度センサー20x、20y、20zの出力のオフセット(ゼロ点オフセット)を自動的に補正する。 As described above, in the first determination mode, the sensor device 1C according to the present embodiment periodically sums the squares of accelerations (g x 2 + g) obtained by periodically sampling the output voltages of the acceleration sensors 10x, 10y, and 10z. The offset (zero point offset) of the outputs of the angular velocity sensors 20x, 20y, and 20z is automatically corrected at the timing when y 2 + g z 2 ) and the square of gravity acceleration (G 2 ) coincide. In the second determination mode, the sensor device 1C according to the present embodiment periodically samples the axis vectors in the x-axis, y-axis, and z-axis directions in the initial state and the output voltages of the acceleration sensors 10x, 10y, and 10z. The angular velocity sensors 20x, 20y, 20x, 20y, and the angular velocity sensors 20x, 20y, The offset of the output of 20z (zero point offset) is automatically corrected.

[オフセット補正処理]
図10は、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理の第1の例を示すフローチャート図である。図10において、図7と同じ処理を行うステップには同じ符号を付しており、その説明を省略又は簡略する。
[Offset correction processing]
FIG. 10 is a flowchart illustrating a first example of offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment. 10, steps that perform the same processing as in FIG. 7 are denoted by the same reference numerals, and description thereof is omitted or simplified.

まず、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を行う。   First, the initial state detection unit 210 performs initial state detection processing (steps S110 to S140).

次に、第1の判定モードであれば(ステップS144のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS210)。   Next, if it is 1st determination mode (Y of step S144), the offset correction part 40 will perform offset correction of the angular velocity sensors 20x, 20y, and 20z (step S210).

第1の判定モードでなければ(すなわち第2の判定モードであれば)(ステップS144のN)、角速度算出部220がステップS150〜S190の処理を行った後、角速度判定部250がω=0か否かを判定し(ステップS200)、ω≠0の場合は(ステップS200のN)、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を再度行う。 If it is not the first determination mode (that is, if it is the second determination mode) (N in step S144), after the angular velocity calculation unit 220 performs the processing of steps S150 to S190, the angular velocity determination unit 250 sets ω 2 =. It is determined whether or not 0 (step S200). If ω 2 ≠ 0 (N in step S200), the initial state detection unit 210 performs the initial state detection process (steps S110 to S140) again.

一方、ω=0の場合は(ステップS200のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS210)。 On the other hand, when ω 2 = 0 (Y in step S200), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S210).

図11は、本実施形態における、角速度センサー20x、20y、20zのオフセット補正処理の第2の例を示すフローチャート図である。図11において、図10と同じ処理を行うステップには同じ符号を付しており、その説明を省略又は簡略する。   FIG. 11 is a flowchart showing a second example of offset correction processing of the angular velocity sensors 20x, 20y, and 20z in the present embodiment. 11, steps that perform the same processing as in FIG. 10 are denoted by the same reference numerals, and description thereof is omitted or simplified.

まず、第1の判定モードであれば(ステップS102のY)、角速度判定部250が所定時間T1の計測を開始する(ステップS104)。   First, if it is the 1st determination mode (Y of Step S102), angular velocity judgment part 250 will start measurement of predetermined time T1 (Step S104).

次に、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を行う。   Next, the initial state detection unit 210 performs initial state detection processing (steps S110 to S140).

次に、第1の判定モードであれば(ステップS144のY)、角速度判定部250が、ステップS104で計測を開始してから所定時間T1が経過したか否かを判定し(ステップS145)、所定時間T1が経過していない場合は(ステップS145のN)、所定時間T1が経過するまで、初期状態検出部210がステップS110〜S140の処理を再度行う。そして、所定時間T1が経過した場合は(ステップS145のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS210)。   Next, if it is the first determination mode (Y in step S144), the angular velocity determination unit 250 determines whether or not a predetermined time T1 has elapsed since the start of measurement in step S104 (step S145). If the predetermined time T1 has not elapsed (N in step S145), the initial state detection unit 210 performs the processes in steps S110 to S140 again until the predetermined time T1 has elapsed. When the predetermined time T1 has elapsed (Y in step S145), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S210).

第1の判定モードでなければ(すなわち第2の判定モードであれば)(ステップS144のN)、角速度判定部250が所定時間T2の計測を開始する(ステップS148)。   If it is not the first determination mode (that is, if it is the second determination mode) (N in Step S144), the angular velocity determination unit 250 starts measuring the predetermined time T2 (Step S148).

次に、角速度算出部220がステップS150〜S190の処理を行った後、角速度判定部250がω=0か否かを判定し(ステップS200)、ω≠0の場合は(ステップS200のN)、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を再度行う。 Next, after the angular velocity calculation unit 220 performs steps S150 to S190, the angular velocity determination unit 250 determines whether ω 2 = 0 (step S200). If ω 2 ≠ 0 (step S200) N), the initial state detection unit 210 performs the initial state detection processing (steps S110 to S140) again.

一方、ω=0の場合は(ステップS200のY)、角速度判定部250が、ステップS148で計測を開始してから所定時間T2が経過したか否かを判定し(ステップS202)、所定時間T2が経過していない場合は(ステップS202のN)、初期状態検出部210が加速度センサー10x、10y、10zの検出信号をサンプリングしてx軸、y軸、z軸方向の加速度成分g,g,gを計算し(ステップS204)、所定時間T2が経過するまで、ステップS150〜S200の処理を繰り返し行う。ただし、所定時間T2が経過する前に、ステップS200の判定処理でω≠0となった場合は、初期状態検出部210が初期状態の検出処理(ステップS110〜S140の処理)を再度行う。 On the other hand, if ω 2 = 0 (Y in step S200), the angular velocity determination unit 250 determines whether or not a predetermined time T2 has elapsed since the measurement was started in step S148 (step S202), and the predetermined time When T2 has not elapsed (N in step S202), the initial state detection unit 210 samples the detection signals of the acceleration sensors 10x, 10y, and 10z, and the acceleration components g x , x- axis, z-axis directions, g y and g z are calculated (step S204), and the processes of steps S150 to S200 are repeated until the predetermined time T2 elapses. However, if ω 2 ≠ 0 in the determination process of step S200 before the predetermined time T2 has elapsed, the initial state detection unit 210 performs the initial state detection process (the processes of steps S110 to S140) again.

所定時間T2が経過した場合は(ステップS202のY)、オフセット補正部40が角速度センサー20x、20y、20zのオフセット補正を行う(ステップS210)。   When the predetermined time T2 has elapsed (Y in step S202), the offset correction unit 40 performs offset correction of the angular velocity sensors 20x, 20y, and 20z (step S210).

このようにすれば、第1の判定モードでは、センサー装置1Cに所定時間T1以上継続して遠心力が加わっていないのか瞬時的に遠心力が0となっただけなのかを区別し、前者の場合だけ角速度センサー20x、20y、20zのオフセット補正を行うようにすることができる。また、第2の判定モードでは、センサー装置1Cに所定時間T2以上継続して角速度が加わっていないのか瞬時的に角速度が0となっただけなのかを区別し、前者の場合だけ角速度センサー20x、20y、20zのオフセット補正を行うようにすることができる。   In this way, in the first determination mode, it is distinguished whether the centrifugal force is continuously applied to the sensor device 1C for a predetermined time T1 or more, or whether the centrifugal force is instantaneously zero. The offset correction of the angular velocity sensors 20x, 20y, and 20z can be performed only in the case. Further, in the second determination mode, it is distinguished whether the angular velocity is continuously applied to the sensor device 1C for a predetermined time T2 or whether the angular velocity is instantaneously zero, and only in the former case, the angular velocity sensor 20x, It is possible to perform offset correction of 20y and 20z.

以上に説明した第3実施形態のセンサー装置によれば、第1実施形態のセンサー装置と同様の効果を奏することができる。さらに、第3実施形態のセンサー装置によれば、当該センサー装置を使用するアプリケーションに応じて、第1の判定モードと第2の判定モードのいずれを使用するかで、角速度センサーのオフセット補正タイミングの判定精度を変更することができる。すなわち、第1の判定モードにすれば、遠心力の検出による簡易な判定になり、第2の判定モードにすれば、加速度センサーで検出できないような微小な遠心力が加わった場合でも当該センサー装置に加わる角速度が0か否かを判定することができる。   According to the sensor device of the third embodiment described above, the same effect as that of the sensor device of the first embodiment can be obtained. Furthermore, according to the sensor device of the third embodiment, the offset correction timing of the angular velocity sensor is determined depending on which one of the first determination mode and the second determination mode is used according to the application using the sensor device. The determination accuracy can be changed. That is, if the first determination mode is set, the determination is simple based on the detection of the centrifugal force. If the second determination mode is set, the sensor device even when a minute centrifugal force that cannot be detected by the acceleration sensor is applied. It can be determined whether or not the angular velocity applied to is zero.

2.電子機器
図12は、本実施形態のセンサー装置を含む電子機器の構成例を示す機能ブロック図である。本実施形態の電子機器500は、センサー装置400、ホストCPU300、操作部310、表示部320、ROM(Read Only Memory)330、RAM(Random Access Memory)340、通信部350を含んで構成されている。
2. Electronic Device FIG. 12 is a functional block diagram illustrating a configuration example of an electronic device including the sensor device of the present embodiment. The electronic device 500 of the present embodiment includes a sensor device 400, a host CPU 300, an operation unit 310, a display unit 320, a ROM (Read Only Memory) 330, a RAM (Random Access Memory) 340, and a communication unit 350. .

ホストCPU(マイクロコンピューター)300は、ROM330に記憶されているプログラムに従って、各種の計算処理や制御処理を行う。具体的には、ホストCPU300は、センサー装置400に対して各種の制御コマンドを送信してセンサー装置400の動作を制御したり、センサー装置400からデータを受け取って各種の計算処理をする。また、ホストCPU300は、操作部310からの操作信号に応じた各種の処理、表示部320に各種の情報を表示させるための表示信号を送信する処理、外部とデータ通信を行うために通信部350を制御する処理等を行う。   A host CPU (microcomputer) 300 performs various types of calculation processing and control processing in accordance with programs stored in the ROM 330. Specifically, the host CPU 300 transmits various control commands to the sensor device 400 to control the operation of the sensor device 400, or receives data from the sensor device 400 and performs various calculation processes. In addition, the host CPU 300 performs various processes in accordance with operation signals from the operation unit 310, processes for transmitting display signals for displaying various types of information on the display unit 320, and a communication unit 350 for performing data communication with the outside. The process etc. which control are performed.

操作部310は、操作キーやボタンスイッチ等により構成される入力装置であり、ユーザーによる操作に応じた操作信号をホストCPU300に出力する。   The operation unit 310 is an input device including operation keys, button switches, and the like, and outputs an operation signal corresponding to an operation by a user to the host CPU 300.

表示部320は、LCD(Liquid Crystal Display)等により構成される表示装置であり、ホストCPU300から入力される表示信号に基づいて各種の情報(例えば、ナビゲーション情報等)を表示する。   The display unit 320 is a display device configured by an LCD (Liquid Crystal Display) or the like, and displays various types of information (for example, navigation information) based on a display signal input from the host CPU 300.

ROM330は、ホストCPU300が各種の計算処理や制御処理を行うためのプログラムや、各種のアプリケーションプログラムやデータ等(例えば、ナビゲーションや姿勢制御を行うためのプログラムやデータ等)を記憶している。   The ROM 330 stores programs for the host CPU 300 to perform various calculation processes and control processes, various application programs, data, and the like (for example, programs and data for performing navigation and attitude control).

RAM340は、ホストCPU300の作業領域として用いられ、ROM330から読み出されたプログラムやデータ、操作部310から入力されたデータ、ホストCPU300が各種プログラムに従って実行した演算結果等を一時的に記憶する。   The RAM 340 is used as a work area of the host CPU 300, and temporarily stores programs and data read from the ROM 330, data input from the operation unit 310, calculation results executed by the host CPU 300 according to various programs, and the like.

通信部350は、CPU300と外部装置との間のデータ通信を成立させるための各種制御を行う。   The communication unit 350 performs various controls for establishing data communication between the CPU 300 and an external device.

センサー装置400は、例えば、前述した第1実〜第3実施形態のセンサー装置1A、1B、1C等であり、電子機器500の内部において、センサーのx軸、y軸、z軸が電子機器500を基準として所定の方向に向くように固定して配置されている。そして、センサー装置400は、当該センサー装置400(電子機器500)に加わる角速度が0でるか否かを判定し、角速度が0の時に角速度センサーの0点電圧のオフセットを補正する。このセンサー装置400を電子機器500に組み込むことにより、アプリケーションによらずセンサー装置の角速度センサーのオフセットを自動的に補正することができる。   The sensor device 400 is, for example, the sensor devices 1A, 1B, 1C or the like of the first to third embodiments described above, and the x-axis, y-axis, and z-axis of the sensor are in the electronic device 500 inside the electronic device 500. Are fixed and arranged so as to face in a predetermined direction. Then, the sensor device 400 determines whether or not the angular velocity applied to the sensor device 400 (electronic device 500) is zero, and corrects the offset of the zero point voltage of the angular velocity sensor when the angular velocity is zero. By incorporating this sensor device 400 into the electronic device 500, the offset of the angular velocity sensor of the sensor device can be automatically corrected regardless of the application.

なお、電子機器500としては、ゲームコントローラや3次元マウス等の入力機器、ラジコンヘリ等の玩具、ロボット、航法装置(ナビゲーション装置)、携帯電話機、モバイルパソコン等の種々の電子機器が挙げられる。   Examples of the electronic device 500 include various electronic devices such as a game controller and an input device such as a three-dimensional mouse, a toy such as a radio controlled helicopter, a robot, a navigation device (navigation device), a mobile phone, and a mobile personal computer.

なお、本発明は本実施形態に限定されず、本発明の要旨の範囲内で種々の変形実施が可能である。   In addition, this invention is not limited to this embodiment, A various deformation | transformation implementation is possible within the range of the summary of this invention.

例えば、本実施形態のセンサー装置では、3つの角速度センサーを含んでいるが、1つ以上の角速度センサーを含んでいればよい。   For example, the sensor device according to the present embodiment includes three angular velocity sensors, but may include one or more angular velocity sensors.

また、例えば、本実施形態のセンサー装置では、3つの加速度センサーを含んでいるが、3つ以上の加速度センサーを含み、それらの加速度センサーの一部又は全部の出力に基づいて互いに直交する3軸方向の加速度を算出するように変形してもよい。さらに、3つの加速度センサーは、必ずしも3つの検出軸が互いに直交するように配置されている必要はなく、3軸が互いに平行にならないように配置されていればよい。3軸が互いに直交しない場合は、アラインメント補正により、3軸方向の角速度を直交座標系における角速度に変換した後、本実施形態において説明した処理を行うようにすればよい。   Further, for example, the sensor device of the present embodiment includes three acceleration sensors, but includes three or more acceleration sensors, and three axes orthogonal to each other based on part or all of the outputs of the acceleration sensors. You may deform | transform so that the acceleration of a direction may be calculated. Further, the three acceleration sensors are not necessarily arranged so that the three detection axes are orthogonal to each other, and may be arranged so that the three axes are not parallel to each other. When the three axes are not orthogonal to each other, the processing described in the present embodiment may be performed after the angular velocity in the three-axis direction is converted into the angular velocity in the orthogonal coordinate system by alignment correction.

また、本実施形態のセンサー装置では、角速度センサー20x、20y、20zがゼロ点電圧の調整機能を有し、オフセット補正部40は角速度センサー20x、20y、20zにゼロ点調整信号を供給することで、オフセット補正処理を実現しているが、これに限られない。例えば、角速度センサー20x、20y、20zがゼロ点電圧の調整機能を有していない場合は、オフセット補正部40は、オフセット補正処理のタイミングにおける角速度センサー20x、20y、20zの出力電圧と仕様上のゼロ点電圧との誤差に応じた補正電圧を発生させ、この補正電圧と角速度センサー20x、20y、20zの出力電圧とをそれぞれ電圧加算することで、これらの出力電圧を仕様上のゼロ点電圧と一致させるようにしてもよい。   In the sensor device of the present embodiment, the angular velocity sensors 20x, 20y, and 20z have a zero point voltage adjustment function, and the offset correction unit 40 supplies a zero point adjustment signal to the angular velocity sensors 20x, 20y, and 20z. Although the offset correction processing is realized, the present invention is not limited to this. For example, when the angular velocity sensors 20x, 20y, and 20z do not have a zero point voltage adjustment function, the offset correction unit 40 is based on the output voltage of the angular velocity sensors 20x, 20y, and 20z at the timing of the offset correction processing and the specifications. A correction voltage corresponding to an error from the zero point voltage is generated, and the correction voltage and the output voltages of the angular velocity sensors 20x, 20y, and 20z are added to each other, so that these output voltages are converted into the zero point voltage in the specification. You may make it match.

また、第2、第3実施形態のセンサー装置は、姿勢情報算出部70を含む姿勢センサーとして構成されており、角速度算出部220は、姿勢情報算出部70が算出する姿勢角を初期状態における姿勢角(φ,θ,ψ)としてωの計算を行っているが、これに限られない。センサー装置が姿勢センサーでなければ姿勢情報算出部70を含まず、角速度算出部220は、初期状態における姿勢角(φ,θ,ψ)をセンサー装置の外部から受け取って、ωの計算を行うようにしてもよい。また、地磁気センサー60x、60y、60zは必須の構成要素ではないので省略してもよい。 The sensor devices of the second and third embodiments are configured as posture sensors including the posture information calculation unit 70, and the angular velocity calculation unit 220 sets the posture angle calculated by the posture information calculation unit 70 in the initial state. angle (φ, θ, ψ) is performed the ω 2 of the calculation as, but not limited to this. If the sensor device is not the posture sensor, the posture information calculation unit 70 is not included, and the angular velocity calculation unit 220 receives the posture angle (φ, θ, ψ) in the initial state from the outside of the sensor device, and calculates ω 2. You may do it. Further, the geomagnetic sensors 60x, 60y, and 60z are not essential components and may be omitted.

本発明は、実施の形態で説明した構成と実質的に同一の構成(例えば、機能、方法及び結果が同一の構成、あるいは目的及び効果が同一の構成)を含む。また、本発明は、実施の形態で説明した構成の本質的でない部分を置き換えた構成を含む。また、本発明は、実施の形態で説明した構成と同一の作用効果を奏する構成又は同一の目的を達成することができる構成を含む。また、本発明は、実施の形態で説明した構成に公知技術を付加した構成を含む。   The present invention includes configurations that are substantially the same as the configurations described in the embodiments (for example, configurations that have the same functions, methods, and results, or configurations that have the same objects and effects). In addition, the invention includes a configuration in which a non-essential part of the configuration described in the embodiment is replaced. In addition, the present invention includes a configuration that exhibits the same operational effects as the configuration described in the embodiment or a configuration that can achieve the same object. Further, the invention includes a configuration in which a known technique is added to the configuration described in the embodiment.

1A,1B,1C センサー装置、10x,10y,10z 加速度センサー、20x,20y,20z 角速度センサー、30 判定部、40 オフセット補正部、50 判定部、60x,60y,60z 地磁気センサー、70 姿勢情報算出部、110 加速度算出部、120 角速度判定部、210 初期状態検出部、220 角速度算出部、230 角速度判定部、240 判定モード制御部、250 角速度判定部、300 ホストCPU、310 操作部、320 表示部、330 ROM、340 RAM、350 通信部、400 センサー装置、500 電子機器 1A, 1B, 1C sensor device, 10x, 10y, 10z acceleration sensor, 20x, 20y, 20z angular velocity sensor, 30 determination unit, 40 offset correction unit, 50 determination unit, 60x, 60y, 60z geomagnetic sensor, 70 attitude information calculation unit 110 acceleration calculation unit, 120 angular velocity determination unit, 210 initial state detection unit, 220 angular velocity calculation unit, 230 angular velocity determination unit, 240 determination mode control unit, 250 angular velocity determination unit, 300 host CPU, 310 operation unit, 320 display unit, 330 ROM, 340 RAM, 350 communication unit, 400 sensor device, 500 electronic device

Claims (6)

角速度センサーと、3つ以上の加速度センサーと、を含むセンサー装置であって、
前記加速度センサーの出力に基づいて、前記角速度センサーに加わる角速度が0であるか否かを判定する判定部と、
前記判定部により前記角速度が0であると判定された時に、前記角速度センサーの出力のオフセットを補正するオフセット補正部と、を含み、
前記判定部は、
前記加速度センサーの出力に基づいて当該センサー装置に加わる加速度を算出し、算出した加速度と重力加速度が略一致する状態を初期状態として検出する初期状態検出部と、
前記初期状態における当該センサー装置の姿勢情報に基づいて前記初期状態における各検出軸方向の軸ベクトルを算出し、当該軸ベクトルと各検出軸方向の加速度成分と当該加速度成分の時間変化とに基づいて当該センサー装置が任意の軸回りに回転する角速度を算出する角速度算出部と、
前記角速度算出部が算出した角速度が略0である場合に、前記角速度センサーに加わる角速度が0であると判定する角速度判定部と、を含む、センサー装置。
A sensor device including an angular velocity sensor and three or more acceleration sensors,
A determination unit that determines whether or not an angular velocity applied to the angular velocity sensor is 0 based on an output of the acceleration sensor;
An offset correction unit that corrects an offset of an output of the angular velocity sensor when the angular velocity is determined to be 0 by the determination unit;
The determination unit
An initial state detection unit that calculates an acceleration applied to the sensor device based on an output of the acceleration sensor, and detects a state in which the calculated acceleration and gravity acceleration substantially coincide with each other as an initial state;
An axis vector in each detection axis direction in the initial state is calculated based on posture information of the sensor device in the initial state, and based on the axis vector, an acceleration component in each detection axis direction, and a change in time of the acceleration component. An angular velocity calculator that calculates an angular velocity at which the sensor device rotates about an arbitrary axis;
An angular velocity determination unit that determines that the angular velocity applied to the angular velocity sensor is zero when the angular velocity calculated by the angular velocity calculation unit is approximately zero.
請求項1において、
前記角速度判定部は、
前記角速度算出部が算出した角速度が略0の状態が所定時間継続した場合に、前記角速度センサーに加わる角速度が0であると判定する、センサー装置。
In claim 1,
The angular velocity determination unit
A sensor device that determines that an angular velocity applied to the angular velocity sensor is zero when a state in which the angular velocity calculated by the angular velocity calculator is substantially zero continues for a predetermined time.
請求項1において、
前記判定部は、
制御信号に応じて第1の判定モードと第2の判定モードを切り替える判定モード制御部と、
前記第1の判定モードでは、前記初期状態検出部が前記初期状態を検出した場合に前記角速度センサーに加わる角速度が0であると判定し、前記第2の判定モードでは、前記角速度算出部が算出した角速度が略0である場合に前記角速度センサーに加わる角速度が0であると判定する角速度判定部と、を含む、センサー装置。
In claim 1,
The determination unit
A determination mode control unit that switches between the first determination mode and the second determination mode according to the control signal;
In the first determination mode, it is determined that the angular velocity applied to the angular velocity sensor is 0 when the initial state detection unit detects the initial state, and in the second determination mode, the angular velocity calculation unit calculates An angular velocity determination unit that determines that the angular velocity applied to the angular velocity sensor is zero when the angular velocity is approximately zero.
請求項3において、
前記角速度判定部は、
前記第1の判定モードでは、前記初期状態検出部が所定時間継続して前記初期状態を検出した場合に前記角速度センサーに加わる角速度が0であると判定し、前記第2の判定モードでは、前記角速度算出部が算出した角速度が略0の状態が所定時間継続した場合に前記角速度センサーに加わる角速度が0であると判定する、センサー装置。
In claim 3,
The angular velocity determination unit
In the first determination mode, it is determined that the angular velocity applied to the angular velocity sensor is 0 when the initial state detection unit continuously detects the initial state for a predetermined time, and in the second determination mode, the A sensor device that determines that an angular velocity applied to the angular velocity sensor is zero when a state in which the angular velocity calculated by the angular velocity calculator is substantially zero continues for a predetermined time.
請求項1乃至4のいずれかのセンサー装置を含む、電子機器。   An electronic device comprising the sensor device according to claim 1. 角速度センサーと、3つ以上の加速度センサーと、を含むセンサー装置において、前記角速度センサーの出力のオフセットを補正する角速度センサーのオフセット補正方法であって、
前記加速度センサーの出力に基づいて、前記角速度センサーに加わる角速度が0であるか否かを判定する判定ステップと、
前記判定ステップで前記角速度が0であると判定された時に、前記角速度センサーの出力のオフセットを補正するオフセット補正ステップと、を含み、
前記判定ステップは、
前記加速度センサーの出力に基づいて前記センサー装置に加わる加速度を算出し、算出した加速度と重力加速度が略一致する状態を初期状態として検出する初期状態検出ステップと、
前記初期状態における前記センサー装置の姿勢情報に基づいて前記初期状態における各検出軸方向の軸ベクトルを算出し、当該軸ベクトルと各検出軸方向の加速度成分と当該加速度成分の時間変化とに基づいて前記センサー装置が任意の軸回りに回転する角速度を算出する角速度算出ステップと、
前記角速度算出ステップで算出した角速度が略0である場合に、前記角速度センサーに加わる角速度が0であると判定する角速度判定ステップと、を含む、角速度センサーのオフセット補正方法。
An angular velocity sensor offset correction method for correcting an offset of an output of the angular velocity sensor in a sensor device including an angular velocity sensor and three or more acceleration sensors,
A determination step of determining whether an angular velocity applied to the angular velocity sensor is zero based on an output of the acceleration sensor;
An offset correction step of correcting an offset of an output of the angular velocity sensor when the angular velocity is determined to be 0 in the determination step,
The determination step includes
An initial state detecting step of calculating an acceleration applied to the sensor device based on an output of the acceleration sensor, and detecting a state in which the calculated acceleration and a gravitational acceleration substantially coincide with each other as an initial state;
An axis vector in each detection axis direction in the initial state is calculated based on posture information of the sensor device in the initial state, and based on the axis vector, an acceleration component in each detection axis direction, and a change in the acceleration component with time An angular velocity calculating step of calculating an angular velocity at which the sensor device rotates around an arbitrary axis;
An angular velocity sensor offset correction method comprising: an angular velocity determination step of determining that an angular velocity applied to the angular velocity sensor is zero when the angular velocity calculated in the angular velocity calculation step is substantially zero.
JP2010178381A 2010-08-09 2010-08-09 Sensor device, electronic apparatus, and offset correction method of angular velocity sensor Withdrawn JP2012037405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010178381A JP2012037405A (en) 2010-08-09 2010-08-09 Sensor device, electronic apparatus, and offset correction method of angular velocity sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010178381A JP2012037405A (en) 2010-08-09 2010-08-09 Sensor device, electronic apparatus, and offset correction method of angular velocity sensor

Publications (1)

Publication Number Publication Date
JP2012037405A true JP2012037405A (en) 2012-02-23

Family

ID=45849544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010178381A Withdrawn JP2012037405A (en) 2010-08-09 2010-08-09 Sensor device, electronic apparatus, and offset correction method of angular velocity sensor

Country Status (1)

Country Link
JP (1) JP2012037405A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033197A (en) * 2012-12-20 2013-04-10 西安电子工程研究所 Method for correcting zero drift of MEMS gyroscope
JP2014002113A (en) * 2012-06-20 2014-01-09 Pioneer Electronic Corp Reference voltage updating device, reference voltage updating method, reference voltage updating program and recording medium
WO2014185444A1 (en) * 2013-05-14 2014-11-20 独立行政法人産業技術総合研究所 Estimated-azimuth-angle assessment device, mobile terminal device, control program for estimated-azimuth-angle assessment device, computer-readable storage medium, control method for estimated-azimuth-angle assessment device, and positioning device
WO2019069930A1 (en) * 2017-10-04 2019-04-11 アルプスアルパイン株式会社 Electronic measuring device
US10823747B2 (en) 2017-04-28 2020-11-03 Seiko Epson Corporation Inertial sensor element control device, inertial sensor, electronic apparatus, vehicle and method of updating temperature compensation information of inertial sensor element control device
US11486894B2 (en) 2020-02-12 2022-11-01 Canon Kabushiki Kaisha Calibration apparatus and calibration method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014002113A (en) * 2012-06-20 2014-01-09 Pioneer Electronic Corp Reference voltage updating device, reference voltage updating method, reference voltage updating program and recording medium
CN103033197A (en) * 2012-12-20 2013-04-10 西安电子工程研究所 Method for correcting zero drift of MEMS gyroscope
WO2014185444A1 (en) * 2013-05-14 2014-11-20 独立行政法人産業技術総合研究所 Estimated-azimuth-angle assessment device, mobile terminal device, control program for estimated-azimuth-angle assessment device, computer-readable storage medium, control method for estimated-azimuth-angle assessment device, and positioning device
JP6044971B2 (en) * 2013-05-14 2016-12-14 国立研究開発法人産業技術総合研究所 Estimated azimuth angle evaluation apparatus, mobile terminal apparatus, estimated azimuth angle evaluation apparatus control program, computer-readable recording medium, estimated azimuth angle evaluation apparatus control method, and positioning apparatus
US10527424B2 (en) 2013-05-14 2020-01-07 National Institute Of Advanced Industrial Science And Technology Estimated-azimuth-angle assessment device, mobile terminal device, computer-readable storage medium, control method for estimated-azimuth-angle assessment device, and positioning device
US10823747B2 (en) 2017-04-28 2020-11-03 Seiko Epson Corporation Inertial sensor element control device, inertial sensor, electronic apparatus, vehicle and method of updating temperature compensation information of inertial sensor element control device
WO2019069930A1 (en) * 2017-10-04 2019-04-11 アルプスアルパイン株式会社 Electronic measuring device
US11486894B2 (en) 2020-02-12 2022-11-01 Canon Kabushiki Kaisha Calibration apparatus and calibration method
JP7406390B2 (en) 2020-02-12 2023-12-27 キヤノン株式会社 Calibration device and its control method

Similar Documents

Publication Publication Date Title
Fong et al. Methods for in-field user calibration of an inertial measurement unit without external equipment
US20160178657A9 (en) Systems and methods for sensor calibration
US20110307213A1 (en) System and method of sensing attitude and angular rate using a magnetic field sensor and accelerometer for portable electronic devices
CN109323711B (en) Gyroscope modal reversal zero self-correction method and system
US20110178707A1 (en) Apparatus and methodology for calibration of a gyroscope and a compass included in a handheld device
JP2012037405A (en) Sensor device, electronic apparatus, and offset correction method of angular velocity sensor
KR101922700B1 (en) Method and Apparatus for calculation of angular velocity using acceleration sensor and geomagnetic sensor
JP2007040763A (en) Correction device of acceleration sensor
KR20070100977A (en) Azimuth measuring device and azimuth measuring method
JP2011185669A (en) Device, system, method and program for calculation of attitude information
KR20140025319A (en) Apparatuses and methods for dynamic tracking and compensation of magnetic near field
US20140051517A1 (en) Dynamic magnetometer calibration
CN106813679A (en) The method and device of the Attitude estimation of moving object
JP2004288188A (en) Pen type input system using magnetic sensor, and its trajectory restoration method
JP2015179002A (en) Attitude estimation method, attitude estimation device and program
US11150090B2 (en) Machine learning zero-rate level calibration
JP5678357B2 (en) Rotation information calculation method, rotation information calculation program, magnetic gyroscope and moving body
US20130085712A1 (en) Inertial sensing input apparatus and method thereof
CN117589163A (en) Multi-sensor combination navigation method and device
CN115523919A (en) Nine-axis attitude calculation method based on gyro drift optimization
Zhang et al. Implementation and complexity analysis of orientation estimation algorithms for human body motion tracking using low-cost sensors
Tomasch et al. Limits of absolute heading accuracy using inexpensive mems sensors
Li et al. Gradient descent optimization-based SINS self-alignment method and error analysis
JP2013088162A (en) State estimation apparatus
CN112148139A (en) Gesture recognition method and computer readable storage medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20131105