1. Technical Field
The present invention relates to an IC for a sensor, a sensor device, an electronic device, and a moving object.
2. Related Art
For an inertial navigation system, a method of computing a posture of a moving object by using an output of an angular velocity sensor is known.
JP-A-2001-280970 discloses a technique of correcting first posture computation, which has a smaller order of Taylor expansion and a relatively large computation frequency, with second posture computation which has a larger order of Taylor expansion and a smaller computation frequency as compared with the first posture computation in order to compute a posture angle with high precision at a high speed.
In JP-A-2001-280970, computation for correction at a low frequency is performed in the second posture computation. According to such posture computation, the number of samples which are not used in the posture computation is large among samples of angular velocity data output from a gyro sensor, and therefore, there is a possibility that correction cannot be performed accurately.
It is known that when a moving object with a large variation in angular velocity in a short time, such as a human, is targeted, accuracy of the posture angle computed by the above posture calculation method deteriorates.
An advantage of some aspects of the invention is to provide an IC for a sensor which calculates a variation in posture of a moving object without increasing a burden on a CPU on a side of a host which performs overall control for calculating the position of the moving object, and to provide a sensor device, an electronic device, and a moving object which include the same.
(1) An aspect of the invention relates to an IC for a sensor including: a detection unit which detects an angular velocity signal based on a signal from a sensor element; an AD conversion unit which converts an analog signal from the detection unit into a digital signal; and a posture variation calculating unit which calculates a variation in posture of a moving object during a predetermined period based on the signal from the AD conversion unit.
The IC for a sensor according to the aspect of the invention can be used by being connected to a host terminal which calculates a position of the moving object in a second coordinate system (an absolute coordinate system, a moving object coordinate system, or the like) which is different from a first coordinate system (sensor coordinate system), for example. For coordinate conversion, it is necessary to update the posture of the moving object. The posture (angle) of the moving object is obtained by integrating an angular velocity from a gyro sensor. The integral value has higher accuracy as the amount of angular velocity data within an integration period is larger, that is, as an input frequency of the angular velocity data input to the posture variation calculating unit is higher. According to the aspect of the invention, if it is assumed that the input frequency of the angular velocity data input to the posture variation calculating unit is a first frequency f1, for example, the first frequency f1 can be higher than an input frequency (second frequency f2) of the variation in posture and the angular velocity data input to a posture updating unit provided in the host terminal. Therefore, it is possible to suppress degradation of accuracy in integration even if a variation in angular velocity is relatively large as in a case of a moving object which performs walking motion, for example. In addition, the input frequency of the variation in posture which is input to the posture updating unit on the side of the host terminal is the second frequency f2 which is lower than the first frequency f1. Therefore, a burden on a CPU in the host terminal is reduced.
(2) In the aspect of the invention, the posture variation calculating unit may compute exp([αibb(t+τ1)]×)exp([αibb(t+2τ1)]×) . . . exp([αibb(t+kτ1)]×) where τ1=1/f1, k is an integer which satisfies (f1/f2)−1<k≦f1/f2, t represents a time, and [αibb(t+nτ1)] represents a rotation matrix acquired from the angular velocity at a time t+nτ1 (n is an integer which satisfies 1≦n≦k).
By computation of performing multiplication k times as in exp([α(t+τ)×])exp(([α(t+2τ)×] . . . exp([α(t+kτ)]×) using the variation in posture exp(([α(t+nτ1)]×) for every n-th first cycle τ1, it is possible to accurately calculate the variation in posture of the moving object. In addition, the first and second cycles τ1 and τ2 and the aforementioned first and second frequencies f1 and f2 establish relationships of τ1=1/f1 and τ2=1/f2. Therefore, k=f1/f2 is established. In addition, since k is a number of an α matrix which can be multiplied during the period even if f1/f2 is not an integer, an integer k which satisfies (f1/f2)−1<k=f1/f2 can be obtained.
(3) In the aspect of the invention, the IC for a sensor may further include: a control unit which controls the posture variation calculating unit based on a command signal input from the outside.
With such a configuration, the control unit can control the posture variation calculating unit based on the command signal input from the outside, for example, the host terminal, and various kinds of setting for calculating the variation in posture in the IC for a sensor can be arbitrarily set from the outside.
(4) In the aspect of the invention, the control unit may set a start and an end of calculating operation by the posture variation calculating unit based on the command signal.
By setting a start and an end of calculating operation by the posture variation calculating unit based on the command signal as described above, it is possible to set a computation cycle (integration cycle) at the first frequency f1 which is different from the second frequency f2 on the side of the host terminal as described above.
(5) In the aspect of the invention, the IC for a sensor may further include: a command decoder which decodes the command signal input from the outside; and a register in which a value for controlling the posture variation calculating unit is set based on a decoding result of the command decoder.
That is, the aforementioned control unit can be configured of the command decoder and the register.
(6) In the aspect of the invention, the command decoder may set a start and an end of the calculating operation by the posture variation calculating unit in the register based on the command signal.
With such a configuration, it is possible to set the computation cycle (integration cycle) at the first frequency f1 which is different from the second frequency f2 on the side of the host terminal as described above.
(7) In the aspect of the invention, the posture variation calculating unit may be configured of hardware which includes an adder and a multiplier which perform approximating operation of exp([α(t+nτ1)]×).
With such a configuration, accuracy is not degraded if the calculation of the variation in posture is developed as exp([α(t+τ)+α(t+2τ)+α(t+3τ) . . . +α(t+kτ)×], and it is possible to perform the computation with relatively high accuracy by computation of exp([α(t+τ)×])exp([α(t+2τ)×] . . . exp([α(t+kτ)]×). In addition, since the posture variation calculating unit performs the computation at the relatively high first frequency f1 by using the hardware including the adder and the multiplier, the burden on the CPU does not increase.
(8) Another aspect of the invention is directed to a sensor device, an electronic device, and a moving object, each of which includes: a sensor element; and the IC for a sensor according to any one of (1) to (7).
According to the aspect of the invention, it is also possible to calculate the variation in posture of the moving object by the IC for a sensor without increasing the burden on the CPU on the side of the host which performs overall control for calculating the position of the moving object.
The invention will be described with reference to the accompanying drawings, wherein like numbers reference like elements.
Hereinafter, an example of preferred embodiments of the invention will be described with reference to drawings. However, it is a matter of course that the embodiments to which the invention can be applied are not limited to the embodiments which will be described below.
In the embodiment, at least three kinds of coordinate systems are defined. A first coordinate system is a local coordinate system which is a three-dimensional orthogonal coordinate system (sensor coordinate system) which is associated with an inertial measurement unit (IMU) 10 provided in the posture calculating apparatus 1. In this specification, the local coordinate system will also be referred to as a body (B) frame in which a detection axis of an inertial sensor is represented by a right-handed system. In the embodiment, three axes of the local coordinate system will be described as an x axis, a y axis, and a z axis.
A second coordinate system is a three-dimensional orthogonal coordinate system (absolute coordinate system) which is a coordinate system defining a moving space of the moving object. In this specification, the absolute coordinate system will also be referred to as an absolute (A) frame. The A frame is defined as a North East Down (NED) coordinate system (N frame) which is known as a north east down coordinate system or an Earth Centered Earth Fixed (ECEF) coordinate system (E frame) which is known as an earth centered earth fixed coordinate system, for example. In the embodiment, three axes of the absolute coordinate system will be described as an X axis, a Y axis, and a Z axis.
The second coordinate system may be a three-dimensional orthogonal coordinate system (moving object coordinate system) which is associated with the moving object. In this specification, the moving object coordinate system will also be referred to as a vehicle (V) frame. In the embodiment, a front-back direction in which the front side of the moving object corresponds to a positive side is represented as a roll axis (R axis), a left-right direction in which the right side corresponds to a positive side is represented as a pitch axis (P axis), and an upper-lower direction in which the vertically lower side corresponds to a positive side is represented as a yaw axis (Q axis).
A third coordinate system is an inertial coordinate system (not shown) which is a three-dimensional orthogonal coordinate system as a reference for the IMU 10 to perform detection. In this specification, the third coordinate system will also be referred to as an inertial (I) frame. The I frame is a coordinate system in which the center of the earth is regarded as an origin and the rotational axis of the earth is regarded as an axis. The rotation of the earth is not taken into consideration. In the embodiment, three axes of the inertial coordinate system will be described as an L axis, an Maxis, and an N axis. In the embodiment, the N axis corresponds to the rotation axis of the earth.
The IMU 10 is a sensor device which is mounted on the position calculating apparatus 1 and is known as an inertial navigation unit. The IMU 10 includes an acceleration sensor 11, a gyro sensor 13, and a gyro sensor IC (an IC for the sensor) 14 including a posture variation calculating unit as shown in
The acceleration sensor 11 detects an acceleration vector for three axes (the x axis, the y axis, and the z axis) in the local coordinate system with respect to the respective axes (the L axis, the M axis, and the N axis) in the corresponding inertial coordinate system. As the acceleration sensor 11, a micro electro mechanical system (MEMS) sensor is used, for example. A value measured by the acceleration sensor 11 corresponds to an acceleration of the moving object which is measured in the local coordinate system.
The acceleration sensor 11 detects an acceleration vector of the moving object for the three axes (the x axis, the y axis, and the z axis) in the local coordinate system. As the acceleration sensor 10, a micro electro mechanical system (MEMS) sensor is used, for example. A value measured by the acceleration sensor 10 corresponds to an acceleration of the moving object which is measured in the local coordinate system.
In this specification, an acceleration and a velocity represent an acceleration and a velocity (that is, an acceleration vector and a velocity vector) obtained by taking a direction and a size into consideration in principle unless otherwise particularly noted.
The gyro sensor 13 detects angular velocity (hereinafter, referred to as a “local coordinate angular velocity”) for the three axes (the x axis, the y axis, and the z axis) of the same local coordinate system as that of the acceleration sensor 11 provided in the position calculating apparatus 1 with respect to the respective axes (the L axis, the M axis, and the N axis) of the corresponding inertial coordinate system.
A global positioning system (GPS) unit 15 shown in
The position calculating apparatus 1 further includes a processing unit (host terminal) 100, an operation unit 20 including the operation button 3 shown in
The processing unit 100 collectively controls the respective components in the position calculating apparatus 1 in accordance with various programs such as a system program stored on the storage unit 60.
In
As shown in
The processing unit 100 includes an A/D converter 121 which samples an acceleration detected by the acceleration sensor 11 at a third frequency f3 (f3=100 Hz, for example) and A/D converts the acceleration, an acceleration bias correction unit 122 which corrects a bias of the acceleration, and an acceleration averaging unit 123 which averages m accelerations (m is an integer which is equal to or greater than two and satisfies (f3/f2)−1<m≦f3/f2. m=5, for example) sampled at the third frequency f3 and outputting the acceleration at the second frequency f2 as an output frequency, as shown in
The processing unit 100 further includes a posture updating unit 124 which updates the posture of the moving object based on the variation in posture, which is output from the posture variation calculating unit 113 at the second frequency f2, as shown in
The processing unit 100 further includes a coordinate conversion unit 125. The coordinate conversion unit 125 calculates an acceleration (hereinafter, referred to as a “second coordinate system acceleration”) of the moving object after coordinate conversion from the first coordinate system to the second coordinate system, based on the posture of the moving object updated by the posture updating unit 124 at the second frequency f2 and the acceleration input at the second frequency f2. As shown in
The processing unit 100 further includes a velocity/position calculating unit 126. As shown In
As described above, the position calculating apparatus 1 calculates the position of the moving object which performs walking motion in the second coordinate system (the absolute coordinate system, the moving object coordinate system, or the like). For the coordinate conversion from the first coordinate system to the second coordinate system, the posture of the moving object updated by the posture updating unit 124 is used. The posture (angle) of the moving object is obtained by updating the previous posture with the use of the variation in posture obtained by the posture variation calculating unit 113 integrating the angular velocity detected by the gyro sensor 13. As the amount of data on the angular velocities (the number of samples) during the integration period is larger, that is, as the frequency (input frequency) of the angular velocity input to the posture variation calculating unit 113 is higher, accuracy of the calculated posture is higher. In the embodiment, the frequency of the angular velocity input to the posture variation calculating unit 113 is the first frequency f1, which is higher than the posture variation frequency (second frequency f2) input to the posture updating unit 124. Therefore, it is possible to suppress degradation of integration accuracy as compared with a case where integration is performed at the second frequency f2, even when the variation in angular velocity is relatively large as in a case of the moving object which performs walking motion. In contrast, the posture variation frequency input to the posture updating unit 124 is the second frequency f2 which is lower than the first frequency f1. Therefore, the burden on the CPU in the computation after the updating of the posture is reduced as compared with the case where the variation in posture is input to the posture updating unit 124 at the first frequency f1.
The processing unit 100 further includes an extended Kalman filter computation unit 127 and an error correction unit 128. The extended Kalman filter computation unit 127 estimates errors in a position, a velocity, and an orientation by the extended Kalman filter by using posture data output from the posture updating unit 124, position data and speed data output from the velocity/position calculating unit 126, position measurement data (the position, the speed, and the orientation) from the GPS sensor 15, and acceleration after correction of the acceleration bias by the acceleration bias correction unit 122 as shown in
The analog circuit 110 Q-V converts and amplifies an output from the gyro sensor 13. The MPU 114 controls the analog circuit 110, the A/D converter 111, the DSP 112, the posture variation calculating unit 113, and the SPI 115 based on command/data input from the SPI 115. Therefore, the MPU 114 includes a command decoder 114A and a register 114B. Various kinds of control data is stored on the register based on a command decoded by the command decoder 114A, and the respective components in the gyro sensor IC 14 are controlled based on the control data. The SPI 115 includes a chip select terminal CS connected to the processing unit 100, a data-in terminal DI, a data-out terminal DO, a clock terminal CLK, and an interruption terminal INT. To the MPU 114, a request command is input from the posture updating unit 124 of the processing unit 100 via the SPI 115. The request command is a command for requesting an output of a variation in posture from the posture variation calculating unit 113 at the second frequency f2 as an output frequency. The request decoded by the command decoder 114A is provided to the posture variation calculating unit 113 via the register 114B, and the variation in posture is output. An interruption output may be output from the interruption terminal INT to the processing unit 100 at the cycle of the second frequency f2, and a command (request signal) for requesting an output of the variation in posture may be issued at the time of occurrence of the interruption.
As control values set in the register 114B by a writing (W) command decoded by the command decoder 114A, it is possible to exemplify an approximation function order, a bias updating timing, an angular velocity conversion (LSB→rad/s) coefficient, a DRDY output timing, posture calculation start/stop, and a bias estimated value writing. In addition, it is possible to read a result of computing the variation in posture in accordance with a reading (R) command decoded by the command decoder 114A. The posture variation computation start/stop timing can be made to coincide with the second cycle τ2 (τ2=1/f2) of the second frequency f2.
As control values set in the register 114B by a writing (W) command decoded by the command decoder 114A, it is possible to exemplify an approximation function order SelApp, a bias updating timing, an angular velocity conversion (quantization unit LSB→rad/s) coefficient, an INT output timing, posture variation computing start/stop, and a bias estimated value writing. In addition, it is possible to read a result of computing the variation in posture in accordance with a reading (R) command decoded by the command decoder 114A. The posture variation computation start/stop timing can be made to coincide with the second cycle τ2 (=1/f2) of the second frequency f2.
Here, an example of the computation at the posture variation calculating unit 113, the posture updating unit 124, and the coordinate conversion unit 125 will be represented as the following Equation (1).
C
b
e(t+τ2)=Cbe(t)Cchange−ΩieeCbe(t)τ2 (1)
In this specification, a coordinate transformation matrix will be represented by a capital “C”. In each coordinate transformation matrix, a subscript represents a coordinate system before the coordinate conversion, and a superscript represents a coordinate system after the coordinate conversion. For example, “Cbe” represents a coordinate transformation matrix obtained by coordinate conversion from the local coordinate system (B frame) to the absolute coordinate system (E frame).
The left side of Equation (1) represents a posture at a time t+τ2, c(t) represents a rotation matrix of a posture at a time t. Cchange represents a variation in posture during a period from the time t to the time t+τ2. A minus item in the right side of Equation (1) represents an influence of the rotation of the earth. The influence of the rotation of the earth may be omitted.
Cchange in Equation (1) can be represented by the following Equation (2).
C
change=exp(αibb(t+τ1)exp([αibb(t+2τ1)]×) . . . exp([αibb(t+kτ1)]×) (2)
In Equation (2), τ1=1/f1, and k is an integer which satisfies (f1/f2)−1<k≦f1/f2. In this specification, d-th power of e=2.781 . . . of a natural logarithm will be represented as “exp(d)” (d is an arbitrary numerical value, a matrix, an equation, or the like). In this specification, exp([α(t+nτ1)]×) will be referred to as a coordinate transformation matrix. Equation (2) means that a variation in the posture for every second cycle τ2 is calculated by multiplying a total of k coordinate transformation matrixes calculated at an interval of the first cycle τ1 during the period of the second cycle τ2.
α(t+nτ1) in Equation (2) is a matrix obtained from the angular velocity, and the following Equation (3) is established. Here, n is an integer which satisfies 1≦n≦k.
αibb(t+nτ1)=ωibb(t+nτ1) (3)
The right side of Equation (3) is a rotation angle between the I frame and the B frame at a time (t+nτ1), which is expressed in the B frame, and corresponds to an angular velocity obtained by the detection value of the gyro sensor 13. Therefore, the matrix ([α(t+nτ1)])×) in the right side of Equation (2) is a matrix which can be obtained from the angular velocity, and the following Equations (4-1) and (4-2) are obtained.
As shown by Equation (4-2), the respective elements in the right side of Equation (4-1) are values obtained by multiplying values obtained by correcting the values of the respective axis, which are detected by the gyro sensor at the time (t+nτ1), by using the gyro bias by the first cycle τ1.
Here, it is possible to use first to third-order approximation shown by the following Equations (5) to (7) for the computation of exp(α).
By the exp(α) computation unit 137, the approximation computation in any of Equations (5) to (7) is selected with a control signal SelApp set in the register (not shown) based on the writing command of the command decoder 114A shown in
Initialization of the C register 153, α matrix computation, and a computation operation based on a first-order approximation represented by Equation (5) from among the operations of the posture variation calculating unit 113 shown in
In Step 3 in
Next, ST6 in
The posture variation calculating operation shown in
The velocity/position calculating unit 126 in
Next, the acceleration obtained by Equation (8) and the velocity obtained in the past are used to compute the following Equation (9), and a velocity in the E frame is obtained. vebe(t) represents, in the E frame, a speed in the B frame with respect to the E frame at the time t. In the third and fourth items in the right side of Equation (9), the influences of the force of gravity and the rotation of the earth are taken into consideration.
v
eb
e(t+τ1)=vebe(t)+[fibe(t+τi)+gbe−2Ωieevebe(t)]τi (9)
Next, an average value of the current velocity obtained by Equation (9) and the velocity obtained in the past, and a position obtained last time are used to compute the following Equation (10), and the position in the E frame is obtained.
Here, in the case where the processing unit 100 shown in
As a comparison example for a method of reducing the burden on the processing unit 100, averaging will be described. As in the following Equation (11), angular velocities of a plurality of data items (plurality of cycles) are added up without being multiplied. This will be referred to as averaging. As represented by Equation (11), angular velocities during a predetermined period (from τ3 to nτ3) are added instead of calculating one coordinate transformation matrix for each first cycle τ1, and the obtained matrix is used to calculate a coordinate transformation matrix. Since angular velocities for n=five cycles are averaged in the comparative example, the computation after the calculation of exp (α) is performed at f=100 Hz, and the calculation burden can be reduced. In Equation (11), τ3 represents a third cycle and satisfies τ3=1/f.
C
b
e(t+nτ3)=Cbe(t)exp([αibb(t+τ3)+αibb(t+2τ3)+ . . . +αibb(t+5τ3)]×) (11)
The averaging in Equation (11) can be preferably used without causing a large error in a case where a vehicle or the like whose variation in angular velocity for a short time is relatively small is the moving object. However, in the case of the moving object which performs walking motion as in the embodiment, the variation in angular velocity is relatively large, and therefore, it was found that a large error was generated in the averaging and that accuracy of the posture calculation was insufficient.
In the embodiment employed in
It is a matter of course that embodiments to which the invention can be applied are not limited to the above first to third embodiments and various modifications can be appropriately made without departing from the gist of the invention. Hereinafter, a description will be given of modification examples. In addition, the same reference numerals will be given to the same configuration as those in the above embodiments, and repeated descriptions will be omitted.
In addition, since the posture updating unit 124 is also implemented as hardware, it is possible to set the second frequency f2 to satisfy f2=1 kHz, which is significantly higher than the second frequency f2=20 Hz in the aforementioned embodiments, and to update the posture with high accuracy.
Although the example in which the position calculating apparatus 1 including the function of the posture calculating apparatus was described in the aforementioned embodiments, the posture calculating apparatus may be configured as an independent apparatus. For example, it is possible to configure the posture calculating apparatus as a device including the gyro sensor 13, the gyro sensor IC 14, and the posture updating unit 124.
Although the example in which the posture variation calculating unit 113 was implemented as hardware was described in the aforementioned embodiment, the posture variation calculating unit 113 can be configured as software. In such a case, the posture variation calculating unit 113 may be configured as a part of the processing unit 100.
Although the example in which the position calculating apparatus 1 was provided with the GPS unit 15 was described in the aforementioned embodiments, the GPS unit may be omitted.
Although the example in which the moving object was a human was described in the aforementioned embodiments, the moving object is not limited to a human. In a case where an error of a posture or a position calculated by applying averaging is not allowable, it is possible to achieve an effect by applying the invention. For example, the living object may be an animal other than a human. The motion of the moving object is not limited to walking and running and may be jumping, swimming, sliding, flying, or the like. Examples of the moving object which moves by using energy of a living object as a power source include skate boards, skate shoes, a bicycle, a hang glider, a boat, and a sleigh. The IMU 10 may be mounted on a living object or a moving object which moves by using the energy of the living object as a power source.
Those skilled in the art will easily understand that multiple modifications can be made without substantially departing from the new matters and effects of the invention. Therefore, all the modifications are included in the scope of the invention. For example, a term which is replaced with a different term with wider or similar meaning at least once in the specification or the drawing can be replaced with a different term at any location in the specifications or the drawings. In addition, the first and second coordinate systems are not limited to three-dimensional coordinate systems and may be two-dimensional coordinate systems.
The entire disclosure of Japanese Patent Application No. 2013-233372, filed Nov. 11, 2013 is expressly incorporated by reference herein.
Number | Date | Country | Kind |
---|---|---|---|
2013-233372 | Nov 2013 | JP | national |