Prototyping and Deploying a Neurosurgery Training Device Using NI LabVIEW, R Series, and Embedded Hardware

  Print Print

"NI hardware and software tools provided an easy-to-use solution that allowed us to quickly prototype and reuse much of the code in our final deployment."

- Michael Russell, Active Diagnostics

The Challenge:
Creating a reliable and deterministic training device that simulates electrical signals from the human nervous system to train neurophysiologists for events that may happen during surgery.

The Solution:
Quickly prototyping a neurosimulator using NI LabVIEW and R Series hardware and deploying our final product using NI CompactRIO to help effectively train neurophysiologists, making surgery safer for patients.

Author(s):
David Miller - Active Diagnostics
Michael Russell - Active Diagnostics

Surgical neurophysiologists use electrical signals from the nervous system [electroencephalograms (EEGs), somatosensory potentials, and action potentials] to monitor the brain and spine during high-risk procedures. The monitoring is used to prevent catastrophic injuries to the patient that may result in paralysis or death.

A major limitation in providing these services is the lack of individuals with experience and training. It is difficult to train neurophysiologists for events that may only occur once in a hundred surgeries, especially if the surgery is only performed occasionally and lasts for many hours.

Active Diagnostics, a surgical monitoring company, has several thousand surgical neuromonitoring recordings stored in a digital format. We wanted to use our database of rare neurological events to develop a simulator that would replicate these event signals that are typical of the human body. In addition, we also wanted to simulate the placement of needle and pad electrodes in the same manner that would occur during surgery and record the signals just as they would from a human body.

Our Solution

 Using LabVIEW software and reconfigurable I/O (RIO) hardware, we developed a real-time neurosimulator and training aid.

The simulator included the following elements:

  • 16 free-running EEG output channels 
  • 8 triggered SSEP output channels
  • 24 triggered SMTEP/EMG output channels
  • 8 analog trigger input channels

The Prototype

 We prototyped the first-generation simulator on the NI PXI platform. We chose NI hardware because of its seamless integration with LabVIEW and quick setup time. The 5-slot PXI chassis included the R Series multifunction RIO module, two NI PXI-6733 8-channel analog output modules, and a PXI Express interface to connect to the development computer.

The PXI platform was the perfect choice for our prototype system. Because we were developing on the fly, we needed a flexible architecture that was expandable with many I/O module options. Instead of building our own cables, we used NI cables and the NI SCB-68 connector block to interface the simulator to the monitoring equipment. The SCB-68 connector block was great for debugging and the integrated breadboard area made it easy to add components.

Our Final Product 

To give our trainees the most realistic experience, we wanted to embed the system inside the cavity of a mannequin (code-named “Harvey”) for final deployment. This required a unit that was small enough to fit inside the cavity and would not overheat. CompactRIO was a great solution because of its size and rugged form factor.

Most of the software developed for the PXI prototype was ported to the CompactRIO system, saving time and about $8,000 USD in development costs. The 4-slot CompactRIO chassis includes an NI cRIO-9012 real-time controller, three NI 9264 16-channel analog output modules, and one NI 9205 16-channel analog input module. The hardware is wired to 48 stimulus channels and eight trigger channels throughout the body.

We control the system from a GUI interface on a laptop via an Ethernet cable. The chassis, PCB, and cables are all hidden within the mannequin and the only components visible are the CompactRIO power and Ethernet cables. Other than a simple voltage divider to condition output voltages to microvolt levels, the entire system was built using off-the-shelf hardware.

Modular and Reusable Software Design – From Prototype to Final Product

We chose LabVIEW as the software solution because of our previous experience using the software. Because LabVIEW lends to modular and reusable code development, we were able to reuse a large library of functions developed on other projects. In addition, LabVIEW provided all the functions we needed to prototype quickly. The debugger helped us promptly fix hardware and software bugs, and it was easy to make changes for the final deployment. Using LabVIEW, we programmed in a third of the time compared to other programming languages such as Visual Basic, ANSI C, or C++.

The software includes an interactive GUI interface to select, execute, and monitor simulated surgical procedures; a script builder to build surgical procedures sequence files; and the field-programmable gate array (FPGA) VI to control the I/O to and from the stimulus signals. The main interface provides the instructor with an interface to select and execute a surgical procedure sequence (script) file and real-time updates that include pop-up windows and voice files informing the instructor of upcoming events.

Included with the software is a script builder interface, which allows instructors to define surgical procedures. The procedure is a sequential set of timed events that are stored in a Microsoft Excel spreadsheet. The events can be a voice file, pop-up instructions, or one of the thousands of digital neuromonitoring recording available to output to the mannequin. The instructor can also add noise to the output signal or randomly mix multiple neuromonitoring output files to disguise the signals.

Some of the unique features of LabVIEW used for this application included the ActiveX VIs to read and write to Microsoft Excel, the semaphore VIs to synchronize communications between other VIs, and the sound VIs to play doctor, nurse, and anesthesiologist voice files to simulate the operating room.

We designed and built the FPGA software code so each analog out channel operates independently, allowing different sample frequencies and buffer sizes. The output signal can be a continuous or triggered event and change as the amplitude of the trigger increases.  

Making Surgery Safer

The simulator provides an effective replication of the multitudes of signals that emanate from the human body in the context of high-risk surgeries. Just as pilot training on simulators makes flying safer for airline passengers, simulator training for neurophysiologists makes surgery safer for patients. NI hardware and software tools provided an easy-to-use solution that allowed us to quickly prototype and reuse much of the code in our final deployment.

Author Information:
Michael Russell
Active Diagnostics
Tel: 530 668-8988
mrussell@activediagnostics.com

Bookmark and Share


Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community


Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI