# Patent

## Title
Method and apparatus for adaptive real-time signal conditioning, processing, analysis, quantification, comparison, and control

## Abstract

Various components of the present invention are collectively designated as Adaptive Real-Time Embodiments for Multivariate Investigation of Signals (ARTEMIS). It is a method, processes, and apparatus for measurement and analysis of variables of different type and origin. In this invention, different features of a variable can be quantified either locally as individual events, or on an arbitrary spatio-temporal scale as scalar fields in properly chosen threshold space. The method proposed herein overcomes limitations of the prior art by directly processing the data in real-time in the analog domain, identifying the events of interest so that continuous digitization and digital processing is not required, performing direct, noise-resistant measurements of salient signal characteristics, and outputting a signal proportional to these characteristics that can be digitized without the need for high-speed front-end sampling. The application areas of ARTEMIS are numerous, e.g., it can be used for adaptive content-sentient real-time signal conditioning, processing, analysis, quantification, comparison, and control, and for detection, quantification, and prediction of changes in signals, and can be deployed in automatic and autonomous measurement, information, and control systems. ARTEMIS can be implemented through various physical means in continuous action machines as well as through digital means or computer calculations. Particular embodiments of the invention include various analog as well as digital devices, computer programs, and simulation tools.

## Background
This is a continuation-in-part of U.S. patent application Ser. No. 10/679,164. The present application relates to and claims priority with regard to all common subject matter of the provisional patent application No. 60/416,562, filed on Oct. 7, 2002, which is hereby incorporated into the present application by reference.


COPYRIGHT NOTIFICATION
Portions of this patent application contain materials that are subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
TECHNICAL FIELD
The present invention relates to methods, processes and apparatus for real-time measuring and analysis of variables. In particular, it relates to adaptive real-time signal conditioning, processing, analysis, quantification, comparison, and control. This invention also relates to generic measurement systems and processes, that is, the proposed measuring arrangements are not specially adapted for any specific variables, or to one particular environment. This invention also relates to methods and corresponding apparatus for measuring which extend to different applications and provide results other than instantaneous values of variables. The invention further relates to post-processing analysis of measured variables and to statistical analysis.
BACKGROUND ART
Due to the rapid development of digital technology since the 1950's, the development of analog devices has been essentially squeezed out to the periphery of data acquisition equipment only. It could be argued that the conversion to digital technology is justified by the flexibility, universality, and low cost of modern integrated circuits. However, it usually comes at the price of high complexity of both hardware and software implementations. The added complexity of digital devices stems from the fact that all operations must be reduced to the elemental manipulation of binary quantities using primitive logic gates. Therefore, even such basic operations as integration and differentiation of functions require a very large number of such gates and/or sequential processing of discrete numbers representing the function sampled at many points. The necessity to perform a very large number of elemental operations limits the ability of digital systems to operate in real time and often leads to substantial dead time in the instruments. On the other hand, the same operations can be performed instantly in an analog device by passing the signal representing the function through a simple RC circuit. Further, all digital operations require external power input, while many operations in analog devices can be performed by passive components. Thus analog devices usually consume much less energy, and are more suitable for operation in autonomous conditions, such as mobile communication, space missions, prosthetic devices, etc.
It is widely recognized (see, for example, Paul and Hüper (1993)) that the main obstacle to robust and efficient analog systems often lies in the lack of appropriate analog definitions and the absence of differential equations corresponding to known digital operations. When proper definitions and differential equations are available, analog devices routinely outperform corresponding digital systems, especially in nonlinear signal processing (Paul and Hüper, 1993). However, there are many signal processing tasks for which digital algorithms are well known, but corresponding analog operations are hard to reproduce. One example, which is widely recognized to fall within this category, is related to the use of signal processing techniques based on order statistics1. 1See, for example, Arnold et al. (1992) for the definitions and theory of order statistics.
Order statistic (or rank) filters are gaining wide recognition for their ability to provide robust estimates of signal properties and are becoming the filters of choice for applications ranging from epileptic seizure detection (Osorio et al., 1998) to image processing (Kim and Yaroslavsky, 1986). However, since such filters work by sorting, or ordering, a set of measurements their implementation has been constrained to the digital domain. As pointed out by some authors (Paul and Hüper, 1993, for example), the major problem in analog rank processing is the lack of an appropriate differential equation for ‘analog sorting’. There have been several attempts to implement such sorting and to build continuous-time rank filters without using delay lines and/or clock circuits. Examples of these efforts include optical rank filters (Ochoa et al., 1987), analog sorting networks (Paul and Hüper, 1993; Opris, 1996), and analog rank selectors based on minimization of a non-linear objective function (Urahama and Nagao, 1995). However, the term ‘analog’ is often perceived as only ‘continuous-time’, and thus these efforts fall short of considering the threshold continuity, which is necessary for a truly analog representation of differential sorting operators. Even though Ferreira (2000, 2001) extensively discusses threshold distributions, these distributions are only piecewise-continuous and thus do not allow straightforward introduction of differential operations with respect to threshold.
Nevertheless, fuelled by the need for robust filters that can operate in real time and on a low energy budget, analog implementation of traditionally digital operations has recently gained in popularity aided by the rapid progress in analog Very Large Scale Integration (VLSI) technology (Mead, 1989; Murthy and Swamy, 1992; Kinget and Steyaert, 1997; Lee and Jen, 1993). However, current efforts to implement digital signal processing methods in analog devices still employ an essentially digital philosophy. That is, a continuous signal is passed through a delay line which samples the signal at discrete time intervals. Then the individual samples are processed by a cascade of analog devices that mimic elemental digital operations (Vlassis et al., 2000). Such an approach fails to exploit the main strength of analog processing, which is the ability to perform complex operations in a single step without employing the ‘divide and conquer’ paradigm of the digital approach.
Perhaps the most common digital waveform device is the analog-to-digital converter (ADC). Among the salient characteristics of ADCs are their sampling frequency, measurement resolution, power dissipation, and system complexity. Sampling frequency is typically dictated by the signal of interest and/or the requirements of the application. As the frequency content of the signal of interest increases and the sampling frequency increases, resolution decreases both in terms of the absolute number of bits available in an ADC and in terms of the effective number of bits (ENOB), or accuracy, of the measurement. Power needs typically increase with increasing sampling frequency. The system complexity is increased if continuous monitoring of an input signal is required (real-time operation). As an example, high-end oscilloscopes can capture fast transient events, but are limited by record length (the number of samples that can be acquired) and dead time (the time required to process, store, or display the samples and then reset for more data acquisition). These limitations affect any data acquisition system in that, as the sampling frequency increases, resources will ultimately be limited at some point in the processing chain. In addition, the higher the acquisition speed, the more negative effects such as clock crosstalk, jitter, and synchronization issues combine to reduce system performance.
It is highly desirable to extract signal characteristics or preprocess data prior to digitization so that the requirements on the ADCs are reduced and higher quality data can be obtained. In the past, one common technique was to use an analog memory to sample a fast signal and then the analog memory would be clocked out at a low speed and digitized with a moderately high resolution ADC. While this technique works, it suffers from significant degradation due to clock feedthrough, non-linear effects of the analog memories chosen, and limited record length. Another technique used is to multiplex a high-speed signal to a number of lower speed but higher resolution ADCs using an interleaved clock. Again, the technique works but never realizes the best performance of a single channel due to the high clock noise and inevitable differences in processing channels.
The introduction of the Analysis of VAriables Through Analog Representation (AVATAR) methodology (see Nikitin and Davidchack (2003a) and U.S. patent application Ser. No. 09/921,524, which are incorporated herein by reference in their entirety) is aimed to address many aspects of modern data acquisition and signal processing tasks by offering solutions that combine the benefits of both digital and analog technology, without the drawbacks of high cost, high complexity, high power consumption, and low reliability. The AVATAR methodology is based on the development of a new mathematical formalism, which takes into consideration the limited precision and inertial properties of real physical measurement systems. Using this formalism, many problems of signal analysis can be expressed in a content-sentient form suitable for analog implementation. Specific devices for a wide variety of signal processing tasks can be built from a few universal processing units. Thus, unlike traditional analog solutions, AVATAR offers a highly modular approach to system design. Most practical applications of AVATAR, however, are far from obvious, and their development requires technical solutions unavailable in the prior art. For example, AVATAR introduces the definitions of analog filters and selectors. Nonetheless, the practical implementations of these filters offered by AVATAR are often unstable and suffer from either lack of accuracy or lack of convergence speed, and thus are unsuitable for real-time processing of nonstationary signals. Another limitation of AVATAR lies in the definition of the threshold filter. Namely, a threshold filter in AVATAR depends only on the difference between the displacement and the input variables, and expressed as a scalar function of only the displacement variable, which limits the scope of applicability of AVATAR. As another example, the analog counting in AVATAR is introduced through modulated density, and thus the instantaneous counting rate is expressed as a product of a rectified time derivative of the signal and the output of a probe. Even though this definition theoretically allows counting without dead time effect, its practical implementations are cumbersome and inefficient.
DISCLOSURE OF INVENTION
Brief Summary of the Invention
The present invention, collectively designated as Adaptive Real-Time Embodiments for Multivariate Investigation of Signals (ARTEMIS), overcomes the shortcomings of the prior art by directly processing the data in real-time in the analog domain, identifying the events of interest so that continuous digitization and digital processing is not required, performing direct, noise-resistant measurements of the salient signal characteristics, and outputting a signal proportional to these characteristics that can be digitized without the need for high-speed front-end sampling.
In the face of the overwhelming popularity of digital technology, simple analog designs are often over-looked. Yet they often provide much cheaper, faster, and more efficient solutions in applications ranging from mobile communication and medical instrumentation to counting detectors for high-energy physics and space missions. The current invention, collectively designated as Adaptive Real-Time Embodiments for Multivariate Investigation of Signals (ARTEMIS), explores a new mathematical formalism for conducting adaptive content-sentient real-time signal processing, analysis, quantification, comparison, and control, and for detection, quantification, and prediction of changes in signals. The method proposed herein overcomes the limitations of the prior art by directly processing the data in real-time in the analog domain, identifying the events of interest so that continuous digitization and digital processing is not required, performing a direct measurement of the salient signal characteristics such as energy and arrival rate, and outputting a signal proportional to these characteristics that can be digitized without the need for high-speed front-end sampling. In addition, the analog systems can operate without clocks, which reduces the noise introduced into the data.
A simplified diagram illustrating multimodal analog real-time signal processing is shown in FIG. 1. The process comprises the step of Threshold Domain Filtering in combination with at least one of the following steps: (a) Multimodal Pulse Shaping, (b) Analog Rank Filtering, and (c) Analog Counting.
Threshold Domain Filtering is used for separation of the features of interest in a signal from the rest of the signal. In terms of a threshold domain, a ‘feature of interest’ is either a point inside of the domain, or a point on the boundary of the domain. A typical Threshold Domain Filter can be composed of (asynchronous) comparators and switches, where the comparators operate on the differences between the components of the incoming variable(s) and the corresponding components of the control variable(s). For example, for the domain defined as a product of two ideal comparators represented by the Heaviside unit step function θ(χ), =θ[χ(t)−D] θ[{dot over (χ)}(t)] (with two control levels, D and zero), a point inside (that is, =1) corresponds to a positive-slope signal of the magnitude greater than D, and the stationary points of χ(t) above the threshold D can be associated with the points on the boundary of this domain.

Multimodal Pulse Shaping can be used for embedding the incoming signal into a threshold space and thus enabling extraction of the features of interest by the Threshold Domain Filtering. A typical Multimodal Pulse Shaper transforms at least one component of the incoming signal into at least two components such that one of these two components is a (partial) derivative of the other. For example, for identification of the signal features associated with the stationary points of a signal χ(t), the Multimodal Pulse Shaping is used to output both the signal χ(t) and its time derivative {dot over (χ)}(t).

Analog Rank Filtering can be used for establishing and maintaining the analog control levels of the Threshold Domain Filtering. It ensures the adaptivity of the Threshold Domain Filtering to changes in the measurement conditions, and thus the optimal separation of the features of interest from the rest of the signal. For example, the threshold level D in the domain =θ[χ(t)−D] θ[{dot over (χ)}(t)] can be established by means of Analog Rank Filtering to separate the stationary points of interest from those caused by noise. Note that the Analog Rank Filtering outputs the control levels indicative of the salient properties of the input signal(s), and thus can be used as a stand-alone embodiment of ARTEMIS for adaptive real-time signal conditioning, processing, analysis, quantification, comparison, and control, and for detection, quantification, and prediction of changes in signals.

Analog Counting can be used for identification and quantification of the crossings of the threshold domain boundaries, and its output(s) can be either the instantaneous rate(s) of these crossings, or the rate(s) in moving window of time. A typical Analog Counter consists of a time-differentiator followed by a rectifier, and an optional time-integrator.

Further scope of the applicability of the invention will be clarified through the detailed description given hereinafter. It should be understood, however, that the specific examples, while indicating preferred embodiments of the invention, are presented for illustration only. Various changes and modifications within the spirit and scope of the invention should become apparent to those skilled in the art from this detailed description. Furthermore, all the mathematical expressions and the examples of hardware implementations are used only as a descriptive language to convey the inventive ideas clearly, and are not limitative of the claimed invention.



BRIEF DESCRIPTION OF FIGURES
FIG. 1. Simplified diagram of a multimodal analog system for real-time signal processing.
FIG. 2. Representative step (a) and impulse (b) responses of a continuous comparator.
FIG. 3. Defining output Dq(t) of a rank filter as a level curve of the distribution function Φ(D, t).
FIG. 4. Amplitude and counting densities computed for the fragment of a signal shown at the top of the figure.
FIG. 5. Comparison of the rates measured with the boxcar (thin solid line) and the ‘triple-integrator’ test function (n=3 in equation (14), thick line) with τ=T/6. The respective test functions are shown in the upper left corner of the figure.
FIG. 6. Illustration of bimodal pulse shaping used for the amplitude and timing measurements of a short-duration event.
FIG. 7. A simplified principal schematic of a signal processing system for a two-detector particle telescope.
FIG. 8. Example of analog measurement of instantaneous rate of signal's extrema.
FIG. 9. Example of analog counting of coincident maxima.
FIG. 10. Coincident counting in a time-of-flight window: (a) ‘Ideal’ instrument; (b) ‘Realistic’ instrument.
FIG. 11. Principle schematic of implementation of an adaptive real-time rank filter given by equation (24).
FIG. 12. Simplified diagram of an Adaptive Analog Rank Filter (AARF).
FIG. 13. Principle schematic of a 3-comparator implementation of AARF.
FIG. 14. Principle schematic of a delayed comparator.
FIG. 15. Principle schematic of an averaging comparator.
FIG. 16. Comparison of the performance of the analog rank filter given by equation (24) to that of the ‘exact’ quantile filter in a boxcar moving window of width T.
FIG. 17. Example of using an internal reference (baseline) for separating signal from noise.
FIG. 18. Principle schematic of establishing baseline by means of quartile (trimean) filter.
FIG. 19. Principle schematic of implementation of an adaptive real-time rank selector given by equation (28).
FIG. 20. Simplified diagram of an Adaptive Analog Rank Selector (AARS).
FIG. 21. Removing static and dynamic impulse noise from a monochrome image by AARSs.
FIG. 22. Comparison of quartile outputs (q=1⁄4, 1⁄2, and 3⁄4) of ARF and EARL for amplitudes and counts.
FIG. 23. Simplified principle schematic of a Bimodal Analog Sensor Interface System (BASIS).
FIG. 24. Simplified principle schematic of an Integrated Output Module of BASIS.
FIG. 25. Simulated example of the performance of BASIS used with a PMT.
FIG. 26. Modification of BASIS used for detection of onsets/offsets of light pulses.
FIG. 27. Principle schematic of a monoenergetic Poisson pulse generator.
FIG. 28 Simulated performance of a monoenergetic Poisson pulse generator.
FIG. 29. Principle schematic of implementation of an adaptive real-time rank filter given by equation (61).
FIG. 30. Generalized diagram of a modified adaptive analog rank filter (AARF).
FIG. 31. Generalized diagram of a modified adaptive analog rank selector (AARS).
FIG. 32. Attenuation of a purely harmonic signal by boxcar and exponential median filters.
FIG. 33. Examples of time windows with coinciding mean and median: (a) Values of α as a function of N; (b) Time windows w(t) with




  
    Δ
    ⁢
    
      
    
    ⁢
    t
  
  =
  
    
      α
      ⁢
      
        
      
      ⁢
      τ
    
    =
    
      
        α
        ⁢
        
          
        
        ⁢
        T
      
      
        2
        +
        
          
            (
            
              N
              -
              1
            
            )
          
          ⁢
          α
        
      
    
  




for minimum values of α; (c) Time windows w(t) with





  
    Δ
    ⁢
    
      
    
    ⁢
    t
  
  =
  
    
      α
      ⁢
      
        
      
      ⁢
      τ
    
    =
    
      
        α
        ⁢
        
          
        
        ⁢
        T
      
      
        2
        +
        
          
            (
            
              N
              -
              1
            
            )
          
          ⁢
          α
        
      
    
  




for maximum values of α.

FIG. 34. Simplified schematic of single-delay implementation of median filter.
FIG. 35. Attenuation and phase sift of a purely harmonic signal filtered by a single-delay median circuit.
FIG. 36. Inputs and outputs of a single-delay median filter for several different frequencies.
FIG. 37. Nonlinear distortions of harmonic signal by a single-delay median filter.
FIG. 38. Noise suppression efficiency of a single-delay median filter.
FIG. 39. Illustration of using AMF for noise suppression in multicarrier signals.
FIG. 40. Attenuation of a purely harmonic signal by median comb filters.
FIG. 41. Illustration of using AMCF for noise suppression in a single carrier signal.
FIG. 42. Illustration of real-time filtering of a CMOS signal by an AQCF.
FIG. 43. Generalized diagram of signal demodulation in accordance with present invention.
FIG. 44. Example of typical signal demodulation in the existing art.
FIG. 45. Example of signal demodulation in accordance with present invention.



TERMS AND DEFINITIONS WITH ILLUSTRATIVE EXAMPLES
For convenience, the essential terms used in the subsequent detailed description of the invention are provided below, along with their definitions adopted for the purpose of this disclosure. Some examples clarifying and illustrating the meaning of the definitions are also provided. Note that the sections and equations in this part are numbered separately from the rest of the disclosure. Additional explanatory information on relevant terms and definitions can be found in U.S. patent application Ser. No. 09/921,524 and U.S. Provisional Patent Application No. 60/416,562, which are incorporated herein by reference in their entirety. Some other terms and their definitions which might appear in this disclosure will be provided in the detailed description of the invention.
D-1 Continuous Comparators and Probes
Consider a simple measurement process whereby a signal χ(t) is compared to a threshold value D. The ideal measuring device would return ‘0’ or ‘1’ depending on whether χ(t) is larger or smaller than D. The output of such a device is represented by the Heaviside unit step function θ[D−χ(t)], which is discontinuous at zero. However, the finite precision of real measurements inevitably introduces uncertainty in the output whenever χ(t)≈D. To describe this property of a real measuring device, we represent its output by a continuous function ΔD [D−χ(t)], where the width parameter ΔD characterizes the threshold interval over which the function changes from ‘0’ to ‘1’ and, therefore, reflects the measurement precision level. We call ΔD(D) the threshold step response of a continuous comparator. Because of the continuity of this function, its derivative ƒΔD(D)=dΔD/dD exists everywhere, and we call it the comparator's threshold impulse response, or a probe (Nikitin et al., 2003; Nikitin and Davidchack, 2003a,b). This threshold continuity of the output of a comparator is the key to a truly analog representation of such a measurement. Examples of step and impulse responses of a continuous comparator are shown in FIG. 2. We further assume, for simplicity, that the probe is a unimodal even function, that is, ƒΔD(D) has only a single maximum and ƒΔD(D)=ƒΔD(−D).
In practice, many different circuits can serve as comparators, since any continuous monotonic function with constant unequal horizontal asymptotes will produce the desired response under appropriate scaling and reflection. It may be simpler to implement a comparator described by an odd function {tilde over ()}ΔD which relates to the response ΔD as

{tilde over ()}ΔD=A(2ΔD−1),  (D-1)

where A is an arbitrary (nonzero) constant. For example, the voltage-current characteristic of a sub-threshold transconductance amplifier (Mead, 1989; Urahama and Nagao, 1995) can be described by the hyperbolic tangent function, {tilde over ()}ΔD=A tan h(D/ΔD), and thus such an amplifier can serve as a continuous comparator. For specificity, this response function is used in the numerical examples of this disclosure. A practical implementation of the probe ƒΔD corresponding to the comparator ΔD can be conveniently accomplished as a finite difference




  
    
      
        
          
            
              
                f
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  D
                
              
              ⁡
              
                (
                D
                )
              
            
            ≈
            
              
                δ
                ⁢
                
                  
                
                ⁢
                
                  
                    (
                    
                      F
                      ~
                    
                    )
                  
                  
                    Δ
                    ⁢
                    
                      
                    
                    ⁢
                    D
                  
                
                ⁢
                
                  (
                  D
                  )
                
              
              
                4
                ⁢
                
                  
                
                ⁢
                A
                ⁢
                
                  
                
                ⁢
                δ
                ⁢
                
                  
                
                ⁢
                D
              
            
          
          =
          
            
              1
              
                4
                ⁢
                A
                ⁢
                
                  
                
                ⁢
                δ
                ⁢
                
                  
                
                ⁢
                D
              
            
            ⁡
            
              [
              
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    (
                    
                      D
                      +
                      
                        δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    )
                  
                
                -
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    (
                    
                      D
                      -
                      
                        δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    )
                  
                
              
              ]
            
          
        
        ,
      
    
    
      
        (
        
          D
          ⁢
          
            -
          
          ⁢
          2
        
        )
      
    
  




where δD is a relatively small fraction of ΔD.

Note that the terms ‘comparator’ and ‘discriminator’ might be used synonymously in this disclosure.
D-2 Analog Rank Filters (ARFs)
Consider the measuring process in which the difference between the threshold variable D and the scalar signal χ(t) is passed through a comparator ΔD, followed by a linear time averaging filter with a continuous impulse response w(t). The output of this system can be written as

Φ(D,t)=w(t)*ΔD[D−χ(t)],  (D-3)

where the asterisk denotes convolution. The physical interpretation of the function Φ(D, t) is the (time dependent) cumulative distribution function of the signal χ(t) in the moving time window w(t) (Nikitin and Davidchack, 2003b). In the limit of high resolution (small ΔD), equation (D-3) describes the ‘ideal’ distribution (Ferreira, 2001). Notice that Φ(D, t) is viewed as a function of two variables, threshold D and time t, and is continuous in both variables.

The output of a quantile filter of order q in the moving time window w(t) is then given by the function Dq(t) defined implicitly as

Φ[Dq(t),t]=q, 0≦q≦1.  (D-4)

Viewing the function Φ(D, t) as a surface in the three-dimensional space (t, D, Φ), we immediately have a geometric interpretation of Dq(t) as that of a level (or contour) curve obtained from the intersection of the surface Φ=Φ(D, t) with the plane Φ=q, as shown in FIG. 3. Based on this geometric interpretation, one can develop various explicit as well as feedback representations for analog rank filters, including such generalizations as L filters and α-trimmed mean filters (Nikitin and Davidchack, 2003b).

Note that the terms analog ‘rank’, ‘quantile’, ‘percentile’, and ‘order statistic’ filters are often synonymous and might be used alternatively in this disclosure.
D-2.1 Quantile Filters for Modulated Densities
Let us point out (see Nikitin and Davidchack, 2003a,b, for example) that various threshold densities can be viewed as different appearances of a general modulated threshold density (MTD)




  
    
      
        
          
            φ
            ⁡
            
              (
              
                D
                ,
                t
              
              )
            
          
          =
          
            
              
                w
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    K
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  ⁢
                  
                    
                      f
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        D
                        -
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
            
              
                w
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                K
                ⁡
                
                  (
                  t
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        
          D
          ⁢
          
            -
          
          ⁢
          5
        
        )
      
    
  




where K(t) is a unipolar modulating signal. Various choices of the modulating signal allow us to introduce different types of threshold densities and impose different conditions on these densities. For example, the simple amplitude density is given by the choice K(t)=const, and setting K(t) equal to |{dot over (χ)}(t)| leads to the counting density. The significance of the definition of the time dependent counting (threshold crossing) density arises from the fact that it characterizes the rate of change in the analyzed signal, which is one of the most important characteristics of a dynamic system. Notice that the amplitude density is proportional to the time the signal spends in a vicinity of a certain threshold, while the counting density is proportional to the number of ‘visits’ to this vicinity by the signal. FIG. 4 shows both the amplitude and counting densities computed for the fragment of a signal shown in the top panel of the figure. Note that the amplitude density has a sharp peak at every signal extremum, while the counting density has a much more regular shape.

An expression for the quantile filter for a modulated density can be written as




  
    
      
        
          
            
              d
              
                D
                q
              
            
            
              d
              t
            
          
          =
          
            
              
                
                  w
                  T
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    K
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  ⁢
                  
                    (
                    
                      q
                      -
                      
                        
                          F
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            D
                          
                        
                        ⁡
                        
                          [
                          
                            
                              D
                              q
                            
                            -
                            
                              x
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                          
                          ]
                        
                      
                    
                    )
                  
                
                }
              
            
            
              τ
              ⁢
              
                
              
              ⁢
              
                w
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    K
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  ⁢
                  
                    
                      f
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        
                          D
                          q
                        
                        -
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
          
        
        ,
      
    
    
      
        (
        
          D
          ⁢
          
            -
          
          ⁢
          6
        
        )
      
    
  




and the physical interpretation of such a filter depends on the nature of the modulating signal. For example, a median filter in a rectangular moving window for K(t)=|{umlaut over (χ)}(t)|θΔD{dot over (χ)}[{dot over (χ)}(t)] yields D1/2(t) such that half of the extrema of the signal χ(t) in the window are below this threshold.

Selected Acronyms and where they First Appear













AARF
Adaptive Analog Rank Filter


AARS
Adaptive Analog Rank Selector


AMF
Analog Median Filter


AMCF
Analog Median Comb Filter


AQCF
Analog Quantile Comb Filter


ARTEMIS
Adaptive Real-Time Embodiments for Multivariate



Investigation of Signals


AVATAR
Analysis of Variables Through Analog Representation


BASIS
Bimodal Analog Sensor Interface System


EARL
Explicit Analog Rank Locator


MTD
Modulated Threshold Density


SPART
Single Point Analog Rank Tracker









Selected Notations and where they First Appear













θ(x)
Heaviside unit step function


 ΔD,  ΔD
continuous comparator (discriminator), equation (D-1)


Dq(t), Dq(t; T)
output of quantile filter of order q


 (D, x)
threshold domain function, equation (1)


|x|±
positive/negative component of x, equation (7)


δ(x)
Dirac delta function, equation (8)


 (D, t),  (t)
instantaneous counting rate, page 14 and equation (8)


R(D, t), R(t)
counting rate in moving window of time,



page 14 and equation (17)


 ΔDdel
delayed comparator


 ΔDave
averaging comparator, equation (27)









DETAILED DESCRIPTION AND BEST MODE OF THE INVENTION
The Detailed Description of the Invention is organized as follows.
Section 1 provides the definition of the threshold domain function and Threshold Domain Filtering, and explains its usage for feature extraction.
Section 2 deals with quantification of crossings of threshold domain boundaries by means of Analog Counting.
Section 3 introduces Multimodal Pulse Shaping as a way of embedding an incoming signal into a threshold space and thus enabling extraction of the features of interest by the Threshold Domain Filtering. Subsection 3.1 describes Analog Bimodal Coincidence (ABC) counting systems as an example of a real-time signal processing utilizing Threshold Domain Filtering in combination with Analog Counting and Multimodal Pulse Shaping.
Section 4 presents various embodiments of Analog Rank Filters which can be used in ARTEMIS in order to reconcile the conflicting requirements of the robustness and adaptability of the control levels of the Threshold Domain Filtering. Subsection 4.1 describes the Adaptive Analog Rank Filters (AARFs) and Adaptive Analog Rank Selectors (AARSs), while §4.2 introduces the Explicit Analog Rank Locators (EARLs). Subsection 4.3 describes the Bimodal Analog Sensor Interface System (BASIS) as an example of an analog signal processing module operatable as a combination of Threshold Domain Filtering, Analog Counting, and Analog Rank Filtering.
As an additional illustration of ARTEMIS, §5 describes a technique and a circuit for generation of monoenergetic Poissonian pulse trains with adjustable rate and amplitude through a combination of Threshold Domain Filtering and Analog Counting.
Section 6 discusses additional practical implementations and applications of analog rank filters in continuous time windows. Subsection 6.1 describes a modified practical approximation of a rank filter in an arbitrary continuous time window and discusses its applications for noise suppression. The modified approximation simplifies the hardware implementation of the filter and improves its performance. Subsection 6.2 introduces analog rank comb filters and illustrates their use in telecommunications and image processing. Subsection 6.3 describes a method for signal demodulation using a threshold filter.
1 Threshold Domain Filtering
Threshold Domain Filtering is used for separation of the features of interest in a signal from the rest of the signal. In terms of a threshold domain, a ‘feature of interest’ is either a point inside of the domain, or a point on the boundary of the domain. In an electrical apparatus, e.g., a typical Threshold Domain Filter can be composed of (asynchronous) comparators and switches, where the comparators operate on the differences between the components of the incoming variable(s) and the corresponding components of the control variable(s). For example, for the domain defined as a product of two ideal comparators represented by the Heaviside unit step function θ(χ), =θ[χ(t)−D] θ[{dot over (χ)}(t)] (with two control levels, D and zero), a point inside (that is, =1) corresponds to a positive-slope signal of the magnitude greater than D, and the stationary points of χ(t) above the threshold D can be associated with the points on the boundary of this domain. More generally, as used in the present invention, a Threshold Domain Filter is defined by its mathematical properties regardless of their physical implementation.

Defining threshold domain Let us assume that a continuous signal y=y(a, t) depends on some spatial coordinates a and time t. Thus, in a vicinity of (a, t), this signal can be characterized by its value y(a, t) at this point along with its partial derivatives ∂y(a, t)/∂αi and ∂y(a, t)/∂t at this point. These values (of the signal and its derivatives) can be viewed as coordinates of a point x=x(a, t) in a threshold space, where the vector x consists of the signal y and its various partial derivatives. A particular feature of interest can thus be defined as a certain region in the threshold space as follows.

Let us describe an ‘ideal’ threshold domain by a (two-level) function (D, x) such that




  
    
      
        {
        
          
            
              
                
                  
                                        ⁢
                    
                      (
                      
                        D
                        ,
                        x
                      
                      )
                    
                  
                  =
                  
                    q
                    1
                  
                
              
              
                
                  if
                  ⁢
                  
                    
                  
                  ⁢
                  x
                  ⁢
                  
                    
                  
                  ⁢
                  is
                  ⁢
                  
                    
                  
                  ⁢
                  inside
                  ⁢
                  
                    
                  
                  ⁢
                  domain
                
              
            
            
              
                
                  
                                        ⁢
                    
                      (
                      
                        D
                        ,
                        x
                      
                      )
                    
                  
                  =
                  
                    q
                    2
                  
                
              
              
                otherwise
              
            
          
          ,
        
      
    
    
      
        (
        1
        )
      
    
  




where D is a vector of the control levels of the threshold filter. Without loss of generality, we can set q1=1 and q2=0. For example, in a physical space, an ideal cuboid with the edge lengths a, b, and c, centered at (χ0, χ0, χ0), can be represented by





  
    
      
        
          
                        ⁢
            
              (
              
                x
                ,
                y
                ,
                z
              
              )
            
          
          =
          
            
              θ
              ⁡
              
                [
                
                  1
                  -
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            x
                            -
                            
                              x
                              0
                            
                          
                          a
                        
                        )
                      
                      2
                    
                  
                
                ]
              
            
            ⁢
            
              θ
              ⁡
              
                [
                
                  1
                  -
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            y
                            -
                            
                              y
                              0
                            
                          
                          b
                        
                        )
                      
                      2
                    
                  
                
                ]
              
            
            ⁢
            
              θ
              ⁡
              
                [
                
                  1
                  -
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            z
                            -
                            
                              z
                              0
                            
                          
                          c
                        
                        )
                      
                      2
                    
                  
                
                ]
              
            
          
        
        ,
      
    
    
      
        (
        2
        )
      
    
  




where we have assumed constant control levels and thus is a function of χ, y, and z only. Note that for a ‘real’, or ‘fuzzy’, domain the transition from q2 to q1 happens monotonically over some finite interval (layer) of a characteristic thickness Δσ. The transition to a ‘real’ threshold domain can be accomplished, for example, by replacing the ideal comparators given be the Heaviside step functions with the ‘real’ comparators, θ→ΔD.

Note that an arbitrary threshold domain can be represented by a combination (e.g., polynomial) of several threshold domains. For example, the cuboid given by equation (2) can be viewed as a product of six domains with plane boundaries, or as a product (intersection) of two domains given by the rectangular cylinders




  
    
      
        
          
                        xy
          
          ⁢
          
            (
            
              x
              ,
              y
            
            )
          
        
        =
        
          
            θ
            ⁡
            
              [
              
                1
                -
                
                  4
                  ⁢
                  
                    
                      (
                      
                        
                          x
                          -
                          
                            x
                            0
                          
                        
                        a
                      
                      )
                    
                    2
                  
                
              
              ]
            
          
          ⁢
          
            θ
            ⁡
            
              [
              
                1
                -
                
                  4
                  ⁢
                  
                    
                      (
                      
                        
                          y
                          -
                          
                            y
                            0
                          
                        
                        b
                      
                      )
                    
                    2
                  
                
              
              ]
            
          
        
      
    
    
      
        (
        3
        )
      
    
  




and





  
    
      
        
          
            
                            yz
            
            ⁢
            
              (
              
                y
                ,
                z
              
              )
            
          
          =
          
            
              θ
              ⁡
              
                [
                
                  1
                  -
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            y
                            -
                            
                              y
                              0
                            
                          
                          b
                        
                        )
                      
                      2
                    
                  
                
                ]
              
            
            ⁢
            
              θ
              ⁡
              
                [
                
                  1
                  -
                  
                    4
                    ⁢
                    
                      
                        (
                        
                          
                            z
                            -
                            
                              z
                              0
                            
                          
                          c
                        
                        )
                      
                      2
                    
                  
                
                ]
              
            
          
        
        ,
      
    
    
      
        (
        4
        )
      
    
  




(χ,y,z)=χy(χ,y)yz(y,z).

Features of a signal In terms of a threshold domain, a ‘feature’ of a signal is either a point inside of the domain, or a point on the boundary of the domain. For example, for the domain =θ[χ(t)−D] θ[{dot over (χ)}(t)] (with two control levels, D and zero), a point inside (that is, =1) corresponds to a positive-slope signal of the magnitude greater than D, and a point on the boundary of this domain is a stationary point of χ(t) above the threshold D.
One should notice that only a small fraction of the signal's trajectory might fall inside of the threshold domain, and thus the duration of the feature might be only a small fraction of the total duration of the signal, especially if a feature is defined as a point on the domain's boundary. Therefore, it is impractical to continuously digitize the signal in order to extract the desired short-duration features. To resolve this, ARTEMIS utilizes an analog technique for extraction and quantification of the salient signal features.
2 Analog Counting
In its simplest form, analog counting consists of three steps: (1) time-differentiation, (2) rectification, and (3) integration. The result of step 2 (rectification) is the instantaneous count rate (D, t), and step 3 (integration) outputs the count rate R(D, t) in a moving window of time w(t), R(D, t)=w(t)*(D, t).

Counting crossings of threshold domain boundaries The number of crossings of the boundaries of a domain by a point following the trajectory x(t) during the time interval [0, T] can be written as





  
    
      
        N
        =
        
          
            ∫
            0
            T
          
          ⁢
          
            
          
          ⁢
          
            
              d
              t
            
            ⁢
            
              
              
                
                  d
                  
                    d
                    t
                  
                
                ⁢
                
                                    ⁡
                  
                    [
                    
                      D
                      ,
                      
                        x
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    ]
                  
                
              
              
            
          
        
      
    
    
      
        (
        5
        )
      
    
  




for the total number of crossings, or





  
    
      
        
          N
          
            +
            _
          
        
        =
        
          
            ∫
            0
            T
          
          ⁢
          
            
          
          ⁢
          
            
              d
              t
            
            ⁢
            
              
                
                
                  
                    d
                    
                      d
                      t
                    
                  
                  ⁢
                  
                                        ⁡
                    
                      [
                      
                        D
                        ,
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                
              
              
                +
                _
              
            
          
        
      
    
    
      
        (
        6
        )
      
    
  




for the number of entries (+) or exits (−). In equation (6), |χ|± denotes positive/negative component of χ,





  
    
      
        
          
            
            x
            
          
          
            +
            _
          
        
        =
        
          
            1
            2
          
          ⁢
          
            
              (
              
                
                  
                  x
                  
                
                ⁢
                
                  +
                  _
                
                ⁢
                x
              
              )
            
            .
          
        
      
    
    
      
        (
        7
        )
      
    
  




Instantaneous count rates Note that the integrands in equations (5) and (6) represent the instantaneous rates of crossings of the domain boundaries,





  
    
      
        
          
                        ⁢
            
              (
              t
              )
            
          
          =
          
            
              ∑
              i
            
            ⁢
            
              
            
            ⁢
            
              δ
              ⁡
              
                (
                
                  t
                  -
                  
                    t
                    i
                  
                
                )
              
            
          
        
        ,
      
    
    
      
        (
        8
        )
      
    
  




where δ(t) is the Dirac delta function, and ti are the instances of the crossings. It should be easy to see that a number of other useful characteristics of the behavior of the signal inside the domain can be obtained based on the domain definition given by equation (1).

Consider, for example, a threshold domain in a physical space given by a product (intersection) of two fields of view (e.g., solid angles) of two lidars2 or cameras. When an object following the trajectory x(t) is in a field of view, the signal is ‘1’. Otherwise, it is ‘0’. Then the product of the signals from both lidars (cameras) is given by [D, x(t)], and the counting of the crossings of the domain boundaries by the object can be performed by an apparatus implementing equations (5) or (6). The following characteristics of the object's motion though the domain are also useful and easily obtained:
The time spent inside the domain,




  
    
      
        
          t
          =
          
            
              ∫
              0
              T
            
            ⁢
            
              
            
            ⁢
            
              
                d
                t
              
              ⁢
              
                
              
              ⁢
              
                                ⁡
                
                  [
                  
                    D
                    ,
                    
                      x
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
          
        
        ,
      
    
    
      
        (
        9
        )
      
    
  




the distance traveled inside the domain,





  
    
      
        
          s
          =
          
            
              ∫
              0
              T
            
            ⁢
            
              
            
            ⁢
            
              
                d
                t
              
              ⁢
              
                
                
                  
                    x
                    .
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                
              
              ⁢
              
                                ⁡
                
                  [
                  
                    D
                    ,
                    
                      x
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
          
        
        ,
      
    
    
      
        (
        10
        )
      
    
  




and the average speed inside the domain,





  
    
      
        
          υ
          _
        
        =
        
          
            s
            t
          
          =
          
            
              
                
                  ∫
                  0
                  T
                
                ⁢
                
                  
                
                ⁢
                
                  
                    d
                    t
                  
                  ⁢
                  
                    
                    
                      
                        x
                        .
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    
                  
                  ⁢
                                    ⁢
                  
                                        ⁡
                    
                      [
                      
                        D
                        ,
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
              
              
                
                  ∫
                  0
                  T
                
                ⁢
                
                  
                
                ⁢
                
                  
                    d
                    t
                  
                  ⁢
                  
                                        ⁡
                    
                      [
                      
                        x
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      ]
                    
                  
                
              
            
            .
          
        
      
    
    
      
        (
        11
        )
      
    
  




2Here LIDAR is an acronym for “LIght Detector And Ranger”.

When using the ‘real’ comparators in a threshold filter and ‘real’ differentiators in an analog counter, the main property of the ‘real’ instantaneous rate (t) is




  
    
      
        
          
            
              lim
              
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  D
                
                ->
                0
              
            
            ⁢
            
              
                lim
                
                  
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    t
                  
                  ->
                  0
                
              
              ⁢
              
                                ⁢
                
                  (
                  t
                  )
                
              
            
          
          =
          
            
              ∑
              i
            
            ⁢
            
              
            
            ⁢
            
              δ
              ⁡
              
                (
                
                  t
                  -
                  
                    t
                    i
                  
                
                )
              
            
          
        
        ,
      
    
    
      
        (
        12
        )
      
    
  




where ΔD and δt are the width and the delay parameters of the comparators and differentiators, respectively. The property given by equation (12) determines the main uses of the instantaneous rate. For example, multiplication of the latter by a signal χ(t) amounts to sampling this signal at the times of occurrence of the events ti. Other temporal characteristics of the events can be constructed by time averaging various products of the signal with the instantaneous rate.

Count rate in a moving window of time Count rate in a moving window of time wT(t) is obtained through the integration of the instantaneous rate by an integrator with an impulse response wT(t), namely as

R(D,t)=wT(t)*(D,t).  (13)

Although there is effectively no difference between averaging window functions which rise from zero to a peak and then fall again, boxcar averaging is deeply engraved in modern engineering, partially due to the ease of interpretation and numerical computations. Thus one of the requirements for counting with a non-boxcar window is that the results of such measurements are comparable with boxcar counting. As an example, let us consider averaging of the instantaneous rates by a sequence of n RC-integrators. For simplicity, let us assume that these integrators have identical time constants τ=RC, and thus their combined impulse response is




  
    
      
        
          
            ω
            n
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            
              t
              
                n
                -
                1
              
            
            
              
                
                  (
                  
                    n
                    -
                    1
                  
                  )
                
                !
              
              ⁢
              
                τ
                n
              
            
          
          ⁢
          
            e
            
              
                -
                t
              
              /
              τ
            
          
          ⁢
          
            
              θ
              ⁡
              
                (
                t
                )
              
            
            .
          
        
      
    
    
      
        (
        14
        )
      
    
  




Comparability with a boxcar function of the width T can be achieved by equating the first two moments of the respective weighting functions. Thus a sequence of n RC-integrators with identical time constants





  τ
  =
  
    
      1
      2
    
    ⁢
    T
    ⁢
    
      /
    
    ⁢
    
      
        3
        ⁢
        n
      
    
  




will provide us with rate measurements corresponding to the time averaging with a rectangular moving window of width T.3 3Of course one can design different criteria for equivalence of the boxcar weighting function and w(t). In our example we were simply looking for the width parameter of w(t) which would allow us to interpret the rate measurements with this function as ‘a number of events per time interval T’.

FIG. 5 compares the moving window rates measured with the boxcar (thin solid line) and the ‘triple-integrator’ test function (n=3 in equation (14), thick line) with τ=T/6. The respective test functions are shown in the upper left corner of the figure. The gray band in the figure outlines the error interval in the rate measurements as the square root of the total number of counts in the time interval T per this interval.
One of the obvious shortcomings of boxcar averaging is that it does not allow meaningful differentiation of counting rates, while knowledge of time derivatives of the event occurrence rate is important for all physical models where such rate is a time-dependent parameter. Indeed, the time derivative of the rate measured with a boxcar function of width T is simply T−1 times the difference between the ‘original’ instantaneous pulse train and this pulse train delayed by T, and such representation of the rate derivative hardly provides physical insights. On the other hand, the time derivative of the ‘cascaded integrators’ weighting function wn given by equation (14) is the bipolar pulse {dot over (w)}n=τ−1(wn−1−wn), and thus the time derivative of the rate evaluated with wn(t) is a measure of the ‘disbalance’ of the rates within the moving window (positive for a ‘front-loaded’ sample, and negative otherwise).
3 Multimodal Pulse Shaping
In order to focus upon characteristics of interest, feature definition may require knowledge of the (partial) derivatives of the signal. For example, in order to count the extrema in a signal χ(t), one needs to have access to the time derivative of the signal, {dot over (χ)}(t). A typical Multimodal Pulse Shaper in the present invention transforms at least one component of the incoming signal into at least two components such that one of these two components is a (partial) derivative of the other, and thus Multimodal Pulse Shaping can be used for embedding the incoming signal into a threshold space and enabling extraction of the features of interest by the Threshold Domain Filtering.
Note, however, that differentiation performed by any physical differentiator is not accurate. For example, a time derivative of ƒ(t) obtained by an RC differentiator is proportional to [e−t/τθ(t)]*{dot over (ƒ)}(t), where τ=RC, not to {dot over (ƒ)}(t). Thus Multimodal Pulse Shaping does not attempt to straightforwardly differentiate the incoming signal. Instead, it processes an incoming signal in parallel channels to obtain the necessary relations between the components of the output signal. For example, if x(a, t) is a result of shaping the signal y(a, t) by the first channel of a pulse shaper with the impulse response ƒ(a, t),

x(a,t)=ƒ(a,t)*y(a,t),  (15)

then the derivatives of x can be obtained as





  
    
      
        
          
            x
            .
          
          ⁡
          
            (
            
              a
              ,
              t
            
            )
          
        
        =
        
          
            
              f
              .
            
            *
            
              y
              ⁡
              
                (
                
                  a
                  ,
                  t
                
                )
              
            
            ⁢
            
              
            
            ⁢
            and
            ⁢
            
              
            
            ⁢
            
              ∂
              
                ∂
                
                  a
                  i
                
              
            
            ⁢
            
              x
              ⁡
              
                (
                
                  a
                  ,
                  t
                
                )
              
            
          
          =
          
            
              
                ∂
                f
              
              
                ∂
                
                  a
                  i
                
              
            
            *
            
              
                y
                ⁡
                
                  (
                  
                    a
                    ,
                    t
                  
                  )
                
              
              .
            
          
        
      
    
    
      
        (
        16
        )
      
    
  




Thus Multimodal Pulse Shaping will be achieved if the impulse responses of various channels in the pulse shaper relate as the respective derivatives of the impulse response of the first channel.

FIG. 6 shows an example of bimodal pulse shaping which can be used for both the amplitude and timing measurements of a short-duration event. An event of magnitude Ei and arrival time ti is passed through an RC pulse shaping network, producing a continuous signal χ(t). The event can be fully characterized, e.g., by the first extremum of χ(t), since the height of the extremum is proportional to Ei, and its position in time is delayed by a constant with respect to ti. By replacing an RC integrator in the shaping network by an RC differentiator with the same time constant, one can obtain an accurate time derivative of χ(t). Now the event can be associated with the inbound crossing of the boundary of the threshold domain =θ[χ(t)−D] θ[−{dot over (χ)}(t)], where the threshold D is set at a positive value to eliminate the rest of the signal's stationary points.
3.1 Example
Analog Bimodal Coincidence (ABC) Counting Systems
Let us illustrate the usage of a threshold filter, in combination with multimodal pulse shaping and analog counting, in a signal processing module for a two-detector charged particle telescope. This module is an example of an Analog Bimodal Coincidence (ABC) counting system.
In our approach, we relate the short-duration particle events to certain stationary points (e.g., local maxima) of a relatively slow analog signal. Those points can be accurately identified and characterized if the time derivative of the signal is available. Thus the essence of ABC counting systems is in the use of multiple signal characteristics—here a signal and its time derivative—and signals from multiple sensors in coincidence to achieve accuracy in both the amplitude and timing measurements while using low-speed, analog signal processing circuitry. This allows us to improve both the engineering aspects of the instrumentation and the quality of the scientific data.
A simplified schematic of the module is shown in FIG. 7. A bimodal pulse shaping is used to obtain an accurate time derivative of the signal from a detector. Comparators are used to obtain two-level signals with the transitions at appropriate threshold crossings (e.g., zero crossings for the derivative signal). Simple asynchronous analog switches are used to obtain the products of the comparators' outputs suitable for appropriate conditional and coincidence counting. The comparators and the analog switches constitute the threshold domain filter with the thresholds {D1}, {D2}, and the grounds as the control levels. A-Counters are employed for counting the crossings of the threshold domains' boundaries. In its simplest form, an A-Counter is a differentiating circuit (such as a simple RC-differentiator) with a relatively small time constant (in order to keep the dead-time losses small), followed by a precision diode and an integrator with a large time constant (at least an order of magnitude larger than the inverted smallest rate to be measured). A TOF selector employs an additional pulse shaping amplifier, and a pair of comparators with the levels corresponding to the smallest and the largest time of flight.
Bimodal pulse shaping and instantaneous rate of signal's maxima When the time derivative of a signal is available, we can relate the particle events to local maxima of the signal and accurately identify these events. Thus bimodal pulse shaping is the key to the high timing accuracy of the module. As shown in FIG. 7, a bimodal pulse shaping unit outputs two signals, where the second signal is proportional to an accurate time derivative of the first output. The rate R(t), in the moving window of time wT(t), of a signal's maxima above the threshold D can be expressed as




  
    
      
        
          
            R
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                ω
                T
              
              ⁡
              
                (
                t
                )
              
            
            *
            
              
                
                
                  
                    d
                    
                      d
                      t
                    
                  
                  ⁢
                  
                    {
                    
                      
                        θ
                        ⁡
                        
                          [
                          
                            
                              x
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                            -
                            D
                          
                          ]
                        
                      
                      ⁢
                      
                        θ
                        ⁡
                        
                          [
                          
                            -
                            
                              
                                x
                                .
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                          
                          ]
                        
                      
                    
                    }
                  
                
                
              
              +
            
          
        
        ,
      
    
    
      
        (
        17
        )
      
    
  




where |y|+ denotes the positive part of y (see equation (7)), θ is the Heaviside unit step function, and the asterisk denotes convolution. Equation (17) represents an idealization of the measuring scheme consisting of the following steps: (i) the first output of the bimodal pulse shaping unit is passed through a comparator set at level D, and the second output—through a comparator set at zero level; (ii) the product of the outputs of the comparators is differentiated, (iii) rectified by a (precision) diode, and (iv) integrated on a time scale T (by an integrator with the impulse response wT(t)). Note that steps (ii) through (iv) represent passing the product of the comparators through an A-Counter. Also note that the output of step (iii) is the instantaneous rate of the signal's maxima above threshold D.

Basic coincidence counting For basic coincidence counting, the coincident rate Rc(t) can be written as





  
    
      
        
          
            
              R
              c
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                ω
                T
              
              ⁡
              
                (
                t
                )
              
            
            *
            
              
                
                
                  
                    d
                    
                      d
                      t
                    
                  
                  ⁢
                  
                    {
                    
                      
                        θ
                        ⁡
                        
                          [
                          
                            
                              
                                x
                                1
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                            -
                            
                              D
                              1
                            
                          
                          ]
                        
                      
                      ⁢
                      
                        θ
                        ⁡
                        
                          [
                          
                            -
                            
                              
                                
                                  x
                                  .
                                
                                1
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                          
                          ]
                        
                      
                      ⁢
                      
                        θ
                        ⁡
                        
                          [
                          
                            
                              
                                x
                                2
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                            -
                            
                              D
                              2
                            
                          
                          ]
                        
                      
                    
                    }
                  
                
                
              
              +
            
          
        
        ,
      
    
    
      
        (
        18
        )
      
    
  




where the notations are as in equation (17). One can see that equation (18) differs from equation (17) only by an additional term in the product of the comparators' outputs.

Transition to realistic model of measurements It can be easily seen that equations (17) and (18) do not correctly represent any practical measuring scheme implementable in hardware. For example, both equations contain derivatives of discontinuous Heaviside functions, and thus instantaneous rates are expressed through singular Dirac δ-functions. To make a transition from an ideal measurement scheme to a more realistic model, we replace the Heaviside step functions by ‘real’ discriminators (θ(χ)→αδt(t)*ΔD(χ), where αδt(t) is a continuous kernel such that ∫−∞∞dt αδt(t)=1), and perform differentiation through a continuous kernel





  
    (
    
      
        
          d
          
            d
            t
          
        
        ⁢
        ...
      
      →
      
        
          
            
              α
              .
            
            
              δ
              ⁢
              
                
              
              ⁢
              t
            
          
          ⁡
          
            (
            t
            )
          
        
        *
        ...
      
    
    )
  
  ,




etc. We choose appropriate functional representations of ΔD, αδt(t), etc., for various elements of a schematic, and also add appropriate noise sources such as thermal noise at all intermediate measuring steps. FIGS. 8 and 9 illustrate such realistic measurements of instantaneous rates of extrema and coincident maxima, respectively. Notice that, in both figures, an event is represented by a narrow peak of a prespecified area in the instantaneous rates.

Time-of-flight (TOF) constrained measurements The time-of-flight constrained coincident rate can be expressed, for times of flight larger than Δt, as





  
    
      
        
          
                        c
          
          =
          
            
              
                w
                T
              
              ⁡
              
                (
                t
                )
              
            
            *
            
              
                
                
                  
                    d
                    
                      d
                      t
                    
                  
                  ⁢
                  
                    θ
                    ⁡
                    
                      [
                      
                        
                          
                            h
                            .
                          
                          *
                          
                            
                              
                              
                                
                                                                    12
                                
                                -
                                
                                                                    21
                                
                              
                              
                            
                            +
                          
                        
                        -
                        
                          Z
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            t
                          
                        
                      
                      ]
                    
                  
                
                
              
              +
            
          
        
        ,
      
    
    
      
        (
        19
        )
      
    
  




where h is some (unipolar or bipolar) impulse response function, ZΔt is a threshold level corresponding to the TOF equal to Δt, and Dij=|θ[χi] θ [−Dj]|+. Thus a TOF selector (see FIG. 7) will consist of a pulse shaping amplifier with an impulse response h, and a differential comparator. FIG. 10(a) illustrates coincident counting according to equation (19), and FIG. 10(b) provides an example of using a realistic model of the TOF measurements, with functional representations of the elements of the schematic corresponding to commercially-available, off-the-shelf (COTS) components. As can be seen in the figure, the performance of the system is not significantly degraded by the transition from an idealized to a more realistic model.

4 Analog Rank Filtering
In ARTEMIS, Analog Rank Filtering can be used for establishing and maintaining the analog control levels of the Threshold Domain Filtering. It ensures the adaptivity of the Threshold Domain Filtering to changes in the measurement conditions (e.g., due to nonstationarity of the signal or instrument drift), and thus the optimal separation of the features of interest from the rest of the signal. For example, the threshold level D in the domain =θ[χ(t)−D] θ[{dot over (χ)}(t)] can be established by means of Analog Rank Filtering to separate the stationary points of interest from those caused by noise. Note that the Analog Rank Filtering outputs the control levels indicative of the salient properties of the input signal(s), and thus can be used as a stand-alone embodiment of ARTEMIS for adaptive real-time signal conditioning, processing, analysis, quantification, comparison, and control, and for detection, quantification, and prediction of changes in signals.

Creating and maintaining baseline and analog control levels by analog rank filters Analog rank filters can be used to establish various control levels (reference thresholds) for the threshold filter. When used in ARTEMIS, rank-based filters allow us to reconcile, based on the rank filters' insensitivity to outliers, the conflicting requirements of the robustness and adaptability of the control levels of the Threshold Domain Filtering. In addition, the control levels created by Analog Rank Filters are themselves indicative of the salient properties of the input signal(s).

4.1 Adaptive Analog Rank Filters (AARFs)
Rank filter in RC window When the time averaging filter in equation (D-3) is an RC integrator (RC=τ), the differential equation for the output Dq(t) of a rank filter takes an especially simple form and can be written as




  
    
      
        
          
            
              d
              
                D
                q
              
            
            
              d
              t
            
          
          =
          
            
              
                A
                ⁡
                
                  (
                  
                    
                      2
                      ⁢
                      q
                    
                    -
                    1
                  
                  )
                
              
              -
              
                
                  
                    F
                    ~
                  
                  
                    Δ
                    ⁢
                    
                      
                    
                    ⁢
                    D
                  
                
                ⁡
                
                  [
                  
                    
                      
                        D
                        q
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    -
                    
                      x
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
            
              
                
                  2
                  ⁢
                  A
                  ⁢
                  
                    
                  
                  ⁢
                  τ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      h
                      τ
                    
                    ⁡
                    
                      (
                      s
                      )
                    
                  
                  *
                  
                    
                      f
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        
                          
                            D
                            q
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                        -
                        
                          x
                          ⁡
                          
                            (
                            s
                            )
                          
                        
                      
                      ]
                    
                  
                
                
              
              
                s
                =
                t
              
            
          
        
        ,
      
    
    
      
        (
        20
        )
      
    
  




where hτ(t)=θ(t) exp





  
    (
    
      
        -
        
          t
          τ
        
      
      -
      
        ln
        ⁢
        
          
        
        ⁢
        τ
      
    
    )
  
  .




4 The solution of this equation is ensured to rapidly converge to Dq(t) of the chosen quantile order q regardless of the initial condition (Nikitin and Davidchack, 2003b). Note also that the continuity of the comparator is essential for the right-hand side of equation (20) to be well behaved. 4In more explicit notation, the convolution integral in the denominator of equation (20) can be written as





  
    
      
        
          
            h
            τ
          
          ⁡
          
            (
            s
            )
          
        
        *
        
          
            f
            
              Δ
              ⁢
              
                
              
              ⁢
              D
            
          
          ⁡
          
            [
            
              
                
                  D
                  q
                
                ⁡
                
                  (
                  t
                  )
                
              
              -
              
                x
                ⁡
                
                  (
                  s
                  )
                
              
            
            ]
          
        
      
      
    
    
      s
      =
      t
    
  
  =
  
    
      1
      τ
    
    ⁢
    
      
        ∫
        
          -
          ∞
        
        t
      
      ⁢
      
        
      
      ⁢
      
        
          d
          s
        
        ⁢
        
          
        
        ⁢
        
          exp
          ⁡
          
            (
            
              
                s
                -
                t
              
              τ
            
            )
          
        
        ⁢
        
          
            
              f
              
                Δ
                ⁢
                
                  
                
                ⁢
                D
              
            
            ⁡
            
              [
              
                
                  
                    D
                    q
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                -
                
                  x
                  ⁡
                  
                    (
                    s
                    )
                  
                
              
              ]
            
          
          .
        
      
    
  




The main obstacle to a straightforward analog implementation of the filter given by equation (20) is that the convolution integral in the denominator of the right-hand side needs to be re-evaluated (updated) for each new value of Dq. If we wish to implement an analog rank filter in a simple feed-back circuit, then we should replace the right-hand side of equation (20) by an approximation which can be easily evaluated by such a circuit. Of course, one can employ a great variety of such approximations (Bleistein and Handelsman, 1986, for example), whose suitability will depend on a particular goal. A very simple approximation becomes available in the limit of sufficiently small τ, since then we can replace hτ(s)*ƒΔD[Dq(t)−χ(s)]|s=t by hτ(t)*ƒΔD[Dq(t)−χ(t)] in equation (20). As was shown by Nikitin and Davidchack (2003b), this simple approximation can still be used for an arbitrary time window w(t), if we represent w(t) as a weighted sum of many RC integrators with small τ. However, this approximation fails when the threshold resolution is small (e.g., when ΔD<|hτ(t)*{dot over (χ)}(t)|τ, and thus cannot be used in real-time processing of non-stationary signals.
Adaptive approximation of a feedback rank filter in an arbitrary time window A rank filter in a boxcar moving time window BT(t)=[θ(t)−θ(t−T)]/T is of a particular interest, since it is the most commonly used window in digital rank filters. The output Dq of an analog rank filter in this window is implicitly defined as BT(t)*ΔD [Dq−χ(t)]=q. To construct an approximation for this filter suitable for implementation in an analog feedback circuit, we first approximate the boxcar window BT(t) by the following moving window wN(t):5




  
    
      
        
          
            
              ω
              N
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              1
              N
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  0
                
                
                  N
                  -
                  1
                
              
              ⁢
              
                
              
              ⁢
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  
                    t
                    -
                    
                      2
                      ⁢
                      k
                      ⁢
                      
                        
                      
                      ⁢
                      τ
                    
                  
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        21
        )
      
    
  




where τ=T/(2N). The first moments of the weighting functions wN(t) and BT(t) are identical, and the ratio of their respective second moments is √{square root over (1+2/N2)}≈1+1/N2. The other moments of the time window wN(t) also converge rapidly, as N increases, to the respective moments of BT(t), which justifies the approximation of equation (21). 5Since a moving time window is always a part of a convolution integral, the approximation is understood in the sense that BT(t)*g(t)≈wN(t)*g(t), where g(t) is a smooth function.

Now, the output of a rank filter in such a window can be approximated as discussed earlier, namely as (Nikitin and Davidchack, 2003b)6




  
    
      
        
          
            
              d
              
                D
                q
              
            
            
              d
              t
            
          
          ≈
          
            
              
                AN
                ⁡
                
                  (
                  
                    
                      2
                      ⁢
                      q
                    
                    -
                    1
                  
                  )
                
              
              -
              
                
                  ∑
                  
                    k
                    =
                    0
                  
                  
                    N
                    -
                    1
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          D
                          q
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          
                            t
                            -
                            
                              2
                              ⁢
                              k
                              ⁢
                              
                                
                              
                              ⁢
                              τ
                            
                          
                          )
                        
                      
                    
                    ]
                  
                
              
            
            
              2
              ⁢
              A
              ⁢
              
                
              
              ⁢
              τ
              ⁢
              
                
              
              ⁢
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                
                  ∑
                  
                    k
                    =
                    0
                  
                  
                    N
                    -
                    1
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    f
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          D
                          q
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          
                            t
                            -
                            
                              2
                              ⁢
                              k
                              ⁢
                              
                                
                              
                              ⁢
                              τ
                            
                          
                          )
                        
                      
                    
                    ]
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        22
        )
      
    
  




where τ=T/(2N). Note that the accuracy of this approximation is contingent on the requirement that ΔD>|hτ(t)*{dot over (χ)}(t)|τ. This means that, if we wish to have a simple analog circuit and keep N relatively small, we must choose ΔD sufficiently large for the approximation to remain accurate. On the other hand, we would like to maintain high resolution of the acquisition system, that is, to keep ΔD small. An explicit expression for the convolution integral hτ(t)*ƒΔD [Dq(t)−χ(t−2kτ)] is





  
    
      
        h
        τ
      
      ⁡
      
        (
        t
        )
      
    
    *
    
      
        f
        
          Δ
          ⁢
          
            
          
          ⁢
          D
        
      
      ⁡
      
        [
        
          
            
              D
              q
            
            ⁡
            
              (
              t
              )
            
          
          -
          
            x
            ⁡
            
              (
              
                t
                -
                
                  2
                  ⁢
                  k
                  ⁢
                  
                    
                  
                  ⁢
                  τ
                
              
              )
            
          
        
        ]
      
    
  
  =
  
    
      1
      τ
    
    ⁢
    
      
        ∫
        
          -
          ∞
        
        t
      
      ⁢
      
        
      
      ⁢
      
        
          d
          s
        
        ⁢
        
          
        
        ⁢
        
          exp
          ⁡
          
            (
            
              
                s
                -
                t
              
              τ
            
            )
          
        
        ⁢
        
          
            
              f
              
                Δ
                ⁢
                
                  
                
                ⁢
                D
              
            
            ⁡
            
              [
              
                
                  
                    D
                    q
                  
                  ⁡
                  
                    (
                    s
                    )
                  
                
                -
                
                  x
                  ⁡
                  
                    (
                    
                      s
                      -
                      
                        2
                        ⁢
                        k
                        ⁢
                        
                          
                        
                        ⁢
                        τ
                      
                    
                    )
                  
                
              
              ]
            
          
          .
        
      
    
  




In order to reconcile these conflicting requirements, we propose to use an adaptive approximation, which reduces the resolution only when necessary. This can be achieved, for example, by using equation (D-2) and rewriting the threshold derivative of hτ(t)*{tilde over ()}ΔD [Dq−χ(t)] as




  
    
      
        
          
            
              
                h
                τ
              
              ⁡
              
                (
                t
                )
              
            
            *
            
              
                f
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  D
                
              
              ⁡
              
                [
                
                  
                    D
                    q
                  
                  -
                  
                    x
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
                ]
              
            
          
          ≈
          
            
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    
                      
                        F
                        ~
                      
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        
                          D
                          
                            q
                            +
                          
                        
                        -
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                  -
                  
                    
                      
                        F
                        ~
                      
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        
                          D
                          
                            q
                            -
                          
                        
                        -
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
            
              4
              ⁢
              
                A
                ⁡
                
                  (
                  
                    
                      D
                      
                        q
                        +
                      
                    
                    -
                    
                      D
                      
                        q
                        -
                      
                    
                  
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        23
        )
      
    
  




where Dq± is the output of a rank filter of the quantile order q±δq, δq<<q. In essence, the approximation of equation (23) amounts to decreasing the resolution of the acquisition system only when the amplitude distribution of the signal broadens, while otherwise retaining high resolution.

Combining equations (21-23), we arrive at the following representation of an adaptive approximation to a feedback rank filter in a boxcar time window of width T:




  
    
      
        
          
            
              
                
                  
                    D
                    .
                  
                  q
                
                ⁡
                
                  (
                  t
                  )
                
              
              =
              
                
                  1
                  2
                
                ⁡
                
                  [
                  
                    
                      
                        D
                        
                          q
                          +
                        
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    +
                    
                      
                        D
                        
                          q
                          -
                        
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
          
        
        
          
            
              
                
                  
                    D
                    .
                  
                  
                    q
                    +
                  
                
                ⁡
                
                  (
                  t
                  )
                
              
              =
              
                
                  
                    
                      AN
                      ⁡
                      
                        (
                        
                          
                            2
                            ⁢
                            q
                          
                          -
                          1
                          +
                          
                            2
                            ⁢
                            δ
                            ⁢
                            
                              
                            
                            ⁢
                            q
                          
                        
                        )
                      
                    
                    -
                    
                      
                        ∑
                        
                          k
                          =
                          0
                        
                        
                          N
                          -
                          1
                        
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          
                            F
                            ~
                          
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            D
                          
                        
                        ⁡
                        
                          [
                          
                            
                              
                                D
                                
                                  q
                                  +
                                
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                            -
                            
                              x
                              ⁡
                              
                                (
                                
                                  t
                                  -
                                  
                                    2
                                    ⁢
                                    k
                                    ⁢
                                    
                                      
                                    
                                    ⁢
                                    τ
                                  
                                
                                )
                              
                            
                          
                          ]
                        
                      
                    
                  
                  
                    
                      
                        h
                        τ
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    *
                    δ
                    ⁢
                    
                      
                        
                          F
                          ~
                        
                        
                          Δ
                          ⁢
                          
                            
                          
                          ⁢
                          D
                        
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                
                ⁢
                
                  
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        D
                        q
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  τ
                
              
            
          
        
        
          
            
              
                
                  
                    
                      D
                      .
                    
                    
                      q
                      -
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                =
                
                  
                    
                      
                        AN
                        ⁡
                        
                          (
                          
                            
                              2
                              ⁢
                              q
                            
                            -
                            1
                            -
                            
                              2
                              ⁢
                              δ
                              ⁢
                              
                                
                              
                              ⁢
                              q
                            
                          
                          )
                        
                      
                      -
                      
                        
                          ∑
                          
                            k
                            =
                            0
                          
                          
                            N
                            -
                            1
                          
                        
                        ⁢
                        
                          
                        
                        ⁢
                        
                          
                            
                              F
                              ~
                            
                            
                              Δ
                              ⁢
                              
                                
                              
                              ⁢
                              D
                            
                          
                          ⁡
                          
                            [
                            
                              
                                
                                  D
                                  
                                    q
                                    -
                                  
                                
                                ⁡
                                
                                  (
                                  t
                                  )
                                
                              
                              -
                              
                                x
                                ⁡
                                
                                  (
                                  
                                    t
                                    -
                                    
                                      2
                                      ⁢
                                      k
                                      ⁢
                                      
                                        
                                      
                                      ⁢
                                      τ
                                    
                                  
                                  )
                                
                              
                            
                            ]
                          
                        
                      
                    
                    
                      
                        
                          h
                          τ
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      *
                      δ
                      ⁢
                      
                        
                          
                            F
                            ~
                          
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            D
                          
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                  
                  ⁢
                  
                    
                      δ
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          D
                          q
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    τ
                  
                
              
              ,
            
          
        
      
    
    
      
        (
        24
        )
      
    
  




where δDq(t)=Dq+(t)−Dq−(t) and





  
    
      
        
          δ
          ⁢
          
            
          
          ⁢
          
            
              
                F
                ~
              
              
                Δ
                ⁢
                
                  
                
                ⁢
                D
              
            
            ⁡
            
              (
              t
              )
            
          
        
        =
        
          
            ∑
            
              k
              =
              0
            
            
              N
              -
              1
            
          
          ⁢
          
            
          
          ⁢
          
            
              {
              
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          D
                          
                            q
                            +
                          
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          
                            t
                            -
                            
                              2
                              ⁢
                              k
                              ⁢
                              
                                
                              
                              ⁢
                              τ
                            
                          
                          )
                        
                      
                    
                    ]
                  
                
                -
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          D
                          
                            q
                            -
                          
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          
                            t
                            -
                            
                              2
                              ⁢
                              k
                              ⁢
                              
                                
                              
                              ⁢
                              τ
                            
                          
                          )
                        
                      
                    
                    ]
                  
                
              
              }
            
            .
          
        
      
    
    
      
        (
        25
        )
      
    
  




This approximation preserves its validity for high resolution comparators (small AD), and its output converges, as N increases, to the output of the ‘exact’ rank filter in the boxcar time window BT(t). Unlike the currently known approaches (see, for example, Urahama and Nagao 1995; Opris 1996), the analog rank filters enabled through equation (24) are not constrained by linear convergence and allow real time implementation on an arbitrary timescale, thus enabling high speed real time rank filtering by analog means. The accuracy of this approximation is best described in terms of the error in the quantile q. That is, the output Dq(t) can be viewed as bounded by the outputs of the ‘exact’ rank filter for different quantiles q±Δq. When ΔD and δq in equation (24) are small, the error range Δq is of order 1/N.

Note that, even though equation (24) represents a feedback implementation of a rank filter, it is stable with respect to the quantile values q. In other words, the solution of this equation will rapidly converge to the ‘true’ value of Dq(t) regardless of the initial condition, and the time of convergence within the resolution of the filter ΔD for any initial condition will be just a small fraction of τ. This convergence property is what makes the implementation represented by equation (24) suitable for a real time operation on an arbitrary timescale.
Implementation of AARFs in analog feedback circuits FIG. 11 illustrates implementation of an adaptive real time rank filter given by equation (24) in an analog feedback circuit. One skilled in the art will recognize that this circuit is a simplified embodiment of a more general AARF depicted in FIG. 12.

Generalized description of AARFs As shown in FIG. 12, an input variable χ(t) and a plurality of feedbacks of Offset Rank Filtered Variables {Dqi(t)} are passed through a plurality of (delayed) comparators forming a plurality of outputs of the comparators {{tilde over ()}idel(t)}={{tilde over ()}ΔDdel [Dqi (t), χ(t)]}. (Please note that in this and further figures a double line in a diagram indicates a plurality of signals.) Said plurality of the outputs of the comparators {{tilde over ()}idel} is used to form (i) a plurality {A(2qi−1)−{tilde over ()}idel} of differences between said outputs of the comparators and the respective Offset Quantile Parameters of said Offset Rank Filtered Variables, and (ii) a weighted difference δ{tilde over ()}ΔD(t)=Σiαi{tilde over ()}idel, where τiαi=0, of said outputs of the comparators. Said weighted difference δ{tilde over ()}ΔD(t) of the outputs of the comparators is passed through a time averaging amplifier, forming a Density Function hτ(t)*δ{tilde over ()}ΔD(t). The plurality of the feedbacks of the Offset Rank Filtered Variables {Dqi(t)} is used to form a weighted difference δDq(t)=ΣiβiDqi(t), where Σiβi=0, of said feedbacks. Each difference A(2qi−1)−{tilde over ()}idel between the outputs of the comparators and the respective Offset Quantile Parameters of the Offset Rank Filtered Variables is multiplied by a ratio of the weighted difference δDq(t) of the feedbacks of the Offset Rank Filtered Variables and the Density Function hτ(t)*δ{tilde over ()}ΔD(t), forming a plurality of time derivatives of Offset Rank Filtered Variables {{dot over (D)}qi(t)}. Said plurality of the time derivatives {{dot over (D)}qi(t)} is integrated to produce the plurality of the Offset Rank Filtered Variables {Dqi(t)}. The plurality of the Offset Rank Filtered Variables {Dqi(t)} is then used to form an output Rank Filtered Variable Dq(t) as a weighted average ΣiwiDqi(t), Σiwi=1, of said Offset Rank Filtered Variables.

As an example, FIG. 13 provides a simplified diagram of a 3-comparator implementation of AARF. In this example, the offset quantile orders are q2=q, q1=q−dq, and q3=q+dq, and the weights for weighted average and differences are: w2=1, w1=w3=0, α2=β2=0, and α1=β1=−α3=−β3=−1.
Note that both the input and output of an AARF are continuous signals. The width of the moving window and the quantile order are continuous parameters as well, and such continuity can be utilized in various analog control systems. The adaptivity of the approximation allows us to maintain a high resolution of the comparators regardless of the properties of the input signal, which enables the usage of this filter for nonstationary signals.
Also, let us point out that the equations describing this filter are also suitable for numerical computations, especially when the number of data points within the moving window is large. A simple forward Euler method is fully adequate for integrating these equations, and the numerical convolution with an RC impulse response function requires remembering only one previous value. Thus numerical algorithms based on these equations have the advantages of both high speed and low memory requirements.
Delayed comparators In our description of AARFs we have assumed that the comparators are the delayed comparators with the outputs represented by the moving averages




  
    
      
        
          
            
              
                F
                ~
              
              
                Δ
                ⁢
                
                  
                
                ⁢
                D
              
              del
            
            ⁡
            
              [
              
                
                  
                    D
                    q
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                ,
                
                  x
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              ]
            
          
          =
          
            
              ∑
              
                k
                =
                0
              
              
                N
                -
                1
              
            
            ⁢
            
              
            
            ⁢
            
              
                w
                k
              
              ⁢
              
                
                  
                    F
                    ~
                  
                  
                    Δ
                    ⁢
                    
                      
                    
                    ⁢
                    D
                  
                
                ⁡
                
                  [
                  
                    
                      
                        D
                        q
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    -
                    
                      x
                      ⁡
                      
                        (
                        
                          t
                          -
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            
                              t
                              k
                            
                          
                        
                        )
                      
                    
                  
                  ]
                
              
            
          
        
        ,
      
    
    
      
        (
        26
        )
      
    
  




where wk are positive weights such that Σkwk=1, and it can be assumed, without loss of generality, that Δt0=0. Obviously, when N=1, a delayed comparator is just a simple two-level comparator. FIG. 14 illustrates a principle schematic of a delayed comparator.

Averaging comparators In the description of Adaptive Analog Rank Selectors further in this disclosure we will use another type of a comparator, which we refer to as an averaging comparator. Unlike a delayed comparator which takes a threshold level and a scalar signal as inputs, the inputs of an averaging comparator are a threshold level D and a plurality of input signals {χi(t)}, i=1, . . . , N. The output of an averaging comparator is then given by the expression





  
    
      
        
          
            
              
                F
                ~
              
              
                Δ
                ⁢
                
                  
                
                ⁢
                D
              
              ave
            
            ⁡
            
              [
              
                
                  
                    D
                    q
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                ,
                
                  {
                  
                    
                      x
                      i
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  }
                
              
              ]
            
          
          =
          
            
              ∑
              
                i
                =
                1
              
              N
            
            ⁢
            
              
            
            ⁢
            
              
                w
                i
              
              ⁢
              
                
                  
                    F
                    ~
                  
                  
                    Δ
                    ⁢
                    
                      
                    
                    ⁢
                    D
                  
                
                ⁡
                
                  [
                  
                    
                      
                        D
                        q
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    -
                    
                      
                        x
                        i
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
          
        
        ,
      
    
    
      
        (
        27
        )
      
    
  




where wi are positive weights such that Σiwi=1. FIG. 15 illustrates a principle schematic of an averaging comparator.

FIG. 16 compares the performance of the analog rank filter given by equation (24) to that of the ‘exact’ quantile filter in a boxcar moving window of width T. In this example, the quantile interval δq is chosen as δq=10−2 (1%). The continuous input signal x(t) (shown by the solid dark gray line) is emulated as a high resolution time series (2×103 points per interval T). The ‘exact’ outputs of a boxcar window rank filter are shown by the dashed lines, and their deviations within the ±Δq intervals are shown by the gray bands. The respective outputs of the approximation given by equation (24) are shown by the solid black lines. The width parameter ΔD of the comparators, the width T of the boxcar time window, the quantile order q, and the number N of exponential kernels in the approximation are indicated in the figure.
The (instantaneous) accuracy of the approximation given by equation (24) decreases when the input signal χ(t) undergoes a large (in terms of the resolution parameter ΔD) monotonic change over a time interval of order τ. The main effect of such a ‘sudden jump’ in the input signal is to delay the output Dq(t) relative to the output of the respective ‘exact’ filter. This delay is shown as Δt in the lower left portion of the upper panel, where the input signal is a square pulse. This timing error Δt is inversely proportional to the number N of the kernels in the approximation. The accuracy of the approximation can also be described in terms of the amplitude error. As can be seen in FIG. 16, the residual oscillations of the outputs of the analog filter occur within the q±1 (2N) interval around the respective outputs of the ‘exact’ filter (that is, within the width of the gray bands in the figure).
Establishing internal reference signal (baseline and analog control levels) As stated earlier, a primary use of Analog Rank Filtering in ARTEMIS is establishing and maintaining the analog control levels of the Threshold Domain Filtering, which ensures the adaptivity of the Threshold Domain Filtering to changes in the measurement conditions, and thus the optimal separation of the features of interest from the rest of the signal. Such robust control levels can be established, for example, by filtering the components of the signal with a Linear Combination of Analog Order Statistics Filters operable on a given timescale.

Example: ‘Trimean’ reference. FIG. 17 provides an example of using an internal reference (baseline) for separating signal from noise, and illustrates a technique for establishing a reference baseline as a linear combination of quartile outputs (i.e., q=1⁄4, q=1⁄2, and q=3⁄4) of AARFs. In this example, the features of interest are tall pulses protruding from a noisy background. For example, one would want to count the number of such pulses, while ignoring the smaller pulses due to noise. This can be accomplished by choosing a reference baseline such that most of the pulses of interest peak above this baseline, while the accidental crossings of the baseline by noise are rare. A good choice for a baseline thus would be a moving average of the noise plus several standard deviations of the noise in the same moving window of time (a ‘variance’ baseline, gray lines in the figure). However, the presence of the high-amplitude pulses of the ‘useful’ signal will significantly disturb such a baseline. Instead, one can create a baseline by using a linear combination of the outputs of AARFs for different quantile orders (e.g., for the quartiles q=1⁄4, q=1⁄2, and q=3⁄4-‘quartile’ baseline, dashed lines in the figure). As shown in the upper panel of the figure, in the absence of the signal of interest the baselines created by both techniques are essentially equivalent. However, as shown in the lower panel of the figure, in the presence of tall pulses the ‘variance’ baseline is significantly disturbed and fails to separate the noise from the signal, while the ‘quartile’ baseline remains virtually unaffected by the addition of these pulses. In both panels, the distance between the time ticks is equal to the width of the moving time window.

FIG. 18 illustrates a principle diagram of a circuit for establishing a baseline as a linear combination of the quartile outputs (q=1⁄4, q=1⁄2, and q=3⁄4) of AARFs. One skilled in the art will recognize that a variety of other linear combinations of outputs of AARFs of different quantile orders can be used for establishing and maintaining the analog control levels of the Threshold Domain Filtering.
Single Point Analog Rank Tracker (SPART) The approximation of equation (24) preserves its validity for high resolution comparators (small ΔD), and its output converges, as N increases, to the output of the ‘exact’ rank filter in the boxcar time window BT(t). However, even a single-point approximation (N=1 in equation (24), i.e., simple rather than delayed comparators in AARF) can be fully adequate for creating and maintaining the baseline and analog control levels in analog counting systems, since such a simplified implementation preserves the essential properties of the ‘exact’ rank filter needed for this purpose. We shall call this version of an AARF the ‘Single Point Analog Rank Tracker’, or SPART.

Adaptive Analog Rank Selectors (AARSs) While an AARF operates on a single scalar input signal χ(t) and outputs a qth quantile Dq(t) of the input signal in a moving window of time, an AARS operates on a plurality of input signals {χi(t)}, i=1, . . . , N, and outputs (‘selects’) an instantaneous qth quantile Dq(t) (in general, a weighted quantile) of the plurality of the input signals. Such transition from an AARF to an AARS can be achieved by replacing the delayed comparators in an AARF by averaging comparators. For example, a 2-comparator AARS can be represented by the following equation:





  
    
      
        
          
            
              
                
                  
                    D
                    .
                  
                  q
                
                ⁡
                
                  (
                  t
                  )
                
              
              =
              
                
                  1
                  2
                
                ⁡
                
                  [
                  
                    
                      
                        D
                        
                          q
                          +
                        
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    +
                    
                      
                        D
                        
                          q
                          -
                        
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
          
        
        
          
            
              
                
                  
                    D
                    .
                  
                  
                    q
                    +
                  
                
                ⁡
                
                  (
                  t
                  )
                
              
              =
              
                
                  
                    
                      AN
                      ⁡
                      
                        (
                        
                          
                            2
                            ⁢
                            q
                          
                          -
                          1
                          +
                          
                            2
                            ⁢
                            δ
                            ⁢
                            
                              
                            
                            ⁢
                            q
                          
                        
                        )
                      
                    
                    -
                    
                      
                        ∑
                        
                          i
                          =
                          1
                        
                        N
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          
                            F
                            ~
                          
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            D
                          
                        
                        ⁡
                        
                          [
                          
                            
                              
                                D
                                
                                  q
                                  +
                                
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                            -
                            
                              
                                x
                                i
                              
                              (
                              )
                            
                          
                          ]
                        
                      
                    
                  
                  
                    
                      
                        h
                        τ
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    *
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        
                          F
                          ~
                        
                        
                          Δ
                          ⁢
                          
                            
                          
                          ⁢
                          D
                        
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                
                ⁢
                
                  
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        D
                        q
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  τ
                
              
            
          
        
        
          
            
              
                
                  
                    
                      D
                      .
                    
                    
                      q
                      -
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                =
                
                  
                    
                      
                        AN
                        ⁡
                        
                          (
                          
                            
                              2
                              ⁢
                              q
                            
                            -
                            1
                            -
                            
                              2
                              ⁢
                              δ
                              ⁢
                              
                                
                              
                              ⁢
                              q
                            
                          
                          )
                        
                      
                      -
                      
                        
                          ∑
                          
                            i
                            =
                            1
                          
                          N
                        
                        ⁢
                        
                          
                        
                        ⁢
                        
                          
                            
                              F
                              ~
                            
                            
                              Δ
                              ⁢
                              
                                
                              
                              ⁢
                              D
                            
                          
                          ⁡
                          
                            [
                            
                              
                                D
                                q
                              
                              -
                              
                                (
                                t
                                )
                              
                              -
                              
                                
                                  x
                                  i
                                
                                ⁡
                                
                                  (
                                  t
                                  )
                                
                              
                            
                            ]
                          
                        
                      
                    
                    
                      
                        
                          h
                          τ
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      *
                      δ
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          
                            F
                            ~
                          
                          
                            Δ
                            ⁢
                            
                              
                            
                            ⁢
                            D
                          
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                  
                  ⁢
                  
                    
                      δ
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          D
                          q
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    τ
                  
                
              
              ,
            
          
        
      
    
    
      
        (
        28
        )
      
    
  




where δDq(t)=Dq+(t)−Dq−(t) and





  
    
      
        
          δ
          ⁢
          
            
          
          ⁢
          
            
              
                F
                ~
              
              
                Δ
                ⁢
                
                  
                
                ⁢
                D
              
            
            ⁡
            
              (
              t
              )
            
          
        
        =
        
          
            ∑
            
              i
              =
              1
            
            N
          
          ⁢
          
            
          
          ⁢
          
            
              {
              
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          D
                          
                            q
                            +
                          
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      -
                      
                        
                          x
                          i
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    ]
                  
                
                -
                
                  
                    
                      F
                      ~
                    
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      D
                    
                  
                  ⁡
                  
                    [
                    
                      
                        
                          D
                          
                            q
                            -
                          
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      -
                      
                        
                          x
                          i
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    ]
                  
                
              
              }
            
            .
          
        
      
    
    
      
        (
        29
        )
      
    
  




Note that the time of convergence (or time of rank selection) is proportional to the time constant τ=RC of the RC integrator, and thus can be made sufficiently small for a true real time operation of an AARS. FIG. 19 illustrates a principle schematic of an Adaptive Analog Rank Selector given by equation (28) in an analog feedback circuit. One skilled in the art will recognize that this circuit is a simplified embodiment of a more general AARS depicted in FIG. 20.

Generalized description of AARSs As shown in FIG. 20, a plurality of input variables {χj(t)}, j=1, . . . , N, and a plurality of feedbacks of Offset Rank Selected Variables {Dqi(t)} are passed through a plurality of averaging comparators forming a plurality of outputs of the comparators {{tilde over ()}iave(t)}={{tilde over ()}ΔDave[Dqi(t), χj(t)]}={Σj=1Nνj{tilde over ()}ΔD[Dqi(t)−χj(t)]}. Said plurality of the outputs of the comparators {{tilde over ()}iave} is used to form (i) a plurality {A(2qi−1)−{tilde over ()}iave} of differences between said outputs of the comparators and the respective Offset Quantile Parameters of said Offset Rank Selected Variables, and (ii) a weighted difference δ{tilde over ()}ΔD(t)=Σiαi{tilde over ()}iave, where Σiαi=0, of said outputs of the comparators. Said weighted difference δ{tilde over ()}ΔDq(i) of the outputs of the comparators is passed through a time averaging amplifier, forming a Density Function hτ(t)*δ{tilde over ()}iave. The plurality of the feedbacks of the Offset Rank Selected Variables {Dqi(t)} is used to form a weighted difference δDq(t)=ΣiβiDqi(t), where Σiβi=0, of said feedbacks. Each difference A(2qi−1)−{tilde over ()}iave between the outputs of the comparators and the respective Offset Quantile Parameters of the Offset Rank Selected Variables is multiplied by a ratio of the weighted difference δDq(t) of the feedbacks of the Offset Rank Selected Variables and the Density Function hτ(t)*δ{tilde over ()}ΔD(t), forming a plurality of time derivatives of Offset Rank Selected Variables {{dot over (D)}qi(t)}. Said plurality of the time derivatives {{dot over (D)}qi(t)} is integrated to produce the plurality of the Offset Rank Selected Variables {Dqi(t)}. The plurality of the Offset Rank Selected Variables {Dqi(t)} is then used to form an output Rank Selected Variable Dq(t) as a weighted average ΣiwiDqi(t), Σiwi=1, of said Offset Rank Selected Variables.

Adaptive Analog Rank Selectors are well suited for analysis and conditioning of spatially-extended objects such as multidimensional images. For example, a plurality of input signals can be the plurality of the signals from a vicinity around the spatial point of interest, and the weights {νj} can correspond to the weights of a spatial averaging kernel. This enables us to design highly efficient real-time analog rank filters for removing dynamic as well as static impulse noise from an image, as illustrated in FIG. 21 for a two-dimensional monochrome image. In this example, a median filter (q=1⁄2) according to equation (28) is used.7 Panel (a) shows the original (uncorrupted) image. Panel (b) shows the snapshots, at different times, of the noisy image and the respective outputs of the filter. In this example, approximately 4⁄5 of the pixels of the original image are affected by a bipolar non-Gaussian random noise at any given time. Panel (c) provides an example of removing the static noise (1⁄3 of the pixels of the original image are affected). This example also illustrates the fact that the characteristic time of convergence of the filter based on equation (28) is only a small fraction of the time constant τ=RC of the RC integrator, which makes this circuit suitable for a truly real-time operation. This fast convergence is a consequence of the fact that the speed of convergence is inversely proportional to the density function hτ(t)*δ{tilde over ()}ΔD(t). 7In general, the quantile order of the filter should be chosen as q=Φn(0), where Φn is the amplitude distribution of the noise (either measured or known a priori). In the example of this section, Φn(0)=1⁄2.
4.2 Explicit Analog Rank Locators (EARLs)
Explicit expression for an analog quantile filter Note that a differential equation is not the only possible embodiment of an analog quantile filter. Other means of locating the level lines of the threshold distribution function can be developed based on the geometric interpretation discussed in §D-2. For example, one can start by using the sifting property of the Dirac δ-function to write Dq(t) as




  
    
      
        
          
            D
            q
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            ∫
            
              -
              ∞
            
            ∞
          
          ⁢
          
            
          
          ⁢
          
            
              d
              D
            
            ⁢
            
              
            
            ⁢
            D
            ⁢
            
              
            
            ⁢
            
              δ
              ⁡
              
                [
                
                  D
                  -
                  
                    
                      D
                      q
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
                ]
              
            
          
        
      
    
    
      
        (
        30
        )
      
    
  




for all t. Then, recalling that Dq(t) is a root of the function Φ(D, t)−q and that, by construction, there is only one such root for any given time t, we can replace the δ-function of thresholds with that of the distribution function values as follows:





  
    
      
        
          
            D
            q
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            ∫
            
              -
              ∞
            
            ∞
          
          ⁢
          
            
          
          ⁢
          
            
              d
              D
            
            ⁢
            
              
            
            ⁢
            D
            ⁢
            
              
            
            ⁢
            
              φ
              ⁡
              
                (
                
                  D
                  ,
                  t
                
                )
              
            
            ⁢
            
              
                δ
                ⁡
                
                  [
                  
                    
                      Φ
                      ⁡
                      
                        (
                        
                          D
                          ,
                          t
                        
                        )
                      
                    
                    -
                    q
                  
                  ]
                
              
              .
            
          
        
      
    
    
      
        (
        31
        )
      
    
  




Here we have used the following property of the Dirac δ-function (see Davydov, 1988, p. 610, eq. (A 15), for example):





  
    
      
        
          
            δ
            ⁡
            
              [
              
                a
                -
                
                  f
                  ⁡
                  
                    (
                    x
                    )
                  
                
              
              ]
            
          
          =
          
            
              ∑
              i
            
            ⁢
            
              
            
            ⁢
            
              
                δ
                ⁡
                
                  (
                  
                    x
                    -
                    
                      x
                      i
                    
                  
                  )
                
              
              
                
                
                  
                    f
                    ′
                  
                  ⁡
                  
                    (
                    
                      x
                      i
                    
                    )
                  
                
                
              
            
          
        
        ,
      
    
    
      
        (
        32
        )
      
    
  




where |ƒ′(χi)| is the absolute value of the derivative of ƒ(χ) at χi, and the sum goes over all χi such that ƒ(χi)=a. We have also used the fact that φ(D, t)≧0.

The final step in deriving a practically useful realization of the quantile filter is to replace the δ-function of the ideal measurement process with a finite-width pulse function gΔq of the real measurement process, namely




  
    
      
        
          
            
              D
              q
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              ∫
              
                -
                ∞
              
              ∞
            
            ⁢
            
              
            
            ⁢
            
              
                d
                D
              
              ⁢
              
                
              
              ⁢
              D
              ⁢
              
                
              
              ⁢
              
                
                  
                    φ
                    ⁡
                    
                      (
                      
                        D
                        ,
                        t
                      
                      )
                    
                  
                  
                    g
                    
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      q
                    
                  
                
                ⁡
                
                  [
                  
                    
                      Φ
                      ⁡
                      
                        (
                        
                          D
                          ,
                          t
                        
                        )
                      
                    
                    -
                    q
                  
                  ]
                
              
            
          
        
        ,
      
    
    
      
        (
        33
        )
      
    
  




where Δq is the characteristic width of the pulse. That is, we replace the δ-function with a continuous function of finite width and height. This replacement is justified by the observation made earlier: it is impossible to construct a physical device with an impulse response expressed by the δ-function, and thus an adequate description of any real measurement must use the actual response function of the acquisition system instead of the δ-function approximation. We shall call an analog rank filter given by equation (33) the Explicit Analog Rank Locator (EARL).

Analog L filters and α-trimmed mean filters It is worth pointing out the generalization of analog quantile filters which follows from equation (31). In the context of digital filters, this generalization corresponds to the L filters described by Bovik et al. (1983).

Indeed, we can write a linear combination of the outputs of various quantile filters as




  
    
      
        
          
            D
            L
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            ∫
            0
            1
          
          ⁢
          
            
              d
              
                
              
              ⁢
              
                
                  qW
                  L
                
                ⁡
                
                  (
                  q
                  )
                
              
            
            ⁢
            
              
                D
                q
              
              ⁡
              
                (
                t
                )
              
            
            ⁢
            
              
                
                  
                    =
                    
                      
                        ∫
                        0
                        1
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          d
                          
                            
                              qW
                              L
                            
                            ⁡
                            
                              (
                              q
                              )
                            
                          
                        
                        ⁢
                        
                          
                            ∫
                            
                              -
                              ∞
                            
                            ∞
                          
                          ⁢
                          
                            
                          
                          ⁢
                          
                            
                              d
                              D
                            
                            ⁢
                            
                              
                            
                            ⁢
                            D
                            ⁢
                            
                              
                            
                            ⁢
                            
                              φ
                              ⁡
                              
                                (
                                
                                  D
                                  ,
                                  t
                                
                                )
                              
                            
                            ⁢
                            
                              δ
                              ⁡
                              
                                [
                                
                                  
                                    Φ
                                    ⁡
                                    
                                      (
                                      
                                        D
                                        ,
                                        t
                                      
                                      )
                                    
                                  
                                  -
                                  q
                                
                                ]
                              
                            
                          
                        
                      
                    
                  
                
              
              
                
                  
                    
                      =
                      
                        
                          ∫
                          
                            -
                            ∞
                          
                          ∞
                        
                        ⁢
                        
                          
                        
                        ⁢
                        
                          
                            d
                            D
                          
                          ⁢
                          
                            
                          
                          ⁢
                          D
                          ⁢
                          
                            
                          
                          ⁢
                          
                            φ
                            ⁡
                            
                              (
                              
                                D
                                ,
                                t
                              
                              )
                            
                          
                          ⁢
                          
                            
                              W
                              L
                            
                            ⁡
                            
                              [
                              
                                Φ
                                ⁡
                                
                                  (
                                  
                                    D
                                    ,
                                    t
                                  
                                  )
                                
                              
                              ]
                            
                          
                        
                      
                    
                    ,
                  
                
              
            
          
        
      
    
    
      
        (
        34
        )
      
    
  




where WL is some (normalized) weighting function. Note that the difference between equations (34) and (33) is in replacing the narrow pulse function gΔq in (33) by an arbitrary weighting function WL.

A particular choice of WL in (34) as the rectangular (boxcar) probe of width 1-2α, centered at 1⁄2, will correspond to the digital α-trimmed mean filters described by Bendat (1998):




  
    
      
        
          
            
              
                D
                _
              
              α
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              ∫
              
                -
                ∞
              
              ∞
            
            ⁢
            
              
            
            ⁢
            
              
                d
                D
              
              ⁢
              
                
              
              ⁢
              D
              ⁢
              
                
              
              ⁢
              
                φ
                ⁡
                
                  (
                  
                    D
                    ,
                    t
                  
                  )
                
              
              ⁢
              
                
                  b
                  α
                
                ⁡
                
                  [
                  
                    Φ
                    ⁡
                    
                      (
                      
                        D
                        ,
                        t
                      
                      )
                    
                  
                  ]
                
              
            
          
        
        ,
        
          
        
        ⁢
        
          0
          ⁢
          
            <
            _
          
          ⁢
          α
          <
          
            1
            /
            2
          
        
        ,
      
    
    
      
        (
        35
        )
      
    
  




where





  
    
      b
      α
    
    ⁡
    
      (
      x
      )
    
  
  =
  
    
      
        1
        
          1
          -
          
            2
            ⁢
            
              
            
            ⁢
            α
          
        
      
      ⁡
      
        [
        
          
            θ
            ⁡
            
              (
              
                x
                -
                α
              
              )
            
          
          -
          
            θ
            ⁡
            
              (
              
                x
                -
                1
                +
                α
              
              )
            
          
        
        ]
      
    
    .
  




When α=0, equation (35) describes the running mean filter, Dα=0(t)= χ(t), and in the limit α→1⁄2 it describes the median filter, limα→1⁄2 Dα(t)=Dm(t).

Dealing with improper integration: Adaptive EARL The main practical shortcoming of the filter given by equation (33) is the improper integral with respect to threshold. This difficulty, however, can be overcome by a variety of ways.

For example, we can use the fact that rank is not affected by a monotonic transformation. That is, if Dq is the qth quantile of the distribution wτ(t)*θ[D−χ(t)] (that is, wτ(t)*θ[Dq−χ(t)]=q), then (Dq) is the qth quantile of the distribution wτ(t)*θ{(D)−[χ(t)]}: 

wτ(t)*θ{(Dq)−[χ(t)]}=q,  (36)

where (ξ) is a monotonically increasing function of ξ.

Now let us choose ξ=(ξ) as the response of a real comparator, (ξ)=μ2(ξ−μ1), where μ1 is indicative of the mean value of χ(t) in a moving window wT of the width T much greater than τ, and the width parameter μ2 is indicative of the signal's deviation around μ1 (on a similar time interval). For example,




  
    
      
        {
        
          
            
              
                
                  
                    ξ
                    _
                  
                  =
                  
                    
                      F
                      
                        μ
                        ⁢
                        
                          
                        
                        ⁢
                        2
                      
                    
                    ⁡
                    
                      (
                      
                        ξ
                        -
                        
                          μ
                          1
                        
                      
                      )
                    
                  
                
              
            
            
              
                
                  
                    
                      μ
                      1
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  =
                  
                    
                      
                        w
                        T
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    *
                    
                      x
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                
              
            
            
              
                
                  
                    
                      μ
                      2
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  =
                  
                    
                      2
                      ⁡
                      
                        [
                        
                          
                            
                              
                                w
                                T
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                            *
                            
                              
                                x
                                2
                              
                              ⁡
                              
                                (
                                t
                                )
                              
                            
                          
                          -
                          
                            
                              μ
                              1
                              2
                            
                            ⁡
                            
                              (
                              t
                              )
                            
                          
                        
                        ]
                      
                    
                  
                
              
            
          
          .
        
      
    
    
      
        (
        37
        )
      
    
  




Then an equation for the adaptive explicit analog rank locator can be rewritten as





  
    
      
        
          
            
              D
              q
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                μ
                1
              
              ⁡
              
                (
                t
                )
              
            
            +
            
              
                F
                
                  μ
                  ⁢
                  
                    
                  
                  ⁢
                  2
                
                
                  -
                  1
                
              
              ⁢
              
                {
                
                  
                    ∫
                    0
                    1
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      d
                      χχ
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        φ
                        ~
                      
                      ⁡
                      
                        (
                        
                          χ
                          ,
                          t
                        
                        )
                      
                    
                    ⁢
                    
                      
                        g
                        
                          Δ
                          ⁢
                          
                            
                          
                          ⁢
                          q
                        
                      
                      ⁡
                      
                        [
                        
                          
                            
                              Φ
                              ~
                            
                            ⁡
                            
                              (
                              
                                χ
                                ,
                                t
                              
                              )
                            
                          
                          -
                          q
                        
                        ]
                      
                    
                  
                
                }
              
            
          
        
        ,
      
    
    
      
        (
        38
        )
      
    
  




where





  
    
      
        
          
            
              φ
              ~
            
            ⁡
            
              (
              
                χ
                ,
                t
              
              )
            
          
          =
          
            
              
                
                  w
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    K
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  ⁢
                  
                    
                      f
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        χ
                        -
                        
                          
                            x
                            _
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
            
              
                
                  w
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                K
                ⁡
                
                  (
                  t
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        39
        )
      
    
  




and





  
    
      
        
          
            Φ
            ~
          
          ⁡
          
            (
            
              χ
              ,
              t
            
            )
          
        
        =
        
          
            
              
                
                  w
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    K
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  ⁢
                  
                    
                      F
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        D
                      
                    
                    ⁡
                    
                      [
                      
                        χ
                        -
                        
                          
                            x
                            _
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
            
              
                
                  
                    w
                    τ
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                *
                
                  K
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              ⁢
              
                
              
            
          
          .
        
      
    
    
      
        (
        40
        )
      
    
  




Note that the improper integral of equation (33) has become an integral over the finite interval [0, 1], where the variable of integration is a dimensionless variable χ.

FIG. 22 illustrates the performance of adaptive EARLs operating as amplitude (panel b)) and counting (panel (c)) rank filters in comparison with the ‘exact’ outputs of the respective analog rank filters given by equation (D-6).
Discrete-Threshold Approximation to Adaptive EARL Given a monotonic array of threshold values between zero and unity, the integral in equation (38) can be evaluated in finite differences leading to a discrete-threshold approximation to adaptive EARL as follows:

Dq(t)=μ1(t)+μ2−1( Dq),  (41)

where Dq is the root of {tilde over (Φ)}(D, t)=q. For example,





  
    
      
        D
        _
      
      q
    
    =
    
      
        1
        2
      
      ⁢
      
        (
        
          
            D
            
              j
              ⁢
              
                
              
              ⁢
              1
            
          
          +
          
            D
            
              j
              ⁢
              
                
              
              ⁢
              2
            
          
        
        )
      
    
  
  ,




where 0≦Di≦1 is a monotonic array of threshold values, Di<Di+1, and j1 and j2 are such that {tilde over (Φ)}(Dj1,t)≦q≦{tilde over (Φ)}(Dj1+1,t) and {tilde over (Φ)}(Dj2,t)<q≦{tilde over (Φ)}(Dj2+1,t). Note that a binary search, as well as more effective methods, can be used for the root finding, and thus the discrete-threshold approximation to adaptive EARL can have significant advantages over the state-of-art numerical algorithms for rank filtering, especially when operating on large time scales.

Discrete-Threshold Approximation to AARF It is worth pointing out that the invariance of rank to a monotonic transformation allows us to define the following discrete-threshold approximation to an adaptive analog rank filter:





  
    
      
        
          
            
              
                
                  D
                  _
                
                .
              
              q
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                K
                ⁡
                
                  (
                  t
                  )
                
              
              ⁢
              
                {
                
                  q
                  -
                  
                    
                      F
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        
                          D
                          _
                        
                      
                    
                    ⁡
                    
                      [
                      
                        
                          
                            
                              D
                              _
                            
                            q
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                        -
                        
                          
                            x
                            _
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
            
              τ
              ⁢
              
                
              
              ⁢
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                {
                
                  
                    K
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  ⁢
                  
                    
                      f
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        
                          D
                          _
                        
                      
                    
                    ⁡
                    
                      [
                      
                        
                          
                            D
                            k
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                        -
                        
                          
                            x
                            _
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
          
        
        ,
      
    
    
      
        (
        42
        )
      
    
  




where Dk(t)=δD k(t)=δD nint( Dq(t)/δD),8 and δD<<Δ D. 8The nearest integer function nint(χ) is defined as the integer part of





  
    x
    +
    
      1
      2
    
  
  ,
  
    
      nint
      ⁡
      
        (
        x
        )
      
    
    =
    
      
        ⌊
        
          x
          +
          
            1
            2
          
        
        ⌋
      
      .
    
  




4.3 Example
Bimodal Analog Sensor Interface System (BASIS)
BASIS constitutes an analog signal processing module, initially intended to be coupled with a photon counting sensor such as a photomultiplier tube (PMT). The resulting integrated photodetection unit allows fast and sensitive measurements in a wide range of light intensities, with adaptive automatic transition from counting individual photons to the continuous (current) mode of operation. When a BASIS circuit is used as an external signal processing unit of a photosensor, its output Rout(t) is a continuous signal for both photon counting and current modes, with a magnitude proportional to the rate of incident photons. This signal can be, for example, used directly in analog or digital measuring and/or control systems, differentiated (thus producing continuous time derivative of the incident photon rate), or digitally sampled for subsequent transmission and/or storage. Thus, BASIS converts the raw output of a photosensor to a form suitable for use in continuous action light and radiation measurements.
The functionality of the BASIS is enabled through the integration of three main components: (1) Analog Counting Systems (ACS), (2) Adaptive Analog Rank Filters (AARF), and (3) Saturation Rate Monitors (SRM), as described further. The BASIS system provides several significant advantages with respect to the current state-of-art signal processing of photosignals. Probably the most important advantage is that, by seamlessly merging the counting and current mode regimes of a photosensor, the output of the BASIS system has a contiguous dynamic range extended by 20-30 dB. This technical enhancement translates into important commercial advantages. For example, the extension of the maximum rate of the photon counting mode of a PMT by 20 dB can be used for a tenfold increase in sensitivity or speed of detection. Since sensitivity and speed of light detecting units is often the bottle-neck of many instruments, this increase will result in upgrading the class of equipment at a fraction of the normal cost of such an upgrade.
In addition, the analog implementation of the current mode regime reduces the overall power consumption of the detector. These capabilities will benefit applications dealing with light intensities significantly changing in time, and where autonomous low-power operation is a must. One particular example of such an application is a high sensitivity handheld radiation detection system that could be powered with a small battery. Such a compact detector could be used by United States customs agents to search for nuclear materials entering the country.
Principal components (modules) of BASIS As shown in FIG. 23, the principal components (modules) of the BASIS can be identified as (I) Rank Filtering (or Baseline) Module, (II) Analog Counting Module (ACM), (III) the Saturated Rate Monitor (SRM), and (IV) Integrated Output Module. A brief description of these modules is as follows.

Rank Filtering (or Baseline) Module As shown in FIG. 23, the Baseline Module outputs the rank-filtered signal Dq(t;T), which is the qth quantile of the signal χ(t) in a moving time window of characteristic width T. The rank filtering is accomplished by means of an Adaptive Analog Rank filter (AARF) (see §4.1), or its single-point version referred to as a Single Point Analog Rank Tracker (SPART) (ibidem). AARFs, due to their insensitivity to outliers, are essential for stable operation of BASIS, and are used to create, maintain, and modify its analog control levels (the control levels of the comparators in the Threshold Domain Filter). For example, a baseline created by an AARF operating as a median filter (i.e., q=1⁄2) will not significantly change its value unless the photoelectron rate exceeds about half of the saturation rate Rmax. On the other hand, this baseline will track the changes in the noise level, providing an effective separation between noise and the photosignal.

When the photoelectron rate exceeds the saturation rate Rmax, the output of the AARF itself will well represent the central tendency of the photosignal, and thus will be proportional to the incident photon rate. In the ‘transitional’ region (around Rmax), the output of the BASIS can be constructed as a weighted sum of the outputs of AARF and ACM. Thus the total output of BASIS can be constructed as a combination of the outputs of AARF, ACM, and SRM, and calibrated to be proportional to the incident photon rate.
Analog Counting Module (ACM) This module produces a continuous output, R(t), equal to the rate of upward zero crossings of the difference, χ(t)−rDq(t;T), in the time window, w(t), given by




  
    
      
        
          
            R
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                w
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                R
                ⁡
                
                  (
                  t
                  )
                
              
            
            =
            
              w
              *
              
                
                  
                  
                    
                      d
                      
                        d
                        t
                      
                    
                    ⁢
                    
                      θ
                      ⁡
                      
                        (
                        
                          x
                          -
                          
                            rD
                            q
                          
                        
                        )
                      
                    
                  
                  
                
                +
              
            
          
        
        ,
      
    
    
      
        (
        43
        )
      
    
  




where (t) denotes the instantaneous crossing rate (Nikitin et al., 2003). The value of the parameter r generally depends on the distribution of the photosensor's noise in relation to the single photoelectron distribution of the photosensor, and can normally be found either theoretically or empirically based on the required specifications. This parameter affects the ratio of the false positive (noise) and the false negative counts (missed photoelectrons) and allows us to achieve a desired compromise between robustness and selectivity. In the subsequent simulated example (see FIG. 25), the quantile parameter q=1⁄2 (AARF operating as a median filter), and r=6. An attractive choice for the time averaging filter w(t) is a sequence of 3 RC-integrators with identical time constants τ=T/6, which will provide us with rate measurements corresponding to the time averaging with a rectangular moving window of width T (Nikitin et al., 2003).

The main advantage of the analog counting represented by equation (43) is a complete absence of dead time effects (see Nikitin et al. 2003). In addition, the baseline created by an AARF will not be significantly affected by the photoelectron rates below approximately (1−q) Rmax (half of the photosensor saturation rate for a median filter). Thus the maximum measured rate is limited only by the single electron response of a photosensor. This is at least two orders of magnitude higher than the current state of the art photon counting systems. For example, in the simulation presented in FIG. 25, the FWHM of the single electron response is about 1 ns, and the saturation rate of photon counting is about 3×108 s−1. Since the signal-to-noise ratio is proportional to the square root of the rate, the 20 dB increase in the photon counting rate translates into a tenfold increase either in the sensitivity or the speed of detection.
Saturation Rate Monitor (SRM) The SRM produces a continuous output Rmax(t) equal to the rate of upward zero crossings of the difference χ(t)−D1/2(t;T) in the time window w(t),




  
    
      
        
          
            R
            max
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          w
          *
          
            
              
                
                
                  
                    d
                    
                      d
                      t
                    
                  
                  ⁢
                  
                    θ
                    ⁡
                    
                      (
                      
                        x
                        -
                        
                          D
                          q
                        
                      
                      )
                    
                  
                
                
              
              +
            
            .
          
        
      
    
    
      
        (
        44
        )
      
    
  




As was theoretically derived by Nikitin et al. (1998), Rmax is approximately equal to the maximum rate of upward (or downward) crossings of any constant threshold by the photosensor signal χ(t). When the photoelectron rate λPhE of a photosensor is much smaller than Rmax, the pileup effects are small, and the photosensor is in a photon counting mode. When λPhE>>Rmax, the photosensor is in a current mode.

Thus monitoring Rmax allows us to automatically handle the transition between the two modes. The horizontal gray line in panel I of FIG. 25 shows the measured Rmax as a function of the photoelectron rate λPhE. The measured saturation rate is also shown by the horizontal thin solid lines in the lower half of panel III of FIG. 25.
Integrated Output Module As shown in FIG. 24, the output module of BASIS combines the outputs of the ACM, SRM, and AARF into a single continuous output Rout(t). The magnitude of Rout(t), for both the photon counting and the current modes, is proportional to the rate of incident photons. This signal can be, for example, used directly in analog or digital measuring and/or control systems, differentiated (thus producing continuous time derivative of the incident photon rate), or digitally sampled for the subsequent transmission and/or storage. For the simulated example shown in FIG. 25, Rout(t) was chosen as the following combination of Dq(t;T), R(t), and Rmax(t):

Rout(t)=R(t)+βDq(t;T)ΔD[βDq(t;T)−γRmax(t)],  (45)

where β is a calibration constant, ΔD=αRmax, α being a small number (of order 10−1), and γ ̃1⁄2 is a quantile constant. The Integrated Output Module thus includes the ‘transitional’ region between the photon counting and the current modes (shaded in gray in FIG. 25), currently unavailable, into a normal operational range of a photosensor, extending by  ̃20 dB the photosensor's contiguous dynamic range.

Simulated examples of light measurements conducted by PMT with BASIS unit FIG. 25 provides a simulated example of the performance of BASIS used with a PMT. In the simulation, a fast PMT was used (the FWHM of the single electron response is about 1 ns), and the noise rate was chosen to be high (order of magnitude higher than the PMT saturation rate). Panel I of the figure shows the output of BASIS (Rout, thick solid black line) as a function of the photoelectron rate λPhE, along with the outputs of the Saturation Rate Monitor (Rmax, solid gray line), Rank Filtering Module (D1/2, dashed line), and Analog Counting Module (R, thin solid black line). Panel II shows (by gray lines) 1 μs snapshots of the PMT signal for the photoelectron rates much smaller (left), approximately equal (middle), and much higher (right) than the saturation rate of the PMT. This panel also shows (by the black lines) the respective outputs of the Rank Filtering Module D1/2(t), and the baseline levels rD1/2(t) used in the Analog Counting Module (r=6 in the simulation). The instantaneous crossing rates R(t) are also shown (top), and the time constant T of AARF is indicated in the lower left corner of the panel. Panel III illustrates the relation between the noise and photosignal used in the simulation by depicting the accumulated amplitude and counting distributions of the PMT signal. These distributions are shown for three chosen photoelectron rates λPhE, in their relation to the outputs of the Rank Filtering Module (D1/2) and the Saturation Rate Monitor (Rmax). The resolution ΔD of the acquisition system used for measuring the distributions is indicated in the panel.

FIG. 26 provides a simulated example of a modification of BASIS designed for detection of fast changes in a light level. The light signal corresponding to this model can be, for example, an intensity modulated light signal passing through a fiber, or fluorescence of dye excited by an action potential wave propagating through a biological tissue. The gray line in the lower panel of the figure shows the time-varying light signal (square pulses). The higher light level corresponds to the photoelectron rate of about 2×109 photoelectrons per second. The width (FWHM) of the single electron response of the photosensor is about 1 ns, and the resulting photosensor electrical signal x(t) is shown by the gray line in the middle panel.
As can be seen in the figure, the low signal-to-noise ratio makes fast and accurate deduction of the underlying light signal difficult. The circuit shown at the top of FIG. 26, however, allows reliable timing of the onsets and offsets of the light pulses with better than 10 ns accuracy. The output of the circuit Dqf(t;Tf) is shown by the black line in the lower panel of the figure. In the example, the quantile parameterso of the rank filters are qb=1⁄4 and qƒ=3⁄4, and the baseline factor is r=1.5. The parameter r allows us to adjust the circuit for optimal performance based on the difference between the low and high light levels.
5 Generation of Monoenergetic Poissonian Pulse Trains
As another illustration of the current invention, consider a technique and a circuit for generation of monoenergetic Poissonian pulse trains with adjustable rate and amplitude. Generators of such pulse trains can be used, for example, in testbench development and hardware prototyping of instrumentation for nuclear radiation measurements.

Idealized model of a Poisson pulse train generator An idealized process producing a monoenergetic Poissonian pulse train can be implemented as schematically shown in FIG. 27. Consider a stationary random pulse train Σiχiδ(t−ti), where χi are the amplitudes of the pulses with the arrival times ti. This pulse train is filtered by a linear time filter with a continuous impulse response wΔτ(t), where Δτ is the characteristic response time of the filter. An example of such a response would be the bipolar pulse wΔτ(t)=[t/Δτ2−t2/(2Δτ3)] e−t/Δτθ(t), where θ is the Heaviside unit step function. The output χ(t) of the linear time filter can be written as





  
    
      
        
          
            x
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              ∑
              i
            
            ⁢
            
              
            
            ⁢
            
              
                x
                i
              
              ⁢
              
                
                  w
                  
                    Δ
                    τ
                  
                
                ⁡
                
                  (
                  
                    t
                    -
                    
                      t
                      i
                    
                  
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        46
        )
      
    
  




and is a continuous signal. The instantaneous rate of upward crossings Nikitin et al. (2003) of a threshold D by this signal can be written as





  
    
      
        
          
            R
            ⁡
            
              (
              
                D
                ,
                t
              
              )
            
          
          =
          
            
              
                
                
                  
                    d
                    
                      d
                      t
                    
                  
                  ⁢
                  
                    θ
                    ⁡
                    
                      [
                      
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                        -
                        D
                      
                      ]
                    
                  
                
                
              
              +
            
            =
            
              
                ∑
                j
              
              ⁢
              
                
              
              ⁢
              
                δ
                ⁡
                
                  (
                  
                    t
                    -
                    
                      t
                      j
                    
                  
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        47
        )
      
    
  




where tj are the instances of the crossings (that is, χ(tj)=D and {dot over (χ)}(tj)>0). As was discussed in Nikitin (1998), the pulse train given by equation (47) is an approximately Poissonian train affected by a non-extended dead time of order Rmax−1. Thus, when the average rate R(D)=(D, t)T is much smaller than the saturation rate Rmax, (D, t) will provide a good approximation for a monoenergetic Poissonian pulse train of the average rate R(D).

When either M1=0 or W10=0, then, as was shown in Nikitin et al. (1998), the average rate of the upward crossings of a threshold D by the signal χ(t) can be expressed as




  
    
      
        
          
            R
            ⁡
            
              (
              D
              )
            
          
          =
          
            
              R
              max
            
            ⁢
            
              exp
              ⁡
              
                [
                
                  
                    -
                    
                      1
                      2
                    
                  
                  ⁢
                  
                    
                      (
                      
                        D
                        σ
                      
                      )
                    
                    2
                  
                
                ]
              
            
          
        
        ,
      
    
    
      
        (
        48
        )
      
    
  




and thus the rate of the generated pulse train can be adjusted by an appropriate choice of the threshold value D.

Practical implementation of a Poisson pulse train generator The idealized process described above is not well suited for a practical generation of a Poissonian pulse train, since, as can be seen from equation (48), at high values of the threshold D the rate of the generated train is highly sensitive to the changes in D. To reduce this sensitivity, one can pass the signal χ(t) through a nonlinear amplifier, e.g., an antilogarithmic amplifier as shown in FIG. 27, thus transforming χ(t) into the signal y(t)=exp [χ(t)/σ]. Then the average rate of the upward crossings of a threshold D by the signal y(t) can be written as





  
    
      
        
          
            R
            ⁡
            
              (
              D
              )
            
          
          =
          
            
              R
              max
            
            ⁢
            exp
            ⁢
            
              {
              
                -
                
                  
                    
                      1
                      2
                    
                    ⁡
                    
                      [
                      
                        ln
                        ⁡
                        
                          (
                          
                            D
                            σ
                          
                          )
                        
                      
                      ]
                    
                  
                  2
                
              
              }
            
          
        
        ,
      
    
    
      
        (
        49
        )
      
    
  




which is much less sensitive to the relative errors in D.

FIG. 28 illustrates a simulated performance of an idealized monoenergetic Poisson pulse generator shown in FIG. 27. The upper panel of FIG. 28 shows the output pulse rates as a function of threshold, and the lower panels show the distributions of the pulses' interarrival times for the generator set at two different threshold values. In the figure, the black solid lines show the theoretical curves, and the gray solid lines show the respective results of the simulations.
6 Additional Practical Implementations and Applications of Analog Rank Filters in Continuous Time Windows
As discussed in Nikitin and Davidchack (2003b), a quantile, or rank filter of order q, 0<q<1, in an arbitrary moving time window w such that w(t)≧0 and ∫−∞∞ ds w(s)=1, can be given by the function Dq(t) defined implicitly as




  
    
      
        
          
            
              ∫
              
                -
                ∞
              
              ∞
            
            ⁢
            
              
            
            ⁢
            
              
                d
                
                  sw
                  ⁡
                  
                    (
                    
                      t
                      -
                      s
                    
                    )
                  
                
              
              ⁢
              
                θ
                ⁡
                
                  [
                  
                    
                      
                        D
                        q
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    -
                    
                      x
                      ⁡
                      
                        (
                        s
                        )
                      
                    
                  
                  ]
                
              
            
          
          =
          
            
              
                w
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                θ
                ⁡
                
                  [
                  
                    
                      D
                      q
                    
                    -
                    
                      x
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
            
            =
            q
          
        
        ,
      
    
    
      
        (
        50
        )
      
    
  




where θ is the Heaviside unit step function and the asterisk denotes convolution. It was also shown in Nikitin and Davidchack (2003b) that when the time window w can be expressed as9





  
    
      
        
          
            w
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                [
                
                  
                    1
                    τ
                  
                  ⁢
                  
                    exp
                    ⁡
                    
                      (
                      
                        -
                        
                          t
                          τ
                        
                      
                      )
                    
                  
                  ⁢
                  
                    θ
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
                ]
              
              *
              
                
                  w
                  N
                
                ⁡
                
                  (
                  t
                  )
                
              
            
            =
            
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                
                  w
                  N
                
                ⁡
                
                  (
                  t
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        51
        )
      
    
  




then an explicit (albeit differential) equation for Dq(t) can be written as





  
    
      
        
          
            d
            
              D
              q
            
          
          
            d
            t
          
        
        =
        
          
            
              q
              -
              
                
                  
                    w
                    N
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                *
                
                  θ
                  ⁡
                  
                    [
                    
                      
                        D
                        q
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    ]
                  
                
              
            
            
              τ
              ⁢
              
                d
                
                  d
                  
                    D
                    q
                  
                
              
              ⁢
              
                {
                
                  
                    w
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  *
                  
                    θ
                    ⁡
                    
                      [
                      
                        
                          D
                          q
                        
                        -
                        
                          x
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                      ]
                    
                  
                
                }
              
            
          
          .
        
      
    
    
      
        (
        52
        )
      
    
  




9Note that hτ in equation (51) describes the impulse response of an RC integrator with RC=τ.

The solution of equation (52) is ensured to rapidly converge to Dq(t) of the chosen quantile order q regardless of the initial condition. However, there are several obstacles to a straightforward implementation of the filter given by this equation. One is that the convolution integrals in its right-hand side need to be re-evaluated (updated) for each new value of Dq. Another obstacle is the fact that the denominator in the right-hand side contains the derivatives of the Heaviside unit step function and thus may assume zero values or singularities, rendering a circuit implementation impossible. Indeed, the derivative of θ[Dq−χ(t)] with respect to Dq is expressed by the Dirac δ-function δ[Dq−χ(t)]. The latter can be in turn expressed as (see Davydov, 1988, p. 610, eq. (A 15), for example)





  
    
      
        
          
            δ
            ⁡
            
              [
              
                
                  D
                  q
                
                -
                
                  x
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              ]
            
          
          =
          
            
              ∑
              i
            
            ⁢
            
              
            
            ⁢
            
              
                δ
                ⁡
                
                  (
                  
                    t
                    -
                    
                      t
                      i
                    
                  
                  )
                
              
              
                
                
                  
                    x
                    ′
                  
                  ⁡
                  
                    (
                    
                      t
                      i
                    
                    )
                  
                
                
              
            
          
        
        ,
      
    
    
      
        (
        53
        )
      
    
  




where |χ′(ti)| is the absolute value of the signal derivative at ti, and the sum goes over all ti such that χ(ti)=Dq. Thus the denominator in equation (52) can be re-written as





  
    
      
        
          
            τ
            ⁢
            
              d
              
                d
                
                  D
                  q
                
              
            
            ⁢
            
              {
              
                
                  w
                  ⁡
                  
                    (
                    t
                    )
                  
                
                *
                
                  θ
                  ⁡
                  
                    [
                    
                      
                        D
                        q
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    ]
                  
                
              
              }
            
          
          =
          
            τ
            ⁢
            
              
                ∑
                i
              
              ⁢
              
                
              
              ⁢
              
                
                  w
                  ⁡
                  
                    (
                    
                      t
                      -
                      
                        t
                        i
                      
                    
                    )
                  
                
                
                  
                  
                    
                      x
                      ′
                    
                    ⁡
                    
                      (
                      
                        t
                        i
                      
                      )
                    
                  
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        54
        )
      
    
  




which can be zero or a singularity. If we wish to implement an analog rank filter in a simple feedback circuit, then we should replace the right-hand side of equation (52) by an approximation which can be easily evaluated by such a circuit.

6.1 Modified Practical Approximation of Rank Filter in Arbitrary Continuous Time Window
First, let us consider rank filters of orders q±δq defined implicitly as

w(t)*θ[Dq±−χ(t)]=q±δq,  (55)

where 0<δq<<q. Clearly, Dq−≦Dq+, and we can assume that limδq→0 (Dq+−Dq−)=0. Thus we can write:





  
    
      
        
          
            
              d
              
                d
                
                  D
                  q
                
              
            
            ⁢
            
              {
              
                
                  w
                  ⁡
                  
                    (
                    t
                    )
                  
                
                *
                
                  θ
                  ⁡
                  
                    [
                    
                      
                        D
                        q
                      
                      -
                      
                        x
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                    
                    ]
                  
                
              
              }
            
          
          ⁢
          
            

          
          =
          
            
              
                lim
                
                  
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    q
                  
                  ->
                  0
                
              
              ⁢
              
                
                  
                    
                      w
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    *
                    
                      θ
                      ⁡
                      
                        [
                        
                          
                            D
                            
                              q
                              +
                            
                          
                          -
                          
                            x
                            ⁡
                            
                              (
                              t
                              )
                            
                          
                        
                        ]
                      
                    
                  
                  -
                  
                    
                      w
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    *
                    
                      θ
                      ⁡
                      
                        [
                        
                          
                            D
                            
                              q
                              -
                            
                          
                          -
                          
                            x
                            ⁡
                            
                              (
                              t
                              )
                            
                          
                        
                        ]
                      
                    
                  
                
                
                  
                    D
                    
                      q
                      +
                    
                  
                  -
                  
                    D
                    
                      q
                      -
                    
                  
                
              
            
            ⁢
            
              

            
            =
            
              
                
                  lim
                  
                    
                      δ
                      ⁢
                      
                        
                      
                      ⁢
                      q
                    
                    ->
                    0
                  
                
                ⁢
                
                  
                    2
                    ⁢
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    q
                  
                  
                    
                      D
                      
                        q
                        +
                      
                    
                    -
                    
                      D
                      
                        q
                        -
                      
                    
                  
                
              
              ≈
              
                
                  2
                  ⁢
                  δ
                  ⁢
                  
                    
                  
                  ⁢
                  q
                
                
                  
                    
                      D
                      
                        q
                        +
                      
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  -
                  
                    
                      D
                      
                        q
                        -
                      
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        56
        )
      
    
  




and





  
    
      
        
          
            D
            q
          
          ⁡
          
            (
            t
            )
          
        
        ≈
        
          
            
              1
              2
            
            ⁡
            
              [
              
                
                  
                    D
                    
                      q
                      +
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                +
                
                  
                    D
                    
                      q
                      -
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              ]
            
          
          .
        
      
    
    
      
        (
        57
        )
      
    
  




Second, let us assume that the time window w(t) is represented as a weighted sum of N RC integrators with τ=RC, namely as




  
    
      
        
          
            w
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                
                  w
                  N
                
                ⁡
                
                  (
                  t
                  )
                
              
            
            =
            
              
                
                  h
                  τ
                
                ⁡
                
                  (
                  t
                  )
                
              
              *
              
                
                  ∑
                  
                    k
                    =
                    0
                  
                  
                    N
                    -
                    1
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    w
                    k
                  
                  ⁢
                  
                    δ
                    ⁡
                    
                      (
                      
                        t
                        -
                        
                          t
                          k
                        
                      
                      )
                    
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        58
        )
      
    
  




where Σkwk=1

Third, instead of ideal comparators expressed by the Heaviside unit step functions, we will use more realistic comparators given by

[Dq−χ(t)]=(S+−S−)θ[Dq−χ(t)]+S−,  (59)

where S+ and S− are high (‘positive’) and low (‘negative’) supplies, respectively. Further, we can set S+=−S−=S, and thus

[Dq−χ(t)]=Ssgn[Dq−χ(t)].  (60)

It is worth pointing out that, in practice, δq of order 10−2 (1%) should be sufficient for a good approximation of a rank filter. Thus, even though we use the Heaviside unit step function and signum function notations in equations (59) and (60), respectively, the comparator gain can be actually relatively small (of order δq−1·100).

Combining equations (52) and (56-60), we arrive at the following approximation to a rank filter in a continuous time window w(t) given by equation (58):




  
    
      
        
          
            
              D
              q
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              1
              2
            
            ⁡
            
              [
              
                
                  
                    D
                    
                      q
                      +
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                +
                
                  
                    D
                    
                      q
                      -
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              ]
            
          
        
        ,
        
          

        
        ⁢
        
          
            
              D
              
                q
                ⁢
                
                  +
                  _
                
              
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              1
              T
            
            ⁢
            
              ∫
              
                
                  d
                  t
                
                ⁢
                
                  
                
                ⁢
                
                  {
                  
                    
                      S
                      ⁡
                      
                        (
                        
                          
                            2
                            ⁢
                            q
                          
                          -
                          1
                          ⁢
                          
                            +
                            _
                          
                          ⁢
                          
                            2
                            ⁢
                            δ
                            ⁢
                            
                              
                            
                            ⁢
                            q
                          
                        
                        )
                      
                    
                    -
                    
                      
                        ∑
                        
                          k
                          =
                          0
                        
                        
                          N
                          -
                          1
                        
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        
                          w
                          k
                        
                        ⁢
                        
                          F
                          ⁡
                          
                            [
                            
                              
                                
                                  D
                                  
                                    q
                                    ⁢
                                    
                                      +
                                      _
                                    
                                  
                                
                                ⁡
                                
                                  (
                                  t
                                  )
                                
                              
                              -
                              
                                x
                                ⁡
                                
                                  (
                                  
                                    t
                                    -
                                    
                                      t
                                      k
                                    
                                  
                                  )
                                
                              
                            
                            ]
                          
                        
                      
                    
                  
                  }
                
                ⁢
                G
                ×
                δ
                ⁢
                
                  
                
                ⁢
                
                  
                    D
                    q
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
        
        ,
        
          
        
        ⁢
        
           
          
            

          
          ⁢
          
             
            
              
                
                  δ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      D
                      q
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
                =
                
                  
                    
                      D
                      
                        q
                        +
                      
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  -
                  
                    
                      D
                      
                        q
                        -
                      
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
              
              ,
            
          
        
      
    
    
      
        (
        61
        )
      
    
  




where G=T (4τSδq)−1. This equation can be easily implemented in a feedback circuit as illustrated in FIG. 29. One skilled in the art will recognize that this circuit is a simplified embodiment of a more general implementation depicted in FIG. 30.

As shown in FIG. 30, an input variable χ(t) and a plurality of feedbacks of Offset Rank Filtered Variables {Dqi(t)} are passed through a plurality of delayed comparators forming a plurality of outputs of the comparators {{tilde over ()}idel(t)}={{tilde over ()}ΔDdel[Dqi(t), χ(t)]}. (Please note that a double line in the diagram indicates a plurality of signals.) Said plurality of the outputs of the comparators {{tilde over ()}idel} is used to form a plurality {A(2qi−1)−{tilde over ()}idel} of differences between said outputs of the comparators and the respective Offset Quantile Parameters of said Offset Rank Filtered Variables. The plurality of the feedbacks of the Offset Rank Filtered Variables {Dqi(t)} is used to form a weighted difference δDq(t)=ΣiβiDqi(t), where Σiβi=0, of said feedbacks. Each difference A(2qi−1)−{tilde over ()}idel between the outputs of the comparators and the respective Offset Quantile Parameters of the Offset Rank Filtered Variables is multiplied by an amplified weighted difference GδDq(t) of the feedbacks of the Offset Rank Filtered Variables, forming a plurality of time derivatives of Offset Rank Filtered Variables {{dot over (D)}qi(t)}. Said plurality of the time derivatives {{dot over (D)}qi(t)} is integrated to produce the plurality of the Offset Rank Filtered Variables {Dqi(t)}. The plurality of the Offset Rank Filtered Variables {Dqi(t)} is then used to form an output Rank Filtered Variable Dq(t) as a weighted average ΣiwiDqi(t), Σiwi=1, of said Offset Rank Filtered Variables.
Analog Rank Selectors As was discussed previously in this disclosure, while a rank filter operates on a single scalar input signal χ(t) and outputs a qth quantile Dq(t) of the input signal in a moving window of time, a rank selector operates on a plurality of input signals {χi(t)}, i=1, . . . , N, and outputs (‘selects’) an instantaneous qth quantile Dq(t) (in general, a weighted quantile) of the plurality of the input signals. Such transition from a filter to a selector can be achieved by replacing the delayed comparators in an ARF by averaging comparators.
As shown in FIG. 31, a plurality of input variables {χj(t)}, j=1, . . . , N, and a plurality of feedbacks of Offset Rank Selected Variables {Dqi(t)} are passed through a plurality of averaging comparators forming a plurality of outputs of the comparators {{tilde over ()}iave(t)}={{tilde over ()}ΔDave[Dqi(t), χj(t)]}={Σj=1Nνj{tilde over ()}ΔD[Dqi(t)−χj(t)]}. Said plurality of the outputs of the comparators {{tilde over ()}iave} is used to form a plurality {A(2qi−1−{tilde over ()}iave} of differences between said outputs of the comparators and the respective Offset Quantile Parameters of said Offset Rank Selected Variables. The plurality of the feedbacks of the Offset Rank Selected Variables {Dqi(t)} is used to form a weighted difference δDq(t)=ΣiβiDqi(t), where Σiβi=0, of said feedbacks. Each difference A(2qi−1)−{tilde over ()}iave between the outputs of the comparators and the respective Offset Quantile Parameters of the Offset Rank Selected Variables is multiplied by an amplified weighted difference GδDq(t) of the feedbacks of the Offset Rank Selected Variables, forming a plurality of time derivatives of Offset Rank Selected Variables {{dot over (D)}qi(t)}. Said plurality of the time derivatives {{dot over (D)}qi(t)} is integrated to produce the plurality of the Offset Rank Selected Variables {Dqi(t)}. The plurality of the Offset Rank Selected Variables {Dqi(t)} is then used to form an output Rank Selected Variable Dq(t) as a weighted average ΣiwiDqi(t), Σiwi=1, of said Offset Rank Selected Variables.
Median filters for noise suppression in broadband applications A median (q=1⁄2) filter is of a particular practical interest since, due to its insensitivity to outliers, it is more effective for filtering impulse noise than any type of an averaging (low-pass) filter.
When used for noise suppression, the time window w(t) should be chosen as wide as possible without significant distortion of the underlying (‘noise-free’) signal. A sensible choice for a measure of the width of the window for a median filter is the median width tm as defined in (Nikitin and Davidchack, 2003a, p. 45):




  
    
      
        
          
            t
            m
          
          =
          
            
              ∫
              
                -
                ∞
              
              ∞
            
            ⁢
            
              
            
            ⁢
            
              
                d
                t
              
              ⁢
              
                
              
              ⁢
              
                θ
                ⁡
                
                  [
                  
                    
                      w
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                    -
                    
                      w
                      m
                    
                  
                  ]
                
              
            
          
        
        ,
      
    
    
      
        (
        62
        )
      
    
  




where wm is defined implicitly as





  
    
      
        
          
            ∫
            
              -
              ∞
            
            ∞
          
          ⁢
          
            
          
          ⁢
          
            
              d
              t
            
            ⁢
            
              
            
            ⁢
            
              w
              ⁡
              
                (
                t
                )
              
            
            ⁢
            
              θ
              ⁡
              
                [
                
                  
                    w
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                  -
                  
                    w
                    m
                  
                
                ]
              
            
          
        
        =
        
          
            1
            2
          
          .
        
      
    
    
      
        (
        63
        )
      
    
  




Let us first consider two time windows: (i) the traditional boxcar time window




  
    
      w
      ⁡
      
        (
        t
        )
      
    
    =
    
      
        
          B
          T
        
        ⁡
        
          (
          t
          )
        
      
      =
      
        
          1
          T
        
        ⁡
        
          [
          
            
              θ
              ⁡
              
                (
                t
                )
              
            
            -
            
              θ
              ⁡
              
                (
                
                  t
                  -
                  T
                
                )
              
            
          
          ]
        
      
    
  
  ,




and (ii) the exponential time window





  
    
      w
      ⁡
      
        (
        t
        )
      
    
    =
    
      
        
          h
          τ
        
        ⁡
        
          (
          t
          )
        
      
      =
      
        
          1
          τ
        
        ⁢
        
          exp
          ⁡
          
            (
            
              -
              
                1
                τ
              
            
            )
          
        
        ⁢
        
          θ
          ⁡
          
            (
            t
            )
          
        
      
    
  
  ,




and examine the attenuation of a purely harmonic input by median filters with these two widows. As can be seen in FIG. 32, the approximate 3 dB cut-off frequency ƒc for a harmonic signal can be expressed as 0.606T−1 and 0.329τ−1 for the boxcar and the exponential windows, respectively. Then the respective values of the median width are tm=T=0.606ƒc−1, and tm=τ ln 2=0.228ƒc−1.

One- and two-delay approximations of a median filter Note that a single hτ(t) time weighting function (wN=δ(t) in equation (58)) is not a good choice due to its narrow width as well as the asymmetry. We can approximate an arbitrary time window w(t) by hτ(t)*wN(t) as in equation (58), provided that N is sufficiently large and τ is sufficiently small.10 A simple practical choice would be to set wk=1/N and tk=kΔt, and, to insure certain symmetry of the time window, to require that the median and the mean of the time weighting function w(t) coincide.11 Then the parameters τ and Δt in equation (58) can be expressed as





  
    
      
        
          τ
          =
          
            
              
                T
                
                  2
                  +
                  
                    
                      (
                      
                        N
                        -
                        1
                      
                      )
                    
                    ⁢
                    α
                  
                
              
              ⁢
              
                
              
              ⁢
              and
              ⁢
              
                
              
              ⁢
              Δ
              ⁢
              
                
              
              ⁢
              t
            
            =
            
              
                α
                ⁢
                
                  
                
                ⁢
                τ
              
              =
              
                
                  α
                  ⁢
                  
                    
                  
                  ⁢
                  T
                
                
                  2
                  +
                  
                    
                      (
                      
                        N
                        -
                        1
                      
                      )
                    
                    ⁢
                    α
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        64
        )
      
    
  




were T is the width of a boxcar time window with the same mean and median, and α is given implicitly by





  
    
      
        
          
            ∫
            0
            
              
                (
                
                  1
                  +
                  
                    
                      
                        N
                        -
                        1
                      
                      2
                    
                    ⁢
                    α
                  
                
                )
              
              ⁢
              τ
            
          
          ⁢
          
            
          
          ⁢
          
            
              d
              t
            
            ⁢
            
              
            
            ⁢
            
              w
              ⁡
              
                (
                t
                )
              
            
          
        
        =
        
          
            
              1
              N
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  0
                
                
                  N
                  -
                  1
                
              
              ⁢
              
                
              
              ⁢
              
                
                  [
                  
                    1
                    -
                    
                      exp
                      ⁡
                      
                        (
                        
                          
                            -
                            1
                          
                          -
                          
                            
                              
                                N
                                -
                                
                                  2
                                  ⁢
                                  k
                                
                                -
                                1
                              
                              2
                            
                            ⁢
                            α
                          
                        
                        )
                      
                    
                  
                  ]
                
                ⁢
                
                  θ
                  ⁡
                  
                    (
                    
                      1
                      +
                      
                        
                          
                            N
                            -
                            
                              2
                              ⁢
                              k
                            
                            -
                            1
                          
                          2
                        
                        ⁢
                        α
                      
                    
                    )
                  
                
              
            
          
          =
          
            
              1
              2
            
            .
          
        
      
    
    
      
        (
        65
        )
      
    
  




10Since a moving time window is always a part of a convolution integral, this approximation is understood in the sense that w(t)*g(t)≈hτ(t)*wN(t)*g(t), where g(t) is a smooth function.11Note that equating the mean and the median is equivalent to setting the second Pearson's skewness coefficient (see Kenney and Keeping, 1962, p. 101-102, for example) to zero.

Note that α is a multivalued function of N. FIG. 33(a) plots the values of α for several values of N, and FIGS. 33(b) and 33(c) show the time windows for minimum and maximum values of α, respectively, in comparison with a boxcar time window with the same mean and median.

Approximations with large N are impractical since they require a large number of delay lines (N−1) and comparators (2N) for their implementation. The increase in the component count will also introduce additional noise and other distortions into the output of the filter. Thus sensible practical choices of the time windows for the median filter are a one-delay (N=2) window




  
    
      w
      ⁡
      
        (
        t
        )
      
    
    =
    
      
        1
        2
      
      ⁢
      
        
          h
          τ
        
        ⁡
        
          (
          t
          )
        
      
      *
      
        [
        
          
            δ
            ⁡
            
              (
              t
              )
            
          
          +
          
            δ
            ⁡
            
              (
              
                t
                -
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  t
                
              
              )
            
          
        
        ]
      
    
  
  ,




where Δt=2τ cosh−1(e/2)≈1.6480τ, and a two-delay (N=3) window





  
    w
    ⁡
    
      (
      t
      )
    
  
  =
  
    
      1
      3
    
    ⁢
    
      
        h
        τ
      
      ⁡
      
        (
        t
        )
      
    
    *
    
      
        [
        
          
            δ
            ⁡
            
              (
              t
              )
            
          
          +
          
            δ
            ⁡
            
              (
              
                t
                -
                τ
              
              )
            
          
          +
          
            δ
            ⁡
            
              (
              
                t
                -
                
                  2
                  ⁢
                  τ
                
              
              )
            
          
        
        ]
      
      ⁢
      
        .
        12
      
    
  




12 In terms of the approximate 3 dB cut-off frequency ƒc for a harmonic signal, the delay time Δt can be expressed as Δt=0.274ƒc−1=(3.65 ƒc)−1 and Δt=0.1515 ƒc−1=(6.6 ƒc)−1 for one- and two-delay median filters, respectively. 12For N=3, the values of α are 0.9963 and 1.0240.

One-delay median filter circuit The analog median filter (AMF) shown in FIG. 34 is described by the following equations:





  
    
      
        
          
            
              D
              m
            
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              1
              2
            
            ⁡
            
              [
              
                
                  
                    D
                    
                      m
                      +
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
                +
                
                  
                    D
                    
                      m
                      -
                    
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
              ]
            
          
        
        ,
      
    
    
      
        (
        66
        )
      
    
  




and





  
    
      
        
          
            D
            
              m
              ⁢
              
                +
                _
              
            
          
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            1
            RC
          
          ⁢
          
            ∫
            
              
                d
                t
              
              ⁢
              
                
                  1
                  A
                
                ⁡
                
                  [
                  
                    G
                    ×
                    δ
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        D
                        m
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                  ]
                
              
              ×
              
                
                  (
                  
                    
                      
                        
                          +
                          _
                        
                        ⁢
                        δ
                      
                      ⁢
                      
                        
                      
                      ⁢
                      U
                    
                    -
                    
                      W
                      ⁢
                      
                        {
                        
                          
                            F
                            ⁡
                            
                              [
                              
                                
                                  
                                    D
                                    
                                      m
                                      ⁢
                                      
                                        +
                                        _
                                      
                                    
                                  
                                  ⁡
                                  
                                    (
                                    t
                                    )
                                  
                                
                                -
                                
                                  x
                                  ⁡
                                  
                                    (
                                    t
                                    )
                                  
                                
                              
                              ]
                            
                          
                          +
                          
                            F
                            ⁡
                            
                              [
                              
                                
                                  
                                    D
                                    
                                      m
                                      ⁢
                                      
                                        +
                                        _
                                      
                                    
                                  
                                  ⁡
                                  
                                    (
                                    t
                                    )
                                  
                                
                                -
                                
                                  x
                                  ⁡
                                  
                                    (
                                    
                                      t
                                      -
                                      
                                        Δ
                                        ⁢
                                        
                                          
                                        
                                        ⁢
                                        t
                                      
                                    
                                    )
                                  
                                
                              
                              ]
                            
                          
                        
                        }
                      
                    
                  
                  )
                
                .
              
            
          
        
      
    
    
      
        (
        67
        )
      
    
  




With the approximate constraints on the multiplier as −A≦(χ2−χ1), χ3≦A, and on the signal as −U≦χ(t)≦U, the parameters in equation (67) are as follows:





  
    
      
        
          W
          =
          
            A
            
              2
              ⁢
              
                
              
              ⁢
              S
            
          
        
        ,
        
          
        
        ⁢
        
          
            δ
            ⁢
            
              
            
            ⁢
            U
          
          =
          
            2
            ⁢
            A
            ⁢
            
              
            
            ⁢
            δ
            ⁢
            
              
            
            ⁢
            q
          
        
        ,
        
          
        
        ⁢
        
          RC
          =
          
            0.6068
            ⁢
            
              
            
            ⁢
            Δ
            ⁢
            
              
            
            ⁢
            t
            ⁢
            
              A
              
                4
                ⁢
                
                  
                
                ⁢
                U
              
            
          
        
        ,
        
          
        
        ⁢
        
          
            and
            ⁢
            
              
            
            ⁢
            G
          
          =
          
            
              
                A
                2
              
              
                8
                ⁢
                
                  
                
                ⁢
                U
                ⁢
                
                  
                
                ⁢
                δ
                ⁢
                
                  
                
                ⁢
                U
              
            
            =
            
              A
              
                16
                ⁢
                
                  
                
                ⁢
                U
                ⁢
                
                  
                
                ⁢
                δ
                ⁢
                
                  
                
                ⁢
                q
              
            
          
        
        ,
      
    
    
      
        (
        68
        )
      
    
  




where δq ̃10−2<<1. Then the circuit shown in FIG. 34 approximates a median filter in the time window shown in the upper left corners of FIGS. 33(b) and 33(c), with the approximate 3 dB cut-off frequency ƒc≈(3.65Δt)−1. FIG. 35 shows the attenuation and the phase sift of a purely harmonic signal filtered by a circuit implemented according to equations (66) through (68).

When the frequency of the input harmonic signal approaches the cut-off frequency ƒc, the nonlinear distortions increase significantly. This is illustrated in FIG. 36 which shows inputs and outputs of the filter for several different frequencies. However, as can be seen from FIG. 37, the frequencies of any noticeable higher harmonics of the distorted output lie at the frequencies above ƒc. Thus they can either be ignored (for example, if the signal is subsequently demodulated), or filtered out by a low-pass filter (for example, for audio applications).
Qualitative estimate of the noise suppression efficiency Let us develop an order of magnitude estimate of the efficiency of the filter for suppression of the impulse noise in a lossy transmission line.
Consider a random noise signal filtered by a linear filter with an impulse response h(t):




  
    
      
        
          
            x
            ⁡
            
              (
              t
              )
            
          
          =
          
            
              h
              ⁡
              
                (
                t
                )
              
            
            *
            
              
                ∑
                
                  i
                  =
                  0
                
                ∞
              
              ⁢
              
                
              
              ⁢
              
                
                  x
                  i
                
                ⁢
                
                  δ
                  ⁡
                  
                    (
                    
                      t
                      -
                      
                        t
                        i
                      
                    
                    )
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        69
        )
      
    
  




where δ(χ) is the Dirac δ-function Dirac (1958) and the asterisk denotes convolution. We will further assume, for simplicity, a zero-mean noise (χi)=0 with a uniform rate density ρ,





  
    
      
        
          ρ
          =
          
            
              
                
                  ∂
                  2
                
                
                  
                    ∂
                    t
                  
                  ⁢
                  
                    ∂
                    
                      
                    
                    ⁢
                    d
                  
                
              
              ⁢
              
                N
                ⁡
                
                  (
                  
                    t
                    ,
                    d
                  
                  )
                
              
            
            =
            const
          
        
        ,
      
    
    
      
        (
        70
        )
      
    
  




where N(t, d) is the total number of the noise pulses as a function of time and the distance from the receiver.

As discussed in more detail in Rice (1944) and Nikitin et al. (1998), when the arrival of the noise pulses χiδ(t−ti) is a Poisson process with sufficiently high rate, the expected (saturation) rate λ of upward crossings of the mean-value threshold χ by χ(t) can be expressed as




  
    
      
        
          
            λ
            _
          
          =
          
            
              
                
                  1
                  
                    2
                    ⁢
                    π
                  
                
                ⁡
                
                  [
                  
                    
                      〈
                      
                        
                          
                            h
                            .
                          
                          2
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      〉
                    
                    
                      〈
                      
                        
                          h
                          2
                        
                        ⁡
                        
                          (
                          t
                          )
                        
                      
                      〉
                    
                  
                  ]
                
              
              
                1
                2
              
            
            =
            
              
                [
                
                  
                    〈
                    
                      
                        f
                        2
                      
                      ⁢
                      
                        w
                        ⁡
                        
                          (
                          f
                          )
                        
                      
                    
                    〉
                  
                  
                    〈
                    
                      w
                      ⁡
                      
                        (
                        f
                        )
                      
                    
                    〉
                  
                
                ]
              
              
                1
                2
              
            
          
        
        ,
      
    
    
      
        (
        71
        )
      
    
  




where the dot over h denotes the time derivative, w=w(ƒ) is the frequency power spectrum of h(t), and the angular brackets denote the integration from zero to infinity.

The frequency response of a lossy transmission line is given by

H(l,ƒ)=e−kl√{square root over (ƒ)},  (72)

where ƒ is the frequency, l is the length of the line, and k is the line constant. Therefore for a high rate noise originating the distance d from the receiver the average crossing rate of the received noise will be





  
    
      
        
          
            λ
            _
          
          ⁡
          
            (
            d
            )
          
        
        =
        
          
            
              30
              2
            
            
              
                (
                kd
                )
              
              2
            
          
          .
        
      
    
    
      
        (
        73
        )
      
    
  




Efficiency threshold The average width of a single noise pulse can be roughly estimated as (2 λ)−1, where λ is the saturation upward crossing rate. The median filter will have a high efficiency in suppression of the noise when the noise rate is low (i.e. when the average width of a single noise pulse is much smaller than the average interarrival time of the pulses), and when the half-width of its window is much larger than the average width of a single noise pulse. Expressing the half-width of the filter window in terms of its approximate 3 dB cut-off frequency for a harmonic signal ƒc, these two conditions can be written as λ(d)>>max(ρd, 1.7ƒc). Using equation (73), we can rewrite these conditions as





  
    
      
        
          d
          ⪡
          
            d
            0
          
        
        =
        
          
            min
            ⁡
            
              (
              
                
                  2.54
                  ⁢
                  
                    k
                    
                      -
                      1
                    
                  
                  ⁢
                  
                    f
                    c
                    
                      -
                      
                        1
                        2
                      
                    
                  
                
                ,
                
                  2.22
                  ⁢
                  
                    k
                    
                      -
                      
                        2
                        3
                      
                    
                  
                  ⁢
                  
                    ρ
                    
                      -
                      
                        1
                        3
                      
                    
                  
                
              
              )
            
          
          =
          
            {
            
              
                
                  
                    
                      2.22
                      ⁢
                      
                        k
                        
                          -
                          
                            2
                            3
                          
                        
                      
                      ⁢
                      
                        ρ
                        
                          -
                          
                            1
                            3
                          
                        
                      
                    
                  
                  
                    
                      
                        for
                        ⁢
                        
                          
                        
                        ⁢
                        ρ
                      
                      ⁢
                      
                        >
                        _
                      
                      ⁢
                      
                        ρ
                        0
                      
                    
                  
                
                
                  
                    
                      2.22
                      ⁢
                      
                        k
                        
                          -
                          
                            2
                            3
                          
                        
                      
                      ⁢
                      
                        ρ
                        0
                        
                          -
                          
                            1
                            3
                          
                        
                      
                    
                  
                  
                    otherwise
                  
                
              
              ,
            
          
        
      
    
    
      
        (
        74
        )
      
    
  




where ρ0=0.668×kƒc3/2 is the critical noise rate density, and d0 is the efficiency threshold with the following interpretation:

For d<<d0 the efficiency of the filter for suppression of the impulse noise is high, and for d>d0 the efficiency is low.
Note that the efficiency threshold was estimated under the assumption that the noise originates at the transmitter. For a distributed noise, the threshold will be higher.
Noise suppression efficiency above efficiency threshold For the distances from the transmitter to the receiver larger than the efficiency threshold, the noise suppression efficiency of the filter in the passband [0, ƒc] can be approximately expressed as follows:




  
    
      
        
          
            
              H
              ⁡
              
                (
                d
                )
              
            
            ≈
            
              
                
                  ∫
                  
                    r
                    ⁢
                    
                      
                    
                    ⁢
                    
                      d
                      0
                    
                  
                  d
                
                ⁢
                
                  
                
                ⁢
                
                  
                    d
                    l
                  
                  ⁢
                  
                    
                      ∫
                      0
                      
                        f
                        c
                      
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        d
                        f
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        e
                        
                          
                            -
                            kl
                          
                          ⁢
                          
                            f
                          
                        
                      
                    
                  
                
              
              
                
                  ∫
                  0
                  d
                
                ⁢
                
                  
                
                ⁢
                
                  
                    d
                    l
                  
                  ⁢
                  
                    
                      ∫
                      0
                      
                        f
                        c
                      
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      
                        d
                        f
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        e
                        
                          
                            -
                            kl
                          
                          ⁢
                          
                            f
                          
                        
                      
                    
                  
                
              
            
          
          =
          
            
              
                F
                ⁡
                
                  (
                  
                    
                      krd
                      0
                    
                    ⁢
                    
                      
                        f
                        c
                      
                    
                  
                  )
                
              
              -
              
                F
                ⁡
                
                  (
                  
                    kd
                    ⁢
                    
                      
                        f
                        c
                      
                    
                  
                  )
                
              
            
            
              1
              -
              
                F
                ⁡
                
                  (
                  
                    kd
                    ⁢
                    
                      
                        f
                        c
                      
                    
                  
                  )
                
              
            
          
        
        ,
      
    
    
      
        (
        75
        )
      
    
  




where





  
    F
    ⁡
    
      (
      x
      )
    
  
  =
  
    2
    
      x
      2
    
  




[1−e−χ(1+χ)] and r is a positive constant of order unity. Note that for low noise rates such that ρ≦ρ0 the limit of H(d) for large d approaches ≈[−6.51+5.62(1−r)] dB.

FIG. 38 illustrates the noise suppression efficiency of a single-delay median filter. In the figure, the efficiency threshold is shown by the white line, the contour lines according to the qualitative estimate are drawn by the dashed lines, and the experimental (through numerical experiment) efficiency shown in grayscale. The numerical values for the cable length and the noise rate densities are given for a typical twisted pair phone cable with




  
    k
    ≈
    
      4.6
      ×
      
        10
        
          -
          6
        
      
      ⁢
      
        m
        
          -
          1
        
      
      ⁢
      
        Hz
        
          -
          
            1
            2
          
        
      
    
  
  ,




and the filter with the cut-off frequency 1.3 MHz.

Multicarrier modulation example FIG. 39 illustrates the utility of AMFs in broadband applications. Panel I(a) shows the transmitted multicarrier signal modulated by the levels shown in panel II(a). Passing through the transmission line, the signal acquires noise containing a certain amount of narrow ‘spikes’ of the duration shorter than the width of the time window of the median filter. Such spikes will affect the carriers in all transmitted range of frequencies and, if the level of the noise is high, the demodulation of the signal at the receiver (black bars in panel II(b)) will lead to the result different from the transmitted modulation (gray bars). However, a wide-band amplifier followed by an AMF will suppress the spikes (panel I(c)), enabling accurate demodulation (panel II(c)).

6.2 Comb (Bandpass) Rank and Median Filters
Consider the following time window of a rank filter:




  
    
      
        
          w
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            
              h
              T
            
            ⁡
            
              (
              t
              )
            
          
          *
          
            1
            N
          
          ⁢
          
            
              ∑
              
                k
                =
                0
              
              
                N
                -
                1
              
            
            ⁢
            
              
            
            ⁢
            
              
                δ
                ⁡
                
                  (
                  
                    t
                    -
                    
                      k
                      ⁢
                      
                        
                      
                      ⁢
                      Δ
                      ⁢
                      
                        
                      
                      ⁢
                      t
                    
                  
                  )
                
              
              .
            
          
        
      
    
    
      
        (
        76
        )
      
    
  




As was shown in this disclosure, when τ is of order τt or larger, for a harmonic input a median filter acts essentially as a lowpass filter. However, there might be additional transmission maxima at frequencies approximately equal to





  
    k
    
      N
      -
      1
    
  
  ⁢
  Δ
  ⁢
  
    
  
  ⁢
  
    
      t
      
        -
        1
      
    
    .
  




When the value of τ becomes smaller than approximately one third of Δt, the additional transmission passbands become pronounced, especially at the frequencies which are multiples of Δt−1. Thus rank filters with such time windows can be viewed as comb, or bandpass filters and can be used for noise suppression in carriers at those frequencies. We may use the acronyms AMCF and AQCF for the median and quantile (rank) comb filters, respectively. If the suppression of other frequencies is desired (in order, for example, to eliminate nonlinear distortions when filtering a harmonic carrier), this can be achieved by preceding a rank filter by a highpass filter and following by a lowpass filter, as illustrated in FIG. 40. The figure shows the attenuation of purely harmonic signals by two different median comb filters with time windows indicated in the upper right corners of the two panels in the figure. The dashed lines show the responses of the rank filters alone, and the filled areas under thick solid lines indicate the responses of the ‘highpass-rank-lowpass’ combinations. Note that a highpass filter preceding the rank filter does not significantly broaden narrow noise pulses, and those pulses are thus suppressed by the subsequent rank filtering.

FIG. 41 provides an illustration of using AMCF for noise suppression in a single carrier signal. The top row of the panels shows a single frequency carrier transmitting a message using a QAM scheme. In the second row, strong noise is added to the carrier signal. As can be seen from the panel in the middle of the row, most of the noise power is located in a relatively narrow passband around ƒ0, and the total noise power is about hundred times larger than the signal power. As the result, the demodulated signal (black bars) is significantly different from the transmitted modulation (gray bars). When the carrier signal is filtered with a linear narrow band filter (such as, for example, a traditional comb filter with the time window indicated in the upper left corner of the left panel in the third row), the noise power at the frequency ƒ0 remains high (middle panel in the third row), and the quality of demodulation does not improve (right panel in the third row). A median comb filter with the same time window, however, removes most of the noise at all frequencies, enabling accurate demodulation. This is shown in the bottom row of the panels in FIG. 41. Note that the power spectrum of the carrier without noise is shown by the filled gray areas in the panels in the middle of the rows.
Comb Rank Filter as an Image Filter
There are numerous possible applications of comb rank filters in many fields. One such area is real-time image processing, for example processing signals from imaging arrays such as CMOS or CCD arrays used in microchip video cameras. Products that could benefit from such filters include digital cameras from point-and-click consumer models to high-end professional models, night vision equipment, digital video cameras including traditional formats and HDTV, video production and transmission equipment, scanners, fax machines, copiers, machine vision systems for manufacturing, medical imaging systems, etc. Analog comb rank filter can be especially beneficial for surveillance cameras operating in real-time under high ISO (low-light or high speed) conditions, as illustrated in FIG. 42.
6.3 Threshold Filter Demodulation
As discussed in §4, Analog Rank Filters can be used for establishing and maintaining the analog control levels of the Threshold Domain Filters. It ensures the adaptivity of the Threshold Domain Filtering to changes in the measurement conditions (e.g., due to nonstationarity of the signal or instrument drift), and thus the optimal separation of the features of interest from the rest of the signal. For example, the threshold level D in the domain =θ[χ(t)−D] θ[{dot over (χ)}(t)] can be established by means of Analog Rank Filters to separate the stationary points of interest from those caused by noise. When used in the present invention, ARFs allow us to reconcile, based on the rank filters' insensitivity to outliers, the conflicting requirements of the robustness and adaptability of the control levels of the Threshold Domain Filtering.
For an illustration, let us consider a method for signal demodulation depicted in FIG. 43. An input signal consisting of one or more components is multiplied by a demodulating signal consisting of one or more components. The product is then filtered by a threshold filter, and the output of the threshold filtering step is passed through a lowpass (time averaging) filter to obtain a demodulated signal.
Sometimes the control level signal(s) of the threshold filter can be set from an a priori knowledge. For example, if a sine wave is modulated by a factor ±α, and then demodulated by another sine wave, then the control level of the threshold filter can be set to zero. In general, however, the control levels of the threshold filter will depend on the modulation scheme/alphabet, and on the conditions of the incoming signal (e.g., its attenuation and the noise level) which typically vary with time. Thus, to obtain the control levels of the threshold filter, one can use an analog rank filter set at the quantile levels corresponding to the fractional values of the various symbols in the modulation alphabet.
Consider, for example, the demodulation depicted in FIGS. 44 and 45. The modulated signal is a mix of sine and cosine waves of frequency f0, each with three amplitude levels maintained during the time intervals N ƒ0−1, N=120 in the example. The modulated signal is affected by an additive random noise with most of its power located in a relatively narrow passband around f0, and the total noise power is about hundred times larger than the signal power. The combined incoming signal is shown in the upper panels of FIGS. 44 and 45. The second and third panels on the top of the figures show the demodulating signal (a sine wave of frequency f0) and the product of the incoming and the demodulating signals, respectively. In typical demodulation, the product is passed through a lowpass filter to obtain the demodulated signal. This is shown in the bottom panel of FIG. 44. One can see that the demodulated signal is significantly different from the ‘ideal’ demodulated signal (gray line) obtained from a noise-free incoming signal.
In FIG. 45, the third panel from the bottom shows the product of the incoming and the demodulating signals (gray line) and the control levels of the threshold filter (solid black lines) obtained as the mean values of the outputs of an analog rank filter with the time window of width approximately 30 N ƒ0−1 (dashed lines). The quantile levels of the filter are set at




  
    
      1
      2
    
    ⁢
    
      q
      1
    
  
  ,
  
    
      q
      1
    
    +
    
      
        1
        2
      
      ⁢
      
        q
        2
      
    
  
  ,








  
    
      q
      1
    
    +
    
      q
      2
    
    +
    
      
        1
        2
      
      ⁢
      
        q
        3
      
    
  
  ,




where q1, q2, and q3 are the average fractions of the modulation levels (each approximately





  1
  3




in the example). The output of the threshold filter (see the second panel from the bottom) is then passed through a lowpass filter to obtain the demodulated signal shown by the black line in the bottom panel. One can see that the signal demodulated in accordance with the present invention is much closer to the ‘ideal’ demodulated signal (gray line) obtained from a noise-free incoming signal than the signal demodulated without the threshold filtering step (bottom panel in FIG. 44).

Articles of Manufacture
Various embodiments of the invention may include hardware, firmware, and software embodiments, that is, may be wholly constructed with hardware components, programmed into firmware, or be implemented in the form of a computer program code.
Still further, the invention disclosed herein may take the form of an article of manufacture. For example, such an article of manufacture can be a computer-usable medium containing a computer-readable code which causes a computer to execute the inventive method.
REFERENCES


    B. C. Arnold, N. Balakrishnan, and H. N. Nagaraja. A First Course in Order Statistics. John Wiley & Sons, Inc., 1992.
    J. S. Bendat. Nonlinear system techniques and applications. Wiley, New York, 1998.
    N. Bleistein and R. A. Handelsman. Asymptotic Expansions of Integrals. Dover, N.Y., 1986.
    A. C. Bovik, T. S. Huang, and Jr. D. C. Munson. A generalization of median filtering using linear combinations of order statistics. IEEE Trans. Acoust., Speech, Signal Processing, ASSP-31:1342-1350, 1983.
    A. S. Davydov. Quantum Mechanics. International Series in Natural Philosophy. Pergamon Press, 2nd edition, 1988. Second Russian Edition published by Nauka, Moscow, 1973.
    P. J. S. G. Ferreira. Sorting continuous-time signals and the analog median filter. IEEE Signal Processing Letters, 7(10):281-283, 2000.
    P. J. S. G. Ferreira. Sorting continuous-time signals: Analog median and median-type filters. IEEE Trans. Signal Processing, 49(11): 2734-2744, November 2001.
    V. Kim and L. Yaroslavsky. Rank algorithms for picture processing. Computer Vision, Graphics and Image Processing, 35:234-258, 1986.
    P. Kinget and M. Steyaert. Analog VLSI integration of massive parallel processing systems. Kluwer, 1997.
    C. L. Lee and C.-W. Jen. Binary partition algorithms and VLSI architectures for median and rank order filtering. IEEE Transactions on Signal Processing, 41(9):2937-2942, 1993.
    C. Mead. Analog VLSI and neural systems. Addison-Wesley, 1989.
    N. R. Murthy and M. N. S. Swamy. On the VLSI implementation of real-time order statistic filters. IEEE Transactions on Signal Processing, 40(5):1241-1252, 1992.
    A. V. Nikitin. Pulse Pileup Effects in Counting Detectors. PhD thesis, University of Kansas, Lawrence, 1998.
    A. V. Nikitin and R. L. Davidchack. Method and apparatus for analysis of variables. Geneva: World Intellectual Property Organization, International Publication Number WO 03/025512, 2003.
    A. V. Nikitin and R. L. Davidchack. Signal analysis through analog representation. Proc. R. Soc. Lond. A, 459 (2033):1171-1192, 2003.
    A. V. Nikitin, R. L. Davidchack, and T. P. Armstrong. The effect of pulse pile-up on threshold crossing rates in a system with a known impulse response. Nucl. Instr. & Meth., A411:159-171, 1998.
    A. V. Nikitin, R. L. Davidchack, and T. P. Armstrong. Analog multivariate counting analyzers. Nucl. Instr. & Meth., A496(2-3):465-480, 2003.
    E. Ochoa, J. P. Allebach, and D. W. Sweeney. Optical median filtering using threshold decomposition. Applied Optics, 26(2):252-260, January 1987.
    I. E. Opris. Analog Rank Extractors and Sorting Networks. Ph.D. Thesis, Stanford University, CA, 1996.
    I. Osorio, M. G. Frei, and S. B. Wilkinson. Real-time automated detection and quantitative analysis of seizures and short-term prediction of clinical onset. Epilepsia, 39(6):615-627, 1998.
    S. Paul and K. Hüper. Analog rank filtering. IEEE Trans. Circuits Syst.—I, 40(7):469-476, July 1993.
    K. Urahama and T. Nagao. Direct analog rank filtering. IEEE Trans. Circuits Syst.—I, 42(7):385-388, July 1995.
    S. Vlassis, K. Doris, S. Siskos, and I. Pitas. Analog implementation of erosion/dilation, median and order statistics filters. Pattern Recognition, 33(6):1023-1032, 2000.

## Claims

1. A method for signal processing, wherein said signal being processed is representative of a physical property, said method operable to transform an input signal into an output signal, comprising the steps of:
a. forming a plurality of comparator outputs of a respective plurality of comparators by passing said input signal and a plurality of feedbacks of Offset Rank Signals through a respective plurality of said comparators, said Offset Rank Signals having Offset Quantile Parameters;
b. forming a weighted difference of said feedbacks of the Offset Rank Signals;
c. forming a plurality of differences between the comparators outputs and the respective Offset Quantile Parameters of said Offset Rank Signals;
d. forming a plurality of time derivatives of said Offset Rank Signals by multiplying each of said plurality of differences by said weighted difference;
e. producing the plurality of said Offset Rank Signals by time-integrating said plurality of time derivatives; and
f. producing said output signal as a weighted average of said Offset Rank Signals.

2. A method for signal processing as recited in claim 1 wherein said comparators are selected from the group consisting of delayed comparators and averaging comparators.

3. A method for signal processing as recited in claim 1 wherein:
a. said comparators are selected from the group consisting of delayed comparators and averaging comparators and said plurality of outputs of said delayed comparators consists of two outputs and said plurality of feedbacks of said Offset Rank Signals consists of two feedbacks and said plurality of said delayed comparators consists of two delayed comparators;
b. said weighted difference is an amplified difference of said two feedbacks;
c. said plurality of differences consists of two differences;
d. said plurality of time derivatives consists of two time derivatives;
e. said plurality of the Offset Rank Signals consists of two Offset Rank Signals; and
f. said weighted average of said Offset Rank Signals is an average of said two Offset Rank Signals.

4. A method for image processing an image, said method operable to transform an input image signal into an output signal, comprising the steps of:
a. forming a plurality of comparator outputs of a respective plurality of comparators by passing said input image signal and a plurality of feedbacks of Offset Rank Signals through a respective plurality of said comparators, said Offset Rank Signals having Offset Quantile Parameters;
b. forming a weighted difference of said feedbacks of the Offset Rank Signals;
c. forming a plurality of differences between the comparator outputs and the respective Offset Quantile Parameters of said Offset Rank Signals;
d. forming a plurality of time derivatives of said Offset Rank Signals by multiplying each of said plurality of differences by said weighted difference;
e. producing the plurality of said Offset Rank Signals by time-integrating said plurality of time derivatives; and
f. producing said output signal as a weighted average of said Offset Rank Signals.

5. A method for image processing as recited in claim 4 wherein said comparators are selected from the group consisting of delayed comparators and averaging comparators.

6. An apparatus for signal processing, wherein said signal being processed is representative of a physical property, said apparatus operable to transform an input signal into an output signal comprising:
a. a plurality of comparators each operable to form an output, thus forming a plurality of outputs by passing said input signal and a plurality of feedbacks of Offset Rank Signals through said plurality of comparators, said Offset Rank Signals having Offset Quantile Parameters;
b. a component operable to form a weighted difference of said feedbacks of the Offset Rank Signals;
c. a component operable to form a plurality of differences between the outputs of said plurality of comparators and the respective Offset Quantile Parameters of said Offset Rank Signals;
d. a component operable to form a plurality of time derivatives of said Offset Rank Signals by multiplying each of said plurality of differences by said weighted difference;
e. a component operable to produce the plurality of said Offset Rank Signals by time-integrating said plurality of time derivatives; and
f. a component operable to produce said output signal as a weighted average of said Offset Rank Signals.

7. An apparatus for signal processing as recited in claim 6 wherein:
a. said comparators are selected from the group consisting of delayed comparators and averaging comparators and said plurality of delayed comparators consists of two delayed comparators and said plurality of outputs consists of two outputs and said plurality of feedbacks of Offset Rank Signals consists of two feedbacks;
b. said weighted difference is an amplified difference of said two feedbacks;
c. said plurality of differences consists of two differences;
d. said plurality of time derivatives consists of two time derivatives;
e. said plurality of the Offset Rank Signals consists of two Offset Rank Signals; and
f. said weighted average of said Offset Rank Signals is an average of said two Offset Rank Signals.