Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Customer Solutions

A Neurophysiological Experiment Execution in Real Time

Author(s):

Chris Bryant, University of Pittsburgh

Industry:

University/Education

Product:

Data Acquisition, LabVIEW, LabVIEW Real-Time, PXI/CompactPCI

The Challenge:

Developing a neurophysiological data acquisition and control system capable of executing custom experiment scripts while guaranteeing a system response time of 1 ms (determinism) and allowing all user control and monitoring to take place from within Microsoft Windows (a nondeterministic environment).

The Solution:

Creating a deterministic application using National Instruments LabVIEW Real-Time and real-time PXI hardware to control and monitor experiment execution while seamlessly communicating via TCP/IP with a Windows-based host application (also written in NI LabVIEW) for flexible, intuitive user interaction.


image
System Schematic

The Problem: Determinism versus Windows-Based Control
Many experiments in neurophysiological research necessitate carefully timed acquisition and control of behavioral and neural signals. In any system used to control these experiments, precise timing is of paramount importance because both signals generated and data acquired must be input or output within timing ranges specified by research protocols. Because the integrity of the research is dependent on the integrity (and verifiability) of the data, failure to maintain protocol specifications simply is not an option. In addition to this constraint, flexibility and ease of use are high priorities, to provide maximum use across a constantly expanding variety of experiments as well as minimum time required to train operators on new experiments.

In our application, we were required to develop a system capable of stimulating and acquiring neurophysiological data over a wide range of experimental conditions. The considerations introduced above manifested themselves in the following design specifications:


1. Our system was required to monitor and record several behavior actions (i.e., analog inputs) from a subject (at 1 kHz) and to present sensory (i.e., digital) stimuli at precise times based on operator input as well as the reaction of the subject to specific events. The time taken by the system to respond to subject behavior was required to be within 1 ms (i.e., the system required deterministic control of events).
2. The system was required to monitor and record neural activity at a high rate of resolution (in the MHz range).
3. The interface to the system was to be:

  • Intuitive – using familiar, Windows-based components (dialog boxes, menus, mouse, etc.)
  • Comprehensive – presenting a constantly updated picture of all system activity
  • Highly flexible – for orderly configuration and maintenance of numerous system parameters, as well as an unlimited number of possible experiments.


The primary difficulties presented in these specifications were twofold: first, obtaining deterministic control to satisfy the rigid timing constraints of the project, and secondly, providing this control from within the context of a Windows environment.

The Solution: NI Real-Time Hardware and Software
The solution to these difficulties was achieved using a combination of NI real-time tools and products.

All time-critical tasks including data collection and real-time control were handled deterministically by the real-time (RT) system running a custom application written using LabVIEW Real-Time. Constructed using the PXI architecture, the real-time system components included:

  • an NI PXI-8145 RT real-time controller used to run the LabVIEW Real-Time acquisition and control application while enforcing determinism
  • an NI PXI-6031E multifunction input/output (I/O) module used to acquire user-configurable analog signals
  • an NI PXI-6533 digital I/O module used to output user-configurable stimuli
  • an NI PXI-6602 counter/timer module used to acquire neural activity with a 20 MHz resolution

All components were synchronized over a common backplane via a PXI-1000B chassis and were interfaced using NI terminal blocks (TB-2715, SCB-100) and cables (SH68-68-EP, SH100100).

Tasks that were less time-critical, such as data display, user interaction, and file storage, were handled by the host system (where real-time operation was not needed or enforced). The host system was comprised of a standard Dell PC (OptiPlex GX260, 2.4 GHz Pentium 4 processor, 512 MB RAM) running Windows 2000 and a separate LabVIEW-based application intended to interface with the operator. All communication and data exchange between the real-time system and the host system took place over a TCP/IP connection established and maintained between the two systems. Intersystem data exchange occurred continuously, so an ever-current picture of all real-time system activity could be displayed on the host as well as instant updating on the RT system of any parameters updated on the host. Furthermore, this connection remained completely transparent to the operator, who interacted with the host system as if it were a stand-alone system – in effect operating a real-time system from within a Windows environment.

Intuitive, Flexible Control Using LabVIEW
Having transferred operator control to the Windows operating system, native elements of Windows could be combined with the considerable power of the LabVIEW programming language to easily provide intuitive control interfaces to our system. In order for operators to design and execute a wide range of experiments, a script format was developed and integrated into the system so that the operators could create experiments in a stepwise format and then execute them step by step, branching as needed based on subject response to specified stimuli.

Upon completion of the project, all design specifications were met in a cost-effective solution that paired the user-friendly strengths of a general-purpose operating system (Windows) with the reliable determinism of a real-time operating system. When compared to the existing DOS-based system that this application replaced, our NI-based solution provided many times the functionality and flexibility while guaranteeing a system response time half that of the existing system. Furthermore, with a more functional Windows-based interface, interaction with the new system was streamlined and more intuitive, reducing training costs and setup time from hours to minutes, and greatly reducing operator errors. Finally, we were able to escape the considerable cost of building, reproducing, and maintaining a 19-in. rack full of custom electronic components used in the previous system through the use of off-the-shelf components. With the assistance of NI products and the power of LabVIEW Real-Time, we were able to acquire better data in less time, increasing the reliability of our research as well as our throughput.

For more information, contact:
Chris Bryant
Software/Systems Engineer
University of Pittsburgh
E-mail: bryantcl@upmc.edu