Analog filtering Intan chip

95 views
Skip to first unread message

Simon Nougaret

unread,
Jan 17, 2024, 10:24:59 AM1/17/24
to Open Ephys
Dear Open Ephys users,

I would like to know which kind of analog filtering is applied when high cut and low cut bandwidth values are inserted directly in the Rhythm FGPA box?

I made some recording tests with analog high and low cut filters (by setting the bandwidth values on the Rhythm FPGA box).
My settings indicate:
LowCut="324.0144002420579" HighCut="7603.76512183337"

And my signal has a strange shape.

OnlyAnalog Filtering.png

Then if I applied the same filtering values with the bandpass filter box, I have a more common ephy signal in which we recognize the specific spike shapes.

AnalogAndDigital Filtering.png


I saw on the documentation that the digital filter was a 2nd-order Butterworth filter. What kind of filter is used on the Rhythm FGPA box ? And why I have a "normal" ephy signal only after reapplying the same filter but on the digitized signal?

Thank you very much for your responses.

Best regards,
Simon Nougaret

Jon Newman

unread,
Jan 17, 2024, 4:42:33 PM1/17/24
to Simon Nougaret, Open Ephys
Hi Simon,

The analog filtering is applied within the intan chip. It is documented here starting at pg. 24 https://www.intantech.com/files/Intan_RHD2000_series_datasheet.pdf. This is an _analog_ filter that is applied before digitization. The FPGA performs no filtering on digitized data.

Please describe exactly what you did during the "Then if I applied the same filtering values with the bandpass filter box," step. e.g. did you take a digitized signal and then pass it through a digital fitler offline? If so, what filter, exactly? To me it looks like you filtered with a causal filter that does not care much about phase distortion and distorted your waveforms in the second image. The biphasic shape is typically and artifact caused by causal filtering with a filter that does not have a flat phase response. You generally will want to use a non-causal filter ("filtfilt") in order to preserve waveshapes.

Jon 





--
You received this message because you are subscribed to the Google Groups "Open Ephys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-ephys+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-ephys/0f4fc7b3-ef8d-4155-954d-b8efeea07d4en%40googlegroups.com.

Simon Nougaret

unread,
Jan 18, 2024, 6:30:40 AM1/18/24
to Open Ephys
Hi Jon,
thank you for your answer and for the documentation about the analog filter applied within the INTAN chip.
What I meant exactly is that I read the data with Open Ephys, with "File reader" as source and I put on the signal chain a bandpass filter box (as illustrated below). Then, by adding a viewer I can visualize the signal as I pictured in my previous post (second picture).

Chain reading OE file.PNG

I hope I'm clearer than in my previous post,
Best,
Simon

Jon Newman

unread,
Jan 18, 2024, 7:34:51 AM1/18/24
to Simon Nougaret, Open Ephys
Hi Simon,

Yes, this is very helpful. Thank you. What you are seeing is expected behavior. The Bandpass filter node is indeed a casual filter because it is used with the OE GUI to provide real-time filtering. True (non-blockwise with windowing artifacts) non-causal filtering requires that the you save raw data and then load the entire waveform offline an filter in both forward and backwards in time. Because the GUI filters data as it is produced, it cannot do this and there freo you see the distinctive biphasic waveshapes associated with filtering without a flat phase response. It's important to note that although some causal filters are optimized to flatten phase response or to keep group delay constant, they will never be as as good as offline non-causal filtering which can perfectly preserve phase information. The distortion you are seeing is going to be present, to some degree, on every acquisition system that has a real-time filter. This is why you are used to seeing APs that look like this: they are all distorted. 

Our suggestion is always the the following:

1. Save data that is as close to raw as possible. The only filtering that should be done is light analog filtering prior to the ADC that prevents aliasing during sampling and distortion in the analog domain due to imperfections in the circuit desing. For the Intan chip, this is set using the 'low' and high' values in the Acquisition Board source: https://open-ephys.github.io/gui-docs/User-Manual/Plugins/OE-FPGA-Acquisition-Board.html.
2. Save the data produced either directly by the Acquisition Board or after channel remapping (but not with any type of mean or median subtraction!). 
3. Perform online processing such as digital filtering, mean subtraction, etc for visualization and maybe to save auxiliary data files if you don't mind the disk space requirements
4. Perform all lossy filtering offline on the raw data. 

The reason for doing this is that digital filtering is throws away information in the data. You cannot undo it to recover the original signal later. Its best to save data that is as close to the source as possible so that you have multiple shots at processing it offline.

Jon




Simon Nougaret

unread,
Jan 19, 2024, 9:27:58 AM1/19/24
to Open Ephys
Hi Jon,

Thank you very much for all the precious explanations. I understand better the difference between real-time causal filtering and offline non-causal filtering.
And I am grateful for your suggestions about data recording, thanks very much for your help !

Best,
Simon
Reply all
Reply to author
Forward
0 new messages