This disclosure generally relates to inertial sensors and more specifically to deriving a synthetic signal for one or more sensitive axes from other sensor information.
The development of microelectromechanical systems (MEMS) has enabled the incorporation of a wide variety of sensors into mobile devices, such as cell phones, laptops, tablets, gaming devices and other portable, electronic devices Non-limiting examples of such sensors include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, a microphone, a proximity sensor, an ambient light sensor, an infrared sensor, and the like Further, sensor fusion processing may be performed to combine the data from a plurality of sensors to provide an improved characterization of the device's motion or orientation.
Inertial sensors in general have multiple axes that measure the motion of the sensors in several directions. For example, 3-axis accelerometers or 3-axis gyroscopes have 3 orthogonal axes One or more of these axes may become, temporarily or permanently, defective during the lifetime of the sensors For example, one of the axes of a 3-axis accelerometer may malfunction, get stuck or have some other degradation that keeps the sensor from providing correct outputs The problem may be due to a production error or may occur during the lifetime of the device, for example because of an external event such as a substantial shock. If an axis is defective in production, this may be detected before incorporating the sensor in its intended device, such as e g a smartphone. However, an axis may become defective after production, where the root causes may still be due to some production error or problem. The problem with the axis may be permanent, or may be temporary For example, for an accelerometer an axis gets stuck due to a first shock, and a second shock may get the axis ‘unstuck’ An axis can get stuck and unstuck at various times during the lifetime of the accelerometer A stuck or malfunctioning axis will result in the accelerometer signal being absent, constant, or unusually high for extended periods. In these cases, the output of the accelerometer for that axis becomes unusable
When a signal for one of the axis of a sensor is unusable or unavailable, the sensor may be unable to function as designed and operations depending on information from this sensor may be compromised. In some scenarios, output from the sensor may be used directly by an application which may result in a degradation of performance of that application when the signal for a sensor axis is not provided or is defective. Further, many sensor operations are interrelated For example, sensor fusion techniques may be used to leverage data from multiple types of sensors to estimate an orientation of a portable device or make other determinations regarding the motion of the portable device. When one sensor is not providing an expected output for an axis, any sensor fusion algorithm that uses this information may no longer function properly In turn, any function or application of the device that relies on the sensor fusion result may also no longer function properly
In light of the above, one of ordinary skill in the art will appreciate the desirability of providing a synthetic signal for an axis of a sensor that is not functioning properly Further, it may be desirable to provide a substitute signal that is based at least in part on the synthetic signal for a sensor axis Still further, it may be desirable to provide the synthetic signal by combining data from another axis or other axes of the sensor with the output of another sensor To address these needs and others, this disclosure is directed to techniques for providing a synthetic sensor signal as described in the materials below.
As will be described in detail below, this disclosure includes a method for providing sensor data for a portable device A first sensor may be provided, wherein the first sensor is integrated with the portable device and has multiple axes of measurement At least a second sensor may be provided, wherein the second sensor is also integrated with the portable device and also has multiple axes of measurement Data from the first sensor and the second sensor may be combined to generate a synthetic signal for a first axis of the first sensor.
This disclosure also includes a portable device having a first sensor integrated with the portable device with multiple axes of measurement, a second sensor integrated with the portable device with multiple axes of measurement and a sensor signal generator that may combine data from the first sensor and the second sensor to generate a synthetic signal for an axis of the first sensor.
Still further, this disclosure includes a sensor processing unit that may include a first sensor integrated with the sensor processing unit having multiple axes of measurement, a sensor processor configured to combine data from the first sensor and data from a second sensor having multiple axes of measurement to generate a synthetic signal for a first axis of the first sensor.
At the outset, it is to be understood that this disclosure is not limited to particularly exemplified materials, architectures, routines, methods or structures as such may vary Thus, although a number of such options, similar or equivalent to those described herein, can be used in the practice or embodiments of this disclosure, the preferred materials and methods are described herein.
It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments of this disclosure only and is not intended to be limiting
The detailed description set forth below in connection with the appended drawings is intended as a description of exemplary embodiments of the present disclosure and is not intended to represent the only exemplary embodiments in which the present disclosure can be practiced The term “exemplary” used throughout this description means “serving as an example, instance, or illustration,” and should not necessarily be construed as preferred or advantageous over other exemplary embodiments The detailed description includes specific details for the purpose of providing a thorough understanding of the exemplary embodiments of the specification. It will be apparent to those skilled in the art that the exemplary embodiments of the specification may be practiced without these specific details. In some instances, well known structures and devices are shown in block diagram form in order to avoid obscuring the novelty of the exemplary embodiments presented herein.
For purposes of convenience and clarity only, directional terms, such as top, bottom, left, right, up, down, over, above, below, beneath, rear, back, and front, may be used with respect to the accompanying drawings or chip embodiments. These and similar directional terms should not be construed to limit the scope of the disclosure in any manner
In this specification and in the claims, it will be understood that when an element is referred to as being “connected to” or “coupled to” another element, it can be directly connected or coupled to the other element or intervening elements may be present. In contrast, when an element is referred to as being “directly connected to” or “directly coupled to” another element, there are no intervening elements present.
Some portions of the detailed descriptions which follow are presented in terms of procedures, logic blocks, processing and other symbolic representations of operations on data bits within a computer memory. These descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art In the present application, a procedure, logic block, process, or the like, is conceived to be a self-consistent sequence of steps or instructions leading to a desired result. The steps are those requiring physical manipulations of physical quantities Usually, although not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated in a computer system.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present application, discussions utilizing the terms such as “accessing,” “receiving,” “sending,” “using,” “selecting,” “determining.” “normalizing,” “multiplying,” “averaging,” “monitoring,” “comparing,” “applying,” “updating,” “measuring,” “deriving” or the like, refer to the actions and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
Embodiments described herein may be discussed in the general context of processor-executable instructions residing on some form of non-transitory processor-readable medium, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or distributed as desired in various embodiments
In the figures, a single block may be described as performing a function or functions; however, in actual practice, the function or functions performed by that block may be per formed in a single component or across multiple components, and/or may be per formed using hardware, using software, or using a combination of hardware and software To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure. Also, the exemplary wireless communications devices may include components other than those shown, including well-known components such as a processor, memory and the like.
The techniques described herein may be implemented in hardware, software, firmware, or any combination thereof, unless specifically described as being implemented in a specific manner Δny features described as modules or components may also be implemented together in an integrated logic device or separately as discrete but interoperable logic devices. If implemented in software, the techniques may be realized at least in part by a non-transitory processor-readable storage medium comprising instructions that, when executed, performs one or more of the methods described above. The non-transitory processor-readable data storage medium may form part of a computer program product, which may include packaging materials.
The non-transitory processor-readable storage medium may comprise random access memory (RAM) such as synchronous dynamic random access memory (SDRAM), read only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), FLASH memory, other known storage media, and the like. The techniques additionally, or alternatively, may be realized at least in part by a processor-readable communication medium that carries or communicates code in the form of instructions or data structures and that can be accessed, read, and/or executed by a computer or other processor For example, a carrier wave may be employed to carry computer-readable electronic data such as those used in transmitting and receiving electronic mail or in accessing a network such as the Internet or a local area network (LAN) Of course, many modifications may be made to this configuration without departing from the scope or spirit of the claimed subject matter
The various illustrative logical blocks, modules, circuits and instructions described in connection with the embodiments disclosed herein may be executed by one or more processors, such as one or more sensor processing units (SPUs), digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), application specific instruction set processors (ASIPs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuitry The term “processor,” as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated software modules or hardware modules configured as described herein Also, the techniques could be fully implemented in one or more circuits or logic elements. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor; controller, microcontroller, or state machine A processor may also be implemented as a combination of computing devices, e g., a combination of a Motion Processor Unit (MPU) or Sensor Processing Unit (SPU) and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with an MPU/SPU core, or any other such configuration
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one having ordinary skill in the art to which the disclosure pertains.
Finally, as used in this specification and the appended claims, the singular forms “a, “an” and “the” include plural referents unless the content clearly dictates otherwise.
As noted, the techniques of this disclosure may include providing a first sensor integrated with a portable device having multiple axes of measurement, providing at least a second sensor integrated with the portable device having multiple axes of measurement and combining data from the first sensor and the second sensor to generate a synthetic signal for a first axis of the first sensor Generation of the synthetic sensor signal for a given sensor axis may be based on a combination of information from another axis or other axes of the sensor together with information from one or more axes of an additional sensor. For example, the synthetic signal for a defective accelerometer axis may be based on the evolving attitude of the device derived from sensor fusion using the remaining correctly functioning accelerometer axes and the gyroscope axes
In some embodiments, the synthetic sensor signal may be used to produce a substitute signal for the axis of the sensor. For example, providing a substitute signal may include replacing the signal for the axis. As another illustration, the signal being output for the axis may be corrected using the synthetic signal. These techniques may be employed when one axis of a sensor temporarily or permanently malfunctions. A suitable method may include detecting when an axis of a sensor, such as an accelerometer, is malfunctioning or defective If a malfunctioning axis is detected, a synthetic sensor signal may be generated and used for that axis. The synthetic signal may also be combined with the actual signal of the other remaining sensor axes that are functioning properly to obtain a composed and complete sensor signal that may be used in the same manner as a nominal sensor signal. The composed sensor signal including the synthetic signal information may then be used as normal. For example, if the sensor with a defective axis is an accelerometer, the recomposed 3-axes accelerometer signal may than be further used in a 6-axis fusion with the gyroscope or magnetometer signals, or in a 9-axis fusion using both the gyroscope and magnetometer signals
In the description that follows, the generation of the synthetic signal for a defective accelerometer axis using the gyroscope will be discussed first, and other examples will be discussed thereafter.
One approach for determining the orientation of a portable device with respect to an external flame of reference may involve combining information from multiple types of sensor using a sensor fusion algorithm. An example of a suitable architecture for implementing sensor fusion is schematically represented in
Quaternions may be used to express the orientation or attitude of the device The quaternion qk represents the orientation of the device for the kth sample of sensor data with respect to a stationary frame of reference, such as the world frame Although quaternions in principle express rotations, a quaternion may also be used to express an orientation because the quaternion expresses the rotation required to rotate the axes of the body frame of the device to align with the axes of the world frame or other reference frame Quaternions are only used as an example, and the methods proposed may also be performed using, for example, rotation matrices, Euler angles or any other way to express orientations.
The orientation resulting from the gyroscope integration output in block 100 is expressed as q3
As mentioned above, the gyroscope integration yields a change in orientation with respect to a previous orientation. In order to determine q3
The result of the 6-axis fusion may also be combined with magnetometer measurement h in block 108 to obtain a reference with respect to the earth's magnetic field. The resulting orientation of this 9-axis fusion as output by block 110 is referred to as q9
As illustrated, the 6-axis fusion of block 102 is based on a combination of the accelerometer and gyroscope signals The raw accelerometer signals araw are first calibrated in block 112 and the calibrated accelerometer signals ac are then used as an input for the 6-axis fusion in block 102. The accelerometer calibration may consist of any offset, gain, temperature, or drift correction In addition, any conversion or correction may be made to convert the accelerometer signals to the reference frame of the device, further referred to as the body frame. The calibrated accelerometer signals ac therefore represent the acceleration signals for the 3-orthogonal axis of the body frame of the device.
The gyroscope signals are converted to the calibrated angular velocity signals wc. A similar calibration process as for the accelerometer may be required to convert the raw gyroscope signals into the calibrated angular velocity signals wc. Next, the angular velocity wc are integrated to determine a change in orientation with respect to the previous orientation
In one example of the 6-axis fusion, the orientation of the device as determined based on the gyroscope q3 is corrected using the accelerometer signal ac In the absence of proper acceleration of the device, and assuming no error on the accelerometer measurements, the accelerometer measures only gravity. Correspondingly, if the orientation is given by quaternion q, the rotation of ac expressed as [0, ax, ay, az]T from the body frame to the world frame using quaternion q yields the gravity vector G expressed as [0, 0, 0, 1]T according to Equation (1):
As will be appreciated, this indicates the acceleration acw in the world frame may be obtained after conversion of ac, from the body frame to the world frame using the determined orientation q3 based on the gyroscope, as shown by Equation (2):
Assuming no error on ac, the acceleration in the world frame acw equals gravity if the quaternion q3 has been determined correctly. Therefore, the comparison of acw with the gravity vector yields information if the orientation quaternion q3 has been correctly determined. The quaternion q3 may be corrected based on this comparison. For example, if the discrepancy is too big, the quaternion q3 may be corrected so as to make acw equal to gravity. In other words, the corrected q3 when applied to Equation (2) should results in acw equal to gravity Alternatively, a quaternion correction rotation may be applied to q3 that decreases the difference between acw and gravity
In one example, the correction in the sensor fusion may be based on the accelerations orthogonal to gravity, in this case axw and ayw. The orientation quaternion based on the previous quaternion q6
Filtering may be applied to the acceleration ac to minimize any influence of proper acceleration of the device imparted on the device by the user. The filter may e.g. be a low pass filter. Alternatively, the comparison based on equation (2) may only be performed when no proper acceleration, and therefore only gravity, is detected.
The above example and equations demonstrate that 6-axis fusion may require three axes of accelerometer output in order to perform a comparison with the gravity vector. Correspondingly, if one of the accelerometer axes is defective or missing, 6-axis fusion according to this architecture cannot function properly. Therefore the accelerometer signal for the defective axis may be replaced or corrected with a synthetic accelerometer signal according to the techniques of this disclosure.
To help illustrate one embodiment for generating a synthetic sensor signal,
The use of a synthetic sensor signal in a sensor fusion architecture corresponding to that described with respect to
The defective axis detection block may also keep track of when the axis started malfunctioning. For example, a time stamp may be taken at the first time a defective axis is detected. The time stamp may be logged, e.g in an available memory. The block may also have a counter that counts the amount of samples since the first detection of the defective axis. A counter of zero may indicate that no malfunction has taken place. The detection block may also indicate if the malfunction started in the middle of an operation, or if the axis was malfunctioning since the device startup.
As such, the output of the malfunction detection block may be used to indicate if an axis is defective, and if this is the case, which axis is malfunctioning. In one embodiment, an output of 0 may be used to indicate no malfunction has been detected (all axis are functioning according to specification) and an output of 1 may be used to indicate a defective axis has been detected. Accordingly, a second output may be used to indicate which axis is defective: x, y, or z, or with a corresponding nonzero integer. The outputs may be combined: 0 for no malfunction, and x, y, or z for the malfunctioning axis if there is one. In the embodiment shown, the index of the defective axis is indicated as i.
When a malfunctioning axis is detected in block 300, the axis may be further monitored to determine whether or not the problem disappears and the axis functions correctly again Upon detection of resumed proper operation, block 300 may indicate that generation of the synthetic signal may cease as no longer being required The actual sensor signals at the start of the proper operation may be compared to the synthetic signals to obtain feedback on the accuracy of the generation of the synthetic signal This feedback may be used to adjust the parameters of future periods of synthetic signal generation in order to improve performance If desired, all detected defective or properly functioning instances and time stamps may be logged for future analysis Detection block 300 may also be programmed to store sensor signals before and or after a change in behavior to help with the analysis.
The operations performed according to
Further details regarding exemplary techniques for generating a synthetic acceleration signal are schematically depicted in
Subject to the above discussions regarding the assumption that measured acceleration equals gravity, the synthetic acceleration value may be determined using the values of the other axis. In the description that follows, the l-axis is the defective or missing axis, and the m-axis and the n-axis are the correctly functioning axes in a 3-axis embodiment. Unless other wise specified, the acceleration signals are with respect to the body frame. The synthetic acceleration on the l-axis al can be derived based on measurements of am and an according to Equation (3):
a
l=±√{square root over (1−(am2+an2))} (3)
Correspondingly, the amplitude of al may be expressed as Equation (4):
|al|=√{square root over (1−(am2+an2))} (4)
As reflected by the absolute value function, Equation (4) does not resolve the sign of the synthetic acceleration, and provides two candidate solutions for the synthetic acceleration: al+ and al− corresponding to 402 of the routine shown in
Further details regarding the selection between candidate synthetic acceleration signals are schematically shown in
a
+
=[+a
l
,a
m
,a
n
]; a
−
=[−a
l
,a
m
,a
n] (5)
In 504 and 506, the two synthetic acceleration candidates a+ and a− are converted into quaternions q0+ and q0−, respectively. These quaternions are then used in 508 and 510 as the reference/initialization quaternions for sensor fusion paths representing the two candidates.
As shown in
Further details regarding the sensor fusion of the three axes of the gyroscope and the two correct axes of the accelerometer are described in the context of the exemplary routine schematically depicted in
When a synthetic sensor signal is desired, such as upon detection of a malfunctioning axis as indicated by 702, the acceleration signal for the defective axis with index i may be generated in 704 by the corresponding acceleration in the body frame according to Equation (7):
ã
raw
[i]=â
b
[i] (7)
The synthetic acceleration ãraw[i] is then combined with the acceleration signals of the other axes to obtain the composed acceleration signal
As noted above, selection criteria may be defined to determine which of the two candidate synthetic accelerations should be selected Of the two candidates, one will have the correct sign, and one will have an incorrect sign By inference, the candidate with the correct sign may be expected to yield the correct initial quaternion (q0+ or q0−) that results in relatively less error in the sensor fusion between the predicted acceleration signals and the measured acceleration signals, allowing for selection of the Correct candidate.
One representative routine for comparing errors to select the appropriate candidate is schematically shown in
where
is the vector for the measured accelerometer signals for the non-defective axes, and
are the accelerometer values for the non-defective axes predicted by rotating the gravity vector to the body flame using quaternions qi+ and qi−, respectively (as shown in Equation (6)) The quaternions qi+ and qi− represent the result of the sensor fusion cycles for the different paths The error norms e+ and e− may be filtered over multiple samples if desired, for example using a low pass filter, as indicated by 804.
In this example the L2 norm was used on the non-defective axes to express the error between the measurements and predictions However, any other norm may be used to define the error. Also, the error may be calculated including the defective axis. In another example, the error may also be expressed as an angle between the measured acceleration vector and the predicted acceleration vector Quaternions may be used to compare the measured and predicted orientation, and the error may be expressed as the angle between the quaternions, for example using a dot product method. The error may be calculated in the body frame, the world/inertial frame, or any other frame of reference.
Selection between the synthetic acceleration signal candidates may be based on the sensor fusion using the gyroscope as noted Correspondingly, a certain degree of movement or rotation of the portable device may facilitate differentiation between the two candidate paths. It may therefore be desirable to perform candidate selection when predefined motion criteria exist. For example, a motion threshold may be employed and the selection may be performed when exceeded, such as by performing one of the techniques explained above.
In this embodiment, the angle θ may be used to express the rotation angle between the initialization and the current sample A threshold angle θth may be used to define the minimum required motion or rotation as indicated by 810. When the threshold is not exceed, the routine may return to 800 for reinitialization. As an illustration, the threshold angle θth may be 10 degrees although other values may be used as desired. Correspondingly, when the angle θ is larger than the threshold angle θth, the selection process of the candidate paths may be started, proceeding to 814. The angles may be defined for both candidate paths as θ+ and θ−. The selection process may be started if one, or both angles θ+ and θ− are above the threshold angle θth.
The rotation angles may be obtained using all axes. However, this may cause problems when rotating over the defective axis and this defective axis is aligned with gravity. In this case a rotation is measured, but the non-defective axes do not measure any change in signal. The overcome this problem, the angles θ+ and θ− may be measured as the rotation in the plane of the non-defective axes. This may be accomplished by projecting the orientations to the plane of the non-defective axes and properly normalizing the resulting quaternions for both candidate paths This approach ensures that the measured rotation leads to a change in acceleration on the non-defective axes.
The rotation calculations may be based on the sensor fusion quaternions, but may also be based on the gyroscope integration on all axes or only the non-defective axes.
If quaternions are used, the angle between the initial quaternion and the quaternion at sample k may be determined using the dot product of the two quaternions, which represents the cosine of the ½ angle of the rotation. In this case, the comparison of the angle with the thresholds may also be expressed using the cosine, e.g. cos ½θ+>cos θth.
Other methods, for example using rotation matrices or Euler angles may also be used to determine the amount of motion between the orientations before deciding which candidate path to pick. Any norm may be used to determine the differences between the two orientations.
Errors may now be determined for the candidate in 814, such as by the techniques described above, allowing for selection of the correct candidate. Once enough rotation has been detected with respect to the initial orientation, the error norms, for example as expressed in Equation (8) may be used to determine the correct candidate path. As noted above, the correct synthetic acceleration value will yield relatively less error as compared to the other candidate Therefore, the sign of the synthetic acceleration is positive (+1) if e+≦e−, and the sign of the synthetic acceleration is negative (−1) if e+>e− Following selection, any further operations may be performed using the selected candidate as indicated by 816.
In the exemplary embodiment above, the errors of the candidate paths were calculated, and at the same time the rotation angle since the initialization was monitored to decide when to choose the correct candidate, such as when movement of the portable device was above a threshold. In another embodiment, the rotation angle may be monitored after the initialization, and only when the rotation is above the threshold angle and a decision which candidate to choose can be made, then the errors of the different paths are calculated and the candidate with the smaller error may be chosen
If the difference between the errors e+ and e− is small, the selection process to choose between the synthetic acceleration candidates may be delayed and the system may keep analyzing samples until the difference becomes significant. In other words, a threshold value may be defined for the difference between e+ and e− and if the difference is below the thresholds the sensor fusion continues and the selection process may be delayed.
In one example, the variance of the acceleration may be determined. If the variance of the accelerometer signals is high, linear acceleration may be corrupting the process and therefore influence one or both errors e+ and e− This may lead to an erroneous selection In other words, a threshold value may be defined for the variance of the acceleration and if the variance is above the threshold the selection process may be delayed. In a similar fashion, if one or more accelerometer signals (other than the defective axis) reach a saturation value, the error computations e+ and e− are delayed in order to maintain the robustness in the numerical calculations. Similarly, when the magnitude of the accelerometer signals (other than the defective axis) reach a value that is above the gravitational acceleration, for example by 10%, the motion and proper acceleration of the device may be deemed to be too fast, and error computations e+ and e− are delayed. In yet another robustness check, the angle change for consecutive samples of the accelerometer vector for the non-defective axes is tested, using the dot-product operation that yields the cosine of the angle change between vectors. If the angle thus computed is larger than a pre-determined threshold, the motion is assumed to be too fast and the error computations e+ and e− are delayed in order to maintain the robustness in the numerical calculations. These checks make sure that the correct orientation is chosen by the algorithm even when the device experiences fast motions such as shaking, impact or shock during its operation.
During the time interval between the detection of the defective axis and the selection of the sign of the synthetic acceleration, the correct (sign) synthetic acceleration may be unknown To avoid having an undefined synthetic acceleration, preset preferences may be defined to determine the synthetic acceleration sign before the selection is done. For example,
The methods above explain the generation of several candidates for the synthetic sensor signal, and the selection process to select the best candidate. These methods may be used when a defective axis is detected when the device starts up and no previous orientation information is available. In addition, these methods may also be applied when the device is in operation, but the sensors are started, and so no sensor data was previously available.
Situations may occur where the sensor fusion is in operation and device orientations are generated for the sensor samples. For example, a quaternion q6
To help illustrate suitable sequences of operation in the event of a defective axis detection,
In cases where the detection of the defective axis is not instantaneous, the erroneous signal of the defective axis may cause the determined orientation by the sensor fusion to be erroneous, causing the routine to branch from 1002 to 1008. For example, if the accelerometer is stuck at a high value of e.g., 1 5 G for a significant time, the resulting incorrectly measured acceleration signal may cause errors in the sensor fusion with the gyroscope. The orientation quaternion q6
The above discussions and examples have been in the context of a defective accelerometer axis However, this disclosure also extends to other types of sensors The accelerometer is a sensor that measures a vector field, namely gravity. In the generation of the synthetic signal for the defective axis, the gravity vector is converted to the body frame using the quaternion result (as described with regard to
The techniques described above may be exemplified by a schematic flow diagram as shown in
The methods to generated synthetic signals may be applied to devices containing at least one sensor. As will be appreciated, the device may be implemented as a device or apparatus, such as a handheld device that can be moved in space by a user and its motion and/or orientation in space therefore sensed For example, such a handheld device may be a mobile phone (e.g., cellular phone, a phone running on a local network, or any other telephone handset), wired telephone (e.g., a phone attached by a wire), personal digital assistant (PDA), video game player, video game controller, navigation device, activity or fitness tracker device (e.g., bracelet or clip), smart watch, other wearable device, mobile internet device (MID), personal navigation device (PND), digital still camera, digital video camera, binoculars, telephoto lens, portable music, video, or media player, remote control, or other handheld device, or a combination of one or more of these devices
The principles explained above may be applied for malfunctioning axes of e.g. a 3 axes accelerometer. However, the same principles may also be applied if the sensor has only two axes by design A 2-axes design will costs less, consume less power, and will take less space In this case, the architecture will contain a 2-axes sensor, which may cause problems for some applications or programs expecting a 3-axes sensor signal. Therefore, using the methods outlined above, the two physical sensor axes are converted into a synthetic 3-axes sensor signal.
In a low-power embodiment of a 3-axes sensor, only two axes may be active at a given time, such as when one axis is temporarily inactive to conserve power, such as by being in a power save mode. The inactive axis may change in a cyclic manner, or may be multiplexed Having an individual axis inactive for a short time avoids creating a large error or deviation on the single inactive axis. The inactive axis may also be selected based on the movement of the device. For example, during certain movements or gestures, an axis with the smallest signal values may be switched to inactive When the movement changes and the synthetic value for the inactive axis grows, the axis may be activated again.
In one embodiment, the methods above may be used for a sensor self-test In this case, the synthetic signals for a certain axis may be determined, and compared to the actual measured value for that axis. This test may be performed e.g. to check if the sensor needs calibration. The test may be performed periodically, cycling the different axes. Alternatively, the test may be done after high or low values of the sensor, saturation of the sensor, or when the sensor has been functioning at its operational limit
In the sensor examples above, methods were discussed for synthetic axes for sensors measuring vector fields, such as e.g. the accelerometer and the magnetometer Based on the same principles, but with some accommodation of the algorithms, synthetic sensor signals may also be determined for other types of sensor as well To illustrate one exemplary embodiment,
The synthetic gyroscope signal may then be combined with the accelerometer and magnetometer signals in an AGM sensor fusion operation in 1206, resulting in an orientation qAGM The orientation based on the AM fusion and the AGM fusion may then be compared in 1208. In addition, the error eg observed between the estimation of the gyroscope signal and the actual gyroscope signal of the correctly functioning axes may be used as desired. Based on this comparison, the AM sensor fusion, or the estimation of the gyroscope signal based on the sensor fusion, may be adapted, such as in a manner analogous to the operation of e.g. a Kalman filter
Details regarding one embodiment of portable device 1300 including features of this disclosure are depicted as high level schematic blocks in
In some embodiments, device 1300 may be a self-contained device or may function in conjunction with another portable device or a non-portable device such as a desktop computer, electronic tabletop device, server computer, etc which can communicate with the device 1300, e.g., via network connections. The device may be capable of communicating via a wired connection using any type of wire-based communication protocol (e.g., serial transmissions, parallel transmissions, packet-based data communications), wireless connection (e.g., electromagnetic radiation, inflated radiation or other wireless technology), or a combination of one or more wired connections and one or more wireless connections.
As shown, device 1300 includes Motion Processing Unit (MPU), or more generally, Sensor Processing Unit (SPU) 1302, host processor 1304, host memory 1306, and may include one or more sensors, such as external sensor 1308. Host processor 1304 may be configured to perform the various computations and operations involved with the general function of device 1300. Host processor 1304 may be coupled to SPU 1.302 through bus 1310, which may be any suitable bus or interface, such as a peripheral component interconnect express (PCIe) bus, a universal serial bus (USB), a universal asynchronous receiver/transmitter (UART) serial bus, a suitable advanced microcontroller bus architecture (AMBA) interface, an Inter-Integrated Circuit (I2C) bus, a serial digital input output (SDIO) bus, or other equivalent Host memory 1306 may include programs, drivers or other data that utilize information provided by SPU 1302. Exemplary details regarding suitable configurations of host processor 1304 and SPU 1302 may be found in co-pending, commonly owned U.S. patent application Ser. No. 132/106,921, filed Apr. 21, 2008, which is hereby incorporated by reference in its entirety. Device 1300 may also contain a display (not shown).
In this embodiment, SPU 1302 is shown to include sensor processor 1312, memory 1314, accelerometer 1316 and gyroscope 1318. The accelerometer and/or gyroscope may be implemented as a MEMS-based inertial sensor configured to provide raw data output corresponding to acceleration measured along three orthogonal axes or angular rates of change along three orthogonal axes, respectively, or any equivalent structures. Memory 1314 may store algorithms, routines or other instructions for processing sensor data, such as synthetic signal generator 1320 to perform any of the operations described above, such as detecting one or more defective axes, generating and selecting candidates, providing composed signals and others The instructions may be stored in any suitable non-transitory computer readable format. The SPU memory may store the required algorithms, routines or other instructions as well as storing data output by sensor The SPU memory may also store data or temporary data for the calculation of the different candidate synthetic sensor signal paths. If desired, the SPU may include bus, similar to bus for the host processor, for coupling the SPU processor, SPU memory and the internal sensor The sensor fusion to generate the synthetic sensor signals may be performed in the SPU by the SPU processor for a defective axis of one of the internal or external sensors. The sensor fusion may use the signals from non-defectives axes from one or more sensors, which may be internal or external sensors Alternatively, some, or all, of the processing and calculation may be performed by the host processor, which may be using the host memory One or more additional internal sensors, such as internal sensor 1322 may be integrated into SPU 1302 as desired If provided, external sensor 1308 and/or internal sensor 1322 may include one or more sensors, such as accelerometers, gyroscopes, magnetometers, pressure sensors, microphones, proximity, and ambient light sensors, and temperature sensors among others sensors. As used herein, an internal sensor refers to a sensor implemented using the MEMS techniques for integration with SPU 1302 into a single chip Similarly, an external sensor as used herein refers to a sensor carried on-board device 1300 that is not integrated into SPU 1302. An accelerometer, gyroscope and/or any other sensor used in the techniques of this disclosure may be implemented as an internal or external sensor as desired.
As will be appreciated, host processor 1304 and/or sensor processor 1312 may be one or more microprocessors, central processing units (CPUs), or other processors which run software programs for device 1300 or for other applications related to the functionality of device 1300. For example, different software application programs such as menu navigation software, games, camera function control, navigation software, and phone or a wide variety of other software and functional interfaces can be provided. In some embodiments, multiple different applications can be provided on a single device 1300, and in some of those embodiments, multiple applications can run simultaneously on the device 1300. Multiple layers of software can be provided on a computer readable medium such as electronic memory or other storage medium such as hard disk, optical disk, flash drive, etc., for use with host processor 1304 and sensor processor 1312. For example, an operating system layer can be provided for device 1300 to control and manage system resources in real time, enable functions of application software and other layers, and interface application programs with other software and functions of device 1300. In some embodiments, one or more motion algorithm layers may provide motion algorithms for lower-level processing of raw sensor data provided from internal or external sensors Further, a sensor device driver layer may provide a software interface to the hardware sensors of device 1300. Some or all of these layers can be provided in host memory 1306 for access by host processor 1304, in memory 1314 for access by sensor processor 1312, or in any other suitable architecture.
In one aspect, implementing synthetic signal generator 1320 in SPU 1.302 may allow the operations described in this disclosure to be performed with reduced or no involvement of host processor 1304. As will be appreciated, this may provide increased power efficiency and/or may free host processor 1304 to perform any other task(s) However, the functionality described as being performed by synthetic signal generator 1320 may be implemented using host processor 1304 and memory 1306 or any other combination of hardware, firmware and software or other processing resources available in portable device 1300.
When SPU 1302 does all the processing of the sensor fusion and the generation of the synthetic sensor signal of a defective-axis of an internal sensor, the rest of the system does not need to know an axis is malfunctioning if the synthetic signal generation works according to specifications However, the SPU may report any defective axis to the host processor to inform the system Any logging of errors of the sensor axes may be stored in the host memory or other suitable location
In the described embodiments, a chip is defined to include at least one substrate typically formed from a semiconductor material. A single chip may be formed from multiple substrates, where the substrates are mechanically bonded to preserve the functionality A multiple chip includes at least two substrates, wherein the two substrates are electrically connected, but do not require mechanical bonding. A package provides electrical connection between the bond pads on the chip to a metal lead that can be soldered to a PCB A package typically comprises a substrate and a cover Integrated Circuit (IC) substrate may refer to a silicon substrate with electrical circuits, typically CMOS circuits. In some configurations, a substrate portion known as a MEMS cap provides mechanical support for the MEMS structure. The MEMS structural layer is attached to the MEMS cap. The MEMS cap is also referred to as handle substrate or handle wafer In the described embodiments, an electronic device incorporating a sensor may employ a sensor tracking module also referred to as Sensor Processing Unit (SPU) that includes at least one sensor in addition to electronic circuits The sensor, such as a gyroscope, a magnetometer, an accelerometer, a microphone, a pressure sensor, a proximity sensor, or an ambient light sensor, among others known in the art, are contemplated. Some embodiments include accelerometer, gyroscope, and magnetometer, which each provide a measurement along three axes that are orthogonal to each other Such a device is often referred to as a 9-axis device. Other embodiments may not include all the sensors or may provide measurements along one or more axes. The sensors may be formed on a first substrate. Other embodiments may include solid-state sensors or any other type of sensors. The electronic circuits in the SPU receive measurement outputs from the one or more sensors. In some embodiments, the electronic circuits process the sensor data The electronic circuits may be implemented on a second silicon substrate. In some embodiments, the first substrate may be vertically stacked, attached and electrically connected to the second substrate in a single semiconductor chip, while in other embodiments, the first substrate may be disposed laterally and electrically connected to the second substrate in a single semiconductor package.
In one embodiment, the first substrate is attached to the second substrate through wafer bonding, as described in commonly owned U.S. Pat. No. 7,104,129, which is incorporated herein by reference in its entirety, to simultaneously provide electrical connections and hermetically seal the MEMS devices. This fabrication technique advantageously enables technology that allows for the design and manufacture of high performance, multi-axis, inertial sensors in a very small and economical package. Integration at the wafer-level minimizes parasitic capacitances, allowing for improved signal-to-noise relative to a discrete solution. Such integration at the wafer-level also enables the incorporation of a rich feature set which minimizes the need for external amplification.
In the described embodiments, raw data refers to measurement outputs from the sensors which are not yet processed. Motion data may refer to processed and/or raw data Processing may include applying a sensor fusion algorithm or applying any other algorithm. In the case of a sensor fusion algorithm, data from a plurality of sensors may be combined to provide, for example, an orientation of the device. In the described embodiments, a SPU may include processors, memory, control logic and sensors among structures
A flame of reference for a portable device may be the body frame, having three orthogonal axes Switching from the body frame to the world flame or any other suitable reference frame, or vice versa, may be performed by apply the appropriate rotation to the data. Similarly, the world frame may have axes fixed to the Earth, such as by aligning the Z axis of the world frame with the gravity vector resulting from Earth's gravity field, pointing from the surface of the Earth to the sky Although the math and descriptions provided in this disclosure are in the context of these frames, one of skill in the art will realize that similar operations may be performed using other definitions and frames of reference All the teachings could be redone with different definitions. Thus, the orientation of a portable device may be expressed as the rotational operation that translates the body frame to the world frame, such as a rotation operation that aligns the Z axis of the body frame with the gravity vector. In some embodiments, the rotation operation may be expressed in the form of a unit quaternion As used herein, the terms “quaternion” and “unit quaternion” may be used interchangeably for convenience Accordingly, a quaternion may be a four element vector describing the transition from one rotational orientation to another rotational orientation and may be used to represent the orientation of a portable device. A unit quaternion has a scalar term and 3 imaginary terms. In this disclosure, the quaternion is expressed with the scalar term first followed by the imaginary terms but, appropriate modifications may be made to the formulas, equations and operations to accommodate different definitions of quaternion.
From the above materials, it will be appreciated that this disclosure includes a method for providing sensor data for a portable device. A first sensor may be provided, wherein the first sensor is integrated with the portable device and has multiple axes of measurement. At least a second sensor may be provided, wherein the second sensor is also integrated with the portable device and also has multiple axes of measurement. Data from the first sensor and the second sensor may be combined to generate a synthetic signal for a first axis of the first sensor The synthetic signal for this first axis may be used to replace or substitute the actual signal for the first axis.
In one aspect, a substitute signal for the first axis of the first sensor may be provided based, at least in part, on the synthetic signal A malfunction in the first axis of the first sensor may be detected, so that the substitute signal for the first axis of the first sensor may be provided upon detection of the malfunction By replacing the signal for the malfunctioning axis with the synthetic signal, the signals for the first axis may be used further where needed, whereas the signal of the malfunctioning axis could not be used
In one aspect, data from the first sensor may include data from at least one axis other than the first axis. At least one candidate synthetic signal may be derived based on a combination of the data from the at least one axis other than the first axis, and the characteristics of the vector field measured by the first sensor The first sensor may be an accelerometer and the vector field is the gravitational field, and the at least one candidate may be based on the comparison of the acceleration measured on the at least one axis other than the first axis and the acceleration due to the gravitational field. When an accelerometer axis is malfunctioning or stuck due to, for example, an external shock, one of the candidate synthetic signals may be used to replace the malfunctioning axis Because the gravitational field measured by the accelerometer is known, the candidate signal may be determined
In one aspect, the synthetic sensor signal and at least one signal for another axis may be combined to reproduce a desired output of the first sensor By combining the synthetic signal with the signals from the other axis, complete sensor signal may be generated for the first sensor Any process or processor using the sensor signals may not even be aware that there was a problem with the sensor.
In one aspect, the first sensor may include an accelerometer and the second sensor may include a gyroscope When the candidate synthetic signal for the accelerometer is determined based on the gravitational field, the amplitude may be determined but the sign may remain unknown This sign may be determined using the sensor signals from a gyroscope.
In one aspect, combining data from the first sensor and the second sensor may include determining an orientation of the portable device based on a sensor fusion of the data The orientation of the portable device may be used to convert signals from one reference frame to another, for example from a fixed reference frame to the body frame of the portable device.
In one aspect, the first sensor may be an accelerometer and the synthetic signal for a first axis of the first sensor may be generated based on a conversion of the gravity vector to the body frame of the portable device. The conversion of the gravity vector to the body frame of the portable device may be based on a orientation of the portable device By converting the gravity vector to the body frame, the candidate synthetic signal for the accelerometer may be determine by comparison with the functioning axis of the accelerometer
In one aspect, combining data may include generating a plurality of candidates for the synthetic signal. Parallel sensor fusion paths may executed for the plurality of candidates until a candidate selection process is performed The candidate selection process may be performed when predefined motion criteria are satisfied. When a plurality of synthetic signals exists, the motion of the device may lead to the generation of sensor signals which may then be used in the selection process to determine the correct candidate.
In one aspect, the first sensor may include a gyroscope and the second sensor may include an accelerometer As such, combining data may include determining a change in orientation based on a plurality of accelerometer signals and estimating an angular velocity based at least in part on the determined orientation change for the gyroscope axes. A magnetometer may also be provided and determining a change in orientation may be based on a fusion of the accelerometer and magnetometer signals The synthetic signal for an axis of the gyroscope may be generated based on estimated angular velocities and the signal for at least one other gyroscope axis In case an axis of the gyroscope is malfunctioning, the synthetic signal may be used to replace the malfunctioning signal
In one aspect, at least a third sensor having multiple axes of measurement may be provided, so that combining data from the first sensor and second sensor further may also include combining data from third sensor. By using the signals from a third sensor, additional information may be available that helps in the generation of the synthetic signal.
In one aspect, the synthetic signal may be generated for an axis that may be not measured by the first sensor. In this case even if the axis is not measured, the synthetic signal may still be used.
In one aspect, the first sensor may be configured to operate at least one of the axes of measurement in a power save mode and the synthetic signal may be generated for an axis that is being operated in power save mode Any sensor signal not available because of the low power mode may be replaced or substituted with the synthetic signal.
In one aspect, the synthetic signal may be used to test a corresponding axis of measurement for the first sensor. By comparing the synthetic signal for an axis with the actual measured signal for that axis, testing may be performed to see if the axis is functioning correctly
Further, this disclosure includes a portable device having a first sensor integrated with the portable device with multiple axes of measurement, a second sensor integrated with the portable device with multiple axes of measurement and a sensor signal generator that may combine data from the first sensor and the second sensor to generate a synthetic signal for an axis of the first sensor. When an axis of the first sensor is malfunctioning, the operation of the portable device is not influence due to the substitution of the signal for the malfunctioning axis with the synthetic signal.
In one aspect, the sensor signal generator may be implemented by a host processor of the portable device. The host processor may detect any malfunctioning axis and activate a process to generate the synthetic signal in order to garantuee a correct functioning of the first sensor.
Still further, this disclosure includes a sensor processing unit that may include a first sensor integrated with the sensor processing unit having multiple axes of measurement, a sensor processor configured to combine data from the first sensor and data from a second sensor having multiple axes of measurement to generate a synthetic signal for a first axis of the first sensor. The synthetic signal for the first axis may be used to replace the signals for any malfunctioning axis
In one aspect, the second sensor may be integrated in the sensor processing unit. When the first and second sensor are integrated in the sensor processing unit any processing required to generate the synthetic signal may be done internally in the sensor processor unit.
In one aspect, the sensor processing unit may output a substitute signal for the first axis of the first sensor based, at least in part, on the synthetic signal The sensor processing unit may output the substitute signal for the first axis of the first sensor when a malfunction may be detected on the first axis. The output signals of the sensor processing unit for the first sensor may therefore always be used, even if an axis of the first sensor is malfunctioning because the synthetic signal may replace the malfunctioning signal.
Although the present invention has been described in accordance with the embodiments shown, one of ordinary skill in the art will readily recognize that there may be variations to the embodiments and those variations would be within the spirit and scope of the present invention. Accordingly, many modifications may be made by one of ordinary skill in the art without departing horn the spirit and scope of the present invention.