JP2017049115A - Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment - Google Patents

Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment Download PDF

Info

Publication number
JP2017049115A
JP2017049115A JP2015172441A JP2015172441A JP2017049115A JP 2017049115 A JP2017049115 A JP 2017049115A JP 2015172441 A JP2015172441 A JP 2015172441A JP 2015172441 A JP2015172441 A JP 2015172441A JP 2017049115 A JP2017049115 A JP 2017049115A
Authority
JP
Japan
Prior art keywords
sensor
angular velocity
data
electronic device
offset value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015172441A
Other languages
Japanese (ja)
Inventor
達也 関塚
Tatsuya Sekizuka
達也 関塚
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2015172441A priority Critical patent/JP2017049115A/en
Publication of JP2017049115A publication Critical patent/JP2017049115A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Gyroscopes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide electronic equipment capable of properly correcting an offset value of an angular velocity sensor without reference to a motion state etc., of a user, a sensor calibration method for the electronic equipment, and a sensor calibration program for the electronic equipment.SOLUTION: Geomagnetism acquired by a geomagnetic sensor 120 is subjected to processing for converting a sensor coordinate system into a gravitational coordinate system and magnetic data is decomposed into a vertical component and a horizontal component. Two or more feature points determining a magnetic north direction are detected from the horizontal component of the magnetic data, and an angle θz_mag of rotation on a gravitational axis is detected. Further, angular velocity data acquired by an angular velocity sensor 112 is subjected to similar coordinate conversion processing, and an angle θz_gyro of rotation in a section Δt where two feature points of the magnetic data are detected is calculated. When the difference angle Δθz between the angle θz_mag of rotation and the angle θz_gyro of rotation is equal to or larger than a predetermined threshold α, an offset value on each axis of the gravitational coordinate system is calculated.SELECTED DRAWING: Figure 3

Description

本発明は、角速度センサを備えた電子機器、及び、当該電子機器におけるセンサ較正方法、並びに、センサ較正プログラムに関する。   The present invention relates to an electronic device including an angular velocity sensor, a sensor calibration method in the electronic device, and a sensor calibration program.

近年、携帯電話機やスマートフォン(高機能携帯電話機)、ナビゲーション端末、スマートウォッチ等の携帯型(又は装着型)の電子機器において、ユーザの運動状態や移動軌跡等のデータを利用した種々のサービスが提供されている。これらの電子機器には、一般に、物体の角速度の変化を検出する角速度センサ(又は、ジャイロセンサ)をはじめとする、各種のモーションセンサが搭載されている。ここで、角速度センサは、従来、航空機やロボットの姿勢制御、撮像装置の手振れ補正、ゲームコントローラ等の分野で広く利用されてきたものであるが、近年普及が著しいスマートフォンやスマートウォッチに搭載されて、ユーザの運動状態の計測等の分野においても利用されている。   In recent years, various services using data such as the user's motion state and movement trajectory have been provided in portable (or wearable) electronic devices such as mobile phones, smart phones (high-performance mobile phones), navigation terminals, smart watches, etc. Has been. These electronic devices are generally equipped with various motion sensors including an angular velocity sensor (or a gyro sensor) that detects a change in the angular velocity of an object. Here, the angular velocity sensor has been widely used in the fields of aircraft and robot attitude control, camera shake correction of image pickup devices, game controllers, and the like. It is also used in fields such as measurement of the user's exercise state.

角速度センサは、上述したように物体、すなわち、角速度センサを搭載した電子機器や、当該電子機器を携帯又は装着したユーザの身体の動作における、角速度の変化を検出するものであるため、物体が回転していない状態(例えば静止状態)においては、本来(理想的には)、角速度はゼロとなる。しかしながら、角速度センサの出力値には、一般に、本来の角速度の値(真の値)に加えて、角速度センサの製造ばらつきや搭載される電子機器の特性等に起因する固有のオフセット値が含まれている。すなわち、角速度センサの出力値は、静止状態であってもゼロにはならず、固有のオフセット値を示す。そのため、角速度センサの出力値は、上記のオフセット値を相殺する演算処理を行ったうえで、各種のアプリケーションで利用される。   As described above, the angular velocity sensor detects a change in angular velocity in the motion of an object, that is, an electronic device equipped with the angular velocity sensor or a user who carries or wears the electronic device. In a non-operating state (for example, a stationary state), the angular velocity is essentially (ideally) zero. However, in general, the output value of the angular velocity sensor includes a unique offset value due to manufacturing variations of the angular velocity sensor, characteristics of the mounted electronic device, and the like in addition to the original angular velocity value (true value). ing. That is, the output value of the angular velocity sensor does not become zero even in a stationary state, and indicates a unique offset value. Therefore, the output value of the angular velocity sensor is used in various applications after performing an arithmetic process that cancels the offset value.

ところで、上述した角速度センサの出力値に含まれるオフセット値は、主に、角速度センサの周辺環境(特に、温度変化)の影響を受けて変化することが知られている。そのため、角速度センサの出力値から本来の角速度の値を正確に取得するためには、オフセット値の変化を的確に把握してオフセット値を補正するキャリブレーション処理が必要になる。   Incidentally, it is known that the offset value included in the output value of the angular velocity sensor described above changes mainly under the influence of the surrounding environment (particularly, temperature change) of the angular velocity sensor. For this reason, in order to accurately obtain the original angular velocity value from the output value of the angular velocity sensor, a calibration process for accurately grasping the change of the offset value and correcting the offset value is required.

このような角速度センサのオフセット値の補正方法としては、例えば、角速度センサを含むセンサ装置において、角速度センサに加わる角速度が0であると判定した場合(例えばセンサ装置が静止状態にある場合)に、角速度センサの出力のオフセットを補正する手法が、特許文献1に記載されている。また、オフセット値の他の補正方法としては、例えば、移動体の特定の走行状態(直進)において、地磁気センサとジャイロセンサ(角速度センサ)の検出値(出力値)の正確さを比較し、ジャイロセンサよりも正確な検出値が出力される地磁気センサの検出値に基づいて、ジャイロセンサの検出値を補正する手法が、特許文献2に記載されている。   As a method for correcting the offset value of such an angular velocity sensor, for example, in a sensor device including an angular velocity sensor, when it is determined that the angular velocity applied to the angular velocity sensor is 0 (for example, when the sensor device is in a stationary state), A method for correcting an offset of the output of the angular velocity sensor is described in Patent Document 1. As another correction method of the offset value, for example, the accuracy of the detection value (output value) of the geomagnetic sensor and the gyro sensor (angular velocity sensor) is compared in a specific traveling state (straight forward) of the moving body. Patent Document 2 discloses a technique for correcting a detection value of a gyro sensor based on a detection value of a geomagnetic sensor that outputs a detection value more accurate than the sensor.

特開2012−37405号公報JP 2012-37405 A 特開2011−112500号公報JP 2011-112500 A

上述した特許文献1、2には、角速度センサが静止状態や特定の動作状態(一定方向に移動する直進動作)にある場合にのみ、角速度センサのオフセット値を補正する手法が開示されている。このような手法においては、オフセット値の補正が実行されるタイミングが、角速度センサが静止状態や特定の動作状態にある場合に限定されてしまい、ユーザの運動状態や移動軌跡等を正確に把握することができないという問題を有している。すなわち、ユーザによる任意の運動中や移動中に、温度変化により角速度センサのオフセット値に変化が生じた場合、当該運動時等の角速度を短い周期で正確に取得することができないという問題を有していた。   Patent Documents 1 and 2 described above disclose a method of correcting the offset value of the angular velocity sensor only when the angular velocity sensor is in a stationary state or in a specific operation state (straight forward movement that moves in a certain direction). In such a method, the timing at which the offset value is corrected is limited to the case where the angular velocity sensor is in a stationary state or a specific operation state, and the user's motion state, movement trajectory, and the like are accurately grasped. Have the problem of not being able to. In other words, during an arbitrary movement or movement by the user, if a change occurs in the offset value of the angular velocity sensor due to a temperature change, the angular velocity during the movement cannot be accurately acquired in a short cycle. It was.

そこで、本発明は、上述した問題点に鑑み、ユーザの運動状態等に関わらず、角速度センサのオフセット値を適切に補正することができる電子機器及び電子機器のセンサ較正方法、電子機器のセンサ較正プログラムを提供することを目的とする。   Therefore, in view of the above-described problems, the present invention provides an electronic device capable of appropriately correcting the offset value of the angular velocity sensor regardless of the user's motion state and the like, a sensor calibration method for the electronic device, and a sensor calibration for the electronic device. The purpose is to provide a program.

本発明に係る電子機器は、
角速度データを取得する角速度センサと、
磁気データを取得する地磁気センサと、
前記角速度センサのオフセット値を算出する演算回路部と、
を備え、
前記演算回路部は、前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記オフセット値を算出することを特徴とする。
The electronic device according to the present invention is
An angular velocity sensor for obtaining angular velocity data;
A geomagnetic sensor for acquiring magnetic data;
An arithmetic circuit unit for calculating an offset value of the angular velocity sensor;
With
The arithmetic circuit unit calculates a first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second calculated based on the angular velocity data. The offset value is calculated on the basis of the comparison with the rotation angle.

本発明は、
電子機器のセンサ較正方法であって、
前記電子機器は、角速度データを取得する角速度センサと、磁気データを取得する地磁気センサと、を備え、
前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記角速度センサのオフセット値を算出する、
ことを特徴とする
The present invention
A method for calibrating a sensor of an electronic device,
The electronic device includes an angular velocity sensor that acquires angular velocity data, and a geomagnetic sensor that acquires magnetic data.
A first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second rotation angle calculated based on the angular velocity data. Calculating an offset value of the angular velocity sensor based on the comparison;
It is characterized by

本発明は、
電子機器のセンサ較正プログラムであって、
前記電子機器は、角速度データを取得する角速度センサと、磁気データを取得する地磁気センサと、を備え、
前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記角速度センサのオフセット値を算出させる、
ことを特徴とする。
The present invention
A sensor calibration program for electronic equipment,
The electronic device includes an angular velocity sensor that acquires angular velocity data, and a geomagnetic sensor that acquires magnetic data.
A first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second rotation angle calculated based on the angular velocity data. Calculating an offset value of the angular velocity sensor based on the comparison;
It is characterized by that.

本発明によれば、ユーザの運動状態等に関わらず、角速度センサのオフセット値を適切に補正することができ、正確な角速度を取得することができる。   According to the present invention, it is possible to appropriately correct the offset value of the angular velocity sensor regardless of the user's motion state and the like, and to obtain an accurate angular velocity.

本発明に係る電子機器の複数の適用例を示す概略構成図である。It is a schematic block diagram which shows the some application example of the electronic device which concerns on this invention. 第1の実施形態に係る電子機器の一例を示す機能ブロック図である。It is a functional block diagram which shows an example of the electronic device which concerns on 1st Embodiment. 第1の実施形態に係る電子機器におけるセンサ較正方法の一例を示すフローチャートである。It is a flowchart which shows an example of the sensor calibration method in the electronic device which concerns on 1st Embodiment. 第1の実施形態に適用される座標変換処理を示す概念図である。It is a conceptual diagram which shows the coordinate transformation process applied to 1st Embodiment. 第1の実施形態に適用される座標変換後のX′軸及びY′軸における地磁気センサの出力波形の例を示す波形図である。It is a wave form diagram which shows the example of the output waveform of the geomagnetic sensor in the X 'axis and Y' axis after the coordinate transformation applied to 1st Embodiment. 第1の実施形態に適用される特徴点検出処理における地磁気センサの回転角度を示す概略図である。It is the schematic which shows the rotation angle of the geomagnetic sensor in the feature point detection process applied to 1st Embodiment. 第2の実施形態に係る電子機器におけるセンサ較正方法の一例を示すフローチャートである。It is a flowchart which shows an example of the sensor calibration method in the electronic device which concerns on 2nd Embodiment. 第2の実施形態に適用されるオフセットテーブルの一例を示す概略図である。It is the schematic which shows an example of the offset table applied to 2nd Embodiment.

以下、本発明に係る電子機器及びセンサ較正方法、センサ較正プログラムについて、実施形態を示して詳しく説明する。
<第1の実施形態>
(電子機器)
図1は、本発明に係る電子機器の複数の適用例を示す概略構成図である。また、図2は、本発明の第1の実施形態に係る電子機器の一例を示す機能ブロック図である。
Hereinafter, an electronic device, a sensor calibration method, and a sensor calibration program according to the present invention will be described in detail with reference to embodiments.
<First Embodiment>
(Electronics)
FIG. 1 is a schematic configuration diagram showing a plurality of application examples of an electronic apparatus according to the present invention. FIG. 2 is a functional block diagram showing an example of an electronic apparatus according to the first embodiment of the present invention.

本発明に係る電子機器は、例えばユーザの運動情報や移動軌跡等を利用した種々のサービスを、ユーザに提供するための機能を備えた電子機器に適用される。具体的には、電子機器は、例えば図1(a)に示すような腕時計型やリストバンド型の外観のスマートウォッチ10や、図1(b)に示すようなGPSロガーやナビゲーション端末等のアウトドア機器20、図1(c)に示すようなスマートフォン30やタブレット端末等に適用される。以下、説明の都合上、これらの機器を「電子機器100」と総称する。   The electronic device according to the present invention is applied to an electronic device having a function for providing a user with various services using, for example, user's exercise information and movement trajectory. Specifically, the electronic device is, for example, a wristwatch-type or wristband-type smartwatch 10 as shown in FIG. 1A, an outdoor such as a GPS logger or a navigation terminal as shown in FIG. The present invention is applied to the device 20, a smartphone 30 as shown in FIG. Hereinafter, for convenience of explanation, these devices are collectively referred to as “electronic device 100”.

本発明の第1の実施形態に係る電子機器100は、例えば図2に示すように、角速度センサ112及び加速度センサ114を含むモーションセンサ110と、地磁気センサ120と、温度センサ130と、通信機能部140と、入力操作部150と、出力部160と、演算回路部170と、メモリ部180と、電源供給部190と、を有している。ここで、演算回路部170は、本発明に係る座標変換部、特徴点検出部、回転角度比較部、オフセット値算出部及びオフセット制御部に対応する。   The electronic device 100 according to the first embodiment of the present invention includes, for example, a motion sensor 110 including an angular velocity sensor 112 and an acceleration sensor 114, a geomagnetic sensor 120, a temperature sensor 130, and a communication function unit as illustrated in FIG. 140, an input operation unit 150, an output unit 160, an arithmetic circuit unit 170, a memory unit 180, and a power supply unit 190. Here, the arithmetic circuit unit 170 corresponds to a coordinate conversion unit, a feature point detection unit, a rotation angle comparison unit, an offset value calculation unit, and an offset control unit according to the present invention.

モーションセンサ110は、少なくとも角速度センサ(ジャイロセンサ)112と、加速度センサ114とを含み、ユーザの身体の動きや運動状態、電子機器100に加わる特定方向の力等を検出する。角速度センサ112は、ユーザの身体の動きに応じて電子機器100に生じる移動方向の変化(角速度)を計測する。角速度センサ112は、3軸角速度センサを有し、後述する加速度センサ114により出力される加速度データを規定する、互いに直交する3軸について、各軸に沿った回転運動の回転方向に生じる角速度成分(角速度信号)を検出して角速度データとして出力する。また、加速度センサ114は、ユーザの身体の動きに応じて電子機器100に生じる移動速度の変化の割合(加速度)を計測する。加速度センサ114は、3軸加速度センサを有し、互いに直交する3軸方向の各々に沿った加速度成分(加速度信号)を検出して加速度データとして出力する。ここで、本実施形態において、加速度データは、後述する演算回路部170において角速度センサ112のオフセット値の補正を行う際に用いられる。角速度センサ112及び加速度センサ114により取得されたセンサデータ(角速度データ、加速度データ)は、時間データに関連付けられてメモリ部180の所定の記憶領域に保存される。   The motion sensor 110 includes at least an angular velocity sensor (gyro sensor) 112 and an acceleration sensor 114, and detects a movement and motion state of the user's body, a force in a specific direction applied to the electronic device 100, and the like. The angular velocity sensor 112 measures a change in movement direction (angular velocity) that occurs in the electronic device 100 in accordance with the movement of the user's body. The angular velocity sensor 112 includes a three-axis angular velocity sensor, and defines angular data generated in the rotational direction of the rotational motion along each axis for three axes orthogonal to each other that define acceleration data output by an acceleration sensor 114 described later ( Angular velocity signal) is detected and output as angular velocity data. Further, the acceleration sensor 114 measures a rate (acceleration) of a change in moving speed that occurs in the electronic device 100 in accordance with the movement of the user's body. The acceleration sensor 114 has a triaxial acceleration sensor, detects an acceleration component (acceleration signal) along each of three axial directions orthogonal to each other, and outputs the acceleration component as acceleration data. Here, in this embodiment, the acceleration data is used when the offset value of the angular velocity sensor 112 is corrected in the arithmetic circuit unit 170 described later. Sensor data (angular velocity data, acceleration data) acquired by the angular velocity sensor 112 and the acceleration sensor 114 is stored in a predetermined storage area of the memory unit 180 in association with time data.

地磁気センサ120は、直交する3軸方向の地磁気を検出するセンサであって、地球の磁場(磁界)を検出して磁気データ(又は、3次元の方向データ)として出力する。この磁気データは、後述する演算回路部170において電子機器100を基準とする方位を算出する際に用いられる。また、本実施形態において、磁気データは、後述する演算回路部170において角速度センサ112のオフセット値の補正を行う際に用いられる。地磁気センサ120により取得された磁気データは、時間データに関連付けられて後述するメモリ部180の所定の記憶領域に保存される。   The geomagnetic sensor 120 is a sensor that detects geomagnetism in three orthogonal axes, and detects the earth's magnetic field (magnetic field) and outputs it as magnetic data (or three-dimensional direction data). This magnetic data is used when calculating an orientation based on the electronic device 100 in the arithmetic circuit unit 170 described later. In the present embodiment, the magnetic data is used when correcting the offset value of the angular velocity sensor 112 in the arithmetic circuit unit 170 described later. The magnetic data acquired by the geomagnetic sensor 120 is stored in a predetermined storage area of the memory unit 180 described later in association with the time data.

温度センサ130は、電子機器の周辺環境や機器内部における温度の変化を検出して温度データとして出力する。本実施形態において、温度データは、後述する演算回路部170において角速度センサ112のオフセット値の補正を行う際の条件(トリガー)としても用いられる。温度センサ130により取得された温度データは、時間データに関連付けられてメモリ部180の所定の記憶領域に保存される。   The temperature sensor 130 detects a change in temperature around the electronic device and inside the device, and outputs it as temperature data. In the present embodiment, the temperature data is also used as a condition (trigger) when the offset value of the angular velocity sensor 112 is corrected in the arithmetic circuit unit 170 described later. The temperature data acquired by the temperature sensor 130 is stored in a predetermined storage area of the memory unit 180 in association with the time data.

通信機能部140は、電子機器100の外部の通信機器やネットワーク(いずれも図示を省略)との間で、各種のデータを送信又は受信する。ここで、通信機能部140を介して行われる通信は、例えば有線や無線、メモリカード等を用いた所定の通信形式が適用される。   The communication function unit 140 transmits or receives various types of data to / from a communication device or network (both not shown) outside the electronic device 100. Here, for the communication performed via the communication function unit 140, a predetermined communication format using, for example, wired, wireless, or a memory card is applied.

入力操作部150は、例えば図1に示した電子機器100(スマートウォッチ10やアウトドア機器20、スマートフォン30等)の筐体に設けられた操作スイッチ152やタッチパネル154等を有している。入力操作部150は、例えば電子機器100の動作電源やアプリケーションソフトウェアの操作、後述する出力部160(表示部や音響部等)により報知する項目の設定等の、各種の入力操作に用いられる。   The input operation unit 150 includes, for example, an operation switch 152, a touch panel 154, and the like provided in a housing of the electronic device 100 (smart watch 10, the outdoor device 20, the smartphone 30, etc.) shown in FIG. The input operation unit 150 is used for various input operations such as operation of the operation power source of the electronic device 100 and application software, and setting of items to be notified by an output unit 160 (display unit, acoustic unit, etc.) described later.

出力部160は、電子機器100の筐体に設けられた表示部162や音響部164、振動部(図示を省略)等を有している。出力部160は、少なくとも上述したモーションセンサ110により取得されたセンサデータや地磁気センサ120により取得された磁気データ等に基づいて生成される、ユーザの運動状態や移動軌跡等に関する情報や、後述する角速度センサ112のオフセット値の補正の実行状態に関する情報等の、各種の情報を視覚や聴覚、触覚等を通してユーザに提供又は報知する。   The output unit 160 includes a display unit 162, an acoustic unit 164, a vibration unit (not shown), and the like provided in the casing of the electronic device 100. The output unit 160 generates information on the user's motion state, movement trajectory, and the like generated based on at least the sensor data acquired by the motion sensor 110 and the magnetic data acquired by the geomagnetic sensor 120, and the angular velocity described later. Various types of information such as information regarding the execution state of the offset value correction of the sensor 112 is provided or notified to the user through visual, auditory, tactile, or the like.

演算回路部170は、計時機能を備えたCPU(中央演算処理装置)やMPU(マイクロプロセッサ)等の演算処理装置(コンピュータ)であって、動作クロックに基づいて、所定の制御プログラムやアルゴリズムプログラムを実行する。これにより、演算回路部170は、モーションセンサ110や地磁気センサ120等におけるセンシング動作や、センサデータ基づいてユーザの運動状態や移動軌跡等に関する情報を生成する動作、後述する角速度センサ112のオフセット値の補正処理等の、各種の動作を制御する。なお、角速度センサ112のオフセット値補正方法については、詳しく後述する。   The arithmetic circuit unit 170 is an arithmetic processing unit (computer) such as a CPU (central processing unit) or MPU (microprocessor) having a timekeeping function, and executes a predetermined control program or algorithm program based on an operation clock. Run. As a result, the arithmetic circuit unit 170 performs sensing operation in the motion sensor 110, the geomagnetic sensor 120, etc., operation for generating information on the user's motion state, movement trajectory, and the like based on the sensor data, and the offset value of the angular velocity sensor 112 described later. Various operations such as correction processing are controlled. The offset value correction method for the angular velocity sensor 112 will be described in detail later.

メモリ部180は、上述したモーションセンサ110や地磁気センサ120、演算回路部170等において取得されたり生成(算出)されたりしたデータ等を、時間データに関連付けて所定の記憶領域に保存する。また、メモリ部180は、演算回路部170において実行される角速度センサ112のオフセット値の補正処理により生成される各種のデータを所定の記憶領域に保存する。また、メモリ部180は、演算回路部170において実行される制御プログラムやアルゴリズムプログラムを保存する。なお、これらのプログラムは、演算回路部170に予め組み込まれているものであってもよい。また、メモリ部180は、その一部又は全部が、例えばメモリカード等のリムーバブル記憶媒体としての形態を有し、電子機器100に対して着脱可能に構成されているものであってもよい。   The memory unit 180 stores the data acquired or generated (calculated) by the motion sensor 110, the geomagnetic sensor 120, the arithmetic circuit unit 170, or the like described above in association with time data in a predetermined storage area. In addition, the memory unit 180 stores various data generated by the offset value correction processing of the angular velocity sensor 112 executed in the arithmetic circuit unit 170 in a predetermined storage area. The memory unit 180 stores a control program and an algorithm program executed in the arithmetic circuit unit 170. Note that these programs may be incorporated in the arithmetic circuit unit 170 in advance. Further, the memory unit 180 may be partly or wholly configured as a removable storage medium such as a memory card and configured to be detachable from the electronic device 100.

電源供給部190は、電子機器100内部の各構成に駆動用電力を供給する。電源供給部190は、例えば市販のボタン型電池等の一次電池や、リチウムイオン電池等の二次電池、あるいは、振動や光、熱、電磁波等のエネルギーにより発電する環境発電技術による電源等を、単独で、あるいは、併用して適用することができる。   The power supply unit 190 supplies driving power to each component inside the electronic device 100. The power supply unit 190 is, for example, a primary battery such as a commercially available button-type battery, a secondary battery such as a lithium ion battery, or a power source based on energy harvesting technology that generates power using energy such as vibration, light, heat, and electromagnetic waves. It can be applied alone or in combination.

(電子機器のセンサ較正方法)
次に、第1の実施形態に係る電子機器におけるセンサ較正方法(角速度センサのオフセット値補正方法)について、図面を参照して説明する。ここで、以下に示す電子機器100のセンサ較正方法(図3に示すフローチャート)は、上述した演算回路部170が所定の制御プログラム及びアルゴリズムプログラムに従って処理を実行することにより実現される。
(Electronic device sensor calibration method)
Next, a sensor calibration method (an angular velocity sensor offset value correction method) in the electronic apparatus according to the first embodiment will be described with reference to the drawings. Here, the sensor calibration method (the flowchart shown in FIG. 3) of the electronic device 100 described below is realized by the arithmetic circuit unit 170 described above executing processing according to a predetermined control program and algorithm program.

図3は、本実施形態に係る電子機器におけるセンサ較正方法の一例を示すフローチャートである。図4は、本実施形態に適用される座標変換処理を示す概念図であり、図5は、本実施形態に適用される座標変換後のX′軸及びY′軸における地磁気センサの出力波形の例を示す波形図である。図6は、本実施形態に適用される特徴点検出処理における地磁気センサの回転角度を示す概略図である。   FIG. 3 is a flowchart illustrating an example of a sensor calibration method in the electronic apparatus according to the present embodiment. FIG. 4 is a conceptual diagram showing a coordinate conversion process applied to the present embodiment, and FIG. 5 is a graph showing output waveforms of the geomagnetic sensor on the X ′ axis and the Y ′ axis after the coordinate conversion applied to the present embodiment. It is a wave form diagram which shows an example. FIG. 6 is a schematic diagram showing the rotation angle of the geomagnetic sensor in the feature point detection process applied to this embodiment.

本実施形態に係る電子機器100のセンサ較正方法においては、まず、電子機器100が起動すると、少なくとも角速度センサ112及び加速度センサ114を含むモーションセンサ110や、地磁気センサ120、温度センサ130によるセンシング動作が実行される。そして、この状態で所定の条件が設定されることにより、演算回路部170は、図3のフローチャートに示すような角速度センサ112のオフセット値の補正方法に係る一連の処理動作を開始する。   In the sensor calibration method of the electronic device 100 according to the present embodiment, first, when the electronic device 100 is activated, a sensing operation by the motion sensor 110 including at least the angular velocity sensor 112 and the acceleration sensor 114, the geomagnetic sensor 120, and the temperature sensor 130 is performed. Executed. Then, when a predetermined condition is set in this state, the arithmetic circuit unit 170 starts a series of processing operations related to the offset value correction method of the angular velocity sensor 112 as shown in the flowchart of FIG.

ここで、一連のオフセット値補正処理を開始するための条件(トリガー)としては、例えば温度センサ130により予め設定された温度変化(例えば、±10℃以上の変化)が検出された時点であってもよいし、電子機器100が起動して角速度センサ112がセンシング動作を開始した時点であってもよい。また、他の条件として、モーションセンサ110や地磁気センサ120等により電子機器100、又は、電子機器100を携帯又は装着したユーザの動作(厳密には、地磁気センサ120の向きの変化)が検出された時点であってもよい。さらに他の条件として、上述したプログラムにおいて予め設定された一定時間の経過ごとに、定期的にオフセット値補正処理を開始するものであってもよいし、ユーザが入力操作部150(操作スイッチ152やタッチパネル154等)を意図的に操作することにより、任意のタイミングで開始するものであってもよい。   Here, a condition (trigger) for starting a series of offset value correction processing is, for example, a point in time when a temperature change preset by the temperature sensor 130 (for example, a change of ± 10 ° C. or more) is detected. Alternatively, it may be the time when the electronic device 100 is activated and the angular velocity sensor 112 starts a sensing operation. In addition, as another condition, the motion sensor 110, the geomagnetic sensor 120, or the like detects the electronic device 100 or the operation of the user who carries or wears the electronic device 100 (strictly, a change in the orientation of the geomagnetic sensor 120). It may be a point in time. Further, as another condition, the offset value correction process may be started periodically every elapse of a predetermined time set in the above-described program, or the user may input the input operation unit 150 (operation switch 152 or It may be started at an arbitrary timing by intentionally operating the touch panel 154 or the like.

演算回路部170は、角速度センサ112のオフセット値補正処理を開始すると、モーションセンサ110(角速度センサ112、加速度センサ114)及び地磁気センサ120から出力される各検出値を取得して、センサデータとしてメモリ部180に保存する(ステップS102)。   When the offset value correction process of the angular velocity sensor 112 is started, the arithmetic circuit unit 170 acquires each detection value output from the motion sensor 110 (angular velocity sensor 112, acceleration sensor 114) and the geomagnetic sensor 120, and stores it as sensor data. The data is stored in the unit 180 (step S102).

次いで、演算回路部170は、加速度センサ114の検出値(加速度データ)から重力方向を推定する(ステップS104)。具体的には、加速度センサ114により取得された加速度データから重力加速度成分を抽出して重力方向を推定する場合、ユーザの動作に起因する運動加速度成分はノイズと考えることができるので、加速度データを例えばローパスフィルタ(LPF)を通過させることにより直流(DC)成分のみを抽出すると、重力加速度成分のみが得られ、重力方向が推定される。   Next, the arithmetic circuit unit 170 estimates the direction of gravity from the detection value (acceleration data) of the acceleration sensor 114 (step S104). Specifically, when the gravitational acceleration component is extracted from the acceleration data acquired by the acceleration sensor 114 and the direction of gravity is estimated, the motion acceleration component resulting from the user's motion can be considered as noise. For example, when only a direct current (DC) component is extracted by passing through a low-pass filter (LPF), only a gravitational acceleration component is obtained and the direction of gravity is estimated.

次いで、演算回路部170は、加速度データにより推定された重力方向に基づいて、地磁気センサ120の検出値(磁気データ)から磁北方向を推定する(ステップS106)。具体的には、演算回路部170は、まず、図4(a)に示すように、加速度センサ114の座標系(X、Y、Z軸からなるセンサ座標系)で取得された加速度データに基づく出力ベクトル(図中、「加速度センサ出力」と表記)を、図4(b)に示すように、重力方向を基準とするベクトル(0,0,|G|)となるX′、Y′、Z′軸からなる座標系(便宜的に「重力座標系」と記す)に変換する。ここで、図4(a)のセンサ座標系は、電子機器100に搭載されたモーションセンサ110の動きとともに移動する座標であり、加速度センサ出力は、加速度センサ114により取得された加速度データから運動加速度成分を除いた出力ベクトルであって、重力方向を示している。また、図4(b)の|G|は加速度データの出力ベクトルの大きさに対応する。また、座標変換後の重力座標系における重力方向Z′は、例えば、加速度センサ114により一定期間収集した加速度データの平均をベクトルとして算出する手法によっても導出される。なお、上記の座標変換処理としては、例えばアフィン変換公式等の周知の手法を適用することができる。   Next, the arithmetic circuit unit 170 estimates the magnetic north direction from the detection value (magnetic data) of the geomagnetic sensor 120 based on the gravity direction estimated from the acceleration data (step S106). Specifically, the arithmetic circuit unit 170 is first based on acceleration data acquired in the coordinate system of the acceleration sensor 114 (sensor coordinate system including X, Y, and Z axes) as shown in FIG. As shown in FIG. 4B, the output vector (indicated as “acceleration sensor output” in the figure) becomes a vector (0,0, | G |) based on the direction of gravity as X ′, Y ′, It is converted into a coordinate system consisting of the Z ′ axis (for convenience, it is described as “gravity coordinate system”). Here, the sensor coordinate system of FIG. 4A is a coordinate that moves with the motion of the motion sensor 110 mounted on the electronic device 100, and the acceleration sensor output is the motion acceleration from the acceleration data acquired by the acceleration sensor 114. This is an output vector excluding components, indicating the direction of gravity. Further, | G | in FIG. 4B corresponds to the magnitude of the output vector of acceleration data. Further, the gravity direction Z ′ in the gravity coordinate system after the coordinate conversion is derived, for example, by a method of calculating an average of acceleration data collected by the acceleration sensor 114 for a certain period as a vector. In addition, as said coordinate transformation process, well-known methods, such as an affine transformation formula, can be applied, for example.

次いで、演算回路部170は、上述した加速度データにおける座標変換と同様の座標変換処理を磁気データに施すことにより、図4(b)に示すように、磁気データの出力ベクトル(図中、「地磁気センサ出力」と表記)を、鉛直方向成分(重力座標系の重力方向Z′の成分)と、水平方向成分(重力座標系のX′−Y′平面内の成分)に分解する。この水平方向成分は磁北(磁極)方向に相当し、地球上の地点ごとに所定の偏角を加味して回転させることにより真北方向が求められる。   Next, the arithmetic circuit unit 170 performs a coordinate transformation process similar to the coordinate transformation in the acceleration data described above on the magnetic data, so that as shown in FIG. Sensor output ”) is divided into a vertical component (a component in the gravity direction Z ′ of the gravity coordinate system) and a horizontal component (a component in the X′-Y ′ plane of the gravity coordinate system). This horizontal component corresponds to the magnetic north (magnetic pole) direction, and the true north direction can be obtained by rotating with a predetermined declination for each point on the earth.

次いで、演算回路部170は、重力座標系における磁気データの水平方向成分について、図5に示すように、X′軸又はY′軸の検出値が最大値又は最小値となる特徴点を検出する特徴点検出処理を実行し、2点以上の特徴点を検出したか否かを判定する(ステップS108)。具体的には、ステップS106において鉛直方向成分と水平方向成分とに分解した磁気データについて、重力軸(図4(b)の重力座標系のZ′軸)を中心軸にして、重力軸に垂直なX′−Y′平面内で、磁気データの水平方向成分を一周(360度回転)させた場合の、X′軸及びY′軸における出力成分(検出値)の波形は、例えば図5のように示される。ここで、磁気データの水平方向成分を、重力軸を中心にして回転させる手法としては、例えばユーザが電子機器100を携帯又は装着して所定の角度(例えば360°)回転する手法や、ユーザが電子機器100を携帯又は装着して周回コースを移動する手法、ユーザが机上等に電子機器100を置いた状態で所定の角度回転させる手法等を適用することができる。   Next, the arithmetic circuit unit 170 detects a feature point at which the detected value of the X ′ axis or the Y ′ axis becomes the maximum value or the minimum value, as shown in FIG. 5, for the horizontal component of the magnetic data in the gravity coordinate system. A feature point detection process is executed to determine whether two or more feature points have been detected (step S108). Specifically, the magnetic data decomposed into the vertical component and the horizontal component in step S106 is perpendicular to the gravity axis with the gravity axis (Z ′ axis of the gravity coordinate system in FIG. 4B) as the central axis. The waveform of the output component (detected value) on the X′-axis and the Y′-axis when the horizontal component of the magnetic data is rotated once (360 degrees) in the X′-Y ′ plane, for example, is shown in FIG. As shown. Here, as a method of rotating the horizontal component of the magnetic data around the gravity axis, for example, a method in which the user carries or wears the electronic device 100 and rotates by a predetermined angle (for example, 360 °), It is possible to apply a method of moving the circuit course while carrying or wearing the electronic device 100, a method of rotating the electronic device 100 by a predetermined angle while the electronic device 100 is placed on a desk or the like.

なお、この特徴点検出処理は、後述するように、磁気データの水平方向成分に含まれる複数の特徴点を検出するためのものであるので、必ずしも地磁気センサ120を一回転させる必要はなく、図5に示した波形において、少なくとも2点以上の特徴点を含む範囲で、X′軸及びY′軸の角度の変化を生じさせる角度だけ回転させるものであればよい。したがって、例えばユーザが電子機器100を携帯又は装着している状態では、ユーザが特に意識することなく日常的な動作や任意の運動等を行うことによっても、2点以上の特徴点を含む範囲の角度(少なくとも90°以上)の変化を良好に生じさせることができる。すなわち、電子機器100における特別な操作やユーザによる特別な動作を必要とすることなく、バックグラウンドでの処理により磁気データのX′軸及びY′軸における出力成分の波形を取得することができる。   As will be described later, this feature point detection process is for detecting a plurality of feature points included in the horizontal component of the magnetic data, and therefore it is not always necessary to rotate the geomagnetic sensor 120 once. The waveform shown in FIG. 5 may be rotated by an angle that causes a change in the angle of the X ′ axis and the Y ′ axis within a range including at least two or more feature points. Therefore, for example, in a state where the user carries or wears the electronic device 100, the range of the range including two or more feature points can be obtained by performing daily operations or arbitrary exercises without the user being particularly conscious. A change in angle (at least 90 ° or more) can be favorably generated. That is, the waveform of the output component on the X ′ axis and the Y ′ axis of the magnetic data can be acquired by processing in the background without requiring a special operation in the electronic device 100 or a special operation by the user.

図5に示した磁気データのX′軸及びY′軸における出力成分の波形において、X′軸又はY′軸が磁北方向を向いた状態(例えばX′軸が90°、Y′軸が360°)では、当該出力成分に最大値が得られ、一方、X′軸又はY′軸が磁北方向と逆向き(磁南方向)を向いた状態(例えばX′軸が270°、Y′軸が180°)では、最小値が得られる。ここで、X′軸とY′軸は位相差が90°であるので、X′軸における出力成分が最大値を得る付近ではY′軸における出力成分は単調に減少し、また、X′軸における出力成分が最小値を得る付近ではY′軸における出力成分は単調に増加する。本実施形態においては、このようなX′軸又はY′軸における出力成分が最大値又は最小値となる点(図中、丸印で表記)を特徴点と定義して、特徴点検出処理において、X′軸及びY′軸の角度の変化に応じて特徴点を順次検出する。検出された特徴点は、メモリ部180の所定の記憶領域に保存される。これにより、2点以上の特徴点を検出することにより、X′軸及びY′軸における出力成分の回転角度(例えば90°)を正確に求めることができる。   In the waveform of the output component on the X ′ axis and Y ′ axis of the magnetic data shown in FIG. 5, the X ′ axis or Y ′ axis faces the magnetic north direction (for example, the X ′ axis is 90 ° and the Y ′ axis is 360 °). °), the maximum value is obtained for the output component, while the X ′ axis or the Y ′ axis is oriented opposite to the magnetic north direction (magnetic south direction) (for example, the X ′ axis is 270 °, the Y ′ axis Is 180 °), the minimum value is obtained. Here, since the phase difference between the X ′ axis and the Y ′ axis is 90 °, the output component on the Y ′ axis monotonously decreases in the vicinity of the maximum output component on the X ′ axis, and the X ′ axis The output component on the Y ′ axis increases monotonously in the vicinity where the output component at the point where the minimum value is obtained. In the present embodiment, such a point (indicated by a circle in the figure) where the output component on the X ′ axis or the Y ′ axis becomes the maximum value or the minimum value is defined as a feature point, and in the feature point detection process , Feature points are sequentially detected in accordance with changes in the angles of the X ′ axis and the Y ′ axis. The detected feature points are stored in a predetermined storage area of the memory unit 180. Thus, by detecting two or more feature points, the rotation angle (for example, 90 °) of the output component on the X ′ axis and the Y ′ axis can be accurately obtained.

そして、ステップS108において、図5に示したX′軸又はY′軸における出力成分の波形に、2点以上の特徴点が検出されない場合(ステップS108のNo)には、演算回路部170は、ステップS102に戻ってモーションセンサ110(角速度センサ112、加速度センサ114)及び地磁気センサ120から出力される各検出値を取得する動作を実行する。一方、ステップS108において、X′軸又はY′軸における出力成分に2点以上の特徴点が検出された場合(ステップS108のYes)には、演算回路部170は、当該特徴点に基づいて回転角度(第1の回転角度)θz_magを検出する(ステップS110)。ここで、図6(a)〜(c)に示すように、2点の特徴点が検出された時点での、X′、Y′、Z′の各軸周りの地磁気センサの回転角度を、それぞれθx_mag、θy_mag、θz_magと規定する。ステップS110においては、図6(a)に示した地磁気センサのZ′軸周りの回転角度θz_magが特徴点検出面(X′−Y′平面)における回転角度として検出される。すなわち、加速度センサ114及び地磁気センサ120により取得されたセンサデータに基づいて特徴点検出処理により2点の特徴点間の回転角度θz_magが検出される。   In step S108, when two or more feature points are not detected in the waveform of the output component on the X ′ axis or the Y ′ axis shown in FIG. 5 (No in step S108), the arithmetic circuit unit 170 It returns to step S102 and performs the operation | movement which acquires each detection value output from the motion sensor 110 (the angular velocity sensor 112, the acceleration sensor 114) and the geomagnetic sensor 120. On the other hand, when two or more feature points are detected in the output component on the X ′ axis or the Y ′ axis in step S108 (Yes in step S108), the arithmetic circuit unit 170 rotates based on the feature points. An angle (first rotation angle) θz_mag is detected (step S110). Here, as shown in FIGS. 6A to 6C, the rotation angle of the geomagnetic sensor around each of the X ′, Y ′, and Z ′ axes at the time when the two feature points are detected, They are defined as θx_mag, θy_mag, and θz_mag, respectively. In step S110, the rotation angle θz_mag around the Z ′ axis of the geomagnetic sensor shown in FIG. 6A is detected as the rotation angle on the feature point detection plane (X′-Y ′ plane). That is, the rotation angle θz_mag between the two feature points is detected by the feature point detection process based on the sensor data acquired by the acceleration sensor 114 and the geomagnetic sensor 120.

次いで、演算回路部170は、ステップS108の特徴点検出処理において上記の回転角度θz_magを検出した特徴点検出区間Δtについて、角速度センサ112の検出値(角速度データ)から回転角度(第2の回転角度)θz_gyroを算出する(ステップS112)。具体的には、演算回路部170は、まず、角速度センサ112の検出値を、図4に示した磁気データに施した座標変換処理と同様の手法により、重力方向を基準とするX′、Y′、Z′軸からなる座標系(重力座標系)に変換する。そして、演算回路部170は、図5に示した地磁気センサ120の検出値(磁気データ)から2点以上の特徴点を検出した各時刻の時間差(特徴点検出区間Δt)について、座標変換後の角速度センサ112の検出値を時間積分することにより回転角度θz_gyroを算出する。ここで、図6(d)〜(f)に示すように、特徴点が検出された時点での、X′、Y′、Z′の各軸周りの角速度センサの回転角度を、それぞれθx_gyro、θy_gyro、θz_gyroと規定する。ステップS112においては、ステップS110と同様に、図6(d)に示した角速度センサのZ′軸周りの回転角度θz_gyroが特徴点検出面(X′−Y′平面)における回転角度として検出される。すなわち、角速度センサ112により取得された角速度データに基づいて特徴点検出区間Δtの回転角度θz_gyroが算出される。ここで、角速度センサ112からの検出値(角速度データ)に温度変化に起因する所定のオフセット値が含まれている場合には、角速度センサ112の検出値を時間積分して算出される回転角度θz_gyroは、ステップS110において、特徴点検出処理により検出された回転角度θz_magとは必然的に異なる数値が得られることになる。なお、本実施形態における角速度センサの回転角度θx_gyro、θy_gyro、θz_gyroは、角速度センサ112の検出値を時間積分して算出されるものであるため、上記の図6(a)〜(c)に示した地磁気センサの回転角度の場合と同等の表記をすることは厳密には適切ではないが、図6(d)〜(f)のように概念的に示すことにより適切に理解することが可能になる。   Next, the arithmetic circuit unit 170 determines the rotation angle (second rotation angle) from the detection value (angular velocity data) of the angular velocity sensor 112 for the feature point detection section Δt in which the rotation angle θz_mag is detected in the feature point detection process of step S108. ) Θz_gyro is calculated (step S112). Specifically, the arithmetic circuit unit 170 first uses the technique similar to the coordinate conversion processing applied to the magnetic data shown in FIG. It is converted into a coordinate system (gravity coordinate system) consisting of the 'and Z' axes. Then, the arithmetic circuit unit 170 converts the time difference (feature point detection section Δt) of each time when two or more feature points are detected from the detection value (magnetic data) of the geomagnetic sensor 120 shown in FIG. The rotation angle θz_gyro is calculated by integrating the detection value of the angular velocity sensor 112 with time. Here, as shown in FIGS. 6D to 6F, the rotation angles of the angular velocity sensors around the X ′, Y ′, and Z ′ axes at the time when the feature points are detected are respectively θx_gyro, It is specified as θy_gyro and θz_gyro. In step S112, as in step S110, the rotation angle θz_gyro around the Z ′ axis of the angular velocity sensor shown in FIG. 6D is detected as the rotation angle on the feature point detection plane (X′-Y ′ plane). That is, based on the angular velocity data acquired by the angular velocity sensor 112, the rotation angle θz_gyro of the feature point detection section Δt is calculated. Here, when the detected value (angular velocity data) from the angular velocity sensor 112 includes a predetermined offset value resulting from a temperature change, the rotation angle θz_gyro calculated by time-integrating the detected value of the angular velocity sensor 112. In step S110, a numerical value inevitably different from the rotation angle θz_mag detected by the feature point detection process is obtained. Note that the rotation angles θx_gyro, θy_gyro, and θz_gyro of the angular velocity sensor in the present embodiment are calculated by time-integrating the detection values of the angular velocity sensor 112, and are shown in FIGS. 6 (a) to 6 (c) above. Although it is not strictly appropriate to indicate the same as the rotation angle of the geomagnetic sensor, it can be properly understood by conceptually as shown in FIGS. 6 (d) to 6 (f). Become.

次いで、演算回路部170は、上記の回転角度θz_magと回転角度θz_gyroとを比較し(ステップS114)、回転角度θz_magと回転角度θz_gyroとの差分となる角度Δθzが予め設定された閾値α以上か否かを判定する(ステップS116)。回転角度θz_magと回転角度θz_gyroとの差が閾値αよりも小さい場合(ステップS116のNo)には、演算回路部170は、角速度センサ112のオフセット値に変化が生じていない、あるいは、その変化が許容範囲内であると判定して、ステップS102に戻ってモーションセンサ110(角速度センサ112、加速度センサ114)及び地磁気センサ120から出力される各検出値を取得する動作を実行する。一方、ステップS116において、回転角度θz_magと回転角度θz_gyroとの差分角度Δθzが閾値α以上の場合(ステップS116のYes)には、演算回路部170は、角速度センサ112がオフセット値の変化により本来の角速度の値(真の値)からずれた角速度を検出したと判定して、X′、Y′、Z′の各軸周りのオフセット値を算出する(ステップS118)。   Next, the arithmetic circuit unit 170 compares the rotation angle θz_mag and the rotation angle θz_gyro (step S114), and determines whether the angle Δθz that is the difference between the rotation angle θz_mag and the rotation angle θz_gyro is equal to or greater than a preset threshold value α. Is determined (step S116). When the difference between the rotation angle θz_mag and the rotation angle θz_gyro is smaller than the threshold value α (No in step S116), the arithmetic circuit unit 170 has not changed the offset value of the angular velocity sensor 112, or the change has occurred. It determines with it being in a tolerance, returns to Step S102, and performs operation which acquires each detection value outputted from motion sensor 110 (angular velocity sensor 112, acceleration sensor 114) and geomagnetic sensor 120. On the other hand, if the difference angle Δθz between the rotation angle θz_mag and the rotation angle θz_gyro is greater than or equal to the threshold value α (Yes in step S116), the arithmetic circuit unit 170 causes the angular velocity sensor 112 to change its original value due to the change in the offset value. It is determined that an angular velocity deviating from the angular velocity value (true value) has been detected, and offset values around the X ′, Y ′, and Z ′ axes are calculated (step S118).

なお、ステップS116において、回転角度θz_magと回転角度θz_gyroとの差分角度Δθzの大きさを比較する対象となる閾値αは、角速度センサ112のオフセット値を高い精度で算出する必要がある場合には、例えば±5°程度の角度範囲に設定され、オフセット値を比較的低い精度で算出する場合には、例えば±10°程度の角度範囲に設定される。なお、閾値αの角度範囲は、上記の数値に限定されるものではなく、角速度データを使用するアプリケーションが要求する精度や角速度センサ112の検出特性等に応じて、適宜設定されるものである。   In step S116, when the threshold value α to be compared with the difference angle Δθz between the rotation angle θz_mag and the rotation angle θz_gyro needs to be calculated with high accuracy, the offset value of the angular velocity sensor 112 is: For example, when the angle range is set to about ± 5 ° and the offset value is calculated with relatively low accuracy, the angle range is set to about ± 10 °, for example. Note that the angle range of the threshold value α is not limited to the above numerical value, and is appropriately set according to the accuracy required by the application using the angular velocity data, the detection characteristics of the angular velocity sensor 112, and the like.

また、回転角度θz_magと回転角度θz_gyroとの差分角度Δθzは、角速度センサ112において特徴点検出区間Δtの間に経時的に累積したオフセット分(オフセット値)に相当する。そこで、演算回路部170は、X′、Y′、Z′の各軸について、次式に示すように、角速度センサ112により取得される磁気データに生じているオフセット値を算出する。
X′軸周り:(θx_gyro−θx_mag)/Δt
Y′軸周り:(θy_gyro−θy_mag)/Δt
Z′軸周り:(θz_gyro−θz_mag)/Δt
Further, the difference angle Δθz between the rotation angle θz_mag and the rotation angle θz_gyro corresponds to the offset (offset value) accumulated over time during the feature point detection section Δt in the angular velocity sensor 112. Therefore, the arithmetic circuit unit 170 calculates an offset value generated in the magnetic data acquired by the angular velocity sensor 112 for each of the X ′, Y ′, and Z ′ axes as shown in the following equation.
Around X ′ axis: (θx_gyro−θx_mag) / Δt
Around Y ′ axis: (θy_gyro−θy_mag) / Δt
Around Z ′ axis: (θz_gyro−θz_mag) / Δt

すなわち、X′、Y′、Z′の各軸のオフセット値は、角速度センサ112のセンサデータに基づいて算出された各回転角度θx_gyro、θy_gyro、θz_gyro(「θgyro」と総称する)から、特徴点検出処理により取得された、各軸に対応する角回転角度θx_mag、θy_mag、θz_mag(「θmag」と総称する)を減算した差分(単位[deg])を、特徴点検出区間Δt(単位[sec])により除算することにより算出される。この場合、算出されたオフセット値の単位は、[dps]で表される。算出されたオフセット値は、メモリ部180の所定の記憶領域に上書き保存(更新)されることにより補正され(ステップS120)、角速度センサ112により取得される角速度データのオフセット補正の際に適用される。その後、演算回路部170は、角速度センサ112のオフセット値補正処理を終了する判断をするまで(ステップS122のYes)、ステップS102に戻って、上述した一連の処理動作を繰り返し実行する。   That is, the offset values of the X ′, Y ′, and Z ′ axes are feature inspections based on the rotation angles θx_gyro, θy_gyro, and θz_gyro (collectively referred to as “θgyro”) calculated based on the sensor data of the angular velocity sensor 112. The difference (unit [deg]) obtained by subtracting the angular rotation angles θx_mag, θy_mag, and θz_mag (collectively referred to as “θmag”) corresponding to each axis acquired by the extraction process is used as a feature point detection section Δt (unit [sec]). ). In this case, the unit of the calculated offset value is represented by [dps]. The calculated offset value is corrected by being overwritten and saved (updated) in a predetermined storage area of the memory unit 180 (step S120), and applied when offset correction of angular velocity data acquired by the angular velocity sensor 112 is performed. . Thereafter, the arithmetic circuit unit 170 returns to step S102 and repeatedly executes the above-described series of processing operations until it determines to end the offset value correction processing of the angular velocity sensor 112 (Yes in step S122).

なお、図3に示したフローチャートにおいては図示を省略したが、演算回路部170は、上述した一連の処理動作の実行中、処理動作を中断又は終了させる入力操作や動作状態の変化を常時監視して、当該入力操作や状態変化を検出した場合には、処理動作を強制的に終了する。具体的には、演算回路部170は、ユーザによる動作電源の遮断操作や、電源供給部190における電池残量の低下、実行中の機能やアプリケーションの異常等を検出して、一連の処理動作を強制的に中断して終了する。   Although not shown in the flowchart shown in FIG. 3, the arithmetic circuit unit 170 constantly monitors an input operation for interrupting or terminating the processing operation or a change in the operating state during the execution of the series of processing operations described above. When the input operation or state change is detected, the processing operation is forcibly terminated. Specifically, the arithmetic circuit unit 170 detects an operation power-off operation by the user, a decrease in the remaining battery level in the power supply unit 190, an abnormality in a function being executed or an application, etc., and performs a series of processing operations. Forcibly interrupt and exit.

これにより、演算回路部170は、例えば電子機器100を携帯又は装着したユーザの運動状態や移動軌跡等に関連する各種のアプリケーションを実行する際に、角速度センサ112により取得された角速度データの各軸の出力成分に対して、上述した角速度センサ112のオフセット値補正処理により補正された最新(直近)のオフセット値を相殺する演算処理(オフセット補正)を行う。ここで、角速度センサのオフセット値の変化は、一般に時間の経過に対して略比例する、DC(直流)成分的な特徴を有しているので、演算回路部170は、角速度センサ112の検出値(角速度データ)により求められる角度から、上記の角速度データに基づいて算出された各回転角度θgyroから特徴点検出処理により取得された各回転角度θmagとの各差分角度Δθを減算することにより、本来の角速度の値(真の値)を導出することができる。   Thereby, the arithmetic circuit unit 170, for example, executes each application of the angular velocity data acquired by the angular velocity sensor 112 when executing various applications related to the movement state or movement locus of the user who carries or wears the electronic device 100. Is calculated (offset correction) to cancel the latest (most recent) offset value corrected by the offset value correction process of the angular velocity sensor 112 described above. Here, since the change in the offset value of the angular velocity sensor has a DC (direct current) component characteristic that is generally proportional to the passage of time, the arithmetic circuit unit 170 detects the detected value of the angular velocity sensor 112. By subtracting each difference angle Δθ from each rotation angle θmag acquired by the feature point detection process from each rotation angle θgyro calculated based on the above angular velocity data from the angle obtained by (angular velocity data), The value of the angular velocity (true value) can be derived.

このように、本実施形態においては、地磁気センサにより取得された磁気データ(地磁気センサ出力)に対して、センサ座標系を加速度センサにより取得された加速度データ(加速度センサ出力)に基づく重力座標系に変換する処理を施し、磁気データを鉛直成分と水平成分とに分解する。そして、磁気データの水平成分から磁北方向を決定する特徴点を2点以上検出し、重力軸であるZ′軸周りの回転角度θz_magを検出する。また、角速度センサ112により取得された角速度データに対して、上記と同様の座標変換処理を施して、磁気データにおいて2点の特徴点を検出した区間Δtにおいて回転角度θz_gyroを算出する。そして、特徴点検出処理により検出された回転角度θz_magと角速度データに基づいて算出された回転角度θz_gyroとの差分角度Δθzが所定の閾値α以上である場合には、重力座標系における各軸周りのオフセット値が算出される。ここで、角速度データに基づいて算出された回転角度θz_gyroと、特徴点検出処理により取得された回転角度θz_magとの差分角度Δθが、角速度センサ112において経時的に累積したオフセット分(オフセット値)として算出される。そして、角速度センサ112により取得された角速度データに対して、算出されたオフセット値を相殺する演算処理を行うことにより、ユーザの身体の動きに応じて電子機器100に生じる移動方向の変化(角速度)が算出される。   Thus, in the present embodiment, the sensor coordinate system is changed to a gravity coordinate system based on the acceleration data (acceleration sensor output) acquired by the acceleration sensor with respect to the magnetic data (geomagnetic sensor output) acquired by the geomagnetic sensor. A conversion process is performed to decompose the magnetic data into a vertical component and a horizontal component. Then, two or more feature points that determine the magnetic north direction are detected from the horizontal component of the magnetic data, and the rotation angle θz_mag around the Z ′ axis that is the gravity axis is detected. The angular velocity data acquired by the angular velocity sensor 112 is subjected to coordinate conversion processing similar to the above, and the rotation angle θz_gyro is calculated in the section Δt in which two feature points are detected in the magnetic data. When the difference angle Δθz between the rotation angle θz_mag detected by the feature point detection process and the rotation angle θz_gyro calculated based on the angular velocity data is equal to or greater than a predetermined threshold value α, An offset value is calculated. Here, the difference angle Δθ between the rotation angle θz_gyro calculated based on the angular velocity data and the rotation angle θz_mag obtained by the feature point detection processing is an offset amount (offset value) accumulated in the angular velocity sensor 112 over time. Calculated. Then, by performing a calculation process that cancels the calculated offset value on the angular velocity data acquired by the angular velocity sensor 112, a change in the movement direction (angular velocity) that occurs in the electronic device 100 according to the movement of the user's body. Is calculated.

したがって、本実施形態に係る電子機器においては、角速度センサのオフセット値補正処理を実行(開始)する際や、特徴点検出処理に基づいて角速度センサのオフセット値を補正する際の判断処理を含む一連の処理動作を、ユーザが特に意識することなく日常の自然な動作や任意の運動等を行うことにより、オフセット値を自動で適切に補正することができ、正確な角速度を取得することができる。   Therefore, in the electronic device according to the present embodiment, a series of processes including determination processing when executing (starting) the offset value correction processing of the angular velocity sensor or correcting the offset value of the angular velocity sensor based on the feature point detection processing. By performing daily natural operations or arbitrary exercises without the user being particularly conscious of this processing operation, the offset value can be automatically corrected appropriately, and an accurate angular velocity can be obtained.

また、電子機器100を強い磁場が存在する環境で使用した場合、方位検出手段である地磁気センサ120の近傍に配置された金属パッケージの電子部品等が着磁してしまうことにより、地磁気センサ120から出力される検出値に基づいて算出される方位は、当該磁場の影響を受けて正確な方位とは異なってしまうことになる。これに対して、本実施形態においては、地磁気センサ120を回転させたときに検出される2点以上の特徴点に基づく回転角度を用いて角速度センサ112のオフセット値を算出する手法を有しているので、地磁気センサ120の着磁の有無(すなわち、地磁気センサ120のオフセット異常)や地磁気センサ120により算出される方位の精度(正確さ)に影響されることなく、オフセット値を適切に補正することができる。   In addition, when the electronic device 100 is used in an environment where a strong magnetic field exists, an electronic component of a metal package or the like disposed in the vicinity of the geomagnetic sensor 120 serving as a direction detecting unit is magnetized, so that the geomagnetic sensor 120 The azimuth calculated based on the output detection value is different from the correct azimuth due to the influence of the magnetic field. In contrast, the present embodiment has a method of calculating the offset value of the angular velocity sensor 112 using a rotation angle based on two or more feature points detected when the geomagnetic sensor 120 is rotated. Therefore, the offset value is appropriately corrected without being influenced by the presence / absence of magnetization of the geomagnetic sensor 120 (that is, the offset abnormality of the geomagnetic sensor 120) or the accuracy (accuracy) of the azimuth calculated by the geomagnetic sensor 120. be able to.

なお、本実施形態においては、電子機器100として、温度センサ130と通信機能部140を備えた構成を示したが、本発明はこれに限定されるものではない。すなわち、上述したように、図3のフローチャートに示した角速度センサ112のオフセット値補正方法を実行するための条件(トリガー)として、温度変化を検出する手法を適用する場合には、温度センサ130は必須であるが、温度変化を検出する手法以外の手法を適用する場合には、電子機器100は、温度センサ130を備えていない構成であってもよい。また、電子機器100が、モーションセンサ110や地磁気センサ120等により取得されたセンサデータや、当該センサデータに基づいて生成される各種の情報を、電子機器100の外部の機器やネットワークに送受信する形態を有する場合には、通信機能部140は必須であるが、各種の情報を電子機器100の外部に送受信しない形態の場合には、電子機器100は、通信機能部140を備えていない構成であってもよい。   In the present embodiment, the configuration including the temperature sensor 130 and the communication function unit 140 is shown as the electronic device 100, but the present invention is not limited to this. That is, as described above, when a method for detecting a temperature change is applied as a condition (trigger) for executing the offset value correction method of the angular velocity sensor 112 shown in the flowchart of FIG. Although essential, when a technique other than the technique for detecting a temperature change is applied, the electronic device 100 may be configured not to include the temperature sensor 130. Further, the electronic device 100 transmits and receives sensor data acquired by the motion sensor 110, the geomagnetic sensor 120, and the like, and various types of information generated based on the sensor data, to a device or a network outside the electronic device 100. The communication function unit 140 is indispensable in the case of having the communication function unit 140, but the electronic device 100 does not include the communication function unit 140 in the case where various types of information are not transmitted to and received from the outside of the electronic device 100. May be.

(変形例)
上述した第1の実施形態に係る電子機器のセンサ較正方法(角速度センサのオフセット値補正方法)は、次に示すような変形例を適用することができる。すなわち、上述した実施形態においては、加速度センサ114及び地磁気センサ120により取得されたセンサデータに基づいて、磁気データの水平方向成分に含まれる特徴点を検出し、2点以上の特徴点が検出されるまで図3に示したフローチャートのステップS102〜S108の処理動作を繰り返し実行する手法を有している。この手法においては、電子機器100を携帯又は装着したユーザが動作していない場合や、角速度センサ112のオフセット値が変化していない場合に、上記のステップS102〜S108の処理動作が繰り返し実行されてしまう可能性がある。
(Modification)
The following modifications can be applied to the sensor calibration method (an angular velocity sensor offset value correction method) of the electronic apparatus according to the first embodiment described above. That is, in the above-described embodiment, based on the sensor data acquired by the acceleration sensor 114 and the geomagnetic sensor 120, feature points included in the horizontal component of the magnetic data are detected, and two or more feature points are detected. Until the processing operation of steps S102 to S108 in the flowchart shown in FIG. 3 is repeatedly executed. In this method, when the user who carries or wears the electronic device 100 is not operating, or when the offset value of the angular velocity sensor 112 has not changed, the processing operations of the above steps S102 to S108 are repeatedly executed. There is a possibility.

そこで、第1の変形例においては、上記のステップS108における特徴点検出処理において、演算回路部170は、ステップS102〜S108の処理動作を繰り返し実行する際の時間経過、又は、角速度センサ112周辺の温度変化のうちの、少なくともいずれか一方を監視し、所定の時間経過を検出した場合や、温度変化を検出しない場合には、角速度センサ112のオフセット値補正処理を終了する。ここで、処理動作の繰り返し時間の経過(タイムアウト)は、例えば演算回路部170に備えられた計時機能(CPUタイマー)により計測される。また、角速度センサ112周辺の温度変化は、例えば図2に示した温度センサ130により検出される。なお、上記のオフセット値補正処理の終了後、温度センサ130により所定の温度変化(例えば、±10℃以上の変化)が検出された場合には、演算回路部170は、図3に示したオフセット値補正処理を再度開始する。   Therefore, in the first modification, in the feature point detection processing in step S108 described above, the arithmetic circuit unit 170 repeats the time when the processing operations in steps S102 to S108 are repeatedly executed, or the vicinity of the angular velocity sensor 112. At least one of the temperature changes is monitored, and when a predetermined time has elapsed or when no temperature change is detected, the offset value correction processing of the angular velocity sensor 112 is terminated. Here, the elapsed time (timeout) of the processing operation is measured by, for example, a clocking function (CPU timer) provided in the arithmetic circuit unit 170. Moreover, the temperature change around the angular velocity sensor 112 is detected by, for example, the temperature sensor 130 shown in FIG. When a predetermined temperature change (for example, a change of ± 10 ° C. or more) is detected by the temperature sensor 130 after the above offset value correction processing is completed, the arithmetic circuit unit 170 determines the offset shown in FIG. The value correction process is started again.

また、第2の変形例においては、演算回路部170は、上記のステップS102において取得される加速度データや磁気データを監視し、加速度データ及び磁気データに基づいてユーザが動作していない状態(動作が微小な状態を含む)や、静止状態にあると判定した場合には、ステップS108において2点以上の特徴点が検出される確率が低いため、モーションセンサ110及び地磁気センサ120によりセンサデータを取得する動作を継続する。ここで、演算回路部170は、ステップS102の処理動作が所定の時間継続した場合には、角速度センサ112のオフセット値補正処理を終了する。この場合、オフセット値補正処理の終了に先立って、あるいは、終了時に、出力部160を介して、オフセット値補正を適切に実行するために、ユーザに所定の動作を促す旨の情報や、オフセット値補正を終了する旨の情報等を提供又は報知するものであってもよい。一方、加速度データ及び磁気データに基づいてユーザが動作していると判定した場合には、ステップS108において2点以上の特徴点が検出される確率が高くなるため、演算回路部170は、ステップS104の処理動作を実行する。   In the second modification, the arithmetic circuit unit 170 monitors the acceleration data and magnetic data acquired in step S102, and the user is not operating based on the acceleration data and magnetic data (operations). 2) (including a minute state) or a stationary state, sensor data is acquired by the motion sensor 110 and the geomagnetic sensor 120 because the probability that two or more feature points are detected in step S108 is low. To continue the operation. Here, the arithmetic circuit unit 170 ends the offset value correction processing of the angular velocity sensor 112 when the processing operation of step S102 continues for a predetermined time. In this case, prior to the end of the offset value correction process or at the time of the end, in order to appropriately execute the offset value correction via the output unit 160, information for prompting the user to perform a predetermined operation, or an offset value Information or the like indicating that the correction is completed may be provided or notified. On the other hand, if it is determined that the user is operating based on the acceleration data and the magnetic data, the probability that two or more feature points will be detected in step S108 increases, and the arithmetic circuit unit 170 determines that the calculation circuit unit 170 is in step S104. The processing operation is executed.

このように、上記の各変形例を第1の実施形態に適用することにより、角速度センサ112のオフセット値補正方法における、無駄な処理動作の実行を抑制して電力の無駄な消費を抑制することができるとともに、オフセット値補正処理を適切に実行することができる。   As described above, by applying each of the above-described modifications to the first embodiment, it is possible to suppress wasteful power consumption and suppress wasteful power consumption in the offset value correction method of the angular velocity sensor 112. And offset value correction processing can be appropriately executed.

さらに、上述した実施形態及び第2の変形例においては、モーションセンサ110や地磁気センサ120のセンサデータを監視することにより判定されるユーザの動作状態(ユーザが動作しているか否か)を、オフセット値補正処理を開始するための条件(トリガー)や、ステップS102〜S108の処理動作の有効性(すなわち、特徴点検出処理において特徴点が検出される確率)の判断に使用する手法を有している。この手法においては、例えばユーザは動作しているものの、電子機器100を継続的に回転させていない場合のように、ユーザの動作状態によっては、上記のステップS108において2点以上の特徴点を検出することができない場合が発生する可能性がある。   Further, in the above-described embodiment and the second modification, the user's operation state (whether or not the user is operating) determined by monitoring the sensor data of the motion sensor 110 or the geomagnetic sensor 120 is offset. It has a method used to determine the condition (trigger) for starting the value correction process and the effectiveness of the processing operation in steps S102 to S108 (that is, the probability that a feature point will be detected in the feature point detection process). Yes. In this method, for example, when the user is operating but the electronic device 100 is not continuously rotated, two or more feature points are detected in the above step S108 depending on the operation state of the user. You may not be able to do so.

そこで、第3の変形例においては、演算回路部170は、モーションセンサ110や地磁気センサ120のセンサデータに基づいて、ユーザの動作状態をより詳細に判定する。具体的には、演算回路部170は、ユーザが曲がり角を曲がったり周回コースを移動したりすることにより、進行方向が所定の角度(少なくとも90°)以上変化する動作を検知した場合や、電子機器100を継続的に回転させる動作を検知した場合に、オフセット値補正処理を開始したり、ステップS102〜S108の処理動作が有効であると判断したりする。すなわち、演算回路部170は、地磁気センサ120の向きを変化させて所定の角度以上回転させる動作が行われた場合に、上記のステップS108において2点以上の特徴点を有効に検出することができるものと判定する。   Therefore, in the third modification, the arithmetic circuit unit 170 determines the user's operation state in more detail based on the sensor data of the motion sensor 110 and the geomagnetic sensor 120. Specifically, the arithmetic circuit unit 170 detects an operation in which the traveling direction changes by a predetermined angle (at least 90 °) or more when the user turns a corner or moves around the circuit course, or an electronic device When an operation for continuously rotating 100 is detected, an offset value correction process is started, or it is determined that the processing operations in steps S102 to S108 are effective. That is, the arithmetic circuit unit 170 can effectively detect two or more feature points in the above-described step S108 when the operation of rotating the geomagnetic sensor 120 to rotate by a predetermined angle or more is performed. Judge that it is.

このように、第3の変形例を第1の実施形態に適用することにより、上記のステップS108において2点以上の特徴点を有効かつ確実に検出することができるので、無駄な処理動作の実行を抑制して電力の無駄な消費をさらに抑制することができるとともに、オフセット値補正処理をより適切に実行することができる。   As described above, by applying the third modification example to the first embodiment, it is possible to effectively and reliably detect two or more feature points in the above step S108. It is possible to further suppress the wasteful consumption of electric power and to more appropriately execute the offset value correction process.

なお、上記の各変形例は、第1の実施形態に個別に適用するものであってもよいし、複数の変形例を任意に組み合わせて第1の実施形態に適用するものであってもよい。例えば、前回のオフセット値の補正処理の実行から相当の時間が経過している場合や、温度センサ130により所定の温度変化を検知した場合には、演算回路部170は、ユーザの動作状態を監視して、例えば曲がり角を曲がる動作(進行方向が変化する動作)を検知した場合に、図3に示したオフセット値補正処理を実行する。これにより、無駄な処理動作の実行を抑制しつつ、オフセット値を自動で適切に補正することができ、正確な角速度を取得することができる。   Each of the above modifications may be applied individually to the first embodiment, or may be applied to the first embodiment by arbitrarily combining a plurality of modifications. . For example, when a considerable time has elapsed since the previous offset value correction process was performed, or when a predetermined temperature change is detected by the temperature sensor 130, the arithmetic circuit unit 170 monitors the user's operating state. Then, for example, when an operation that turns a corner (an operation that changes the traveling direction) is detected, the offset value correction process shown in FIG. 3 is executed. Thereby, it is possible to automatically correct the offset value appropriately while suppressing the execution of useless processing operations, and to acquire an accurate angular velocity.

<第2の実施形態>
次に、本発明の第2の実施形態に係る電子機器及びセンサ較正方法について、図面を参照して説明する。ここで、上述した第1の実施形態と同等の構成及び方法については、その説明を簡略化する。
<Second Embodiment>
Next, an electronic apparatus and a sensor calibration method according to the second embodiment of the present invention will be described with reference to the drawings. Here, the description of the configuration and method equivalent to those of the first embodiment will be simplified.

上述した第1の実施形態及びその変形例においては、磁気データにおける特徴点検出処理により検出された回転角度θz_magと、角速度データに基づいて算出された回転角度θz_gyroとの差分角度Δθzに基づいて、角速度センサ112のオフセット値を算出し、算出されたオフセット値を用いて、角速度センサ112により取得された角速度データをオフセット補正することにより、本来の角速度の値(真の値)を導出する手法について説明した。第2の実施形態においては、所定の温度変化ごとに、第1の実施形態に示した角速度センサ112のオフセット値補正処理を適用して算出されたオフセット値を、各温度範囲に対応付けてテーブルデータとして保持することを特徴としている。   In the above-described first embodiment and its modification, based on the difference angle Δθz between the rotation angle θz_mag detected by the feature point detection process in the magnetic data and the rotation angle θz_gyro calculated based on the angular velocity data, A method of deriving an original angular velocity value (true value) by calculating an offset value of the angular velocity sensor 112 and offset-correcting the angular velocity data acquired by the angular velocity sensor 112 using the calculated offset value. explained. In the second embodiment, for each predetermined temperature change, the offset value calculated by applying the offset value correction process of the angular velocity sensor 112 shown in the first embodiment is associated with each temperature range in a table. It is characterized by holding as data.

第2の実施形態に係る電子機器100は、上述した第1の実施形態に示した各機能ブロック(図2参照)において、温度センサ130を必須の構成として備えるとともに、メモリ部180の所定の記憶領域に、後述するオフセットテーブルが保存されている。また、電子機器100に備えられる演算回路部170は、上述した第1の実施形態と同様に、磁気データにおける特徴点検出処理により検出された回転角度θz_magと、角速度データに基づいて算出された回転角度θz_gyroとの差分角度Δθzに基づいて、角速度センサ112のオフセット値を算出する機能に加え、算出されたオフセット値を現在の温度の温度範囲に対応付けて、メモリ部180のオフセットテーブルに登録、保持する機能を有している。そして、演算回路部170は、温度センサ130により検出された温度変化に基づいて、第1の実施形態及びその変形例に示したオフセット値補正処理に基づいて算出されたオフセット値、又は、現在の温度の温度範囲に対応付けてオフセットテーブルに登録されたオフセット値のいずれかを用いて、本来の角速度の値(真の値)を導出する演算処理を実行する。   The electronic device 100 according to the second embodiment includes the temperature sensor 130 as an essential component in each functional block (see FIG. 2) shown in the first embodiment described above, and predetermined storage in the memory unit 180. An offset table (to be described later) is stored in the area. In addition, the arithmetic circuit unit 170 provided in the electronic device 100 is similar to the first embodiment described above in that the rotation angle θz_mag detected by the feature point detection process in the magnetic data and the rotation calculated based on the angular velocity data. In addition to the function of calculating the offset value of the angular velocity sensor 112 based on the difference angle Δθz from the angle θz_gyro, the calculated offset value is associated with the temperature range of the current temperature and registered in the offset table of the memory unit 180. It has a function to hold. Then, the arithmetic circuit unit 170 calculates the offset value calculated based on the offset value correction processing described in the first embodiment and the modification based on the temperature change detected by the temperature sensor 130, or the current value. An arithmetic process for deriving an original angular velocity value (true value) is executed using any of the offset values registered in the offset table in association with the temperature range of the temperature.

次に、本実施形態に係る電子機器におけるセンサ較正方法(角速度センサのオフセット値補正方法)について、図面を参照して説明する。ここで、以下に示す電子機器100のセンサ較正方法(図7に示すフローチャート)も第1の実施形態と同様に、演算回路部170が所定の制御プログラム及びアルゴリズムプログラムに従って処理を実行することにより実現される。   Next, a sensor calibration method (an angular velocity sensor offset value correction method) in the electronic apparatus according to the present embodiment will be described with reference to the drawings. Here, the sensor calibration method (the flowchart shown in FIG. 7) of the electronic device 100 shown below is also realized by the arithmetic circuit unit 170 executing processing according to a predetermined control program and algorithm program, as in the first embodiment. Is done.

図7は、本実施形態に係る電子機器におけるセンサ較正方法の一例を示すフローチャートである。図8は、本実施形態に適用されるオフセットテーブルの一例を示す概略図である。   FIG. 7 is a flowchart illustrating an example of a sensor calibration method in the electronic apparatus according to the present embodiment. FIG. 8 is a schematic diagram illustrating an example of an offset table applied to the present embodiment.

本実施形態に係る電子機器100のセンサ較正方法においては、例えば図7のフローチャートに示すように、まず、電子機器100が起動すると、演算回路部170は、少なくとも温度センサ130によるセンシング動作を開始して、温度センサ130から出力される検出値(温度データ)を取得してメモリ部180の所定の記憶領域に保存する(ステップS202)。そして、演算回路部170は、メモリ部180に保存されたオフセットテーブルを参照して、温度センサ130により取得された現在の温度が属する温度範囲(具体的には、基準温度に対する温度変化により現在の温度が属する温度範囲)において、上述した第1の実施形態に示したオフセット値補正処理に基づいて算出されたオフセット値が既に登録されているか(取得済みか)否かを判定する(ステップS204)。   In the sensor calibration method of the electronic device 100 according to the present embodiment, for example, as illustrated in the flowchart of FIG. 7, first, when the electronic device 100 is activated, the arithmetic circuit unit 170 starts at least the sensing operation by the temperature sensor 130. Thus, the detection value (temperature data) output from the temperature sensor 130 is acquired and stored in a predetermined storage area of the memory unit 180 (step S202). Then, the arithmetic circuit unit 170 refers to the offset table stored in the memory unit 180 and belongs to the temperature range to which the current temperature acquired by the temperature sensor 130 belongs (specifically, the current range according to the temperature change with respect to the reference temperature). In the temperature range to which the temperature belongs, it is determined whether or not the offset value calculated based on the offset value correction process described in the first embodiment has been registered (obtained) (step S204). .

ここで、オフセットテーブルは、例えば図8に示すように、予め設定された基準温度に対して高温(温度上昇)側及び低温(温度下降)側に例えば10℃ごとの温度範囲・・・−20〜−10℃、−10〜0℃、0〜+10℃、+10〜+20℃、・・・を規定して、各温度範囲に対して第1の実施形態に示したオフセット値補正処理に基づいて算出されたオフセット値が登録されている。なお、オフセットテーブルは、電子機器100の初期状態(初回起動時)においては、全ての温度範囲に対応するオフセット値が未登録(ブランク)の状態に設定され、また、次回以降の電子機器100の起動時には前回までに登録されたオフセット値が保持されている。また、オフセットテーブルに設定される温度範囲は、オフセット補正された角速度データを使用するアプリケーションが要求する精度や角速度センサ112の検出特性等に応じて、その分解能(温度範囲の幅)が決定される。   Here, for example, as shown in FIG. 8, the offset table has a temperature range, for example, every 10 ° C. on the high temperature (temperature rise) side and the low temperature (temperature fall) side with respect to a preset reference temperature. ~ -10 ° C, -10 to 0 ° C, 0 to + 10 ° C, +10 to + 20 ° C, and so on, based on the offset value correction processing shown in the first embodiment for each temperature range The calculated offset value is registered. The offset table is set to an unregistered (blank) state of offset values corresponding to all temperature ranges in the initial state (first time activation) of the electronic device 100, and the electronic device 100 of the next and subsequent times is set. At startup, the offset values registered up to the previous time are held. Further, the resolution (temperature range width) of the temperature range set in the offset table is determined according to the accuracy required by the application using the angular velocity data corrected for offset, the detection characteristics of the angular velocity sensor 112, and the like. .

そして、ステップS204において、オフセットテーブルの現在の温度に対応する温度範囲において、オフセット値補正処理に基づいて算出されたオフセット値が登録されていない場合(ステップS204のNo)には、演算回路部170は、上述した第1の実施形態と同様のオフセット値補正処理(図3のフローチャート参照)を開始する。ここで、図7のフローチャートに示したステップS206〜S222の各処理動作は、それぞれ、図3のフローチャートに示したステップS102〜S118の各処理動作に対応する。また、本実施形態においては、図7のフローチャートに示した各処理動作に限定されるものではなく、上述した第1の実施形態の変形例を適用した処理動作を実行するものであってもよい。   In step S204, if the offset value calculated based on the offset value correction process is not registered in the temperature range corresponding to the current temperature in the offset table (No in step S204), the arithmetic circuit unit 170 Starts offset value correction processing (see the flowchart of FIG. 3) similar to that of the first embodiment described above. Here, each processing operation of steps S206 to S222 shown in the flowchart of FIG. 7 corresponds to each processing operation of steps S102 to S118 shown in the flowchart of FIG. Further, the present embodiment is not limited to each processing operation shown in the flowchart of FIG. 7, and may execute a processing operation to which the above-described modification of the first embodiment is applied. .

角速度センサ112のオフセット値補正処理(ステップS206〜S222)においては、上述した第1の実施形態と同様に、磁気データにおける特徴点検出処理により検出された回転角度θz_magと、角速度データに基づいて算出された回転角度θz_gyroとの差分角度Δθzに基づいて、角速度センサ112のオフセット値が算出される。算出されたオフセット値は、基準温度に対する温度変化により現在の温度が属する温度範囲に対応付けて、オフセットテーブルに登録することにより補正され(ステップS224、S226)、角速度センサ112により取得される角速度データのオフセット補正の際に適用される。その後、演算回路部170が、角速度センサ112のオフセット値補正処理を終了する判断をするまで(ステップS228のYes)、ステップS202に戻って、上述した一連の処理動作が繰り返し実行される。   In the offset value correction processing (steps S206 to S222) of the angular velocity sensor 112, calculation is performed based on the rotation angle θz_mag detected by the feature point detection processing in the magnetic data and the angular velocity data, as in the first embodiment described above. The offset value of the angular velocity sensor 112 is calculated based on the difference angle Δθz with respect to the rotation angle θz_gyro. The calculated offset value is corrected by registering it in the offset table in association with the temperature range to which the current temperature belongs by the temperature change with respect to the reference temperature (steps S224 and S226), and the angular velocity data acquired by the angular velocity sensor 112 It is applied when offset correction. Thereafter, until the arithmetic circuit unit 170 determines to end the offset value correction processing of the angular velocity sensor 112 (Yes in step S228), the process returns to step S202, and the above-described series of processing operations are repeatedly executed.

一方、ステップS204において、オフセットテーブルの現在の温度に対応する温度範囲に、オフセット値補正処理に基づいて算出されたオフセット値が既に登録されている場合(ステップS204のYes)には、演算回路部170は、上述したステップS206〜S228の処理動作を実行することなく、オフセット値補正処理を終了する。すなわち、現在の温度に対応付けられてオフセットテーブルに既に登録されているオフセット値を用いて、角速度センサ112により取得される角速度データをオフセット補正することにより、本来の角速度の値(真の値)が導出される。   On the other hand, when the offset value calculated based on the offset value correction process has already been registered in the temperature range corresponding to the current temperature in the offset table in step S204 (Yes in step S204), the arithmetic circuit unit. 170 terminates the offset value correction processing without executing the processing operations of steps S206 to S228 described above. That is, by using the offset value associated with the current temperature and already registered in the offset table, the angular velocity data acquired by the angular velocity sensor 112 is offset-corrected to thereby obtain the original angular velocity value (true value). Is derived.

このように、本実施形態においては、一定の温度変化ごとに、第1の実施形態及びその変形例に示したオフセット値補正処理を実行して角速度センサ112のオフセット値を取得することにより、オフセット値が各温度範囲に対応付けてオフセットテーブルに登録されて保持される。これにより、上述した第1の実施形態に示した作用効果に加え、角速度センサ112に固有のオフセット値のバラツキ特性を、オフセットテーブルの形態で自動的に学習することができ、常に温度変化に応じた適切なオフセット値を用いて角速度データをオフセット補正することができ、正確な角速度を導出することができる。   As described above, in this embodiment, the offset value correction process shown in the first embodiment and the modification example is executed for each constant temperature change to obtain the offset value of the angular velocity sensor 112, thereby obtaining the offset. The value is registered and held in the offset table in association with each temperature range. As a result, in addition to the operational effects shown in the first embodiment described above, the variation characteristic of the offset value inherent to the angular velocity sensor 112 can be automatically learned in the form of an offset table, and always responds to temperature changes. The angular velocity data can be offset-corrected using an appropriate offset value, and an accurate angular velocity can be derived.

なお、本実施形態においては、オフセットテーブルに設定される温度範囲として、一定の温度範囲(例えば10℃)を規定した場合について説明したが、本発明はこれに限定されるものではない。すなわち、角速度データを使用するアプリケーションが要求する精度や角速度センサ112の検出特性等に応じて、例えば基準温度近傍の温度領域では温度範囲を狭く(例えば5℃)設定し、基準温度から十分離れた温度領域では広く(例えば10℃)設定するものであってもよい。   In the present embodiment, the case where a certain temperature range (for example, 10 ° C.) is defined as the temperature range set in the offset table has been described, but the present invention is not limited to this. That is, according to the accuracy required by the application using the angular velocity data, the detection characteristics of the angular velocity sensor 112, etc., the temperature range is set narrow (for example, 5 ° C.) in the temperature region near the reference temperature, and sufficiently separated from the reference temperature. The temperature range may be set broadly (for example, 10 ° C.).

以上、本発明のいくつかの実施形態について説明したが、本発明は、上述した実施形態に限定されるものではなく、特許請求の範囲に記載された発明とその均等の範囲を含むものである。
以下に、本願出願の当初の特許請求の範囲に記載された発明を付記する。
As mentioned above, although some embodiment of this invention was described, this invention is not limited to embodiment mentioned above, It includes the invention described in the claim, and its equivalent range.
Hereinafter, the invention described in the scope of claims of the present application will be appended.

(付記)
[1]
角速度データを取得する角速度センサと、
磁気データを取得する地磁気センサと、
前記角速度センサのオフセット値を算出する演算回路部と、
を備え、
前記演算回路部は、前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記オフセット値を算出することを特徴とする電子機器。
(Appendix)
[1]
An angular velocity sensor for obtaining angular velocity data;
A geomagnetic sensor for acquiring magnetic data;
An arithmetic circuit unit for calculating an offset value of the angular velocity sensor;
With
The arithmetic circuit unit calculates a first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second calculated based on the angular velocity data. The offset value is calculated based on a comparison with the rotation angle of the electronic device.

[2]
更に、加速度データを取得する加速度センサを備え、
前記演算回路部は、前記地磁気センサ及び前記角速度センサを、前記加速度データに基づいて推定される重力方向に設定される中心軸の回りに回転させたときに前記磁気データに基づいて検出される前記第1の回転角度と、前記角速度データに基づいて算出される前記第2の回転角度と、の比較に基づいて前記オフセット値を算出することを特徴とする[1]に記載の電子機器。
[2]
Furthermore, an acceleration sensor for acquiring acceleration data is provided,
The arithmetic circuit unit is detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are rotated around a central axis set in a gravitational direction estimated based on the acceleration data. The electronic apparatus according to [1], wherein the offset value is calculated based on a comparison between a first rotation angle and the second rotation angle calculated based on the angular velocity data.

[3]
前記演算回路部は、
前記磁気データ及び前記角速度データを、前記重力方向を基準とする座標系に変換する座標変換処理を施し、
前記地磁気センサと前記角速度センサを前記中心軸の周りに回転させて、前記座標変換処理後の前記磁気データの前記重力方向に垂直な水平成分から地球の磁極方向を決定する特徴点が2点以上検出されたときの前記磁気データの水平成分の回転角度を前記第1の回転角度として検出し、前記磁気データにおいて前記2点以上の前記特徴点が検出されたときに前記座標変換処理後の前記角速度データに基づいて算出される回転角度を前記第2の回転角度として取得する、
ことを特徴とする[2]に記載の電子機器。
[3]
The arithmetic circuit unit is:
Performing a coordinate conversion process for converting the magnetic data and the angular velocity data into a coordinate system based on the gravitational direction;
Two or more characteristic points that determine the magnetic pole direction of the earth from the horizontal component perpendicular to the gravitational direction of the magnetic data after the coordinate transformation process by rotating the geomagnetic sensor and the angular velocity sensor around the central axis The rotation angle of the horizontal component of the magnetic data when detected is detected as the first rotation angle, and the two or more feature points are detected in the magnetic data, Obtaining a rotation angle calculated based on angular velocity data as the second rotation angle;
The electronic device according to [2], wherein

[4]
前記演算回路部は、前記磁気データの前記水平成分が最大値又は最小値となる角度方向を、前記特徴点として検出することを特徴とする[3]に記載の電子機器。
[4]
The electronic device according to [3], wherein the arithmetic circuit unit detects, as the feature point, an angular direction in which the horizontal component of the magnetic data has a maximum value or a minimum value.

[5]
温度データを取得する温度センサをさらに備え、
前記演算回路部は、前記温度センサにより所定の温度変化が検出されたときに、前記オフセット値の算出を実行することを特徴とする[1]乃至[4]のいずれか一項に記載の電子機器。
[5]
A temperature sensor for acquiring temperature data;
The electronic circuit according to any one of [1] to [4], wherein the arithmetic circuit unit calculates the offset value when a predetermined temperature change is detected by the temperature sensor. machine.

[6]
前記演算回路部は、前記角速度センサ又は前記地磁気センサにより前記電子機器の動きが検出されたときに、前記オフセット値の算出を実行することを特徴とする[1]乃至[5]のいずれか一項に記載の電子機器。
[6]
Any one of [1] to [5], wherein the arithmetic circuit unit calculates the offset value when a motion of the electronic device is detected by the angular velocity sensor or the geomagnetic sensor. The electronic device as described in the paragraph.

[7]
前記演算回路部は、前記角速度センサ又は前記地磁気センサにより前記電子機器を所定の角度以上回転させる動作が行われたことが検出されたときに、前記オフセット値の算出を実行することを特徴とする[6]に記載の電子機器。
[7]
The arithmetic circuit unit calculates the offset value when it is detected by the angular velocity sensor or the geomagnetic sensor that an operation of rotating the electronic device by a predetermined angle or more is performed. The electronic device according to [6].

[8]
温度データを取得する温度センサと、
前記オフセット値を所定の温度範囲ごとに対応付けて保持するオフセットテーブルと、
をさらに備え、
前記演算回路部は、前記温度センサにより検出された温度が、前記オフセットテーブルに前記オフセット値が保持されていない前記温度範囲に属している場合に、前記磁気データに対して前記座標変換処理を施して2点以上の前記特徴点を検出し、前記角速度センサの前記オフセット値を算出し、前記オフセット値を、前記温度センサにより検出された温度が属する前記温度範囲に対応付けて前記オフセットテーブルに保持することを特徴とする[3]又は[4]に記載の電子機器。
[8]
A temperature sensor for acquiring temperature data;
An offset table that holds the offset value in association with each predetermined temperature range;
Further comprising
The arithmetic circuit unit performs the coordinate conversion process on the magnetic data when the temperature detected by the temperature sensor belongs to the temperature range in which the offset value is not held in the offset table. Two or more feature points are detected, the offset value of the angular velocity sensor is calculated, and the offset value is stored in the offset table in association with the temperature range to which the temperature detected by the temperature sensor belongs. The electronic device according to [3] or [4], wherein:

[9]
電子機器のセンサ較正方法であって、
前記電子機器は、角速度データを取得する角速度センサと、磁気データを取得する地磁気センサと、を備え、
前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記角速度センサのオフセット値を算出する、
ことを特徴とする電子機器のセンサ較正方法。
[9]
A method for calibrating a sensor of an electronic device,
The electronic device includes an angular velocity sensor that acquires angular velocity data, and a geomagnetic sensor that acquires magnetic data.
A first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second rotation angle calculated based on the angular velocity data. Calculating an offset value of the angular velocity sensor based on the comparison;
A method for calibrating a sensor of an electronic device.

[10]
電子機器のセンサ較正プログラムであって、
前記電子機器は、角速度データを取得する角速度センサと、磁気データを取得する地磁気センサと、を備え、
前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記角速度センサのオフセット値を算出させる、
ことを特徴とする電子機器のセンサ較正プログラム。
[10]
A sensor calibration program for electronic equipment,
The electronic device includes an angular velocity sensor that acquires angular velocity data, and a geomagnetic sensor that acquires magnetic data.
A first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second rotation angle calculated based on the angular velocity data. Calculating an offset value of the angular velocity sensor based on the comparison;
A sensor calibration program for an electronic device.

100 電子機器
110 モーションセンサ
112 角速度センサ
114 加速度センサ
120 地磁気センサ
130 温度センサ
140 通信機能部
170 演算回路部
180 メモリ部
DESCRIPTION OF SYMBOLS 100 Electronic device 110 Motion sensor 112 Angular velocity sensor 114 Acceleration sensor 120 Geomagnetic sensor 130 Temperature sensor 140 Communication function part 170 Arithmetic circuit part 180 Memory part

Claims (10)

角速度データを取得する角速度センサと、
磁気データを取得する地磁気センサと、
前記角速度センサのオフセット値を算出する演算回路部と、
を備え、
前記演算回路部は、前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記オフセット値を算出することを特徴とする電子機器。
An angular velocity sensor for obtaining angular velocity data;
A geomagnetic sensor for acquiring magnetic data;
An arithmetic circuit unit for calculating an offset value of the angular velocity sensor;
With
The arithmetic circuit unit calculates a first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second calculated based on the angular velocity data. The offset value is calculated based on a comparison with the rotation angle of the electronic device.
更に、加速度データを取得する加速度センサを備え、
前記演算回路部は、前記地磁気センサ及び前記角速度センサを、前記加速度データに基づいて推定される重力方向に設定される中心軸の回りに回転させたときに前記磁気データに基づいて検出される前記第1の回転角度と、前記角速度データに基づいて算出される前記第2の回転角度と、の比較に基づいて前記オフセット値を算出することを特徴とする請求項1に記載の電子機器。
Furthermore, an acceleration sensor for acquiring acceleration data is provided,
The arithmetic circuit unit is detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are rotated around a central axis set in a gravitational direction estimated based on the acceleration data. The electronic device according to claim 1, wherein the offset value is calculated based on a comparison between a first rotation angle and the second rotation angle calculated based on the angular velocity data.
前記演算回路部は、
前記磁気データ及び前記角速度データを、前記重力方向を基準とする座標系に変換する座標変換処理を施し、
前記地磁気センサと前記角速度センサを前記中心軸の周りに回転させて、前記座標変換処理後の前記磁気データの前記重力方向に垂直な水平成分から地球の磁極方向を決定する特徴点が2点以上検出されたときの前記磁気データの水平成分の回転角度を前記第1の回転角度として検出し、前記磁気データにおいて前記2点以上の前記特徴点が検出されたときに前記座標変換処理後の前記角速度データに基づいて算出される回転角度を前記第2の回転角度として取得する、
ことを特徴とする請求項2に記載の電子機器。
The arithmetic circuit unit is:
Performing a coordinate conversion process for converting the magnetic data and the angular velocity data into a coordinate system based on the gravitational direction;
Two or more characteristic points that determine the magnetic pole direction of the earth from the horizontal component perpendicular to the gravitational direction of the magnetic data after the coordinate transformation process by rotating the geomagnetic sensor and the angular velocity sensor around the central axis The rotation angle of the horizontal component of the magnetic data when detected is detected as the first rotation angle, and the two or more feature points are detected in the magnetic data, Obtaining a rotation angle calculated based on angular velocity data as the second rotation angle;
The electronic device according to claim 2.
前記演算回路部は、前記磁気データの前記水平成分が最大値又は最小値となる角度方向を、前記特徴点として検出することを特徴とする請求項3に記載の電子機器。   The electronic apparatus according to claim 3, wherein the arithmetic circuit unit detects an angular direction in which the horizontal component of the magnetic data has a maximum value or a minimum value as the feature point. 温度データを取得する温度センサをさらに備え、
前記演算回路部は、前記温度センサにより所定の温度変化が検出されたときに、前記オフセット値の算出を実行することを特徴とする請求項1乃至4のいずれか一項に記載の電子機器。
A temperature sensor for acquiring temperature data;
The electronic apparatus according to claim 1, wherein the arithmetic circuit unit calculates the offset value when a predetermined temperature change is detected by the temperature sensor.
前記演算回路部は、前記角速度センサ又は前記地磁気センサにより前記電子機器の動きが検出されたときに、前記オフセット値の算出を実行することを特徴とする請求項1乃至5のいずれか一項に記載の電子機器。   The said arithmetic circuit part performs calculation of the said offset value, when the motion of the said electronic device is detected by the said angular velocity sensor or the said geomagnetic sensor, It is any one of Claim 1 thru | or 5 characterized by the above-mentioned. The electronic device described. 前記演算回路部は、前記角速度センサ又は前記地磁気センサにより前記電子機器を所定の角度以上回転させる動作が行われたことが検出されたときに、前記オフセット値の算出を実行することを特徴とする請求項6に記載の電子機器。   The arithmetic circuit unit calculates the offset value when it is detected by the angular velocity sensor or the geomagnetic sensor that an operation of rotating the electronic device by a predetermined angle or more is performed. The electronic device according to claim 6. 温度データを取得する温度センサと、
前記オフセット値を所定の温度範囲ごとに対応付けて保持するオフセットテーブルと、
をさらに備え、
前記演算回路部は、前記温度センサにより検出された温度が、前記オフセットテーブルに前記オフセット値が保持されていない前記温度範囲に属している場合に、前記磁気データに対して前記座標変換処理を施して2点以上の前記特徴点を検出し、前記角速度センサの前記オフセット値を算出し、前記オフセット値を、前記温度センサにより検出された温度が属する前記温度範囲に対応付けて前記オフセットテーブルに保持することを特徴とする請求項3又は4に記載の電子機器。
A temperature sensor for acquiring temperature data;
An offset table that holds the offset value in association with each predetermined temperature range;
Further comprising
The arithmetic circuit unit performs the coordinate conversion process on the magnetic data when the temperature detected by the temperature sensor belongs to the temperature range in which the offset value is not held in the offset table. Two or more feature points are detected, the offset value of the angular velocity sensor is calculated, and the offset value is stored in the offset table in association with the temperature range to which the temperature detected by the temperature sensor belongs. The electronic device according to claim 3, wherein the electronic device is an electronic device.
電子機器のセンサ較正方法であって、
前記電子機器は、角速度データを取得する角速度センサと、磁気データを取得する地磁気センサと、を備え、
前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記角速度センサのオフセット値を算出する、
ことを特徴とする電子機器のセンサ較正方法。
A method for calibrating a sensor of an electronic device,
The electronic device includes an angular velocity sensor that acquires angular velocity data, and a geomagnetic sensor that acquires magnetic data.
A first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second rotation angle calculated based on the angular velocity data. Calculating an offset value of the angular velocity sensor based on the comparison;
A method for calibrating a sensor of an electronic device.
電子機器のセンサ較正プログラムであって、
前記電子機器は、角速度データを取得する角速度センサと、磁気データを取得する地磁気センサと、を備え、
前記地磁気センサ及び前記角速度センサを同じ角度だけ同時に回転させたときに前記磁気データに基づいて検出される第1の回転角度と、前記角速度データに基づいて算出される第2の回転角度と、の比較に基づいて前記角速度センサのオフセット値を算出させる、
ことを特徴とする電子機器のセンサ較正プログラム。
A sensor calibration program for electronic equipment,
The electronic device includes an angular velocity sensor that acquires angular velocity data, and a geomagnetic sensor that acquires magnetic data.
A first rotation angle detected based on the magnetic data when the geomagnetic sensor and the angular velocity sensor are simultaneously rotated by the same angle, and a second rotation angle calculated based on the angular velocity data. Calculating an offset value of the angular velocity sensor based on the comparison;
A sensor calibration program for an electronic device.
JP2015172441A 2015-09-02 2015-09-02 Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment Pending JP2017049115A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015172441A JP2017049115A (en) 2015-09-02 2015-09-02 Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015172441A JP2017049115A (en) 2015-09-02 2015-09-02 Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment

Publications (1)

Publication Number Publication Date
JP2017049115A true JP2017049115A (en) 2017-03-09

Family

ID=58280174

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015172441A Pending JP2017049115A (en) 2015-09-02 2015-09-02 Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment

Country Status (1)

Country Link
JP (1) JP2017049115A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107065035A (en) * 2017-04-21 2017-08-18 维沃移动通信有限公司 A kind of geomagnetic sensor calibrating installation, method and mobile terminal
JP2018159569A (en) * 2017-03-22 2018-10-11 カシオ計算機株式会社 Attitude calculation device, attitude instrumentation system and attitude calculation method
US20190072777A1 (en) * 2017-09-01 2019-03-07 Canon Kabushiki Kaisha Control apparatus for optical apparatus, optical apparatus, control method for the optical apparatus, and storage medium
JP2019078560A (en) * 2017-10-20 2019-05-23 シャープ株式会社 Gyro sensor offset correcting device, offset correction program, and pedestrian autonomous navigation device
CN111344590A (en) * 2018-01-30 2020-06-26 古野电气株式会社 Radar antenna device and azimuth measuring method
JP2021051000A (en) * 2019-09-25 2021-04-01 キヤノン株式会社 Angular-velocity detector, image display device, method for detecting angular velocity, and program
JP2022511354A (en) * 2018-12-13 2022-01-31 シーバ・テクノロジーズ・インコーポレイテッド Methods and equipment for calibrating the zero rate output of the sensor

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018159569A (en) * 2017-03-22 2018-10-11 カシオ計算機株式会社 Attitude calculation device, attitude instrumentation system and attitude calculation method
CN107065035A (en) * 2017-04-21 2017-08-18 维沃移动通信有限公司 A kind of geomagnetic sensor calibrating installation, method and mobile terminal
US20190072777A1 (en) * 2017-09-01 2019-03-07 Canon Kabushiki Kaisha Control apparatus for optical apparatus, optical apparatus, control method for the optical apparatus, and storage medium
JP2019045682A (en) * 2017-09-01 2019-03-22 キヤノン株式会社 Optical equipment control device and optical equipment
JP2019078560A (en) * 2017-10-20 2019-05-23 シャープ株式会社 Gyro sensor offset correcting device, offset correction program, and pedestrian autonomous navigation device
CN111344590A (en) * 2018-01-30 2020-06-26 古野电气株式会社 Radar antenna device and azimuth measuring method
CN111344590B (en) * 2018-01-30 2024-05-24 古野电气株式会社 Radar antenna device and azimuth measuring method
JP2022511354A (en) * 2018-12-13 2022-01-31 シーバ・テクノロジーズ・インコーポレイテッド Methods and equipment for calibrating the zero rate output of the sensor
JP7383702B2 (en) 2018-12-13 2023-11-20 シーバ・テクノロジーズ・インコーポレイテッド Method and apparatus for calibrating zero rate output of a sensor
JP2021051000A (en) * 2019-09-25 2021-04-01 キヤノン株式会社 Angular-velocity detector, image display device, method for detecting angular velocity, and program

Similar Documents

Publication Publication Date Title
JP2017049115A (en) Electronic equipment, sensor calibration method for electronic equipment, and sensor calibration program for electronic equipment
JP6372751B2 (en) Electronic device, offset value acquisition method, and offset value acquisition program
JP6648515B2 (en) Electronic device, its angular velocity acquisition method, and angular velocity acquisition program
JP4967368B2 (en) Body motion detection device, body motion detection method, and body motion detection program
JP5807291B2 (en) Handheld pointing device with roll compensation
JP5469670B2 (en) Geomagnetic detector
JP6027964B2 (en) POSITION ESTIMATION DEVICE, POSITION ESTIMATION METHOD, AND INTEGRATED CIRCUIT
JP2016061766A5 (en) Electronic device, offset value acquisition method, and offset value acquisition program
JP6579478B2 (en) Electronic device, sensor calibration method, and sensor calibration program
US20140285423A1 (en) Information display device, information display method, and storage medium
JP2014182062A (en) Electronic azimuth meter, electronic clock, method of detecting correction timing of electronic azimuth meter, and program
US10267653B2 (en) Position sensor and method for determining a position of a timepiece setting stem
JP6384662B2 (en) Electronic device, sensor calibration method, and sensor calibration program
JP6357992B2 (en) Electronic equipment and calibration program
JP2014219340A (en) Offset correction method and offset correction device
JP2014048239A (en) Electronic apparatus and program
JP6635285B2 (en) Electronic device, sensor calibration method, sensor calibration program
JP7004155B2 (en) Magnetic offset value calculation method and magnetic offset value calculation program, electronic equipment
JP2016125988A (en) Handheld terminal device and calibration method
JP2012132851A (en) Rotation detection device, terminal apparatus, and program
JP6376506B2 (en) Electronic device, sensor calibration determination method, and sensor calibration determination program
JP2013250707A (en) Spatial position coordinate input device
JP2016057196A (en) Electronic device and correction program of angular velocity detection value
WO2017085770A1 (en) Electronic device, step counting method, and step counting program
WO2016009529A1 (en) Electronic apparatus and control method