Man’s Quest for Immortality: Simulation of an Implantable...

17
1 Man’s Quest for Immortality: Simulation of an Implantable Cardioverter Defibrillator ME 224 Final Project Andrik Cardenas John Foglesong Monica Koepnick Jon Moncton November 27, 2001

Transcript of Man’s Quest for Immortality: Simulation of an Implantable...

Page 1: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

1

Man’s Quest for Immortality:

Simulation of an Implantable Cardioverter Defibrillator

ME 224 Final Project

Andrik Cardenas John Foglesong

Monica Koepnick Jon Moncton

November 27, 2001

Page 2: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

2

Table of Contents

TABLE OF CONTENTS 2

SUMMARY 3

INTRODUCTION 4

THEORY 5

WHAT IS AN ICD? 5 FIGURE 1—X-RAY OF ICD PATIENT 6 FIGURE 2—CURRENT ICD MODEL 6 HOW DO ICDS WORK? 7 SIMULATION OF AN ICD 7 TABLE 1—HEALTHY HEARTBEAT RANGES BY ACTIVITY LEVEL 8

DESIGN OF INSTRUMENTATION AND SOFTWARE 9

USER (INPUT) SETTINGS 9 FIGURE 3—USER INPUTS 9 SIGNAL GENERATION 10 FIGURE 3 – SIGNAL GENERATION 10 COMPARISON CIRCUIT 10 FIGURE 5—FREQUENCY COMPARISON CIRCUIT 11 OUTPUT DISPLAYS 11 FIGURE 6—OUTPUT DISPLAY 12

RESULTS 14

FIGURE 7—EXAMPLE O UTPUT FOR PATIENT 15

REFERENCES 16

BIOGRAPHICAL SKETCHES OF GROUP MEMBERS 17

Page 3: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

3

Summary For this lab, a real-world device, namely the implantable cardioverter defibrillator, is simulated using classroom principles and learning as well as independent research. Based on user input, a LabVIEW program compared a heart rate in question with the appropriate range as determined from user-defined variables. If the heart rate is outside the normal range, an output signal is sent simulating a defibrillator’s shock to the heart, which returns the heart rate to a normal rhythm. The model defibrillator followed predicted results. For heart rates outside the appropriate range, the resulting output signal returned the heart rate to an optimal pulse. In addition to performance, the model’s design encompassed usability and readability. A clear panel design afforded both numeric and graphical output as well as explicit instructions for the user. Most problems stemmed from the complexities of programming in LabVIEW. Such dilemmas included generating a signal representative of an actual heart rate and building a comparison circuit capable of meeting predetermined criteria. All issues were resolved with the help of the teaching assistant and the lab group’s dedication. Inherent to the lab, constructing a realistic model of a defibrillator posed challenges. Although the objective was to create a simplified representation, controllable real-life factors needed to be accounted for in the design to maintain accuracy and practicality. Such considerations, within the capabilities of the lab, included age and activity level of the patient. All objectives, both tangible and intangible, were met or exceeded. Along with a well-performing defibrillator simulator, the final project further enhanced understanding of ME224 principles and real-world applications.

Page 4: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

4

Introduction The world of engineering and its applications permeate daily life. A primary objective of the Mechanical Engineering curriculum is to fully understand and apply in-class teachings to the world around us to create solutions to everyday problems. One such field rife with engineering applications is that of biomedical devices. Advanced technology has been developed to not only prolong but also enrich the lives of those around us. A striking example is the implantable cardioverter defibrillator (ICD), which provides immediate electrical therapy to sufferers of recurring heart arrhythmias. For the final project, this lab meshes academia and the real world. Learning to simulate a real-world device transcends present classroom experience by facing challenges commonly found in practical applications and forcing critical thinking and use of principles. Combining key principles learned in ME 224 and research on how such devices operate enables the simulation of an implantable cardioverter defibrillator. A simulator capable of accounting for all real-life complexities is beyond the scope of this lab. Therefore, the principal objective of the lab is to construct a simplified, yet realistic, model of an ICD. Modeling an implantable cardioverter defibrillator poses many challenges. Because patient needs vary, all defibrillators are chosen according to the individual. The model attempts to replicate this selection process by incorporating the most basic patient characteristics. Specifically, age and activity level are two elements, which dramatically affect heart rate. As a person ages, heart rate declines. As activity level increases, the heart must pump more blood to meet the increasing demands on the body, which in turn raises the heart rate. Using the input age and the resultant heart rates, the LabVIEW program can be constructed to check a patient’s current heartbeat against the above rates based on a chosen activity level. After the comparisons of the input heart rate and the one determined by the user, the program determines if a shock should be given. This shock will continue until the heart rate of the “patient” is optimized for the given conditions. The LabVIEW program interacts with the user with a panel displaying current heart rate, the user inputs, and any actions that the ICD is taking, in both a graphical and digital format. To record the actions of the ICD, this panel displays the heart rate as it changes through time, much like the paper tape generated in conventional medical equipment.

Page 5: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

5

Theory The heart acts as a natural pacemaker, controlling the rate of the heart’s muscular contractions. Acting as an electrical timing device, the heart pumps blood under the wide range of demands encountered in daily life, from running up the stairs to lying on the couch watching TV. Everyone’s heart speeds up or slows down under different conditions and may on occasion skip a beat. Such deviations are relatively trivial and fleeting. However, sometimes the heart’s electrical system malfunctions and serious rhythm disorders result. Such deviations may be life threatening without external defibrillation to shock the heart back into a normal rhythm. A lengthier period of time between the onset of ventricular tachycardia and treatment can increase the chances for loss of consciousness and death. Therefore, the sooner treatment can be administered, the sooner the heart can return to a normal rhythm. Advanced biomedical technology has allowed for implantable cardioverter defibrillators (ICDs), which provide electrical therapy immediately as needed. What is an ICD? For people who suffer from excessively rapid heartbeats called ventricular tachycardia or ventricular fibrillation, ICDs have become the dominant treatment method. These small devices are implanted in the chest wall to continuously monitor heart rhythm and deliver precisely calibrated electrical shocks when needed to control abnormal heartbeats or arrhythmia. The devices can also terminate other types of arrhythmias by means of pacing. However, unlike pacemakers, which work to keep the patient’s heart rate sufficiently high in one or both heart chambers, these implantable defibrillators slow down or halt excessively rapid heart rates that arise specifically in the ventricles. The aim is to prevent ventricular fibrillation, a state in which the ventricles contract in a completely unsynchronized, or quivering manner that is insufficient to cause heart muscle contraction and the pumping of blood. This total lack of rhythm results in cardiac arrest, which can be fatal within minutes if there is no emergency intervention. The ICD is a small, battery-driven self-contained device that is implanted under the skin, usually near the left collarbone. One or two floppy thin wires, or leads, run from the ICD through veins to the chambers within the heart. It continuously monitors the heart rhythm and treats rapid heartbeats with electrical therapy. Below, Figure 1 shows an implanted defibrillator with its leads to the immediate left of the device.

Page 6: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

Figure 1—X-Ray of ICD Patient

Current ICDs are much different than the first models of the 1980s. Although still encased in titanium, average weight and size have decreased dramatically. Typically, ICDs weigh approximately 132 grams with a displacement of 83 cc, half of its original size. The most common size of the ICD is 88 mm in height, 18 mm in width, and 63 mm in length. Most leads are either made of silicone or polyurethane. Projected longevity is just over 6 years. Figure 2 below illustrates one of the most common models currently used.

Figure 2—Current ICD Model

Page 7: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

7

How do ICDs work? William Batsford, M.D. offers a detailed technical explanation of how ICDs work in the Yale Medical School Heart Book.

“ICDs use one or more of three basic modes of operation: antitachycardia pacing, low-energy cardioversion (a shock that restores normal heart rhythm), and defibrillation. Most devices in use today employ high-energy defibrillation for ventricular tachycardia or fibrillation.

“Antitachycardia pacing short-circuits the rapid ventricular rhythms by sending brief bursts of impulses to the heart muscle at a pace faster than the already accelerated ventricular rate. The aim is to depolarize the heart muscle at the right moment, interrupting the abnormal rhythm and thereby halting the tachycardia. The tachycardia ceases with in a few seconds, with no pain and little stress to the patient. A device can safely induce antitachycardia pacing hundreds of times per day if necessary, with little drain on its power source...

“Low-energy cardioversion and defibrillation work differently from antitachycardia pacing. A device employing low-energy cardioversion to counteract ventricular tachycardia does so by delivering a mild shock to the heart muscle, in the range of 0.5 to 2 joules. The shock depolarizes a small section of the ventricle, breaking the abnormal rhythm causing the tachycardia…

“A low-energy shock, however, will not stop ventricular fibrillation, in which many currents flow through the heart muscle in a chaotic fashion. When an implantable defibrillator senses such a dangerous arrhythmia, it defibrillate just like the external electronic defibrillator used to revive patients in emergency care for cardiac arrest. Defibrillation requires a minimum 10-to-15 joule shock, but most devices deliver 30 joules to allow a margin of safety. Devices typically can give up to five shocks, pausing between each one to sense if the arrhythmia has been checked. This sequence can be repeated 100 times over the lifetime of the defibrillator.” Simulation of an ICD The lab employs these principles to simulate a simplified ICD. Using the aid of LabVIEW, a simplified model can be constructed which compares the patient’s input heart rate with the appropriate range. If the input heart rate falls outside of the range defined by user inputs of age and activity level, an output signal of higher frequency will be sent resembling the defibrillator’s shock to return the heart to a normal rhythm. Otherwise, if the heart rate is in the appropriate range, the program exits since no external defibrillation is necessary. Because a heart rate, measured in beats per minute, is in itself a frequency, a generated sine wave with its own predetermined frequency can supply a simulated heart rate. Converting the input heart rate from beats per minute to cycles per second enables comparison to the simulated heart rate, i.e. the generated sine wave, in LabVIEW. If a cutoff frequency is chosen for the sine wave, i.e. the upper limit of a normal heart rate is

Page 8: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

8

defined, LabVIEW can be used to compare the converted input heart rate frequency against the selected cutoff frequency. Any input frequency above the cutoff, and, therefore, much faster than a normal rhythm, is subject to an output signal of a much higher frequency to shock the heart back into a normal pulse. To determine if a shock is necessary to return the heart to a normal rhythm, the normal rhythm must first be defined. Through research, a normal range has been defined for three levels of activity—high, medium, and low—based on the input age. High levels of activity correspond to a maximum heart rate of 220 minus the input age.

AgeHRMax −= 220 (1) Moderate levels fall within 60-75% of the maximum heart rate. For this lab, the heart rate for a moderate level of activity will be defined as follows.

MaxModerate HRHR *60.0= (2) Low levels generally relate to a resting heart rate of 70 beats per minute. Hence, for all ages,

70=MinHR (3) With the normal heart rates by activity level defined, corresponding ranges for each must be set.

Below, Table 1 shows the healthy heartbeat ranges for all activity levels.

Activity Level Maximum Heartbeat (beats/min) Minimum Heartbeat (beats/min) High 220 – Age 100

Medium 60% of Max 80 Low 85 60

Table 1—Healthy Heartbeat Ranges by Activity Level

Ascertaining healthy ranges for heart rates now gives way to constructing a working LabVIEW program, which can monitor and adjust a given heart rate. The program’s logic and creation is further discussed in the Design of Instrumentation and Software section.

Page 9: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

9

Design of Instrumentation and Software This experiment could have been designed and run with conventional circuitry. However, while the complexity would have been much greater, the reliability would have decreased drastically due to inherent flaws in physical electronics. LabVIEW was used to model all the components in this experiment because of its accuracy, and ability to provide a complete working environment for the user, and the programmer. LabVIEW was more effective for this system because the experiment deals with a closed-loop feedback system. In this system, the only component that could easily be taken out of LabVIEW is the signal generation. However, since LabVIEW is already equipped with this capability, it was beneficial for error reduction to incorporate that aspect into the program. User (Input) Settings Utilizing LabVIEW’s front panel, the user is allowed to dictate the initial conditions of the simulation. With case structures and numerical inputs, the user is required to input Age, Starting Heart Beat, and Activity Level. These variables are used to produce the original heartbeat, as well as define the parameters for system operation.

Figure 3—User Inputs

User Inputs

Page 10: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

10

The Starting Heartbeat is used to determine the starting heartbeat of the system. Age and Activity Level are used to determine the maximum and minimum values for a normal heartbeat. Table 1, in the preceding Theory section, shows the relationship between these two input parameters and the values used to drive the system. Signal Generation The internal sine wave function generator .vi in LabVIEW was utilized to produce a sine wave using the input of the starting heartbeat. The frequency of the sine wave was calculated using a Boughman Frequency Estimator provided in LabVIEW. This was done to simulate the input that would be received from sensors and conditioned into a form to be used in a real ICD. Our signal generation produces what would actually be the signal from physical sensors.

Figure 3 – Signal Generation

Comparison Circuit After the second part of the program generates a signal, a comparison must be made between the input heartbeat and the adequate upper and lower limits determined by the specified age and activity level. The comparison circuit uses a while loop that runs when the heartbeat is not optimized. For the purposes of this experiment, an optimized heartbeat is defined as one that is the average of the upper and lower acceptable limits. The ICD model will continue to “shock” the patient until the heart rate is at the optimal level. A series of Boolean operations are used as the logic for the comparator. These operations determine what the system is doing. Every time the while loop runs, the beat is increased or decreased by one. In this manner, the heartbeat approaches the optimal value, but does not overshoot it. This type of comparator circuit eliminates the

Page 11: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

11

complexity of a system that determines the desired value by oscillating the response and narrowing in on the desired value.

Figure 5—Frequency Comparison Circuit

There are four inputs to the comparison circuit; the upper and lower boundaries for the heartbeat, the user’s input heartbeat, and the number of the loop that the system is currently in (this is used in the incrementing or decrementing the heartbeat). Output Displays The last important part of the model is to provide the user with easily readable and understandable output. This output display for this model was designed so that a user could quickly read visual cues off the screen and effortlessly relate them to the response of a patient being treated by an ICD.

Page 12: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

12

Figure 6—Output Display

Several features of the Output Display are especially noteworthy for the user. To the right of Activity Intensity are three lights, labeled Optimal, Normal, and Abnormal, corresponding to the present state of the patient’s heart rate. For example, if an input heart rate exceeds the appropriate range, the red Abnormal light will illuminate until the defibrillator model “shocks” the heart rate into the normal range. At this point, the green Normal light will turn on. The defibrillator model continues adjusting the heart rate until the optimal heart rate is achieved, hence, lighting the green Optimal light. These lights act as an easily detectable visual cue providing the user an immediate assessment of his current heart rate. Located above the Pulse Chart, a fourth light, labeled “Shock”, illuminates whenever the defibrillator model sends an output signal to adjust the heart rate. Another feature, especially helpful to the user, is the Pulse Chart, which tracks current pulse as well as the healthy upper and lower pulse limits based on user input. Using this graph, users can visually trace the defibrillator model’s effect on pulse and approach to the optimal heart rate.

Page 13: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

13

An example of the running defibrillator model’s output is found in the Results section.

Page 14: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

14

Results When the first testing took place, most of the problems occurred with the system’s logic. Once these problems were resolved with in-depth logic tables and analysis of the model, results were extremely consistent and positive. The model of the ICD works completely and effectively. To enhance the program’s usability and guarantee accurate, reasonable results, two instructions are included on the front panel for the user, ensuring that the correct procedure is followed every time the program is run. When this procedure is followed, the model works correctly. The desire to not only guide the heart rate into a specific range, but to achieve an optimal range only slightly complicated the program, while providing more feedback for the user. The program operates according to all of the specified parameters and interacts with the user in an easy, straightforward manner. The front panel was designed and created to be easy to read and use. The computer screen does not offer the same interaction as a knob or other physical selector, but the panel is integral to the program’s success. The user can follow the execution of the program through completion on the Pulse Chart. As an example, the following figure demonstrates a realistic situation encountered by the model defibrillator. The 160 beats per minute heart rate in question belongs to a 30 year-old patient at a moderate level of activity. These inputs correspond to a healthy maximum heart rate of 140 beats per minute and a minimum heart rate of 80 beats per minute according to Table 1, as found in the Theory section. Upon running the program, immediately the Abnormal light illuminates, as does the Shock light, because of the patient’s excessive unhealthy heart rate. As the program continues running, the Pulse Chart displays the defibrillator model’s slowing effect on the patient’s heart rate. Once the heart rate reaches the upper limit of 140 beats per minute, the Abnormal light turns off, and the Normal light turns on. As the patient’s heart rate approaches the optimal heart rate of 110 beats per minute, the Shock light turns off, and the Optimal light turns on. The Pulse Chart in Figure 7 demonstrates the entire process. The chart plots the heart rate across the time interval required to reach the optimal heart rate. As validated by the above example, the experiment was completely successful. The end objective of accurately modeling a realistic implantable cardioverter defibrillator was met with the aid of LabVIEW. Once the basic components were correctly modeled, some complexity was added to make the model more realistic and better handle actual situations addressed by the real world device.

Page 15: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

15

Figure 7—Example Output for Patient

Page 16: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

16

References Batsford, M.D., William. “Pacemakers and Antitachycardia Devices.” Ch 26; Yale Medical School Heart Book. Groh, M.D., William J., Foreman, R.N., Lynne D., Zipes, M.D., Douglas P. “Advances in the Treatment of Arrhythmias: Implantable Cardioverter-Defibrillators.” American Family Physician, January 15, 1998.

Page 17: Man’s Quest for Immortality: Simulation of an Implantable ...clifton.mech.northwestern.edu/~me224/FinalProjects_Fall2001/heart... · activity correspond to a maximum heart rate

17

Biographical Sketches of Group Members Andrik Cardenas was born in Mexico and raised in Los Angeles. He attended Palisades Charter High School. He was part of the National High School Institute, which led to his interest in Northwestern University. He received a Co-op position with United Parcel Service in 1999. He spent last summer as an intern with Ford Motor Company in Dearborn Michigan. Currently, he is a senior pursuing a Bachelor’s degree in Mechanical Engineering. He has accepted a full time position as a design engineer with Ford Motor Company, which he will start in May 2002. John Foglesong was born in Indianapolis, Indiana on August 29th 1980. He spent the first fourteen years of his life there. After which he moved to London, England. Where he went to high school at the American School in London. It was in high school that he found his strengths in math and science, although he did also participate in the school orchestra and choir. From there he enrolled in the McCormick School of Engineering and Applied Sciences at Northwestern University, where he is currently a senior studying mechanical engineering. He has spent time working for Lord Corporation, in Erie Pennsylvania. While he was there he interacted with both engineers and operators in order to re-write manufacturing instructions. Last summer he was an intern for Eli Lilly & Co. where he was a member of the equipment development team, specializing in the design and manufacturing of industry specific unique high-tech equipment. Next year Mr. Foglesong will return to Indianapolis in order to take a position as a full-time process engineer for Eli Lilly & Co. Monica Koepnick came to Northwestern University from San Antonio, Texas. She will be graduating this December with a degree in Mechanical Engineering and a Manufacturing Specialization. After interning for Toyota and the Quaker Oats division of Pepsi Co., she will be joining Quaker Oats this spring in the Supply Chain Senior Associate Program here in downtown Chicago. Jon Moncton is currently a fifth year senior pursuing degrees in both Mechanical Engineering and Cello Performance. With graduation approaching in June, he plans on entering the engineering industry and finding work before pursuing graduate studies. Previous work experience includes a summer internship in the mechanical design department of General Motors Corporation's Electro-Motive Division in LaGrange, IL. Jon is also and avid member and captain of Northwestern Men's Crew and is planning a trans-Canada bicycle trip next summer.