This invention relates to apparatus and methods for ordering the Hamming values (as herein defined) of a set of weightless binary tuples, and to filter apparatus utilising such apparatus and methods.
There are many applications where it is required to order the Hamming values of an input set of weightless binary tuples (as herein defined), for example to determine a median Hamming value for a set of weightless binary tuples (otherwise referred to as a “weightless median”) or either or both of the outlier Hamming values (otherwise referred to as “weightless outliers”). For example in a digital signal filtering operation it is known to define a rolling window of defined extent which operates on a stream of digital samples, and to replace each value with a filtered value determined by a collective property of the values in the window, typically a mean or a median value, such as a weightless median. There are other instances where the outlier values may be required, for example as a measure or metric of the homogeneity of the samples in the window.
Other instances where ordering of the Hamming values and/or determination of a weightless median and/or the weightless outliers may be required is in error detection and correction of digital code.
It may be required to determine a generic template from a set of exemplars, and the weightless median of the exemplars could be used as the generic template.
One possible way of extracting the weightless median would be to use a traditional algorithmic processor to evaluate the Hamming values and order the tuples thereby to extract the weightless median. This may be suitable for some applications, but for operation in some harsh cosmic environments an asynchronous, memoryless, clockless implementation is desirable in order to reduce cosmic induced bit errors.
Definitions
Weightless binary: This means that each active bit has unit weight—just “1” as opposed to “natural” weighted binary which has positional weightings of 1, 2, 4, 8 . . . .
Weightless binary tuple: This defines a collection of weightless bits in which the order is irrelevant. For example, [0 0 1 1], [1 1 0 0] and [1 0 1 0] each have the same significance.
Thermometer code (alternatively referred to as thermocode): This is a form of weightless binary in which the 1's and 0's within the tuple are grouped together. For example, [1 0 1 0 1] in thermocode is [1 1 1 0 0] or, alternatively, [0 0 1 1 1].
Hamming value (Hv): This is the number of 1's within a tuple. For example [1 0 1 0 1 1] has a Hamming value of 4.
Traditional median: Given an odd number of values the median is the central value of the ordered set. For example given [3 1 2 4 7], they are ordered as [1 2 3 4 7]. The central value, the median, is 3.
Outliers: Given a set of values, the outliers are the extreme values of the ordered set. For example given [27 3 1 2 4 7], they are ordered as [1 2 3 4 7 27]. The outliers are 1 and 27.
Weightless median: Given an odd number of weightless tuples the weightless median is the Hamming value of the central tuple of the set ordered by Hamming value. If there is an even number of weightless tuples the weightless median may be taken to be either of the values to either side of the non-existent median and this is still referred to herein as a weightless median. Thus for an even number of weightless tuples the weightless median may not be a unique value. Alternatively, the set may be made up to an odd number by duplication of one of the tuples. The resultant weightless median is likewise also referred to as a weightless median.
Weightless outlier: Given any number of weightless tuples the weightless outliers are the Hamming values of the extreme tuples of the set ordered by Hamming value.
For example, given 5 weightless tuples, t1 to t5;
Ordering these tuples according to their Hamming value gives;
Hence the Hamming value of t5, or t2, is the weightless median but given in thermometer code. The selection of the Hamming value of t5 or t2 as the weightless median is unimportant.
According to one aspect of this invention there is provided a method of treating an input set of weightless binary thermometer code tuples each with the set bits grouped at a given end of each tuple, to order the Hamming values of said weightless binary thermometer code tuples, which comprises performing an orthogonal thermocoding operation equal or corresponding to one in which:
thereby to order the Hamming values of said weightless binary thermometer code tuples.
The orthogonal thermocoding operation may be performed in various different ways as to be described below and it is not essential for the weightless binary thermometer code tuples actually to be assembled into a matrix provided that an analogous thermocoding operation is achieved. Surprisingly, we have found that performing an orthogonal thermocoding operation on an input set of weightless binary thermometer code tuples orders the Hamming values of the tuples without altering the Hamming values.
If the input data is not already in the form of weightless binary thermometer code tuples then there may be appropriate encoding and decoding upstream and downstream of the orthogonal thermocoding operation to convert input data (e.g. weighted binary, weightless binary etc.) into thermometer code and to return it to the desired coding.
Accordingly, in another aspect, where the input is in the form of weightless binary tuples, this invention provides a method of treating an input set of weightless binary tuples to order the Hamming values of said weightless binary tuples, which comprises performing a thermocoding operation on each of said weightless binary tuples to group the set bits at a given end of each tuple to provide a set of weightless binary thermometer code tuples, and thereafter performing an orthogonal thermocoding operation corresponding to one in which:
Having ordered the set of Hamming values one or more selected Hamming values of the set may be determined. For example, where the input set comprises an odd number of tuples a weightless median of said set may be determined by identifying the central value of the ordered set. Where the input set comprises an even number (2n) of tuples, a median may be determined by identifying in the ordered set a value corresponding to the nth or the n+1th value. Alternatively, where the input set comprises an even number of tuples, a further tuple may be introduced into the set (for example by duplicating one of the other tuples of the input set) to make an odd number of tuples before performing the orthogonal thermocoding operation.
At least one weightless outlier value may be determined by identifying at least one of the first and last of said ordered Hamming values.
Where the input bit pattern corresponding to one of the ordered Hamming values is required, in one embodiment having ordered the Hamming values of said weightless binary tuples, and after said orthogonal thermocoding operation, the bit pattern of at least one of said tuples corresponding to a given ranking is compared to the bit patterns of the tuples before said orthogonal thermocoding operation to identify an or the equivalent tuple thereto, and the location of said equivalent tuple is used to determine a corresponding input tuple, thereby to identify or present the input tuple with said given ranking.
The invention extends to a method of applying a filtering operation to a two- or—higher dimensional array of tuples in which the method as defined above is performed on a set of values in a pre-determined window in said array in a filtering step and at least a selected one of the ordered Hamming values is used as the filtered result, with the window being incremented relative to the array to provide a series of filtered results.
In one instance, a median Hamming value is taken as the filtered result.
The filtering operation may be applied to a two-dimensional array of tuples, for example representing a two-dimensional image. Alternatively, the filtering operation may be applied to a three-dimensional array of tuples, representing a three-dimensional volume of air traffic space.
The invention also extends to filter apparatus for applying the filtering operation described above.
In another aspect, this invention provides apparatus for treating an input set of weightless binary thermometer code tuples with the set bits grouped at a given end of each tuple, thereby to order the Hamming value of said weightless binary thermometer code tuples, said apparatus comprising:
The above apparatus is intended to receive an input set of weightless binary tuples in thermometer code.
In another aspect, intended for treating an input set of weightless binary tuples not already in thermometer code, there is provided apparatus for treating an input set of weightless binary tuples, which comprises:
Preferably, the first stage thermocode converter means comprises respective thermocode converter means for each of said weightless binary tuples making up the input set.
The transformation means preferably includes orthogonal tuple defining means for defining a set of orthogonal tuples, each said orthogonal tuple being made up of bits taken from a respective bit position of said weightless binary thermometer code tuples, and respective thermocode converter means for thermocoding each of said orthogonal tuples. The orthogonal tuple defining means typically comprises a mapping of interconnects mapping the bits of the thermometer code tuples to the appropriate thermocode converter means.
Preferably, said apparatus includes means for analysing a matrix made up of said thermocoded orthogonal tuples to determine the or a central tuple orthogonal to said orthogonal tuples, said central tuple representing to the median Hamming value of said weightless binary thermometer code tuples. Likewise the apparatus may include means for determining the first and the last of the tuples orthogonal to said orthogonal tuples, representing at least one outlier.
The thermocode means may take many forms. For example it may comprise an asynchronous thermometer coding means using a modular structure. Alternatively, at least one of the thermocode means may comprise a pipelined synchronous thermocode means. Examples of such devices are given in our earlier published International Patent Application No. WO 99/33184. Yet further, the thermocode converter means may comprise a thermometer code converter which operates on an input stream of weightless binary data, as described in our copending application of even date Patent Application No. PCT/GB03/______(our reference XA1619).
In another aspect, this invention provides apparatus for treating an input set of weightless binary thermometer code tuples each with the set bits grouped at a given end of the tuple, said apparatus comprising:
In yet another aspect this invention provides apparatus for treating an input set of weightless binary tuples which comprises:—
Whilst the invention has been described above, it extends to any inventive combination of the features set out above or in the following description.
The invention may be performed in various ways, and an embodiment thereof will now be described by way of example-only, reference being made to the accompanying drawings, in which:—
FIGS. 10 to 12 are logic diagrams of Boolean logic implementations of the tag compare modules and the pattern select module of the second embodiment.
The embodiments disclosed herein describe a new mechanism for Hamming value ordering and weightless median extraction from a set of weightless binary tuples. Obviously the input data needs to be converted into weightless binary if it is not already in this form. Initially the bit manipulation steps performed to achieve Hamming value ordering and weightless median extraction will be described with reference to the five weightless tuples t1 to t5, each 6 bits wide, described in the introduction, on pages 3 and 4 of the text as filed. Having described the bit manipulation steps required apparatus for implementing the invention will be described in further detail.
Given the earlier example of,
t1 to t5 are the input tuples, and columns c1 to c6 are imposed orthogonal thermocoding is now performed; in a first stage, each tuple t1 to t5 is thermocoded. So the rows t1 to t5 are thermocoded in either direction—to the left or the right. This gives, thermocoding to the left,
Then thermocoding is performed along the columns, either upwards or downwards. This gives, thermocoding upwards, the desired result:—
The orthogonal thermocoding process yields the weightless median in thermocode as the central value i.e. row t5.
This process may be visualised as assembling the input tuples into a matrix, then performing a first thermocoding step in which each tuple is thermocoded along the rows to the left, and a second thermocoding step in which the columns are thermocoded upwards. In this visualisation the tuples could be stacked vertically or horizontally, provided the first thermocoding is done in one sense along the direction of the tuples. In practice of course there may be no matrix as such because the tuples may be supplied to individual first stage thermocoders whose outputs are hardwired in a preset mapping to the inputs of individual second stage thermocoders, with selected outputs of the second stage thermocoders hardwired to an output interface.
It should be noted that, in the described embodiment, the two stage orthogonal process must be performed in order, namely a horizontal operation along the direction of the tuple and then a vertical operation orthogonal thereto.
Naturally if the input data is already thermocoded it is only required to perform the vertical thermocoding to obtain the weightless median. It will be appreciated that this provides a unique weightless median only if there is an odd number of tuples. When presented with an even set of tuples, one of the tuples (for example, the first) is duplicated to obtain an odd set. Alternatively the tuple one above or below the non-existent median may be taken as an approximation; such an approximation obtained in either manner is also referred to herein for convenience as a weightless median.
The above method is technology independent; it may be implemented electronically, optically, magnetically etc.
Referring now to
Referring to the Figure, the weightless median evaluator 10 is designed to receive and evaluate the median of 5, 5-bit wide weightless binary tuples. The evaluator 10 comprises a first layer of thermocoders 12 designed to thermocode to the left, i.e. to group the set bits at the left hand end of the thermocode output. The inputs to each first layer thermocoder are here shown above the thermocoder box, whilst the thermocode output is shown within the box.
An orthogonal set of five second layer thermocoders 14 receives as inputs the outputs of the first layer of thermocoders 12. Each second layer thermocoder 14 takes the output bits from a respective bit position of the thermocoded output of the first layer; thus the leftmost second layer thermocoder 14 takes the leftmost bits of the thermocode output of the first layer of thermocoders, the rightmost second layer thermocoder 14 takes the rightmost bits of the thermocoded output of the first layer and so on. Thus if the five input tuples (0 0 1 1 0), (0 1 0 1 1), (0 0 0 1 0), (1 1 0 1 1) and (0 0 0 1 0) are visualised as a matrix made up of these tuples stacked vertically, thus
the first layer of thermocoders thermocode the rows to the left, to provide the following array:
the orthogonal thermocoding operation effects the transformation to the following:
Referring back to
The orthogonal median evaluator of
In another example, a MATLAB® simulation of a two-dimensional, three-by-three sample space (defining a nine-element “window”) operated on the same principles as the block diagram shown in
The filtered image is shown in
The embodiment of
Accordingly, the further embodiment illustrated and described with reference to FIGS. 9 to 12 receives a set of weightless binary input tuples and uses a technique similar to the above technique of orthogonal thermocoding to order thermocoded versions of the input tuples, but with a modification to give the result in terms of the original weightless binary tuples whereby the input pattern information is preserved.
is applied to an input device 40. The tuples from the input device pass to a horizontal thermocoder 42 where the tuples are horizontally thermocoded (e.g. to the left) to yield:
where HT1 denotes a tuple obtained by horizontally thermocoding T1 etc.
The bits from the horizontal thermocoder 42 are then passed to a vertical thermocoder 44 where the bits in vertical tuples, corresponding to the columns of an array obtained by vertically stacking the tuples HT1, HT2, HT3, are vertically thermocoded (e.g. vertically downwards) to give:
where the prefix “V” denotes a vertical thermocode operation and correspondingly the prefix “VH” denotes an orthogonal thermocode operation. At this stage, the tuples have been rearranged or orthogonally thermocoded as in the embodiment of
In the above example, the vertical thermocoding has been done downwards which mean that VHT2 corresponds to the weightless median and VHT1 and VHT3 correspond to the lowest and highest outliers respectively. To determine the lowest outlier, VHT1's tag is 1 0 0 0 in this example. This tag (1 0 0 0) is compared with HT1 to HT3 and here corresponds to HT2, and HT2 selects T2, i.e. (0 1 0 0) Similarly for the median, VHT2's tag is (1 1 0 0) which corresponds to HT1 which selects T1 i.e. (0 1 0 1). For the highest outlier VHT3's tag is (1 1 1 0) which corresponds to HT3 which selects T3 i.e. (1 1 0 1).
To implement this, the results of the horizontal thermocoding by the horizontal thermocoder 42 and the results of the vertical thermocoding at the vertical thermocoder 44 pass to a tag compare module 46 which performs the tag comparison described above and outputs to a pattern select module 48 a select signal which selects from the original non-thermocoded input pattern the lower outlier (referred to as new T1), the median having the median Hamming value (referred to as New T2) and the highest outlier (referred to as New T3). Although in this example (and in the circuits of FIGS. 10 to 12) only three input and three output tuples are provided, it will be immediately apparent to one skilled in the art that the technique may easily be expanded to process larger numbers of input tuples and to provide an output in which the tuples are ordered according to their Hamming values, with the original patterns in the tuples preserved.
In this illustrated example the output from the pattern select module 48 is thus:—
although the technique could be pruned to generate one, or more, or all the outliers or medians.
FIGS. 10 to 12 are logic diagrams of Boolean logical implementations of the tag compare module 46 and the pattern select module 48 of
Referring initially to
Each tag compare module 46 in the three circuits comprises three sub modules 49, 49″ and 49′″, each of which comprises four 2-input EXNOR gates 56, the outputs of which are passed to a respective 4-input AND gate 58′, 58″ and 58′″. The outputs from the AND gates 58′ to 58′″ are prioritised by a two input AND gate 60 with the input from the first sub module 49′ inverted, and a three input AND gate 62 with the inputs from the sub modules 41′ and 49″ inverted, such that a high output from the first AND gate 58′ ensures that the outputs from the second and third AND gates 58″ and 58′″ are inhibited, and likewise a high output from the second AND gate 58″ inhibits the output from the third AND gate 58′″.
Consequently the output of each tag compare module 46 is a single ‘1’ on one of the three output lines 64′ to 64′″ thereof, which is passed to the associated pattern select module 48 to select a corresponding one of the input tuples. Each pattern select module 48 is made up of a 4×3 array of AND gates 66 each of which receives a corresponding bit from the input pattern 50 (i.e. the three 4-bit tuples T1 to T3 in this example), with the input lines 64′, 64″ and 64′″ connected to respective rows of the AND gates. The outputs from each of the columns of the AND gates are ORed together by respective OR gates 68, such that a logic 1 on one of the lines 64′, 64″ and 64′″ selects that row which is presented on the output of the OR gates 68.
The tag compare module 46 of
The tag compare modules 46 of
Thus the outputs from the circuits of FIGS. 10 to 12 may be reassembled to provide a bit pattern corresponding to the input bit pattern reordered according to the Hamming values of the input tuples.
This embodiment deals automatically with cases where several or all the bit patterns are the same. It will be appreciated that the architecture is readily extensible in terms of the numbers of tuples and bit width. The number of tuples does not have to be odd. The implementation is entirely asynchronous.
This technique preserves the original bit patterns and their Hamming value ratings (ordering) but does not always preserve their order. For example
Number | Date | Country | Kind |
---|---|---|---|
0204412.1 | Feb 2002 | GB | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/GB03/00756 | 2/21/2003 | WO |