The present invention relates generally to signal processing, and more particularly to a signal averaging circuit and method to compute a running average over a fixed number of samples without the need for maintaining large queues or queuing registers.
Signal averaging circuits and methods are used in a wide range of applications including, for example, processing motion-sensitive output from a array of photo-detectors in an optical navigation system.
One common application of a signal averaging circuit is to compute a running average, weighted or un-weighted, over a fixed number of samples. A conventional method for computing a running average over a predetermined number (N) of samples is schematically illustrated in
A block diagram of a conventional signal averaging circuit for computing a running average over N samples according to the above method is shown in
In particular, the implementation of
Yet another problem with conventional averaging methods and circuits is an inability to vary the length or number of samples, N, over which the running average is computed. That is once the ASIC has been designed and fabricated for a specific value of N, it cannot be changed, rather a new ASIC must be designed and fabricated. Moreover, because the size of the storage queue increases linearly with N there are practical limits on the number of samples over which the running average can be computed.
Accordingly, there is a need for averaging circuit and method to compute a running average over a number of samples that eliminates the need for maintaining large queues or queuing registers. It is further desirable that the circuit and method enables adjustment of the averaging length (N) without significant impact if any on design of an ASIC in which the averaging circuit is included.
The present invention provides a solution to this and other problems, and offers further advantages over conventional signal averaging circuits and methods.
These and various other features and advantages of the present invention will be apparent upon reading of the following detailed description in conjunction with the accompanying drawings and the appended claims provided below, where:
The present invention is directed generally to signal processing, and more particularly, to an averaging circuit and method to compute a running average over a fixed number of samples without the need for maintaining large queues or queuing registers.
In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known structures, and techniques are not shown in detail or are shown in block diagram form in order to avoid unnecessarily obscuring an understanding of this description.
Reference in the description to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase “one embodiment” in various places in the specification do not necessarily all refer to the same embodiment. The term “to couple” as used herein may include both to directly connect and to indirectly connect through one or more intervening components.
The averaging circuit and method are particularly advantageous for processing signals from a photo-detector, such as a photodiode or other light sensitive element, in a array used in an optical navigation system, such as an optical computer mouse or an optical trackball.
For purposes of clarity, many of the details of optical navigation systems in general and signal processing circuits for optical navigation systems in particular that are widely known and are not relevant to the present invention have been omitted from the following description. Speckle-based optical navigation systems are described, for example, in co-pending, commonly assigned U.S. patent application No. 11/129,967, entitled, “Optical Positioning Device Having Shaped Illumination,” filed on May 16, 2005 by Clinton B. Carlisle et al., and incorporated herein by reference in its entirety.
Briefly, the averaging method of the present invention involves: (i) receiving and accumulating digital samples of a signal in at least two sample-accumulators; (ii) counting the number of samples received in a sample-counter; (iii) alternately resetting the two sample-accumulators at regular intervals offset with respect to each other by a predetermined number (N) of samples and resetting the sample counter when it reaches N; (iv) dividing the sum of samples accumulated by the number of samples accumulated after at-least N samples have been received in sample-accumulator to compute and output an average; and (v) alternately selecting the average output from one sample-accumulator while the other has just been reset as a running average over (N+sample counter) samples, thereby eliminating the need for maintaining large queues or queuing registers.
In general the sample-counter is reset simultaneously with each sample-accumulator reset. That is the sample-counter should be reset following a predetermined number N of cycles, and N is the offset number of samples between sample-accumulator resets. Each sample accumulator resets after (M·N) samples, where M is the number of sample-accumulators, a whole number greater than or equal to two (≧2), the resets from the M sample accumulators are spaced out evenly so that each reset occurs N samples after the other. The sample accumulator that has accumulated at least ((M−1)·N) samples but less than (M·N) samples, will be used to compute the running average. So the equivalent running average length will be ((M−1)·N) samples. Alternatively, the offset number of samples (N) between sample accumulator resets can be selected in relation to the number of data bits supported by the sample-counter such that the sample-counter rolls over (automatically resets to zero) after the Nth sample has been received and counted thereby eliminating the need for resetting the sample-counter. For example, when the sample-counter is implemented as a 6-bit binary counter N can be selected as 64 so that after the counter has counted 64 samples from 0 to 63 it rolls over to 0.
Exemplary embodiments of the averaging circuit and method according to the present invention will now be described in greater detail with reference to
In one embodiment, shown in
In the embodiment shown, the sample-counter 306 is an n-bit forward counter, where n is the number of bits needed to express in binary form the predetermined number of samples (N) over which the average is computed. The sample-counter 306 has a frame trigger or input 330 coupled to the sample line 318 to count up the samples received in the sample-accumulators 302, 304, from an initial value of 0 to (N−1). It will be appreciated that other embodiments are possible, including those in which the sample-counter 306 is a down counter, and/or is reset by the reset circuit 308, thereby enabling the sample-counter to hold a value between 0 and a preselected multiple of N.
The reset circuit 308 generally includes a comparator (CMP 332) having a first n-bit input 334 coupled to an output of the sample-counter 306 and a second n-bit input 338 coupled to a n-bit value, here zero (0), to which the sample-counter 306 rolls over after counting up to N. The reset circuit 308 further includes a flip-flop 340, such as T flip-flop, having an input 342 coupled to an output of the comparator 332, and at least one output 346 coupled to the selection circuit, MUX 314, and to the reset inputs 328 of the sample-accumulators 302 and 304. In the embodiment shown the reset circuit 308 further includes an inverter 348 through which the output 346 is also coupled to the second sample-accumulator 304. However, it will be appreciated that the second sample-accumulator 304 may instead be coupled directly to a second, inverting output from the flip-flop 340 without departing from the scope of the invention, and thereby eliminating the inverter 348.
The output of the selection circuit, MUX 314, operates to select the output of the appropriate accumulator, 302 or 304, at the appropriate time to provide a running average of the sampled signal over a predetermined number of samples, without the need for maintaining large queues or queuing registers.
A graph illustrating sample-accumulator averages output by the divider 310 is shown in
A method of computing a running average of a sampled signal over a predetermined number of samples using the averaging circuit of
The ability of an averaging circuit and method of the present invention to compute a running average over a number of samples without the need for maintaining a large sample queue or register is shown graphically in
As can be seen from the graphs of
The advantages of the signal averaging circuit and method of the present invention over previous or conventional circuits and methods include: (i) the ability to compute a running average over a number of samples without the need for maintaining large queues or queuing registers; (ii) reduced power consumption in a circuit or device including the averaging circuit due to reduced gate counts; and (iii) the ability to change the averaging length over which the running average is computed without significant impact if any on design of an application specific integrated circuit (ASIC) in which the averaging circuit is included.
The foregoing description of specific embodiments and examples of the invention have been presented for the purpose of illustration and description, and although the invention has been described and illustrated by certain of the preceding examples, it is not to be construed as being limited thereby. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed, and many modifications, improvements and variations within the scope of the invention are possible in light of the above teaching. It is intended that the scope of the invention encompass the generic area as herein disclosed, and by the claims appended hereto and their equivalents.
Number | Name | Date | Kind |
---|---|---|---|
3922093 | Dandliker et al. | Nov 1975 | A |
4225240 | Balasubramanian | Sep 1980 | A |
4546347 | Kirsch | Oct 1985 | A |
4740675 | Brosnan et al. | Apr 1988 | A |
4751380 | Victor et al. | Jun 1988 | A |
4799055 | Nestler et al. | Jan 1989 | A |
4814553 | Joyce | Mar 1989 | A |
4920260 | Victor et al. | Apr 1990 | A |
5052027 | Poklemba et al. | Sep 1991 | A |
5288993 | Bidiville et al. | Feb 1994 | A |
5345527 | Lebby et al. | Sep 1994 | A |
5391868 | Vampola et al. | Feb 1995 | A |
5448508 | Ono et al. | Sep 1995 | A |
5473344 | Bacon et al. | Dec 1995 | A |
5578813 | Allen et al. | Nov 1996 | A |
5606174 | Yoshimura et al. | Feb 1997 | A |
5644139 | Allen et al. | Jul 1997 | A |
5703356 | Bidiville et al. | Dec 1997 | A |
5729008 | Blalock et al. | Mar 1998 | A |
5729009 | Dandliker et al. | Mar 1998 | A |
5781229 | Zediker et al. | Jul 1998 | A |
5786804 | Gordon | Jul 1998 | A |
5825044 | Allen et al. | Oct 1998 | A |
5854482 | Bidiville et al. | Dec 1998 | A |
5907152 | Dandliker et al. | May 1999 | A |
5963197 | Bacon et al. | Oct 1999 | A |
5994710 | Knee et al. | Nov 1999 | A |
6031218 | Piot et al. | Feb 2000 | A |
6034379 | Bunte et al. | Mar 2000 | A |
6037643 | Knee | Mar 2000 | A |
6057540 | Gordon et al. | May 2000 | A |
6097371 | Siddiqui et al. | Aug 2000 | A |
6137566 | Leonard et al. | Oct 2000 | A |
6151015 | Badyal et al. | Nov 2000 | A |
6172354 | Adan et al. | Jan 2001 | B1 |
6194695 | Barrows | Feb 2001 | B1 |
6201572 | Chou | Mar 2001 | B1 |
6218659 | Bidiville et al. | Apr 2001 | B1 |
6222174 | Tullis et al. | Apr 2001 | B1 |
6225617 | Dandliker et al. | May 2001 | B1 |
6226092 | de Lega | May 2001 | B1 |
6233368 | Badyal et al. | May 2001 | B1 |
6243134 | Beiley | Jun 2001 | B1 |
6255643 | Sayag | Jul 2001 | B1 |
6281881 | Siddiqui et al. | Aug 2001 | B1 |
6281882 | Gordon et al. | Aug 2001 | B1 |
6304330 | Millerd et al. | Oct 2001 | B1 |
6326950 | Liu | Dec 2001 | B1 |
6330057 | Lederer et al. | Dec 2001 | B1 |
6351257 | Liu | Feb 2002 | B1 |
6396479 | Gordon | May 2002 | B2 |
6421045 | Venkat et al. | Jul 2002 | B1 |
6424407 | Kinrot et al. | Jul 2002 | B1 |
6433780 | Gordon et al. | Aug 2002 | B1 |
6452683 | Kinrot et al. | Sep 2002 | B1 |
6455840 | Oliver et al. | Sep 2002 | B1 |
6462330 | Venkat et al. | Oct 2002 | B1 |
6476970 | Smith | Nov 2002 | B1 |
6529184 | Julienne | Mar 2003 | B1 |
6585158 | Norskog | Jul 2003 | B2 |
6603111 | Dietz et al. | Aug 2003 | B2 |
6608585 | Benitz | Aug 2003 | B2 |
6621483 | Wallace et al. | Sep 2003 | B2 |
6642506 | Nahum et al. | Nov 2003 | B1 |
6657184 | Anderson et al. | Dec 2003 | B2 |
6664948 | Crane et al. | Dec 2003 | B2 |
6674475 | Anderson | Jan 2004 | B1 |
6677929 | Gordon et al. | Jan 2004 | B2 |
6703599 | Casebolt et al. | Mar 2004 | B1 |
6710855 | Shiraishi | Mar 2004 | B2 |
6737636 | Dietz et al. | May 2004 | B2 |
6741335 | Kinrot et al. | May 2004 | B2 |
6753851 | Choi et al. | Jun 2004 | B2 |
6756980 | Hayashi | Jun 2004 | B2 |
6774351 | Black | Aug 2004 | B2 |
6774915 | Rensberger | Aug 2004 | B2 |
6778571 | Vaughan | Aug 2004 | B2 |
6795056 | Norskog et al. | Sep 2004 | B2 |
6809403 | Gee | Oct 2004 | B2 |
6809723 | Davis | Oct 2004 | B2 |
6819314 | Black | Nov 2004 | B2 |
6823077 | Dietz et al. | Nov 2004 | B2 |
6947459 | Kurtz et al. | Sep 2005 | B2 |
6950094 | Gordon et al. | Sep 2005 | B2 |
6967321 | Leong et al. | Nov 2005 | B2 |
6977645 | Brosnan | Dec 2005 | B2 |
7019733 | Koay | Mar 2006 | B2 |
7042575 | Carlisle et al. | May 2006 | B2 |
7049578 | Wada et al. | May 2006 | B2 |
7098894 | Yang et al. | Aug 2006 | B2 |
7119323 | Brosnan et al. | Oct 2006 | B1 |
7126585 | Davis et al. | Oct 2006 | B2 |
7138620 | Trisnadi et al. | Nov 2006 | B2 |
7148078 | Moyer et al. | Dec 2006 | B2 |
7161682 | Xie et al. | Jan 2007 | B2 |
7205521 | Gruhlke et al. | Apr 2007 | B2 |
7236239 | Hase | Jun 2007 | B2 |
7253837 | Henderson et al. | Aug 2007 | B2 |
7279668 | Misek | Oct 2007 | B2 |
7280140 | Henderson | Oct 2007 | B2 |
7285766 | Carlisle et al. | Oct 2007 | B2 |
7321359 | Xie et al. | Jan 2008 | B2 |
7439954 | Theytaz et al. | Oct 2008 | B2 |
7443427 | Takayanagi | Oct 2008 | B2 |
7460979 | Buckner | Dec 2008 | B2 |
7492351 | VanWiggeren et al. | Feb 2009 | B2 |
20020093487 | Rosenberg | Jul 2002 | A1 |
20030058506 | Green et al. | Mar 2003 | A1 |
20050083303 | Schroeder et al. | Apr 2005 | A1 |
20050156915 | Fisher | Jul 2005 | A1 |
20050228838 | Stetson et al. | Oct 2005 | A1 |
20050258346 | LeHoty et al. | Nov 2005 | A1 |
20050259078 | Roxlo et al. | Nov 2005 | A1 |
20050259097 | Lehoty et al. | Nov 2005 | A1 |
20050285960 | Purcell et al. | Dec 2005 | A1 |
20060028442 | Bynum et al. | Feb 2006 | A1 |
Number | Date | Country |
---|---|---|
WO9946603 | Sep 1999 | WO |
WO0248853 | Jun 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20070143383 A1 | Jun 2007 | US |