# Patent

## Title
Method for optimization of Q-Filter kernel parameters

## Abstract

A Q-Filter is a reconfigurable technique that performs a continuum of linear and nonlinear filtering operations. It is modeled by unique mathematical structure, utilizing a function called the Q-Measure, defined using a set of adjustable kernel parameters to enable efficient hardware and software implementations of a variety of useful, new and conventional, filtering operations. The Q-Measure is based on an extension of the well-known Sugeno λ-Measure. In order to optimize the Q-Filter kernel parameters, the value of an error function is minimized. The error function is based on difference between the filtered signal and target signal, with the target signal being a desired result of filtering.

## Background
FIELD OF THE INVENTION
The present invention relates generally to optimization of filtering techniques, and in particular, to a method for optimal parameter estimation for such filtering techniques.
BACKGROUND OF THE INVENTION
Digital filtering is essential to most signal processing and image applications. There are several existing techniques for filtering, including linear operators such as average filters, weighted average filters, and nonlinear operators such as median filters, weighted median filters, morphological filters, and stack filters. In practice, signal filtering is difficult due to the fact that there are several filtering methods, algorithms, and parameter settings that may be simultaneously utilized. Additionally, it may be difficult discovering the most appropriate sequence of these existing filtering methods. It would be beneficial if a computationally efficient signal processing technique can be realized that represents several conventional linear and nonlinear filters by adjusting a set of parameters. Such a filtering technique would allow for the elimination of expensive sequences of conventional filtering operations. Moreover, from a hardware point of view, it would be desirable to have a unique architecture that can be used to accelerate the execution of different filters. Therefore, a need exists for filtering a signal that is computationally efficient, and allows for the elimination of expensive sequences of conventional filtering operations. There also exists a need for a method and apparatus for optimizing such a filter.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows an n-point window of time series.
FIG. 2 shows the n-point window of time series of FIG. 1 in an ordered state.
FIG. 3 is a block diagram showing the process of optimizing Q-Filter kernel parameters.
FIG. 4 is a flow chart showing the process of optimizing the Q-Filter kernel parameters of FIG. 3.



DETAILED DESCRIPTION OF THE DRAWINGS
In order to address the above-mentioned need, an efficient method for estimating the kernel parameters of a class of nonlinear filters, referred to as Q-Filters is described herein. The Q-Filter is a reconfigurable filtering technique that performs a continuum of linear and nonlinear filtering operations. It is modeled by a mathematical structure, utilizing a function called the Q-Measure, defined using a set of adjustable kernel parameters to enable efficient hardware and software implementations of a variety of useful filtering operations. The Q-Measure is based on an extension of the well-known Sugeno λ-Measure.
In order to optimize the Q-Filter kernel parameters, the value of an error function is minimized. The error function is based on difference between the filtered signal and target signal, with the target signal being a desired result of filtering. Two techniques for minimizing the Q-Filter residual error value R are proposed. The first technique expresses the error value as the difference between Q-Filter filtered signal and the target signal where Q-Filter is a function of λ and f, with optimization of the Q-Filter occurring by calculating ∂R/∂λ and ∂R/∂f, then going through standard mathematical optimization iterations. The second technique expresses the error value as the difference between Q-Filter linear regression model and the target signal. Thus, the error expression is a function of λ, f, α and β (where α and β are linear-regression coefficients). Optimization of the Q-Filter kernel parameters (λ, f, α and β) occurs by calculating ∂R/∂λ, ∂R/∂f ∂R/∂α, and ∂R/∂β, and then going through standard mathematical optimization iterations.
As described in U.S. patent application Ser. No. 10/854836, METHOD AND APPARATUS FOR DIGITAL SIGNAL FILTERING, now U.S. Pat. No. 7,117,128 which is incorporated by reference herein, Q-Filters are particularly appropriate for hardware implementation and can be trained to replace sequences of conventional linear and nonlinear filtering operations. A distinctive characteristic of the Q-Filter is its low computational complexity, which makes it appropriate for intelligent applications running on low-power and small-size devices. Q-Filters can enable efficient implementation of new computational intelligence applications on embedded devices, desktop, or base-station platforms.
The present invention encompasses a method for optimizing parameters in a Q-filter. The method comprises the steps of receiving values for λ, f, and t, and optimizing the filtering operation by minimizing an error function R, wherein R is a function of input signal vector X, λ, f, t; and t*. The variable t* comprises a vector of filtered signals, while variable λ comprises a q-measure scalar parameter value, the variable f comprises a q-measure vector of density generator parameter values, and the variable t comprises a vector of desired target signals.
The present invention additionally encompasses an apparatus comprising a filter parameter optimizer receiving values for λ, f, and t, and optimizing a filtering operation by minimizing an error function R, wherein R is a function of input signal vector X, λ, f, t; and t*, where t* comprises a vector of filtered signals.
As discussed in the '836 application, a class of fuzzy measures are utilized that are identified as q-measures. The q-measures are based on a modification of the Sugeno λ-measure. Prior-art application of the Sugeno λ-measure has determined the fuzzy density first, in order to compute a unique value of the parameter λ. In practice, this is not a plausible strategy since values provided by experts, or obtained using some computations, are at best on an interval scale, with arbitrary position of 1. Therefore, scaling of these numbers is arbitrary, and computing λ from these numbers is then meaningless. The definition for the q-measure, which is a normalization of λ-measures, efficiently solves this critical problem. The q-measure formulation de-correlates λ and the density. As discussed, the Q-Filter is defined as a Choquet integral with respect to a q-measure over a window of observations. By adjusting the Q-Filter kernel parameters, a single Q-Filter can reshape a time series that may require the application of many different conventional filters. The Q-Filter operation can be described below with reference to FIG. 1 and FIG. 2.
As shown in FIG. 1, for an n-point window of a time series (received signal) {hi}, i=1 . . . n, and corresponding Q-Filter density parameters {fi}, the time series are sorted from low to high based on input values (FIG. 2), and the sorted series is marked as {h(i)}, where h(i−1)<h(i)<h(i+1). Because the density parameters {fi} change order due to sorting {hi}, the changed density parameters are marked as {f(i)}. FIG. 1 shows an example window of a time series with 5 points {hi} and its corresponding Q-Filter density parameters {fi}. FIG. 2 is the sorted sequence. For this example, h(1)=h5, h(2)=h1, h(3)=h4, h(4)=h2, and h(5)=h3. Similarly, we have f(1)=f5, f(2)=f1, f(3)=f4, f(4)=f2, and f(5)=f3.
An un-normalized q-measure {Ψi} is then calculated using the λ-rule as follows:

Ψn+1=0  (1.1a)

Ψn=f(n)  (1.1b)

Ψi=f(i)+Ψi+1+λf(i)Ψi+1  (1.1c)

The q-measure {qi} and the q-measure differences {Δqi} are then calculated:

qi=Ψi/Ψ1  (1.2a)

Δqi=qi−qi+1  (1.2b)

The filtered value h from the time series {hi} is then calculated:




  
    
      
        
          h
          _
        
        =
        
          
            
              ∑
              
                i
                =
                1
              
              n
            
            ⁢
            
              
                h
                
                  (
                  i
                  )
                
              
              ⁢
              Δ
              ⁢
              
                
              
              ⁢
              
                q
                i
              
            
          
          =
          
            
              1
              
                ψ
                1
              
            
            ⁢
            
              
                ∑
                
                  i
                  =
                  1
                
                n
              
              ⁢
              
                
                  h
                  
                    (
                    i
                    )
                  
                
                ⁢
                
                  
                    f
                    
                      (
                      i
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      1
                      +
                      
                        λψ
                        
                          i
                          +
                          1
                        
                      
                    
                    )
                  
                
              
            
          
        
      
    
    
      
        (
        1.3
        )
      
    
  




where λε[−1,∞), and fiε[0,1]. Assume that a time series {hi} has m points that are more than the Q-Filter's window size n. Applying the Q-Filter operation by sliding this window through the signal {hi} will generate =m−n+1 processed data points forming a new time series { hi}. Finally, { hi} is the filtered time series of the input series {hi}.

Parameter Optimization

The behavior of the Q-Filter is determined by its window size n, corresponding density generators {fi}, and the parameter λ. Assume that a time series pair {xi, ti} exists, where xi is a noisy signal and ti is the corresponding target signal. Denote x={xi} as the noisy signal vector, and f={fi} as the density generators parameter vector, then the Q-Filter, Q(x, λ, f), is a mapping from {xi} to {ti}, i.e., Q(x, λ, f)→t. By denoting {hi} as {xi}, Equation (1.3) can be rewritten as:




  
    
      
        
          Q
          ⁡
          
            (
            
              x
              ,
              λ
              ,
              f
            
            )
          
        
        =
        
          
            
              ∑
              
                i
                =
                1
              
              n
            
            ⁢
            
              
                x
                
                  (
                  i
                  )
                
              
              ⁢
              Δ
              ⁢
              
                
              
              ⁢
              
                q
                i
              
            
          
          =
          
            
              1
              
                ψ
                1
              
            
            ⁢
            
              
                ∑
                
                  i
                  =
                  1
                
                n
              
              ⁢
              
                
                  x
                  
                    (
                    i
                    )
                  
                
                ⁢
                
                  
                    f
                    
                      (
                      i
                      )
                    
                  
                  ⁡
                  
                    (
                    
                      1
                      +
                      
                        λψ
                        
                          i
                          +
                          1
                        
                      
                    
                    )
                  
                
              
            
          
        
      
    
    
      
        (
        1.4
        )
      
    
  




Assume that the window size n of a Q-Filter is an odd-number, i.e., n=2k+1, k>0; an input noisy signal series xk=(x0, . . . , xk−1, xk, xk+1, . . . , x2k) is going to be filtered toward a target signal tk. For a series of noisy signals {xk} and the corresponding target signals {tk}, the filtered signals can be expressed as:

t*k=Q(xk,λ,f)  (1.5)

The corresponding root-mean-square (RMS) error function can be expressed as:





  
    
      
        R
        =
        
          
            
              1
              
                2
                ⁢
                M
              
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  1
                
                M
              
              ⁢
              
                
                  (
                  
                    
                      t
                      k
                      *
                    
                    -
                    
                      t
                      k
                    
                  
                  )
                
                2
              
            
          
          =
          
            
              1
              
                2
                ⁢
                M
              
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  1
                
                M
              
              ⁢
              
                
                  (
                  
                    
                      Q
                      ⁡
                      
                        (
                        
                          
                            x
                            k
                          
                          ,
                          λ
                          ,
                          f
                        
                        )
                      
                    
                    -
                    
                      t
                      k
                    
                  
                  )
                
                2
              
            
          
        
      
    
    
      
        (
        1.6
        )
      
    
  




where M is the number of training samples, i.e., number of n-point windows over the noisy input signal series. The derivative of the residual error function, i.e., Equation (1.5), can be expressed as,





  
    
      
        
          
            ∂
            R
          
          
            ∂
            λ
          
        
        =
        
          
            1
            M
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              
                (
                
                  
                    Q
                    k
                  
                  -
                  
                    t
                    k
                  
                
                )
              
              ⁢
              
                
                  ∂
                  
                    Q
                    k
                  
                
                
                  ∂
                  λ
                
              
            
          
        
      
    
    
      
        (
        
          1.7
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            ∂
            R
          
          
            ∂
            
              f
              i
            
          
        
        =
        
          
            1
            M
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              
                (
                
                  
                    Q
                    k
                  
                  -
                  
                    t
                    k
                  
                
                )
              
              ⁢
              
                
                  ∂
                  
                    Q
                    k
                  
                
                
                  ∂
                  
                    f
                    i
                  
                
              
            
          
        
      
    
    
      
        (
        
          1.7
          ⁢
          b
        
        )
      
    
  




where, Qk=Q(xk,λ,f); and





  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      λ
    
  
  ,
  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      
        f
        i
      
    
  




can be calculated numerically as,





  
    
      
        
          
            ∂
            
              Q
              k
            
          
          
            ∂
            λ
          
        
        =
        
          
            
              
                Q
                k
              
              ⁡
              
                (
                
                  λ
                  +
                  Δλ
                
                )
              
            
            -
            
              
                Q
                k
              
              ⁡
              
                (
                λ
                )
              
            
          
          Δλ
        
      
    
    
      
        (
        
          1.8
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            ∂
            
              Q
              k
            
          
          
            ∂
            
              f
              i
            
          
        
        =
        
          
            
              
                Q
                k
              
              ⁡
              
                (
                
                  
                    f
                    i
                  
                  +
                  
                    Δ
                    ⁢
                    
                      
                    
                    ⁢
                    
                      f
                      i
                    
                  
                
                )
              
            
            -
            
              
                Q
                k
              
              ⁡
              
                (
                f
                )
              
            
          
          
            Δ
            ⁢
            
              
            
            ⁢
            
              f
              i
            
          
        
      
    
    
      
        (
        
          1.8
          ⁢
          b
        
        )
      
    
  




Thus, for a given window size n, the Q-Filter can be optimized by minimizing Equation (1.6) through optimized λ and f.
Regression Model
From Equations (1.1a-c), the un-normalized q-measure {Ψi} is monotonic, i.e., Ψ1≧Ψ2≧ . . . ≧Ψn+1=0. Thus, the q-measure {qi} and its differences {Δqi}, i.e., Equations (1.2a-b), due to the constant normalization, have the properties 1=q1≧q2≧ . . . ≧qn+1=0 and




  
    
      
        
          
            ∑
            
              i
              =
              1
            
            n
          
          ⁢
          
            Δ
            ⁢
            
              
            
            ⁢
            
              q
              i
            
          
        
        =
        1
      
    
    
      
        (
        
          2.1
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            q
            i
          
        
        ≥
        0
      
    
    
      
        (
        
          2.1
          ⁢
          b
        
        )
      
    
  




From Equation (1.4) and (1.5), we have





  
    
      
        
          t
          *
        
        =
        
          
            Q
            ⁡
            
              (
              
                x
                ,
                λ
                ,
                f
              
              )
            
          
          =
          
            
              
                ∑
                
                  i
                  =
                  1
                
                n
              
              ⁢
              
                
                  x
                  
                    (
                    i
                    )
                  
                
                ⁢
                Δ
                ⁢
                
                  
                
                ⁢
                
                  q
                  i
                
              
            
            =
            
              
                1
                
                  ψ
                  1
                
              
              ⁢
              
                
                  ∑
                  
                    i
                    =
                    1
                  
                  n
                
                ⁢
                
                  
                    x
                    
                      (
                      i
                      )
                    
                  
                  ⁢
                  
                    
                      f
                      
                        (
                        i
                        )
                      
                    
                    ⁡
                    
                      (
                      
                        1
                        +
                        
                          λψ
                          
                            i
                            +
                            1
                          
                        
                      
                      )
                    
                  
                
              
            
          
        
      
    
    
      
        (
        2.2
        )
      
    
  




We can see that the filtered value is bounded as t*ε[min{xi}, max{xi}]. But, the target signals {tk} may not be in the same range as {t*k} for the application of concern.
Equation (1.4) would have to be scaled to reflect the difference between the observation and their corresponding target values. Thus, a linear-regression modification of Equations (1.5) and (1.6) can be expressed as:




  
    
      
        
          t
          k
          *
        
        =
        
          
            α
            ⁢
            
              
            
            ⁢
            
              Q
              ⁡
              
                (
                
                  
                    x
                    k
                  
                  ,
                  λ
                  ,
                  f
                
                )
              
            
          
          +
          β
        
      
    
    
      
        (
        2.3
        )
      
    
  
  
    
      
        R
        =
        
          
            1
            
              2
              ⁢
              M
            
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              
                (
                
                  
                    α
                    ⁢
                    
                      
                    
                    ⁢
                    
                      Q
                      ⁡
                      
                        (
                        
                          
                            x
                            k
                          
                          ,
                          λ
                          ,
                          f
                        
                        )
                      
                    
                  
                  +
                  β
                  -
                  
                    t
                    k
                  
                
                )
              
              2
            
          
        
      
    
    
      
        (
        2.4
        )
      
    
  




where α and β are linear-regression coefficients which can be derived from Equation (2.4) as:





  
    
      
        
          
            ∂
            R
          
          
            ∂
            α
          
        
        =
        
          
            
              1
              M
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  1
                
                M
              
              ⁢
              
                
                  (
                  
                    
                      α
                      ⁢
                      
                        
                      
                      ⁢
                      
                        Q
                        k
                      
                    
                    +
                    β
                    -
                    
                      t
                      k
                    
                  
                  )
                
                ⁢
                
                  Q
                  k
                
              
            
          
          =
          0
        
      
    
    
      
        (
        
          2.5
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            ∂
            R
          
          
            ∂
            β
          
        
        =
        
          
            
              1
              M
            
            ⁢
            
              
                ∑
                
                  k
                  =
                  1
                
                M
              
              ⁢
              
                (
                
                  
                    α
                    ⁢
                    
                      
                    
                    ⁢
                    
                      Q
                      k
                    
                  
                  +
                  β
                  -
                  
                    t
                    k
                  
                
                )
              
            
          
          =
          0
        
      
    
    
      
        (
        
          2.5
          ⁢
          b
        
        )
      
    
  




where Qk=Q(xk, λ, f). Now Let,





  
    
      
        A
        =
        
          
            ∑
            
              k
              =
              1
            
            M
          
          ⁢
          
            Q
            k
            2
          
        
      
    
    
      
        (
        
          2.6
          ⁢
          a
        
        )
      
    
  
  
    
      
        B
        =
        
          
            ∑
            
              k
              =
              1
            
            M
          
          ⁢
          
            Q
            k
          
        
      
    
    
      
        (
        
          2.6
          ⁢
          b
        
        )
      
    
  
  
    
      
        C
        =
        
          
            ∑
            
              k
              =
              1
            
            M
          
          ⁢
          
            t
            k
          
        
      
    
    
      
        (
        
          2.6
          ⁢
          c
        
        )
      
    
  
  
    
      
        D
        =
        
          
            ∑
            
              k
              =
              1
            
            M
          
          ⁢
          
            
              Q
              k
            
            ⁢
            
              t
              k
            
          
        
      
    
    
      
        (
        
          2.6
          ⁢
          d
        
        )
      
    
  




Then we have:





  
    
      
        {
        
          
            
              
                α
                =
                
                  
                    
                      N
                      ·
                      D
                    
                    -
                    
                      C
                      ·
                      B
                    
                  
                  
                    
                      N
                      ·
                      A
                    
                    -
                    
                      B
                      ·
                      B
                    
                  
                
              
            
          
          
            
              
                β
                =
                
                  
                    
                      C
                      ·
                      A
                    
                    -
                    
                      B
                      ·
                      D
                    
                  
                  
                    
                      N
                      ·
                      A
                    
                    -
                    
                      B
                      ·
                      B
                    
                  
                
              
            
          
        
      
    
    
      
        (
        2.7
        )
      
    
  




The above discussion suggests that one would first use the Q-Filter parameter optimization equations (1.5), (1.6), and (1.7a-b) to find optimized values for λ and f, then use Equations (2.6a-d) and (2.7) to find the values for α and β, so that the final filtered results given by Equations (2.3) and (2.4) would be superior to equations (1.5) and (1.6). Finding optimized values for λ and f takes place by finding a localized minimum values for λ and f by setting equations 1.6a and 1.6b equal to zero and solving for λ and f, respectively. Once values for λ and f are known, optimized values for α and β are determined by setting equations 2.5a and 2.5b equal to zero and solving for α and β.
It may be desired to minimize the residual error of the linear regression objective function given by Equation (2.4) directly without first minimizing λ and f then α and β. Derivatives of the equation on λ and f should also be considered as follows:




  
    
      
        
          
            ∂
            R
          
          
            ∂
            λ
          
        
        =
        
          
            1
            M
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              
                (
                
                  
                    Q
                    k
                  
                  -
                  
                    t
                    k
                  
                
                )
              
              ⁢
              
                
                  ∂
                  
                    Q
                    k
                  
                
                
                  ∂
                  λ
                
              
            
          
        
      
    
    
      
        (
        
          2.8
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            ∂
            R
          
          
            ∂
            
              f
              i
            
          
        
        =
        
          
            1
            M
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              
                (
                
                  
                    Q
                    k
                  
                  -
                  
                    t
                    k
                  
                
                )
              
              ⁢
              
                
                  ∂
                  
                    Q
                    k
                  
                
                
                  ∂
                  
                    f
                    i
                  
                
              
            
          
        
      
    
    
      
        (
        
          2.8
          ⁢
          b
        
        )
      
    
  
  
    
      
        
          
            ∂
            R
          
          
            ∂
            α
          
        
        =
        
          
            1
            M
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              
                (
                
                  
                    α
                    ⁢
                    
                      
                    
                    ⁢
                    
                      Q
                      k
                    
                  
                  +
                  β
                  -
                  
                    t
                    k
                  
                
                )
              
              ⁢
              
                
              
              ⁢
              
                Q
                k
              
            
          
        
      
    
    
      
        (
        
          2.8
          ⁢
          c
        
        )
      
    
  
  
    
      
        
          
            ∂
            R
          
          
            ∂
            β
          
        
        =
        
          
            1
            M
          
          ⁢
          
            
              ∑
              
                k
                =
                1
              
              M
            
            ⁢
            
              (
              
                
                  α
                  ⁢
                  
                    
                  
                  ⁢
                  
                    Q
                    k
                  
                
                +
                β
                -
                
                  t
                  k
                
              
              )
            
          
        
      
    
    
      
        (
        
          2.8
          ⁢
          d
        
        )
      
    
  




Several standard mathematical optimization algorithms exit that use first-order derivatives. The simplest way to minimize the residual error, i.e., Equation (2.4), may be to use the standard steepest descendent method, such as:




  
    min
    ⁢
    
      
    
    ⁢
    R
  
  =
  
    
      1
      
        2
        ⁢
        N
      
    
    ⁢
    
      
        ∑
        
          k
          =
          1
        
        N
      
      ⁢
      
        
          (
          
            
              α
              ⁢
              
                
              
              ⁢
              Q
              ⁢
              
                
              
              ⁢
              
                (
                
                  
                    x
                    k
                  
                  ,
                  λ
                  ,
                  f
                
                )
              
            
            +
            β
            -
            
              t
              k
            
          
          )
        
        2
      
    
  




by iteration:





  
    
      
        
          α
          *
        
        =
        
          α
          -
          
            η
            ⁢
            
              
                ∂
                R
              
              
                ∂
                α
              
            
            ⁢
            Δ
            ⁢
            
              
            
            ⁢
            α
          
        
      
    
    
      
        (
        
          2.9
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          β
          *
        
        =
        
          β
          -
          
            η
            ⁢
            
              
                ∂
                R
              
              
                ∂
                β
              
            
            ⁢
            Δ
            ⁢
            
              
            
            ⁢
            β
          
        
      
    
    
      
        (
        
          2.9
          ⁢
          b
        
        )
      
    
  
  
    
      
        
          
            λ
            *
          
          =
          
            λ
            -
            
              η
              ⁢
              
                
                  ∂
                  R
                
                
                  ∂
                  λ
                
              
              ⁢
              Δλ
            
          
        
        ,
        
          λ
          ≥
          
            -
            1
          
        
      
    
    
      
        (
        
          2.9
          ⁢
          c
        
        )
      
    
  
  
    
      
        
          
            f
            i
            *
          
          =
          
            
              f
              i
            
            -
            
              η
              ⁢
              
                
                  ∂
                  R
                
                
                  ∂
                  
                    f
                    i
                  
                
              
              ⁢
              Δ
              ⁢
              
                
              
              ⁢
              
                f
                i
              
            
          
        
        ,
        
          
            f
            i
          
          ∈
          
            [
            
              0
              ,
              1
            
            ]
          
        
      
    
    
      
        (
        
          2.9
          ⁢
          d
        
        )
      
    
  




where η is a constant step length, e.g., η=0.1.α, β, λ, and fi are the current value of the variables. Δα, Δβ, Δλ, and Δfi are the step changes for the correspondent variables, and they could be at 1 ̃5% of the value of the current variables and no less than 0.001. The updated α*, β*, λ*, and f*i are the values for the next iteration. Initial value of α, β, λ, and fi could be set as: α=1, β=0, λ=1, and fi=0.5. Those step length, step changes, and initial values may vary depending on different optimization algorithms and signal filtering problems.

FIG. 3 is a block diagram of filter 300. Filter 300 comprises Q-Filter 301 and parameter optimizer 302. Both Q-filter 301 and parameter optimizer 302 preferably comprise logic circuitry such as a microprocessor/controller. As shown, filter 301 comprises an input receiving a signal X to be filtered, an input receiving variable parameter λ, and an input receiving a density generator vector f={f1, f2, . . . , fn}. Optionally, filter 301 may have α and β for inputs. As shown, parameter optimizer 302 receives α, β, λ, fi, t, and t* and determines Δα, Δβ, Δλ, and Δfi. Where t is desired output signal and t* is filtered signal. Values for α*, β*, λ*, and f*i are output to Q-filter 301 and used to produce t*. During operation of Q-filter 301, the input signal series X={x1, x2, . . . , xn}, is input into the Q-Filter 301 with t* being the output computed as an filtered value of the given input. More particularly, during operation the Q-Filter can utilize logic circuitry (e.g., a microprocessor controller) and memory components to construct a q-measure based on the variable parameter λ and vector f, and outputs a filtered signal based on the q-measure.
FIG. 4 is a flow chart showing operation of parameter optimizer 302. The logic flow begins at step 401 where values for α, β, λ, f, t, and t* are received by parameter optimizer 302. At step 403 parameter optimizer calculated updated values α*, β*, λ*, and f* and outputs these values to Q-Filter 301 (step 405). As discussed, in a first embodiment, the values for α*, β*, λ*, and f* are determined by minimizing Equation (1.6) through optimized λ and f, and in a second embodiment the values for α*, β*, λ*, and f*, are determined via equations 2.9a-d by minimizing Equation (2.4).
While the invention has been particularly shown and described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details (e.g., depending on the dimensionality of the input signal) may be made therein without departing from the spirit and scope of the invention. It is intended that such changes come within the scope of the following claims.

## Claims

1. A method for filtering a signal using a Q-filter, the method comprising the steps of:
receiving with a microprocessor, values for λ, f, and t, wherein λ comprises a q-measure scalar parameter value, f comprises a q-measure vector of density generator parameter values, t comprises a vector of desired target signals; and
optimizing via the microprocessor filtering parameters by minimizing an error function R, wherein R is a function of input signal vector X, λ, f, t; and t*, where t* comprises a vector of filtered signals; and
filtering via the microprocessor the signal using the optimized filter parameters.

2. The method of claim 1 wherein R is an average squared error of (t-t*).

3. The method of claim 1 wherein the step of minimizing R(X, λ, f, t, t*) comprises the step of finding values for ∂R/∂λ and ∂R/∂f, where




  
    R
    =
    
      
        1
        
          2
          ⁢
          M
        
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          M
        
        ⁢
        
          
            (
            
              
                Q
                ⁢
                
                  
                
                ⁢
                
                  (
                  
                    
                      x
                      k
                    
                    ,
                    λ
                    ,
                    f
                  
                  )
                
              
              -
              
                t
                k
              
            
            )
          
          2
        
      
    
  
  ,




and M is a number of training samples.

4. The method of claim 3 wherein:



  
    
      
        ∂
        R
      
      
        ∂
        λ
      
    
    =
    
      
        1
        M
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          M
        
        ⁢
        
          
            (
            
              
                Q
                k
              
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              λ
            
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        1
        M
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          M
        
        ⁢
        
          
            (
            
              
                Q
                k
              
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              
                f
                i
              
            
          
        
      
    
  



wherein, Qk=Q(xk, λ, f); and




  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      λ
    
  
  ,
  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      
        f
        i
      
    
  




can be calculated numerically as,



  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        λ
      
    
    =
    
      
        
          
            Q
            k
          
          ⁡
          
            (
            
              λ
              +
              Δλ
            
            )
          
        
        -
        
          
            Q
            k
          
          ⁡
          
            (
            λ
            )
          
        
      
      Δλ
    
  




  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        
          
            
              Q
              k
            
            ⁡
            
              (
              
                
                  f
                  i
                
                +
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    f
                    i
                  
                
              
              )
            
          
          -
          
            
              Q
              k
            
            ⁡
            
              (
              f
              )
            
          
        
        
          Δ
          ⁢
          
            
          
          ⁢
          
            f
            i
          
        
      
      .

5. The method of claim 4 wherein:




  
    
      Q
      ⁢
      
        
      
      ⁢
      
        (
        
          x
          ,
          λ
          ,
          f
        
        )
      
    
    =
    
      
        
          ∑
          
            i
            =
            1
          
          n
        
        ⁢
        
          
            x
            
              (
              i
              )
            
          
          ⁢
          Δ
          ⁢
          
            
          
          ⁢
          
            q
            i
          
        
      
      =
      
        
          1
          
            ψ
            1
          
        
        ⁢
        
          
            ∑
            
              i
              =
              1
            
            n
          
          ⁢
          
            
              x
              
                (
                i
                )
              
            
            ⁢
            
              
                f
                
                  (
                  i
                  )
                
              
              ⁡
              
                (
                
                  1
                  +
                  
                    λψ
                    
                      i
                      +
                      1
                    
                  
                
                )
              
            
          
        
      
    
  
  ,




and
wherein n is a window size of the Q-Filter; x(i) is a sorted sequence of xi, so that x(1)≦x(2). . . ≦x(n);and Ψi are computed recursively for i=n+1, n, . . . , 1, as follows:


Ψn+1=0



Ψn=f(n) 



Ψi=f(i)+Ψi+1+λf(i)Ψi+1.

6. The method of claim 1 further comprising the step of:
receiving via the microprocessor linear-regression coefficients for α and β; and
wherein the step of optimizing comprises the step of minimizing R wherein R is a function of α, β, X, λ, f, t and t*.

7. The method of claim 6 wherein the step of minimizing R(α, β, X, λ, f, t)
comprises the step of finding values for ∂R/∂λ and ∂R/∂f, ∂R/∂α, and ∂R/∂β, where




  R
  =
  
    
      1
      
        2
        ⁢
        M
      
    
    ⁢
    
      
        ∑
        
          k
          =
          1
        
        M
      
      ⁢
      
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                Q
                ⁢
                
                  
                
                ⁢
                
                  (
                  
                    
                      x
                      k
                    
                    ,
                    λ
                    ,
                    f
                  
                  )
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          2
        
        .

8. The method of claim 7 wherein:



  
    
      
        ∂
        R
      
      
        ∂
        λ
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                
                  Q
                  k
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
          
          ⁢
          α
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              λ
            
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                
                  Q
                  k
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
          
          ⁢
          α
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              
                f
                i
              
            
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        α
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                
                  Q
                  k
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
          
          ⁢
          
            Q
            k
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        β
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          (
          
            
              α
              ⁢
              
                
              
              ⁢
              
                Q
                k
              
            
            +
            β
            -
            
              t
              k
            
          
          )
        
      
    
  



wherein, Qk=Q(xk, λ, f); and




  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      λ
    
  
  ,
  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      
        f
        i
      
    
  




can be calculated numerically as,



  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        λ
      
    
    =
    
      
        
          
            Q
            k
          
          ⁡
          
            (
            
              λ
              +
              Δλ
            
            )
          
        
        -
        
          
            Q
            k
          
          ⁡
          
            (
            λ
            )
          
        
      
      Δλ
    
  




  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        
          
            
              Q
              k
            
            ⁡
            
              (
              
                
                  f
                  i
                
                +
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    f
                    i
                  
                
              
              )
            
          
          -
          
            
              Q
              k
            
            ⁡
            
              (
              f
              )
            
          
        
        
          Δ
          ⁢
          
            
          
          ⁢
          
            f
            i
          
        
      
      .

9. The method of claim 8 wherein:




  
    Q
    ⁢
    
      
    
    ⁢
    
      (
      
        x
        ,
        λ
        ,
        f
      
      )
    
  
  =
  
    
      
        ∑
        
          i
          =
          1
        
        n
      
      ⁢
      
        
          x
          
            (
            i
            )
          
        
        ⁢
        Δ
        ⁢
        
          
        
        ⁢
        
          q
          i
        
      
    
    =
    
      
        1
        
          ψ
          1
        
      
      ⁢
      
        
          ∑
          
            t
            =
            1
          
          n
        
        ⁢
        
          
            x
            
              (
              i
              )
            
          
          ⁢
          
            
              f
              
                (
                i
                )
              
            
            ⁡
            
              (
              
                1
                +
                
                  λψ
                  
                    i
                    +
                    1
                  
                
              
              )
            
          
        
      
    
  




wherein n is the window size of the Q-Filter; x(i) is a sorted sequence of xi, so that x(1)≦x(2). . .≦x(n); and Ψi are computed recursively for i=n+1, n, . . . , 1, as follows:


Ψn+1=0



Ψn=f(n) 



Ψi=f(i)+Ψi+1+λf(i)Ψi+1.

10. An apparatus comprising:
a microprocessor configured for receiving values for λ, f, and t, wherein λ comprises a q-measure scalar parameter value, f comprises a q-measure vector of density generator parameter values, t comprises a vector of desired target signals, the microprocessor also configured for optimizing filter parameters by minimizing an error function R, wherein R is a function of input signal vector X, λ, f, t; and t*, where t* comprises a vector of filtered signals; and
a filter coupled to the filter parameter optimizer for filtering a signal using the optimized filter parameters.

11. The apparatus of claim 10 wherein R is an average squared error of (t-t*).

12. The apparatus of claim 10 wherein the minimizing of R(X, λ, f, t, t*) takes place by finding local minimum of ∂R/∂λ and ∂R/∂f, where




  
    R
    =
    
      
        1
        
          2
          ⁢
          M
        
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          M
        
        ⁢
        
          
            (
            
              
                Q
                ⁢
                
                  
                
                ⁢
                
                  (
                  
                    
                      x
                      k
                    
                    ,
                    λ
                    ,
                    f
                  
                  )
                
              
              -
              
                t
                k
              
            
            )
          
          2
        
      
    
  
  ,




and M is a number of training samples.

13. The apparatus of claim 12 wherein:



  
    
      
        ∂
        R
      
      
        ∂
        λ
      
    
    =
    
      
        1
        M
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          M
        
        ⁢
        
          
            (
            
              
                Q
                k
              
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              λ
            
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        1
        M
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          M
        
        ⁢
        
          
            (
            
              
                Q
                k
              
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              
                f
                i
              
            
          
        
      
    
  



wherein, Qk=Q(xk, λ, f); and




  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      λ
    
  
  ,
  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      
        f
        i
      
    
  




can be calculated numerically as,



  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        λ
      
    
    =
    
      
        
          
            Q
            k
          
          ⁡
          
            (
            
              λ
              +
              Δλ
            
            )
          
        
        -
        
          
            Q
            k
          
          ⁡
          
            (
            λ
            )
          
        
      
      Δλ
    
  




  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        
          
            
              Q
              k
            
            ⁡
            
              (
              
                
                  f
                  i
                
                +
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    f
                    i
                  
                
              
              )
            
          
          -
          
            
              Q
              k
            
            ⁡
            
              (
              f
              )
            
          
        
        
          Δ
          ⁢
          
            
          
          ⁢
          
            f
            i
          
        
      
      .

14. The apparatus of claim 13 wherein:




  
    
      Q
      ⁢
      
        
      
      ⁢
      
        (
        
          x
          ,
          λ
          ,
          f
        
        )
      
    
    =
    
      
        
          ∑
          
            i
            =
            1
          
          n
        
        ⁢
        
          
            x
            
              (
              i
              )
            
          
          ⁢
          Δ
          ⁢
          
            
          
          ⁢
          
            q
            i
          
        
      
      =
      
        
          1
          
            ψ
            1
          
        
        ⁢
        
          
            ∑
            
              i
              =
              1
            
            n
          
          ⁢
          
            
              x
              
                (
                i
                )
              
            
            ⁢
            
              
                f
                
                  (
                  i
                  )
                
              
              ⁡
              
                (
                
                  1
                  +
                  
                    λψ
                    
                      i
                      +
                      1
                    
                  
                
                )
              
            
          
        
      
    
  
  ,




and
wherein n is a window size of the Q-Filter; x(i) is a sorted sequence of xi, so that x(1)≦x(2). . . ≦x(n); and Ψi are computed recursively for i=n+1, n, . . . , 1, as follows:


Ψn+1=0



Ψn=f(n) 



Ψi=f(i)+Ψi+1+λf(i)Ψi+1.

15. The apparatus of claim 10 wherein the microprocessor configured for receives linear-regression coefficients for α and β and minimizes R wherein R is a function of α, β, X, λ, f, t and t*.

16. The apparatus of claim 15 wherein R(α, β, X, λ, f, t) is minimized by finding local minimum for ∂R/∂λ and ∂R/∂f, ∂R/∂α, and ∂R/∂β, where




  R
  =
  
    
      1
      
        2
        ⁢
        M
      
    
    ⁢
    
      
        ∑
        
          k
          =
          1
        
        M
      
      ⁢
      
        
          
            (
            
              
                aQ
                ⁡
                
                  (
                  
                    
                      x
                      k
                    
                    ,
                    λ
                    ,
                    f
                  
                  )
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          2
        
        .

17. The apparatus of claim 16 wherein:



  
    
      
        ∂
        R
      
      
        ∂
        λ
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                
                  Q
                  k
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          ⁢
          α
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              λ
            
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                
                  Q
                  k
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          ⁢
          α
          ⁢
          
            
              ∂
              
                Q
                k
              
            
            
              ∂
              
                f
                i
              
            
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        α
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          
            (
            
              
                α
                ⁢
                
                  
                
                ⁢
                
                  Q
                  k
                
              
              +
              β
              -
              
                t
                k
              
            
            )
          
          ⁢
          
            Q
            k
          
        
      
    
  




  
    
      
        ∂
        R
      
      
        ∂
        β
      
    
    =
    
      
        1
        N
      
      ⁢
      
        
          ∑
          
            k
            =
            1
          
          N
        
        ⁢
        
          (
          
            
              α
              ⁢
              
                
              
              ⁢
              
                Q
                k
              
            
            +
            β
            -
            
              t
              k
            
          
          )
        
      
    
  



wherein, Qk=Q(xk, λ, f); and




  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      λ
    
  
  ,
  
    
      ∂
      
        Q
        k
      
    
    
      ∂
      
        f
        i
      
    
  




can be calculated numerically as,



  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        λ
      
    
    =
    
      
        
          
            Q
            k
          
          ⁡
          
            (
            
              λ
              +
              
                Δ
                ⁢
                
                  
                
                ⁢
                λ
              
            
            )
          
        
        -
        
          
            Q
            k
          
          ⁡
          
            (
            λ
            )
          
        
      
      
        Δ
        ⁢
        
          
        
        ⁢
        λ
      
    
  




  
    
      
        ∂
        
          Q
          k
        
      
      
        ∂
        
          f
          i
        
      
    
    =
    
      
        
          
            
              Q
              k
            
            ⁡
            
              (
              
                
                  f
                  i
                
                +
                
                  Δ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    f
                    i
                  
                
              
              )
            
          
          -
          
            
              Q
              k
            
            ⁡
            
              (
              f
              )
            
          
        
        
          Δ
          ⁢
          
            
          
          ⁢
          
            f
            i
          
        
      
      .

18. The apparatus of claim 17 wherein:




  
    Q
    ⁡
    
      (
      
        x
        ,
        λ
        ,
        f
      
      )
    
  
  =
  
    
      
        ∑
        
          i
          =
          1
        
        n
      
      ⁢
      
        
          x
          
            (
            i
            )
          
        
        ⁢
        Δ
        ⁢
        
          
        
        ⁢
        
          q
          i
        
      
    
    =
    
      
        1
        
          ψ
          1
        
      
      ⁢
      
        
          ∑
          
            i
            =
            1
          
          n
        
        ⁢
        
          
            x
            
              (
              i
              )
            
          
          ⁢
          
            
              f
              
                (
                i
                )
              
            
            ⁡
            
              (
              
                1
                +
                
                  λ
                  ⁢
                  
                    
                  
                  ⁢
                  
                    ψ
                    
                      i
                      +
                      1
                    
                  
                
              
              )
            
          
        
      
    
  




wherein n is the window size of the Q-Filter; x(i) is a sorted sequence of xi, so that x(1)≦x(2). . . ≦x(n); and Ψi are computed recursively for i=n+1, n, . . . , 1, as follows:


Ψn+1=0



Ψn=f(n) 



Ψi=f(i)+Ψi+1+λf(i)Ψi+1.