-
Notifications
You must be signed in to change notification settings - Fork 284
low_pass_filter
#Low Pass Filter
##Description The LowPassFilter class implements a first-order infinite-impulse-response (IIR) low pass filter. The LowPassFilter is part of the Preprocessing Modules.
An example of a signal (sine wave at 0.1Hz, 0.5Hz, 1Hz, 2Hz, 4Hz and 8Hz) filtered using a low pass filter. The cutoff frequency of the filter is set to 2Hz. The red signal is the raw signal and the green signal is the filtered signal. The signal and filtered data was generated using the example code below.
##Advantages
The LowPassFilter is good for removing a small amount of high frequency noise from an N dimensional signal. You can either smooth an N dimensional signal by setting the filterFactor of the filter to a low value (i.e. a filterFactor value of 0.1 will result in a large amount of smoothing), alternatively, if you know the exact frequency of the noise you want to remove from the signal then you can explicitly set the cutoff frequency of the filter (using the setCutoffFrequency(...)
function).
##Disadvantages Given that this filter is only a first-order filter, it may not give you a step enough cutoff frequency for the application you need. If this is the case then you may want to try a Moving Average Filter or Double Moving Average Filter instead.
##Example Low Pass Filter Example