Customer Solutions
LabVIEW Control System Assures Artificial Heart Does Not Skip a Beat
Author(s):
Sorin Grama, Cal-Bay Systems; Eric T. Lee, Cal-Bay Systems; Jason R. Wiedman, Cal-Bay Systems
Industry:
Life Science
Product:
Data Acquisition, LabVIEW
The Challenge:
Developing a closed-loop control system to test the reliability of blood pumps used in circulatory support systems.
The Solution:
Using the multithreaded features of LabVIEW along with a PC-based data acquisition board for dependable control of four pumps for an extended period of time.
Abstract
An implantable ventricular assist device (VAD) is a pneumatically controlled device (pump) used to assist a patient’s ailing heart until a donor heart becomes available for a transplant. A closed-loop control system had to be developed to use during reliability testing of a new pump design and to enable the fine-tuning of a new control algorithm. A laboratory version of the system controlled eight pumps, uninterruptedly, for a period of over six months while a portable version of the same system was used in field validation trials on animals. The LabVIEW software running on a laptop controlled a VAD that assisted the natural heart rhythm of a test subject for a period of up to 45 consecutive days. The experiments conducted with this system provided critical data during the design verification and validation process for the new pump, thereby obtaining valuable information necessary for the FDA approval process. To date, Thoratec has received permission from the FDA to begin clinical trials on human subjects.
Introduction
A pneumatic implantable VAD system consists of three major components: a blood pump, two cannulae and an external drive console (Figure 1). The blood pump is connected to the heart with two connecting tube cannulae – one providing inflow and the other providing outflow. The external drive console provides alternating pulses of vacuum and pressure to fill and empty the blood pump and maintains control of the pump by using various control algorithms running on a microcontroller.
An infrared proximity sensor mounted inside the pump detects when the pump is filled with blood and sends a signal to the driver to initiate the empty cycle. In essence, the VAD is a closed loop control system with one analog input, the proximity sensor, and one digital output, the signal that triggers the console to empty or fill the pump. The fill/empty cycle of the pump runs at a rate of about one second, whereas the control loop for the entire system runs at a rate of four milliseconds. Therefore, strict timing must be maintained by the console to ensure this artificial heart system doesn’t skip a beat.
Thoratec Corp. of Pleasanton, CA is a leading manufacturer of VAD systems approved by the United States Food and Drug Administration (FDA). During the development of this new implantable VAD, Thoratec needed to test the reliability of the new device and to design new control algorithms that would later have to be programmed into a custom micro-controller circuit. In order to carry out these tasks, Thoratec Laboratories called upon Cal-Bay Systems, a system integrator in Northern California and Select integration partner in the NI Alliance Program, to develop a control system using LabVIEW and National Instruments data acquisition hardware.
Maintaining consistent control of the pump during long-term bench testing and field animal studies was essential. The system had to be robust, yet flexible. Typically, in this type of application, an embedded real-time control system is used to maintain precise closed loop control. But in this particular application, because the pump fill/empty cycle was in the order of one second, the control loop could vary slightly without causing the pump to skip a beat. We decided to implement this system with a regular PC and off-the-shelf hardware and software. The use of a PC-based virtual instrumentation system provided huge savings in cost and allowed us to get the system up and running in a matter of days, not months.
The Hardware
After preliminary research and benchmarks were performed, we decided that one computer equipped with a National Instruments E-series data acquisition board would be used to control a bank of four pumps. Running two identical setups on Pentium III computers with Windows 98, we were able to maintain the four msec control loop cycle on eight separate pumps running in parallel without any problems.
We chose the PCI E-series board because it provided multiple functions such as digital and analog triggering for sampling the data and advanced counter/timer features for powering the proximity sensor. Later on, when the field validation testing was conducted, we switched to an equivalent DAQ board designed for a laptop and used the exact same software without modifications.
During actual running conditions, the proximity sensor is powered on for only a short period of time during each four ms cycle. This increases the lifetime of the sensor, but increases the complexity of the controller, which needs to supply a constant pulsing digital waveform (TTL) that turned the sensor on, triggered data sampling after a brief sensor “warm-up” period, and turned the sensor off every four ms cycle. When the design team wanted to implement this feature, we were able to deliver it easily thanks to the functionality of the E-series DAQ board. Using the general-purpose counters, we triggered the generation of two digital waveforms delayed in time. One was used to power the proximity sensor and the other was used to trigger the data acquisition shortly thereafter. The task of wiring the device was simplified by using the internal signal routing features of the DAQ board (PFI pins) to internally connect the output of the counter to the analog input start signal.
The Software
The LabVIEW programming environment was the clear choice for this project due to its ease of use and flexibility. The main challenge for this system (Figure 3) was to implement the new control algorithms and maintain control of the pump at a closed loop rate of four msec. Considering the fact that the fill/empty cycle of the pump runs at a rate of about once a second, the pump control loop times could vary slightly without causing the pump to skip a beat. In order to maintain this tight loop control, we utilized the advanced LabVIEW features.
First, the data was collected based on a trigger event, it was then passed to a routine that performed linearization and differentiation, and finally it went on to an analysis routine which performed the algorithm that determined when a digital I/O line should go high or low. This entire cycle had to be done within four milliseconds or less.
The general requirements of the software were very simple, but they had to be implemented in a very efficient manner. The analysis VI was configured to run on a separate thread at normal priority. We experimented with different priorities, but concluded that running two separate threads, one for the main VI and one for the algorithm subVI was the most efficient.
Saving data to disk greatly affected the timing of the control loop. The users only needed to collect data for a few pump cycles and they could turn it on or off when needed. In order to collect data for a few cycles and not affect the loop timing, we first buffered the data in a queue and then saved it all at once at the end of the collection period. This prevented processor-intensive hard drive access from corrupting the collected data.
Conclusion
This simple control and data acquisition system allowed Thoratec engineers to develop new control algorithms and to test the reliability of their new blood pump design. To date, all eight pumps have been operating for over six months, and the tests are ongoing. In addition, during field validation animal trials, this system controlled the pumps of two different test subjects for periods up to 45 consecutive days without interruption. Both the reliability testing bench s ystem and the portable field test system proved to be stable and reliable. The studies done with this system provided valuable information for the FDA approval process. As a result of this and other studies, Thoratec received permission from the FDA to begin clinical trials on human subjects.