The present invention generally relates to motion sensing. This invention more particularly relates to systems and methods for increasing sensor resolution using interpolation.
A conventional input device, such as a mouse, knob, or other manipulandum, may use one or more optical or other sensors to sense movement of the device. Many conventional input devices are relatively inexpensive; the components of the device, including the sensors, are correspondingly inexpensive. However, inexpensive sensors typically provide relatively low resolution of the movement of the device. While the low resolution provided by these sensors may be acceptable for accepting input from a mouse or knob and affecting, for example, cursor movement, some implementations require higher resolution. For example, providing compelling haptic effects may require higher resolution.
High-resolution sensors provide the resolution desired for providing compelling haptic effects and other uses, but are generally more expensive. The increase in cost may be due, for example, to an increased number of, or more exacting standards for, the components in the sensor. Higher resolution may also be achieved by utilizing additional low-cost sensors. But again, a higher cost accompanies the higher resolution. Also, there may be physical limitations to adding additional sensors.
An embodiment of the present invention provides a system and method for increasing sensor resolution using interpolation. One embodiment of the present invention implements a method comprising: receiving an analog sensor signal associated with a coding surface; deriving a quadrature signal based at least in part on an analog threshold voltage associated with the analog sensor signal; determining a velocity and a derived quadrature position of the coding surface based at least in part on the quadrature signal; outputting the derived quadrature position of the coding surface if the velocity exceeds a velocity threshold; and determining and outputting an interpolated position of the coding surface using analog interpolation if the velocity is less than or equal to the velocity threshold. In another embodiment, a computer-readable medium (such as, for example random access memory or a computer disk) comprises code for carrying out such a method.
These embodiments are mentioned not to limit or define the invention, but to provide examples of embodiments of the invention to aid understanding thereof. Embodiments are discussed in the Detailed Description, and further description of the invention is provided there. Advantages offered by the various embodiments of the present invention may be further understood by examining this specification.
These and other features, aspects, and advantages of the present invention are better understood when the following Detailed Description is read with reference to the accompanying drawings, wherein:
Embodiments of the present invention provide systems and methods for increasing sensor resolution using interpolation. In an illustrative embodiment, a sensor is configured to sense the motion of a knob and generate a sensor signal and a quadrature signal. The sensor comprises two phototransistors that are configured to sense the motion of a black and white label affixed to a drum, which is mounted on the shaft of the knob. The phototransistors are ninety degrees out of phase and each produce a semi-sinusoidal signal corresponding to the amount of light reflecting off of the label.
The label includes eight white segments and eight black segments. Each of the segments is of approximately equal width. In other words, each label accounts for approximately 22.5 degrees of the circumference of the drum. The white segments are referred to as apertures.
A processor in communication with the sensor is configured to receive the sensor signal and the quadrature signal. The sensor signal comprises two semi-sinusoidal signals corresponding to the two phototransistors. Each aperture has four quadratures.
When the knob is rotated, the processor receives the sensor signal and the quadrature signal. The processor executes an arc tangent 2 (ATAN2) function on the sensor signal to determine an interpolated position of the disk within the aperture. Based on this determination, the processor interpolates the position of the sensor in relation to the aperture of the coding disk. For example, the processor may determine that the sensor at a point that is approximately 4.5 degrees into the aperture, i.e., 20% of the 22.5 degrees of the total aperture width.
The processor then determines which aperture is being sensed based on the quadrature signal. For instance, if the quadrature signal is 1 through 4, the sensor is sensing the first aperture. If the quadrature signal is 5 through 8, the sensor is sensing the second aperture.
Once the processor has determined which aperture is being sensed and has determined the interpolated position within the aperture, the processor adds these two positions together to determine the interpolated position of the coding disk.
For example, the processor receives a quadrature signal equal to 2. The processor also determines that the interpolated position within the aperture is 4.5 degrees. From these two determinations, the processor determines that the sensor is sensing the first aperture. Thus, the interpolated position of the coding disk is 4.5 degrees from the origin of the coding disk.
The interpolated position can then be used as input to software. For instance, the interpolated position can be used to adjust a parameter, such as the volume, of a handheld phone or an automotive stereo. In one embodiment, the interpolated position is used to determine the appropriate haptic feedback to be provided to the knob.
This introduction is given to introduce the reader to the general subject matter of the application. By no means is the invention limited to such subject matter. Illustrative embodiments are described below.
Affixed to the drum are two stickers 110a, b. Each of the stickers comprises 8 black segments and 8 white segments. The stickers are offset from one another by half a segment. In other words, a white segment of one sticker begins at the mid-point of a white segment of the second sticker, and each segment covers approximately 22.5 degrees of the circumference of the drum 108. The white segments may be referred to as apertures.
An aperture is a slit or opening in a coding wheel, disk, drum, or other coding surface that allows light from an emitter to pass through or a segment of color on a coding surface that reflects the light from an emitter. The width of the aperture corresponds to a full cycle of the resolver signals.
Quadrature signals are the digital version of the resolver signals. The ideal quadrature signal is 1 when the corresponding resolver signal is positive and zero otherwise.
Other embodiments may utilize different configurations. For example, in one embodiment, a linear motion sensor is utilized. The linear sensor senses movement of a linear surface that comprises apertures, which may be, for example, holes or markings similar to those described in relation to the drum 108 above.
The housing 102 also contains a printed circuit board (PCB) 112. The PCB 112 includes a variety of components (not shown). Included on the PCB 112 is a pair of infrared (IR) sensors 114a, b. The IR sensors 114a, b are operable to reflect light off of the stickers 110a, b and detect the reflected light.
The sensor generates a pair of analog signals (A,B), which may be referred to as analog channels. In the embodiment shown, these signals are periodic and quasi-sinusoidal with constant relative phase of about ¼ of a cycle.
In the embodiment shown in
In the embodiment shown in
Various devices may comprise the housing 106 of the embodiment shown in
The housing 202 also contains a printed circuit board (PCB) 212. The PCB 212 includes a variety of components (not shown). Included on the PCB 212 are two emitter-detector pairs 214, 216. The detectors 216 shown comprise phototransistors. The emitter-detector pairs 214, 216 are offset. The offset of the emitter-detector pairs causes a phase offset between the signals generated by detector 216a and detector 216b. The phase offset between the two detectors 216a, b may be used to interpolate a position within each of the apertures, providing a more accurate determination of the position of the disk 208 and of the knob 202. In one embodiment, a single emitter and two detectors are utilized. The printed circuit boards shown in
Embodiments of computer-readable media may comprise an electronic, optical, magnetic, or other storage or transmission device capable of providing a processor with computer-readable instructions. Other examples of suitable media may comprise a floppy disk, Compact Disk Read Only Memory (CD-ROM), magnetic disk, memory chip, Read Only Memory (ROM), Random Access Memory (RAM), an ASIC, a configured processor, all optical media, all magnetic tape or other magnetic media, or any other suitable medium from which a computer processor can read instructions or on which instructions, code, or other data may be stored. Also, various other forms of computer-readable media may transmit or carry instructions to a computer, including a router, private or public network, or other transmission device or channel, both wired and wireless. The instructions may comprise code from any suitable computer-programming language, including, for example, C, C++, C#, Visual Basic, Java, Python, Perl, and JavaScript.
The processor may be in communication with any number of other external or internal devices such as a mouse, a CD-ROM, a keyboard, a display, or other input or output devices.
The sensor 304 outputs raw data. The sensor 304 is a low-cost sensor, which generates semi-sinusoidal signals. More costly sensors generate more accurate sinusoidal signals. An embodiment of the present invention may utilize a high-cost sensor, however, embodiments of the present invention are able to provide high resolution using low-cost sensors. The raw data comprises a pair of semi-sinusoidal signals that are out of phase, e.g., ninety degrees out of phase.
The raw signals are passed to a voltage comparator 306. The comparator in
Quadratures are the subdivisions of the aperture generated by the rising and falling edges of the quadrature signals. There are four quadratures per aperture. In some embodiments, due to irregularities in the quadrature signals and voltage trigger levels, the quadratures do not have uniform spacing.
Based on output from the quadrature counter 308, a processor (not shown) can determine the current aperture of the coding wheel and a relative position within the aperture. However, the position within the aperture is only one of four potential positions.
In the embodiment shown in
In the embodiment shown in
The processor also receives a quadrature position 404. The processor also receives the sensor signal 406. The processor then compares the velocity measure (v) to a velocity threshold (vc) 408.
In one embodiment of a DAI (Direct Analog Interpolation) algorithm, the exact detection of aperture transitions via analog signal requires at least two samples per aperture. Therefore, for a given sample rate S and aperture resolution A, there is a threshold velocity vc given by:
vc=S/2A[rev/sec]
At velocities larger than vc, DAI may lose track of aperture counts generating discrete position/velocity errors.
In a typical case, an interpolation sensor with S=1 KHz and A=180 aperture/rev, vc=2.77 rev/sec. This threshold velocity may be momentarily achieved during aggressive detent interaction.
If the velocity measure v is greater than vc, the processor corrects the low-resolution position using the quadrature resolution and ignores the intra-aperture analog interpolated value 412. In such an embodiment, at large velocities, there is no need for full resolution. Also, when moving fast, there may be large position errors associated with the delayed A/D samples; so analog values may be ignored.
If the velocity v does not exceed vc, the processor determines the analog interpolated position 410. The processor then determines the hybrid interpolated position 414. The processor tracks the number of digital quadrature counts in between samples. This quadrature delta is then aligned to analog apertures and used to calculate a correction term for the aperture counts. An embodiment implementing this technique maintains full resolution.
The environments described above are examples of environments according to embodiments of the present invention. Many other environments may be implemented. For example, a variety of devices may incorporate systems and methods according to the present invention, including personal computers, media center computers, televisions, television set-top boxes, digital assistants, personal digital assistants, cellular phones, mobile phones, smart phones, pagers, digital tablets, laptop computers, Internet appliances, and other processor-based devices. In general, any device capable of utilizing a low-resolution encoder to determine the position of a manipulandum (a user manipulatable input device) or other user interface device may implement systems and methods according to the present invention.
In one embodiment of the present invention, a calibration is performed to generate a set of reference signals, which may subsequently be compared to signals received from a sensor.
The two emitter-detector pairs are configured to sense the movement of a single disk. However, they are offset by ninety degrees. Accordingly, when one detector outputs a minimum voltage, the other detector emits a higher voltage, and when one detector outputs a maximum voltage, the other detector outputs a lower voltage. The offset in voltage provides a means to interpolate a position within the slots of the encoder disk.
To perform the process shown in
The processor next applies an analytical function to the values in the sensor signal to generate a reference signal, i.e., a value representative of the sensor values 504. For example, in one embodiment, the processor applies an arc tangent 2 (ATAN2) function to the two values. Applying the ATAN2 function to the two values, which are 90 degrees out of phase, results in a plot that approximates a circle for each aperture.
The processor next determines an aperture identifier 506. An aperture identifier identifies a specific aperture on a coding disk. The aperture identifier may comprise, for example, an integer ranging from 1 to the total number of apertures on the disk. The processor may determine the aperture identifier in various ways. For example, the aperture may keep track of the aperture by sensing when the ATAN2 function approaches a minimum value. The phase within the aperture spans from a minimum to a maximum. The minimum value is at the beginning of the aperture, and the maximum value is at the end of the aperture. The aperture identifier may be determined in other ways as well. For example, in one embodiment, a separate sensor provides a signal indicating when an aperture is entered/exited. In yet another embodiment, the sensor provides an optional index signal to identify the aperture (e.g., the Agilent HEDM sensor). The processor tracks the secondary index signal as well as the primary sensor signal described above. Such an embodiment may be utilized, for example, in a case where high speed will be required of the manipulandum.
Once the processor has received the sensor signal 502, applied the analytical function to the sensor signal to generate a reference signal 504, and determined the aperture identifier 506, the processor stores the reference signal and the aperture identifier 508. The process shown in
In
The second level of precision is obtained by utilizing an analog to digital (A/D) converter to capture the analog values generated by the optical encoder. The precision of the analog data is determined by the precision of the A/D converter. The accuracy of the resulting position is determined by the level of accuracy associated with each of successive positional approximations.
The first positional approximation is arrived at by applying the two raw sensor data values to an ATAN2 function, which generates a first approximation of aperture angle. This approximation is described in relation to
The second positional approximation is determined by applying the position obtained from the ATAN2 approximation to a linearization table 602.
The third positional approximation is a 2-D correlation between the encoder data values A and B and previously captured raw data reference values 604. As this method utilizes correlation values between the newly captured sensor values and a very large set of captured reference values, the correlation approximation requires the previous approximations to narrow down the scope of the correlation search to a neighborhood of reference data points. The third positional approximation resulted in an aperture angle approximation θ(3) which is then correlated to a raw data index i such that θ(A,B)˜=θ(3).
The two-dimensional approximation utilizes the fact that the phase trajectory contains repeatable data values that are correlated not only to the aperture angle θ(3) but also to the distance from the centroid of the phase trajectory. These repeatable amplitude artifacts yield additional information that allows for a more accurate estimate of position.
A distance vector is calculated from the new data pair (A,B) to the reference data pair (Ai, Bi) and also for the neighborhood of data pairs (Ai−n, Bi−n), (Ai−n+l, Bi−n+l), . . . (Ai−, Bi−l), (Ai, Bi), (Ai+l, Bi+l), . . . up to (Ai+n, Bi+n). shortest distance vector, i.e., the nearest neighbor, is then the closest approximation to the captured data pair and the reference angle associated with the data pair is then taken as an improved approximation to the actual aperture angle.
A further improvement in accuracy may be obtained by taking a 2-D interpolation of a plurality of raw data points (a point cloud) to the new data point 606. This further improvement results in the simple case of two points in the neighborhood of the sample point (A,B) by taking θ(4)=θlow+(θhigh−θlow)*MSElow/(MSElow+MSEhigh).
In the case of two points, this resolves into a simple linear interpolation of distance between the data points (Ai, Bi) and (Ai+l, Bi+l). In the case of more than two data points, the resulting aperture angle is the mean square weighted interpolation angle in the neighborhood of the nearest reference point to θ(3).
θ(4) is then the most accurate angular estimate resulting from the series of approximations and is taken as the aperture angle determined by the optimal correlation of sample data pair (A,B) to the set of reference data pairs (Ai, Bi).
The 2-D interpolation methods described above rely on a pseudophase plot. The ATAN2 approximation maps a one to one relationship between aperture phase and sensor pseudophase. This method is illustrated in
Since the encoder wheel comprises a large range in aperture sizes and relative location, the plot illustrates a large range of closed loop paths in the pseudophase plot shown in
In one embodiment of the present invention, the axial position of the coding wheel may be determined. In such an embodiment, a push-to-select function 608 may be implemented without the addition of a switch in contact with the shaft.
In the embodiment shown in
Additionally, the axial motion produces amplitude modulation, offset and phase shifting on the resolver signals (A & B) 812. However the corresponding DAI position errors (mostly from phase shifting and zero-crossing offset) are not perceived in the haptics.
Axial position may also be determined as a deviation in phase trajectory amplitude from the reference phase trajectory 814. The approximation θ(3) resulted in an aperture angle estimate that was independent of phase trajectory amplitude. As the encoder disk moves axially relative to the sensor, the amplitude, or distance from the centroid to the sample data pair (A,B) decreases with increasing distance from the disk to the sensor. In other words, the change in radius from r to R provides an indication that the user has moved the knob axially. This data value, which is independent of θ(3) then can indicate to the processor the axial position of the encoder disk, which in the case of a haptic knob may indicate a push to select input from the user.
Phase trajectory amplitude may also be unique to an aperture, for examples a small aperture on the encoder disk may be used as an index aperture. The resulting phase trajectory will be uniquely correlated to the reference trajectory for the index aperture. The detection of the deviant aperture can be used to synchronize the aperture index. Synchronization of aperture index is critical to minimizing aperture error in the case of fine interpolation where a set of reference data is captured for each aperture in the disk, and the correlation of the sample data pair to only the relevant aperture is critical to maximizing accuracy.
The foregoing description of the embodiments of the invention has been presented only for the purpose of illustration and description and is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Numerous modifications and adaptations thereof will be apparent to those skilled in the art without departing from the spirit and scope of the present invention.
This application claims priority to Application Ser. No. 60/587,384, filed Jul. 12, 2004, titled “Systems and Methods for Increasing Sensor Resolution Using Interpolation,” and application Ser. No. 60/610,311, filed Sep. 16, 2004, titled “Systems and Methods for Increasing Sensor Resolution Using Interpolation,” the entirety of both of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
3157853 | Hirsch | Nov 1964 | A |
3220121 | Cutler | Nov 1965 | A |
3497668 | Hirsch | Feb 1970 | A |
3517446 | Corlyon et al. | Jun 1970 | A |
3902687 | Hightower | Sep 1975 | A |
3903614 | Diamond et al. | Sep 1975 | A |
4160508 | Salsbury | Jul 1979 | A |
4236325 | Hall et al. | Dec 1980 | A |
4513235 | Acklam et al. | Apr 1985 | A |
4535405 | Hill et al. | Aug 1985 | A |
4581491 | Boothroyd | Apr 1986 | A |
4599070 | Hladky et al. | Jul 1986 | A |
4708656 | De Vries et al. | Nov 1987 | A |
4713007 | Alban | Dec 1987 | A |
4742332 | Schroeder et al. | May 1988 | A |
4891764 | McIntosh | Jan 1990 | A |
4930770 | Baker | Jun 1990 | A |
4934694 | McIntosh | Jun 1990 | A |
5019761 | Kraft | May 1991 | A |
5022407 | Horch et al. | Jun 1991 | A |
5035242 | Franklin | Jul 1991 | A |
5038089 | Szakaly | Aug 1991 | A |
5078152 | Bond | Jan 1992 | A |
5130631 | Gordon et al. | Jul 1992 | A |
5186695 | Mangseth et al. | Feb 1993 | A |
5212473 | Louis | May 1993 | A |
5240417 | Smithson et al. | Aug 1993 | A |
5271290 | Fischer | Dec 1993 | A |
5275174 | Cook | Jan 1994 | A |
5299810 | Pierce | Apr 1994 | A |
5309140 | Everett | May 1994 | A |
5334027 | Wherlock | Aug 1994 | A |
5466213 | Hogan | Nov 1995 | A |
5547382 | Yamasaki | Aug 1996 | A |
5766016 | Sinclair | Jun 1998 | A |
5785630 | Bobick et al. | Jul 1998 | A |
6111577 | Zilles et al. | Aug 2000 | A |
6219034 | Elbing et al. | Apr 2001 | B1 |
6422941 | Thorner et al. | Jul 2002 | B1 |
6556153 | Cardamone | Apr 2003 | B1 |
6564168 | Hasser | May 2003 | B1 |
6704683 | Hasser | Mar 2004 | B1 |
Number | Date | Country |
---|---|---|
0349086 | Jan 1990 | EP |
0 358 989 | Jul 1994 | EP |
01-003664 | Jul 1990 | JP |
02-109714 | Jan 1992 | JP |
04-007371 | Aug 1993 | JP |
05-193862 | Jan 1995 | JP |
Number | Date | Country | |
---|---|---|---|
20060025959 A1 | Feb 2006 | US |
Number | Date | Country | |
---|---|---|---|
60587384 | Jul 2004 | US | |
60610311 | Sep 2004 | US |