Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2013 Jan 18:6:98.
doi: 10.3389/fncir.2012.00098. eCollection 2012.

Closed-Loop, Multichannel Experimentation Using the Open-Source NeuroRighter Electrophysiology Platform

Affiliations

Closed-Loop, Multichannel Experimentation Using the Open-Source NeuroRighter Electrophysiology Platform

Jonathan P Newman et al. Front Neural Circuits. .

Abstract

Single neuron feedback control techniques, such as voltage clamp and dynamic clamp, have enabled numerous advances in our understanding of ion channels, electrochemical signaling, and neural dynamics. Although commercially available multichannel recording and stimulation systems are commonly used for studying neural processing at the network level, they provide little native support for real-time feedback. We developed the open-source NeuroRighter multichannel electrophysiology hardware and software platform for closed-loop multichannel control with a focus on accessibility and low cost. NeuroRighter allows 64 channels of stimulation and recording for around US $10,000, along with the ability to integrate with other software and hardware. Here, we present substantial enhancements to the NeuroRighter platform, including a redesigned desktop application, a new stimulation subsystem allowing arbitrary stimulation patterns, low-latency data servers for accessing data streams, and a new application programming interface (API) for creating closed-loop protocols that can be inserted into NeuroRighter as plugin programs. This greatly simplifies the design of sophisticated real-time experiments without sacrificing the power and speed of a compiled programming language. Here we present a detailed description of NeuroRighter as a stand-alone application, its plugin API, and an extensive set of case studies that highlight the system's abilities for conducting closed-loop, multichannel interfacing experiments.

Keywords: closed-loop; electrophysiology; micro-electrode array; multi-electrode; multichannel; network; open-source; real-time.

PubMed Disclaimer

Figures

Figure 1
Figure 1
Portions of NeuroRighter’s graphical user interface. (A) The hardware settings interface. (B) The spike-detection filter and spike sorting interface. (C) The main application window. Sorted spike waveforms recorded from a 59-channel, planar electrode array are shown on the spike visualization tab of the main GUI. The position of each waveform corresponds to the position of the recording electrode on which it was detected.
Figure 2
Figure 2
NeuroRighter’s StimSrv subsystem. (A) To deliver complex, non-periodic stimuli, NeuroRighter uses a double-buffering system. This allows samples to be generated and written to the NI cards’ analog and digital outputs simultaneously. At a given instant, one buffer is reserved for reading (pink) and one from writing (gray). When the all samples in the read buffer are generated, the buffers switch roles, allowing seamless delivery of constantly varying stimulus patterns and generic analog and digital signals. When using StimSrv for closed-loop protocols, the loop() function is called at the instant of a buffer switch. (B) Example open-loop stimulus protocol using StimSrv. (i) 100, 1 s Poisson sequences of electrical stimuli (left) and a single repeated Poisson sequence (right), were delivered to a dissociated cortical network (biphasic, voltage controlled, ±0.75V, 800 μs period). Stimulus rasters are shown using a gray-scale to indicate the trial number. For repeated stimuli, stimulus points are overlaid since stimulus delivery is clock-synchronized with the acquisition subsystem. (ii) Rastergrams of 4 units are shown below each stimulus raster, across trials. Example waveforms for each of the 4 units are shown to the right.
Listing 1
Listing 1
Code structure for two types of real-time plugin implemented with the API. (A) Pseudocode for a StimSrv-based real-time plugin. (B) Pseudocode for real-time plugin triggered by NewData events.
Figure 3
Figure 3
Conceptual schematic of NeuroRighter’s hardware and software elements. NeuroRighter serves as a high-level interface between hardware and custom user-written protocols (pink box). NeuroRighter simplifies hardware level programming by using datatypes and methods that are specialized for multichannel neural recording and stimulation. This facilitates the creation of low-latency, closed-loop protocols. Neural signals and secondary data streams are fed into the NI cards’ analog and digital inputs where they are digitalized and stored temporarily in on-board memory. NeuroRighter periodically transfers data from the acquisition cards’ FIFO memory to RAM using direct memory access. Data is then pushed to NeuroRighter’s DataSrv server object. DataSrv serves data to NeuroRighter’s visualization tools, filtering algorithms, and externally compiled plugins. The plugin API provides functions for safe interaction with DataSrv so that custom operations can be performed on incoming data streams. User-written plugins can interact with any of the computer’s native communication ports, or write data back to StimSrv in order to control external hardware as a function of recorded neural signals.
Figure 4
Figure 4
Estimated loop times for bi-directional communication using different hardware configurations. (A) Schematic of experiment used to test reaction delays for different real-time hardware options. Spikes detected and sorted from 59-channel planar electrode array were passed to the real-time plugin. The plugin determined if a spike originated from one of two units of interest. In the case that a spike was produced by one of the two units, the plugin triggered the generation of a digital word encoding the detected unit using either StimSrv, unbuffered digital output triggered by a NewData event, or an Arduino board. Digital signals were then, recorded though NeuroRighter’s digital input port. (B) Normalized histogram of time delays from spikes produced by the two units of interest (action potential waveforms are shown in pink and gray and occur at 0 ms) to the recorded digital signals produced by the plugin to encode the units (01000111 or 01010100). Delay histograms are shown for each unit (pink and gray) and the three different hardware options. N is the number of spikes recorded for each hardware option.
Figure 5
Figure 5
NeuroRighter can be used to clamp population firing rates in vitro using closed-loop electrical stimulation. (A) Schematic of the multi-electrode population firing clamp. (B) Step tracking performance is shown for a range of target firing rates, f * (dotted lines). The average neuronal firing rate across detected units,〈fu[t]〉 (colored lines), is shown for each step in f *. Tracking failures are colored gray. (C) Time averaged neuronal firing rate for the last 2.5 min of each 5 min protocol compared to the reference signal, f *. The dotted line is identity. (D) The mean control voltage across the stimulating electrodes over the final 2.5 min of each step protocol at different values of f *.
Figure 6
Figure 6
Closed-loop stimulation is required to robustly clamp population firing. (Top) The average neuronal firing rate over 1 min periods across 15 trials. Half-way through a multichannel population clamp protocol, real-time voltage updates stop and microstimulation is applied in open-loop. Error bars are ± standard deviation. (Bottom) The mean electrode stimulation voltage across 10 stimulating electrodes, for each of the 15 trials.
Figure 7
Figure 7
Long-term population clamp. (A) (i) The mean stimulation voltage (black) and individual electrode stimulation voltages (gray) over the course of the 6-h clamping protocol. (ii) The neuronal firing rate (black) compared to the target rate (red line). (iii) Individual unit firing rates, sorted in order of increasing rate during the 1 h period prior to the start of closed-loop control. (iv) Zoomed rastergrams showing short time scale network spiking before, during and after the controller was engaged. (B) Same as (A) except that AP5 was added 1 h after the start of the closed-loop controller and removed 4 h later. This is indicated by the arrows at the top of the figure. (C) Average pair-wise correlation functions between units for experiments with and without AP5 application (red and black lines, respectively). Cross-correlations were created from spiking data (i) during spontaneous activity before the closed-loop controller was engaged, (ii) half-way through the closed-loop-control period, and (iii) during spontaneous network activity following closed-loop control. The data used to create the correlation functions is centered about locations used to create the rastergrams shown in (Aiv) and (Biv). To create the correlation functions, unit firing rates were calculated using 10 ms time bins.
Figure 8
Figure 8
Closed-loop seizure intervention in a freely moving rat. (A) Schematic of the closed-loop seizure intervention protocol. A 16-channel microwire array, with two rows of 8 electrodes, were used to record LFP signals in the CA1 and CA3 regions of the hippocampus of a epileptic rat. Paroxysmal activity in CA1 triggered the application of multichannel electrical stimulation through the recording electrodes via a stimulation multiplexing board (green). (B) Implantation sites of the microwire array. Top view shows the electrode penetration sites (black dots) in the right-dorsal hippocampus. The red line indicates position of the coronal view shown below. (C) A 12 s epoch of hippocampal LFPs during a seizure event. Electrodes 1–8 were located in CA1 and 9-16 in CA3. The line length measures, averaged across channels, are shown below the LFP traces. Seizure detection occurs at 0 s. (D) Same as (C) except with closed-loop stimulation engaged. Electrical stimulation was applied on electrode 1 along with nine other electrodes (not shown). Red dots indicate stimulation times for e01 and stimulation artifacts appear on the LFP trace. e05–e07 and e11 were not used for stimulus application.
Figure 9
Figure 9
The Silent Barrage robotic embodiment. (A) Illustration of the Silent Barrage “organism” during its exhibition at the National Art Museum of China (NAMOC), in Beijing. Spatial patterns of action potentials recorded from a dissociated cortical culture are used to drive the robotic body. A video stream of visitors to the exhibition are interpreted by NeuroRighter’s plugin protocol and used to control multichannel electrical stimulation though the MEA, closing the loop around audience members, robotic system, and neural tissue over thousands of kilometers. (B) Audience members viewing the exhibition at NAMOC. Simultaneously, NeuroRighter translated the overhead video feed to stimulation patterns delivered to the culture and then translated resulting neuronal activity patterns to robotic actuation at the exhibit. (C) Photograph of an individual robot and the traces it produced during the NAMOC exhibition.

References

    1. Ahrens M. B., Li J. M., Orger M. B., Robson D. N., Schier A. F., Engert F., et al. (2012). Brain-wide neuronal dynamics during motor adaptation in zebrafish. Nature 485, 471–477 - PMC - PubMed
    1. Arsiero M., Lüscher H. R., Giugliano M. (2007). Real-time closed-loop electrophysiology: towards new frontiers in in vitro investigations in the neurosciences. Arch. Ital. Biol. 145, 193–209 - PubMed
    1. Azin M., Guggenmos D. J. (2011). A battery-powered activity-dependent intracortical microstimulation IC for brain-machine-brain interface. IEEE J. Solid-State Circuits 46, 731–745 10.1109/JSSC.2011.2108770 - DOI
    1. Bakkum D. J., Gamblen P. M., Ben-Ary G., Chao Z. C., Potter S. M. (2007). MEART: The Semi-Living Artist. Front. Neurorob. 1:5. 10.3389/neuro.12.005.2007 - DOI - PMC - PubMed
    1. Cole K. S. (1949). Dynamic electrical characteristics of the squid axon membrane. Annu. Rev. Physiol. 3, 253–258

LinkOut - more resources