PMCCPMCCPMCC

Search tips
Search criteria 

Advanced

 
Logo of nihpaAbout Author manuscriptsSubmit a manuscriptHHS Public Access; Author Manuscript; Accepted for publication in peer reviewed journal;
 
J Neurosci Methods. Author manuscript; available in PMC 2010 April 15.
Published in final edited form as:
PMCID: PMC2855223
NIHMSID: NIHMS77940

An Open-Source Hardware and Software System for Acquisition and Real-Time Processing of Electrophysiology during High Field MRI

Abstract

Simultaneous recording of electrophysiology and functional magnetic resonance imaging (fMRI) is a technique of growing importance in neuroscience. Rapidly evolving clinical and scientific requirements have created a need for hardware and software that can be customized for specific applications. Hardware may require customization to enable a variety of recording types (e.g., electroencephalogram, local field potentials, or multi-unit activity) while meeting the stringent and costly requirements of MRI safety and compatibility. Real-time signal processing tools are an enabling technology for studies of learning, attention, sleep, epilepsy, neurofeedback, and neuropharmacology, yet real-time signal processing tools are difficult to develop. We describe an open source system for simultaneous electrophysiology and fMRI featuring low-noise (< 0.6 uV p-p input noise), electromagnetic compatibility for MRI (tested up to 7 Tesla), and user-programmable real-time signal processing. The hardware distribution provides the complete specifications required to build an MRI-compatible electrophysiological data acquisition system, including circuit schematics, print circuit board (PCB) layouts, Gerber files for PCB fabrication and robotic assembly, a bill of materials with part numbers, data sheets, and vendor information, and test procedures. The software facilitates rapid implementation of real-time signal processing algorithms. This system has used in human EEG/fMRI studies at 3 and 7 Tesla examining the auditory system, visual system, sleep physiology, and anesthesia, as well as in intracranial electrophysiological studies of the non-human primate visual system during 3 Tesla fMRI, and in human hyperbaric physiology studies at depths of up to 300 feet below sea level.

Keywords: EEG, local field potentials, fMRI, multimodal imaging, real-time signal processing, sleep, anesthesia, hyperbaric medicine, neuropharmacology, learning, attention

1. Introduction

Simultaneous recording of electrophysiology during functional magnetic resonance imaging (fMRI) is a technique of increasing importance in brain imaging research. Commercial solutions exist for data acquisition and analysis of these data, but with the rapid development of new neuroscience and clinical applications, there is a growing need for end-user customization of both hardware and software for data acquisition and real-time processing. In many studies, hardware customization may be necessary to meet application-specific requirements for acquisition bandwidth, number of channels, amplifier configurations, and other hardware design specifications. Software customization is also an important feature for many applications, particularly for those that require real-time processing of acquired data. For studies examining epilepsy, sleep, or drug effects, for example, the ability to observe the study subject’s electrophysiological state in real-time is essential for success (e.g., epileptic spiking activity, sleep stage, etc.) (Lemieux et al., 2001; Portas et al., 2000; Schomer et al., 2000). Such real-time observations would allow the investigator to be certain that an adequate amount of data are being recorded in each desired electrophysiological state during an experiment. ERP studies conducted simultaneously with fMRI would benefit in a similar way from real-time processing, since the duration of a scan could be adjusted to ensure that an adequate number of trials were observed. Real-time processing is also required for biofeedback studies, where study subjects must be able to observe, with minimal delay, their own electrophysiological state to permit feedback control (Basmajian, 1981; Delorme and Makeig, 2003; Fox, 1979; Herrmann et al., 2004; Hill and Raab, 2005; Riddle and Baker, 2005; Sinkjaer et al., 2003).

Instrument design for electrophysiological recording during MRI is difficult due to the presence of the large static and gradient magnetic fields, and radiofrequency fields, each of which introduces potential complications for safety, instrument function, and image quality (United States Food and Drug Administration, 1997) (Huang-Hellinger et al., 1995; Ives et al., 1993; Lemieux et al., 1997) (Chen, 2001) (Bonmassar et al., 2001) (Angelone et al., 2004; Angelone et al., 2006) (Vasios et al., 2006). These complications are summarized in Table 1. Hard-to-find non-ferromagnetic components must be used throughout the design to minimize complications from the static magnetic field. Print circuit boards must be designed to minimize pickup of gradient artifacts and transmission of RF interference, and electrodes and electrode leads must be made with special materials to prevent RF heating and minimize susceptibility artifacts (Vasios et al., 2006). A number of strategies exist for removing the magnetic gradient artifact, ranging from subtraction of a template waveform (Allen et al., 2000) (Niazy et al., 2005) to synchronization of the electrophysiological sampling with gradient switching (Goldman et al., 2000) (Anami et al., 2003) (Mandelkow et al., 2006). In all cases, the dynamic range of the instrument must be large enough to record the gradient artifact without saturation or distortion. Ballistocardiogram artifacts, EEG artifacts induced by cardiopusatile motion within the static magnetic field, remain a problem, and can be removed with post-processing methods (Allen et al., 1998; Bonmassar et al., 2002; Niazy et al., 2005) or reduced in amplitude by using specially designed EEG electrodes (Vasios et al., 2006) or head restraint methods (Anami et al., 2003). Table 2 summarizes additional performance characteristics that are needed for electrophysiological recording within the MRI environment. Development of data acquisition and real-time processing software is also challenging, since the software must interact at a low-level with hardware and hardware drivers, and work quickly enough to keep up with acquired data, while maintaining high-level functionality for ease of use and customization.

Table 1
MRI Safety: Potential adverse interactions between a MRI environment and a medical device.
Table 2
Specifications for recording electrophysiology during MRI.

One way to facilitate hardware and software customization and development would be to make the hardware and software freely available in an open source fashion. For software, the open source model has been extremely successful by facilitating collaboration between large groups of researchers and developers, with few requirements for success beyond a computer and programming knowledge. With hardware, the analogous open source concept is more challenging. While it is easy to distribute and modify circuit schematics, if the hardware are sufficiently complex, the ability to reduce the design to practice, through multiple design and construction steps (circuit, PCB, components, etc.) becomes a limiting factor. Ongoing developments in electronics construction technology, such as 3D printers and circuit printers, are reducing these limitations by allowing automated construction of electronic circuits and systems based on construction files (e.g., Gerber files, robotic assembly files) that fully specify the system (Chalamala and Temple, 2005; Mei et al., 2005; Mikhak et al., 2002). To make open source hardware reducible to practice in the way that open source software is, open source hardware would need to include not only schematics for the circuit designs, but also an integrated library of construction files that would allow end-users to construct the hardware using largely automated methods, and a means to compile these files in an organized way with successive design changes.

In this paper we describe an open source hardware and software system for acquisition and real-time processing of electrophysiology during high-field MRI (up to 7 Tesla). We have named this system “High Field One” (HF-1). A novel aspect of this work is that all elements of the system have been gathered together into a comprehensive, freely-available open-source distribution. The hardware has been designed to minimize electromagnetic interference (EMI) between the data acquisition device and the MRI, and features EMI-reducing print circuit board designs, double shielding, and low input noise. The hardware distribution includes all circuit and PCB design files, a bill of materials and data sheets for all components, including difficult to find non-ferrous connectors and parts, construction files for automated assembly, and test procedures, compiled together to promote rapid and organized development. The software distribution includes data acquisition software from high-level LabView virtual instruments (VIs) down to low-level firmware, as well as high-level real-time processing functions implemented in LabView. This open source system will allow end-users to build an MRI-compatible electrophysiological acquisition system, with the ability to modify the design to their individual specifications, and to develop custom data acquisition and real-time processing applications. The HF-1 software and hardware designs are freely available via at http://www.nmr.mgh.harvard.edu/abilab. Users must agree to a free licensing agreement prior to software and hardware design download, in accordance with Harvard Medical School and Massachusetts General Hospital policies.

This manuscript is organized into four main sections: 1) Introduction, 2) Materials and Methods, 3) Results, 4) Discussion, and 5) Conclusions. Principles of design for instruments used in the MRI are discussed in Section 1. In Sections 2.1 and 2.2 we provide an overview of the hardware and software design, as well as their open source dissemination. In Section 2.3, we describe data recording and real-time processing examples, with Results of these examples presented in Section 3, In Section 4 we discuss other applications and future work. Table A.1 provides a list of acronyms used in this paper.

Table A.1.
List of acronyms.

2. Materials and Methods

The HF-1 system is organized into a number of hardware and software subsystems. The hardware is organized into eight main subsystems (Figure 1): 1) An external amplifier unit, 2) An anti-aliasing and level shifting stage, 3) An analog-to-digital conversion (ADC) stage, 4) A programmable microcontroller unit (MCU) for controlling ADC functions, 5) An optical communications unit for acquisition control and data transfer based on the universal serial bus (optical USB), 6) A computer for data display, recording, integration with external signals such as event triggers and physiological monitoring, and real-time signal processing, 7) An optional external buffer unit to interface with high impedance electrodes, and 8) An optional electrode adapter unit for use of individual EEG electrodes during non-MRI studies. The software system is organized into four main subsystems (Figure 2): 1) Microcontroller (MCU) code for low-level data acquisition control, 2) High-level graphically-based data acquisition software written in LabView (National Instruments, Austin, TX), 3) High-level real-time processing modules written in LabView, and 4) Matlab-based post-processing utilities (Mathworks, Natick, MA). HF-1 is compatible with MRI at field strengths of up to 7 Tesla, and can be used for both EEG and more general electrophysiological recordings such as local field potential (LFP) or multi-unit activity (MUA) using the external buffer unit for high impedance electrodes. In this section we provide a brief overview of hardware and software design.

Figure 1
High-Field-1 (HF-1) hardware overview, showing a schematic representation (left) and labeled photos of the subsystems (right).
Figure 2
High-Field-1 (HF-1) software overview.

2.1. Hardware Overview

The main features of the HF-1 hardware system are:

  1. Variable sampling rate of up to 20 kHz per channel.
  2. Bandwidth from DC to one of two hardware-specified values (default 300 Hz or 4 kHz).
  3. High dynamic range achieved through use of 24-bit analog-to-digital converters (ADC).
  4. Low input noise (< 1 uV peak-to-peak).
  5. Programmable microcontroller unit (MCU) to permit end-user customization of data acquisition functions.
  6. Option to synchronize between electrophysiological acquisition and MRI acquisition clock to improve gradient artifact removal.
  7. Tested at MRI field strengths of up to 7 Tesla.
  8. Optical USB communications unit for simple and reliable digital data transfer to acquisition computers.

Table 2 and Table 3 provide a summary of HF-1’s technical specifications. The system (Figure 1) is typically connected to an MRI-compatible electrodes designed to prevent RF-related heating using distributed resistance leads (“Ink Cap”) (Angelone et al., 2004; Vasios et al., 2006). Amplification is performed by an external amplifier unit, while antialiasing filtering, level shifting, and analog-to-digital conversions are performed by the data acquisition unit. The data acquisition unit is non-ferromagnetic and can be placed inside the bore, but is usually placed outside the bore to reduce pickup of magnetic gradient artifacts. The digitally-sampled electrophysiological data are buffered, packaged into discrete “data packets” (described below), and then transferred via optical USB. The system is powered by two 12-volt lead acid batteries, and in this way is isolated from electrical mains.

Table 3
Technical specifications for HF-1.

The HF-1 hardware has been carefully designed to minimize hardware interactions with the static magnetic, gradient magnetic, and radiofrequency fields (see Table 1). All components in HF-1 are non-ferromagnetic, and are fully specified with part numbers and vendors in the open source distribution bill of materials (described in Section 2.2.4 below). These non-ferromagnetic components include aerospace-grade connectors made from non-ferrous stainless steel, chassis constructed from plastic, aluminum, and copper, and integrated circuits (ICs) that have been screened for ferromagnetism using high-field neodymium magnets and the MRI static field itself. Magnetic screening of ICs is required because the metallurgy of ICs is rarely specified in the data sheets. Interactions with the gradient magnetic field are controlled by minimizing the size of loops formed on print circuit board traces. Radiofrequency (RF) interference is controlled in three ways: 1) Print circuit board layouts designed to minimize RF emissions and reception, 2) Double-shielding on cables and chassis, and 3) Capacitive filter connectors to minimize RF emissions through apertures in the shielded chassis.

The first-stage amplifier uses the Analog Devices AD620B instrumentation amplifier (Analog Devices, Norwood, MA). The AD620B features low gain nonlinearity (10ppm), high bandwidth (120 kHz with gain of 100), and wide power supply range (VS= +/−18V) and output range (within 1.2V of VS) to accommodate the potentially large gradient artifacts encountered in electrophysiological recordings taken during MRI (Analog, 2004). The gain (G) on the external amplifier unit is set during board construction depending on the dynamic range required. In situations where background noise levels are high, due to the helium pump, high slew-rate gradients, or when conventional EEG caps are used, the gain is set to G = 50 to provide a wide input range of input range of −176 to +174 mV. If background noise levels are lower, for instance when using EEG caps with resistive leads to reduce RF and gradient noise coupling (Vasios et al., 2006), a higher gain setting of G = 500 is used, providing an input range of −17.6 to +17.4 mV.

ADC functions are performed by the Texas Instruments ADS1254E, a low-power, low-noise, high-speed ADC whose 24-bit resolution provides the high dynamic range required for electrophysiological recordings during MRI (Texas instruments, Dallas, TX). Each ADS1254 chip has four differential inputs, which can be multiplexed at a rate of up to 1 kHz per channel (Instruments, 2001). Alternatively, a single channel can be sampled at up to 20 kHz. To provide 32 acquisition channels, an architecture using 8 ADS1254’s was chosen, each running with 4-channel multiplexing at 1 kHz. If a higher-rate sampling is required, a single channel from each ADS1254 can be sampled, giving 8 channels at 20 kHz per channel. The sampling scheme can be selected at a high-level in the LabView data acquisition software, or at a low-level by interacting directly with the MCU. The analog input to each ADS1254 is first anti-alias filtered and then re-scaled to a 0-to-5V reference range using an op-amp-based scaling and level-shift circuit (Instruments, 2001). Anti-aliasing filtering is achieved using a one-pole lowpass RC divider with software-selectable cutoff frequency, yielding a bandwidth of DC to either 300 Hz or 4 kHz. The selection is performed by a MCU-controlled transistor switch that controls the capacitance of the RC circuit, and can be controlled with HF-1’s LabView data acquisition software. If necessary, these cutoff frequencies can be adjusted during board construction by changing the component values of the RC divider. In addition, the ADS 1254 has its own anti-aliasing filter from DC to 4.24 kHz.

The ADS1254 provides a 19.1-bit RMS effective resolution due to inherent noise within the integrated circuit, which provides an effective resolution of 0.71 uV in the least significant bit (LSB) when the gain is set to G = 50, and an effective resolution of 0.071 uV LSB when the gain is set to G = 500. Noise measurements were performed in a shielded room (Braden Shielding Systems, Tulsa, OK) with all amplifier inputs short circuited to ground, yielding a peak-to-peak noise of 6 uV when the gain is set to G = 50, and a peak-to-peak noise of 0.6 uV when the gain is set to G = 500. For the recordings described in Section 2.3 and Section 3, a gain of G = 50 was used.

Signal-to-noise within the MRI scanner is improved by placing the external amplifier unit close to the study subject and electrodes, allowing the signal to be amplified before MRI-related noise sources can be picked up. These noise sources come primarily from the gradient and static magnetic fields (e.g., gradient switching, vibrations from helium pump). To minimize noise coupling from these sources, several measures are taken. The chassis and cabling are all double-shielded to reduce RF noise coupling. The external amplifier unit has been designed with a compact circuit layout that reduces gradient and static magnetic noise pickup. The USB and ADC subsystems, which tend to have larger circuit boards due to their higher level of complexity, are located outside the MRI bore to further reduce magnetic noise coupling.

Data are transmitted via optical USB interface to a computer located outside the MRI scanner room. Auxiliary input signals such as event triggers or additional analog signals are integrated with the main electrophysiological data using a National Instruments NI USB-6210 multifunction data acquisition unit (National Instruments, Austin, TX). Data acquired on the NI USB-6210 are synchronized with the main electrophysiological acquisition by a sampling clock sent from the HF-1 data acquisition unit via optical link (Versatile Optical Link, Avago Technologies, Palo Alto, CA). The HF-1 data acquisition unit can also receive external synchronization signals (Figure 1). One signal synchronizes data acquisition with the MRI scanner’s TR or trigger pulse, a TTL pulse that signals the start of each volume acquisition in fMRI. The other external synchronization signal substitutes the onboard 48 MHz system clock with an external 48 MHz clock generated by a direct digital synthesis (DDS) device driven by the MRI Scanner’s 10 MHz clock.

2.2. Software Overview

The main subsystems of the HF-1 software are:

  1. Microcontroller (MCU) firmware for low-level data acquisition control.
  2. Data acquisition software written in LabView (National Instruments, Austin, TX).
  3. Real-time processing modules written in LabView.
  4. Matlab-based post-processing utilities.

. These software subsystems are open source, and are documented and organized to facilitate enduser customization and further development.

2.2.1. MCU Firmware and Data Packet Specification

The MCU firmware provides low-level control of data acquisition functions such as reading data from the ADCs, assembling the data into packets, and then placing these data packets into a buffer for transfer by the optical USB unit. The firmware was written in C and assembler, and was structured to facilitate customization as well as porting to other programming languages as newer or more powerful MCU hardware become available. The typical HF-1 user would not have to interact directly with the MCU firmware, as most functions can be controlled from the high level LabView data acquisition and real-time processing software (discussed below). However, this remains an option for more advanced applications and hardware modifications.

The data packet format is shown in Figure 3. Each data packet begins with an 11-byte header that identifies the beginning of every packet, indicates the system status, and specifies the data size. The first 8 bytes of the header contain a fixed pre-set sequence that is used to identify the beginning of a packet. The next byte (“status byte”) indicates the channel number and sampling routine (either sampling from a single channel on each ADC or “rotating” through all four channels in succession), as well as the value chosen for the anti-aliasing filter (either 300 Hz or 4 kHz). The remaining 2 bytes specify the data set size. The raw data are transmitted after the header. When sampling from a single channel on each ADC at 20 kHz, a maximum of 16 data frames can be transmitted per packet, with 8-channels per frame. When sampling from all four channels one each ADC at 1 kHz per channel, a maximum of 4 data frames can be transmitted per packet, with 32-channels per frame. The data packet is designed to send data sets of any size, so data sets are divided into several data packets, with the remainder of data awaiting transfer indicated in the last two bytes of the header (“data set size”). Given the 11 byte header, 373 of the 384 bytes in each packet contain data, yielding an overhead of 2.9%. Data packet parsing is handled automatically within the included LabView data acquisition software.

Figure 3Figure 3
USB data packet example. The top panel shows the data packet format for 8-channel, 20 kHz mode, while the lower panel shows the data packet format for 32-channel, 950 Hz mode. The first 11 bytes of the data packet code a header, consisting of an 8-byte ...

2.2.2. LabView Data Acquisition and Real-Time Processing Software

The HF-1 data acquisition and real-time processing software were written using the National Instruments LabView 8.2 programming language (National Instruments, Austin, TX) under Microsoft Windows (Microsoft, Richmond, WA). LabView is a high-level graphical programming language that facilitates rapid development of data acquisition and real-time processing applications through its intuitive graphical programming language and its wide assortment of built-in data acquisition, data display, and data analysis functions. Figure 4 shows the top-level block diagram of the LabView code, annotated to illustrate the location of modules that control initialization, data acquisition from HF-1 via USB, data acquisition from external digital I/O lines (from the NI USB-6210), keyboard and display controls, and real-time processing. Figure 5 shows the graphical user interface for the data acquisition as an example of real-time time-domain ERP averaging of visual evoked potentials, while Figure 14 shows real-time frequency domain ERP averaging interface.

Figure 4
Top-level block diagram of LabView data acquisition virtual instrument (VI), illustrating layout of initialization, real-time processing, digital I/O, USB input, keyboard interface, and display functions.
Figure 5
Graphical user interface of LabView data acquisition program (“virtual instrument,” VI), showing 32 traces of EEG (top), and example of real-time time-domain averaging of VEPs in a human study subject(bottom).
Figure 14
Example of real-time ASSR during fMRI in humans at 3 Tesla , showing real-time ASSR averaging module (top), and simultaneously acquired real-time fMRI activation maps using Siemens Syngo MR Neuro3D function (bottom).

The real-time processing module operates on trigger-driven windows of data, with user configurable pre- and post-trigger data segments. Low-, high-, or band-pass filtering can be applied to the data prior to window selection and real-time processing, with filter settings that are independent of any filtering chosen for data display or data storage. The user is also able to specify separate amplitude rejection limits for each channel to improve the data quality entering into the real-time processing stream. The real-time module operates on all acquired channels simultaneously, but can also be configured to operate on subsets of channels if desired.

The data acquisition and real-time processing software run on Microsoft Windows XP Professional (version 5.1, service pack 2; Microsoft Corporation, Redmond, WA), on a Sony Vaio Laptop (VGN-FE590P; Sony USA, New York, NY) with 2 GHz Intel Core Duo T2500 central processing unit (CPU; Intel x86 Family 6 Model 14 Stepping 8; Intel Corporation, Santa Clara, CA) and 2 GB RAM. Approximately 80% of the CPU’s resources are utilized to run LabView 8.2 and the data acquisition and real-time software. For comparison, a low-level C program for acquiring the EEG data (without display or real-time processing) uses approximately 10% of the CPU’s resources. Data acquisition from the USB interface utilizes a peak bandwidth of approximately 600 kilobytes/second, or 40% of the full speed USB 1.1 bandwidth.

2.2.3. Matlab-based post-processing utilities

The data recorded by the DAQ application are stored in three separate files: A *.dat file that holds the raw binary electrophysiological data, a *.trg file that stores the external trigger and external signal information, and a *.evn file that stores keyboard annotations, all with the same base filename (e.g., file.dat, file.trg, file.evn). This triplet of files can be read into Matlab using utility functions included with the HF-1 software distribution. Once in Matlab, the data can be post-processed or converted to other file formats.

2.2.4. Software and Hardware Dissemination

The HF-1 software and hardware designs are freely available via at http://www.nmr.mgh.harvard.edu/abilab. Users must agree to a free licensing agreement prior to software and hardware design download, in accordance with Harvard Medical School and Massachusetts General Hospital policies. The software is compatible with LabView 8.2 or later (National Instruments, Austin, TX), under a Microsoft Windows XP operating system (Microsoft, Richmond, WA). The hardware distribution is summarized in Figure 6. The hardware design, including both circuit schematics and print circuit board (PCB) layout, are provided in Orcad format. Detailed hardware construction files are also provided to help the end-user build a complete system. Gerber files are provided for PCB construction. The bill of materials (BOM) specifies all required components, along with component specifications, data sheets, and sourcing information such as vendors and part numbers. Files to drive automated pick-and-place circuit board population and assembly are also included, as well as test procedures for each of the HF-1 circuit boards. With these construction files, most of the system can be built in a largely automated fashion. Manufacturing requirements for each of the HF-1 sub-assemblies is listed in Table 4. At the time of writing, the cost of constructing the base 32-channel HF-1 hardware, including parts, print circuit board fabrication, and assembly, would be approximately $12,000 (USD). The approximate cost breakdown for the HF-1 hardware is listed in Table 5.

Figure 6
Design and construction files for HF-1 hardware distribution, and their use in PCB fabrication, board assembly, and testing.
Table 4
Manufacturing Requirements for Building HF-1 Hardware.
Table 5
Cost breakdown for HF-1 hardware.

2.3. Data Recording and Real-Time Processing Examples

At the time of writing, the HF-1 system has been used by six different laboratory groups at the MGH/HST Martinos Center for Biomedical Imaging (Charlestown, MA) and the Naval Submarine Medical Research Laboratory (Groton, CT) in over 100 recording sessions during a period of approximately 3 years. In this paper we will report data from 52 study subjects recorded over this time period. Applications have included auditory and somatosensory EEG/fMRI, visual evoked intracranial recordings in non-human primates during fMRI, EEG/fMRI studies during sleep and general anesthesia, and EEG recordings within a hyperbaric chamber. Recordings during MRI were performed within Siemens 7 T, 3 T (Trio), and 1.5 T (Sonata) scanners (Siemens, Erlangen, German). Recordings during 7 T fMRI, as well as some 3 T recordings, were performed using an 32-channel EEG cap whose leads were constructed from a resistive carbon silver ink-based flexible circuit to prevent RF heating and improve both image and EEG quality, which we will refer to below as the “ink cap” (Vasios et al., 2006). Table 2 shows the number of studies performed according to study type. All human studies were conducted with the approval of the Human Research Committee at the Massachusetts General Hospital (for auditory, somatosensory, sleep, and general anesthesia studies), and by the Institutional Review Board at the Naval Medical Submarine Laboratory (hyperbaric chamber recordings). All animal recordings (non-human primates) were conducted with the approval of the Subcommittee on Research Animal Care at the Massachusetts General Hospital. A description of each of the studies is provided below, with example data presented in the Results section.

2.3.1. Real-time Visual Evoked Potentials (VEPs, outside scanner)

VEPs were recorded outside the scanner to test the function of the time-domain real-time event-related potential averaging module. The study subject was presented a full-field flickering checkerboard with inter-stimulus interval of 500 msec, alternating between 15 seconds of stimulus and 15 seconds of fixation and rest. Electrodes were placed at O1 and O2, referenced to M1, and recorded at 950 Hz, with amplitude epoch rejection limits set to +/− 100 uV in the realtime averaging module. One study subject was studied under this paradigm.

2.3.1. Alpha Wave Recordings (7, 3, and 1.5 T)

Alpha waves were recorded by asking a study subject to lay quietly in the static field with eyes closed. Recordings at 7 and 3 T were made using the HF-1 system, sampling at 950 Hz with 32 channels. Recordings at 7 T used the 32-channel ink cap (Vasios et al., 2006) with medium-impedance leads (~2–5 kOhm distributed across lead), while recordings at 3 T used either the same cap, a high-impedance version of that cap (~20–30 kOhm distributed across lead), or an 8-channel electrode set constructed with low impedance carbon fibers (see Section 2.3.3 below for details). Alpha waves were also recorded at 1.5 T using a 32-channel OptiLink/SynAmps recording system (Compumedics Neuroscan, Charlotte, NC) with a 32-channel MRI compatible Quickcap (Compumedics Neuroscan, Charlotte, NC) modified to employ a bipolar montage to reduce ballistocardiogram noise. The 1.5 T data were previously reported in (Bonmassar et al., 2002). Alpha waves were recorded in 9 subjects at 7 T, 13 subjects at 3 T, and 6 subjects at 1.5 T.

2.3.2. Radio Frequency (RF) Interference Testing (3 T)

The RF attenuation of the shielding enclosure was demonstrated by comparing localizer (3 T, 10 mm slice thickness, 0.55 mm in-plane resolution, 512×512 matrix, TE = 5 msec, TR = 20 msec, 40-degree flip angle) and functional images (4 mm slice thickness, 1 mm skip, 3.1 × 3.1 mm in-plane resolution, 64×64 matrix, coronal orientation, TE = 30 msec, TR = 9 sec, 90-degree flip angle) with the shielding chassis in place and then removed. The localizer was chosen for comparison because it is empirically more sensitive to RF noise from the instrument than other sequences. One study subject was studied with shielding chassis removed, while the remainder of 3 T studies with shielding in place were drawn from the auditory studies described below.

2.3.3. Auditory EEG/fMRI (3 and 7 Tesla)

Subjects were presented one of two types of auditory stimuli to elicit either the 40-Hz auditory steady state response (ASSR) or the midlatency auditory evoked potential (MLAEP). For the ASSR, study subjects were presented with 30-second trains of 12.5 millisecond noise bursts at 40-Hz, in a 30-second stimulus ON, 30-second stimulus OFF pattern over a 15-minute run (both at 7 T and 3 T). For MLAEP, subjects were presented 100 msec 1/3-octave pink-noise bursts with a center-frequency of 1 kHz and an inter-stimulus interval of 2 seconds, arranged in a 30 second ON/OFF block paradigm (7 T only). Stimuli were delivered using a laptop running Presentation (Neurobehavioral Systems, Inc., Albany, CA) with an Echo Indigo 24-bit PCMCIA audio card (Echo Digital Audio Corporation, Carpinteria, CA) and Koss ESP-950 electrostatic headphones retrofitted by our group for MRI-compatibility (Koss Corporation, Milwaukee, WI) or MR Confon Optime 1 headphones (MR Confon, Madeburg, Germany). Recordings at 3 T were made using an 8-channel bipolar montage (M2→T8, T8→C6, C6→C4, C4→Cz, Cz→C3, C3→C5, C5→T7, T7→M1), with leads constructed from low impedance carbon fibers (Marktek FiberOhm, 7 ohms/inch, ~150 ohms total; Marktek Inc., Chesterfield, MI), while recordings at 7 T were performed using the 32-channel ink cap (Vasios et al., 2006) with medium-impedance leads (~2–5 kOhm distributed across lead), at a sampling rate of 950 Hz in both cases. Functional MRI acquisitions were arranged according to a “long TR” auditory fMRI design, with 15-slice volume acquisition in 1 second followed by an 8 to 9 second silent period (At 3 T: 4 mm slice thickness, 1 mm skip, 3.1 × 3.1 mm in-plane resolution, 64×64 matrix, coronal orientation, TE = 30, 90-degree flip angle, with cardiac gating to achieve TR of ~9 sec; At 7 T: 3.1 mm slice thickness, 1.15 mm skip, TE = 20, TR = 10 sec, without cardiac gating). This long TR arrangement allows hemodynamic responses elicited by acoustic scanner noise to subside before the next volume acquisition (Hall et al., 1999 Hall et al., 2000). Structural MRI at 3 and 7 T were acquired using a T1-weighted MPRAGE sequence (1.3 mm thick, 1.3 × 1 mm in-plane resolution, TR/TE = 2530/3.3 msec, 7-degree flip angle). A total of 21 subjects were studied using the ASSR paradigm, 8 at 7 T and 13 at 3 T. One study subject was studied with MLAEP at 7 T.

ASSRs were computed in the frequency domain using multi-taper spectral analysis (Percival and Walden, 1993) from 4-second EEG windows xn(t) (M1→Cz) centered 4-seconds prior to each volume acquisition (Figure 7). This arrangement reflects the observation that the BOLD hemodynamic delay from stimulus onset is approximately 4-seconds (Hall et al., 1999; Hall et al., 2000). For each window, the EEG was linearly detrended and power spectra were computed and averaged separately for stimulus ON and OFF conditions using the multi-taper method (Percival and Walden, 1993), with time-bandwidth product NW = 4:

equation M1
(1.1)

where Pn (ω) represents the power spectral estimate corresponding to the n-th EPI volume, and NON and NOFF represent the number of EEG windows corresponding to stimulus ON and stimulus OFF conditions, respectively. In cases where EEG windows overlapped the transition from ON to OFF or vice-versa, the window was assigned to the condition with the majority of overlap with the window. To summarize the 40-Hz response over the entire recording run, the power ratio S(ω) was computed:

equation M2
(1.2)

To represent temporal variations in the ASSR, the 40-Hz amplitude (square-root of power) time series was computed equation M3. This amplitude time-series was then used as a regressor in an fMRI time-series model with polynomial drift terms and an ON/OFF indicator function convolved with a gamma-function, fitted using the “3dDeconvolve program” in the AFNI software package (Cox, 1996).

Figure 7
Overview of ASSR acquisition and analysis during EEG/fMRI.

2.3.4. Real-Time Auditory EEG-fMRI (3 Tesla)

Real-time 40-Hz ASSR were acquired at 3 T using a long-TR design with a fixed 10-second TR (10 coronal slices, 4 mm thick, 1 mm skip, 3.1 × 3.1 mm in-plane resolution, 64×64 matrix, TE = 30, 90-degree flip angle, volume acquisition time of 626 msec). A 4-second train of 40-Hz noise bursts was presented in the second half of each silent interval, cycled in 30 second ON/OFF blocks. Two study subjects were studied under this paradigm, with EEG recorded from Cz and Fz, referenced to M1, at 950 Hz in each subject, and in a separate session using the high-impedance version of the 32-channel “ink cap” in one of the subjects. The real-time EEG processing module was configured to segment windows of EEG data containing this 4-second stimulus, with a 4-second pre-stimulus baseline (Figure 8). With each stimulus, the running average of the power spectra in X was updated, and the power ratio was updated as well:

equation M4
(1.3)

Each EEG data window was linearly detrended, and the power spectrum was estimated using the periodogram (Percival and Walden, 1993), chosen for its computational simplicity. At the same time, real-time fMRI activation maps were computed using the Neuro3D feature of the Siemens Numaris 4 Syngo MR B15 MRI acquisition program (Siemens, Erlangen, Germany).

Figure 8
Overview of ASSR acquisition and analysis during real-time EEG/fMRI.

2.3.5. Intracranial Visual Evoked Potentials in Non-Human Primates

Intracranial visual evoked potentials were measured in non-human primate (Macaca mulatta) during fMRI in a head-only 3 Tesla MRI scanner (Siemens Allegra,; Siemens, Erlangen, Germany). Twenty-six Teflon coated platinum-iridium microwires (25 µm diameter, 90% platinum, 10% iridium from California Fine Wire Company, Grover Beach, CA) were manually inserted normal to the cortical surface to depths of 2–6 mm, along the rostral bank of the arcuate sulcus. Each wire tip was beveled and stripped of ~40 µm of Teflon coating prior to insertion, giving a total surface of ~3600 µm2. Measured impedances of the electrodes were between 34 kOhm and 61 kOhm (at 100 Hz). An external impedance buffer was constructed to provide a 5 kOhm input impedance to the HF-1 amplifiers. Gradient echo T2*-weighted echo planar images (50 coronal slices, 64 × 64 in-plane matrix, TR = 3s, TE = 25 ms, 1.25 × 1.25 × 1.25 mm3 voxels, flip angle = 90°) were acquired with a single saddle-shaped, radial transmit-receive surface coil (12 cm diameter) positioned over the monkey’s head. To minimize the effect of gradient artifacts on the intracranial potential recordings, 3s fMRI scans were interleaved with 3s silent periods. The visual stimulus consisted of a full screen (16 degrees) radial checkerboard flicker, presented for 500 ms. To reliably record visual evoked potentials, the study subject was trained on a visual fixation task, and eye position was monitored at 120 Hz using an infrared pupil/corneal reflection tracking system (RK-726PCI, Iscan Inc., Burlington, MA). Criteria performance was defined as greater than 90% within a 2 degrees × 2 degrees window. Visual stimuli were projected at 1024 × 768 resolution and 60 Hz refresh rate, from a LCD projector onto a translucent screen 52 cm from the animals’ eyes. A total of 100 responses were used to create an averaged waveform. Because the results of these experiments will be presented in other publications focused on neuroscience, in this paper we will show only the evoked potential data, and corresponding gradient-echo T2* images (without activation maps) to demonstrate the capabilities of the HF-1 system. A total of two subjects, one featuring three sessions, another with one session, were studied under this paradigm.

2.3.6. Sleep Studies (3 Tesla)

Study subjects were asked to sleep inside the MRI scanner during EEG and fMRI measurements. Subjects were allowed to adapt to sleeping in the MRI scanner during two prior sessions, one in a “mock” scanner, and another in a real MRI scanner. Scanning was conducted with an interleaved sequence, with volume acquisition in 2 seconds, followed by a 4-second silent period (35 slices, 3 × 3 × 3.5 mm3, oriented parallel to the AC-PC, TR = 2 sec, TE = 30 ms, Flip Angle = 90°). Ballistocardiogram artifacts were removed from the EEG using Kalman adaptive filtering with a motion sensor reference signal(Bonmassar et al., 2002) EEG (M1→Cz, M1→Oz) were used to observe sleep-related EEG patterns for sleep scoring. Because the results of these experiments will be presented in other publications focused on clinical medicine and neuroscience, in this paper we will show only the EEG data collected during sleep inside the MRI to demonstrate the capabilities of the HF-1 system. A total of 7 subjects were studied under this paradigm.

2.3.7. General Anesthesia Studies (3 Tesla)

General anesthesia was induced with the drug propofol in healthy post-laryngectomy patient volunteers. The study subjects’ airways were secured using cuffed tracheostomy tubes prior to induction to provide ventilation support for subject safety, and to maintain a stable CO2 levels to prevent CO2-induced changes in cerebral blood flow. Hospital standards for off-site administration of general anesthesia were strictly followed, and at least 2 anesthesiologists, plus a third ACLS-certified person, were present at every study. Study subjects were imaged using the cardiac-gated EEG/fMRI paradigm for 40-Hz ASSR described earlier in Section 2.3.2 at baseline and during induction of general anesthesia. Propofol was administered at effect-site target concentrations of 1.0, 2.0, 3.0, and 4.0 ug/ml using the computer program STANPUMP (Shafer and Gregg, 1992) with a Harvard 22 Infusion Pump (Harvard Apparatus, Holliston, MA). Because the results of these experiments will be presented in other publications focused on clinical medicine and neuroscience, in this paper we will show only a subset of the ASSR and fMRI data to demonstrate the capabilities of the HF-1 system. A total of 8 subjects were studied under this paradigm.

2.3.8. Hyperbaric Studies

The HF-1 acquisition system was placed inside a hyperbaric chamber and USB and SYNC signals were sent through a penetration panel in order to acquire data from outside the chamber. The 40-Hz auditory stimuli described in Section 2.3.2 were delivered to study subjects during EEG recording with HF-1 at normal pressure, 190 feet (~6 atmospheres pressure), and again at normal pressure, in order to observe electrophysiological effects of hyperbaric nitrogen narcosis. Recordings were limited to safe exposure times described in the United States Navy Diving Manual (United States. Dept. of the Navy., 1985). The study subject was in a seated position within the hyperbaric chamber during these studies, and auditory stimuli were delivered through a loudspeaker. A total of 5 subjects were studied under this paradigm.

3. Results: Performance Examples and Dissemination

3.1. Hardware Distribution

Figure 9 shows a montage of hardware distribution images for the HF-1 system. Figure 9A shows the schematic for the digital portion of the data acquisition unit (MCU and USB Interface) in Orcad format. This schematic is linked to the print circuit board (PCB) layout (Figure 9B), also in Orcad format. The PCB design is double-sided, with 8 Layers and 5-mil traces, laid out to minimize transmission of RF fields that could interfere with MRI. Figure 9C shows the fully assembled circuit board for the analog input portion of the data acquisition unit, illustrating the compactness of the PCB, achieved through careful layout and use of surface mount components down to 0402 footprint size. Figure 9D shows the fully assembled HF-1 data acquisition unit with cover removed, illustrating use of copper-clad Kapton internal shielding to further reduce RF transmission. PCB Gerber files, a complete bill of materials (BOM) with data sheets for all components, automated pick-and-place assembly files, and test procedure files are also included in the hardware distribution (not shown). Figure 10 shows the fully assembled HF-1 hardware system with all components.

Figure 9
Examples of HF-1 hardware distribution: (A) Circuit schematics, (B) Print circuit board layout, (C) Completed A/D conversion board, (D) Interior of assembled HF-1 data acquisition unit.
Figure 10
Comparison of human alpha waves recorded at 1.5 Tesla using Optilink/Synaps + QuickCap system (top), and alpha waves recorded at 3 Tesla using HF-1 + high impedance ink cap (bottom). A photo of the high impedance ink cap is shown on the left.

3.2. VEP (outside scanner), Alpha Wave (3 T), and RF Noise Recordings 3T)

Figure 5 shows a detailed view of a screenshot of the time-domain real-time ERP averaging during a VEP experiment after 120 averages. Figure 10 shows a comparison of alpha waves recorded at 1.5 T using an Optilink/Synamps + QuickCap setup, compared with alpha waves recorded at 3 T using an HF-1 + high impedance ink cap setup. The 1.5 T data shows large ballistocardiogram (BCG) artifacts that obscure the alpha waves, while the HF-1 + high impedance ink cap recording shows clear alpha waves, without BCG artifacts. Figure 12 (panel A) shows an example of alpha waves recorded in the 7 Tesla static field after motion sensor-based adaptive filtering (Bonmassar et al., 2002). Figure 11 illustrates the effectiveness of the shielding enclosure. During one recording session, the cover to the ADC chassis was removed during imaging (middle column of Figure 11), resulting in poor image quality compared to images acquired without simultaneous EEG (left column of Figure 11). In a separate imaging session, with the shielding in place, image noise levels are at nominal levels (right column of Figure 11).

Figure 11
Effectiveness of RF shielding system for HF-1 amplifier and data acquisition units (3 Tesla). Images taken without shielding (middle column) show a drastic reduction in image quality compared to normal MR images (left column) due to noise from digital ...
Figure 12
Examples of human EEG and fMRI recorded at 7 Tesla using the HF-1 system: (A) Alpha waves recorded in the 7 Tesla static field after motion sensor-based adaptive filtering (Bonmassar et al., 2002); (B) Auditory evoked potentials (AEP, left), recorded ...

3.3. Auditory EEG/fMRI at 7 Tesla

Figure 12 shows examples of auditory EEG/fMRI recorded at 7 Tesla using the HF-1 system. The middle panel (12B) shows an example of an auditory evoked potential (AEP, left) recorded during interleaved fMRI at 7 Tesla (right). The activation map (left) is shown overlaid on the gradient echo functional image to illustrate the absence of RF-noise artifacts on the 7T functional images. The lower panel (12C) shows an example of a 40 Hz auditory steady-state response (ASSR, left), shown as a ratio of power spectra comparing stimulus ON versus stimulus OFF periods, also recorded with interleaved fMRI at 7 Tesla (right). Figure 13 shows an example of the fMRI time series fit in the auditory cortex during 7 Tesla EEG/fMRI when the ASSR amplitude is included as covariate in the fMRI regression model, showing a good correspondence between model fit and temporal fluctuations in the fMRI signal (P=0.0145 for partial F-test for inclusion of ASSR amplitude term in time series model). In both Figure 12 and Figure 13, one can observe the “central brightening effect” seen in 7 T MRI, due to the dielectric properties of tissues and a resonance effect observed at 300 MHz when using birdcage head coils (Vaughan et al., 2001; Wiggins et al., 2005).

Figure 13
Example of time-varying ASSR during fMRI in humans at 7 Tesla. The BOLD time series from a single voxel denoted by the crosshairs is show in blue (“fMRI”), while the time series fit employing time-varying fluctuations in the ASSR is shown ...

3.4 Real-time Auditory EEG/fMRI at 3 Tesla

Figure 14 and Figure 15 show real-time processing of ASSR during fMRI at 3 Tesla. The top panel of Figure 14 shows a screen shot of the real-time ASSR (RT-ASSR) module. The left side of the RT-ASSR display shows the most recent update of the ASSR power ratio estimate, in this case showing the results after 19 stimulus presentation epochs (approximately 6 minutes). The right side of the RT-ASSR display shows the running history of ASSR power ratio updates in a 3D plot. The RT-ASSR module can work on all EEG channels simultaneously, and includes options for online amplitude-based artifact rejection as well as lowpass, bandpass, or highpass filtering (not shown). A time-domain averaging module is also included with the HF-1 distribution for real-time processing of time-domain ERPs (Figure 5, showing VEPs). The bottom panel shows a screen shot of real-time fMRI activation maps produced by the Neuro3D feature of the Siemens Numaris 4 Syngo MR B15 MRI acquisition program, acquired at approximately the same time as the RT-ASSR. In Figure 15, we show several snapshots as time progresses during the same ASSR/fMRI study in a different study subject, with fMRI on the left, and a close-up of the RT-ASSR running history display on the right.

Figure 15
Evolution of real-time EEG/fMRI data in humans at 3 Tesla, with fMRI activation maps (left), and detail of the real-time ASSR running history (right).

3.5 Intracranial Visual Evoked Potentials in Non-Human Primates

Figure 16 shows intracranial visual evoked potentials (iVEP) in non-human primates obtained from averaging 100 trials, comparing results obtained outside the scanner (left) and inside the scanner (middle). The initial positive and negative waves of the iVEPs show a similar morphology both outside and inside the scanner. Gradient echo functional images (right) obtained during electrophysiological recording are free of RF-related artifacts.

Figure 16
Example of intracranial VEPs (iVEPs) recorded from non-human primates at 3 Tesla, comparing iVEPs recorded outside (left) and inside the scanner (middle), with gradient echo MR image illustrating lack of RF-related artifacts.

3.6. Sleep Studies

Figure 17 shows alpha wave (top) and slow-wave (bottom) EEG patterns obtained during natural sleep during interleaved fMRI. Ballistocardiogram artifacts were removed using adaptive filtering (Bonmassar et al., 2002). During the first two seconds, the imaging (gradient) artifact can be observed, with a rapid recovery facilitated by HF-1’s DC frequency response. The slow-wave EEG pattern shows a characteristic high-amplitude, low frequency pattern, also facilitated by the DC frequency response of the system. The alpha oscillations show a characteristic 8 to 12 Hz frequency and lower amplitude. These EEG recordings were used for sleep scoring.

Figure 17
EEG recorded during fMRI and sleep in humans at 3 Tesla, showing alpha wave (top) and slow-wave (bottom) sleep patterns.

3.7. Anesthesia Studies

Figure 18 shows ASSR and fMRI data from a study subject who received propofol anesthesia. Compared to baseline, the ASSR decreases at the 1 ug/ml target concentration level, and disappears at the 2 ug/ml level. Meanwhile, at 2 ug/ml, where the subject is unconscious (bottom right), fMRI activity in primary auditory cortex persists (middle right), suggesting that auditory processing is preserved after loss of consciousness.

Figure 18
fMRI (left) and ASSR (left) recorded during induction of general anesthesia in humans at 3 Tesla using propofol.

3.8 Hyperbaric Physiology

Figure 19 shows the ASSR power ratio at the baseline state (top), at 190 feet below sea level (fsw) (middle), and after recovery to normal pressure (bottom). At 190 fsw, the 40-Hz response is greatly attenuated compared to baseline and recovery to normal pressure. During these recordings, the HF-1 acquisition system was exposed to extreme pressures (~6 atmospheres), high rates of pressure change (1 to 6 atmospheres in ~ 3 minutes), as well as large temperature changes (room temperature to 40-degrees Celsius in ~3 minutes). SNR and noise level of the instrument was assessed in a different experiment where the instrument was placed in a hyperbaric instrument chamber, and SNR and noise level did not change in a significant way.

Figure 19
40 Hz ASSR during hyperbaric study (non-MRI, Earth’s magnetic field), comparing baseline (top), 190 feet below sea level (middle), and recovery to sea level (bottom). Note the ASSR power ratio in this figure is plotted on a log scale.

4. Discussion

The HF-1 system is an open source hardware and software system for acquisition and real-time processing of electrophysiology during fMRI. The open source aspect of this system allows end-users to develop and customize all aspects of hardware and software to suite their specific application. The open source nature of the HF-1 hardware is particularly important for MRI-related applications, as it provides researchers with a data acquisition hardware template that meets the stringent and costly requirements of MRI-safety and compatibility as well as electromagnetic compliance. The integrated software subsystems are user-customizable at all levels of organization, from low-level MCU firmware to high-level data acquisition and analysis software. The HF-1 open source software allows end users to rapidly develop customized real-time acquisition and processing applications. Within neuroscience and clinical medicine there is a growing need for such real-time acquisition and processing solutions, for applications including epilepsy, neurofeedback, sleep studies, and electrophysiological drug studies.

Hardware for simultaneous EEG and fMRI have been developed independently in numerous laboratories (Allen et al., 1998; Garreffa et al., 2004; Goldman et al., 2000; Mirsattari et al., 2005), and are also available commercially from a number of manufacturers such as BrainProducts (Munich, Germany) or Neuroscan-Compumedics (El Paso, Texas). Hardware for electrophysiological recordings during fMRI in animals has also been developed (Logothetis et al., 2001). However, none of these systems provide a complete open-source solution integrating MRI-compatible hardware with user-customizable real-time software. The OpenEEG Project, http://openeeg.sourceforge.net/doc/, is an open source EEG hardware system that provides an avenue for low-cost EEG acquisition. The OpenEEG system lacks the MRI-specific design features, the specifications and files for automated hardware assembly, and the degree of software integration found in HF-1. Stand-alone systems and software for real-time processing of EEG/fMRI have also been reported in the literature (Garreffa et al., 2003; Mirsattari et al., 2005). Compared with other data acquisition and real-time processing software, the HF-1 software has the advantage that it has been developed within the user-friendly LabView graphical programming environment, facilitating rapid development of real-time signal processing modules, as well as data acquisition and display modules that can be completely customized to the end-user’s specific needs.

A basic use for real-time signal processing is to assess whether or not an adequate amount of data have been recorded during a particular experiment. For simultaneous ERP/fMRI studies, real-time ERP averaging can be used to examine ERP signal quality to ensure that enough ERP epochs have been recorded. Sources of poor signal quality include subject level of arousal, subject movement, and electrode impedance, for instance, all of which can be difficult to detect during a study. Examining ERP results in real-time can help investigators detect and debug problems immediately, resulting in a tremendous savings of time and effort, not to mention peace of mind. For sleep, anesthesia, or resting-state EEG/fMRI studies, which often examine the spectral content of EEG signals as a variable of interest, real-time analysis of frequency spectra could be useful in monitoring the study subject’s state. In this paper, we have illustrated both real-time ERP averaging and frequency-domain analyses with real-time 40-Hz ASSR calculations.

Beyond ERP averaging and spectral analysis, one can imagine many new and important applications for real-time processing of electrophysiology during fMRI. For epilepsy studies, a real-time spike detection module could be used to determine whether a sufficient number of interictal spikes have been observed during an experiment. Similarly, a real-time sleep scoring module could be used to ensure that adequate amounts of data are being recorded during each desired stage of sleep. Numerous automatic sleep scoring systems have been proposed (Analog, 2004; Anderer et al., 2005; Atamer et al., 2002; Callini et al., 2000; Chang et al., 1988; Heiss et al., 2002; Holzmann et al., 1999; Korpinen et al., 1994; Penzel and Conradt, 2000; Principe et al., 1989; Principe and Smith, 1985, 1986; Ray et al., 1986; Schwaibold et al., 2002) and many are commercially available, but have yet to be developed for simultaneous electrophysiology during fMRI. EEG-based neurofeedback during fMRI is another application for real-time processing. Neurofeedback is a technique where study subjects are taught how to modulate, through their own will, neural signals derived from EEG that are presented to the subject in real-time either visually or aurally (e.g., screen showing cursor position related to EEG signal features). This technique is becoming a widely used tool in neuroscience and clinical research, and by its very nature requires real-time signal processing (Basmajian, 1981; Delorme and Makeig, 2003; Fox, 1979; Herrmann et al., 2004; Hill and Raab, 2005; Riddle and Baker, 2005; Sinkjaer et al., 2003). Real-time processing of electrophysiological signals for neurofeedback during fMRI would provide the means to correlate neurofeedback with simultaneously observed fMRI and identify neural systems involved in neurofeedback. Numerous drugs with sites of action in the central nervous system produce dose-dependent changes in EEG, including general anesthetics (Rampil, 1998), sedative hypnotics (Veselis et al., 1991), opioid analgesics (Scott et al., 1985), and antidepressants (Dumont et al., 2005). With real-time EEG processing during fMRI, drug levels could be titrated to specific EEG-based endpoints, to allow a systematic investigation of brain function at specific drug-induced electrophysiological states. Outside the MRI environment, HF-1’s flexible open source real-time processing and data acquisition could provide a means to implement variable-rate sampling or compression of electrophysiological data in the neurological intensive care unit (NeuroICU). In the NeuroICU, multi-day recordings can generate terabytes of data at the high sampling rates required to observe rare but important high-frequency bursting activity. With variable rate sampling or compression, temporal resolution could be changed in real-time as dictated by the data. The HF-1 open source system has been designed to provide a flexible starting point to rapidly develop real-time processing solutions for a wide range of studies such as these.

Open source dissemination of hardware and software developed from public funding helps fulfill the mandate of publicly funded medical research by making tools freely available to the research community and by providing building blocks for future collaborative development. Open source dissemination of software has enjoyed a long and fruitful history, and such developments within the neuroscience community have made a tremendous impact. Open source dissemination of hardware has been slower to develop, largely because of the relatively greater difficulty associated with constructing hardware devices compared to installing or modifying software code. However, resources for rapid construction of electronic devices have become readily available. For instance, companies offering services to build print circuit boards, place and solder components, and test assembled devices can be contracted for a modest fee in most locales or via the internet. The HF-1 system takes advantage of these resources by providing detailed construction files that allow the system to be constructed in a largely automated fashion using such services. In the near term, the increasing availability of such resources will make open source hardware developments such as HF-1 accessible to many research laboratories. In the longer term, the ongoing development of self-contained electronic fabrication laboratories (e.g., “FAB LAB,” http://fab.cba.mit.edu/, (Mikhak et al., 2002)) will allow researchers with even very modest resources to take advantage of open source hardware.

5. Conclusions

The HF-1 open-source hardware and software system presented here is a fully-functional integrated hardware and software system for electrophysiological recordings during MRI. This open source system provides the building blocks for custom MRI-compatible data acquisition hardware, as well as custom data acquisition and real-time signal processing tools that can be rapidly developed within the LabView environment. This is a unique project in that this distribution provides not only open-source software and hardware schematics, but also detailed construction and manufacturing specifications to help end-users build their own system for electrophysiology during MRI with high accuracy and low cost. This system has been used by multiple research groups on applications including studies of auditory, somatosensory, and visual systems, real-time EEG/fMRI, clinical studies including sleep, anesthesia, and hyperbaric physiology, and intracranial recordings from animals.

Acknowledgements

This work was supported by grants from the United Stated Department of Health and Human Services, grant numbers NIH/NINDS K25-NS05758 (Purdon), NIH/NCRR M01-RR-01066 (Bonmassar) and P41-RR14075 (Bonmassar), NIH/NIBIB R01-EB006385 (Bonmassar), and Naval Submarine Medical Research Laboratory Grant N66596-07-IPA-001 (Bonmassar). The technologies described in this manuscript are protected by two patents: Bonmassar G, Belliveau JW, inventors. Electroencephalograph sensor for use with magnetic resonance imaging and methods using such arrangements. US patent PCT/US03/05614. 2003 February 2; Bonmassar G, Purdon PL, inventors. Apparatuses and methods for electrophysiological signal delivery and recording during MRI. PCT/US2005/042401.

We would like to acknowledge the help of our many colleagues in developing this system:

MGH Martinos/Radiology: Bruce Rosen, Jack Belliveau, Christos E. Vasios, Jyrki Ahveninen, Leonardo Angelone, Alfreda M. Purdon, Yuka Sasaki, Yuko Yotsumono

MGH Department of Anesthesia: Emery N. Brown, Eric T. Pierce, John Walsh, P. Grace Harrell, Jean Kwo, Rebecca C. Merhar, Camilo Lamus, Catherine M. Mullaly

MGH Department of Neurology: Margaret Barlow

MGH Mallinckrodt General Clinical Research Center: Mary Sullivan, Sharon Maginnis, Debra Skoniecki, Helen-Anne Higgins

Massachusetts Eye and Ear Infirmary: Daniel Deschler, Jennifer Melcher

Massachusetts Institute of Technology: Camilo Lamus

National Institute of Advanced Industrial Science and Technology, METI, Japan: Sunao Iwaki

Los Alamos National Laboratory: John George

Catholic University of Leuven, Leuven, Belgium: Wim Van Duffel,

University of Amsterdam, Amsterdam, Netherlands: Timo van Kerkoerle

United States Naval Submarine Medical Research Laboratory: Michael “Q” Qin

Footnotes

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

References

  • Allen PJ, Josephs O, Turner R. A method for removing imaging artifact from continuous EEG recorded during functional MRI. Neuroimage. 2000;12:230–239. [PubMed]
  • Allen PJ, Polizzi G, Krakow K, Fish DR, Lemieux L. Identification of EEG events in the MR scanner: the problem of pulse artifact and a method for its subtraction. Neuroimage. 1998;8:229–239. [PubMed]
  • Analog D. Revision G. Norwood, MA: Analog Devices; 2004. AD620: Low Cost Low Power Instrumentation Amplifier.
  • Anami K, Mori T, Tanaka F, Kawagoe Y, Okamoto J, Yarita M, Ohnishi T, Yumoto M, Matsuda H, Saitoh O. Stepping stone sampling for retrieving artifact-free electroencephalogram during functional magnetic resonance imaging. Neuroimage. 2003;19:281–295. [PubMed]
  • Anderer P, Gruber G, Parapatics S, Woertz M, Miazhynskaia T, Klosch G, Saletu B, Zeitlhofer J, Barbanoj MJ, Danker-Hopfe H, Himanen SL, Kemp B, Penzel T, Grozinger M, Kunz D, Rappelsberger P, Schlogl A, Dorffner G. An E-health solution for automatic sleep classification according to Rechtschaffen and Kales: validation study of the Somnolyzer 24 × 7 utilizing the Siesta database. Neuropsychobiology. 2005;51:115–133. [PubMed]
  • Angelone LM, Potthast A, Segonne F, Iwaki S, Belliveau JW, Bonmassar G. Metallic electrodes and leads in simultaneous EEG-MRI: specific absorption rate (SAR) simulation studies. Bioelectromagnetics. 2004;25:285–295. [PubMed]
  • Angelone LM, Vasios CE, Wiggins G, Purdon PL, Bonmassar G. On the effect of resistive EEG electrodes and leads during 7 Tesla MRI: Simulation and temperature measurement studies. Magn Reson. Imaging. 2006 (in press) [PubMed]
  • Atamer A, Delaney M, Young LR. An expert system for fault management assistance on a space sleep experiment. Arch Ital Biol. 2002;140:303–313. [PubMed]
  • Basmajian JV. Biofeedback in rehabilitation: a review of principles and practices. Arch Phys Med Rehabil. 1981;62:469–475. [PubMed]
  • Bonmassar G, Hadjikhani N, Ives JR, Hinton D, Belliveau JW. Influence of EEG electrodes on the BOLD fMRI signal. Hum. Brain Mapp. 2001;14:108–115. [PubMed]
  • Bonmassar G, Purdon PL, Jaaskelainen IP, Chiappa K, Solo V, Brown EN, Belliveau JW. Motion and ballistocardiogram artifact removal for interleaved recording of EEG and EPs during MRI. Neuroimage. 2002;16:1127–1141. [PubMed]
  • Callini G, Essig SM, Heher DM, Young LR. Effectiveness of an expert system for astronaut assistance on a sleep experiment. Aviat Space Environ Med. 2000;71:1023–1032. [PubMed]
  • Chalamala BR, Temple D. Big and bendable. IEEE Spectrum. 2005;42:50–56.
  • Chang TG, Smith JR, Principe JC. An expert system for multichannel sleep EEG/EOG signal analysis. Biomed Sci Instrum. 1988;24:19–25. [PubMed]
  • Chen DW. Boy, 6, Dies of Skull Injury During M.R.I. The New York Times; 2001.
  • Cox RW. AFNI: software for analysis and visualization of functional magnetic resonance neuroimages. Comput. Biomed. Res. 1996;29:162–173. [PubMed]
  • Delorme A, Makeig S. EEG changes accompanying learned regulation of 12-Hz EEG activity. IEEE Trans Neural Syst Rehabil Eng. 2003;11:133–137. [PubMed]
  • Dumont GJ, de Visser SJ, Cohen AF, van Gerven JM. Biomarkers for the effects of selective serotonin reuptake inhibitors (SSRIs) in healthy subjects. Br J Clin. Pharmacol. 2005;59:495–510. [PMC free article] [PubMed]
  • Fox CD. Feedback control of hemispheric EEG alpha. Percept Mot Skills. 1979;48:147–155. [PubMed]
  • Garreffa G, Bianciardi M, Hagberg GE, Macaluso E, Marciani MG, Maraviglia B, Abbafati M, Carni M, Bruni I, Bianchi L. Simultaneous EEG-fMRI acquisition: how far is it from being a standardized technique? Magn Reson. Imaging. 2004;22:1445–1455. [PubMed]
  • Garreffa G, Carni M, Gualniera G, Ricci GB, Bozzao L, De Carli D, Morasso P, Pantano P, Colonnese C, Roma V, Maraviglia B. Real-time MR artifacts filtering during continuous EEG/fMRI acquisition. Magn Reson. Imaging. 2003;21:1175–1189. [PubMed]
  • Goldman RI, Stern JM, Engel J, Jr, Cohen MS. Acquiring simultaneous EEG and functional MRI. Clin. Neurophysiol. 2000;111:1974–1980. [PubMed]
  • Hall DA, Haggard MP, Akeroyd MA, Palmer AR, Summerfield AQ, Elliott MR, Gurney EM, Bowtell RW. "Sparse" temporal sampling in auditory fMRI. Hum. Brain Mapp. 1999;7:213–223. [PubMed]
  • Hall DA, Summerfield AQ, Goncalves MS, Foster JR, Palmer AR, Bowtell RW. Time-course of the auditory BOLD response to scanner noise. Magn Reson. Med. 2000;43:601–606. [PubMed]
  • Heiss JE, Held CM, Estevez PA, Perez CA, Holzmann CA, Perez JP. Classification of sleep stages in infants: a neuro fuzzy approach. IEEE Eng Med Biol Mag. 2002;21:147–151. [PubMed]
  • Herrmann BL, Wessendorf TE, Ajaj W, Kahlke S, Teschler H, Mann K. Effects of octreotide on sleep apnoea and tongue volume (magnetic resonance imaging) in patients with acromegaly. Eur J Endocrinol. 2004;151:309–315. [PubMed]
  • Hill H, Raab M. Analyzing a complex visuomotor tracking task with brain-electrical event related potentials. Hum Mov Sci. 2005;24:1–30. [PubMed]
  • Holzmann CA, Perez CA, Held CM, San Martin M, Pizarro F, Perez JP, Garrido M, Peirano P. Expert-system classification of sleep/waking states in infants. Med Biol Eng Comput. 1999;37:466–476. [PubMed]
  • Huang-Hellinger FR, Breiter HC, McCormack G, Cohen MS, Kwong KK, Sutton JP, Savoy RL, Weisskoff RM, Davis TL, Baker JR, Belliveau JW, Rosen BR. Simultaneous functional magnetic resonance imaging and electrophysiological recording. Hum. Brain Mapp. 1995;3:13–23.
  • Instruments T. ADS1254: 24-bit, 20kHz, low power analog-to-digital converter. Dallas, TX: Texas Instruments, Inc.; 2001.
  • Ives JR, Warach S, Schmitt F, Edelman RR, Schomer DL. Monitoring the patient's EEG during echo planar MRI. Electroencephalogr. Clin. Neurophysiol. 1993;87:417–420. [PubMed]
  • Korpinen L, Partinen M, Telakivi T, Martikainen K, Pietila T, Peltola J, Falck B, Frey H. Evaluation of Sleep Expert--a computer-aided decision support system for sleep disorders. Med Inform (Lond) 1994;19:247–252. [PubMed]
  • Lemieux L, Allen PJ, Franconi F, Symms MR, Fish DR. Recording of EEG during fMRI experiments: patient safety. Magn Reson. Med. 1997;38:943–952. [PubMed]
  • Lemieux L, Salek-Haddadi A, Josephs O, Allen P, Toms N, Scott C, Krakow K, Turner R, Fish DR. Event-related fMRI with simultaneous and continuous EEG: description of the method and initial case report. Neuroimage. 2001;14:780–787. [PubMed]
  • Logothetis NK, Pauls J, Augath M, Trinath T, Oeltermann A. Neurophysiological investigation of the basis of the fMRI signal. Nature. 2001;412:150–157. [PubMed]
  • Mandelkow H, Halder P, Boesiger P, Brandeis D. Synchronization facilitates removal of MRI artefacts from concurrent EEG recordings and increases usable bandwidth. Neuroimage. 2006;32:1120–1126. [PubMed]
  • Mei J, Lovell MR, Mickle MH. Formulation and Processing of Novel Conductive Solution Inks in Continuous Inkjet Printing of 3-D Electric Circuits. IEEE Trans. Electronics Packaging Manufacturing. 2005;28:857–869.
  • Mikhak B, Lyon C, Gorton T, Gershenfeld N, McEnnis C, Taylor J. FAB LAB: An Alternate Model of ICT for Development. 2nd International Conference on Open Collaborative Design for Sustainable Innovation.2002.
  • Mirsattari SM, Ives JR, Bihari F, Leung LS, Menon RS, Bartha R. Real-time display of artifact-free electroencephalography during functional magnetic resonance imaging and magnetic resonance spectroscopy in an animal model of epilepsy. Magn Reson. Med. 2005;53:456–464. [PubMed]
  • Niazy RK, Beckmann CF, Iannetti GD, Brady JM, Smith SM. Removal of FMRI environment artifacts from EEG data using optimal basis sets. Neuroimage. 2005;28:720–737. [PubMed]
  • Penzel T, Conradt R. Computer based sleep recording and analysis. Sleep Med Rev. 2000;4:131–148. [PubMed]
  • Percival DB, Walden AT. Spectral analysis for physical applications. New York: Cambridge University Press; 1993.
  • Portas CM, Krakow K, Allen P, Josephs O, Armony JL, Frith CD. Auditory processing across the sleep-wake cycle: simultaneous EEG and fMRI monitoring in humans. Neuron. 2000;28:991–999. [PubMed]
  • Principe JC, Gala SK, Chang TG. Sleep staging automaton based on the theory of evidence. IEEE Trans Biomed Eng. 1989;36:503–509. [PubMed]
  • Principe JC, Smith JR. Automatic recognition of spike and wave bursts. Electroencephalogr Clin Neurophysiol Suppl. 1985;37:115–132. [PubMed]
  • Principe JC, Smith JR. SAMICOS--a sleep analyzing microcomputer system. IEEE Trans Biomed Eng. 1986;33:935–941. [PubMed]
  • Rampil IJ. A primer for EEG signal processing in anesthesia. Anesthesiology. 1998;89:980–1002. [PubMed]
  • Ray SR, Lee WD, Morgan CD, Airth-Kindree W. Computer sleep stage scoring--an expert system approach. Int J Biomed Comput. 1986;19:43–61. [PubMed]
  • Riddle CN, Baker SN. Manipulation of peripheral neural feedback loops alters human corticomuscular coherence. J Physiol. 2005;566:625–639. [PubMed]
  • Schomer DL, Bonmassar G, Lazeyras F, Seeck M, Blum A, Anami K, Schwartz D, Belliveau JW, Ives J. EEG-Linked functional magnetic resonance imaging in epilepsy and cognitive neurophysiology. J Clin. Neurophysiol. 2000;17:43–58. [PubMed]
  • Schwaibold M, Schochlin J, Bolz A. Automated sleep stage detection with a classical and a neural learning algorithm--methodological aspects. Biomed Tech (Berl) 2002;47(Pt 1) Suppl 1:318–320. [PubMed]
  • Scott JC, Ponganis KV, Stanski DR. EEG quantitation of narcotic effect: the comparative pharmacodynamics of fentanyl and alfentanil. Anesthesiology. 1985;62:234–241. [PubMed]
  • Shafer SL, Gregg KM. Algorithms to rapidly achieve and maintain stable drug concentrations at the site of drug effect with a computer-controlled infusion pump. J Pharmacokinet. Biopharm. 1992;20:147–169. [PubMed]
  • Sinkjaer T, Haugland M, Inmann A, Hansen M, Nielsen KD. Biopotentials as command and feedback signals in functional electrical stimulation systems. Med Eng Phys. 2003;25:29–40. [PubMed]
  • United States Food and Drug Administration CfDaRH. A Primer on Medical Device Interactions with Magnetic Resonance Imaging Systems. 1997.
  • United States. Dept. of the Navy. US Navy diving manual, Revision 1, 1 June 1985. ed. Washington, D.C.: Navy Dept.; 1985.
  • Vasios CE, Angelone LM, Purdon PL, Ahveninen J, Belliveau JW, Bonmassar G. EEG/(f)MRI measurements at 7 Tesla using a new EEG cap ("InkCap") Neuroimage. 2006 [PubMed]
  • Vaughan JT, Garwood M, Collins CM, Liu W, DelaBarre L, Adriany G, Andersen P, Merkle H, Goebel R, Smith MB, Ugurbil K. 7T vs. 4T: RF power, homogeneity, and signal-to-noise comparison in head images. Magn Reson Med. 2001;46:24–30. [PubMed]
  • Veselis RA, Reinsel R, Alagesan R, Heino R, Bedford RF. The EEG as a monitor of midazolam amnesia: changes in power and topography as a function of amnesic state. Anesthesiology. 1991;74:866–874. [PubMed]
  • Wiggins GC, Potthast A, Triantafyllou C, Wiggins CJ, Wald LL. Eight-channel phased array coil and detonable TEM volume coil for 7 T brain imaging. Magn Reson Med. 2005;54:235–240. [PubMed]