System and method of time of flight detection
11582577 · 2023-02-14
Assignee
Inventors
Cpc classification
G01S19/06
PHYSICS
G01S19/35
PHYSICS
H04W64/006
ELECTRICITY
Y02D30/70
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G01S19/37
PHYSICS
H04W4/023
ELECTRICITY
International classification
H04W24/08
ELECTRICITY
H04W64/00
ELECTRICITY
Abstract
A position-determining apparatus, such as a GPS receiver, determines the position of the mobile device based on the time of flight of a transmitted probe signal using a method in which sections of the received signal is classified into two or more categories and accumulated according to categories before being used to compute the correlations familiar in the context of a matched filter. Using the method of the present invention to compute the correlations, and optionally applying additional time-saving techniques described herein, a position determination is achieved using arithmetic operations that are significantly reduced from that required in prior art methods to compute the correlations. The reduced number of arithmetic operations can reduce significantly the power consumption required of a device carrying out a method of the present invention, and thereby realizing a significant advantage.
Claims
1. A method for determining a distance between a signal source and a receiver, based on a signal that is recovered from a probe signal transmitted at a predetermined time from the signal source and received and digitized at the receiver, the method comprising: (i) for each value k among delay values d.sub.0, . . . , d.sub.n−1, computing correlation
2. The method of claim 1, wherein the probe signal comprises a repeating pseudo-random noise (PRN) code signal, and wherein the PRN code signal comprises a sequence of sections, each section having a predetermined duration and having samples corresponding to one of a plurality of predetermined waveforms.
3. The method of claim 2, wherein
4. The method of claim 1, wherein delay values d.sub.0, . . . , d.sub.n−1 are offsets relative to a coarse delay value estimate received from an external data source.
5. The method of claim 1, further comprising computing one or more of: a power of the received signal, an expected gain of a communication channel, a standard deviation of an additive noise, and a signal-to-noise ratio.
6. The method of claim 1, wherein the probe signal is formed by modulating a carrier signal with the PRN code signal.
7. The method of claim 1, wherein the predetermined waveform of each section of the PRN code signal is categorized according to signal transitions within the section and the signal transitions in one or more sections preceding or subsequent to the section.
8. The method of claim 1, wherein each section comprises a time period having a number of discrete time units (“chips”).
9. The method of claim 8, wherein each section is bounded in time by mid-points between two selected chips.
10. The method of claim 1, wherein the recovered signal comprises digital signal values output from an RF front end circuit.
11. The method of claim 1, wherein each signal value of the recovered signal is represented by a complex number formed by an in-phase value and a quadrature sample of the received signal.
12. The method of claim 3, wherein each correlation value is computed after applying a masking function over the recovered signal and the PRN code signal.
13. The method of claim 12, wherein multiplying the masking function with itself result in unity.
14. The method of claim 1, further comprising maintaining a plurality of statistical states based on the computed correlation values.
15. The method of claim 14, wherein the statistical states relate to a probability distribution.
16. The method of claim 14, wherein the statistical states relate to a logarithm of a probability distribution.
17. The method of claim 14, the statistical states are computed based on an additive Gaussian noise model.
18. The method of claim 15, wherein one of the statistical states relate to a probability distribution and wherein one or more samples of the recovered signal are excluded from contributing to a correlation when the delay value associated with the correlation corresponds to a probability in the probability distribution that is less than a predetermined threshold.
19. The method of claim 18, wherein the probability distribution is updated over time.
20. The method of claim 3, wherein signal values of one or more sections of the recovered signal are excluded from contributing to the test correlation.
21. The method of claim 3, wherein a signal value in a section of the recovered signal contributes to the correlation when the signal value follows a signal transition.
22. The method of claim 1, further comprising estimating a frequency and a phase of the received signal.
23. The method of claim 22, wherein the frequency and the phase are estimated using a Kalman filter.
24. The method of claim 1, wherein successive ones of delay values d.sub.0, . . . , d.sub.n−1 differ from each other by an integral time unit.
25. The method of claim 1, wherein the integral time unit is 1.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
(13) In the following detailed description, a probe signal transmitted between two objects may refer to a probe signal sent from one object and received by the other object or, alternatively, a signal sent by one object, reflected from the second object and then received by the first object. The present invention is applicable to the GPS or, more generally, the Global Navigation Satellite System (GNSS), which includes GPS, GLONASS, Galileo, Beidou, and other similar systems. In fact, the present invention is applicable not only to GNSS/GPS systems, but also in any time-offset measurement systems. For example, the present invention is applicable to measuring a time of fight of a radar probe signal that is sent from a radar antenna, reflected by the target object and then received by the radar antenna. As another example, the present invention is also applicable to determining a time of flight of a signal that is transmitted from a local sender to a local receiver to make a local position measurement. The time-of-flight technique can be applied to signal synchronization in communication systems. In this detailed description, a GPS receiver is used to illustrate the present invention. However, the present invention is not limited to application in a GPS receiver, but also in the applications mentioned above, as well as other applications.
(14)
(15)
(16)
(17) Step 302 provides a fine estimation, which estimates the offset and the frequency modulation each to a higher resolution. For example, in one embodiment of the present invention, a fine estimation searches over an offset between −0.5 chip to 0.5 chip, and a frequency modulation between −250 Hz to 250 Hz. Due to various reasons, either one or both of coarse estimation step 301 and fine estimation step 302 may not always succeed. At step 303, if an estimation step is not successful, coarse estimation step 301 is repeated. After a successful fine estimation step, the offset calculation channel may enter into a wait or idle step for a predetermined time (i.e., step 304), before repeating fine estimation step 302. The wait time reduces power consumption in GPS receiver 100.
(18)
(19) As shown in
(20)
where t.sub.c is the chip time. The probability that offset x is outside this search range in this embodiment is believed small. Initial distribution estimation P.sub.0(x) may be obtained from side information, such as assistance data from a cell tower. The initial search range can be the range covered by the communication range of the cell tower. In some embodiments, initial distribution P.sub.0(x) may be a rough estimate, while in other embodiments, a simple uniform distribution can be used, when only the range of offset x is estimated during signal acquisition. In other embodiments, when a standard deviation is estimated for offset x during signal acquisition, a Gaussian distribution may be used.
(21) In step 402, data samples of the received probe signal are taken, which are used to update the probability distribution P(x) at step 402. As probability distribution P(x) corresponds to the statistical states in this embodiment, an update to probability distribution P(x) at step 403 updates the statistical states. At step 404, an updated estimation for offset x is then performed based on the updated probability distribution P(x). A successfully update for offset x is output at step 405. Alternatively, if the calculate value for offset x requires refinement to meet a predetermined accuracy requirement, additional data samples of the received probe signals are taken by returning to step 402. Otherwise, i.e., if offset x cannot be estimated within the current search range, a failure signal is output at step 408. In that case, a new coarse estimate is performed by returning to coarse estimation step 301, for example, as illustrated above in conjunction with
(22) In one embodiment, a binary probe signal alternates between a +1 level and a −1 level, as illustrated in
(23) In one embodiment, the received signal is sampled at intervals each having a duration t.sub.s which is a fraction of chip time t.sub.c:
(24)
where M is an integer. In some embodiments, one can also choose M to be close to an integer, or a fraction, and achieve the same or similar advantages of the present invention. The signal may distort along the way of processing and transmission. Typically, the signal passes through a transmission filter, a modulator, a transmission antenna, the communication channel (e.g., free space), a reception antenna, a receiver filter, and a demodulator. The distortion may exhibit itself as an actual longer transition time than its nominal time, resulting in a slope or other artifacts. In one embodiment, M is chosen so that, even in the distorted signal, each transition completes in in less than duration t.sub.s. In one embodiment, samples of the demodulated signal (at IF) from only I or Q (i.e., in-phase or quadrature, respectively) channels are used. When the demodulated signal has close to zero phase, only I channel is required. In some embodiments, both in-phase and quadrature samples are taken. When only one of the I and Q channels is used, the samples are taken at relative time 0, t.sub.s, 2t.sub.s, 3t.sub.s, . . . , nt.sub.s, and are denoted y(0), y(1), y(2), . . . , y(n), . . . . Alternatively, when both I and Q channels are sampled, the output signal y(n) is complex-valued:
y(n)=yI(n)+jyQ(n) (2)
where j=√{square root over (−1)}, and yI(n) and yQ(n) represent, respectively, the in-phase and quadrature samples of the demodulated signal at time n.
(25) Let signal s(n) represent a replica of the probe signal with a time offset at the center of the estimated search range (“center probe signal”). Signal s(n) can be interpreted as the expected undistorted form of the received signal based on prior knowledge (e.g., knowledge from the coarse estimation step 301, described above). Further, let x denote the estimated offset between the noise-less demodulated signal and center probe signal s(n) (“relative offset”). The pseudo-range and the location of the receiver may be derived based on relative offset x. Choosing signal s(n) to have a relative offset at the center of the search range is merely for mathematical convenience. The offset of signal s(n) may be set at any other position within the search range (e.g., at the beginning of the search range).
(26) The probability distribution may be updated according to Bayes' Rule:
(27)
where P(x|y) is an estimation of the probability distribution of offset x after samples y of the demodulated signal are observed. Since P(y) is independent of x, P(y) is a normalization factor that need not be explicitly calculated. Taking the logarithm on both sides of equation (3), one obtains the log likelihood equation.
L(x|y)=L(x)+L(y|x)−L(y) (4)
where L denotes the log likelihood operation, or in general,
L(P)=log (P) (5)
Let γ(n) be modeled as the sum of a noise-less received signal z(n) and an additive noise ε(n):
y(n)=γz(n)+ε(n) (6)
where γ is the gain of the communication channel and ε(n) is assumed to have a Gaussian distribution. Signal z(n) may be assumed to be a shifted version of signal s(n) discussed above. (Empirically, based on analysis of the transitions of the received signal, this assumption is good for most cases.) That is:
z(n)=s(n−x) (7)
where x denotes the relative offset. Thus, z(n) is also referred to in this detailed description as “the shifted signal.”
(28) Without loss of generality, one may set an expect magnitude of the signal to be 1 (i.e. E[|s(n)|]=1). The signal-to-noise ratio (SNR) of signal y(n) is provided by:
(29)
where σ is the standard deviation of the Gaussian distribution of additive noise ε(n). Thus,
(30)
(31) As additive noise ε(n) is presumed Gaussian:
(32)
where β.sub.0 is a constant. Accordingly,
(33)
Assuming that the y.sup.2(n) and the s.sup.2(n) terms are constant, equation (11) can be rewritten as:
(34)
where β.sub.1 is a normalization factor. Define the quantity L′(y|x) (“un-normalized log likelihood of signal y(n) given offset x”) as:
(35)
(36) Since the correlation operation over two signals v(n) and s(n) is given by:
(37)
Equation (13) can be rewritten as:
(38)
Recalling from equation (8) above, the factor γ/σ.sup.2 can be obtained from the SNR and σ:
(39)
Normalizing the probability distribution ensures that the sum of all probabilities equals 1. Define the un-normalized probability distribution:
P′(x|y)=P(x)e.sup.L′(y|x) (17)
Therefore, P(x|y) is given by:
(40)
(41) Here, signal y(n) is a sequence of real numbers. Therefore, this result is directly applicable to the I or Q samples. In one embodiment, when the signal can be reliably demodulated, one need only use one of the two channels (e.g., the I channel alone). However, if signal y(n) is a sequence of complex numbers, i.e., when both I and Q channels are sampled (e.g., the signal of equation 2), the magnitudes of the correlation conv(y, s, x) and the gain γ are used:
(42)
(43) If M samples are taken of each of N chips, the total number N of samples is N.sub.cM. Using a straight-forward implementation of the correlation, with the search range of offset x given as N, chips, the total number C.sub.t of accumulate-multiply steps required to calculate conv(y,s,x) is:
C.sub.t=M.sup.2N.sub.cN.sub.cx (21)
(44) In one embodiment, the number of accumulate-multiply steps required may be reduced significantly by dividing the probe signal into multiple sections and categorizing each section into one of a set of categories, and processing each section according to the assigned category. The categorization step may be performed in a pre-processing of the probe signal.
(45) At run time, the samples of the demodulated signal are assigned to sections, guided by the center probe signal (i.e., signal s(n) described above). Each section is categorized to the same category as the corresponding section of center probe signal s(n). The samples of the demodulated signal are then accumulated in a set of accumulators A(k,m) based on category (k) and the sample index offset (m). The values in the accumulators are then used to calculate a correlation for each offset x in the search range.
(46) Under the categorization scheme, each section of a given category in any shifted probe signal of relative offset x within search range R.sub.x is indistinguishable from any other section of the same probe signal assigned to the same category. Search range Rx is referred to as the “allowed range”, or the “allowed offset range.” A signal that can be categorized to a finite number of categories is referred to as a “section-categorizable” signal. Binary signals are always section-categorizable.
(47)
(48) In
(49)
(50) Categorization may be used to reduce the number of arithmetic operations needed for calculating the correlation of each relative offset x. Formally, the correlation between the received signal and a shifted probe signal of relative offset x is given by:
(51)
where c denotes a section index, C denotes the number of sections within the correlation period, m denotes a sample index for the m-th sample within a section, s(c, m−x) denotes the signal value for the m-th sample in section c of shifted probe signal s(n−x), x being the relative offset, and y(cM+m) denotes the m-th sample in section c of the demodulated signal.
(52) Let K be the total number of categories to which a section can be categorized. As discussed above, within each category k, the signal value s(c, m−x) is the same for all c<C, relative offset x being within allowed range R.sub.x. Thus, signal value s(c, m−x) in a section categorized to category k may be denoted s(k, m−x). Accordingly:
(53)
where c∈k denotes section c that is categorized to category k. The accumulation of the samples of the demodulated signal in section c, i.e.,
(54)
may be performed using a set of accumulators. Let:
(55)
denote the accumulated value in the accumulator for accumulating samples of sections categorized to category k with section sample index m. Then, K×M accumulators are needed, one for each k and each sample offset index.
C.sub.a=MN.sub.c (25)
At step 1210, for each relative offset x, the correlation Conv(y,s,x) is calculated using the values in the accumulators:
(56)
Equation 26 shows that each correlation of length N is transformed into the sum of K correlations, each of M samples and MN.sub.cx offsets. In general, Equation 26 requires:
C.sub.sum=KM.sup.2N.sub.cx (27)
accumulate-multiply operations and
C.sub.sa=KMN.sub.cx (28)
additions. Accordingly, under the method of
C.sub.total=C.sub.a+C.sub.sam+C.sub.sa≅MN.sub.c+KM.sup.2N.sub.cx (29)
(57) There are numerous ways to implement the accumulators. In one embodiment, the accumulator operations are performed by a general purpose processor (e.g., a central processing unit, or CPU), or shared accumulator hardware. In that embodiment, the accumulated results (and states) of the accumulators are stored in different memory locations in the memory system. In another embodiment, the accumulators are implemented as hardware accumulators and the values to be accumulated by such accumulators are sent to them by the system. In other embodiments, one can use a combination of any of these approaches.
(58) The above method can be applied to any signal that is section-categorizable. In the example of
m.sub.s(n)=m.sub.s(cM+m)=s(cM) for all m<M and c<C (30)
Note that m.sub.s(n)m.sub.s(n)=1. One may also use other mask signals. For example, one may select the uniform signal value for each section of the mask signal to be the signal value of the center probe signal at the late boundary of the section. Since m.sub.s(n)m.sub.s(n)=1,
(59)
where y.sub.m(n)=y(n)m.sub.s(n) is the masked sample signal and s.sub.m(n−x)=m.sub.s(n)s(n−x) is the masked shifted probe signal.
(60)
(61) Other ways to categorize sections of a probe signal are described next, which allow correlations of larger offset ranges to be more efficiently calculated. For example, in one embodiment, the chip boundaries are used as section boundaries. The masking technology illustrated by Equations 30 and 31 may be applied to both the probe signal and the sample signal (i.e., the demodulated received signal). The sections of the masked center probe signal may be categorized by whether or not there is a signal value transition within the previous and the following chips. As there are 4 possible categories, the categories are denoted using 2-bit values. When there is a transition in the previous chip, the first bit of the 2-bit category is assigned a ‘1’; otherwise, it is assigned a ‘0’. Similarly, when there is a transition in the following chip, the second bit of the 2-bit category is assigned a ‘1’; otherwise it is assigned a ‘0’.
(62) Similar techniques allow even greater offset ranges. In general, one may: 1. use chip boundaries as section boundaries; 2. mask both the probe signal and the sample in the manner illustrated by Equations 30 and 31; and 3. categorize the sections using values in C.sub.n previous chips and C.sub.n following chips.
(63) Under this method, the category may be encoded by a 2C.sub.n-bit binary number, with each bit corresponding to whether or not the signal value in the current section is equal to the signal value in the corresponding one of chips at relative offsets −C.sub.n, . . . −1, 1 . . . , C.sub.n. If a signal value within a chip is the same as the signal value in the current section, the corresponding bit in the category value is ‘0’; otherwise, the corresponding bit in the category value is assigned ‘1’. As a result, the category value can be any of 2.sup.2C.sup.
(64) One can also extend the allowed offset range for calculating correlation, if one sets the section boundaries at the mid-points of chips, such as shown in
(65) 1. use mid-points of the chips as section boundaries;
(66) 2. mask both the probe signal and the sample in the manner illustrated by Equations 30 and 31; and
(67) 3. categorize each section using a category value that encodes whether or not there is a transition in the current section and each of C.sub.n previous sections and C.sub.n following sections.
(68) Under this method, the category value is a 2C.sub.n+1-bit binary number. The value of each bit corresponds to a section having one of the relative offsets: −C.sub.n, . . . −1, 0, 1 . . . , C.sub.n. If there is transition within the corresponding section, the corresponding bit is assigned a ‘1’; otherwise, the corresponding bit is assigned a ‘0’. The allowed offset range under this method is [−(C.sub.n+½)t.sub.c, (C.sub.n+½)t.sub.c], and the category value may be any of 2.sup.2Cn+1 values.
(69) For binary probe signals, the number of arithmetic operations in a correlation calculation for a given relative offset x may be further reduced. For example, consider two functions v and u, where u have binary values (i.e. the value of u(i) is either 1 or −1), similar to the probe signals discussed above. Then the correlation of signals u, v for a relative offset of x is given by:
(70)
(71) Because a probe signal of the type we discussed above are binary-valued, and multiple samples are taken at every chip, the value of the term u(i−x−1)−u(i−x) is often zero. Hence,
(72) Conv(u, v, x) may be calculated recursively in the following manner Step 1: calculate Conv(u, v, 0); Step 2: initialize x=0; Step 3: calculate
(73)
(74) For example, when v(n) if a +1 level to −1 level transition function in a section of center probe signal s(n):
(75)
Then,
(76)
(77) Consequently, the correlation may be calculated by order M steps, using order M additions, order M subtractions and order M multiple-by-2 operations, rather than the order M.sup.2 multiplications and additions required for a conventional calculation.
(78) The powers of the signal and the noise of the received signal may be estimated using the correlation results. For a general digital signal h(n), its power of the signal is defined as |h(n)|.sup.2. Therefore, the power of signal y(n), represented by N samples, is given by:
(79)
Let x.sub.max to denote the relative offset that yields the maximum correlation magnitude C.sub.max, i.e.,
C.sub.max=Conv(y,s,x.sub.max) (38)
The expected value of the gain, E[γ], is given by:
(80)
The power of the signal, P.sub.s, can be obtained using the maximum correlation value:
(81)
The signal-to-noise ratio can be calculated using:
(82)
In a GPS/GNSS system, P.sub.y>>P.sub.S, so that:
(83)
The standard deviation a of additive noise ε (approximated by a Gaussian distribution) can be estimated using:
σ=√{square root over (P.sub.y)} (43)
When both the signal-to-noise ratio SNR and signal power P.sub.y (or standard deviation σ) are known, the expected magnitude of the maximum correlation value C.sub.max is given by:
E[|C.sub.max|]≅N|E[γ]|=Nσ√{square root over (SNR)}=N√{square root over ((SNR)P.sub.y.sup.2)} (44)
where N is the number of the samples in the correlation calculation. The expected magnitude of maximum correlation value E[|C.sub.max|] can be used to detect if the offset x is within the search range (i.e., the estimate of offset x is successful). If the measured maximum correlation value C.sub.max is too small:
|C.sub.max|<α.sub.cmaxE[|C.sub.max|] (45)
where α.sub.cmax is a design parameter, then the relative offset x is likely out of range. In some embodiments, one may choose α.sub.cmax=10.
(84) In some embodiments, one or more samples may be skipped (i.e., not accumulated in the accumulators). In one embodiment, for an offset search range of [t.sub.c/2, t.sub.c/2], using single-T categorization and masking as discussed above, the contribution of a sample in a non-transition section (i.e., category 0) to each correlation is the same, regardless of the relative offset. Hence, contributions by “category 0” sections do not change the relative likelihood for any relative offset x. Thus, such sections do not affect the end result after normalization. Thus, accumulation of samples in category 0 sections may be skipped.
(85) In each section, the relative offset x of the samples in the section is defined with respective of center probe signal s(n). The original sample's index is represented by n=cM+m, where c is the section number and m is sample section index. Within a given section, if center probe signal s(n) has a transition just between sample index
(86)
and sample index
(87)
sample index
(88)
is the time point defined to have a relative offset x=0. Therefore, s(cM+m) has a relative offset
(89)
In one embodiment, M is chosen to be an even number. In other embodiments, where M is an odd number, one can use floor(M/2) instead of M/2 to be the time point with zero relative offset.
(90) The total number of arithmetic operations may be further reduced, taking advantage of the probability distribution of offset x. For example, taking into account samples that have been taken and processed, offset x is more likely to be within a smaller range of relative offsets. In one embodiment, calculations involving samples that are unlikely to correspond to a rapidly changing portion of the probe signal can be skipped. The rapidly changing part of a binary probe signal is the part that is close in time to where a transition from +1 level to −1 level, or from level −1 to level +1, occurs. The samples that are unlikely to correspond to a rapidly changing part of the probe signal are likely to correspond to an unchanging part of the probe signal. Thus, these samples are unlikely to contribute to a measure that distinguishes between the likelihood of different offsets, and thus may be skipped (i.e., need not be accumulated in the corresponding accumulators).
(91) In category 1 sections (i.e., sections in which a transition occurs in the corresponding probe signal) under single-T categorization and masking, the probability that a transition happens just after the sample at relative offset x equals the probability that the received signal has relative offset x. Hence, one can use the probability of the relative offset to determine which samples may be skipped. If the probability of relative offset x is smaller than a certain threshold, the calculations corresponding to relative offset x may be skipped.
(92) Other probabilities may also be used to determine which samples in sections that are not likely to have a transition may be skipped. For example, in one embodiment, an average of probabilities P(n−1) and P(n) can be used to determine if the sample at relative offset n may be skipped:
(93)
This is because, when n is out of the search range for relative offset x, P(n)=0. Average probability P.sub.2(n) should be normalized, if needed. Another way to determine to skip is to use a cumulative probability:
(94)
Under this scheme (“probability threshold scheme”), one may select a value P.sub.c0, and skip the samples at certain relative offsets c when P.sub.c<P.sub.c0 or 1−P.sub.c<P.sub.c0. In some embodiments, P.sub.c0 may be chosen to have a value between 0.1 and 0.3, for example. Alternatively, P.sub.c0 may be adjusted empirically or determined by a simulation.
(95)
(96) New samples are taken and added to accumulators A(k,m) continuously. The accumulators are not reset between iterations. A correlation is calculated in between two iterations (e.g., iterations of steps 1201 to 1209, for the method illustrated in in
(97) Probability distribution 1102 results after some samples of the demodulated received signal have been taken and processed. The probabilities of relative offsets −3 and 4 are found less than threshold 1111. Hence, samples of the demodulated signal at relative offsets −3 and 4 are skipped in the next iteration, leading to probability distribution 1103. At this point, the probabilities of relative offsets −3, −2, 3, and 4 fall below probability threshold value 1111 and thus samples at these relative offsets are skipped in the next iteration. Additionally, samples at relative offsets −1 and 2 are skipped in the following iterations based on probability distribution 1104 and 1105.
(98) During this process, although samples at certain relative offsets are skipped, the correlations of all relative offsets inside the search range are still calculated. The skipped samples are not accumulated, which is equivalent to having a zero signal value). Thus, the probability of any relative offset may still change (and may sometimes even become larger). For example, even though samples corresponding to relative offset −1 are not accumulated immediately after probability distribution 1104 is presented, the probability of relative offset −1 in a subsequent probability distribution (i.e., probability distribution 1106), the probability for relative offset −1 actually increased. In the iteration after probability distribution 1106 is presented, accumulation of samples at relative offset −1 resumes. By keeping track of the probabilities for all (or at least some) relative offsets in the search range whether or not samples are accumulated for some of the relative offsets within the range, the resulting method is robust to statistical fluctuations.
(99) Often, a single relative offset remains that exceeds threshold 1111, such as shown for relative offset 0 in probability distribution 1107. In one embodiment of the invention, the sampling and the probability updates are kept running after that event, such as illustrated by probability distribution 1108, which results after one or more iterations following probability distribution 1107.
(100) The number of samples that is accumulated before each probability distribution (or other statistical states) is computed need not be fixed. Selecting an appropriate value at any given time is a trade-off between avoiding accumulating samples that should be skipped and avoiding computing probability updates too often. The optimal value minimizes the overall amount of computation, which results in reduced power consumption.
(101) Sample-skipping may be implemented in any of a number of different stages in the system. For example, in one embodiment, the signal samples that are skipped are received into the analog-digital converter (ADC). In another embodiment, the signal samples are received into the ADC, but the converted digital samples are not saved into memory. In another embodiment, the samples are saved in memory but are not provided to the accumulators.
(102) Signal samples maybe buffered by the system. In one embodiment, each sample is processed directly after it is received into the ADC. In another embodiment, after digitization in the ADC, the samples may be buffered in memory for processing at a later time.
(103) Sample-skipping is based on the principle that one can avoid taking or using samples that have such a low probability of contributing to a probability distribution as to affect differentiating among the high-probability possible offsets of the signal. This result can be achieved in many in different ways. In some embodiments, one can achieve the same or similar results by adjusting the sampling frequency: 1, taking samples at a lower initial sampling rate; 2. calculating a probability distribution of the possible offsets; 3. when a range of offsets have probabilities that are significantly less than the others, those low-probability offsets are marked to be skipped; 4. when the remaining offset range (i.e., the range of offsets corresponding to samples that are not skipped) is small enough (e.g., less than a half of the previous range), increasing the sample frequency (e.g., by a factor of 2); and 5. repeating steps 2-5 until the desired offset resolution is archived.
(104) The value in the accumulator for the samples at the corresponding relative offset may be used to provide a finer estimate for the relative offset, e.g., an estimate with a resolution finer than the sampling time.
(105) In one embodiment, the system keeps track of the number of samples N.sub.s(k, x) that are added into the accumulator, where k is the category and x is the relative offset. The relative offset translates into the sample index by the relation m=x+M/2−1. (The accumulator value can also be looked up A(k, x), using this relation.)
(106) Denote a sub-sample portion of the relative offset to be x.sub.s. When a transition occurs just after the sample at relative offset x, i.e. x.sub.s=0, the expected value of the accumulator (denoted as A(1, x), where 1 denotes the category that has a signal transition)
Ā=N.sub.s(1,x)√{square root over ((SNR)p.sub.y)} (49)
where p.sub.y is the average power of the demodulated signal and where SNR is the signal-to-noise ratio of the demodulated signal. When the transition occurs just before the sample, i.e. x.sub.s≈−1, the expected accumulated value in the accumulator is −Ā. The fractional relative offset x.sub.s of the sample can be calculated by interpolating between the cases.
(107)
(108) Note that A(1, x) in equation 50 represents accumulation of the samples of the demodulated received signal. Thus, A(1, x) is presumably a real number. Any imaginary part can be disregarded in equation 50. The overall estimate of the relative offset x.sub.a is given by:
x.sub.a(x)=x+x.sub.s(x) (51)
When there are more than one estimated relative offset, the overall offset x may be estimated by a weighted sum of the x.sub.a(x):
(109)
where P(x) is the probability of relative offset x. In some embodiment the summation is over all x in the search range. In other embodiments, the summation can be over only the relative offsets that has probability larger than the probability threshold. Equation 52 provides a better estimation of the offset than the expected value of the probability distribution. However, when the probability is widely distributed over the search range, Equation 52 may not be effective. Hence, a simple expected value method may be more appropriate in some embodiments.
(110) The system may change over the time samples are taken and processed. For example, the user's location may change, the local clock may drift, or other conditions may change. In some embodiments, such changes may be significant. One way to handle such changes is to update the probability distributions over time, such as to let the correlation values (or, equivalently, the log likelihood) fade away over time:
(111)
where conv.sub.0(y,s,x) is the correlation value at an initial time point and conv.sub.t(y,s,x) is the correlation value after a time interval τ (i.e., the fading time). Variable τ may be seen as a design parameter that depends on the dynamics of the object being measured. Roughly, a sample that is taken more than a predetermined time τ prior to the current time should not contribute significantly to the current correlation value. For example, in one embodiment, for an object moving at a speed of about 30 meters per second, variable τ may be set to one second. Variable τ may also be adjusted empirically or determined by simulation.
(112) As new samples are taken, the correlation calculated using the new samples may be added to the then existing correlation values. Therefore, the accumulator values can also be faded:
(113)
(114) The un-normalized log likelihood may also be similarly faded:
(115)
(116) Many of the specific embodiments discussed in this detailed description are selected for notation convenience. Many variations may be used to achieve the same results, For example, in one embodiment, one may use the following procedure: 1. take samples around the transitions of the signal; 2. adjust the sign of the samples taken according the direction of signal transition (i.e., from level +1 to level −1 or from level −1 to level +1); 3. calculate the correlations by first grouping the samples.
(117) This procedure is equivalent to the masking-categorization (with k=1) procedure described above in conjunction with
(118) Note that different components of this invention can be selected to use or not use in different embodiments of this invention. For example, in one embodiment, one can chose to only use the skipping method to reduce the total amount of calculation. One can take samples that are expected to be close to the jumps of the signal and skip the samples that are expected to be far away from the jumps. Then, one can use the traditional method of calculate correlation based on those signals. In that embodiment, the categorization component is not used, however, total mount of calculation/power is still reduced comparing to the methods without skipping.
(119) Numerical oscillator 203 of
N.sub.I(n)=cos(ϕ+2nπft.sub.s)
N.sub.Q(n)=sin(ϕ+2nπft.sub.s) (56)
In some embodiments, one can simply use binary signals rather than sin and cos signals:
N.sub.I(n)=sign(cos(ϕ+2nπft.sub.s))
N.sub.Q(n)=sign(sin(ϕ+2nπft.sub.s)) (57)
Where sign(.Math.) is the sign function:
(120)
(121) To avoid costly floating-point calculations, angular rate ω=2πf t.sub.s and phase ϕ may both be represented as integers. The sign(cos(x)) and the sign(sin(x)) can be calculated using the total phase at sample n, which is given by: ϕ.sub.n=ϕ+ωm.
(122) The RF front end (e.g., RF Front end 102 of
I.sub.O(n)=I.sub.i(n)N.sub.I(n)−Q.sub.i(n)N.sub.Q(n)
Q.sub.O(n)=I.sub.i(n)N.sub.Q(n)+Q.sub.i(n)N.sub.I(n) (59)
where I.sub.O(n) and Q.sub.O(n) are the output data samples, and I.sub.i(n) and Q.sub.i(n) are the data samples.
(123) In some embodiments, frequency and phase estimations can be done using conventional frequency and phase tracking loops. To reduce the amount of calculations and the power consumption, the following or a similar method may be used.
(124) Coarse estimation (or signal acquisition) provides an initial estimation of the frequency modulation. Initially, the phase and the frequency of NCO 203 may be set to zero or any other convenient initial value. Then, samples may be taken for the signal acquisition calculations. After signal acquisition, the frequency and phase of NCO 203 may be set to initial values:
f=f.sub.0; ϕ=0 (60)
where f.sub.0 is the frequency estimation from the signal acquisition. Next, one way to estimate the phase is to take some samples during a time interval T.sub.c and calculate a number of correlations over the search range determined by the signal acquisition step. The phase ϕ.sub.m of the correlation with the maximum absolute value, C.sub.max, provides an estimation of the average remaining phase during the time interval T.sub.c.
ϕ.sub.m=phase(C.sub.max) (61)
In a preferred embodiment of the invention, T.sub.c is chosen using the following criteria: 1. T.sub.c should be short enough so that phase change δϕ during the time period is small. For example, one criterion for T.sub.c may be:
(125)
(126)
(127) The frequency can be estimated by performing two phase estimations separated by time interval T.sub.m. T.sub.m may be selected to be as long as possible, but is kept short enough so that the phase change during the period should be less than 2π, so as to avoid phase skipping. That is,
T.sub.mδf2π<2π (64)
where δf is the accuracy of the frequency estimation before the phase measurements. This implies:
(128)
In some embodiment, a safety margin may be applied (e.g., T.sub.m=0.3/δf).
(129) Denote the results of a first and second phase measurements ϕ.sub.m1 and ϕ.sub.m2 and their accuracies (i.e., resolutions) δϕ.sub.1 and δϕ.sub.2, respectively. The measured frequency may be obtained by:
(130)
The accuracy of frequency, δf after the two measurements is given by:
(131)
After the measurements, the phase and the frequency of the numerical oscillator may be updated using the following relations:
ϕ.sub.+=ϕ.sub.−−ϕ.sub.m2
f.sub.+=f.sub.−−f.sub.m (68, 69)
where ϕ.sub.− and f.sub.− are the phase and frequency of the NCO before the update and ϕ.sub.+ and f.sub.+ are the phase and frequency of the NCO after the update, respectively.
(132) In one embodiment, this two-step phase-frequency update is run each time prior to performing a fine offset estimation. In some other embodiment, this two-step phase-frequency update is run multiple times recursively until a certain frequency accuracy level is achieved. For example, recursive updates may run until δf<10 Hz.
(133) In one embodiment of the invention, a Kalman filter can be used to estimate the phase and frequency. This is a more robust and accurate method than the two-step phase-frequency method, at the expense of greater computation (i.e., greater power).
(134) The state variables for the Kalman filter may be phase and frequency:
(135)
(136) The state update matrix A may be modeled as:
(137)
(138) The process noise may be modeled by:
(139)
where w.sub.ϕ and w.sub.f denote the process phase noise and frequency noise, respectively. These noises are introduced by the local clock oscillator and user movement. The state update function is thus:
X.sub.n+1=AX.sub.n+w (73)
The variance of w may be determined by the specification of the oscillator and the dynamics of the application. In one embodiment, the variances of the process error may be modeled as being proportional to the time passed:
σ.sub.φ.sup.2=P.sub.ϕt.sub.m
σ.sub.f.sup.2=P.sub.ft.sub.m (74)
where P.sub.ϕ and P.sub.f are the power of the phase random-walk noise and the power of the frequency random-walk noise, respectively. Both the phase random-walk noise and the frequency random-walk noise may be a combination of a clock phase or frequency random-walk noise and a phase or frequency random-walk noise due to the receiver's random motion. In practice, P.sub.ϕ and P.sub.f can be estimated from the clock specification and the dynamics of the receiver. These parameters may also be adjusted empirically or by simulation until acceptable performance is reached. In another embodiment, the variances, as functions of time t.sub.m, may be estimated by measuring the Allan Variance of the local clock, and considering the receiver's dynamics.
The process error covariance matrix is
(140)
Denote the measurement of the remaining phase as ϕ.sub.m, which can be obtained using Equation 61 above. Alternatively, if the remaining phase is small and the noise level is high, ϕ.sub.m may be obtained using:
(141)
where imag(.Math.) is the function that extracts the imaginary part of a complex number. E[|C.sub.max|] denotes the expected value of the magnitude of C.sub.max. The measurement Y is given by:
Y=CX+u (77)
where u denotes the measurement noise and C denotes the output matrix:
C=[10] (79)
The variance σ.sub.u.sup.2 of u, which is a design parameter, is given by:
(142)
The measurement y(n) is calculated using:
y(n)=ϕ.sub.m±ϕ(n) (80)
The covariance of the measurement is:
Σ.sub.u=[σ.sub.u.sup.2] (81)
The Kalman filter maintains an estimation of X and its covariance matrix Σ.sub.u base on parameters A, C, Σ.sub.w, Σ.sub.u, measurements y and the time of the measurements. The Kalman filter's time update and measurement update can be performed using the conventional Kalman filter constructs: 1. Time update:
X.sub.n+1=AX.sub.n
Σ.sub.X.sub.
X.sub.n.sup.+=X.sub.n.sup.−+Σ.sub.X.sub.
Σ.sub.X.sub.
The Kalman filter's covariance matrix Σ.sub.X offers a good estimate of the frequency error or accuracy δf, which may be used to determine the time interval T.sub.m between measurements:
(143)
or with a safety factor a.sub.s<1.
(144)
In one embodiment a.sub.s=0.3, so as to avoid phase wrapping or skipping and phase accuracy may be maintained. The duration of correlation time t.sub.c can be similarly determine, using the two-step phase-frequency method described above.
(145) In one embodiment of the invention, the behavior of the phase-frequency Kalman filter is coupled with status of the offset measurement: 1. choose the number of samples needed for correlation at the current SNR, such that the signal-to-noise ratio SNR of the correlation result satisfies the following equation with design parameter α.sub.c≅1.
(146)
(147)
δϕ=2πδft.sub.c (90) If the phase error δϕ is larger than a predetermined threshold ϕ.sub.α, the correlation time is reduced to reduce the phase error:
(148)
(149) Putting a system into a sleep mode in which minimal energy is used—reduces the overall energy cost.
(150) Sample skipping may be realized not just at the accumulators described above. For example, if a sample need not participate in any of the computation, the sample can be skipped at the RF front end (e.g., not even selected for analog-to-digital conversion). Alternatively, a sample may be skipped in an offset estimator.
(151) Multi-path is a major source of error in a GPS receiver and other time-of-flight measurement systems. The multi-path error can be detected using the accumulator results of the sections that have a transition (i.e., category 1 sections, when single-T categorization and masking are used). In one embodiment, a difference in accumulated values between adjacent samples A.sub.δ(x) may be used to find the signal that arrived the earliest, which is more likely to be a line-of-sight path:
A.sub.δ(x)=A(1,x)−A(1,x−1) (93)
In this regard, the total number of samples N.sub.s2(x) accumulated in the two accumulators is a useful parameter, given by:
N.sub.s2(x)=N.sub.s(1,x)+N.sub.s(1,x−1) (94)
When the following inequality is satisfied for any relative offset x, one may consider a signal detected:
|A.sub.δ(x)|>α.sub.A√{square root over (N.sub.s2p.sub.y)} (95)
(152) Among the detected signal, the one with the earliest relative offset may be considered a line-of-sight signal. α.sub.A is a design parameter, which is a given value between 2 and 3, in one embodiment. To avoid a multi-path error, skipping samples that contribute to measuring an early signal should be avoided. In one embodiment, a sample is skipped when: 1. all samples with a greater relative offset (i.e., samples of later arrival) are skipped; or 2. the sample has a greater offset (i.e., samples of later arrival) than the offset of a signal detected based on equation 95.
(153) The phase measurement may be obtained using any carrier-phase method that can be used to estimate an object's position. Carrier-phase methods are described, for example, in the GPS/GNSS literature (e.g., “Global Position System: Signals, Measurement and Performance” (“Enge”), by Pratap Misra and Per Enge, and its cited references).
(154) In a multipath environment, different components of the signal arriving at different times to the receiver have different phases. The accumulator values and the correlation results can be used to improve the phase estimation of the line-of-sight signal. In one embodiment, one can use the phase of the correlation value of the earliest arriving signal as the carrier phase, since it is a good estimate of the carrier phase of the signal of the shortest path (i.e., the line-of-sight signal). In another embodiment, one can detect the second earliest arriving signal using a method that is similar to that used to detect the earliest arriving signal discussed above). If the second earliest arrived signal is detected, one can use the accumulator values that are associated with offsets earlier or equal to the offset of the second earliest arrived signal to calculate the carrier phase of the line-of-sight signal. In another embodiment, for simplicity, one can use the accumulator values that are associated with offsets earlier or equal to the offset of the earliest arrived signal to calculate the carrier phase of the line of sight signal.
(155) In applying any of the methods described above, one may trade-off between performance, power consumption and complexity. In some embodiments, some of the techniques described are not be used, or may be adjusted for a given application. For example, while the probability distribution is used in some embodiments for offset measurement, other methods exist that do not probability distribution directly. For example, in one embodiment a set of statistical states S(x) is kept by the system. In that embodiment, offset measurement is achieved by: 1. initialize S(x) by the log likelihood of the prior probability distribution of relative offset x.
S(x)=L(x) (96) 2. accumulate samples and calculate correlations using these samples. Denote the result of the correlation for relative offset x as C.sub.b(x): 3. construct function CL (x) such that the sum of CL (x) over all relative offset x in the search space for relative offsets is zero; that is:
(156)
where N.sub.x is the number of estimated offsets over the search space. 4. update S(x) using:
S.sup.+(x)=S.sup.−(x)+α.sub.scC.sub.b′(x) (98) where S.sup.−(x) and S.sup.+(x) are the states before and after the update, and where α.sub.sc is a design parameter, having the value, for example, 0.3 in one embodiment. 5. keep only the positive terms in S(x)
(157)
(158) In this method, statistical state S(x) provides an indicator of the probability distribution. When S(x) is small (e.g., S(x)=0), the corresponding probability P(x) of relative offset x is small, and thus the corresponding samples may be skipped.
(159) The above detailed description is provided to illustrate specific embodiments of the present invention and is not intended to be limiting. Numerous variations and modifications within the scope of the present invention are possible. The present invention is set forth in the accompanying claims.