jAER project on SourceForge

net.sf.jaer.util.filter
Class BandpassFilter

java.lang.Object
  extended by net.sf.jaer.util.filter.Filter
      extended by net.sf.jaer.util.filter.BandpassFilter

public class BandpassFilter
extends Filter

A first-order bandpass IIR filter based on a series of first lowpass and then highpass.


Field Summary
 
Fields inherited from class net.sf.jaer.util.filter.Filter
initialized, lastTime, tauMs, TICK_PER_MS
 
Constructor Summary
BandpassFilter()
          Creates a new instance of BandpassFilter with defaults time constant values.
BandpassFilter(float tauLowMs, float tauHighMs)
          Create a new instance of BandpassFilter with specified low and high pass filter time constants.
 
Method Summary
 float filter(float val, int time)
          Filters the incoming signal according to /br float ret= hpFilter.filter(lpFilter.filter(val,time),time);
 float get3dBCornerFrequencyHz()
           
 float get3dBPoleFrequencyHz()
           
 float getTauMsHigh()
           
 float getTauMsLow()
           
 float getValue()
           
 void set3dBCornerFrequencyHz(float hz)
          Set the highpass corner frequency
 void set3dBPoleFrequencyHz(float hz)
          Set the lowpass (rolloff) corner frequency
 void setInternalValue(float value)
          Sets the internal value for initializing the filter
 void setTauMsHigh(float tauMsHigh)
          Sets the highpass time constant
 void setTauMsLow(float tauMsLow)
          Sets the lowpass time constant
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jaer.util.filter.Filter
get3dBFreqHz, getLastTime, getTauMs, set3dBFreqHz, setTauMs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BandpassFilter

public BandpassFilter()
Creates a new instance of BandpassFilter with defaults time constant values.


BandpassFilter

public BandpassFilter(float tauLowMs,
                      float tauHighMs)
Create a new instance of BandpassFilter with specified low and high pass filter time constants.

Parameters:
tauLowMs - the averaging time in ms.
tauHighMs - the forgetting time in ms.
Method Detail

filter

public float filter(float val,
                    int time)
Filters the incoming signal according to /br float ret= hpFilter.filter(lpFilter.filter(val,time),time);

Parameters:
val - the incoming sample
time - the time of the sample in us
Returns:
the filter output value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTauMsLow

public float getTauMsLow()

setTauMsLow

public void setTauMsLow(float tauMsLow)
Sets the lowpass time constant

Parameters:
tauMsLow - time constant in ms

getTauMsHigh

public float getTauMsHigh()

setTauMsHigh

public void setTauMsHigh(float tauMsHigh)
Sets the highpass time constant

Parameters:
tauMsHigh - the time constant of the highpass

setInternalValue

public void setInternalValue(float value)
Description copied from class: Filter
Sets the internal value for initializing the filter

Parameters:
value - the value

getValue

public float getValue()
Returns:
present value of output of filter

set3dBCornerFrequencyHz

public void set3dBCornerFrequencyHz(float hz)
Set the highpass corner frequency

Parameters:
hz - the frequency in Hz

set3dBPoleFrequencyHz

public void set3dBPoleFrequencyHz(float hz)
Set the lowpass (rolloff) corner frequency

Parameters:
hz - the frequency in Hz

get3dBCornerFrequencyHz

public float get3dBCornerFrequencyHz()

get3dBPoleFrequencyHz

public float get3dBPoleFrequencyHz()

jAER project on SourceForge