A METHOD AND APPARATUS FOR CORRELATING DATA
SEQUENCES
The invention relates to a method and apparatus for correlating data sequences.
Correlation of data sequences has multiple applications for example in global positioning systems (GPS). In GPS a receiver determines its position based on signals received from at least three satellites. The receiver knows the position of each satellite and, by processing the received signal from the respective satellites to establish the respective distances can determine its exact own position. The signal from each satellite comprises a unique and identifiable binary pseudo-random data set or sequence with a length of 1023 bits . In the case of GPS the sequences are created using Linear Feedback Shift Registers (LFSRs). The sequences are of a length N = 2b -1 where b is an integer (the number of bits in the LFSR) and in many cases also an even number (10 in the case of GPS). To establish its distance from a satellite from which a signal is received the receiver determines the time delay in the received sequence signal by comparison with an internally simultaneously generated identical sequence.
In conventional approaches this comparison is carried out using correlation techniques. Correlation is a technique used in many applications such as radar, positioning systems and communications. If we assume we have two sequences X and Y of length M and N symbols respectively:
Y is a continuous repeating pattern (shorter than X) and X is an input to the system containing noise and a delayed, attenuated copy of Y. We are attempting to locate the phase of Y in X. In other words we wish to find the delay to apply to Y that gives it the best match with X. The cross correlation C of X and Y is defined as:
Af-I
C = (C0-C1-C-..., cN_λ } where c, = ∑ x} ■ ^ (3)
7=0
In such an application, the cross correlation C is used to find the value of i for the highest value of c,- and the other values are discarded. This value i indicates relative sequence phase and hence the time delay of the received signal. This is appropriate since the value c,- is a representation of the quality of the match between X and Y for Y delayed by i. As the sequence length is often quite long this implies a high computational complexity as each value c,- must be evaluated.
In the case specifically of GPS a further problem is that processing can take a long time because of the requirement to have correlators for every satellite (30 or so) and every possible delay (1023) would be too expensive, so hardware is reused many times to search for the satellites. Thus it can take an undesirably long time to acquire a GPS position.
One known approach to improving correlation techniques is described in
GB 1528859 in which three different bit sequence frequencies are applied sequentially to a bit code and correlation peaks for resolving range-velocity ambiguity are determined by a range ambiguity processor in conjunction with
the known code word slippage rate. However the approach requires a large amount of hardware and is time-consuming.
A further known approach is described in US4041284 in which a digital input signal is converted into an analog modulo integer which is then correlated and converted back to a digital signal.
The invention is set out in the claims.
Embodiments of the invention will now be described, with reference to the drawings, of which:
Fig. 1 is a general diagram showing a GPS position determination technique; Fig. 2 shows a simplified bit correlation technique; Fig. 3 is a schematic diagram of a correlator stage;
Fig. 4 is a schematic diagram of multiple tiled correlator stages;
Fig. 5 is a schematic diagram of a residue correlator according to the present invention;
Fig. 6 shows an audio application of the invention; Fig. 7 shows a method of residue image creation;
Fig. 8 shows residue image peak position combination to acquire the cross- correlation peak position for the correlated portions of the source images.
Referring firstly to Fig. 1 a GPS receiver designated generally 10 receives signals from a plurality of GPS satellites 20, 30, 40, 50 each sending a respective signal 22, 32, 42, 52 which can be used to establish a distance d1? d2, d3, U4 between the receiver 10 and the respective satellite.
As described above, in known arrangements the receiver 10 establishes the distance between it and each satellite, dl5 d2, d3, d4, by examining the signal delay from each satellite by applying correlation techniques as set out in equations 1 to 3 above. From this information, as is well known, the receiver is able to establish its exact position.
Fig. 2 shows a simplified correlation technique for the purposes of explanation — it will be appreciated that in reality the code sequence lengths and approaches are significantly more complex. Referring to Fig. 2 a code Y {0, 1, 0, 1, 1} is generated at a receiver corresponding to the code X received from a satellite. The received code, X includes Y and it is necessary to find Y's phase within X to determine the time delay and hence distance. Accordingly the code Y is aligned with each possible position along the code X as can be seen from the figure with Y successively delayed by 0 to 3 units. In each case the sum of the products of aligned elements is computed to find the correlation co-efficient as set out in equation 3. In the present case it can be seen that in the first position the correlation co-efficient C0 sums to 2, at the second position C1 = 1, at the third position y3, C2 = 3 and at the fourth position C3 = 1 Accordingly the correlation peaks at C2 and the phase of Y within X is determined accordingly as being delayed by 2 units.
In order to reduce the computational burden the present invention recognises that the correlator output can be shortened and still contain enough information to allow the correlation peak to be determined.
In particular, where the peak correlation position i is the value of interest it is possible to use two or more shorter slightly modified correlators ("residue correlators") in which an input is accumulated modulo the length of the correlator to perform the same function as a full length correlator.
A residue correlator is a correlator in which the output is shortened to produce a residue correlation D of length P values such that:
D =
where d
k = ∑c
k+ι.
p (4)
In other words the first element of D in equation 4 is the sum or accumulation of the first element and each subsequent Pth element in cross-correlation C, the second element of D is the sum of the second element in C and each subsequent PΛ element and so forth such that D1, for a first residue correlator, is given by:
A = {(C0 + CP + C2P +-)>(C1 + CP+1 + C2P+1"4 } (5)
As a result it will be seen that one of the elements of D] will have the correlation peak C; in it but more information is required to find where within the element d the correlation peak lies. For example if it is in d0 the correlation peak could be any of C0, cP, c2P etc. As described in more detail below, therefore, the exercise is repeated for a different residue correlation summing, for example, every Rth element of c giving:
D2 = {(c0 +cR +c2R +...),(c, +cΛ+1 +c2R+l +...). } (6)
Then it is possible to find q, the correlation peak within C, from identifying and processing both residue correlation peaks kdι max i.e. the value of k for which the first residue correlator output value is at its maximum, and kdi max as set out below.
A residue correlator can be created by using a conventional correlator with summing feedback on one sequence to form an accumulated sequence Yacc since:
Accordingly it can be seen that each element of D can be mathematically derived by correlating each element of X with the accumulated Pth, (P+l)th and so forth elements of Y.
If the peak in the correlation C of X and Yacc is sufficiently distinct, the position of the peak kdmax in the residue correlation D of length P will be related to the position of the peak zcmax in the correlation C by the equation:
K^ = ieπ«κ -I -P = KrJp where l ™ m integer in the range 0 to [N/p\- 1 (8)
As discussed above, for a single residue correlator, the value of z' cmax cannot be determined from kdmax since / is not known. However, if more than one residue correlator Dr is applied to a single input pair X and Y where the lengths of the
residue correlators Pr are not equal, it is possible to view the peak residue correlator positions kd ^x as the residues modulo Pr in a residue number system.
If the range of the number system created by the moduli Vr is at least 0 to N-I, conventional residue number system reverse conversion techniques (one of which is the Chinese Remainder Theorem as will be well known to the skilled reader and described at http://mathworld.wolfram.com/ChineseRemainderTheorem.html, although many other well known methods exist that are equally appropriate) can be used to solve equation (8) and establish zcmax from the set of residue correlations Dr .
For example according to one approach, particularly for GPS implementations, in order to establish icmax from the set of peak positions &rf max 5 regardless of whether or not the correlator lengths are relatively prime an approximation C of the correlation C may be created by combining the residue correlations for each position in C . In this case:
ci ~ f\ dx ,d2 , and so on for all residue correlator outputs (9)
that is to say, referring to equation (4) to (6)
c< = f(( dχ , d2o ), and so forth ] (10)
In other words, the value of cf' is a function of the residue correlator values that the value c; is accumulated into according to equation 4. In this equation, the function f( ) may be a product, scaled product, root-mean-square, addition, root- sum-square, or many other functions each of which have slightly different characteristics that may be desirable in a particular application. The value zcmax
is found by finding the peak in C by a search (sequential or otherwise) through the values C4'.
It will be appreciated that any appropriate numerical technique can be adopted for solving for icmax, that the number and size of residue correlators adopted can be selected in any appropriate manner and that any appropriate subset of the data element of the sequence can be accumulated. However it is found that the simplest form of residue number system that can be applied in this way is a two residue system. The lengths of the residue correlators are chosen such that the lengths are relatively prime and the product of those lengths is greater than or equal to the length of the correlator required. A special case exists for such systems where the Y sequence is of length N = 2b - 1 and h is an even integer.
In this case a special choice of moduli
-1 and
+1) exists since:
As the code bit sequence in GPS technology is of length (2b - 1) = 1023, b = 10, a 2 residue correlator approach is particularly appropriate in GPS correlation techniques. In this case a preferred function to be applied to equation (9) is a simple product function to give:
C= ( -) (12)
In that case the peak value c{ in C will give a phase position i of Y in X.
Where the number of residue correlators chosen exceeds the number required for the full range of possible outputs, redundancy exists. This redundancy may be used to detect an incorrect peak or provide a reliable calculation for the overall peak in the presence of incorrect residue correlator peak values. A suitable method for this Redundant Reverse Conversion is described at http://eprints.ecs.soton.ac.ulc/7134/01/llv-lh-vtcfall-2001-2.pdf. An alternative approach is to use a function that excludes individual erroneous results from a set of possible values returned by a redundant operation such as, but not limited to a median function, and then employ the reverse conversion technique as described previously.
It should be understood that the above mentioned GPS correlation techniques may also be applied to the European Galileo satellite positioning system which employs longer data sequences or any future system.
The invention can be put into effect in any appropriate manner including hardware, software, firmware and any other appropriate implementation of the relevant algorithms, for example, using VHDL, very high speed integrated circuit hardware description language, to describe the logic circuit constructed according to the invention
To demonstrate the approach described above, the hardware block components required for a residue correlator pair, suitable for correlation of the pseudo random data sequences generated in a GPS CA (coarse acquisition) code transmission for implementing the correlation approach described above with reference to equation (7) and provide values of kdmaκ allowing equation (8) to be
solved are shown schematically. This data sequence is generated using a 10 bit LFSR. For the simplest implementation, the residue correlators D1 and D2 have lengths P1 = 31 and P2 = 33.
A conventional correlator stage or "tap" is shown at 200 in Fig. 3 and contains a multiply accumulate section 202, 204, and a clocked register delay, 206, 208 with inputs Xjn, Yjn, and outputs Yout, Cout.
The configuration of the tap allows a correlator to be produced simply by tiling 1023 taps as shown in Fig. 4. In this schematic implementation, the X and Y inputs and C output have adjustable bit widths. For the conventional correlator 2 bit X and Y inputs and a 16 bit C output 210 were used. According to the arrangement shown, Yin is aligned in successive positions with Xin, and Cout obtained, Yin being shifted along by virtue of the clocked register of delay 206.
Accordingly it can be seen that the product of aligned elements of Y and X are summed in the first position of Y at the first tap 212 to give the first correlation co-efficient C0, the input is delayed and clocked through to the second tap 214 so that Y is shifted and correlated against X again to give the second correlation co-efficient and so forth until C is obtained.
According to an embodiment of the invention the residue correlators are created by adding two feedback paths 300, 302 to the Y input of a conventional correlator having P taps (when every Pth value of Y is accumulated) as shown in Fig. 5. The feedback increases the possible range of the values at the Y input of the tap so the Y input in the taps are set to 7 bits. Additional analysis for a given sequence at the input Y will often result in a smaller requirement for the
number of Y bits in the taps. This provides a range of approximately 32 times the input to the residue correlator and allows for the summation due to feedback defined in equation (5).
The additive feedback 300 via summation section 308 from the end of the correlator combined with the subtracted delayed input 302 through Delay 304 and subtractor 306 makes the input to the correlator stabilise once the input sequence Y has been fed to the residue correlator precisely once.
The residue correlator uses the feedback loop 300 to supply a Y data sample (VJ) to the input of each correlator tap delayed by 0, P, 2P units, as a result of the provision of P taps. The delayed subtraction removes this data sample after the length of the data sequence. As long as the Y input sequence repeats exactly, the sequence of accumulated values also repeats over the same number of samples (it will also repeat over a shorter number of samples if the sequence length is exactly divisible by the residue correlator length). At any given time, each correlator tap is correlating the current X input x; against the accumulated values required to create
appropriate for that correlator tap at that time.
As an alternative to the use of feedback paths in a correlator as described with reference to Fig. 5, in an alternative implementation, further hardware savings
could be obtained by pre-calculating the sequence of input values to create a new sequence 7' such that:
This new sequence can be used as a new input sequence where t = j -k in equation 7. In this case a conventional correlator architecture would be used.
In either case the same hardware can be re-used, switching it between respective lengths of residue correlator (i.e. 31, 33), or two residue correlators can be used of respective lengths. It will be appreciated that the specific components used can be any appropriate integrated or other circuit elements such as programmable gate arrays, or field programmable gate arrays.
It will be seen that the invention gives rise to various advantages. A simplified correlation procedure is provided allowing faster GPS acquisition and/or reduced cost of manufacture of the chip hardware used in the device. The new technique clearly has applicability in many other areas of communications and other positioning systems and indeed in any areas where correlation of data sequences is desirable. It is currently believed that the performance in terms of speed of existing GPS systems can be enhanced by up to approximately 8 times using the technology described herein
It will be appreciated further that many embodiments of the invention can be implemented. For example residue correlators of the type described can be used to reduce the hardware requirement of a system that would normally use a
conventional correlator such as GPS5 and to enable the use of very long sequences. For example, it would be entirely feasible to create a design with residue correlators of lengths 511 and 513 giving the ability to continuously correlate against a 262143 symbol sequence. This would not be practical using a conventional correlator. Furthermore both data sequences could be accumulated in some circumstances.
It will be appreciated that the techniques described can be used in conjunction with any appropriate data correlation implementation such as a data communication or processing implementation, for example Ultra Wide Band communications, Radar or Sonar (for navigation, location of objects or remote sensing), positioning systems other than GPS5 as well as wired communications, or data storage synchronisation signals on data storage media such as on disk or tapes, for multi-dimensional data sets, and by accumulating multiple sets for correlation against one another.
In addition, the invention can be implemented in relation to data sets other than communication data sequences, for example data sets or sequences representing audio, image or video data.
For example, signals from an audio source (not necessarily limited to the human audible frequency range) could be detected with a plurality of sensors situated at different locations from the source (eg left, right, centre, up, down) and correlated in order to localise the source or compare against a known good source. In the case of a home cinema system, the signals from true component speakers could be correlated against signals from a virtual surround system to evaluate how faithful the virtual system is.
This method differs from the GPS method in that a "good" local reference signal does not exist. The correlation occurs between two detected signals at different distances from the same audio source.
Fig. 6 shows one implementation of the invention where the strength of an audio source 400 is detected by a plurality of sensor inputs 402 separated by a distance d5. Each sensor will detect the audio signal from the same source at a different time. According to the correlator of Fig. 5, after conversion to the digital domain, the first signal is presented at the X input and the delayed signal presented at the Y input for correlation as described above.
If the signal is strong in that particular direction, the correlation will be high as the SNR will be high. If the signal is weak, the separation between the sensors will cause the SNR to drop a significant amount thus affecting the correlation result. The degree of correlation therefore indicates signal strength.
A further application could be in the field of astronomy where the signals to be detected are electromagnetic waves requiring radio antennas for the detection means as opposed to microphones for sound waves as described above.
In the case of image correlation, for example, when using a digital camera, it is often desired to stitch images together. The source images in question can be correlated to ascertain where they match and therefore where the best position would be to stitch them together. This employs a 2D application of the correlation technique and may be applied to source images of any frequency range such as visible light, infra-red, ultra-violet or multi-spectral.
In the case of stitching two images together (usually, but not necessarily the same size), referring to Fig. 7, each separate source image 500, 502 to be correlated (or sections of the images) are split into equal sized tiles 504 of any size and tessellating shape (the image can be padded usually with an average pixel value to make each source image dimension an integer multiple of the chosen tile size) and combined (usually but not limited to addition, possibly including normalisation). This produces a single residue image 506 of the tile size chosen per source image. Where the tile dimensions are PxP, for example, each individual element of the residual image is therefore a combination of the first element in that position and each subsequent Pth element of the original (in both the X and Y directions). This is repeated for different tile sizes 508 with each image in order to produce other residue images 510.
The residue image from one source image can be correlated against the original other source image as discussed above or each pair of residue images of the same size 506, 510 is correlated conventionally in both directions. According to equation [7], each residue correlator can be calculated by accumulating each element (i.e. adding the tiles together) and then correlating.
For each correlated residue image pair, we calculate one peak per line of the residue image (X-direction) and one peak per column of the residue image (Y- direction). Each peak identifies the element of the residue correlator in which the real peak lies, but not the exact peak at this stage.
Referring to Fig. 8, when a plurality of residue image pair sizes are correlated as above, residue reverse conversion techniques (such as but not limited to the
Chinese Remainder Theorem or Redundant Reverse conversion) are used to identify the exact peak per line in the X-direction 600 and per column in the Y- direction 602. It should be understood that the resolution of the actual image may be far greater than that of Fig 8.
These exact peaks are then combined to find the overall cross-correlation peak position 604 as a coordinate of the correlated portion 606 of the original images.
It should be noted that in this example, both dimensions of all sources are reduced by the residue image creation process, however, this technique may be applied to the instance when only one of the source images is reduced. Furthermore, residue techniques may be applied in only one dimension of a source leaving the other dimension unchanged such that, for a source image of dimension XxY, N tiles, say, in the X dimension are formed each of dimension X/N x Y. The dimension reduced may also be inconsistent throughout the source images or residue image sets. Depending on the choice and number of residue image sizes, redundant residue techniques as previously described may be applied providing robustness to erroneous peak detection.
In the field of video, correlation techniques may be employed for motion detection purposes in order to compress the video stream. The source images for correlation are the individual video frames with smaller sets of correlations being employed across a plurality of frames.