Breathing Motion Compensation for Medical Robots Project By: Jason Hall jth3@cec.wustl.edu (301) 661-0077 Project Advisor: Dr. Eftychios Christoforou ESE Adjunct Professor Radiology Sciences christoforoue@mir.wustl.edu Senior Design Project Fall 2005 Professor Schättler Abstract In this work the problem of measuring breathing motion and using the measurements for motion compensation purposes is examined, as required in surgical robotics applications. The respiratory motion is measured using a breathing bellows, which also is a method suitable for MRI interventional robotic applications. This MRI compatible sensing technique was examined and shown to produce measurements useful for breathing compensation purpose. Experimental results using a 1 degree-of-freedom robotic arm with revolute joints showed that this is a feasible approach and various implementation issues were examined. Table of Contents 1 - Introduction ............................................................................................................................... 1 2 - Breath Monitoring ..................................................................................................................... 4 2.1 - Mattress Pad ....................................................................................................................... 4 2.2 - Segmented Mattress Pad ..................................................................................................... 4 2.3 - Static Charge-Sensitive Bed ............................................................................................... 5 2.4 - Non-invasive Microwave Monitoring ................................................................................ 5 2.5 - Piezo-Electric Respiratory Belt .......................................................................................... 5 2.6 - Breathing Bellows .............................................................................................................. 6 3 - Experimental Setup.................................................................................................................... 7 3.1 - Breathing Bellows .............................................................................................................. 7 3.2 - Pressure Sensors ................................................................................................................. 7 3.3 - Test Robot........................................................................................................................... 9 4 - Experimental Results ............................................................................................................... 11 4.1 - Filters ................................................................................................................................ 11 4.2 - Calibration ........................................................................................................................ 13 4.3 - Software Calculations ....................................................................................................... 14 5 - Discussion and Conclusion...................................................................................................... 20 Bibliography ................................................................................................................................. 22 Appendix A - Sensor Datasheet Appendix B - Low-pass Filter Details 1 - Introduction Robotic surgery allows doctors to perform operations with more precision and shorter recovery time for patients. Currently robotics have been used in neurosurgery, orthopedic surgery, radio surgery, and other minimally invasive surgeries. There are two main forms of controlling the robot. The first method is fully autonomous, which allows the robot to perform repetitive tasks more precisely than a doctor. The other commonly used method is using a Haptic interface, which is a model representation of the surgical robot. The doctor interacts with the model, moving it, while the actual robot follows the motion [17]. There are issues with doctors and patients accepting the use of this type of surgery. The main issue is with the safety of the patient, since the purpose is to save lives, the robot should not be hurting people. Another issue is the cost of the robots versus the improved patient outcome [14]. The introduction of the Magnetic Resonance Imaging (MRI) machine allows doctors to see tissues and organs inside a patient that have previously been impossible to see, or would require surgery to observe. During a usual operation of the machine, high power magnets charge the nuclei of water molecules in a tissue, and can determine differences in the tissues. For example, a tumor can be discovered in this fashion, which would be different from the surrounding tissues. MRI has been used for diagnostic purposes and more recently for performing various diagnostic and therapeutic interventions, such as biopsies or ablations for the treatment of tumors. Given the limited accessibility to the patient inside the scanner, the use of specially designed robotic arms has been proposed. While an MRI machine can help locate potential health risks, the tissue will have to be sampled and tested to confirm the existence of a tumor or other disease. The ideal way to perform this biopsy on the tissue is using the MRI images to position and guide the needle, to get an accurate sample of the potential tumor. Because the size of the opening to the machine, doctors cannot perform the biopsy while the patient is in the machine. A solution to the accessibility problem is to operate a remote robot, which can be inserted into the machine, and a doctor will guide the needle based on the MRI images. This way the targeting will be very accurate, and will always get the desired sample. An MRI compatible robotic system was designed and built at the department of radiology of Washington University in St. Louis in order to examine various image-guided minimally invasive interventions inside MRI scanners [3]. The robot is built using a sturdy fiberglass frame and plastic components, special requirements due to the high strength magnetic fields emanating from the machine. All of the circuits are housed in a copper lined box, to protect them from the magnetic fields. This robot was built using 3 degrees of freedom linear movement to position the end-effector, X, Y, and Z, as well as 3 more degrees of freedom to orient the interventional tool correctly. The end-effector sits on its own track on the end-effecter to slide in and out of the patient smoothly [3]. Previous work has been done to control the robot’s movements, and to prevent it from colliding with the walls of the MRI machine or the patient [10]. The goal of this project is to account for the movement of the patient caused by their breathing. During a normal breathing cycle, the diaphragm moves up and down, causing the chest and abdomen to raise and lower. This motion affects the internal organs of the body, requiring that the positioning of the interventional tools be adjusted, to accurately track the organ sample and to avoid injury to the patient. To account for a patients breathing, we are investigating the use of a breathing bellows, which attaches around a patient’s abdomen. When the patient breaths, the movement of the stomach will cause the bellows to expand and contract, causing a readable pressure drop in our pressure sensor. We will then filter this signal and use it to adjust the position of the robot. This breathing compensation can be used in many other applications as well. Tumor ablations using MRI guidance can be performed in a similar fashion by inserting a needle with a tip that heats up, which burns the tumor, destroying it. These are examples of minimally invasive interventions using uses precise robot manipulators to perform operations on patients, requiring a few very small incisions to be made. This type of intervention decreases the recovery time of surgical patients, and reduces scaring. 2 - Breath Monitoring The first step in getting the robot to adjust to a patients breathing is to determine when the patient is breathing. There are many ways that this can be accomplished, but it is best to understand why we chose our method. The high intensity magnetic fields, and space limitations inside the scanner need to be considered when selecting the proper method. Various methods are briefly reviewed here. 2.1 - Mattress Pad The mattress pad is a basic concept, where a patient is lying down, and under the torso is an inflatable pad, attached to a pressure sensor, that will change based on the movement of a person’s back when they breathe. A major advantage of this method is that is fairly simple and easy to implement. A drawback is that the readings are not reliable, amplifying subtle patient repositioning. The pad will also take up space inside the scanner, which is at a premium [5][7]. 2.2 - Segmented Mattress Pad This method is very similar to the one above, but it involves many smaller inflated pads, each one hooked up to its own pressure sensor. It also monitors the patients breathing through changes in pressure of the pads. This method is more reliable than a single chambered pad, and gives the advantage of being able to monitor the chest and abdomen simultaneously. A disadvantage is that it still reacts to small patient movements, and takes up room in the MRI machine [9][13]. 2.3 - Static Charge-Sensitive Bed This technique, also known as a ballistocardiogram, uses a layer of two conductive metal plates and works by reading the electrical differences between the plates. As a patient’s muscles move, a small static charge is given off, which is read by the bed. The hardware used in this technique is much thinner than air-filled pads, but is not MRI compliant with large metal sheets in the machine [4]. 2.4 - Non-invasive Microwave Monitoring Microwave monitoring of a patient’s surface movements has been established in the past. This method works on similar principles to track the movements of a patient’s abdomen to determine when breathing. This works very well to account for the surface motion of a person’s breathing, but is not MRI compliant, due to the microwave emitter and other electronics [11]. 2.5 - Piezo-Electric Respiratory Belt A piezo-electric stress sensor utilizes a special alloy that creates an electrical voltage as it is stretched. This method works by monitoring the voltage changes from a current running through the material, changes in the length of sensor, and the material it is attached to, can be determined. This technology has been put into a belt attached around a patient’s abdomen, which is stretched when the patient breaths. This single contained unit is easy to integrate into other applications and hardware, and is already in use on home exercise equipment. However, the belt is not compatible with MRI machines, due to high metal content [12]. 2.6 - Breathing Bellows Another method, which will be described in detail in the next chapter is the breathing bellows. This method is MRI compatible and has been used previously in triggering the scanner at a particular point in a breathing stroke. That way, the scanner will take images every time the patient either breaths in or out. 3 - Experimental Setup 3.1 - Breathing Bellows The bellows consist of an expandable accordion tube which is strapped loosely around the patient’s abdomen (see Figure 1). When the patient breaths out, the bellows expand, creating a pressure drop. A pressure sensor is attached to the bellows on the end of a long tube, to keep the sensor away from the MRI machine. This already established technology is MRI compatible because it does not involve any magnetic or conductive materials. This is easy and intuitive to attach. This technology is more encumbering to the patient than a mattress pad method, which is unobtrusive. Figure 1 - Breathing bellows showing accordion and attachment to sensor. 3.2 - Pressure Sensors For our experiments, we used a Motorola MPX2100A pressure sensor (see Figure 2), with Motorola’s patented X-ducer™ sensor, in an absolute configuration, which measures pressure changes. There are three types of pressure sensors: Absolute, Differential and Gauge. Absolute measures a given pressure relative to a vacuum pressure, which is sealed in the chip. The differential configuration measures the difference of two pressures on either side of the diaphragm. Gauge pressure sensors are a special form of differential sensor, where the second pressure is ambient pressure, the pressure of the air around the sensor. The sensor (see Figure 2) has a 4 pin interface. Pins 1 and 3 are the negative and positive (respectively) of the power supply. Pins 2 and 4 are the positive and negative (respectively) of the output voltage. As pressure increases, the output voltage increases, in an effectively linear manner. Power supply voltage is around 12 volts DC (Vdc), output voltage is around 40 milivolts DC (mVdc), and the pressure range is 0 to 100 kilopascals (kPa). The manufacturer’s data sheet can be found in Appendix B. Figure 2 - Motorola Sensor with wires for supplied power and sensor reading attached. 3.3 - Test Robot The test robot has only one rotational degree of freedom, adjusting the vertical displacement required to compensate for a patient’s breathing. The robot is connected to a workstation using a Quanser MultiQ-PCI series digital and analog input/output board (see Figure 3). The software of choice for testing and programming is Matlab with Simulink, which has Quanser tools integrated into it. This fast test environment allows for many different hypotheses to be run and tested, giving the best conclusions for an experiment. Digital to Analog Converter Arm Digital to Analog Converter Motor Pressure Sensor Breathing Bellows Figure 3 - Componets layout for experiment. The path that data takes is shown in Figure 4. Data is pulled in from the analog pressure sensor, across an analog to digital converter, into the computer running Matlab with Simulink. Simulink will also read the current motor position, by way of an incremental digital encoder. After calculations (details in next section), the Simulink control program outputs the digital representation of the voltage to the motor. This signal goes through a digital to analog bridge, then into the motor. Analog Pressure Sensor A/D Converter Digital Encoder CPU Motor D/A Converter Figure 4 - Data conversion flow 4 - Experimental Results The first step in this project is to read the signal from the pressure sensor, to determine whether that technique attached to the breathing bellows is a viable option. In order to read the signal on the computer, the sensor needs to be attached to the analog to digital converter on the Quanser MultiQ controller. As can be seen in Figure 5, the input due to a person’s breathing is approximately sinusoidal, but there is a very large high-frequency noise associated with the signal. A filter is required to get the signal usable with our robot. Figure 5 - Input from breathing sensor. 4.1 - Filters In our case, the use of a digital filter is more convenient than using an analog filter because it can be changed and adjusted quickly, which is ideal for testing. A low-pass filter will only allow lower frequencies to pass, blocking high frequencies. The problem is that the larger the order of the filter (more frequencies blocked), the larger the lag. For our needs, we need to find a compromise between being able to block the high frequencies and keeping lag to a minimum. We took a look at many different filters to find the best for our needs. Figure 6 - Butterworth filter comparison for different ωn values In order to create the Butterworth filter, two parameters are required, n and ωn, where n/2 is the order of filter, and ωn is the frequency above which are dropped. We chose the order to be 1, which works well for our needs. Higher orders perform better at removing the noise, but introduce more lag. To calculate ωn, the cut-off frequency, we started with the fact that a person will normally breath anywhere between 15 breaths per minute (1 breath every 4 seconds) to 30 breaths per minute (1 breath ever 2 seconds). The average of 1 breath every 3 seconds translates to ωn = 2*pi/3 radians per second. Using these numbers the filter introduced too much lag, so the final value of ωn was adjusted to 2*pi/0.3, reduced by a factor of 10, which works much faster while still filtering a majority of the noise. Figure 6 shows a comparison of Butterworth filters with different values for ωn. For larger values, corresponding to allowing more frequencies through, the signal has much more noise and becomes unusable (green), while for low values, no noise gets through, but the lag is too great (magenta). Our choice for ωn is a good compromise in reducing noise and lag (red). 4.2 - Calibration Before an experiment can start, a calibration of the sensors needs to be performed. This is due to the fact that the breathing bellows will be attached differently each time it is used, sometimes tighter, sometimes looser, changing the pressure reading of the sensor. Also since every patient is different, their abdomens will differ in the height movement. The steps involved in the calibration procedure are summarized here: 1. Attach the breathing bellows. 2. Have the patient lie down on MRI bed. 3. Have the patient breath out and hold the breath. a. Record the height of the stomach/abdomen. b. Record the voltage or pressure reading from the sensor. 4. Have the patient breath in and hold their breath. a. Record the height of the stomach. b. Record the voltage or pressure reading from the sensor. 5. Confirm settings by having patient breathe normally and monitor the sensor reading. Figure 7 - Height calibration Figure 7 shows one possible way of performing the height change calculation, using a rightangle ruler kept vertical against the wall and the height recorded at different times. Another technique experimented with involved using a spirit level attached to a laser pointer, aimed at the wall. This performed in a similar fashion to the ruler, but was more prone to error, where slight angle differences in the level were amplified by the distance to the wall, throwing off the calculations. Other techniques are being looked into, please see Section 5.2 for future improvements. 4.3 - Software Calculations The unfiltered analog pressure sensor signal is passed through our Butterworth filter, to reduce the amount of high frequency noise in the signal. From there, the signal is normalized around zero, by subtracting the average value of the pressure, obtained from calibration. normalized value is then converted to the desired displacement by: This hout hin pressure pout pin where h is the height of the patients stomach and p is the corresponding pressure reading from the sensors. displaceme nt For our system in particular, the desired signal is then converted to desired radians the motor needs to turn, to move the arm, using the following equation, as seen in Figure 8: displaceme nt ) where is the length of the robotic arm. radians tan 1 ( Δ displacement Δ radians Figure 8 - Time delayed image of robot’s motion. Until the filter initializes, the signal output from it will still contain the noise it is trying to get rid of. The filtered signal will not be useable until after a second, which is why there is a one second delay on the input to the closed loop motor system, to prevent the motor from moving until the filter is fully working. From there Matlab with Simulink will read the digital encoder, compare it to the desired position in radians, and output the error difference to the controller. A PID controller is used to control the motor’s movement. Figure 9 shows the control program used in Simulink to run our experiment. From left to right, you can see the analog input, the filter, the pressure to height to motor displacement conversions, and the 1 second delay. This is feed into the closed loop of the system, with the error from the motor position encoder going through the PID controller to the motor. Figure 9 - Actual Simulink control program. The experiment began with the calibration of the breathing bellows with the pressure sensor. The bellows are attached to the patient as shown in Figure 10. Figure 10 - Breathing bellows attached to a patient. The raw and filtered breathing input signal are shown in Figure 11 for a 1 minute experiment. At around 40 seconds a deep spike is evident, coinciding with the patient taking a deep breath. Figure 11 - Experimental input signal. The robotic arm was placed in front of the patient, maintaining a fixed distance from the patient as shown in Figure 12. Figure 12 - Robot positioned with patient. Figure 13 shows the filtered input signal overlaid with the corresponding motor displacement. The motor accurately and quickly tracks the desired position, including the unexpected and irregular breathing pattern experimented with. Figure 13 - Desired and actual position of robotic arm. The error between the desired and actual positions of the motor is crucial to keep to a minimum. Figure 14 shows this error on the same scale as the previous Figure 13. This shows that the error is small when compared to the signal, even when sudden changes are introduced. Figure 14 - Error between desired and actual position. 5 - Discussion and Conclusion For our project we successfully controlled a robot to move based on the movement of a person’s breathing. For a variety of breathing patterns, the robot followed the motion quickly and accurately, avoiding contact with the patient, and maintaining a desired distance from the patient. We examined the breathing compensation method using measurements provided by a respiratory bellow, which is MRI compatible. This control method is useful in many applications where robots are going to be working around a person. As mentioned, this can be used to perform a biopsy of tissues in a person’s body, avoiding contact with the patient and to track the tissue that will move when a patient breaths. Robotic surgery is a rapidly growing field, allowing doctors to operate inside a person without the need for large incisions. Accounting for the patient’s movement during breathing is a crucial to performing the surgery accurately. Biomotion compensation will be an important enhancement to the capabilities of surgical robots. There are a few places where improvements to the method we examined would greatly increase the benefits and success of breathing compensation. The first point of improvement is to more accurately calibrate the pressure readings to the height of the patient’s abdomen. Currently, the height range is determined by a L-shaped right angle ruler, one side flat against a wall and the other side resting on the patient’s stomach. The high and low readings are marked and measured when a patient holds their breath, either breathe out and hold or breathe in and hold. The problems with this method are that a patient is usually biased when asked to hold their breath, changing the readings, and that the measurements are not very accurate. This method does work effectively for our purposes though, due to the fact we are only interested in the difference between the high and low readings. A better method is to have the pressure and height readings grabbed when the patient is breathing normally, where the patient does not have to hold their breath. A second improvement idea is to read the displacement due to respiration directly from the MRI images, which dynamically change with the patient. The MRI machine produces many images which can be combined to create a three-dimensional representation of the human body, similar to slices of bread forming a complete loaf. The main advantage of doing this is that the height change will be different at different locations on a patient, and the MRI can adjust the distance the robot is based on how that section of the patient’s body is moving at that time. For example, when a person is lying down, the center of their stomach will move vertically, while areas of their stomach closer to their sides move outwards at a different height change than the center. Breathing also displaces internal organs up and down inside the body, which is not considered here. Bibliography 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 100 kPa On-Ship Temperature Compensated & Calibrated Silicon Pressure Sensors - MPX2100 Series. Motorola Semiconductor Technical Data. 2002. A Motion Adaptable Needle Placement Instrument Based on Tumor Specific Ultrasonic Image Segmentation. T. Dohi and R. Kikinis (Eds.): MICCAI 2002, LNCS 2488, pp. 122-129, Tokyo, Japan, 2002. A Prototype Manipulator for Magnetic Resonance-Guided Interventions Inside Standard Cylindrical Magnetic Resonance Imaging Scanners. Nikolaos V. Tsekos, Alpay Özcan and Eftychios Christoforou. Transactions of the ASME. Vol 127 pg 972-980. Copyright 2005 by ASME. A New Method for Long-term Monitoring of the Ballistocardiogram, Heart Rate and Respiration. http://ajpregu.physiology.org/. 16 Sept 2005. Amercian Journal of Physiology. American Physiological Society, 1981. A New Non-invasive Approach for Monitoring Respiratory Movements of Sleeping Subjects. Luis Hernandez and Barbara Waag. Physiol. Meas. 16 (1995) pp. 161-167. London, UK: IOP Publishing Ltd. 1995. An Ultrasound-driven Needle Insertion Robot for Percutaneous Cholecystostomy. Physhics [sic] in Medicine and Biology. J Hong and T Dohi. Volume 49, Issue 3, Pages 441-455. Evaluation of a Non-invasive Respiratory Monitoring System for Sleeping Subjects. Barbara Waag Carlson, Virginia J Neelon and Henry Hsiao. Physiol. Meas. 20 (1999) 54-63. London, UK: IOP Publishing Ltd. 1999. Magnetic Resonance Imaging. http://en.wikipedia.org/wiki/MRI. James Mattson and Merrill Simon. The Pioneers of NMR and Magnetic Resonance in Medicine: The Story of MRI. Jericho & New York: Bar-Ilan University Press, 1996. Monitoring of Breathing with a Segmental Air-filled Mattress. J Gundersen and K Dahlin. Med. & Biol. Engng. Vol 9, pp. 541-547. 18 Sept 1970. London, UK: Pergamon Press. 1971. Motion Planning and Control of a Magnetic Resonance Compatible Surgical Robot. Angel Lee. Senior Design Project Report, Department of ESE, Washington University in St. Louis, 2005 Non-invasive Microwave Monitoring of Respiratory Pattern. N Ambrosino and M Bramanti. Journal of Medical Engineering & Technology. Vol 7 Num 5. pp. 224-227. Piezo Respiratory Belt Transducer. http://www.adinstruments.com/products/prodcuct.php?id=MLT1132. AD Instruments. Visited 25 Mar 2006. Respiratory Monitoring using an Air-mattress System. Patrick Chow and Gangadharan Nagendra. Physiol. Meas. 21 (2000) 345-345. London, UK: IOP Publishing Ltd. 2000. Robotics for Surgery. Robert D. Howe and Yoky Matsuoka. Annual Reviews Biomedical Engineering. 1999 pg 211-240. Allual Reviews, 1999. Sensors - Senseon. Motorola Master Selection Guide. Ch 5.9. Signal Processing Toolbox. http://www.mathworks.com/access/helpdesk/help/toolbox/signal/. Mathworks Matlab Documentation. Surgical Robotics: An Introduction. Ulrich Rembold and Catherina R. Burghart. Journal of Intelligent and Robotic Systems. Vol 30 pg 1-28. Netherlands, Kluwer Academic Publishers, 2001. Ultrasound Guided Motion Adaptive Instrument for Percutaneous Needle Insertion Therapy. Hong, Jae-Sung and Konishi, Kozo. The 6th Internation Conference on Biomedical Engineering and Rehabilitaion Engineering. Page 255-227. Guilin, China, 2002.