Field
The present invention relates to a digital circuitry for performing calculations for an inclinometer device. The present invention further relates to a method for performing calculations for an inclinometer device.
Description of the Related Art
An accelerometer is a device that measures proper acceleration, a.k.a the g-force. Proper acceleration is the physical acceleration experienced by an object, and it is measured relative to an inertial observer (an inertial frame), who is momentarily at rest relative to the object being measured. For example, an accelerometer at rest relative to Earth's surface will indicate about 1 g acceleration upwards. In order to obtain the acceleration due to motion with respect to the Earth, gravity offset shall be subtracted from the readings, and corrections are needed for effects caused by the Earth's rotation relative to the inertial frame. A multi-axis accelerometer detects magnitude and direction of the proper acceleration as a vector quantity, and it may be used to sense for example orientation, coordinate acceleration, vibration, shock and falling in a resistive medium.
FIG. 1 illustrates basic concept of an accelerometer, which may be explained with a damped proof mass M anchored to a fixed frame with a spring K. Damper D reduces or restricts oscillation of the system. When the accelerometer experiences acceleration, the proof mass M is displaced until the spring causes an opposite force on the proof mass large enough that the proof mass starts moving at the same rate as the accelerometer device. The displacement is then measured to give the acceleration. External acceleration of this kind of a system may be described with the equation:
      H    ⁡          (      s      )        =                    x        ⁡                  (          s          )                            a        ⁡                  (          s          )                      =          1                        s          2                +                              D            M                    ⁢          s                +                  K          M                    where a is the external acceleration, x is the proof mass displacement, M is the mass of the proof mass, D is the damping factor of the damper and K is the spring constant. H represents sensitivity of the accelerometer, i.e. the amount of displacement x caused by given amount of acceleration a.
FIG. 2 illustrates a one dimensional example of a simple microelectromechanical (MEMS) accelerometer. It may be presented with a simple structure comprising a cantilever beam (102) acting as a spring and a proof mass (101). The beam (102) and the proof mass (101) are placed in an enclosure (103) which may further contain damping gas. Under influence of external acceleration, the proof mass (101) deflects from its neutral position. This deflection is then measured electrically. Measurement of the deflection may be capacitive, based for example on change of capacitance between at least one fixed electrode and at least one electrode attached to the moving proof mass (101). As known by a person familiar with the art, capacitance between two electrodes will change if the distance or the overlapping area between the two electrodes changes. In FIG. 2, we may see an example with two pairs of capacitive electrodes (105) for detecting the deflection of the proof mass (101). Alternatively, piezoelectric detection may be implemented in the spring(s) (102) attached to the proof mass (101), detecting deformation of the spring(s) (102). Damping may be arranged for the accelerometer proof mass by placing the proof mass (101) inside a chamber (103) within the accelerometer device that contains damping gas.
An inclinometer is an instrument for measuring angles of slope, elevation or depression of an object with respect to gravity. An accelerometer, such as a MEMS accelerometer, may be used as a sensor for an inclinometer, when suitable calculation is provided for converting the detected acceleration values into angle values. The axes of measurement of an inclinometer are typically, but not necessarily, orthogonal.
A tilt sensor or a tilt meter is an instrument measuring tilt, often with respect to a plane defined by two axes. A typical tiltmeter is designed for measuring changes from the vertical level. Full motion tilt sensor may use at least three axes. An accelerometer capable of measuring acceleration may be used as a sensor for a tiltmeter, when suitable calculation is provided for converting the detected acceleration values into resultant vector angle values. An accelerometer may measure tilt with respect to one, two or three axes. The axes of measurement of a tiltmeter are typically, but not necessarily, orthogonal.
We will use single term inclinometer for any device capable of measuring inclination or tilt.
CORDIC (Coordinate Rotation Digital Computer) is a technique developed and originally published in 1959. The computing technique was designed to be implemented on real-time navigational systems where trigonometric computing relationships were to be calculated quickly and efficiently, using only simple bit shifting and summing operations. Bit shifting operation means that the most significant bit(s) (MSB(s)) retain(s) its value, while the values of the other bits are shifted for a defined amount either towards the least significant bit(s) (LSB(s)) or towards the most significant bit(s) (MSB(s)), depending on the calculation operation to be performed, as known by a person familiar with the art. In a bit rotation operation, the most significant bit(s) become replaced by the least significant bit(s). CORDIC calculation is one possible method for calculating inclinometer or tilt meter angle information out of an accelerometer device. Since its inception, the CORDIC algorithm has been further developed for calculation of for instance Discrete Fourier Transforms, exponential, logarithmic functions and forward and inverse circular and hyperbolic functions, ratios and square roots. A benefit of CORDIC is that the operations can be implemented with bit shift operations only, without division or multiplication, which would require more calculation resources. Thus, CORDIC solutions are effective even in modern Application Specific Integrated Circuit (ASIC) implementations, enabling effective calculation with fairly simple circuitry and small chip area, without need for an expensive processor device for the calculation task. Alternatively, a CORDIC unit may be implemented with a Field Programmable Gate Array (FPGA), for instance. While a CORDIC unit implementation is lightweight and small in size, it is well applicable for real-time calculation for instance in MEMS inclinometers, tiltmeters and/or tilt sensors, but also in various wireless applications.
FIG. 3 illustrates calculation of arctangent function, which is a traditional use of the CORDIC method. This can be illustrated as rotating a position vector in a two dimensional plane. The position vector, also called as the location vector or as the radius vector, always starts from the defined origin, and the end of the position vector, simply called as the position, pointing a position within the plane, moves within the set plane. CORDIC method is based on rotating the position vector in a set plane, as here in the exemplary xy-plane towards the positive x-axis. The step of rotation is made smaller each time, so that the result is approaching the wanted value. The amount of rotation has been selected so that next position in the xy-plane may be calculated by using complex multiplication operation on the previous position, without using actual multiplication operation:xi+1=xi±2−i·yi yi+1=yi∓2−i·xi θ1+1=θi±θi_ROM 
With each iteration round (i=0, 1, 2 . . . ) the value of x approaches value KC√{square root over (x2+y2)} and resultant angle θ approaches value arctan(x/y). As shown by the equation, the resultant angle θ is received from the sum of the values of the elementary angles of each iteration round (θ=Σi=0nθi_ROM). The elementary angle value (θi_ROM) to be summed at each iteration to the current intermediate resultant angle (θi), corresponding to the current sum of previous elementary angle values (θi_ROM), is received from a value table. The direction of the next turn, and thus then the sign used for summing (i.e. adding or subtracting) the next elementary angle value (θi_ROM) is decided based on the sign of the previous position. When a vector coordinate system, as in the examples that will be described below, using (x,y)-coordinates is applied, the decision is made based on the sign of y-coordinate: if previous position is below the positive x-axis (y value is negative), the next turn will be upwards and the next elementary angle value (θi_ROM) will be added (+), and if previous position is above the positive x-axis (y value is positive), the next turn will be downwards, the sign will be negative and the next elementary angle value (θi_ROM) will be subtracted (−). Alternatively, rotation mode may be used, using axis angle coordinates (r,θ), the decision is made based on the sign of the current resultant angle (θi): when the current intermediate resultant angle (θi) is negative, next elementary angle (θi_ROM) will be added, and if the current intermediate resultant angle (θi) is positive, next elementary angle (θi_ROM) will be subtracted. The more iteration rounds are performed, the more accurate the result will be, since the size of the elementary angles (θi_ROM) get smaller at each iteration. Rotating the position vector as described above will always increase the length of the resultant vector by multiplier
            K      c        =                            ∏                      i            =            0                    n                ⁢                  1                                    (                              1                +                                  2                                                            -                      2                                        ⁢                    i                                                              )                                          ≈      1.646        ,      n    ->    ∞  
This is not a problem, however, since all comparisons are made against zero y value, and only the sign of the current position vector in y-axis direction (y value) matters in comparisons.
FIG. 4 illustrates traditional calculation of arcsine function with CORDIC method. A common way to solve arcsine with CORDIC is to start turning the position vector from the positive x-axis, and to set the target level as a line aligned with the x-axis, which corresponds to a set y value. Decision on direction of next rotation and thus the sign of the next summing operation (adding or subtracting) is made based on comparing the y-coordinate of the result position vector end point with this target level value. The length of the position vector however grows as described in connection with arctangent function. This causes errors in the traditional arcsine calculation due to false decisions made for the direction of the following rotations. This is a well-known problem and one common method to avoid this is a so called double iteration and shifting of the set target level on each rotation. Another known method to solve this problem is scaling the position vector length on each rotation; this requires, however, a multiplication operation, which consumes calculation resources. Both double iteration and target level shifting and scaling the position vector length require adding ports and thus increasing the physical size of the CORDIC unit, increase the time required for calculation and still cause error in the result.
US patent publication US20120109574 presents a Multi-Dimensional Vector Determining Circuit comprising a sensor device and a CORDIC circuit. This sensor device refers to traditional methods for calculating arctangent function with CORDIC as described in U.S. Pat. Nos. 6,385,632 and 7,606,852, and the application remains silent about known problems causing errors in CORDIC calculations. None of these documents discusses the problem of errors occurring in known methods of arcsine calculation.
A solution is needed which is capable of producing reliable high accuracy CORDIC calculation results for inclinometer or angle calculation use without significantly increasing the size of the CORDIC unit circuitry.
USPTO Backgrounds
USPTO Backgrounds