US10209069B2 - Offset calculation circuit and azimuth sensor using the same - Google Patents

Offset calculation circuit and azimuth sensor using the same Download PDF

Info

Publication number
US10209069B2
US10209069B2 US14/962,028 US201514962028A US10209069B2 US 10209069 B2 US10209069 B2 US 10209069B2 US 201514962028 A US201514962028 A US 201514962028A US 10209069 B2 US10209069 B2 US 10209069B2
Authority
US
United States
Prior art keywords
offset
data points
point
data
magnetic detection
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.)
Active, expires
Application number
US14/962,028
Other versions
US20160169673A1 (en
Inventor
Koji Saito
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.)
Rohm Co Ltd
Original Assignee
Rohm 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 Rohm Co Ltd filed Critical Rohm Co Ltd
Assigned to ROHM CO., LTD. reassignment ROHM CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: SAITO, KOJI
Publication of US20160169673A1 publication Critical patent/US20160169673A1/en
Application granted granted Critical
Publication of US10209069B2 publication Critical patent/US10209069B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/38Testing, calibrating, or compensating of compasses

Definitions

  • the first reference line or the first reference plane may be a straight line or a flat plane connecting points at equal distances from the first and second data points (second configuration).
  • the offset calculation unit may calculate a second offset candidate point by referring to third and fourth data points among the set of data points, and one of the third and fourth data points is different from both of the first and second data points (third configuration).
  • the offset calculation circuit having the first configuration may further comprise an offset updating unit for overwriting the first offset candidate point in the offset recording unit (fifth configuration).
  • the offset calculation unit may not calculate the second offset candidate point from the third and fourth data points or discard the second offset candidate point calculated from the third and fourth data points (sixth configuration).
  • an electronic device including the azimuth sensor having the ninth configuration (tenth configuration).
  • an offset calculation circuit including a data obtaining unit for sequentially obtaining three-axis magnetic detection data as a set of data points of a three-axis coordinate system, an offset recording unit for recording offset components of the magnetic detection data as an offset point of the three-axis coordinate system, and an offset calculation unit for calculating a first reference line passing through a first region surrounded by first, second, and third data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line to calculate a first offset candidate point (eleventh configuration).
  • the first reference line may be a straight line connecting points at equal distances from the first, second, and third data points (twelfth configuration).
  • the offset calculation unit may calculate a second offset candidate point by referring to fourth, fifth, and sixth data points among the set of data points, and one of the fourth, fifth, and sixth data points may be different from all of the first, second, and third data points (thirteenth configuration).
  • the offset calculation unit may calculate a plurality of offset candidate points including the first and second offset candidate points based on the set of data points, the offset calculation circuit may further comprise an offset updating unit for overwriting an average value of the plurality of offset candidate points in the offset recording unit (fourteenth configuration).
  • the offset calculation circuit having the eleventh configuration may further comprise an offset updating unit for overwriting the first offset candidate point in the offset recording unit (fifteenth configuration).
  • the offset calculation unit may not calculate the second offset candidate point from the fourth, fifth, and sixth data points or discards the second offset candidate point calculated from the fourth, fifth, and sixth data points (sixteenth configuration).
  • the offset calculation unit may calculate a second reference line passing through a second region surrounded by fourth, fifth, and sixth data points among the set of data points, and when a distance between the second reference line and the offset point is longer than a second predetermined value, the offset calculation unit may not calculate a second offset candidate point from the fourth, fifth, and sixth data points, discard the second offset candidate point calculated from the fourth, fifth, and sixth data points, or set a movement distance of the offset point in a direction toward the second reference line shorter than a predetermined distance when calculating the second offset candidate point (seventeenth configuration).
  • the offset calculation unit may calculate a second reference line passing through a second region surrounded by fourth, fifth, and sixth data points among the set of data points, and subsequently move the offset point recorded in the offset recording unit in a direction toward the second reference line to calculate a second offset candidate point, and when a distance between the second reference line and the offset point is shorter than a third predetermined value, the offset calculation unit may calculate the second offset candidate point at a first frequency, and when the distance between the second reference line and the offset point is longer than the third predetermined value, the offset calculation unit may calculate the second offset candidate point at a second frequency higher than the first frequency (eighteenth configuration).
  • an azimuth sensor including a magnetic detection circuit for generating three-axis magnetic detection data, the offset calculation circuit having the eleventh configuration for calculating an offset of the magnetic detection data, an offset correction circuit for correcting the offset of the magnetic detection data, and an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data (nineteenth configuration).
  • an electronic device including the azimuth sensor having the nineteenth configuration (twentieth configuration).
  • FIG. 2 is an XY coordinates plane view illustrating a first example of an offset calculation method.
  • FIG. 4 is a block diagram illustrating a second embodiment of the azimuth sensor 1 .
  • FIG. 5 is an XYZ coordinate space diagram illustrating a second example of the offset calculation method.
  • FIG. 6 is a block diagram illustrating a third embodiment of the azimuth sensor 1 .
  • FIG. 7 is an XYZ coordinate space diagram illustrating a third example of the offset calculation method.
  • FIG. 8 is a view illustrating an outer appearance of a smartphone.
  • the present disclosure provides some embodiments of an offset calculation circuit capable of calculating an offset with a smaller amount of calculation than that of the prior method, and an azimuth sensor using the same.
  • the magnetic detection circuit 10 includes a magnetic sensor 10 X for detecting a magnetism in an X axis direction and a magnetic sensor 10 Y for detecting a magnetism in a Y axis direction, and generates two-axis magnetic detection data Xn and Yn (analog voltage signal). Further, as a magnetic detection element of the magnetic sensors 10 X and 10 Y, a hall element may be used or a magnetoresistance (MR) element may be used. Also, the X axis and the Y axis may be designed to be perpendicular to each other.
  • the offset calculation circuit 20 includes a data obtaining unit 21 , an offset recording unit 22 , an offset calculation unit 23 , and an offset updating unit 24 , and calculates offsets of the magnetic detection circuit 10 (offset components Xc and Yc included in the two-axis magnetic detection data Xn and Yn, respectively).
  • the data obtaining unit 21 obtains the two-axis magnetic detection data Xn and Yn as a data point (Xn, Yn) of a two-axis coordinate system. Further, the data obtaining unit 21 includes a driver for controlling driving of the magnetic sensors 10 X and 10 Y, an analog-to-digital (A/D) converter for converting the analog magnetic detection data Xn and Yn into a digital data point (Xn, Yn), and the like.
  • A/D analog-to-digital
  • the offset calculation unit 23 calculates a reference line F 11 dividing two points (X1, Y1) and (X2, Y2) among sequentially obtained data points (Xn, Yn), and then moves an old offset point (Xc0,Yc0) recorded in the offset recording unit 22 in a direction toward the reference line F 11 , thereby calculating a new offset candidate point (Xc1, Yc1). Also, the offset calculation method will be described in detail later.
  • the offset updating unit 24 overwrites the new offset candidate point (Xc1, Yc1) (or an average value of a plurality of calculated new offset candidate points) in the offset recording unit 22 .
  • the azimuth operation circuit 40 generates azimuth data So from the offset-corrected magnetic detection data Xn′ and Yn′.
  • the offset calculation circuit 20 the offset correction circuit 30 , and the azimuth operation circuit 40 are illustrated as independent circuit blocks, but these circuit blocks may be unitarily implemented using a central processing unit (CPU), a digital signal processor (DSP), or the like.
  • CPU central processing unit
  • DSP digital signal processor
  • FIG. 2 is a XY coordinates plane view illustrating a first example of the offset calculation method of the offset calculation unit 23 .
  • a reference line F 11 dividing the point P and the point Q is calculated.
  • the reference line F 11 may be a straight line linking points at equal distances from the point P and the point Q.
  • the reference line F 11 may be calculated using the following Eq. (1a) or (1b).
  • Eq. (1b) is an equation obtained by simplifying Eq. (1a).
  • the reference line F 11 may be easily calculated by using the above Eq. (1a) or (1b). However, the reference line F 11 may not necessarily be a straight line, and may be a curved line as long as it is put between the point P and the point Q.
  • a straight line F 12 which passes through the old offset point A (Xc0, Yc0) recorded in the offset recording unit 22 and is perpendicular to the reference line F 11 is calculated. Also, the straight line F 12 may be easily calculated by using Eq. (2) as follows:
  • a new offset candidate point B (Xc1, Yc1) is calculated by moving the old offset point A in a direction toward the reference line F 11 .
  • an intersection point S (Xc′, Yc′) between the reference line F 11 and the straight line F 12 is calculated, and a segment SA determined by the intersection point S and the old offset point A may be divided by m:n to calculate a new offset candidate point B.
  • the new offset candidate point B may also be calculated by moving the old offset point A toward the intersection point S by a movement distance d on the straight line F 12 . Also, when a distance between the old offset point A and the intersection point S is D, the movement distance d may be set within a range of 0 ⁇ d ⁇ 2 D. That is, the new offset candidate point B may not necessarily be present on the segment SA, and may be set in a region beyond the reference line F 11 .
  • the new offset candidate point B may only need to exist in a region belonging to the circle of the radius D around the intersection point S.
  • the offset calculation unit 23 repeatedly calculates a new offset candidate point B by newly referring to two data points of which at least one point is different from the two data points referred to in a previous time when the new offset candidate point B was calculated. For example, when the calculation of the new offset candidate point B is repeated within the shortest period, the point Q and the point R may be selected at a time when the third point R (X3, Y3) is obtained following the point P and the point Q to calculate a next new offset candidate point B (a second offset candidate point).
  • the offset updating unit 24 overwrites the newly calculated new offset candidate point B (or an average value of a plurality of calculated new offset candidate points B) by the offset calculation unit 23 in the offset recording unit 22 .
  • the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to or may discard the new offset candidate point B calculated from the data points being referred to. As the distance between data points as reference targets is shorter than the predetermined value, the reliability of the reference line F 11 may be lost. Thus, by stopping the calculation of the new offset candidate point B based on the uncertain reference line F 11 or discarding the calculation result, the precision of offset calculation may be increased.
  • the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to, discard the new offset candidate point B calculated from the data points being referred to, or set the movement distance d of the old offset point A shorter than that at normal times when the new offset candidate point B is calculated. Using such an algorithm, the new offset candidate point B is not excessively distant from the old offset point A, and thus, the stability of the azimuth detection may be enhanced.
  • the offset calculation unit 23 calculates the new offset candidate point B at the first frequency, and when the distance between the reference line F 11 and the old offset point A is longer than the threshold value d 2 , the offset calculation unit 23 calculates the new offset candidate point B at second frequency higher than the first frequency.
  • the offset calculation and updating are performed at a high frequency as much as the reference line F 11 is away from the old offset point A, and thus, an offset of the azimuth sensor 1 may be canceled at a high speed.
  • C(0,0) may be recorded in the offset recording unit 22 at the time when the azimuth sensor 1 is released from the factory.
  • the initial offset point C may be temporarily calculated under a test environment in which an external magnetic field is blocked, and the calculation result may be recorded in the offset recording unit 22 .
  • FIG. 3 is an XY plane view illustrating an example of a method for calculating the initial offset point C.
  • three data points P, Q, and R may be sequentially obtained, and thereafter, for example, a straight line F 1 connecting points at equal distances from point P and point Q and a straight line F 2 at equal distances from the point Q and point R are calculated, and an intersection point of the straight line F 1 and the straight line F 2 may be determined as the initial offset point C (Xc0, Yc0).
  • FIG. 4 is a block diagram illustrating a second embodiment of the azimuth sensor 1 .
  • the second embodiment basically has the same configuration as that of the first embodiment, and a magnetic sensor 10 Z for detecting magnetism in a Z axis direction to generate magnetic detection data Zn is newly added as a component of the magnetic detection circuit 10 .
  • the Z axis may be designed to be perpendicular to the X axis and the Y axis.
  • the offset calculation circuit 20 includes a data obtaining unit 21 , an offset recording unit 22 , an offset calculation unit 23 , and an offset updating unit 24 , like the first embodiment, and calculates offsets of the magnetic detection circuit 10 (offset components Xc, Yc, and Zc respectively included in three-axis magnetic detection data Xn, Yn, and Zn).
  • the data obtaining unit 21 obtains the three-axis magnetic detection data Xn, Yn, and Zn as a data point (Xn, Yn, Zn) of a three-axis coordinate system.
  • the offset recording unit 22 records the three-axis offset components Xc, Yc, and Zc as an offset point (Xc, Yc, Zc) of the three-axis coordinate system in a non-volatile manner.
  • the offset calculation unit 23 calculates a reference plane F 21 dividing two points (X1, Y1, Z1) and (X2, Y2, Z2) among sequentially obtained data points (Xn, Yn, Zn), and then moves an old offset point (Xc0, Yc0, Zc0) recorded in the offset recording unit 22 in a direction toward the reference plane F 21 , thereby calculating a new offset candidate point (Xc1, Yc1, Zc1). Also, the offset calculation method will be described in detail later.
  • the azimuth operation circuit 40 generates azimuth data So from the offset-corrected magnetic detection data Xn′, Yn′, and Zn′.
  • FIG. 5 is an XYZ coordinate space diagram illustrating a second example of the offset calculation method of the offset calculation unit 23 .
  • a reference plane F 21 dividing the point P and the point Q is calculated.
  • the reference plane F 21 may be a plane connecting points at equal distances from the point P and the point Q.
  • the reference plane F 21 may be calculated using the following Eq. (3a) or (3b).
  • Eq. (3b) is an equation obtained by simplifying Eq. (3a).
  • the reference plane F 21 may be easily calculated by using the above Eq. (3a) or (3b). However, the reference plane F 21 may not necessarily be a plane, and may be a curved surface as long as it is put between the point P and the point Q.
  • a straight line F 22 which passes through the old offset point A (Xc0, Yc0, Zc0) recorded in the offset recording unit 22 and is perpendicular to the reference plane F 21 is calculated. Also, the straight line F 22 may be easily calculated using Eq. (4) as follows:
  • a new offset candidate point B (Xc1, Yc1, Zc1) is calculated by moving the old offset point A in a direction toward the reference plane F 21 .
  • an intersection point S(Xc′, Yc′, Zc′) between the reference plane F 21 and the straight line F 22 is calculated, and a segment SA determined by this intersection point S and the old offset point A may be divided by m:n to calculate a new offset candidate point B.
  • the new offset candidate point B may also be calculated by moving the old offset point A toward the intersection point S by a movement distance d on the straight line F 22 . Also, when a distance between the old offset point A and the intersection point S is D, the movement distance d may be set within a range of 0 ⁇ d ⁇ 2 D. That is, the new offset candidate point B may not necessarily be present in the segment SA, and may be set in a region beyond the reference plane F 21 .
  • the new offset candidate point B may only need to exist in a region belonging to the sphere of the radius D around the intersection point S.
  • the offset calculation unit 23 repeatedly calculates a new offset candidate point B by newly referring two data points in which at least one point is different from two data points referred to in a previous time when the new offset candidate point B was calculated. For example, when the calculation of the new offset candidate point B is repeated within the shortest period, when the point Q and a point R are selected at a time when the third point R(X3, Y3, Z3) is obtained following the point P and the point Q, a next new offset candidate point B may be calculated.
  • the offset updating unit 24 overwrites the newly calculated new offset candidate point B (or an average value of a plurality of calculated new offset candidate points B) by the offset calculation unit 23 in the offset recording unit 22 .
  • the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to or may discard the new offset candidate point B calculated from the data points being referred to.
  • the reliability of the reference plane F 21 may be lost.
  • the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to, discard the new offset candidate point B calculated from the data points being referred to, or set the movement distance d of the old offset point A shorter than that at normal times when the new offset candidate point B is calculated. Using such an algorithm, the new offset candidate point B is not excessively distant from the old offset point A, and thus, the stability of the azimuth detection may be enhanced.
  • the offset calculation unit 23 calculates the new offset candidate point B at first frequency, and when the distance between the reference plane F 21 and the old offset point A is longer than the threshold value d 2 , the offset calculation unit 23 calculates the new offset candidate point B at second frequency higher than the first frequency.
  • offset calculation and updating are performed at high frequency as much as the reference plane F 21 is away from the old offset point A, and thus, an offset of the azimuth sensor 1 may be canceled at a high speed.
  • FIG. 6 is a block diagram illustrating a third embodiment of the azimuth sensor 1 .
  • the third embodiment basically has the same configuration as that of the second embodiment, except for an offset calculation method in the offset calculation circuit 20 .
  • the offset calculation unit 23 calculates a reference line F 31 passing through a region surrounded by three points (X1,Y1, Z1), (X2,Y2, Z2), and (X3,Y3, Z3) among sequentially obtained data points (Xn, Yn, Zn), and then moves the old offset point (Xc0,Yc0, Zc0) recorded in the offset recording unit 22 in a direction toward the reference line F 31 , thereby calculating a new offset candidate point (Xc1,Yc1, Zc1).
  • the offset calculation method will be described in detail.
  • FIG. 7 is an XYZ coordinate space diagram illustrating a third example of the offset calculation method of the offset calculation unit 23 .
  • a reference line F 31 passing through a region surrounded by the point P, the point Q, and the point R is calculated.
  • the reference line F 31 may be a straight line connecting points at equal distances from the point P, the point Q, and the point R.
  • the reference line F 31 may be calculated by using the following Eq. (5a) or (5b).
  • the Eq. (5b) is an equation obtained by simplifying Eq. (5a).
  • the reference line F 31 may be easily calculated using the above Eq. (5a) or (5b). However, the reference line F 31 may not necessarily be a straight line, and may be a curved line as long as it passes through the region surrounded by the point P, the point Q, and the point R.
  • a plane F 32 which passes through the old offset point A (Xc0, Yc0, Zc0) recorded in the offset recording unit 22 and is perpendicular to the reference line F 31 is calculated. Also, the plane F 32 may be easily calculated using Eq.
  • a new offset candidate point B (Xc1, Yc1, Zc1) are calculated by moving the old offset point A in a direction toward the reference line F 31 .
  • an intersection point S (Xc′, Yc′, Zc′) between the reference line F 31 and the plane F 32 is calculated, and a segment SA determined by the intersection point S and the old offset point A is divided by m:n, thereby calculating a new offset candidate point B.
  • the old offset point A may be moved toward the intersection point S by a movement distance d on the plane F 32 , thereby calculating a new offset candidate point B.
  • a movement distance d may be set within a range of 0 ⁇ d ⁇ 2D. That is, the new offset candidate point B may not necessarily be present on the segment SA, and may be set in a region beyond the reference line F 31 .
  • the new offset candidate point B may only need to exist in a region belonging to the sphere of the radius D around the intersection point S.
  • the offset calculation unit 23 repeatedly calculates a new offset candidate point B by newly referring three data points in which at least one point is different as three data points referred to in a previous time when the new offset candidate point B was calculated. For example, in a case in which the calculation of the new offset candidate point B is repeated within the shortest period, when the point Q, the point R, and a point T are selected at a time when the fourth point T (X4, Y4, Z4) is obtained following the point P, the point Q, and the point R, a next new offset candidate point B may be calculated.
  • the offset updating unit 24 overwrites the newly calculated new offset candidate point B (or an average value of a plurality of calculated new offset candidate points B) by the offset calculation unit 23 in the offset recording unit 22 .
  • the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to or may discard the new offset candidate point B calculated from the data points being referred to.
  • the reliability of the reference line F 31 may be lost.
  • the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to, discard the new offset candidate point B calculated from the data points being referred to, or set the movement distance d of the old offset point A shorter than that at normal times when the new offset candidate point B is calculated. Using such an algorithm, the new offset candidate point B is not excessively distant from the old offset point A, and thus, the stability of the azimuth detection may be enhanced.
  • the offset calculation unit 23 calculates the new offset candidate point B at first frequency, and when the distance between the reference line F 31 and the old offset point A is longer than the threshold value d 2 , the offset calculation unit 23 calculates the new offset candidate point B at second frequency higher than the first frequency.
  • offset calculation and updating are performed at high frequency as much as the reference line F 31 is away from the old offset point A, and thus, an offset of the azimuth sensor 1 may be canceled at a high speed.
  • FIG. 8 is a view illustrating an outer appearance of a smartphone 100 .
  • the smartphone 100 is an example of an electronic device having the azimuth sensor 1 .
  • an electronic compass of the smartphone 100 By mounting the azimuth sensor 1 described above as an electronic compass of the smartphone 100 , a direction in which a user is oriented can be accurately detected.
  • GPS global positioning system
  • an electronic compass By mounting the azimuth sensor 1 described above as an electronic compass of the smartphone 100 , a direction in which a user is oriented can be accurately detected.
  • GPS global positioning system
  • an electronic compass By mounting the azimuth sensor 1 described above as an electronic compass of the smartphone 100 , a direction in which a user is oriented can be accurately detected.
  • GPS global positioning system
  • an electronic compass By mounting the azimuth sensor 1 described above as an electronic compass of the smartphone 100 , a direction in which a user is oriented can be accurately detected.
  • GPS global positioning system
  • an offset calculation circuit capable of calculating an offset with a smaller amount of calculation than that of the related art, and an azimuth sensor using the same.
  • the present disclosure disclosed herein can be used in an azimuth sensor mounted on, for example, a smartphone, a tablet terminal, or the like.

Abstract

An offset calculation circuit comprising a data obtaining unit for sequentially obtaining two-axis or three-axis magnetic detection data as a set of data points of a two-axis coordinate system or a three-axis coordinate system; an offset recording unit for recording offset components of the magnetic detection data as an offset point of the two-axis coordinate system or the three-axis coordinate system; and an offset calculation unit for calculating a first reference line or a first reference plane put between first and second data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line or the first reference plane to calculate a first offset candidate point.

Description

CROSS-REFERENCE TO RELATED APPLICATION
This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2014-250923, filed on Dec. 11, 2014, the entire contents of which are incorporated herein by reference.
TECHNICAL FIELD
The present disclosure relates to an offset calculation circuit and an azimuth sensor using the same.
BACKGROUND
An azimuth sensor (geomagnetic sensor) measures an azimuth by detecting a direction of geomagnetism. However, geomagnetism to be measured is very weak. Thus, in order to precisely detect an azimuth, it is necessary to detect a real geomagnetism by canceling an offset resulting from a magnetic field that is present in a surrounding environment (magnetic field generated within a set mounted with an azimuth sensor, a magnetic field generated by a powerful magnet placed around an azimuth sensor, or the like), or an offset resulting from the performance of an azimuth sensor itself.
An offset of an azimuth sensor is continuously changed temporally and spatially. Thus, in order to precisely detect an azimuth, it is required to quickly and continuously cancel an offset of the azimuth sensor.
An offset correction method includes a method for manually correcting an offset by a user who uses it on purpose and a method for automatically correcting an offset without a manual input from the user. Between the manual correction and the automatic correction, in consideration of enhancing the user convenience or detection precision of an azimuth sensor, it is preferable to employ the latter method.
In this regard, there was a prior method for automatically correcting an offset without a manual input from the user.
However, in this prior method, a large amount of operation is required to process the offset correction, and thus, in order to quickly and continuously cancel an offset, a high level of operation capability is required.
SUMMARY
According to one embodiment of the present disclosure, there is provided an offset calculation circuit, including a data obtaining unit for sequentially obtaining two-axis or three-axis magnetic detection data as a set of data points of a two-axis coordinate system or a three-axis coordinate system, an offset recording unit for recording offset components of the magnetic detection data as an offset point of the two-axis coordinate system or the three-axis coordinate system, and an offset calculation unit for calculating a first reference line or a first reference plane put between first and second data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line or the first reference plane to calculate a first offset candidate point (first configuration).
In the offset calculation circuit having the first configuration, the first reference line or the first reference plane may be a straight line or a flat plane connecting points at equal distances from the first and second data points (second configuration).
Further, in the offset calculation circuit having the first configuration, the offset calculation unit may calculate a second offset candidate point by referring to third and fourth data points among the set of data points, and one of the third and fourth data points is different from both of the first and second data points (third configuration).
Further, in the offset calculation circuit having the third configuration, the offset calculation unit may calculate a plurality of offset candidate points including the first and second offset candidate points based on the set of data points, the offset calculation circuit may further comprise an offset updating unit for overwriting an average value of the plurality of offset candidate points in the offset recording unit (fourth configuration).
The offset calculation circuit having the first configuration may further comprise an offset updating unit for overwriting the first offset candidate point in the offset recording unit (fifth configuration).
Further, in the offset calculation circuit having the third configuration, when a distance between third and fourth data points is shorter than a first predetermined value, the offset calculation unit may not calculate the second offset candidate point from the third and fourth data points or discard the second offset candidate point calculated from the third and fourth data points (sixth configuration).
Further, in the offset calculation circuit having the first configuration, the offset calculation unit may calculate a second reference line or a second reference plane put between third and fourth data points among the set of data points, and when a distance between the second reference line or the second reference plane and the offset point is longer than a second predetermined value, the offset calculation unit may not calculate a second offset candidate point from the third and fourth data points, discard the second offset candidate point calculated from the third and fourth data points, or set a movement distance of the offset point in a direction toward the second reference line or the second reference plane shorter than a predetermined distance when calculating the second offset candidate point (seventh configuration).
Further, in the offset calculation circuit having the first configuration, the offset calculation unit may calculate a second reference line or a second reference plane put between third and fourth data points among the set of data points, and subsequently move the offset point recorded in the offset recording unit in a direction toward the second reference line or the second reference plane to calculate a second offset candidate point, and when a distance between the second reference line or the second reference plane and the offset point is shorter than a third predetermined value, the offset calculation unit may calculate the second offset candidate point at a first frequency, and when the distance between the second reference line or the second reference plane and the offset point is longer than the third predetermined value, the offset calculation unit may calculate the second offset candidate point at a second frequency higher than the first frequency (eighth configuration).
According to another embodiment of the present disclosure, there is provided an azimuth sensor, a magnetic detection circuit for generating two-axis or three-axis magnetic detection data, the offset calculation circuit having the first configuration for calculating an offset of the magnetic detection data; an offset correction circuit for correcting the offset of the magnetic detection data; and an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data (ninth configuration).
According to still another embodiment of the present disclosure, there is provided an electronic device including the azimuth sensor having the ninth configuration (tenth configuration).
According to still another embodiment of the present disclosure, there is provided an offset calculation circuit including a data obtaining unit for sequentially obtaining three-axis magnetic detection data as a set of data points of a three-axis coordinate system, an offset recording unit for recording offset components of the magnetic detection data as an offset point of the three-axis coordinate system, and an offset calculation unit for calculating a first reference line passing through a first region surrounded by first, second, and third data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line to calculate a first offset candidate point (eleventh configuration).
In the offset calculation circuit having the eleventh configuration, the first reference line may be a straight line connecting points at equal distances from the first, second, and third data points (twelfth configuration).
Further, in the offset calculation circuit having the eleventh configuration, the offset calculation unit may calculate a second offset candidate point by referring to fourth, fifth, and sixth data points among the set of data points, and one of the fourth, fifth, and sixth data points may be different from all of the first, second, and third data points (thirteenth configuration).
Further, in the offset calculation circuit having the thirteenth configuration, the offset calculation unit may calculate a plurality of offset candidate points including the first and second offset candidate points based on the set of data points, the offset calculation circuit may further comprise an offset updating unit for overwriting an average value of the plurality of offset candidate points in the offset recording unit (fourteenth configuration).
The offset calculation circuit having the eleventh configuration may further comprise an offset updating unit for overwriting the first offset candidate point in the offset recording unit (fifteenth configuration).
Further, in the offset calculation circuit having the thirteenth configuration, when a distance between two points of the fourth, fifth, and sixth data points is shorter than a first predetermined value, the offset calculation unit may not calculate the second offset candidate point from the fourth, fifth, and sixth data points or discards the second offset candidate point calculated from the fourth, fifth, and sixth data points (sixteenth configuration).
Further, in the offset calculation circuit having the eleventh configuration, the offset calculation unit may calculate a second reference line passing through a second region surrounded by fourth, fifth, and sixth data points among the set of data points, and when a distance between the second reference line and the offset point is longer than a second predetermined value, the offset calculation unit may not calculate a second offset candidate point from the fourth, fifth, and sixth data points, discard the second offset candidate point calculated from the fourth, fifth, and sixth data points, or set a movement distance of the offset point in a direction toward the second reference line shorter than a predetermined distance when calculating the second offset candidate point (seventeenth configuration).
Further, in the offset calculation circuit having the eleventh configuration, the offset calculation unit may calculate a second reference line passing through a second region surrounded by fourth, fifth, and sixth data points among the set of data points, and subsequently move the offset point recorded in the offset recording unit in a direction toward the second reference line to calculate a second offset candidate point, and when a distance between the second reference line and the offset point is shorter than a third predetermined value, the offset calculation unit may calculate the second offset candidate point at a first frequency, and when the distance between the second reference line and the offset point is longer than the third predetermined value, the offset calculation unit may calculate the second offset candidate point at a second frequency higher than the first frequency (eighteenth configuration).
According to still another embodiment of the present disclosure, there is provided an azimuth sensor including a magnetic detection circuit for generating three-axis magnetic detection data, the offset calculation circuit having the eleventh configuration for calculating an offset of the magnetic detection data, an offset correction circuit for correcting the offset of the magnetic detection data, and an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data (nineteenth configuration).
According to still another embodiment of the present disclosure, there is provided an electronic device including the azimuth sensor having the nineteenth configuration (twentieth configuration).
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram illustrating a first embodiment of an azimuth sensor 1.
FIG. 2 is an XY coordinates plane view illustrating a first example of an offset calculation method.
FIG. 3 is an XY plane view illustrating an example of an initial offset calculation method.
FIG. 4 is a block diagram illustrating a second embodiment of the azimuth sensor 1.
FIG. 5 is an XYZ coordinate space diagram illustrating a second example of the offset calculation method.
FIG. 6 is a block diagram illustrating a third embodiment of the azimuth sensor 1.
FIG. 7 is an XYZ coordinate space diagram illustrating a third example of the offset calculation method.
FIG. 8 is a view illustrating an outer appearance of a smartphone.
DETAILED DESCRIPTION
The present disclosure provides some embodiments of an offset calculation circuit capable of calculating an offset with a smaller amount of calculation than that of the prior method, and an azimuth sensor using the same.
<First Embodiment>
FIG. 1 is a block diagram illustrating a first embodiment of an azimuth sensor 1. The azimuth sensor 1 according to the first embodiment includes a magnetic detection circuit 10, an offset calculation circuit 20, an offset correction circuit 30, and an azimuth operation circuit 40.
The magnetic detection circuit 10 includes a magnetic sensor 10X for detecting a magnetism in an X axis direction and a magnetic sensor 10Y for detecting a magnetism in a Y axis direction, and generates two-axis magnetic detection data Xn and Yn (analog voltage signal). Further, as a magnetic detection element of the magnetic sensors 10X and 10Y, a hall element may be used or a magnetoresistance (MR) element may be used. Also, the X axis and the Y axis may be designed to be perpendicular to each other.
The offset calculation circuit 20 includes a data obtaining unit 21, an offset recording unit 22, an offset calculation unit 23, and an offset updating unit 24, and calculates offsets of the magnetic detection circuit 10 (offset components Xc and Yc included in the two-axis magnetic detection data Xn and Yn, respectively).
The data obtaining unit 21 obtains the two-axis magnetic detection data Xn and Yn as a data point (Xn, Yn) of a two-axis coordinate system. Further, the data obtaining unit 21 includes a driver for controlling driving of the magnetic sensors 10X and 10Y, an analog-to-digital (A/D) converter for converting the analog magnetic detection data Xn and Yn into a digital data point (Xn, Yn), and the like.
The offset recording unit 22 records the two-axis offset components Xc and Yc as an offset point (Xc, Yc) of the two-axis coordinate system in a non-volatile manner. As the offset recording unit 22, a nonvolatile semiconductor memory such as an electrically erasable programmable read-only memory (EEPROM) or a flash memory may be used.
The offset calculation unit 23 calculates a reference line F11 dividing two points (X1, Y1) and (X2, Y2) among sequentially obtained data points (Xn, Yn), and then moves an old offset point (Xc0,Yc0) recorded in the offset recording unit 22 in a direction toward the reference line F11, thereby calculating a new offset candidate point (Xc1, Yc1). Also, the offset calculation method will be described in detail later.
The offset updating unit 24 overwrites the new offset candidate point (Xc1, Yc1) (or an average value of a plurality of calculated new offset candidate points) in the offset recording unit 22.
The offset correction circuit 30 corrects the magnetic detection data Xn and Yn using offset information (offset components Xc and Yc) read from the offset recording unit 22, thereby generating offset-corrected magnetic detection data Xn′(=Xn−Xc) and Yn′(=Yn−Yc).
The azimuth operation circuit 40 generates azimuth data So from the offset-corrected magnetic detection data Xn′ and Yn′.
Also, in FIG. 1, the offset calculation circuit 20, the offset correction circuit 30, and the azimuth operation circuit 40 are illustrated as independent circuit blocks, but these circuit blocks may be unitarily implemented using a central processing unit (CPU), a digital signal processor (DSP), or the like.
FIG. 2 is a XY coordinates plane view illustrating a first example of the offset calculation method of the offset calculation unit 23.
When an offset is calculated according to the first example, first, certain two points (here, points P(X1, Y1) and Q(X2, Y2) among sequentially obtained data points (Xn, Yn) are selected.
Next, a reference line F11 dividing the point P and the point Q is calculated. For example, the reference line F11 may be a straight line linking points at equal distances from the point P and the point Q. In this case, the reference line F11 may be calculated using the following Eq. (1a) or (1b). Also, Eq. (1b) is an equation obtained by simplifying Eq. (1a).
( X - X 1 ) 2 + ( Y - Y 1 ) 2 = ( X - X 2 ) 2 + ( Y - Y 2 ) 2 ( X 2 - X 1 ) · [ X - X 1 + X 2 2 ] + ( Y 2 - Y 1 ) · [ Y - Y 1 + Y 2 2 ] = 0 Eq . ( 1 a ) X - X 1 + Y - Y 1 = X - X 2 + Y - Y 2 Eq . ( 1 b )
The reference line F11 may be easily calculated by using the above Eq. (1a) or (1b). However, the reference line F11 may not necessarily be a straight line, and may be a curved line as long as it is put between the point P and the point Q.
Thereafter, a straight line F12 which passes through the old offset point A (Xc0, Yc0) recorded in the offset recording unit 22 and is perpendicular to the reference line F11 is calculated. Also, the straight line F12 may be easily calculated by using Eq. (2) as follows:
X - Xc 0 X 2 - X 1 = Y - Yc 0 Y 2 - Y 1 Eq . ( 2 )
Thereafter, a new offset candidate point B (Xc1, Yc1) is calculated by moving the old offset point A in a direction toward the reference line F11.
For example, an intersection point S (Xc′, Yc′) between the reference line F11 and the straight line F12 is calculated, and a segment SA determined by the intersection point S and the old offset point A may be divided by m:n to calculate a new offset candidate point B.
Alternatively, the new offset candidate point B may also be calculated by moving the old offset point A toward the intersection point S by a movement distance d on the straight line F12. Also, when a distance between the old offset point A and the intersection point S is D, the movement distance d may be set within a range of 0<d<2D. That is, the new offset candidate point B may not necessarily be present on the segment SA, and may be set in a region beyond the reference line F11.
More generally speaking, the new offset candidate point B may only need to exist in a region belonging to the circle of the radius D around the intersection point S.
Thereafter, the offset calculation unit 23 repeatedly calculates a new offset candidate point B by newly referring to two data points of which at least one point is different from the two data points referred to in a previous time when the new offset candidate point B was calculated. For example, when the calculation of the new offset candidate point B is repeated within the shortest period, the point Q and the point R may be selected at a time when the third point R (X3, Y3) is obtained following the point P and the point Q to calculate a next new offset candidate point B (a second offset candidate point).
The offset updating unit 24 overwrites the newly calculated new offset candidate point B (or an average value of a plurality of calculated new offset candidate points B) by the offset calculation unit 23 in the offset recording unit 22. By repeating the above series of processes, an offset of the azimuth sensor 1 which is continuously changed temporally and spatially may be quickly and continually canceled, and thus, an azimuth may be precisely detected.
Further, for the two data points referred to in calculating the new offset candidate point B when a distance between the two points is shorter than a predetermined value, the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to or may discard the new offset candidate point B calculated from the data points being referred to. As the distance between data points as reference targets is shorter than the predetermined value, the reliability of the reference line F11 may be lost. Thus, by stopping the calculation of the new offset candidate point B based on the uncertain reference line F11 or discarding the calculation result, the precision of offset calculation may be increased.
Also, when a distance between the reference line F11 and the old offset point A is longer than a predetermined threshold value d1, the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to, discard the new offset candidate point B calculated from the data points being referred to, or set the movement distance d of the old offset point A shorter than that at normal times when the new offset candidate point B is calculated. Using such an algorithm, the new offset candidate point B is not excessively distant from the old offset point A, and thus, the stability of the azimuth detection may be enhanced.
Also, when the distance between the reference line F11 and the old offset point A is shorter than a predetermined threshold value d2 (where d2<d1), the offset calculation unit 23 calculates the new offset candidate point B at the first frequency, and when the distance between the reference line F11 and the old offset point A is longer than the threshold value d2, the offset calculation unit 23 calculates the new offset candidate point B at second frequency higher than the first frequency. Using such an algorithm, the offset calculation and updating are performed at a high frequency as much as the reference line F11 is away from the old offset point A, and thus, an offset of the azimuth sensor 1 may be canceled at a high speed.
Also, as the old offset point A (which is here also referred to as an initial offset point C for the convenience of description) referred to when the new offset candidate point B is initially calculated, C(0,0) may be recorded in the offset recording unit 22 at the time when the azimuth sensor 1 is released from the factory. Alternatively, the initial offset point C may be temporarily calculated under a test environment in which an external magnetic field is blocked, and the calculation result may be recorded in the offset recording unit 22.
FIG. 3 is an XY plane view illustrating an example of a method for calculating the initial offset point C. In order to calculate the initial offset point C, three data points P, Q, and R may be sequentially obtained, and thereafter, for example, a straight line F1 connecting points at equal distances from point P and point Q and a straight line F2 at equal distances from the point Q and point R are calculated, and an intersection point of the straight line F1 and the straight line F2 may be determined as the initial offset point C (Xc0, Yc0).
<Second Embodiment>
FIG. 4 is a block diagram illustrating a second embodiment of the azimuth sensor 1. The second embodiment basically has the same configuration as that of the first embodiment, and a magnetic sensor 10Z for detecting magnetism in a Z axis direction to generate magnetic detection data Zn is newly added as a component of the magnetic detection circuit 10. Also, the Z axis may be designed to be perpendicular to the X axis and the Y axis.
The offset calculation circuit 20 includes a data obtaining unit 21, an offset recording unit 22, an offset calculation unit 23, and an offset updating unit 24, like the first embodiment, and calculates offsets of the magnetic detection circuit 10 (offset components Xc, Yc, and Zc respectively included in three-axis magnetic detection data Xn, Yn, and Zn).
The data obtaining unit 21 obtains the three-axis magnetic detection data Xn, Yn, and Zn as a data point (Xn, Yn, Zn) of a three-axis coordinate system.
The offset recording unit 22 records the three-axis offset components Xc, Yc, and Zc as an offset point (Xc, Yc, Zc) of the three-axis coordinate system in a non-volatile manner.
The offset calculation unit 23 calculates a reference plane F21 dividing two points (X1, Y1, Z1) and (X2, Y2, Z2) among sequentially obtained data points (Xn, Yn, Zn), and then moves an old offset point (Xc0, Yc0, Zc0) recorded in the offset recording unit 22 in a direction toward the reference plane F21, thereby calculating a new offset candidate point (Xc1, Yc1, Zc1). Also, the offset calculation method will be described in detail later.
The offset updating unit 24 overwrites the new offset candidate point (Xc1, Yc1, Zc1) (or an average value of a plurality of calculated new offset candidate points) in the offset recording unit 22.
The offset correction circuit 30 corrects the magnetic detection data Xn, Yn, and Zn using offset information (offset components Xc, Yc, and Zc) read from the offset recording unit 22, thereby generating offset-corrected magnetic detection data Xn′(=Xn−Xc), Yn′(=Yn−Yc), and Zn′(=Zn−Zc).
The azimuth operation circuit 40 generates azimuth data So from the offset-corrected magnetic detection data Xn′, Yn′, and Zn′.
FIG. 5 is an XYZ coordinate space diagram illustrating a second example of the offset calculation method of the offset calculation unit 23.
In an offset calculation according to the second example, first, certain two points (here, point P(X1,Y1, Z1) and point Q(X2,Y2, Z2)) among sequentially obtained data points (Xn, Yn, Zn) are selected.
Next, a reference plane F21 dividing the point P and the point Q is calculated. For example, the reference plane F21 may be a plane connecting points at equal distances from the point P and the point Q. In this case, the reference plane F21 may be calculated using the following Eq. (3a) or (3b). Also, Eq. (3b) is an equation obtained by simplifying Eq. (3a).
( X - X 1 ) 2 + ( Y - Y 1 ) 2 + ( Z - Z 1 ) 2 = ( X - X 2 ) 2 + ( Y - Y 2 ) 2 + ( Z - Z 2 ) 2 ( X 2 - X 1 ) · [ X - X 1 + X 2 2 ] + ( Y 2 - Y 1 ) · [ Y - Y 1 + Y 2 2 ] + ( Z 2 - Z 1 ) · [ Z - Z 1 + X 2 2 ] = 0 Eq . ( 3 a ) X - X 1 + Y - Y 1 + Z - Z 1 = X - X 2 + Y - Y 2 + Z - Z 2 Eq . ( 3 b )
The reference plane F21 may be easily calculated by using the above Eq. (3a) or (3b). However, the reference plane F21 may not necessarily be a plane, and may be a curved surface as long as it is put between the point P and the point Q.
Thereafter, a straight line F22 which passes through the old offset point A (Xc0, Yc0, Zc0) recorded in the offset recording unit 22 and is perpendicular to the reference plane F21 is calculated. Also, the straight line F22 may be easily calculated using Eq. (4) as follows:
X - Xc 0 X 2 - X 1 = Y - Yc 0 Y 2 - Y 1 = Z - Zc 0 Z 2 - Z 1 Eq . ( 4 )
Thereafter, a new offset candidate point B (Xc1, Yc1, Zc1) is calculated by moving the old offset point A in a direction toward the reference plane F21.
For example, an intersection point S(Xc′, Yc′, Zc′) between the reference plane F21 and the straight line F 22 is calculated, and a segment SA determined by this intersection point S and the old offset point A may be divided by m:n to calculate a new offset candidate point B.
Alternatively, the new offset candidate point B may also be calculated by moving the old offset point A toward the intersection point S by a movement distance d on the straight line F22. Also, when a distance between the old offset point A and the intersection point S is D, the movement distance d may be set within a range of 0<d<2D. That is, the new offset candidate point B may not necessarily be present in the segment SA, and may be set in a region beyond the reference plane F 21.
More generally speaking, the new offset candidate point B may only need to exist in a region belonging to the sphere of the radius D around the intersection point S.
Thereafter, the offset calculation unit 23 repeatedly calculates a new offset candidate point B by newly referring two data points in which at least one point is different from two data points referred to in a previous time when the new offset candidate point B was calculated. For example, when the calculation of the new offset candidate point B is repeated within the shortest period, when the point Q and a point R are selected at a time when the third point R(X3, Y3, Z3) is obtained following the point P and the point Q, a next new offset candidate point B may be calculated.
The offset updating unit 24 overwrites the newly calculated new offset candidate point B (or an average value of a plurality of calculated new offset candidate points B) by the offset calculation unit 23 in the offset recording unit 22. By repeating the above series of processes, an offset of the azimuth sensor 1 which is continuously changed temporally and spatially may be quickly and continually canceled, and thus, an azimuth may be precisely detected.
Further, for the two data points referred to in calculating the new offset candidate point B, when a distance between the two points is shorter than a predetermined value, the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to or may discard the new offset candidate point B calculated from the data points being referred to. As the distance between data points as reference targets is shorter than the predetermined value, the reliability of the reference plane F21 may be lost. Thus, by stopping the calculation of the new offset candidate point B based on the uncertain reference plane F21 or discarding the calculation result, the precision of offset calculation may be increased.
Also, when a distance between the reference plane F21 and the old offset point A is longer than a predetermined threshold value d1, the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to, discard the new offset candidate point B calculated from the data points being referred to, or set the movement distance d of the old offset point A shorter than that at normal times when the new offset candidate point B is calculated. Using such an algorithm, the new offset candidate point B is not excessively distant from the old offset point A, and thus, the stability of the azimuth detection may be enhanced.
Also, when the distance between the reference plane F21 and the old offset point A is shorter than a predetermined threshold value d2 (where d2<d1), the offset calculation unit 23 calculates the new offset candidate point B at first frequency, and when the distance between the reference plane F21 and the old offset point A is longer than the threshold value d2, the offset calculation unit 23 calculates the new offset candidate point B at second frequency higher than the first frequency. Using such an algorithm, offset calculation and updating are performed at high frequency as much as the reference plane F21 is away from the old offset point A, and thus, an offset of the azimuth sensor 1 may be canceled at a high speed.
<Third Embodiment>
FIG. 6 is a block diagram illustrating a third embodiment of the azimuth sensor 1. The third embodiment basically has the same configuration as that of the second embodiment, except for an offset calculation method in the offset calculation circuit 20.
More specifically, the offset calculation unit 23 calculates a reference line F31 passing through a region surrounded by three points (X1,Y1, Z1), (X2,Y2, Z2), and (X3,Y3, Z3) among sequentially obtained data points (Xn, Yn, Zn), and then moves the old offset point (Xc0,Yc0, Zc0) recorded in the offset recording unit 22 in a direction toward the reference line F31, thereby calculating a new offset candidate point (Xc1,Yc1, Zc1). Hereinafter, the offset calculation method will be described in detail.
FIG. 7 is an XYZ coordinate space diagram illustrating a third example of the offset calculation method of the offset calculation unit 23.
In the offset calculation of the third example, first, certain three points (here, a point P (X1, Y1, Z1), a point Q (X2, Y2, Z2), and a point R (X3, Y3, Z3)) are selected from sequentially obtained data points (Xn, Yn, Zn).
Next, a reference line F31 passing through a region surrounded by the point P, the point Q, and the point R is calculated. For example, the reference line F31 may be a straight line connecting points at equal distances from the point P, the point Q, and the point R. In this case, the reference line F31 may be calculated by using the following Eq. (5a) or (5b). Also, the Eq. (5b) is an equation obtained by simplifying Eq. (5a).
( X - X 1 ) 2 + ( Y - Y 1 ) 2 + ( Z - Z 1 ) 2 = ( X - X 2 ) 2 + ( Y - Y 2 ) 2 + ( Z - Z 2 ) 2 = ( X - X 3 ) 2 + ( Y - Y 3 ) 2 + ( Z - Z 3 ) 2 Eq . ( 5 a ) X - X 1 + Y - Y 1 + Z - Z 1 = X - X 2 + Y - Y 2 + Z - Z 2 = X - X 3 + Y - Y 3 + Z - Z 3 Eq . ( 5 b )
The reference line F31 may be easily calculated using the above Eq. (5a) or (5b). However, the reference line F31 may not necessarily be a straight line, and may be a curved line as long as it passes through the region surrounded by the point P, the point Q, and the point R.
Thereafter, a plane F32 which passes through the old offset point A (Xc0, Yc0, Zc0) recorded in the offset recording unit 22 and is perpendicular to the reference line F31 is calculated. Also, the plane F32 may be easily calculated using Eq. (6) as follows:
(ax,ay,az)=(X2−X1,Y2−Y1,Z2−Z1)
(bx,by,bz)=(X3−X1,Y3−Y1,Z3−Z1)
(ay·bz−az·by)·(X−Xc0)+(az·bx−ax·bz)·(Y−Yc0)+(ax·by−ay·bx)·(Z−Zc0)=0   Eq. (6)
Thereafter, a new offset candidate point B (Xc1, Yc1, Zc1) are calculated by moving the old offset point A in a direction toward the reference line F31.
For example, an intersection point S (Xc′, Yc′, Zc′) between the reference line F31 and the plane F32 is calculated, and a segment SA determined by the intersection point S and the old offset point A is divided by m:n, thereby calculating a new offset candidate point B.
Alternatively, the old offset point A may be moved toward the intersection point S by a movement distance d on the plane F32, thereby calculating a new offset candidate point B. Also, when a distance between the old offset point A and the intersection point S is D, a movement distance d may be set within a range of 0<d<2D. That is, the new offset candidate point B may not necessarily be present on the segment SA, and may be set in a region beyond the reference line F31.
More generally speaking, the new offset candidate point B may only need to exist in a region belonging to the sphere of the radius D around the intersection point S.
Thereafter, the offset calculation unit 23 repeatedly calculates a new offset candidate point B by newly referring three data points in which at least one point is different as three data points referred to in a previous time when the new offset candidate point B was calculated. For example, in a case in which the calculation of the new offset candidate point B is repeated within the shortest period, when the point Q, the point R, and a point T are selected at a time when the fourth point T (X4, Y4, Z4) is obtained following the point P, the point Q, and the point R, a next new offset candidate point B may be calculated.
The offset updating unit 24 overwrites the newly calculated new offset candidate point B (or an average value of a plurality of calculated new offset candidate points B) by the offset calculation unit 23 in the offset recording unit 22. By repeating the above series of processes, an offset of the azimuth sensor 1 which is continuously changed temporally and spatially may be quickly and continually canceled, and thus, an azimuth may be precisely detected.
Further, for the three data points referred to in calculating the new offset candidate point B, when a distance between at least two points is shorter than a predetermined value, the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to or may discard the new offset candidate point B calculated from the data points being referred to. As the distance between data points as reference targets is shorter than a predetermined value, the reliability of the reference line F31 may be lost. Thus, by stopping the calculation of the new offset candidate point B based on the uncertain reference line F31 or discarding the calculation result, the precision of offset calculation may be increased.
Also, when a distance between the reference line F31 and the old offset point A is longer than a predetermined threshold value d1, the offset calculation unit 23 may not calculate the new offset candidate point B from the data points being referred to, discard the new offset candidate point B calculated from the data points being referred to, or set the movement distance d of the old offset point A shorter than that at normal times when the new offset candidate point B is calculated. Using such an algorithm, the new offset candidate point B is not excessively distant from the old offset point A, and thus, the stability of the azimuth detection may be enhanced.
Also, when the distance between the reference line F31 and the old offset point A is shorter than a predetermined threshold value d2 (where d2<d1), the offset calculation unit 23 calculates the new offset candidate point B at first frequency, and when the distance between the reference line F31 and the old offset point A is longer than the threshold value d2, the offset calculation unit 23 calculates the new offset candidate point B at second frequency higher than the first frequency. Using such an algorithm, offset calculation and updating are performed at high frequency as much as the reference line F31 is away from the old offset point A, and thus, an offset of the azimuth sensor 1 may be canceled at a high speed.
<Applications to Electronic Device>
FIG. 8 is a view illustrating an outer appearance of a smartphone 100. The smartphone 100 is an example of an electronic device having the azimuth sensor 1. By mounting the azimuth sensor 1 described above as an electronic compass of the smartphone 100, a direction in which a user is oriented can be accurately detected. In particular, when a global positioning system (GPS) and an electronic compass are used together, position detection precision in a map application or a navigation application can be enhanced.
<Other Modifications>
Further, various technical features disclosed herein may be variously modified, in addition to the foregoing embodiments, without departing from the spirit of the present disclosure. That is, it should be understood that the embodiments are merely illustrative and not intended to limit the scope of the present disclosure, in all respects. The technical scope of the present disclosure is presented by claims, rather than the description of the embodiments, and thus, is to be understood to encompass all changes that fall within the meaning and range equivalent to the scope of the claims.
According to the present disclosure in some embodiments, it is possible to provide an offset calculation circuit capable of calculating an offset with a smaller amount of calculation than that of the related art, and an azimuth sensor using the same.
The present disclosure disclosed herein can be used in an azimuth sensor mounted on, for example, a smartphone, a tablet terminal, or the like.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the disclosures. Indeed, the novel methods and apparatuses described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the disclosures. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the disclosures.

Claims (20)

What is claimed is:
1. An offset calculation circuit, comprising:
a data obtaining unit connected to two or more magnetic sensors to sequentially obtain, from the two or more magnetic sensors, two-axis magnetic detection data as a set of data points for a two-axis coordinate system or three-axis magnetic detection data as a set of data points for a three-axis coordinate system, the two-axis or three-axis magnetic detection data being generated based on magnetism detected in two or more directions by the two or more magnetic sensors;
an offset recording unit for recording offset components of the two-axis or three-axis magnetic detection data as an offset point of the two-axis coordinate system or the three-axis coordinate system; and
an offset calculation unit for calculating a first reference line put between first and second data points among the set of data points for the two-axis coordinate system or a first reference plane put between first and second data points among the set of data points for the three-axis coordinate system, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line or the first reference plane to calculate a first offset candidate point.
2. The offset calculation circuit of claim 1, wherein the first reference line or the first reference plane is a straight line or a flat plane connecting points at equal distances from the first and second data points.
3. The offset calculation circuit of claim 1, wherein the offset calculation unit calculates a second offset candidate point by referring to third and fourth data points among the set of data points, and one of the third and fourth data points is different from both of the first and second data points.
4. The offset calculation circuit of claim 3, wherein the offset calculation unit calculates a plurality of offset candidate points including the first and second offset candidate points based on the set of data points, and the offset calculation circuit further comprising
an offset updating unit for overwriting an average value of the plurality of offset candidate points in the offset recording unit.
5. The offset calculation circuit of claim 1, further comprising an offset updating unit for overwriting the first offset candidate point in the offset recording unit.
6. The offset calculation circuit of claim 3, wherein when a distance between third and fourth data points is shorter than a first predetermined value, the offset calculation unit does not calculate the second offset candidate point from the third and fourth data points or discards the second offset candidate point calculated from the third and fourth data points.
7. The offset calculation circuit of claim 1, wherein the offset calculation unit calculates a second reference line or a second reference plane put between third and fourth data points among the set of data points, and when a distance between the second reference line or the second reference plane and the offset point is longer than a second predetermined value, the offset calculation unit does not calculate a second offset candidate point from the third and fourth data points, discards the second offset candidate point calculated from the third and fourth data points, or sets a movement distance of the offset point in a direction toward the second reference line or the second reference plane shorter than a predetermined distance when calculating the second offset candidate point.
8. The offset calculation circuit of claim 1, wherein the offset calculation unit calculates a second reference line or a second reference plane put between third and fourth data points among the set of data points, and subsequently moves the offset point recorded in the offset recording unit in a direction toward the second reference line or the second reference plane to calculate a second offset candidate point, and wherein when a distance between the second reference line or the second reference plane and the offset point is shorter than a third predetermined value, the offset calculation unit calculates the second offset candidate point at a first frequency, and when the distance between the second reference line or the second reference plane and the offset point is longer than the third predetermined value, the offset calculation unit calculates the second offset candidate point at a second frequency higher than the first frequency.
9. An azimuth sensor, comprising:
a magnetic detection circuit including two or more magnetic sensors to generate two-axis magnetic detection data as a set of data points for a two-axis coordinate system or three-axis magnetic detection data as a set of data points for a three-axis coordinate system, based on magnetism detected in two or more directions;
an offset calculation circuit for calculating an offset of the magnetic detection data, the offset calculation circuit including:
a data obtaining unit for sequentially obtaining, from the two or more magnetic sensors, the two-axis magnetic detection data or the three-axis magnetic detection data;
an offset recording unit for recording offset components of the two-axis or three-axis magnetic detection data as an offset point of the two-axis coordinate system or the three-axis coordinate system; and
an offset calculation unit for calculating a first reference line put between first and second data points among the set of data points for the two-axis coordinate system or a first reference plane put between first and second data points among the set of data points for the three-axis coordinate system, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line or the first reference plane to calculate a first offset candidate point;
an offset correction circuit for correcting the offset of the magnetic detection data; and
an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data.
10. An electronic device comprising an azimuth sensor, the azimuth sensor comprising:
a magnetic detection circuit including two or more magnetic sensors to generate two-axis magnetic detection data as a set of data points for a two-axis coordinate system or three-axis magnetic detection data as a set of data points for a three-axis coordinate system, based on magnetism detected in two or more directions;
an offset calculation circuit for calculating an offset of the magnetic detection data, the offset calculation circuit including:
a data obtaining unit for sequentially obtaining, from the two or more magnetic sensors, the two-axis magnetic detection data or the three-axis magnetic detection data;
an offset recording unit for recording offset components of the two-axis or three-axis magnetic detection data as an offset point of the two-axis coordinate system or the three-axis coordinate system; and
an offset calculation unit for calculating a first reference line put between first and second data points among the set of data points for the two-axis coordinate system or a first reference plane put between first and second data among the set of data points for the three-axis coordinate system, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line or the first reference plane to calculate a first offset candidate point;
an offset correction circuit for correcting the offset of the magnetic detection data; and
an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data.
11. An offset calculation circuit, comprising:
a data obtaining unit connected to at least three magnetic sensors to sequentially obtain, from the at least three magnetic sensors, three-axis magnetic detection data as a set of data points for a three-axis coordinate system, the three-axis magnetic detection data being generated based on magnetism detected in three directions by the at least three magnetic sensors;
an offset recording unit for recording offset components of the three-axis magnetic detection data as an offset point of the three-axis coordinate system; and
an offset calculation unit for calculating a first reference line passing through a first region surrounded by first, second, and third data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line to calculate a first offset candidate point.
12. The offset calculation circuit of claim 11, wherein the first reference line is a straight line connecting points at equal distances from the first, second, and third data points.
13. The offset calculation circuit of claim 11, wherein the offset calculation unit calculates a second offset candidate point by referring to fourth, fifth, and sixth data points among the set of data points, and one of the fourth, fifth, and sixth data points is different from all of the first, second, and third data points.
14. The offset calculation circuit of claim 13, wherein the offset calculation unit calculates a plurality of offset candidate points including the first and second offset candidate points based on the set of data points, the offset calculation circuit further comprising
an offset updating unit for overwriting an average value of the plurality of offset candidate points in the offset recording unit.
15. The offset calculation circuit of claim 11, further comprising an offset updating unit for overwriting the first offset candidate point in the offset recording unit.
16. The offset calculation circuit of claim 13, when a distance between two points of the fourth, fifth, and sixth data points is shorter than a first predetermined value, the offset calculation unit does not calculate the second offset candidate point from the fourth, fifth, and sixth data points or discards the second offset candidate point calculated from the fourth, fifth, and sixth data points.
17. The offset calculation circuit of claim 11, wherein the offset calculation unit calculates a second reference line passing through a second region surrounded by fourth, fifth, and sixth data points among the set of data points, and when a distance between the second reference line and the offset point is longer than a second predetermined value, the offset calculation unit does not calculate a second offset candidate point from the fourth, fifth, and sixth data points, discards the second offset candidate point calculated from the fourth, fifth, and sixth data points, or sets a movement distance of the offset point in a direction toward the second reference line shorter than a predetermined distance when calculating the second offset candidate point.
18. The offset calculation circuit of claim 11, wherein the offset calculation unit calculates a second reference line passing through a second region surrounded by fourth, fifth, and sixth data points among the set of data points, and subsequently moves the offset point recorded in the offset recording unit in a direction toward the second reference line to calculate a second offset candidate point, wherein when a distance between the second reference line and the offset point is shorter than a third predetermined value, the offset calculation unit calculates the second offset candidate point at a first frequency, and when the distance between the second reference line and the offset point is longer than the third predetermined value, the offset calculation unit calculates the second offset candidate point at a second frequency higher than the first frequency.
19. An azimuth sensor, comprising:
a magnetic detection circuit including at least three magnetic sensors to generate three-axis magnetic detection data as a set of data points for a three-axis coordinate system, based on magnetism detected in three directions;
an offset calculation circuit for calculating an offset of the magnetic detection data, the offset calculation circuit including;
a data obtaining unit for sequentially obtaining, from the at least three magnetic sensors, the three-axis magnetic detection data;
an offset recording unit for recording offset components of the three-axis magnetic detection data as an offset point of the three-axis coordinate system; and
an offset calculation unit for calculating a first reference line passing through a first region surrounded by first, second, and third data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line to calculate a first offset candidate point;
an offset correction circuit for correcting the offset of the magnetic detection data; and
an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data.
20. An electronic device comprising an azimuth sensor, the azimuth sensor comprising:
a magnetic detection circuit including at least three magnetic sensors to generate three-axis magnetic detection data as a set of data points for a three-axis coordinate system, based on magnetism detected in three directions;
an offset calculation circuit for calculating an offset of the magnetic detection data, the offset calculation circuit including;
a data obtaining unit for sequentially obtaining, from the at least three magnetic sensors, the three-axis magnetic detection data;
an offset recording unit for recording offset components of the three-axis magnetic detection data as an offset point of the three-axis coordinate system; and
an offset calculation unit for calculating a first reference line passing through a first region surrounded by first, second, and third data points among the set of data points, and subsequently moving the offset point recorded in the offset recording unit in a direction toward the first reference line to calculate a first offset candidate point;
an offset correction circuit for correcting the offset of the magnetic detection data; and
an azimuth operation circuit for generating azimuth data from the corrected magnetic detection data.
US14/962,028 2014-12-11 2015-12-08 Offset calculation circuit and azimuth sensor using the same Active 2037-03-22 US10209069B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2014-250923 2014-12-11
JP2014250923 2014-12-11
JP2014250923A JP6563190B2 (en) 2014-12-11 2014-12-11 Offset calculation circuit and azimuth angle sensor using the same

Publications (2)

Publication Number Publication Date
US20160169673A1 US20160169673A1 (en) 2016-06-16
US10209069B2 true US10209069B2 (en) 2019-02-19

Family

ID=56110857

Family Applications (1)

Application Number Title Priority Date Filing Date
US14/962,028 Active 2037-03-22 US10209069B2 (en) 2014-12-11 2015-12-08 Offset calculation circuit and azimuth sensor using the same

Country Status (2)

Country Link
US (1) US10209069B2 (en)
JP (1) JP6563190B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112017004127T5 (en) * 2016-09-21 2019-05-09 Rohm Co., Ltd. Electronic compass

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050160609A1 (en) * 2003-11-13 2005-07-28 Samsung Electronics Co., Ltd. Apparatus and method of calibrating azimuth of mobile device
JP4391416B2 (en) 2002-07-01 2009-12-24 旭化成エレクトロニクス株式会社 Azimuth measuring device and azimuth measuring method
US20100312513A1 (en) * 2009-06-05 2010-12-09 Apple Inc. Restoring and Storing Magnetometer Calibration Data

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4235060B2 (en) * 2003-08-12 2009-03-04 矢崎総業株式会社 Pointer device and pointing device
JP4638670B2 (en) * 2003-12-26 2011-02-23 旭化成エレクトロニクス株式会社 Azimuth angle measuring method and azimuth angle measuring apparatus
JP2006035505A (en) * 2004-07-23 2006-02-09 Dainippon Printing Co Ltd Method and device for inspecting printed matter
JP5304113B2 (en) * 2008-09-02 2013-10-02 株式会社ジェイテクト Axle bearing fastening structure
JP2011022073A (en) * 2009-07-17 2011-02-03 Yamaha Corp Magnetic data processing device, magnetic data processing method, and magnetic data processing program
JP5425671B2 (en) * 2010-03-10 2014-02-26 アルプス電気株式会社 Magnetic field detector
JP5772265B2 (en) * 2011-06-15 2015-09-02 ヤマハ株式会社 Geomagnetic measurement apparatus, offset determination method, and offset determination program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4391416B2 (en) 2002-07-01 2009-12-24 旭化成エレクトロニクス株式会社 Azimuth measuring device and azimuth measuring method
US20050160609A1 (en) * 2003-11-13 2005-07-28 Samsung Electronics Co., Ltd. Apparatus and method of calibrating azimuth of mobile device
US7069663B2 (en) * 2003-11-13 2006-07-04 Samsung Electronics Co., Ltd. Apparatus and method of calibrating azimuth of mobile device
US20100312513A1 (en) * 2009-06-05 2010-12-09 Apple Inc. Restoring and Storing Magnetometer Calibration Data
US8437970B2 (en) * 2009-06-05 2013-05-07 Apple Inc. Restoring and storing magnetometer calibration data

Also Published As

Publication number Publication date
JP2016114378A (en) 2016-06-23
JP6563190B2 (en) 2019-08-21
US20160169673A1 (en) 2016-06-16

Similar Documents

Publication Publication Date Title
JP4466705B2 (en) Navigation device
US8494799B2 (en) Dynamic compass calibration in a portable device
CN107421523B (en) Azimuth angle calibration method and device, storage medium and computer equipment
CN103791904B (en) For the system and method using calibrated driftage deviation value to navigate
US7921572B2 (en) Accuracy indications for an electronic compass in a portable device
US8838403B2 (en) Method and system for a self-calibrated multi-magnetometer platform
JP2012052898A (en) Positioning device, positioning method, and program
WO2013084987A1 (en) Position output device using satellite navigation system
JP2011220793A5 (en)
US10533861B2 (en) Map matching apparatus
JP2009079928A (en) Navigation system
EP3091335A1 (en) Calibration of temperature effect on magnetometer
CN106574838B (en) Pedestrian navigation device and method
US20090204351A1 (en) Sensor Apparatus
US10209069B2 (en) Offset calculation circuit and azimuth sensor using the same
CN107209014B (en) Offset calculation device and azimuth angle sensor using the same
JP2005195376A (en) Azimuth measuring method, and azimuth measuring instrument
JP5168629B2 (en) Azimuth angle measuring apparatus and azimuth angle measuring method
KR101352245B1 (en) Apparatus and method for calibrating azimuth mems magnetic sensor
US11079224B2 (en) Offset derivation device, offset calculation device, and azimuth sensor
JP2016061762A5 (en)
KR101849353B1 (en) Apparatus and method for calculating heading of vehicle
KR101298845B1 (en) Apparatus and method for calibrating azimuth magnetic sensor having object
JP4947669B2 (en) Azimuth angle measuring method and azimuth angle measuring apparatus
Köppe et al. Self-calibration-method for an inertial navigation system with three 3D sensors

Legal Events

Date Code Title Description
AS Assignment

Owner name: ROHM CO., LTD., JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:SAITO, KOJI;REEL/FRAME:037240/0457

Effective date: 20151202

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4