Design Considerations
AN64846 - Getting Started with CapSense
®
Doc. No. 001-64846 Rev. *X
54
3.4 Software Filtering
Software filters are one of the techniques of dealing with high levels of system noise.
that are useful for CapSense.
Table 3-6. CapSense Filter Types
Type
Description
Application
Average
Finite impulse response filter (no feedback) with
equally weighted coefficients
Periodic noise from power supplies
IIR
Infinite impulse response filter (feedback) with a
step response similar to an RC filter
High frequency white noise (1/f noise)
Median
Nonlinear filter that computes median input value
from a buffer of size N
Noise spikes from motors and switching power supplies
Jitter
Nonlinear filter that limits current input based on
previous input
Noise from thick overlay (SNR < 5:1), especially useful for
slider centroid data
Event-Based
Nonlinear filter that causes a predefined response
to a pattern observed in the sensor data
Commonly used to block generation or posting of
nonexistent events
Rule-Based
Nonlinear filter that causes a predefined response
to a pattern observed in the sensor data
Commonly used during normal operation of the touch
surface to respond to special scenarios such as
accidental multi-button selection
3.4.1 Average Filter
An average filter is a finite impulse response (FIR) filter with equal-weighted coefficients. The average filters work well
with periodic noise that is attenuated by spacing the samples out over one noise cycle. Sample spacing is not critical.
For example, power line noise can be anywhere from 50 Hz to 60 Hz. Without adjusting the sampling rate, the average
filter works well for 50-Hz and 60-Hz noise.
shows a sample rate that is synchronized with a simple periodic
waveform. There is no feedback path in this filter.
Figure 3-22. Synchronized Sample Rate
The general equation for an average filter is:
𝑦[𝑖] =
1
𝑁
(𝑥[𝑖] + 𝑥[𝑖 − 1] + ⋯ + 𝑥[𝑖 – 𝑁 + 1])
Equation 15
and
illustrate the results of using an average filter on real CapSense data using the
16-sample filter equation:
𝑦[𝑖] =
1
16
(𝑥[𝑖] + 𝑥[𝑖 − 1] + ⋯ + 𝑥[𝑖 – 15])
Equation 16