DetectionFilter:

--------------------------------------------------------------------------
   Implement a detection filter for a fully measured system.
   The filter is of the form

   y[k]   = c*x[k]
   x[k+1] = a*x[k] + D*(m[k] - c*x[k]) + b*u[k]

   r[k] = m[k] - c*x[k]

   The initial state must be normalized.

   Since version 9.
--------------------------------------------------------------------------
   Form:
   [r, x] = DetectionFilter( d, m, u, x, xS )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d			        (:)    Detection filter
                              .g      plant
                              .d      gain matrix
                              .uMin   input minimum
                              .uRange input range
                              .yMin   output minimum
                              .yRange output range
                              .xMin   state minimum
                              .xRange state range
   m                    Measurements
   u                    Inputs
   x                    State
   xS                   Static state

   -------
   Outputs
   -------
   r                    Residuals
   x                    State
   xS                   Static state

--------------------------------------------------------------------------
   References:	Meserole, J. S., "Detection Filters for Fault-Tolerant
               Control of Turbofan Engines." MIT 1981.            
--------------------------------------------------------------------------