**Open Ephys Requirements**

The vast majority of neural signals require some form of bandpass filtering to be useful. In general, the DC offset must be removed from signals, along with the high-frequency noise, leaving the actual neural data of interest. The Open Ephys GUI employs a simple 4-pole Butterworth bandpass filter for its filtering. An IIR filter is used because the group delay in the pass-band is lower than that of a FIR filter. For garnering a fast response time, keeping the group delay at a minimum is important. While it is impossible for IIR filters to have a linear phase response, the pass-band response has a relatively linear phase. Creating and optimizing a digital IIR Butterworth bandpass filter that operates on a large number of channels will provide the Open Ephys project with a fast filtering solution for the GUI.

**Filter Setup**

Reasonable digital low-pass and high-pass IIR filters can be designed using only two zeros and two poles. This is commonly known as the digital biquad filter. The difference equation for a digital biquad filter is given below:

And corresponding transfer function:

To create a bandpass filter with tunable low and high cutoff frequencies, we can simply cascade a low-pass and a high-pass filter. Cascading the filters is equivalent to multiplying the frequency responses of the two digital biquads, which creates a transfer function with 4 poles and 4 zeros:

To generate the filter coefficients for a typical bandpass filter for neuroscience experiments, we used MATLAB's Butterworth filter generator with a passband frequency range from 0.1 to 300 Hz and an order of 4:

```
[b,a] = butter(2,[0.1 300]/25000)
```