Developing a Closed-Loop Control Method for an Automated Anesthesia System Using NI LabVIEW Software
"When engineers and scientists want to incorporate a new idea into clinical testing as quickly as possible, they need an easy-to-use programming language that gives them the best results in the least amount of time and LabVIEW is well-suited for this purpose."
- Dr. Thomas M.. Hemmerling,
Department of Anesthesiology, McGill University
Automating the control of general anesthesia delivery and monitoring the patient during surgical procedures so anesthesiologists can focus more on other patients during surgery.
Developing a closed-loop control system using NI LabVIEW graphical programming software that automatically monitors a patient’s depth of consciousness, level of pain, and muscle relaxation to calculate and then administer appropriate doses of anesthetic drugs.
Dr. Thomas M.. Hemmerling - Department of Anesthesiology, McGill University
When conducting a surgical procedure, doctors typically administer anesthetics to block all sensation for the patient including the feeling of pain or distress. Based on the type of procedure, patients can receive a local, spinal, or general anesthetic. When using local or spinal techniques, only the surgical site is anesthetized and the patient remains partly conscious, while general anesthetics render the patient unconscious and in a state of paralysis during the surgery.
General anesthesia consists of drugs that produce three reactions: hypnosis to remove the patients’ consciousness and put them in a deep sleep, analgesia to block the conscious sense of pain, and relaxation to prevent unwanted muscle movement. Before surgeons begin their procedures, anesthesiologists choose the appropriate doses of the medications to achieve all three of these reactions. Throughout the surgery, anesthesiologists must manage the levels of medications they administer, which can consume more than 20 percent of their time.
Bringing LabVIEW into the Operating Room with McSleepy
To reduce the time anesthesiologists spend administering anesthetic doses and permit more time for them to manage other aspects of the surgery, our team of anesthesiologists and biomedical engineers at McGill University developed a prototype for an automated anesthesia system. Known as “McSleepy,” after doctors McDreamy and McSteamy on the popular television show “Grey’s Anatomy,” the goal of this system is to assist anesthesiologists, not replace them. Also, McSleepy is not intended to perform better than an anesthesiologist, but it has the ability to do so on any given day.
McSleepy is a closed-loop control system that monitors a patient’s depth of consciousness, level of pain, and muscle movements throughout surgery and intravenously administers appropriate doses of the respective medications based on the acquired data. To use McSleepy, anesthesiologists insert an IV and apply the sensors that measure muscle movement to the patient. They must then input patient information including age, height, weight, and sex; the type of surgery being performed; and any preferences the anesthesiologist has regarding the drug doses for the patient.
After the system begins to administer the drugs, McSleepy monitors and controls the drug doses every minute through a mathematical algorithm we developed using LabVIEW graphical programming software. The patient’s data is then displayed on a GUI, which we also developed using LabVIEW, so that the anesthesiologist can see how the patient responds to the anesthetics administered by McSleepy. By using LabVIEW to develop the GUI, we integrated familiar graphical elements such as dials that look like speedometers and thermometers and color coding to track the patient’s level of consciousness using a bispectral index. We also used our novel “Analgoscore” to track the patient’s level of pain.
Designing McSleepy to Be a Safe, Smart System
To avoid giving the patient too much or too little medication in the event that McSleepy does not function properly, we built multiple safety features into the closed-loop control system. First, anesthesiologists can manually override any aspect of the system. For example, if the computer stops receiving signals from one of the sensors, the machine automatically enters basic manual mode. Throughout the procedure, the machine calculates the average amount of anesthetics given to the patient during each 15-minute period. In the event that the system does not work properly, it can then administer the average amount of anesthetics to keep the patient asleep and pain-free until either the problem is resolved or the anesthesiologist begins to manually control the anesthesia.
Additionally, if anesthesiologists operate the system in semiautomatic mode so that they can manually input doses of medications, and they input something that does not seem right, such as accidentally entering too much of a certain drug, the machine warns the anesthesiologists that the dose is too high.
Another important feature of McSleepy is that we built the program with artificial intelligence. The machine can learn things such as the surgeon’s preferences and the length of the various procedures performed. After use on approximately 20 of the same surgeries with the same surgeon, McSleepy begins to recognize patterns. Additionally, at the end of each surgery, McSleepy stores trend data. Overall, because the machine is a closed-loop control system that uses a combination of artificial intelligence and human input, McSleepy may actually be safer than having only an anesthesiologist administer the medications.
The Benefits of Developing a Closed-Loop Control System Using LabVIEW
When engineers and scientists want to incorporate a new idea into clinical testing as quickly as possible, they need an easy-to-use programming language that gives them the best results in the least amount of time. LabVIEW is well-suited for this purpose because programming with this graphical environment is far easier than programming with more difficult languages such as C+ or Java.
Also, by developing a GUI with LabVIEW, we can address the common problem with most closed-loop control systems, which is that they lack a user interface so the user cannot see what is happening. Human interaction is very important to anesthesiologists, who like our system because it is not a black box. They can easily monitor the amount of anesthetics being administered and make changes if needed. In fact, at the Society for Technology in Anesthesia annual meeting in January 2009, fellow anesthesiologists awarded the McSleepy design team with the Excellence in Technology Innovation Award.
We initially used LabVIEW because we wanted to create a screen that looked nice and made sense. With a user interface that is so simplistic, both the anesthesiologists and surgeons in the operating room can look at McSleepy and understand the data. Overall, the beauty of LabVIEW is that it is easy to use and it creates a nice graphical interface.
The Future of McSleepy
As one of the recipients of the 2009 National Instruments Medical Device Grant, we upgraded to the LabVIEW 8.6 platform, which helps us deploy the McSleepy interface to personal digital assistants (PDAs). In doing so, anesthesiologists can perform distant control, monitoring, and recording of their patients. This is critical because many countries lack specialists such as anesthesiologists, and, in the future, anesthesiologists may need to take care of several patients at one time.
We currently have a fully functional prototype of the McSleepy system with off-the-shelf hardware and our proprietary algorithm that we developed using LabVIEW. Using our current prototype, we are developing a method to enter the market within five years. This plan includes securing funding to conduct more research to further enhance and commercialize our system, as well as seeking approval from both Health Canada and the U.S. Food and Drug Administration.
©2009 National Instruments. All rights reserved. LabVIEW, National Instruments, and NI are trademarks of National Instruments. Other product and company names listed are trademarks or trade names of their respective companies.
Explore the NI Developer Community
Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.
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.