Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Feasibility study of a moving hand support for surgery on the beating heart Trejos, Ana Luisa 1999

You don't seem to have a PDF reader installed, try download the pdf

Item Metadata

Download

Media
ubc_2000-0286.pdf [ 9.28MB ]
[if-you-see-this-DO-NOT-CLICK]
Metadata
JSON: 1.0080903.json
JSON-LD: 1.0080903+ld.json
RDF/XML (Pretty): 1.0080903.xml
RDF/JSON: 1.0080903+rdf.json
Turtle: 1.0080903+rdf-turtle.txt
N-Triples: 1.0080903+rdf-ntriples.txt
Original Record: 1.0080903 +original-record.json
Full Text
1.0080903.txt
Citation
1.0080903.ris

Full Text

Feasibility Study for Surgery of a Moving Hand Support on the Beating Heart by Ana Luisa Trejos B.Sc, University of Costa Rica, 1997 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF THE FACULTY OF GRADUATE STUDIES (Department of Mechanical Engineering) We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA November 1999 © Ana Luisa Trejos, 1999 MASTER OF APPLIED SCIENCE in In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department of UechoLiliCol ^n^jnfififin/2 Thp I Jnivprsitv nf Rritich Poll imhi? v The University of Britis  Columbia Vancouver, Canada Date /(,////99 DE-6 (2/88) Abstract A method for performing coronary bypass surgery on the beating heart is proposed, and entails the use of a heart-tracking support to move the hands of the surgeon in synchrony with the heart motion. This method eliminates the damaging effects associated with stopping or stabilizing the heart, while preserving the surgeon's dexterity and accuracy. First, a feasibility study was performed in order to compare the accuracy attained and the completion time required to perform accurate tasks on stable and moving targets, both with and without a motion tracking support. The results demonstrate that the negative effects of the target motion, namely, decreased accuracy and increased task completion time, are considerably reduced with the use of the support. The use of both monocular and stereo vision systems that provide a stable view of the work space was shown to limit the increase in task completion time; however, the accuracy was not improved due to the low resolution of the vision systems used. A solution to the design of the moving hand support consists of a three degree of freedom mechanism with prismatic joints. For this mechanism to accurately track the heart, it is necessary to measure the motion of the surgical area in real-time and to generate a suitable control strategy. After comparing several sensors that could be used to measure the heart motion, a mechanical sensor was designed and built. Despite the measurement error present in this particular prototype, it is believed that the design features of the sensor make it a suitable solution to the heart tracking problem. In order to address the problem of motion control, the moving support system was simulated using SIMULINK® and implemented on an experimental setup with PID and computed torque control. Furthermore, an additional control strategy is proposed that facilitates tracking of quasi-periodic, quantized inputs. Results show that it is possible for the mechanism to accurately follow the trajectory of the heart surface, since the maximum tracking error is approximately 0.15 mm. ii Contents Abstract ii Table of Contents iiList of Tables vii List of Figures ix List of Acronyms xii Acknowledgements xii1 Introduction 1 1.1 Coronary Artery Bypass Grafting Surgery 1 1.2 Surgery on the Beating Heart 2 1.3 Devices for Heart Surgery1.3.1 Passive Devices1.3.2 Robotic Devices 3 1.4 Proposed Solution and its Potential Benefits 3 1.5 Project Scope and Objectives 5 1.6 Thesis Overview 6 2 Literature Review 7 2.1 Coronary Artery Disease2.2 Coronary Artery Bypass Grafting Surgery 8 iii CONTENTS iv 2.2.1 The Traditional Surgical Procedure 8 2.2.2 Minimally Invasive Coronary Bypass 10 2.2.3 The Modified Surgical Procedure 2 2.3 Heart Motion 13 2.3.1 Displacements2.3.2 Trajectories 4 2.4 Tracking of Periodic Trajectories 13 Feasibility Study 16 3.1 The Moving Platform3.1.1 Platform Motion 7 3.1.2 Task and Test Design 18 3.1.3 Testing 20 3.1.4 Quantification of Performance 22 3.2 Experimental Results3.2.1 No Camera Use 24 3.2.2 Use of Different Vision Systems 25 3.2.3 Questionnaire Results • 26 3.2.4 Results of the Learning Evaluation 27 3.3 Discussion 24 The Moving Support System 31 4.1 Adjusting the Position of the Platform 32 4.2 The Moving Support 3 4.2.1 The Mechanism 34.2.1.1 Calculation of Torque Requirements 35 4.2.2 The Hand Support and the Vision System 6 4.3 Heart Motion Tracking 38 4.3.1 Types of Sensors 9 4.3.2 Optical SensorsCONTENTS v 4.3.3 Vision-based Motion Tracking 41 4.3.4 Mechanical Sensors 43 5 Design of a Mechanical Sensor 5 5.1 Design Overview5.2 Design of the Mechanical Sensor 47 5.2.1 Arm Geometry Selection5.2.2 Joint Position Sensors 8 5.2.3 Uncertainty Measurement 50 5.2.4 Link Lengths 55.2.5 End-effector and Wrist Design 52 5.2.6 Additional Features 4 5.3 Attachment Forces 55.4 Operation of the Mechanical Sensor 56 5.4.1 Forward Kinematics5.4.2 Inverse Kinematics 8 5.4.3 Implementation 55.5 Evaluation 9 5.5.1 Methodology 60 5.5.2 Results 1 5.5.3 Discussion 2 6 The Control System 65 6.1 Modeling of the Plant Dynamics 66.2 Control System Design 7 6.2.1 PID and Computed Torque Compensation 68 6.2.2 Delayed Computed Torque Compensation 70 6.3 Simulation 72 6.3.1 PID Control6.3.2 PID Control with Feedforward Compensation 74 CONTENTS vi 6.4 Implementation 76 6.4.1 PID Control 8 6.4.2 PID Control with Feedforward Compensation 76.4.3 Evaluation of the Disturbance Rejection 80 6.5 Simulation Using a Quantized Input Signal 1 7 Conclusions and Recommendations 87 7.1 Conclusions 88 7.2 Recommendations for Future Work 90 References 92 Glossary of Medical Terms 96 A Heart Motion 8 A.1 Heart Motion Trajectory 9A.2 Calculation of the Maximum Acceleration 98 A.3 Simulation of the Desired Position Signal 100 A. 4 Calculation of the Encoder Noise 102 B Additional Calculations for the Design of the Moving Platform 104 B. l Introduction 10B.2 Calculation of Forces and Torques 104 B. 3 Selection of the Shaft 107 C Additional Calculations for the Design of the Mechanical Sensor 108 Cl Introduction 10C. 2 Encoder ResolutionC. 3 Attachment Forces 114 D MATLAB® Functions for Control System Simulation 120 D. l Modeling of Friction 12D.2 Delayed Computed Torque Filter 121 List of Tables 2.1 Maximum 3D displacements 13 3.1 Equipment details 9 3.2 Test pattern dimensions 13.3 Accuracy scoring scale 23 3.4 Sample average results 4 3.5 Questionnaire ranking scale4.1 Equipment specifications 34 4.2 Calculation of the moving mass 6 4.3 Calculation of the rotational inertia 34.4 Passive optical sensors 40 4.5 Active optical sensors 1 4.6 Mechanical sensors 3 5.1 Angular position sensors 49 5.2 End-effector workspace 51 5.3 DH parameters 7 5.4 Sample evaluation results 65.5 Statistical results of the error evaluation 61 6.1 Time-domain specifications of the control system 79 B.l Force calculations 105 vii LIST OF TABLES • viii B.2 Calculation of the moment of inertia 106 B. 3 Static torque calculations 107 C. l Attachment forces 119 List of Figures 1.1 Moving hand support 4 2.1 Heart and lung machine 9 2.2 Human heart on cardiopulmonary bypass 10 2.3 Grafting procedure for an end-to-site anastomosis 11 2.4 Direction of the axes 13 3.1 Moving platform 7 3.2 Platform motion 8 3.3 Functional components of the system 13.4 Typical motion plot 19 3.5 Test pattern3.6 Moving platform with no hand support 20 3.7 Direct visualization of the workspace 1 3.8 Visualization of the workspace on a TV screen 23.9 Visualization of the workspace on stereo goggles 2 3.10 Questionnaire 23 3.11 Decrease in accuracy 4 3.12 Increase in task completion time 25 3.13 Decrease in accuracy when using different vision systems 23.14 Increase in completion time when using different vision systems 26 3.15 Questionnaire results 27 ix LIST OF FIGURES x 3.16 Decrease in accuracy — results from the learning evaluation 28 3.17 Increase in task completion time — results from the learning evaluation 29 4.1 Control system block diagram 32 4.2 3-DOF hand support mechanism 4 4.3 Hand support 37 4.4 Schematic of motion sensing by means of image processing 42 5.1 Basic configuration of the arm 48 5.2 Wrist and end-effector of the mechanical sensor 53 5.3 Mechanical sensor 55 5.4 Reference frames based on the DH convention 57 5.5 Setup for the evaluation of the mechanical sensor 9 5.6 Detail of mechanical sensor mounted on 3D stage 60 5.7 Evaluation of precision errors 62 5.8 Misalignment of the wrist axes 4 6.1 Model of the plant dynamics 67 6.2 PID controller 69 6.3 Computed torque control6.4 Delayed computed torque feedforward signal . 70 6.5 Block diagram of the control system with a PID controller 72 6.6 Simulated results from the PID controller 73 6.7 Nyquist plot for the discrete-time PID control system 74 6.8 Block diagram of the control system with computed torque compensation 75 6.9 Computed torque control block diagram 76.10 Simulated results from the PID controller with feedforward compensation 76 6.11 Nyquist plot for the control system with computed torque compensation 77 6.12 Experimental one-axis system 78 6.13 Torque and error implementation results for the PID controller 79 LIST OF FIGURES xi 6.14 Torque and error implementation results for the PID controller with feedforward compensation 80 6.15 Control system response to a step input 81 6.16 Implementation results under step disturbance of magnitude 0.03 Nm 82 6.17 Implementation results under step disturbance of magnitude -0.03 Nm 83 6.18 Control system diagram with added noise and quantization error 83 6.19 Delayed computed torque compensation block diagram 84 6.20 Acceleration calculated as the second derivative of the motion signal 84 6.21 Simulated results obtained using delayed computed torque compensation with a 0.0035 Nm friction 85 6.22 Simulated results obtained using delayed computed torque compensation with a 0.03 Nm friction 6 A.1 Three dimensional heart motion trajectory 99 A.2 Heart surface speeds 9A.3 One dimensional heart motion trajectory 100 A.4 Fourier transform of motion waveform 1 A.5 Filtered motion waveform 10A. 6 Magnitude of the encoder noise 2 B. l Centers of mass 106 Cl Required encoder resolution as a function of the length of link 1 114 C. 2 Required encoder resolution as a function of the length of link 2 115 C.3 Required encoder resolution as a function of the length of link 3 116 C.4 Required encoder resolution as a function of end-effector error 117 List of Acronyms CABG Coronary Artery Bypass Grafting CPB Cardiopulmonary Bypass cpr counts per revolution DH Denavit-Hartenberg DOF Degree of Freedom ECG Electrocardiogram fps frames per second IMA Internal Mammary Artery LAD Left Anterior Descending (coronary artery) MICS Minimally Invasive Cardiac Surgery MIDCAB Minimally Invasive Direct Coronary Artery Bypass OPCAB Off-Pump Coronary Artery Bypass PACAB Port-Access Coronary Artery Bypass PID Proportional Integral Derivative (controller) xii Acknowledgements I extend my sincere gratitude to my supervisors, without either of whom this work could not have been realized: To Dr. Faro Sassani for opening the doors to this unique opportunity for me and for his guidance and support throughout the project, and to Dr. Tim Salcudean for his invaluable guidance and help and for providing me with helpful and insightful ideas. I also wish to thank Dr. Sam Lichtenstein for his assistance and support on the medical side of this project. The financial support provided by the IRIS/PRECARN Network of Centres of Excellence is greatfully acknowledged. I am also grateful to the Faculty of Graduate Studies and the sponsors of the Jean MacDonald award. I would like to recognize the help of the staff in both the Mechanical and Electrical Engineering Departments. Thanks to Simon Bachmann, Terence Gilhuly, Ruediger Six, Henry Wong and Wen-Hong Zhu for their advice and knowledge which enabled the completion of this project. I also wish to thank everyone in the robotics group for providing me with a happy environment to work in. Special thanks go to Simon DiMaio for his technical guidance and advice, his personal time and his invaluable friendship. I am grateful to everyone in the Neuromotor Control Laboratory for helping me to better understand the Canadian culture, and for making my time in Canada much more enjoyable. I thank my friends from Green College who helped me see the world from a different perspective. My deepest love and gratitude is felt for my parents Roberto and Mercedes, my sister Maria Amalia and my brother Bernardo for their never ending encouragement and support. This would have been impossible without them. Finally, I deeply thank my love Michael Naish, who believed in me, stood by my side and helped me to get through every step of the way. I thank you for your love and your patience. xiii Chapter 1 Introduction 1.1 Coronary Artery Bypass Grafting Surgery Coronary artery disease is the leading cause of death in Canada and the USA. In 1995, it claimed more than 16,000 lives in Canada alone [1,2]. Depending on the severity of the illness, different treatments can be used to reduce pain and increase the chance of survival. The treatment of choice for the most advanced cases of coronary artery disease is a surgical procedure called Coronary Artery Bypass Grafting (CABG) Surgery [3]. The goal of CABG surgery is to provide an alternative channel for the blood to reach the heart muscle. This new channel is a blood vessel from another part of the patient's own body, which has to be sutured to the coronary artery on the heart surface at a point distal to the blockage. The suturing process is a complex procedure that requires a high degree of skill and accuracy. In almost all CABG procedures, the blood going into the heart is diverted to the heart and lung machine, which removes carbon dioxide, adds oxygen and pumps it back into the body. This procedure is called cardiopulmonary bypass (CPB) and it enables stoppage of the heart during the surgery. Performing the surgery on a non-beating heart reduces the difficulty of the procedure by providing a stable work space for the surgeon. However, the cardiopulmonary bypass results in a series of secondary damaging effects [4]: anemia, red blood cell aggregation, gaseous and particulate emboli, hemolysis (red blood cell damage), and localized ischemia, among others. Therefore, it would be preferable to be able to eliminate the CPB and perform the surgery on the beating heart. 1 1.2 Surgery on the Beating Heart 2 1.2 Surgery on the Beating Heart CABG surgery can be performed without the use of the heart and lung machine since the chambers of the heart are not opened. The only technical requirement for suturing is to have a bloodless anastomotic field, which can easily be achieved by a temporary coronary occlusion [5]. This belies the difficulty of performing grafts accurately on a beating heart, as there is a consid erable loss of accuracy due to its motion. As a result, studies have shown that it is less effective to perform the grafts on the beating heart compared to stopped heart surgery [6], which has justified the need to develop methods and devices that improve the surgeon's performance when suturing on the beating heart. 1.3 Devices for Heart Surgery In order to improve the results of surgery on the beating heart, several devices have been developed, some of which are currently in use. These methods are explained in the following sections. 1.3.1 Passive Devices Passive devices for cardiac surgery typically consist of a surgical stabilizer that attempts to reduce the motion of the surgical area on the heart surface. Cardio Thoracic Systems and Kapp Surgical Instruments Inc. are two companies that have developed surgical stabilizers [7,8]. Mounted on the retractor blades, these stabilizers press down on the heart surface to reduce the motion of a specific area; however, they have the disadvantage of allowing surgery to be performed only on the top surface of the heart. In addition, since the heart is in motion, the applied force has to be sufficient in order to ensure that the stabilizer remains in contact with the surface during heart contraction. The magnitude of this force might cause tissue damage in the surrounding area. Other advances include the use of suction instead of pressure to stop the motion of the heart in a localized area. The Octopus, developed by Medtronic [9], has a series of suction pods that grasp the heart tissue around the surgical site. A similar stabilizer was developed at the University of British Columbia [10], which consists of a C-shaped ring that surrounds the surgical site and uses vacuum pressure to stabilize it. Although the use of suction improves the stability of the tissue 1.4 Proposed Solution and its Potential Benefits 3 and allows surgery to be performed on the sides of the heart, it could still cause damage due to the amount of vacuum force necessary to grasp the tissue in order to stop the local heart motion [11]. 1.3.2 Robotic Devices Recent advances in robotics and telepresence systems have led to the development of robotic systems for heart surgery. These include a teleoperation system called Zeus, recently developed by Computer Motion [12]. It is comprised of three interactive robotic arms. One of these positions the endoscope, while the other two manipulate the surgical instruments. The surgeon performs the surgery remotely while seated at a console, from where he or she controls the motion of the instruments and the position of the endoscope. A similar device has been developed by Intuitive Surgical [13]. These systems have been used successfully during minimally invasive heart surgery with the aid of the cardiopulmonary bypass. However, the equipment is very expensive and the surgeon is not in direct contact with the patient. In addition, the fact that the visibility of the surgical area and the surgeon's dexterity are reduced results in longer periods of time on CPB. In fact, some cardiac surgeons feel that the benefits gained through endoscopic surgery are outweighed by the complications and increased recovery times that result from the CPB [14]. These drawbacks have justified the need to develop a better solution that would allow surgery to be performed on the beating heart, as will be addressed in the following section. 1.4 Proposed Solution and its Potential Benefits This project proposes a new method for performing surgery on the beating heart. The method consists of using a heart-tracking support to move the hands of the surgeon in synchrony with the heart motion, as shown in Figure 1.1. This greatly reduces the relative motion between the heart and the tools making it feasible to perform the surgery on the beating heart. The main advantage of this approach is that it allows surgery to be performed without stopping the heart, thus eliminating the damaging effects of the cardiopulmonary bypass. In contrast to the cardiac stabilizers that attempt to stop the motion of the surgical site by applying considerable tissue forces, this method allows the hands of the surgeon and the tools to move in synchrony with the heart motion, therefore eliminating tissue damage caused by stabilization forces. 1.4 Proposed Solution and its Potential Benefits 4 Figure 1.1: Moving hand support. Furthermore, there is a considerable reduction in the cost relative to teleoperation systems, since only a 3-DOF platform is required, as opposed to 6-DOF master and slave robots for each instrument. An additional advantage is that the surgeon's dexterity is largely preserved due to the direct manipulation of the tools. A method consisting of using a moving hand support was recently proposed by Mayer [15]. It uses a moving support to cancel a significant component of the relative motion between the hand and the coronary anastomosis site. The motion of the support is controlled by a pacer that also controls the heart beat. This motion is produced by a cam, shaped so that the pattern of the oscillation of the support follows the heart motion. While this method does not require CPB nor places stress on the heart muscle in an effort to stabilize it, it has the disadvantage of requiring a pacer in order to control the relative motion between the surgical site and the platform. In addition, the relative displacement between the 1.5 Project Scope and Objectives 5 platform and the surgical site cannot be adjusted during the procedure. Other disadvantages arise from the fact that the motion of an area on the heart surface varies depending on its location. Since a cam is used to produce the motion of the support, it is not possible to change the trajectory of the platform to exactly match that of each patient's heart motion, or to vary it depending on where the surgical area is located on the heart surface. The heart-tracking moving support proposed here, moves in synchrony with the heart by tracking the motion of the surgical area on the heart surface. The motion of each axis of the support is controlled independently, which allows for amplitude and frequency control, as well as for adjustment of the motion waveform. The motion can be adjusted according to the characteristics of each patient and of the specific surgical area. In addition, the position of the support with respect to the heart can be adjusted at any time during the surgery. 1.5 Project Scope and Objectives This thesis focuses on the general requirements and specifications for the design of a heart-tracking hand support for surgery on the beating heart. After establishing the feasibility of the approach, a solution to the design problem is presented. Different means of measuring the heart motion in real time have been evaluated, and a customized design of a mechanical sensor for this purpose is proposed. Furthermore, based on the proposed design of the moving support mechanism, motion control strategies have been generated that allow the hand support to track the heart motion. It should be noted that, while this thesis is concerned with the evaluation of the feasibility of a heart-tracking moving hand support, it does not address its detailed design, which is a significant undertaking. To address the needs outlined in the sections above, the heart-tracking moving hand support is presented as a new approach for performing surgery on the beating heart. The specific objectives of this thesis are detailed below: 1. To evaluate the feasibility of the approach by determining if it is possible to perform accurate tasks on moving targets while the hands are being moved in synchrony with the targets. 2. To establish the general configuration of the moving support system, as well as to specify the 1.6 Thesis Overview 6 general requirements of its main components. 3. To determine and evaluate motion sensors that can be used to measure the heart motion in real-time. 4. To generate a control strategy that will allow the moving hand support to track the heart motion satisfactorily. 1.6 Thesis Overview The structure of this thesis is summarized in the outline below: Chapter 1 Introduction: Addresses the motivation, project scope and objectives of this thesis. Chapter 2 Literature Review: Introduces literature related to CABG surgery and minimally invasive cardiac surgery. Issues of heart motion trajectories and the control systems suitable for tracking periodic inputs, are addressed. Chapter 3 Feasibility Study: Explains the procedure followed to evaluate the feasibility of the proposed method, as well as the results obtained from the tests. Chapter 4 The Moving Support System: Explains the general configuration and requirements of the moving hand support system. In addition, it explains how the design of its main components has been addressed. Chapter 5 Design of a Mechanical Sensor: Shows the design procedure for a mechanical sensor that can be used to measure the heart motion, as well as the evaluation performed to determine its accuracy. Chapter 6 The Control System: Explains the controller design and shows the results obtained from the simulation and implementation of the control system. Chapter 7 Conclusions and Recommendations: Concludes the thesis with a summary which high lights the contribution of this work. Suggestions for future work and improvements are also given. Chapter 2 Literature Review This chapter presents a review of the literature relevant to this project. The first two sections explain coronary artery bypass grafting surgery in detail, as well as currently performed minimally invasive procedures. A brief description of the heart motion trajectories and displacements is then provided. Since the heart motion is almost periodic, the last section deals with control systems that have been developed to track periodic trajectories. 2.1 Coronary Artery Disease The coronary arteries are very narrow blood vessels that carry nutrients and oxygen to the heart muscle. Fat and other materials tend to accumulate on their internal walls, causing them to narrow further, thus reducing blood flow to the heart tissue. If the artery is completely occluded, the heart muscle dies and the heart goes into cardiac arrest. The progression of coronary artery disease can be controlled by reducing risk factors such as smoking, the leading of a sedentary life style and obesity. Further medical treatment involves the use of drugs to reduce the oxygen and nutrient requirements of the heart muscle and to increase blood flow through the arteries [16]. Angioplasty is a non-surgical procedure that can be used to improve the blood flow to the heart, and involves guiding a catheter through the veins of the patient's arm or leg, to the heart. A balloon, located at the end of the catheter, is inflated to flatten the obstructing material. Some drawbacks of this procedure are that it is limited to 1 or 2 obstructions and that in one third of 7 2.2 Coronary Artery Bypass Grafting Surgery 8 cases the arteries become narrowed again within 6 months [17]. Transmyocardial Revascularization or TMR is a recently developed treatment. The procedure is performed on the beating heart through a small incision in the chest, and employs a laser beam to create small channels in the heart muscle with the purpose of supplying blood to the tissue. It has been proven to reduce chest pain in the short term [18]. The most invasive of all treatments is called coronary artery bypass grafting (CABG) surgery. This procedure will be discussed in detail in the following section. 2.2 Coronary Artery Bypass Grafting Surgery The goal of CABG surgery is to revascularize the heart muscle. It has proven to be the most effective treatment for the relief of angina and in certain situations it has been proven to prolong patient survival [19]. In 1995, more than 610,000 of these procedures were performed in Canada and the USA [1,2]. In order to provide the surgeon with a stable surgical area, 95% of these procedures were performed in conjunction with a cardiopulmonary bypass (CPB). The cardiopulmonary bypass (CPB) is a procedure by which the heart is stopped and the circulation and filtration of the blood are performed by the heart and lung machine. The blood going into the heart is diverted to the machine, where it is filtered in order to add oxygen and to remove carbon dioxide. It then pumps the blood back into the patient's body. Figure 2.1 shows a photograph of a heart and lung machine. 2.2.1 The Traditional Surgical Procedure Soon after the general anesthesia is administered to the patient, the chest wall is opened by means of a sternotomy. A skin incision is made along the midline of the chest, the sternum is divided longitudinally and the sternal periosteum (layer of tissue that covers the thoracic organs) is elec-trocoagulated. Once the thoracic cavity is accessible, a sternal retractor is inserted and opened to expose the heart [3]. The heart and lung machine is then attached by means of a procedure called cannulation. This procedure allows a cannula to be inserted into the blood vessels in order to divert the blood to the heart and lung machine. Figure 2.2 shows a human heart on CPB during CABG surgery. 2.2 Coronary Artery Bypass Grafting Surgery 9 Figure 2.1: Heart and lung machine. The auxiliary vessel that is used to perform the coronary bypass can be a vein from the arm or the leg, or an artery from the chest wall. The veins are obtained from the arm or the leg of the patient through several short incisions which are closed and stitched immediately afterward. This procedure and the sternotomy are performed simultaneously. When an artery from the chest wall is used, it must be dissected once the chest cavity has been exposed. The auxiliary blood vessels are then grafted to the coronary arteries on a point distal to the blockage. Figure 2.3 shows the suturing procedure for an end-to-site anastomosis — when the end of the auxiliary blood vessel is being attached to the coronary artery. These blood vessels are between 3 and 5 mm in diameter. A longitudinal incision is made in the wall of the auxiliary blood vessel, which is then grafted to the coronary artery with a continuous stitch for two thirds of the length of the arteriotomy on one side. The opposite side is sutured in a similar manner. Five to seven interrupted stitches are used to complete the anastomosis. If an artery is used to perform the graft, it is only necessary to attach it to the coronary artery. 2.2 Coronary Artery Bypass Grafting Surgery 10 Figure 2.2: Human heart on cardiopulmonary bypass. However, when a vein is used to bypass the blood, the upper end of the vein must be grafted to the aorta, so that blood at high pressure flows through. Once all grafts have been performed, the heart and lung machine can be disconnected and all the cannula entries must be carefully stitched. The chest cavity is closed using stitches and clips. 2.2.2 Minimally Invasive Coronary Bypass The invasiveness of traditional CABG surgery has motivated surgeons and scientists to investigate alternative surgical techniques. Two major changes in the traditional procedure have been evaluated in order to reduce the invasiveness of the surgery. One change involves performing the surgery through small incisions in order to reduce complica tions and the patient's recovery time. This type of procedure is generally called Minimally Invasive Cardiac Surgery (MICS) [21]. A specific type of MICS is Port Access Coronary Artery Bypass (PACAB) [22], in which the tools and a camera (or endoscope) are inserted through small holes, or ports, located on the chest wall. The surgeons view the surgical area on a television screen. In order to perform surgery through small incisions, a new procedure called Minimally Invasive 2.2 Coronary Artery Bypass Grafting Surgery 11 Figure 2.3: Grafting procedure for an end-to-site anastomosis [20]. Cardiopulmonary Bypass has been developed [14]. Instead of attaching the cannulae directly to the aorta and ventricles, access to the circulatory system is acquired by passing catheters through the femoral and neck vessels. Since the heart is stopped, the surgeons can move it in order to access all of its sides. The second deviation from the traditional procedure involves performing the surgery on the beating heart in order to eliminate the secondary effects of CPB. This procedure is called Off-Pump Coronary Artery Bypass (OPCAB) [23]. A combination of these two variations would be ideal in eliminating the invasiveness of CABG surgery. A type of surgery called Minimally Invasive Direct Coronary Artery Bypass (MIDCAB) attempts to do this by performing surgery on the beating heart through a 10 to 13 cm incision made in the chest [21]. Only one or two grafts can be performed since the incision has to lie on top of the surgical area. This procedure also has the advantage of being less expensive than traditional CABG surgery. 2.2 Coronary Artery Bypass Grafting Surgery 12 2.2.3 The Modified Surgical Procedure The procedure for performing CABG surgery on the beating heart differs from that of the traditional approach in a number of ways. The auxiliary vessel used for bypass is usually the internal mammary artery (IMA) [5]. This allows the bypass to be performed without grafting directly to the aorta, which requires using a clamp to stop the blood flow, possibly resulting in damage to the arterial tissue [20]. The IMA is dissected using electrocautery and is grafted to the left anterior descending (LAD) artery following the traditional technique explained above. To be able to perform a graft without the use of the cardiopulmonary bypass, it is necessary to maintain a dry operative field. This can be obtained by isolating a particular segment of the heart from its blood supply, also called coronary occlusion. There are two methods for performing this occlusion, as follows [20]: • A clamp may be applied to the coronary arteries both distally and proximally to the surgical site. A portion of the heart muscle adjacent to the coronary artery is included in the jaws of the clamp to prevent trauma to the vessel. • Another option is by means of a tourniquet. A suture is guided around the artery and a small tourniquet is tightened just enough to obstruct blood flow and secure a dry field. These are placed both distally and proximally. A third tourniquet can be placed as a horizontal mattress suture to incorporate the perforating branches. Surgery on the beating heart requires that the heart muscle receive the necessary amount of oxygen in order to function properly. The question arises as to whether the blood flow can be interrupted for several minutes in order to complete the anastomosis. It has been proven by the practice of angioplasty, that coronary occlusion and cardiac ischemia are well tolerated for up to 15 to 20 minutes [5]. This is longer than the time required to isolate a coronary artery, open the vessel and apply a graft. 2.3 Heart Motion 13 2.3 Heart Motion Heart displacements and motion trajectories vary considerably depending upon the age of the person and the severity of the coronary disease. However, for the design of the moving hand support and its controller, it is necessary to have some knowledge of typical displacements and motion trajectories. This is explained in the following sections. 2.3.1 Displacements The displacements of the heart wall vary depending upon location. Since the pumping force of the left ventricle is much higher than that of the right ventricle, the maximum displacements of the heart wall motion are present close to the left side of the heart. The motion axes have been defined as shown in Figure 2.4. Based on these directions, Table 2.1 summarizes the maximum displacements along each of the axes obtained from [24]. According to [25] the maximum 3D displacement of the coronary arteries is 1.67 cm. Figure 2.4: Direction of the axes. Axis Maximum Displacement (cm) x -0.95 y 0.97 z 0.77 Table 2.1: Maximum 3D displacements [24]. 2.4 Tracking of Periodic Trajectories 14 2.3.2 Trajectories The modeling of heart motion has always been a difficult task due to its complex geometry [26]. The orientation of its fibers causes it to undergo large, nonrigid deformations as it pumps blood around the body. The contraction of left ventricular fibers results in a twisting motion of the left ventricle [27]. This suggests that the motion of a particular area on the heart surface may only be accurately defined by three translational and three rotational variables. However, the motion of just a point on the surface of the heart can be expressed by three translational variables. A typical trajectory of a point on the heart surface can be found in [24]. It has been demonstrated in the past that the twisting of the human left ventricle about its long axis is a function of the cardiac cycle [27]. Since the cardiac cycle is quasi-periodic, the motion of a point on the heart surface can be represented by a quasi-periodic waveform, where the amplitude and period change slightly from one period to the next. In order to move the hands of the surgeon in synchrony with the heart motion, a control system is required to ensure that the moving hand support tracks the motion of a point on the heart surface. The following section explains different control methods that have been developed for tracking periodic trajectories. 2.4 Tracking of Periodic Trajectories The objective of a control system is to provide input to a plant in order to achieve a desired output. The nature of the plant determines the type of controller that is required for that particular control problem. Proportional, integral and derivative (PID) control [28] is an approach commonly used in indus trial processes, motion systems and robots. For more accurate tracking of trajectories, feedforward or computed torque compensation [29] can also be applied. This type of controller is applicable only when the dynamics of the plant can be accurately modeled, or identified. A number of researchers have addressed the issue of tracking periodic trajectories by using a control scheme called repetitive control [30,31]. Repetitive control is based on the internal model principle, which states that a closed loop system will track a trajectory with zero error if the 2.4 Tracking of Periodic Trajectories 15 dynamics of such a trajectory appear in the dynamics of the control system [32]. When tracking periodic signals the internal model principle reveals that perfect tracking can be achieved if a generator for the input signal is included in the stable closed-loop system. A periodic signal can be generated by a free system that includes a time-lag element corresponding to the period. However, since such a system will generate a perfectly periodic trajectory, these control schemes require that the input have a fixed period. In addition, most controllers that are based on the internal model principle require periodic inputs and disturbances. Examples of control schemes based on repetitive control can be found in [33-35]. While none of these approaches provides a complete solution to the problem of tracking quasi-periodic trajectories with variable amplitude and period, they present some interesting ideas for the design of a suitable controller. This chapter presented a review of the literature relevant to this project. The first sections explained the surgical procedure for which the moving hand support is being designed. Since this design depends in part on the characteristics of the heart motion, a brief description of the heart motion trajectories and displacements was then provided. Finally, since the heart motion is quasi-periodic, a description of control systems that have been designed for tracking of periodic signals was addressed. Chapter 3 Feasibility Study A platform that moves the hands of the surgeon in synchrony with the heart motion can be used to perform an anastomosis if (i) near-zero relative motion can be achieved between the moving platform and the surgical site, and (ii) surgeons can perform delicate tasks on a moving surgical site as long as their hands are moved with the site. The objective of this chapter is to prove the latter point by testing the ability of a human to perform a task on a moving target while the hands are being moved with it. It was also desired to determine the need for a vision system that provides a stable view of the hands, tools and workspace. For these purposes an experimental moving platform was designed and built. 3.1 The Moving Platform The design of the platform was based on the design of an experimental test setup for an optical stabilizer [10]. See Appendix B for a detailed description of the design calculations. The hand of the subject can be attached to the platform by means of a glove fixed to it, so that it stays in contact with the platform. To provide a guide for the task to be performed, a piece of paper having a target pattern (see Section 3.1.2) can be inserted and fixed at a desired position. The targets are located directly on the moving support to simulate perfect tracking of the surgical site by the hand. To provide a steady image of the workspace, one or two cameras can be mounted onto the platform. Since the cameras move together with the platform, the image obtained from them 16 3.1 The Moving Platform 17 provides a steady view of the work site. Figure 3.1 shows a picture of the moving platform with one camera mounted on it. 3.1.1 Platform Motion The motion of the platform roughly imitates the heart motion through an oscillatory rotation around a shaft. Figure 3.2 shows the vertical displacement of the hand and the targets caused by a 33° rotation of the shaft. Figure 3.3 shows a diagram of the functional components of the system. The desired platform angle was generated by a PC as a pulse width modulated (PWM) signal. This was converted to a reference voltage for a standard PID motor controller loop. The original waveform used by the program was determined by measuring the motion of the medial coronary artery of a pig's heart which was then scaled to a human heart. A simple exponential rise and fall waveform was created based on the maximum measured motion [10]. Figure 3.4 shows a typical plot of the actual motion of the targets as a function of time. Table 3.1 shows the details of the equipment used in the system. Figure 3.1: Moving platform. 3.1 The Moving Platform 18 Targets^ Figure 3.2: Platform motion. PWM DESIRED PC WITH DAC SIGNAL LOW PASS POSITION + OUTPUT CARD FILTER ERROR SIGNAL ANALOG PID CONTROLLER CCD-MOTOR ACTUAL POSITION POTENTIOMETER Figure 3.3: Functional components of the system. 3.1.2 Task and Test Design The task performed simulates a simple suturing process. It consists of marking with a pen one single dot inside each of the circles of a pattern as seen in Figure 3.5, in the order shown by the numbers. The diameters of the circles, the grid spacing and the respective target size assigned for the four different sizes used are shown in Table 3.2. It was determined that a total of seven different tests should be performed. The tests and the reasons for each of them are as follows: 1. Stationary platform and direct visualization of the workspace. This situation simulates sutur ing on a stopped heart, which is generally achieved by means of the heart and lung machine. 2. Stationary platform and visualization of the workspace on a TV screen. This test was added 3.1 The Moving Platform 19 Equipment Brand \Model Characteristics Motor Maxon \RE035-071-34EAB200A 90 Watt DC, Stall Torque 1.1 Nm Gearhead Sterling Inst. \ S9117A-PG010 Planetary, Ratio 10:1, single stage Camera Philips \VC72505T Color CCD Cameras Pulnix \TM-545 Monocrome CCD, 510 x 492 pixels Stereo Goggles Reiser Electro-optics \ VIM 500 Color, 180000 pixels, 4:3 ratio Table 3.1: Equipment details. as a reference to Test 6. 3. Stationary platform and visualization of the workspace through stereo goggles. This test was added as a reference to Test 7. 4. Platform in motion and no attachment of the hand as shown in Figure 3.6. This test simulates suturing on the beating heart without any stabilization help. H ( r ^1 o 1 K ) K J £. 1 c •\ c \ A J K ) ) C r \ r \ c 3 K ) K ) D -7 r \ r o f \ ) ) u Target Size Diameter (mm) Grid Spacing (mm) 1 3.43 4.76 2 2.29 3.18 3 1.73 2.38 4 1.14 1.59 Figure 3.5: Test pattern. Table 3.2: Test pattern dimensions. 3.1 The Moving Platform 20 5. Platform in motion, hand attached to it and direct visualization of the workspace, as shown in Figure 3.7. This test simulates suturing on the surface of the beating heart and the hands are being moved to track the surgical site. 6. Platform in motion, hand attached to it and visualization of the workspace on a TV screen, as shown in Figure 3.8. This situation simulates suturing while the heart and the hands are seen as a steady, two dimensional image. 7. Platform in motion, hand attached to it and visualization of the workspace through stereo goggles, as shown in Figure 3.9. To provide depth perception, two cameras and a pair of stereo goggles were used to produce a three dimensional image. Figure 3.6: Moving platform with no hand support. The hand that was attached to the platform during tests 5 to 7, depended on whether the subject was left or right handed. 3.1.3 Testing A total of twenty six subjects tested the platform. The test population was comprised of three cardiac surgeons, one professor and twenty two graduate students. The age of the subjects ranged from 22 to 49 years of age. Seven were older than 30 years of age and nineteen were younger. There 3.1 The Moving Platform 21 was a total of seven female subjects and nineteen male subjects. Two of the subjects were left handed. Although surgeons perform training exercises that improve their ability to perform accurate 3.2 Experimental Results 22 Figure 3.9: Visualization of the workspace on stereo goggles. tasks, none of the other subjects had any experience in performing such tasks. For this reason they were allowed to practice as much as they felt was necessary. Each subject was told to perform the task as accurately and quickly as possible, giving greater importance to the accuracy than to the speed. Each of the subjects performed the seven tests in a random order. After each test, subjects were asked to fill out the subjective questionnaire shown in Fig. 3.10. Three of the subjects were asked to perform the test set an additional two times with the goal of determining whether there was a learning process involved when performing the task. 3.1.4 Quantification of Performance The two factors measured to judge performance were task completion time and the accuracy and neatness of the marks made with the pen. To measure accuracy the scoring scale shown in Table 3.3 was used. If two marks were made, the one further away from the target was considered for scoring purposes. 3.2 Experimental Results Table 3.4 shows a sample of measured values for average task completion time and average accuracy. The accuracy score is calculated by multiplying the total number of targets, 8, by the score obtained 3.2 Experimental Results 23 Moving Platform Testing Subject's Information Name: Age: Sex: Occupation: Subject's Evaluation on Moving Platform After performing each task, score each according to the following scale: 4-Very High 3-High 2-Average 1-Low O-None Please feel free to add comments and suggestions. The numbers from one to seven correspond to each of the tests made, which are: 1. Steady platform and direct vision. 2. Steady platform and use of the image from the camera (mono vision). 3. Steady platform and use of the image from the camera (stereo vision). 4. Moving platform and no attachment of the hand. 5. Moving platform, hand attached and direct vision. 6. Moving platform, hand attached and steady image (mono vision). 7. Moving platform, hand attached and steady image (stereo vision). Discomfort 1_2_3_4_5_6_7_ Fatigue 1_2_3_4_5__6_7_ Concentration 1 2 3 4 5 6 7 Difficulty 1_2_3_4_5_6_7_ Comments and suggestions: Figure 3.10: Questionnaire. Score Characteristics of the mark 6 Neat dot inside the target 5 Smear inside the target or one neat dot in contact with the circle 4 Smear in contact with the circle 3 Neat dot outside the circle but inside the four quadrants surrounding the target 2 Smear outside the circle but inside the four quadrants surrounding the target 1 Smear or dot that is outside the four surrounding quadrants Table 3.3: Accuracy scoring scale. 3.2 Experimental Results 24 Target Size Accuracy Score Completion Time (s) 1 46.6 ± 2.4 6.52 ± 2.6 2 47.2 ± 1.3 6.04 ± 2.0 3 47.3 ± 1.4 6.08 ± 2.1 4 45.5 ± 2.5 6.31 ± 2.2 4 Very High 3 High 2 Average 1 Low 0 None Table 3.4: Sample average results. Table 3.5: Questionnaire ranking scale. on each mark (maximum of 6), therefore, the maximum score is 48 points. These values were averaged over the 26 subjects. The standard deviations are also indicated. For each subject, all measured values were normalized with respect to the test where the platform was not moving and the same vision system was used. All graphs show the average results obtained by the twenty six subjects. The error bars show the standard deviation of the measurements from the average. 3.2.1 No Camera Use Figure 3.11 shows the decrease in accuracy that results from a moving platform compared to a stationary platform for the four different target sizes (see Table 3.2). Similarly, Figure 3.12 shows the increase in the task completion time in comparison to when the platform was not moving. 80% 60% -40% -20% 0% -20% 7.0% 7.9% 10.4% 1 2 3 Target Size (a) Hand attached 80% n 60% 40% 20% 0% -20% 30.9% 19.11% 51.1% 40.13% (771 1 2 3 Target Size (b) Hand not attached Figure 3.11: Decrease in accuracy with target sizes ranging from 1 (largest) to 4 (smallest), see Table 3.2. The results show that without the hand support, the accuracy decreases by more than 50% when performing the task on the smallest pattern size. When the hand is attached to the platform this reduction is less than 11%, even for the smallest targets. 3.2 Experimental Results 25 200% 150% 100% 50% 0% -50% 35 b% 42.b% 39 4% 40 6% 1 2 3 Target Size (a) Hand attached 200% 150% 100% 50% 0% -50% 87 3% 10d2% 104.3% g5.9% 1 2 3 Target Size (b) Hand not attached Figure 3.12: Increase in task completion time with target sizes ranging from 1 (largest) to 4 (smallest), see Table 3.2. 80% 60% 40% -20% -o% -20% J 10.4% oco/ 7.0% 7.9% i Ufa i (sa i m\ 2 3 Target Size Direct vision 80% n 60% 40% 20% 0% -20% J 5.1% 8j1%1!£% 14.7% 2 3 Target Size Stable 2D image 80% 60% 40% 20% 0% -20% 9.5% il 12.|7% 14J2% 17'3% nil il 1 2 3 Target Size Stable 3D image Figure 3.13: Decrease in accuracy when using different vision systems. Tar get sizes range from 1 (largest) to 4 (smallest), see Table 3.2. When the hand is attached and the platform is moving, the average task completion time is increased by around 40% with respect to when the platform is stationary, independent of the target size. This shows a considerable improvement over unattached hand, where the average task completion time is almost doubled. 3.2.2 Use of Different Vision Systems Further analysis was made to determine the merits of using different vision systems to provide a steady image of the workspace. The results are compared to the test with direct vision in Figures 3.13 and 3.14. These graphs show how the accuracy is reduced by approximately 15% for the smallest target using mono vision and 18% using stereo vision. These values are both greater than when no cameras 3.2 Experimental Results 26 200% 150% 100% 50% 0% -50% 35.3% 42.3% 39.4% 40.5% III ii ii ii I 2 3 Target Size Direct vision 200% 150% 100% 50% 0% -50% -I 1 25.0% 29.|7% 4!|L% 35JB% 2 3 Target Size Stable 2D image 200% -i 150% 100% 50% 0% -50% 21.5% 17.3% 21 .,1% 27£% _Hi H&L an 111 1 2 3 Target Size Stable 3D image Figure 3.14: Increase in completion time when using different vision sys tems. Target sizes range from 1 (largest) to 4 (smallest), see Table 3.2. were used. On the other hand, the stereo vision system produces the least increase in average task completion time - less than 30% for all the target sizes. 3.2.3 Questionnaire Results The graphs in Figure 3.15 show the results of the subjective evaluation made by each test subject. The ranking scale used by the subjects for scoring purposes is shown in Table 3.5. The test number shown corresponds to the list given in Section 3.1.2. As can be seen from the graphs, subjects found the test with no hand support and the platform in motion (Test 4) to be the most uncomfortable, fatiguing and difficult one, as well as the one that required the most concentration. When the platform was not in motion, the test with direct vision (Test 1) was perceived to be the easiest and simplest to perform. Looking at the image on the TV screen (Test 2) in 2D or with the goggles (Test 3) in 3D caused the task to be more difficult and to require higher concentration. In addition, the use of the goggles produced the greatest discomfort and fatigue. These results are consistent with the results obtained when the platform was in motion (Tests 5, 6 and 7), although there is a general increase in all the factors due to the motion. 3.3 Discussion 27 1 H 2 3 4 5 6 7 1 S 2 f 3 to 5 h- 6 1 2 3 Score (a) Discomfort 1 2 3 Score (b) Fatigue 1 0) 2 XI E 3 Nu 4 (0 5 4) 6 1-7 1 t 3 5 4 1 2 3 Score (c) Concentration 1 2 3 Score (d) Difficulty Figure 3.15: Questionnaire results with discomfort, fatigue, concentration and difficulty levels ranging from 1 to 4, see Table 3.5. 3.2.4 Results of the Learning Evaluation Figures 3.16 and 3.17 show the graphs for the results obtained when three of the subjects repeated the test two more times. Averages were obtained from the three subjects and the three test sets are shown adjacent to each other, starting from the left with the first trial. The cases shown here are only for the tests where the platform is in motion. All the values have been normalized with respect to when the platform was stationary, as in the previous analysis. As can be seen there is no general tendency for an increase in accuracy or decrease in task completion time for the second or third performances. In some cases there is improvement, but not in all the tests. 3.3 Discussion The direct vision results demonstrate that when the hand moves in synchrony with the task space, there is a significant improvement in the accuracy achieved. Using a vision system to provide a steady image of the workspace and the hand did not further improve the accuracy of results; however, there are several factors that have to be taken into account when analyzing these results. 3.3 Discussion 2S 80% 60% 40% 20% -0% 80% 60% 40% 20% 0% 1 2 3 Target Size (a) Direct Vision 1 2 3 Target Size (c) Stereo Vision 4 80% 60% 40% -20% -0% 1 2 3 Target Size (b) Mono Vision 2 3 Target Size (d) No Support Figure 3.16: Decrease in accuracy — results from the learning evaluation. The TV screen used in the 2D system is located in front of the subject, causing the workspace to be seen as a vertical surface instead of a horizontal one. In addition, there is lack of depth perception. When using the stereo goggles, although the 3D image provided depth perception, problems arose due to the low resolution of the image (17 pixels across the smallest target) and the fact that the image was located at the edge of the depth of field of the camera. Due to the nature of the surgical task, magnification of the workspace is a necessity. Without the use of a vision system, capable of following the motion of the heart, the surgical area would likely pass out of the field of view of the magnification apparatus. It is believed that if a clear and magnified stereo image is provided, the results obtained can be as good or better than those obtained when looking at the surgical area directly. When analyzing the results obtained for task completion time, it was noticed that there was a high degree of variability among the subjects, as seen from the large standard deviations shown in the graphs. This variability was noticeable in all of the tests, including those where the platform was stationary (Table 3.4). The main cause of this variability is the random order in which the tests were performed — it was common for subjects to decrease completion time from the first 3.3 Discussion 29 150% 120% 90% 60% -30% -0% 150% 120% -150% 120% 90% 60% 30% 0% 90% i. ii tfi ^ Z'^AJi 2 3 Target Size (a) Direct Vision iilLl \*1 hi 2 3 Target Size (c) Stereo Vision 2 3 Target Size (b) Mono Vision 2 3 Target Size (d) No support Figure 3.17: Increase in task completion time — results from the learning evaluation. tests to the last. This makes it difficult to obtain conclusive results from the graphs; however, the analysis was made based on the general tendency, showed by the average value obtained from all the subjects. There was an increase in the task completion time when performing the task with the platform in motion regardless of the vision system used. This increase in time is considered to be much less than that required for the use of the heart and lung machine (approximately 80 minutes); therefore, the approach is still viable. The increase in task completion time when using the stereo vision system was slightly less than when using the 2D system or direct vision. By offering a stable, 3D image of the workspace, the motion of the platform did not degrade performance as much as with the other vision systems. This agrees with the results of the questionnaire which indicate that the 3D image reduced the concentration requirements and perceived difficulty of the task. The results from the questionnaires also indicate that there is a need to improve the design of the apparatus. The levels of discomfort, fatigue, concentration and difficulty experienced by the 3.3 Discussion 30 subjects when the platform was in motion can be reduced by a better design of the support and the vision system. It is worth noting that there is no significant performance improvement to be realized by re peating the tests several times. This is demonstrated by the tests used to evaluate the learning process. Also, the ability to perform the tests was not influenced by previous surgical skill, as the performance of the three surgeons was very similar to the other, unskilled subjects. In general, the results show that it is indeed possible to perform accurate tasks on moving targets while the hands are being moved in synchrony with them. This indicates that a method based on a moving hand support that tracks the motion of the heart is feasible, and provides as a new alternative for performing coronary artery bypass grafting surgery on the beating heart. Chapter 4 The Moving Support System In the previous chapter it was shown that, at least when there is perfect tracking performance, it is possible to accurately perform dexterous tasks while the hands are being moved by a target tracking support. This chapter explains the general configuration and requirements of a moving hand support system that tracks the heart motion, in order to move the hands of the surgeon in synchrony with it. The block diagram shown in Figure 4.1 outlines the heart-tracking moving support system. Position sensors measure the distance from the moving support to the surgical site. The desired position signal, Xj, arises from this measurement modified by a position adjustment that allows the surgeon to change, at any time, the relative position of the hand support with respect to the surgical area. The desired position of the hand support Xd is compared to its actual position, Xr, which is obtained from the motor encoders. The error signal, e, resulting from this comparison is the input to a controller that produces the necessary signal to adjust the position of the hand support. Based on this figure, the system was divided into four major areas for design purposes, according to specific components that require analysis: 1. Platform position adjustment controls. 2. The moving support (the plant), which can itself be divided into three components: (i) the mechanism that provides three degree-of-freedom motion, (M) the platform that provides 31 4.1 Adjusting the Position of the Platform 32 Position + Sensors Xd Position Adjustment Controller V OUJJ Motor Encoders Figure 4.1: Control system block diagram. support for the hands of the surgeon and, (iii) the vision system that provides the surgeon with a stable image of the work site. 3. Position/distance sensors that determine the position of the hand support with respect to the surgical area. 4. The control system. The first three components will be addressed in the following sections, while the control system will, be addressed in detail in Chapter 6. 4.1 Adjusting the Position of the Platform The surgeon must be able to specify the relative position between the support and the surgical area, as well as to adjust it at all times during the procedure without affecting heart motion tracking. This feature will allow him or her to reach the surgical area comfortably as well as to give other surgeons and assistants the required access to the operating site. Some alternatives for performing the position adjustment are as follows: • Push buttons or rotary switches that move the platform up, down, left, right, forward or backwards. A drawback of this approach is that the surgeon must remove his or her hand from the support to change the position of the platform, or give instruction to an assistant to adjust the position. • Head control as has been developed by Armstrong Projects [36]. The position of the support 4.2 The Moving Support 33 is controlled by the motion of the surgeon's head. Problems may arise due to the surgeon rapidly moving the head with the purpose of looking at the monitors or the assistants, or any other involuntary head motion. • Voice control as developed by Computer Motion [37]. The surgeon controls the position of the platform by giving simple instructions: left, right, up, down. • A foot pedal that works in the same way as push buttons. This approach is simple, cost-effective and it does not require the surgeon to remove his or her hands to adjust the position. An evaluation must be performed in order to determine the best method for adjusting the position of the platform. Further discussion of this issue is beyond the scope of this thesis and will not be addressed further. 4.2 The Moving Support The moving support can be divided into three separate components, namely, the mechanism, the supporting platform and the vision system. These components will be addressed in the following sections. 4.2.1 The Mechanism In order to move in synchrony with the heart motion, the platform must be mounted on a mechanism that allows it to accurately follow the motion of the heart. As was shown in Chapter 2, the heart follows complex motion trajectories that can only be accurately represented by a 6-DOF model. However, since the surgical procedure takes place on a very small area, this area can be approximated as a point so that its motion can be completely expressed by three variables. Therefore, a 3-DOF mechanism would allow the platform to accurately track the motion of the heart. Figure 4.2 shows the proposed design for a mechanism that can move the support in synchrony with the heart motion. The three prismatic joints effect a cartesian three degree-of-freedom motion. Table 4.1 shows the equipment that could be used for the construction of the mechanism. The X-Y table provides motion on the horizontal plane while the single axis table provides vertical 4.2 The Moving Support 34 CAMERAS Figure 4.2: 3-DOF hand support mechanism f. motion. The linear motion provided by these tables is produced by a leadscrew that is actuated by a DC motor. The motor was selected based on the estimated required torque as shown in the following section. Equipment Brand/Model Characteristics X-Y Table Neat/XYR-6060 0.0127 m lead, 6.3 kg lower axis moving mass, 2.7 • 10_6kg • m2, leadscrew inertia, friction 0.03 Nm. Single Axis Table Neat/LM-400 0.0102 m lead, 3.2 kg total mass, 2.7 • 10_6kg • m2 leadscrew inertia, friction 0.03 Nm. Motors Maxon/RE 035-071-34EAB200A 0.114 Nm continuous torque, 90 watts, 6.96-10_6kg • m2 rotor inertia, 0.370 kg. Encoders US Digital/E2-1000-157-H Resolution 0.09° (3.175 • 10~6 rad). Table 4.1: Equipment specifications. ProE model drafted by Simon Bachmann 4.2 The Moving Support 35 4.2.1.1 Calculation of Torque Requirements The motion of each linear actuator is produced by a DC motor. In order to select these motors it is necessary to know the maximum required torque. This torque can be determined as a function of the system acceleration using the following equation [38]: j • x . T=— + Tf, (4.1) where r is the motor torque required to produce the desired acceleration x, TJ is the friction torque, I is the lead of the screw that moves the actuator and J is the total rotational inertia of the system. The total rotational inertia is the sum of the rotational inertia of the different components, namely the screw, the motor, the coupling, the table and the load. The rotational inertia of the table and the load can be calculated as follows [38]: Jtable+load — (4.2) e where m is the total mass that is being moved by the actuator, and e is the screw efficiency, which is typically 0.6 for leadscrews with anti-backlash nuts. The total moving mass of the mechanism shown in Figure 4.2, was calculated as shown in Table 4.2. The mass of the platform structure and the mass of the payload were estimated based on the design of the experimental moving support shown in Appendix B. By using the total mass and the equipment characteristics shown in Table 4.1, the total inertia of the system was calculated as shown in Table 4.3. The inertia of the table and load was determined as follows: no] /0.0127m \2 Jtable+load = V<T ' = L24 ' 10~4k§ ' ^'• Based on the value for the total rotational inertia, the maximum acceleration calculated in Section A.2, and the friction torque specified for the particular actuator, the total motor torque required is calculated using Equation 4.1, as follows: 1.36-10-4kg-m2-2m/s2 . n noi\T n letm T = 0.012701/2^ + 0-03Nm = 0.165Nm. 4.2 The Moving Support 36 Element Mass (kg) Platform structure + motor Payload (hands, cameras) X-Y table total moving mass Vertical stage 2.5 (estimated) 6.0 (estimated) 6.3 3.2 Total 18 Table 4.2: Calculation of the moving mass. Element Rotational Inertia (kg • m2) J Coupling 2.2 • 10-6 J Motor 6.96 • 10-6 J Leadscrew 2.7- 10-6 J Table & Load 1.24- 10~4 Total 1.36-IO-4 Table 4.3: Calculation of the rotational inertia. The Maxon motor shown in Table 4.1, has a specified continuous torque of 0.114 Nm. How ever, since the torque required by the moving support is not continuous, the maximum allowed instantaneous torque can be much higher, as long as the average power dissipated by the motor coils is kept below the specified maximum (9.5 Watts). In practice it has been observed that this particular motor can easily accommodate torques up to 0.25 Nm. The size of the motor selected is consequently considered sufficient for this application. Once the mechanism has been designed, it is necessary to establish the general characteristics of the hand support. This is addressed in the following section. 4.2.2 The Hand Support and the Vision System The moving platform provides support for the hands of the surgeon in order to move them in syn chrony with the heart motion, while preserving the surgeon's dexterity. Figure 4.3 shows an illustra tion of the hand support. Support for the surgeon's hands must be provided by two economically designed pads. In order to ensure that the hands will stay in contact with the platform, a means of attaching the hands to the pads is necessary, however, a quick release mechanism should be provided to allow the surgeon to remove his or her hands quickly if necessary. 4.2 The Moving Support 37 Cameras Moving Platform Figure 4.3: Hand support. A pair of cameras has been attached to the platform as illustrated. Since they are also moving in synchrony with the heart motion, the cameras provide a stable image of the work site, which can be viewed by the surgeon by means of high resolution stereo glasses. The image obtained by these cameras can also be used to measure the distance between the surgical site and the platform by means of image processing (see Section 4.3.3). When the surgeon adjusts the relative position of the support with respect to the surgical area, the position of the cameras must also be adjusted in order to ensure that the surgical area remains within the field-of-view. If the cameras are also used to measure the heart motion, this adjustment must be performed in such a way that their calibration is not affected. Additional changes can be made in order to use this method in endoscopic surgery, i.e. to perform the surgery through small incisions. In endoscopic surgery, the motion of the tools entering the body is limited at the entry point. Therefore, in order for each tool to track the motion of the heart, it would be necessary to have separate motion tracking supports and mechanisms for each. 4.3 Heart Motion Tracking 38 4.3 Heart Motion Tracking One of the most important aspects of the design of the moving support is the accurate tracking of the heart motion in real time. The exact 3-D position of the support and of the surgical area is required to accurately control the motion of the mechanism. The specifications of the desired sensor that measures the motion of the surgical area, are as follows: Size and Position The size of the sensor and its location with respect to the surgical area and the surgical instruments is an important factor. It would be difficult to be able to sense the motion of the heart from a distance, since the surgeons, the surgical tools and the moving support would interfere with the sensing. Therefore, the sensing unit must be small enough to fit between the surgical area and the moving support in order to reduce this interference. Interference The sensor must not interfere with the surgical procedure and the surgical tools must not interfere with sensing. Sensitivity Sensing Time Accuracy The chosen sensor must not be sensitive to ambient light intensity, the pres ence of metallic objects or blood in the field, among other factors. The control system needs to receive the sensed information fast enough to allow real time tracking of the heart motion. High resolution sensing is essential in order to achieve highly accurate track ing. Sterilizability Depending on its proximity to the surgical site, the sensor may need to be sterilizable. Low Cost A low cost solution will allow more patients to benefit from the moving hand support. Light Weight If the sensor is mounted on the supporting platform or on the retractor blades it must be as light as possible. 4.3 Heart Motion Tracking 39 For safety purposes, the sensing device must be able to determine the distance between the support and the heart at all times. Motion limits must be established in order for the support to stay a safe distance away from the heart as well as from the patient's body. 4.3.1 Types of Sensors Based on the specifications outlined above, two types of sensors are feasible, namely optical and mechanical sensors. Some advantages and disadvantages of each of these are as follows: • Optical sensors that use passive markers can be fairly accurate and are relatively inexpensive. A drawback is that objects (hands, tools, platform) or substances (blood, water) present between the sensors and the markers can interfere with the sensing. Optical sensors with active markers are less likely to be affected by the presence of substances and can provide high accuracy sensing; however, their motion capture units are generally larger and more expensive. • Mechanical sensors consist of passive arms that provide information on the exact position of the end effector. These sensors reduce the possibility of the surgeon interfering with the sensing task, but the sensor might interfere with the surgeon's motion. An additional drawback is the need to rigidly attach the end effector to a point on the heart surface close to the suturing site. Other commercially available sensors could not be used for this particular application. Laser light scanning sensors do not provide motion of a specific point on the heart surface, but determine the displacement along the direction of the light beam, from the point at which it is incident. Magnetic sensors are affected by the presence of ferrous objects and are therefore not suitable for use within the environment. Sonic sensors can be inaccurate and are affected by high frequency noise, temperature, humidity and drafts - conditions that may vary in the operating room. 4.3.2 Optical Sensors The following information on optical sensors that use passive and active markers, has been obtained from [39,40]. 4.3 Heart Motion Tracking 40 Passive optical sensors use cameras or light sensing devices to determine the position of particular features of the object whose motion is being determined. These features can be markers that are placed on the object, or areas of a particular color or texture different than those that are predominant in the image. None of the passive optical sensors that are commercially available proved to be useful for accurate heart motion sensing, as shown in Table 4.4. Company / Model Advantages Disadvantages Ariel / APAS Data collection speed of 60-240 fps, non-invasive, no markers needed. It does not allow real-time analy sis of the motion. Low accuracy. Motion Analysis / HiRes 0.1 mm accuracy, , passive mark ers, data collection speed of 60-240 fps. It does not allow real-time anal ysis of the motion. Qualisys / ProReflex Data collection speed of 15-180 fps, measures motion, speed, and angle. Sensor unit is relatively large, low accuracy (0.6 mm). Peak / Motus Data collection speed of 15-180 fps, 2 to 6 cameras provide real time acquisition of data. It does not allow real-time anal ysis of the motion, the accuracy is not high enough (0.3 mm). Vicon Data collection speed of 60-240 fps. Low resolution (659 X 494), re quires manual identification of features during the initial trial. Table 4.4: Passive optical sensors. In general, passive optical sensors provide a non-invasive approach to motion tracking. Although the sensors allow real-time data collection, they do not allow real-time analysis of that data. In most cases the sensor units are too large and the accuracy is too low for this application. Active optical sensors that provide high accuracy measurements require large and expensive sensor units. The commercially available sensors found have sensing units that are too big to place between the support and the surgical area and/or an accuracy that is not high enough. Table 4.5 summarizes some of the commercially available optical sensors that use active markers to track motion. 4.3 Heart Motion Tracking 41 Company / Model Advantages Disadvantages Skill Technologies / Imperial 120 fps, real time measurement of 3D motion. Very low accuracy (15 mm). Charnwood Dynam ics / CODA High accuracy (0.1 mm), 200 fps (w/28 markers), 6 m field of view, real time acquisition and display, small in frared markers. Requires 3 cameras which make the system too large for this ap plication. Pixys / Flashpoint 300 Hz/marker, one or more LEDs or fiber optic light emitters, real time data collection. The accuracy is not high enough (0.5 mm), it is too heavy (22.4 lbs) and large to be mounted on the platform, high cost ($14900). Northern Digital / Optotrack 0.2 mm accuracy, 600 Hz/marker. It is too heavy (90 lbs) and big to be mounted on the platform, high cost ($57500). Table 4.5: Active optical sensors. 4.3.3 Vision-based Motion Tracking It was evident in the previous section that commercially available optical sensors do not meet the required specifications for the sensing of the heart motion. An alternative to these systems is to use the cameras that are mounted on.the platform and apply a vision-based motion tracking algorithm. Figure 4.4 shows a block diagram outlining the procedure that can be followed for this purpose. The motion will be determined by measuring the position of certain scene features in subsequent images; therefore, once the image is captured by means of the camera(s) and frame grabber(s) it is necessary to recognize these features precisely. Depending on the quality of the image obtained, the features can be natural color or texture variations on the surface of the heart or markers (passive or active, and of specific size, shape and color) placed close to the surgical site. The position of each feature is determined and compared to the previous position, or positions, in order to generate the motion trajectory. This motion signal is the input to the control system, which adjusts the position of the plant so that it tracks the heart motion. This cycle is repeated to obtain the position of the support with respect to the surgical site as a function of time. One of the biggest challenges in using image processing is to accurately measure motion in three dimensions. Since each camera provides a two dimensional image, it is necessary to have at least 4.3 Heart Motion Tracking 42 Previous Position Capture Recognize Measure Generate Control System Image Features Position Trajectory + Plant Figure 4.4: Schematic of motion sensing by means of image processing. two cameras to obtain a stereo image and to measure 3D position. The feasibility of utilizing image processing for motion sensing will depend on the following aspects: Markers The use of markers, either passive or active, will improve the results since feature recognition will be faster and more accurate. A method for attaching the markers close to the surgical site in such a way that the tissue is not damaged has to be determined. In addition, placement must be such that the interference is reduced as much as possible. It is also necessary to establish a way of calibrating their position with respect to that of the camera(s). Processing Speed Tracking of 3D motion trajectories using stereo images, can be very time consuming. The speed at which the images can be processed is an important aspect to consider since it will determine the quantization interval of the position signal, which is the input to the control system. Sensing Accuracy The resolution of the cameras and framegrabbers, as well as the processing algorithm used will determine the accuracy with which the position can be measured. The accuracy of the measurements must be high, even for displace ments perpendicular to the plane of the images, in order to provide reliable measurement of the heart motion. Maneuverability The position of the surgical site with respect to the support can be changed by the surgeon at any time during the procedure. It is very important that the 4.3 Heart Motion Tracking 43 features that are being used remain within the field-of-view of both cameras, at all times, in order to maintain the visibility of these features in the images. Therefore, it must be possible to reposition the cameras without losing their calibration. Although there appear to be merits to this approach, further studies must be undertaken in order to establish exactly how this measurement can be done. This thesis focuses more on mechanical sensors, which will be addressed in the following section. 4.3.4 Mechanical Sensors A mechanical sensor consists of a passive mechanical arm that, when placed in contact with the surgical area, uses encoders located at its joints to provide information on the exact position of the end effector. Apart from the general sensor specifications provided in Section 4.3, the mechanical sensor must have the following characteristics: • Three degrees of freedom plus a wrist for end-effector positioning and attachment to the heart. • It must be able to closely follow the motion of the surgical site. • The friction at the joints must be low in order to allow the arm to stay in contact with the heart by means of small attachment forces. Commercially available mechanical sensors are not small enough to place between the platform and the surgical site, as is evident from the summary shown in Table 4.6. It was therefore necessary Company / Model Advantages Disadvantages Romer Model 2000 0.032 mm accuracy, high maneu verability, portable. Expensive $105,000, large (2-3 m envelope), 17 lbs. Immersion Microscribe 0.23 mm accuracy, speed 1000 points/s, counterbalanced. Large (1.27 m envelope). Renishaw Cyclone Fully automatic scanning process, very low probing forces. Unjoined arm retreats in the z di rection, expensive ($52000). Faro Arm 0.3 mm accuracy, four joints, counterbalanced. 1.2 m is the envelope of the smallest arm, expensive ($14400). Table 4.6: Mechanical sensors. 4.3 Heart Motion Tracking 44 to develop a custom design for a sensor, based on the specifications given above. The design of the mechanical sensor is discussed in Chapter 5. In this chapter the general characteristics of the moving support were established. The design problem was divided into four different components, two of which will be addressed in subsequent chapters, namely the design of a mechanical sensor for heart motion tracking and the design of the control system. Chapter 5 Design of a Mechanical Sensor In order for the moving hand support to track the heart, a real-time measurement of the motion of the surgical area must be available. As was shown in Chapter 2, there are no commercially available optical or mechanical sensors that fit the required specifications; hence, it was decided to design a customized mechanical sensor. This chapter outlines the design process, explains how it makes measurements, and finally presents the results obtained from its evaluation. 5.1 Design Overview The purpose of the mechanical sensor is to provide a signal that estimates the 3D position of the surgical area on the heart surface. This signal will be the input to a control system that is responsible for ensuring that the support will track the heart motion. If the sensor is mounted on a fixed reference frame (e.g., the retractor blades) the measured signal will correspond to the absolute motion trajectory of the surgical area; however, if it is mounted on the moving support, the measured signal will be the relative displacement between the support and the surgical area. Mechanical sensors that are commercially available typically consist of a passive arm with po sition sensors at each joint. The position of the joints is used to determine the position of the end-effector as a function of the kinematics of the arm. The mechanical sensor that we wish to de sign is a similar device that measures the heart motion trajectory when its end-effector is attached to the surgical area on the heart surface. The attachment of the end-effector to the heart surface is necessary to ensure that the sensor will 45 5.1 Design Overview 46 measure the position of one particular point. This attachment could be accomplished by suturing the end-effector to a point on the heart surface close to the surgical area, however, the sutures could cause damage to the heart tissue and interfere with the surgical procedure. A more feasible solution would be to use suction to attach a ring around the surgical site [10]. This would reduce tissue damage, while at the same time, it would provide a dry surgical field by stopping the blood flow through the coronary artery. As was explained in Chapter 4, the motion of a point on the heart surface can be completely expressed by three translational coordinates, [x, y, z], despite the fact that the heart follows complex motion trajectories that can only be accurately represented by a 6-DOF model. Considering this, a 3-DOF sensor is sufficient to accurately measure the motion of a point on the heart surface; however, since the end-effector of the sensor is a ring that attaches to an area of the heart surface, there is a requirement for the arm to have six degrees of freedom, in order to position and orient the end-effector. Based on these considerations, the goal of this design is to develop an arm with the following characteristics: • it accurately measures the change in position of a point on the heart surface, • it attaches to the heart surface by means of a suction ring, • its geometry and size are such that attachment of the end-effector to the heart does not interfere with the surgical procedure, • it has six degrees of freedom for positioning and orienting the end-effector. It is desirable to design a sensor with the highest resolution possible. As an initial estimation of the desired end-effector accuracy, a value of 0.15 mm has been chosen based on the thickness of the coronary artery wall [41]. The sensor design process consists of determining the basic geometry and size of the arm, and designing the wrist and end-effector. The following sections outline this design process based on the characteristics outlined above. 5.2 Design of the Mechanical Sensor 47 5.2 Design of the Mechanical Sensor The motion of the heart surface can be measured by attaching the end-effector of the mechanical sensor to the surgical area and measuring the position of the arm joints. The relationship between the position of the joints and the position of the end-effector is a function of the kinematics of the arm. The arm kinematics depend on the sensor's geometry, i.e., the type of joints and how their axes are positioned with respect to each other. The following section addresses the selection of a particular geometry as the basis for the design of the mechanical sensor. 5.2.1 Arm Geometry Selection A mechanical manipulator can have rotary joints, prismatic joints or a combination of both. A prismatic joint allows a relative translational motion between the links, while a rotary joint allows a relative rotational motion. The type and sequence of these joints is used to classify mechanical arms according to their geometry: e.g., cartesian, cylindrical and spherical, among others. A very common geometry that has three rotary joints is the elbow manipulator, in which the axis of the first joint is orthogonal to the axes of the other two which are parallel to one another. This geometry was chosen as the basis for the design of the mechanical sensor based on the following arguments: • The volume of the workspace reached by the elbow manipulator is large compared to that of other geometries, allowing a smaller arm to be used to reach the same workspace. • The elbow manipulator has a high dexterity, since all of the joints are revolute. • This configuration allows the arm to be positioned such that the interference with the surgical procedure is small. • It was not possible to find high resolution, low friction linear position sensors at a reasonable cost. A drawback of the elbow geometry is that wrist positioning accuracy varies inside the workspace, therefore, the accuracy of the measurements will vary depending on the position of the end-effector. Figure 5.1 shows a sketch of the basic configuration of the arm. The angles 6\, 82 and #3 are the 5.2 Design of the Mechanical Sensor 48 joint variables that together with the length of the links li, I2 and £3, determine the position of the In order to measure the joint angles, position sensors must be placed at the joints of the arm. The following section explains the joint position sensor that was chosen for this application. 5.2.2 Joint Position Sensors Position sensors located at the joints of the arm provide information on the joint position which is used to determine the motion of the end-effector. The specifications of the position sensor for this particular application are as follows: • Compactness: The size of the joint position sensors determines, to some extent, the overall dimensions of the arm. Since the arm has to be small enough to be placed close to the surgical site without interfering with the surgical procedure, these should be as small as possible. end-effector. P X Figure 5.1: Basic configuration of the arm. p is the base frame and s is the end-effector frame. 5.2 Design of the Mechanical Sensor 49 • High resolution: The precision with which the position of the joints can be measured will determine the accuracy of the sensor and consequently the tracking accuracy. • Low friction: In order to reduce the required attachment force it is important to have low friction forces at the joints. • Low cost: A low cost sensor will allow a cost-effective solution. Three main types of position sensors were considered for this application, namely, encoders, potentiometers and resolvers. Hall-effect sensors can also be used for measuring angular position, however, their sensitivity to the presence of metals makes them unsuitable for this application. Table 5.1 shows the main advantages and disadvantages of the three types of sensors mentioned above [42]. Sensor type Advantages Disadvantages Potentiometers Resolutions on the order of 0.01 mm are possible, low cost. High friction causes wear and heat generation that reduce the life of the sensor. Resolvers Fine resolution and high accuracy, small size. Non-linear output signals, high fric tion causes wear, oxidation, thermal and noise problems. Encoders High resolution and accuracy, ease of use in digital control systems, low cost. Sources of error can be various: quantization error due to digital output, assembly errors, and ambi ent effect errors, among others. Table 5.1: Angular position sensors. For this particular application, the best solution for position sensors is provided by digital encoders. The advantages of encoders over resolvers and potentiometers lies in providing a low friction, high resolution sensor at a reasonable cost. A search for encoders was performed from which an optical incremental encoder was selected. The US Digital encoder, model E2, was selected due to its relatively high resolution for its size and cost. The total size of the sensor is 36 x 30.5 x 17.5 mm and it has a resolution of 4096 cpr. The disadvantage of using digital position sensors is that the position signal has quantization error. The following section explains how this error can affect the overall accuracy of the sensor. 5.2 Design of the Mechanical Sensor 50 Since the use of this terminology has not been consistent in the literature, some terms used in this thesis are also defined. 5.2.3 Uncertainty Measurement A number of standard terms are used to classify errors depending on the source of the error and the effect is has on the measurement. Uncertainty is an estimation of the limits of the true value of the error that remains after all calibrations have been performed [43]. The total error of a measurement has two components: a fixed bias error and a random precision error. Accuracy is a common term used to specify uncertainty and can be affected by both bias and precision errors, e.g., hysteresis, resolution, repeatability, and sensitivity errors, among others [44]. Identifying the source of the error is important in order to evaluate how the accuracy of a sensor can be improved. The elemental error sources can be divided into three categories [45]: (1) calibration errors that originate when the calibration process is performed in order to eliminate known bias errors, (2) data acquisition errors introduced when the sensor is making a specific measurement and, (3) data reduction errors that arise from computational resolution and curve fits. Data reduction errors are often negligible. The error caused by digital position sensors is a common type of precision error that is introduced during the data acquisition. It is referred to as resolution or quantization error and originates due to the A/D conversion of sensor signals necessary in digital signal processing. The resolution of the position sensors will therefore determine the error present in the measurements. The kinematics of the mechanical sensor relate the quantization error produced by the encoders at the joints with the error at the end-effector. The following section explains how the length of the links were chosen in order to minimize the influence of quantization error on the overall accuracy of the sensor. 5.2.4 Link Lengths The length of the links was determined based on two criteria. First, the length of the whole arm must allow the entire workspace to be reached without positioning the arm at a singularity. Table 5.2 shows the required dimensions of the end-effector workspace, given with respect to the reference 5.2 Design of the Mechanical Sensor 51 Direction Max (mm) Min (mm) X 110 90 y 10 -10 z 140 60 Table 5.2: End-effector workspace. frame p (Figure 5.1). These coordinates were estimated based on observations of surgical procedures and the heart motion. If the sensor is mounted on the platform, the distance from the base frame of the sensor to the surgical area can vary considerably in the z direction as the surgeon adjusts the position of the platform. It is expected that the platform will be placed 6 to 14 cm above the surgical site, hence the workspace z coordinates. In addition, the distance between the mounting base of the sensor and the center of the platform will define the x and y coordinates of the workspace. These were approximated by assuming that the sensor will be placed 10 cm away from the center of the support and that from that point, the end-effector can move up to one centimeter in each direction. These dimensions do not change significantly if the sensor is mounted on the retractor blades. The second criteria was based on choosing lengths that minimize the error at the end-effector. The relationship between the error at the end-effector and the error at the joints can be approxi mated by the following Jacobian relationship [46]: Ax = JA{q)-Aq (5.1) where Aq is the error at the joints, Ax is the resulting error at the end-effector and J A is the Jacobian of the specific arm. The Jacobian is dependent on q — a variable vector containing the joint angles. Knowing the allowed error at the end-effector (Ace ss 0.15mm), the maximum allowed error at the joints can be determined by means of Equation 5.2. The minimum value of Aq obtained for all the different positions in the workspace, can be used to obtain the required encoder resolution. 5.2 Design of the Mechanical Sensor 52 Ag = J^1(g)Ax (5.2) The lengths of the links were determined by evaluating this equation around the workspace for different link lengths in order to minimize the required encoder resolution. The details of this analysis are shown in Appendix C. The lengths of the links were determined to be as follows: li = 40 mm I2 — 60 mm I3 = 110 mm From the chosen link lengths it was found that the encoder resolution required to obtain an end-effector accuracy of 0.15 mm is 8047 cpr, as shown in Appendix C. The US Digital encoder chosen for this design has a resolution of 4096 cpr. This produces a maximum total error of 0.3 mm at the end-effector — 0.17 mm in each direction. Although this encoder does not provide the required accuracy, it was used for the initial prototype since it was the only one small enough to satisfy the size requirements. As was explained previously, the required sensor must measure 3D translational motion but must have at least six degrees of freedom in order to position and orient the end-effector. Normally, a six degree of freedom manipulator would require six encoders at its joints, in order to accurately measure the end-effector position. The wrist design proposed in the following section allows for the measurement of the translational position of the end-effector without having to measure the wrist joint angles. 5.2.5 End-effector and Wrist Design Accurate tracking of the heart motion depends on the attachment of the end-effector to a point on the heart surface close to the surgical site, without interfering with the surgical procedure. The design of the end-effector was based on a heart stabilizer proposed in [10]. It consists of a C-shaped ring that attaches to the heart using suction. The ring is placed around the surgical site such that the blood flow through the coronary artery is suppressed. This stabilizer has the disadvantage that the suction used to stop the motion of the surgical area can cause damage to the tissue. Using a similar device as the end-effector of the mechanical sensor, to attach the arm to the heart, requires 5.2 Design of the Mechanical Sensor 53 a much lower suction force, as discussed in Section 5.3. This should allow the mechanical sensor to follow exactly the motion of the heart without damaging the heart tissue. When the end-effector is attached to the heart surface, the center of the suction ring coincides with the center of the surgical area. The goal of the mechanical sensor is then to measure the position of this point. A 3-DOF wrist is required in order to position and orient the ring for attachment of the end-effector to the surgical site. This wrist was designed in such a way that the position of the surgical area can be determined without measuring the position of the wrist joint angles. In other words, by only measuring the angles of the three arm joints, it is possible to determine the position of the center of the ring, while the end-effector tracks the six degrees of freedom of the heart motion. Figure 5.2 shows a view of the sensor wrist and end-effector. The dashed lines indicate the rotational axes of the three wrist joints. Since all of the rotational axes intersect at the same point, the position of this remote center of rotation is not dependent on the wrist joint angles. It should be noted that the design of the sensor has a total of three singularities, i.e., configura tions at which the mobility of the structure is reduced. However, due to the size of the sensor with respect to the workspace, it is unlikely that these configurations will be reached,when the sensor is Figure 5.2: Wrist and end-effector of the mechanical sensor. The dashed lines indicate the rotational axes of each joint. 5.3 Attachment Forces 54 being used for measuring the heart motion. One of the specifications for the design of the mechanical sensor is that it must be sterilizable. The following section explains an additional feature of the design, which was included in order to allow the sensor to be used in surgery. 5.2.6 Additional Features During a surgical procedure, all of the instruments and tools that come in contact with the patient must be completely sterilized. The US Digital encoder was chosen despite the fact that it is not sterilizable (an autoclavable encoder was not available); therefore, in order to permit sterilization of the sensor, the arm was divided into two sections. The first section, comprised of the base and the first three links, is made mostly of aluminum and cannot be sterilized. This section can be covered by a sterilized plastic. The remainder of the arm, which consists of the end-effector and the wrist, is made of stainless steel with nylon bushings permitting sterilization. The two parts are attached to each other by a simple lock screw. Figure 5.3 shows a general view of the mechanical sensor. 5.3 Attachment Forces The design of the end-effector allows accurate tracking of the heart motion by using suction to attach itself to the heart tissue. The suction force required to maintain the attachment can be determined by means of the following equation [47]: f = KVt + v + g (5.3) where A is the inertia matrix of the arm, v is the vector of Coriolis and centrifugal forces and g is the gravity vector, all in cartesian space. Vt is the vector of end-effector velocities in end-effector coordinates. This equation shows the relationship between the forces and torques applied at the end-effector and the velocity and acceleration at the end-effector tip. These vectors can be obtained from the joint space vectors through the following equations: 5.3 Attachment Forces 55 Figure 5.3: Mechanical sensor. A = (JD~lJT)~l v = k(JD~lC - Jq) (5.4) g = KJD~lG where D is the inertia matrix, C is the vector of Coriolis and centrifugal forces and G is the gravity vector, all in joint space. J is the manipulator Jacobian relating joint rates to end-effector generalized velocities in end-effector coordinates. The procedure used to calculate the attachment force is explained in detail in Appendix C. The total maximum force was determined to be 7.60 N, 70% smaller than the one required to stabilize the heart motion [10]. 5.4 Operation of the Mechanical Sensor 56 Having detailed the design of the sensor, it is now important to determine how the sensor can be used in order to measure motion in real-time. The following section explains how to obtain position measurements from the mechanical sensor. 5.4 Operation of the Mechanical Sensor The measurements obtained by the mechanical sensor will depend on where the sensor is mounted. If the sensor is mounted on the retractor blades, the sensor will measure the absolute motion of the heart. If it is mounted on the moving support, the measured motion is the relative displacement between the support and the surgical site. For each case, the amplitude and the frequency of the measured trajectory will be different. As has been explained previously, measurement of the end-effector motion is performed by using the joint angles to calculate the position of the end-effector. The relationship between these two values is determined by the kinematics of the mechanical manipulator. The forward kinematics allow calculation of the end-effector position as a function of the joint angles. Since the joint position sensors are incremental encoders, it is necessary to establish their initial position. This can be done by using the inverse kinematics of the arm to calculate the initial position of the joints based on a known initial position of the end-effector (home or reference position). In order to properly initialize the encoder, it is also necessary to calibrate the sensor, since due to errors in the manufacturing process, the actual length of the links does not exactly match the specified ones. The calibration procedure helps to eliminate the bias error present in the measurements. The following sections explain the forward and the inverse kinematics of the sensor. 5.4.1 Forward Kinematics The forward kinematics problem consists of determining the relationship between the joint angles and the end-effector position and can be expressed as: x = k(q) (5.5) 5.4 Operation of the Mechanical Sensor 57 where x is the end-effector position, q is the vector of joint variables and k is the function that relates them. The Denavit-Hartenberg (DH) convention [48] helps to determine this function by defining a set of matrices that can be directly calculated from a set of parameters. The DH parameters have been denned as in Table 5.3 and Figure 5.4. Link a a d 9 1 0 •K 2 0 2 h 0 0 e2 3 h 0 0 e3 Table 5.3: DH parameters. Xi Figure 5.4: Reference frames based on the DH convention. Based on the DH convention, the relationship between the joint angles and the position of the end-effector [x, y, z], is as follows: 5.4 Operation of the Mechanical Sensor 58 x = cos(el){i2cos(e2) + i3cos(d2 + e3)) y = s«n(e1)(/2co8(e2) + hcos(62 + 63)) (5.6) z = l2sin(62) + l3sin(62 + 63) 5.4.2 Inverse Kinematics The inverse kinematics problem determines the inverse function of the forward kinematics, i.e., it determines the joint angles based on the end-effector position. Determining this equation is a more complicated task than determining the forward kinematics. The algebraic solution to the problem, is as follows [46]: qi = atan(py/px) q2 — atan(s2/c2) (5.7) q3 = atan(s3/c3) where px, py and pz are the coordinate positions of the end-effector with respect to the base frame, and c2, s2, c3 and S3 are defined by the following equations: „ _ (PI+PI+PI-122-123) _ , r, -5-C3 _ s3 - ± V1 - c3 S2 - PI+PI+PI °2 - PI+PI+PI 5.4.3 Implementation The signal from the encoders is used to calculate the end-effector position using the forward kine matic equations; the inverse kinematics are used to determine the initial encoder positions corre sponding to the initial position of the arm. The procedure used to perform these calculations was programmed using the 'C language and implemented under the QNX operating system. If the initial position of the end-effector is accurately known, by measuring the position of the joints in real-time, the motion trajectory of the end-effector can be measured. 5.5 Evaluation 59 As was mentioned earlier, a characteristic of the arm geometry is that the accuracy of the measurements varies inside the workspace. In order to determine the accuracy of the measurements performed by the mechanical sensor, an evaluation was performed as outlined in the following section. 5.5 Evaluation The validity of the data obtained from the mechanical sensor depends on the amount of error that is present in the measurements. In order to quantify this error an evaluation was performed by mounting the sensor on a 3D stage as shown in Figures 5.5 and 5.6. By rotating the micrometers, it is possible to change the position of the stage by a known distance; therefore, it is possible to compare the actual position to the position measured by the sensor. This comparison allows us to measure the error of the measurements in order to determine the accuracy of the sensor. As was mentioned in Section 5.2.3, two types of error can be present in the measurements performed with the mechanical sensor, namely, bias and precision errors. Estimating the magnitude of these errors will help to determine which sources of error are most significant in decreasing the accuracy of the sensor, so that they can be reduced or eliminated. The purpose of this evaluation is to determine the magnitude of precision and bias errors. The following section describes how this evaluation was performed. Figure 5.5: Setup for the evaluation of the mechanical sensor. 5.5 Evaluation 60 5.5.1 Methodology In order to identify the magnitude of the different errors present in the measurements performed by the mechanical sensor, two evaluation tests were performed. These tests are as follows: • The first test was performed in order to estimate the overall accuracy of the sensor by deter mining the maximum measurement error. This was performed by comparing the actual and experimentally measured positions of the end-effector as it moved throughout the workspace. The encoders were initialized once, when the end-effector was at the center of the workspace. A total of 275 measurements were collected and analyzed. • The second test was performed by calibrating the sensor at a particular point and moving the end-effector through small perturbations from this calibration point. It was mentioned earlier that bias error is caused mainly by calibration errors. In other words, as the end-effector moves away from the calibration point, the bias error will tend to increase. In this test, since the motion of the end-effector is very small, the bias error is minimized allowing the random or precision errors present in the measurements to be estimated. The test was repeated for Figure 5.6: Detail of mechanical sensor mounted on 3D stage. The base frame of the sensor and the end-effector frame are indicated on the diagram. 5.5 Evaluation 61 three different points, each one further away from the center of the workspace. A total of 147 measurements, in 0.1 mm increments, were performed around each point, to a maximum distance of 0.3 mm from the initial point. The following section shows the results that were obtained from this evaluation. 5.5.2 Results Table 5.4 shows a sample of the results obtained for two different positions during the first evalu ation. The variables Xa, Ya and Za are the actual position coordinates, Xm, Ym and Zm are the experimental position coordinates measured by the mechanical sensor. The errors dx, dy and dz have been calculated as the difference between the actual position and the measured position, while magnitude of the total error has been calculated using the following equation: Total Error = y/dx2 + dy2 + dz2 xa Ya Za Xm Y 1 m Zm dx dy dz Total Error 96 8 120 96.1 8 119.9 -0.1 0 0.1 0.141 98 7 118 98.1 7.1 117.9 -0.1 -0.1 0.1 0.173 Table 5.4: Sample evaluation results in mm. Table 5.5 shows the statistical results of the evaluation. The maximum total error, which includes all bias and precision errors of the measurements was found to be approximately 0.6 mm. Average (mean) 0.241 Standard Deviation 0.094 Maximum (total) 0.592 Maximum in x direction 0.3 Maximum in y direction 0.2 Maximum in z direction 0.5 Table 5.5: Statistical results of the error evaluation in mm. The second test was performed by measuring the error following small displacements of the end-effector from the calibration point. This was performed for three different points in the workspace. 5.5 Evaluation 62 Figure 5.7 shows the results obtained by performing this second evaluation. Point 1 corresponds to the center of the workspace, point 2 corresponds to a point half way between the edge of the workspace and its center, and point 3 was near the edge of the workspace. These results show that the precision error increases as the end-effector moves away from the center of the workspace to a maximum end-effector error of almost 0.29 mm. It was explained in Section 5.2.4 that the maximum expected end-effector error, as a product of the end-effector resolution, was approximately 0.3 mm. The results of the evaluation are consistent with this result although there is additional random noise present in the actual measurements, as will be discussed in the following section. 5.5.3 Discussion The first evaluation showed that the maximum total error was estimated to be 0.6 mm. The second evaluation showed that if the bias errors were minimized, estimation of the precision error was approximately 0.29 mm. These results show that both precision and bias errors are significant and the sensor must be improved in order to increase the accuracy. In order to determine particular aspects of the design that should be considered for redesign, it is important to identify the sources of error that are causing the decrease in accuracy. These 0.4 _ 0.3 E E r 0.2 o LU 0.1 0 0.237 • 0.1115 1 0.279 0.127 0.288 -0r1 6-7-E Average error • Maximum error Figure 5.7: Evaluation of precision errors. Points 1, 2 and 3 correspond to the calibration point number, each one further away from the center of the workspace. 5.5 Evaluation 63 sources of error are as follows: • Quantization error is a type of random error that arises from the resolution of the encoders. It was estimated that the quantization error could produce a maximum measurement error of up to 0.3 mm, as shown in Appendix C. • Play in the joints. Due to the small size of the wrist joints, very small bearings were required, which have the disadvantage of having a considerable amount of play. This problem was solved in part by changing the bearings to nylon bushings, which can still be sterilized. The error produced by the play in the joints is a random or precision error. • Misalignment of the axes. The design of the sensor wrist was based on the fact that the three wrist axis would intersect at the same point. However, this did not occur due to inaccurate machining of the wrist parts, as shown in Figure 5.8. This misalignment causes the position of the center of the ring to be dependent on the angles of the wrists; therefore, a significant error is generated as the end-effector position moves away from the initial point. • Calibration. Calibration is necessary since the actual link lengths and joint positions, through manufacturing anomalies, are not exactly the same as designed. Due to the misalignment of the axes, the calibration procedure could not be done properly, since it was impossible to calculate precisely the center of rotation of the wrist. As the results from this section indicate, the accuracy of the end-effector is not as high as is required for the purpose of tracking the heart motion; however, there are several improvements that may be made in order to rectify this, as outlined below: • The use of encoders with a higher resolution would reduce the quantization error. A high resolution rotary encoder that is small enough to mount on the arm would be required. • A reduction in the play of the joints could be attained by using longer joint hinges; however, this may affect the surgical procedure by increasing the amount of interference caused by the sensor. • More accurate machining of the wrist links would improve the alignment at the joints. This should greatly reduce the bias error present in the measurements. • Once the other sources of error have been minimized, it would be possible to perform an accurate calibration of the sensor, which would also help reduce the bias error of the measure ments. This chapter has presented the design of a mechanical sensor for tracking the motion of a beating heart. If the accuracy of the measurements is improved, the mechanical sensor would provide a solution for measuring the motion of the surgical area in real-time. The motion trajectory obtained from this or other motion sensors can be used as the input to the system that controls the motion of the moving hand support, as will be discussed in the following chapter. Chapter 6 The Control System This chapter explains the design of a controller for the moving hand support system explained in Chapter 4. The goal of this chapter is to generate a control strategy that will allow a moving hand support to track the heart motion satisfactorily. To simplify the analysis, only one of the independent platform axes is considered. The system was simulated using SIMULINK® prior to an experimental evaluation. The results from these studies are presented together with a discussion. Chapters 4 and 5 discussed different methods for measuring the heart motion in order to de termine the exact distance between the surgical area and the moving support. The purpose of the control system is to move the hand support in order to keep this distance constant, so that the tracking error is as small as possible. The accurate control of the motion of a robotic manipulator's end-effector depends on how accurately the characteristics of the mechanical structure, actuators and sensors can be modeled. A model of the plant is therefore necessary in order to choose appropriate control strategies. The following section addresses the issue of modeling the plant for which the control system was designed. 6.1 Modeling of the Plant Dynamics As was explained in Chapter 4, the mechanism that we wish to control is a three-axis cartesian manipulator. Since all of the joints are prismatic and mutually orthogonal, the motion of one joint is not dependent on the motion of the other two joints. Based on this fact, the model of the plant was approximated by a single-axis system with a horizontal prismatic joint. A horizontal joint was 65 6.1 Modeling of the Plant Dynamics 66 modeled for the following reasons: • The amplitude of the heart motion, and consequently the motion of the support, is greatest along one of the horizontal axes. • The total mass of the system is moved by one of the horizontal stages. As shown in Figure 4.2, the XY table moves the support in the horizontal plane. One of the stages of this table moves the mass of the remainder of the system, including that of the other two stages. In other words, one of the joints of the mechanism must move more mass than the other joints and also, must travel the greatest distance. If this joint can be controlled, then it will be possible to control both horizontal axis of the mechanism, provided that an accurate model is available. The control of the vertical stage would be a similar problem, however, gravity compensation would have to be included as part of the control system. In order to model the dynamics of the system, it is necessary to establish the relationship between the joint torque and the motion of the end-effector. In a single-axis system with a prismatic joint, the position of the end-effector is determined directly by the position of the actuator. It was shown in Section 4.2.1.1 that for prismatic actuators, the relationship between the required torque and the system acceleration is dependent only on the actuator characteristics. The plant dynamics can then be modeled according to the following equations: •• (r-Tf)-l q=J — q = J qdt + qo (6.1) q = j qdt + qo where r is the required torque, TJ is the friction torque, / is the lead of the actuator screw, J is the rotational inertia of the system, q, q and q are the joint acceleration, velocity and position respectively, and qo and go are the initial conditions for velocity and position. Figure 6.1 shows the model of the plant used for simulation purposes. In order to have a more accurate model, those disturbances that can be predicted and modeled must be added or 6.2 Control System Design 67 subtracted from the torque signal. In this case, the only disturbance that can be predicted is the actuator friction. Torque f friction Lead Acceleration ^ 1 Velocity ^ 1 Position ^ i w s w s Inertia Figure 6.1: Model of the plant dynamics. >0 An additional disturbance arises from the fact that the mass of the system is not constant. The weight applied by the hands of the surgeon depends on how the arms are positioned. However, since the amplitude of the motion is small, the position of the arm does not change considerably as the platform moves. Therefore, it can be assumed that this change in mass is small relative to the total moving mass, provided that the surgeon allows the support to move his or her hands instead of leaning against it. The control system was designed assuming that the model of the plant determined above is accurate. The following section explains the concepts on which the control system design was based. 6.2 Control System Design As was discussed in Chapter 2, control systems that have been designed for tracking periodic signals usually assume a constant period and periodic disturbances. Contrary to this, the input to the system that we wish to control, being the motion of the heart, is a quasi-periodic signal with variable amplitude and period. In addition, the system disturbances are not periodic since they arise from the movements of the hands of the surgeon while resting on the support. The control system designed here can be applied to input signals with variable period and amplitude. The success of the control action is dependent on the following conditions: • The period can be accurately measured. • The rate of change in amplitude and frequency between one period and the next is low. 6.2 Control System Design 68 • The dynamics of the plant can be accurately modeled. In practice, the length of the period corresponds to the heart rate, which can be determined by measuring the sharpest peak of the electrocardiogram (ECG) [10]. Furthermore, it can be assumed that there is a small change in amplitude and frequency from one period to the next. This assumption is based on the fact that the cycle is governed by the patient's heart rate, which during surgery can be controlled so that it does not vary significantly between cycles. 6.2.1 PID and Computed Torque Compensation Two distinct control actions are incorporated into the control system design. These are proportional, integral and derivative (PID) control and computed torque compensation. PID control is the most commonly used controller in industry today. It can be represented as follows: r = Pe + I J edt + D— (6.2) where r is the torque signal, P, I and D are the proportional, integral and derivative gains respec tively and e is the error signal which serves as the input to the controller. Figure 6.2 shows a PID control block diagram. By adjusting the P, I and D gains it is possible to tune the controller to obtain the best results for the particular plant. The proportional gain P provides a corrective action which is proportional to the error. The integral gain is introduced to increase the low frequency open loop gain, ensuring that the closed loop system tracks the setpoints accurately at steady state. The derivative term is intended to stabilize the loop by improving its phase margin [49]. If the dynamics of the plant are accurately known, the actuator torques required to achieve the desired motion trajectory can be predicted and fed forward to the plant. The block diagram shown in Figure 6.3 outlines the general configuration of computed torque compensation. The feedforward signal is equal to the torque required to track the desired trajectory, and is calculated using the inverse dynamic model of the plant. The desired position signal is compared to the actual position 6.2 Control System Design 69 Derivative Figure 6.2: PID controller. of the plant in order to obtain the position tracking error. This error signal is the input to a controller, which calculates the torque required to eliminate the tracking error. The control action is a combination of the feedforward signal and the PID control torque. If the model of the plant is accurate and the system is stable, then the output will track any bounded position, velocity and acceleration reference trajectories [29]. Xd Desired Position Xd Wdu/dt|—Hdu/dtf—• Xd error Inverse Dynamics AT Controller Measured Position Disturbances Torque Xr Plant Dynamics Actual Position Sensor Noise Figure 6.3: Computed torque control. The control of the moving hand support is based upon computed torque control with a PID controller; however, it differs in the manner by which the feedforward signal is computed, as is explained in the following section. 6.2 Control System Design 70 6.2.2 Delayed Computed Torque Compensation The controller design is based on the computed torque control approach illustrated in Figure 6.3, where the feedforward torque signal is calculated from the inverse dynamics of the plant as a function of the desired acceleration. Since it would be difficult to place accelerometers on the heart surface in order to measure its acceleration, this signal must be calculated as the second derivative of the desired position signal. Unfortunately, the motion sensors that measure the position trajectory generate a noisy, quantized signal, thus making it difficult or impossible to obtain smooth accelerations by direct differentiation. In order to remedy this problem, it is possible to filter the position signal before the first deriva tive is obtained, and again before it is differentiated the second time. The resulting acceleration signal is sufficiently smooth to be used to calculate the torque signal; however, in practice its associated phase delay is considerable. The delay problem can be solved by taking into account the periodic nature of the input wave form. Since the desired position trajectory is quasi-periodic, it can be assumed that the motion waveform in one period is not significantly different from the waveform in the next period. This assumption allows calculating the reference torque trajectory for the current cycle using the position signal from the previous cycle. In other words, since the delay cannot be eliminated, the computed torque is further delayed by one period minus the filtering delay before it is used as the feedforward signal; therefore, the total delay is one full period. Figure 6.4 shows a conceptual diagram of the feedforward signal calculation. As explained above, the acceleration is calculated by filtering and differentiating the position signal twice. This acceleration is used by the inverse dynamic model of the system to determine the required control PERIOD X . POSITION u OO oo •\ d/dt |- d/dt INVERSE DYNAMICS DELAY TORQUE FILTER FILTER Figure 6.4: Delayed computed torque feedforward signal. 6.2 Control System Design 71 torque. A delay block is used to show that the torque signal is delayed by one full cycle, before it is used as a feedforward signal. The period T must be continuously measured to determine the total delay time and can be measured during surgery by means of the ECG signal. If the inverse model of the plant is accurate and the period does not vary significantly from cycle to cycle, then this reference signal provides a predicted reference torque. Although this torque may have some errors, it has negligible delay. If the delay caused by the filtering process cannot be accurately determined, then it will not be possible to determine how much further the signal must be delayed to obtain a total delay of one period. A variation of this system can be implemented to solve this problem, by using a zero-phase digital filter. After filtering the data in the forward direction, it reverses the filtered sequence and runs it back through the filter a second time. The implementation of this non-causal filter requires knowledge of future trajectory points, which would not be available during a real-time implementation. However, using delayed computed torque, the reference signal is delayed by one cycle, therefore, the required trajectory points are available for filtering. Since the filtered waveform has zero-phase distortion, the delay applied in the feedforward signal is exactly the period of the input wave. The following sections explain how the control system was simulated and then implemented. An initial simulation was performed using a smooth position signal as the input wave in order to evaluate the behavior of the system with PID control and computed torque control. Similarly, the control system was implemented using an experimental setup, which utilizes a single-axis stage different from the one selected for the design of the mechanism, due to its availability. In order to compare the results from the simulation to those from the implementation, the values for friction and inertia used in the simulation were adjusted to match those of the implementation setup. In order to evaluate how the system can be controlled when the input signal carries quantization noise, an additional simulation was performed using delayed computed torque compensation. Both sets of values of friction and inertia were used in order to determine the sensitivity of the system to small changes in the stage dynamics. 6.3 Simulation 72 6.3 Simulation A real-time control system was simulated in SIMULINK®, at a sampling rate of 1000 Hz. An initial simulation was performed using as the input wave a smooth position signal. The following sections show the simulation procedure and the results obtained using PID control and computed torque compensation. 6.3.1 PID Control The first simulation was performed using only PID control. The block diagram used in this simu lation is shown in Figure 6.5. Desired Position Hold Torque PID Controlller Hold Torque Position Plant Dynamics quantization Hold Figure 6.5: Block diagram of the control system with a PID controller. The desired position signal is continuously read from a file containing the wave shown in Figure A.5. The plant dynamics block corresponds to the model of the plant shown in Figure 6.1, for which the friction was calculated assuming that the maximum friction of the stage acts in the direction opposite to the motion — when the velocity changes sign, the friction also changes sign (see Appendix D). Additional quantization error and noise were added to the feedback signal, in order to simulate the noise generated by the encoders that measure the actual position of the mechanism. The noise was calculated as explained in Section A.4. A block similar to that shown in Figure 6.2 is used as the PID controller block; however, it uses a discrete-time integrator and a discrete-time band-limited numerical derivative, calculated as follows [50]: 6.3 Simulation 73 0.02 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 P -0.1 Figure 6.6: Simulated results from the PID controller. Zv(k) = x{k) + pZv(k - 1) (6.3) v(k) = a{Zv{k) -Zv(k- 1)) where x is the input signal, v is the computed first derivative of the input signal, k is the sampling number, and a and f3 are defined by the following expressions: a = P~ 2TV + TS' where Tv is the differentiator low-pass filter time constant and Ts is the sample period. Figure 6.6 shows the required torque and tracking error resulting from this simulation, as well as the actual position signal. The values for the gains were P=120, 1=120 and D=40, selected by trial and error in order to reduce the tracking error. 6.3 Simulation 74 0.5 0.4 0.3 0.2 0.1 ro 0 |-0.1 -0.2 -0.3 -0.4 -0.5 -1 -0.8 -0.6 -0.4 -0.2 0 Real Axis Figure 6.7: Nyquist plot for the discrete-time PID control system, phase margin = 4.56°, gain margin = 9.99. The results show that the maximum tracking error is almost 0.4 mm, while the required torque is higher than 0.25 Nm. These results were improved by adding computed torque compensation as described in the following section. In order to evaluate the stability of this system, the Nyquist plot for the discrete system, has been determined as shown in Figure 6.7. From this figure it is possible to determine that the closed-loop system is stable. 6.3.2 PID Control with Feedforward Compensation After simulation using PID control, the system was then simulated using computed torque control. Figure 6.8 shows the modified block diagram, with the addition of the feedforward signal. The feedforward signal is computed by the block diagram shown in Figure 6.9, in which the position signal and the inverse dynamics of the plant are used to calculate the required torque. Note that the values for lead and inertia are given in m/rad and kg-m2 respectively. These values were calculated previously in Section 4.2.1.1. The MATLAB® function Friction shown in the figure, calculates the friction torque depending on the direction of the motion. If the velocity is positive, the friction is negative and vice versa. This is discussed in Appendix D. 6.3 Simulation 75 Position Torque Feedforward Signal Desired Position Hold Torque PID Controlller Hold Torque Plant Dynamics ?F< J^-quantization Hold Figure 6.8: Block diagram of the control system with computed torque com pensation. Position Hdu/dtr- Velocity !du/dt Acceleration Hold MATLAB Function Friction Lead 0.00202 0.000143 r Inertia Product Torque Figure 6.9: Computed torque control block diagram. The plots in Figure 6.10 show the actual position signal, the required torque and the tracking error obtained when feedforward computed torque compensation was provided. These results were obtained using a smooth input signal without significant noise. The values for the gains used for pure PID control are used once again: P=120, 1=120 and D=40. The results obtained when evaluating the system with feedforward compensation are consider ably better than those obtained with only the PID controller. Both the maximum tracking error and the required torque were reduced from approximately 0.4 mm and 0.3 Nm to less than 0.15 mm and 0.25 Nm respectively. The Nyquist plot for the system with computed torque compensation is shown in Figure 6.11(a). Both the gain and phase margins have been significantly improved by the addition of the feedforward signal. However the stability of the system is sensitive to changes in the inverse dynamic model. Figure 6.11(b) shows how the phase and gain margins are affected when the mass of the inverse 6.4 Implementation 76 0.02 •B 0.015 f-E. o 0 I I :A A A / A r \ A i / 1 J\J v V V\ n 3 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Figure 6.10: Simulated results from the PID controller with feedforward compensation. model is three times as much as the mass of the plant model. This same system was implemented on a one-axis experimental setup. The following section explains the details of this implementation, as well as the results obtained from it. 6.4 Implementation In order to implement the control system, the experimental setup shown in Figure 6.12 was used. This system simulates the first joint of the three axis manipulator proposed in Chapter 4, since the total mass of the system is being moved by one single actuator. In order for the mass of the experimental setup to be equivalent to that of the system, blocks of lead were added to the stage to obtain a total mass of approximately 17.9 kg. The motor and encoder used are those that were specified in Table 4.1; however, the single axis table used was different, due to its availability. This table is manufactured by Design Components Incorporated (DCI), model CP8-70R. The specified friction torque is 0.0035 Nm, while the total inertia of the system was determined to be 1.43 • 10-4 kg-m2, following a procedure similar to that explained in Section 4.2.1.1. 6.4 Implementation 77 -1.5 -1 -0.5 0 0.5 Real Axis (b) Inaccurate inverse dynamic model, phase margin = 6.78°, gain margin = 9.99. Figure 6.11: Nyquist plot for the discrete-time control system with com puted torque compensation, P = 120, I = 120, D = 40. The real-time control system was implemented under the QNX operating system, at a sampling rate of 1000 Hz, and was programmed using the 'C language. The encoder provides feedback information on the position of the motor, at a resolution of 0.09° (3.17510-6 rad). The derivative 6.4 Implementation 78 Figure 6.12: Experimental one-axis system. of the PID controller was approximated by Equations 6.3 and 6.4 with Ts = 0.001 and Tv = 0.055, while the integral was approximated numerically by a rectangular rule as described below: where I(k) is the integral at a certain time step, I{k - 1) is the integral at the previous time step, e(k) is the input to the controller and Ts is the sampling time. 6.4.1 PID Control Figure 6.13 shows the actual position, the required torque and the tracking error that result from the implementation of the system with only PID control. The values for the gains are also P=120, 1=120 and D=40. 6.4.2 PID Control with Feedforward Compensation The required torque and the tracking error that resulted after adding feedforward compensation are shown in Figure 6.14, with gain values equal to the ones used previously. These results are consistent with those obtained from the simulation, i.e., the results are improved by the use of the feedforward control signal. The maximum tracking error is reduced from 0.25 mm to approximately 0.15 mm, while actuator torque was maintained well within limits. I(k) = I(k - 1) + e(k)Tt (6.5) 6.4 Implementation 79 0.021 1 j 1 1 1 1 1 r 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 x 10"" 41 1 1 1 1 1 1 1 1 1 I -0.21 1 1 1 1 1 1 1 '—' 1 1 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 Time (s) Figure 6.13: Torque and error implementation results for the PID controller. The magnitude of the torque required by the plant oscillated between -0.15 and 0.2 Nm. The motor specifications establish that the maximum continuous torque that the motor can handle is 0.114 Nm. However, since the torque applied is not a continuous signal it can still work well if the maximum is kept below 0.25 Nm, as was shown in Section 4.2.1.1. This value was the torque limit enforced during the implementation procedure. Figure 6.15 shows the response of the system to a step input. The time constant, rise time, natural frequency, settling time, and the percent maximum overshoot have been measured from this figure and are shown in Table 6.1. Time constant 0.12 s Rise time 0.055 s Natural frequency 8.62 Hz Settling time 0.5 s Percentage overshoot 22% Table 6.1: Time-domain specifications of the control system. 6.4 Implementation 80 0.02 j 1 1 1 1 1 [ 1 1 r 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 -0.2' 1 1 1 1 1 ' ' •—I 1 1 0.5 0.6 0.7 0.8 0.9 .1 1.1 1.2 1.3 1.4 1.5 Time (s) Figure 6.14: Torque and error implementation results for the PID controller with feedforward compensation. 6.4.3 Evaluation of the Disturbance Rejection To evaluate the disturbance rejection, step disturbances of 0.03 and -0.03 Nm were added to the control torque, as shown in Figure 6.3. This disturbance is equivalent to adding or removing 4 kg when the system is moving at the maximum acceleration — equal to the mass of the hands as estimated in Appendix B. A step wave was used as the disturbance due to the fact that while the stage is in motion it is not possible to change the mass of the system by a known amount. In order for a mass to stay in contact with the stage, it has to be rigidly attached to it, which can not be done while it is in motion. Figures 6.16 and 6.17 show the required torque and tracking error obtained with these distur bances. The results show that when the disturbance is applied, the error increases to approximately 0.3 mm. After less than 2 seconds, the system has stabilized again. An important observation from the implementation of the controller is that the forces produced by the moving mass produce a large reaction force at the base of the stage. This suggests that it is very important to mount the system on a sturdy base, or design the actuator to have a small 6.5 Simulation Using a Quantized Input Signal 81 CL 2 0> -i i i 0 0.5 1 1.5 2 Time (s) Figure 6.15: Control system response to a step input. reaction force/torque. An additional simulation was performed which better approximates the real system. This is explained in detail in the following section. 6.5 Simulation Using a Quantized Input Signal The previous simulation and the implementation were performed assuming that the measured mo tion trajectory was a smooth wave; however, the actual signal that comes from encoders is affected by quantization noise. It was therefore considered important to simulate the results that would be obtained if the input signal was a better approximation of the actual signal. This approximation was performed by quantizing the signal to intervals equal to the resolution of the motion sensor encoders and by adding noise. This input wave was used as the input to a discrete-time system which simulates the actual system. Figure 6.18 shows a block diagram in which noise and quantization error have been added to both the input and feedback signals. The block diagram that calculates the filtered and delayed feedforward signal is shown in Figure 6.19. 6.5 Simulation Using a Quantized Input Signal 82 -0.21 1 1 1 1 1 1 L- J 0 0.5 1 1.5 2 2.5 3 3.5 4 5. 0.05 \-Vi -0.05 -Q _0 •) I I I I I i I I 0 0.5 1 1.5 2 2.5 3 3.5 4 time (s) Figure 6.16: Implementation results under step disturbance of magnitude 0.03 Nm. The MATLAB® function Filter (see Appendix D), shown in Figure 6.19 filters the position waveform and differentiates it twice in order to obtain smooth velocity and acceleration signals. In addition, it delays the signal by one period before it is used to calculate the torque, as discussed' in Section 6.2.2. Figure 6.20(a) shows the acceleration signal obtained as the second derivative of a smooth position signal, while Figure 6.20(b) shows the acceleration signal obtained from a noisy position signal by filtering and differentiating it twice. The similarity between the two signals shows that filtering helps to obtain a smooth acceleration signal, which is similar in amplitude, frequency and general waveform as the one obtained from a smooth position signal. The actual position of the system, the required torque and the tracking error obtained from the simulation after quantizing and adding noise to both the input and the feedback signals are shown in Figure 6.21. The results obtained show that the maximum tracking error is approximately 0.15 mm, while the maximum torque is less than 0.25 Nm which is the maximum allowed torque. All previous simulations were done assuming that the actuator used was the same as the one 6.5 Simulation Using a Quantized Input Signal 83 0.2 _Q 21 1 1 1 i I I I I 0 0.5 1 1.5 2 2.5 3 3.5 4 x10~" J I I I I I L 0 0.5 1 1.5 2 2.5 3 3.5 4 0.11 1 1 1 1 1 1 1 Z 0.05- ;: ; -1 -0.05 h ' 0 0.5 1 1.5 2 2.5 3 3.5 4 time (s) Figure 6.17: Implementation results under step disturbance of magnitude -0.03 Nm. F1 Inverse Dynamics PID Controller Plant Dynamics Torque Plant Dynamics Actual acceleration Actual velocity Actual position Figure 6.18: Control system diagram with added noise and quantization er ror. used in the implementation. However, the original design of the mechanism shown in Chapter 4 uses a different stage with different values for friction and the inertia. Figure 6.22 shows the results obtained from the simulation when the original stage was used. Apart from some small sudden jumps in the torque caused by this increase in friction, the results are almost the same as for the 6.5 Simulation Using a Quantized Input Signal 84 ©-Position MATLAB ) * w Function Demux Acceleration Lead 0.00202 Hold Filter Velocity 0.000143 Inertia MATLAB Function Friction Torque Figure 6.19: Delayed computed torque compensation block diagram. Time (s) Time (s) (a) Smooth signal (b) Noisy signal Figure 6.20: Acceleration calculated as the second derivative of the motion signal. other stage, indicating that the system is not very sensitive to small changes in the stage dynamics. These jumps occur when there is a change in the direction of the motion. Additional work must be undertaken in order to determine if other types of controllers would perform better. It has been determined by this simulation that the tracking error can be kept below 0.2 mm using the proposed controller. This chapter has dealt with the description of a control system that could be used to control the motion of the moving support in order to accurately track the heart motion. Different types of control actions were simulated using SIMULINK® and implemented on a one-axis experimental setup. It was shown that if the desired position signal is available, it is possible to control the motion of the support in order to obtain a tracking error of less than 0.2 mm. Future work will aim 6.5 Simulation Using a Quantized Input Signal 85 to reduce the tracking error and realize an implemention of the controller on a 3 DOF mechanism. 6.5 Simulation Using a Quantized Input Signal 86 Figure 6.22: Simulated results obtained using delayed computed torque compensation with a 0.03 Nm friction. Chapter 7 Conclusions and Recommendations This thesis proposes a method for performing coronary bypass surgery on the beating heart, in order to reduce the invasiveness of the procedure. It consists of using a heart-tracking moving hand support to move the hands of the surgeon in. synchrony with the heart motion. The potential benefits of such a support are as follows: • It allows surgery to be performed on the beating heart, thus eliminating the damaging effects associated with the cardiopulmonary bypass. • Tissue damage associated with the use of cardiac stabilizers is eliminated. This is accomplished by moving the hands of the surgeon in synchrony with the surgical site instead of applying a force to stop the heart motion. • Relative to teleoperation systems, it provides a low cost solution for reducing the invasiveness of CABG surgery, since only a 3-DOF platform is required, as opposed to 6-DOF master and slave robots required for each instrument. • It preserves the surgeon's dexterity by allowing the direct manipulation of the tools. The work presented herein is concerned with evaluating the feasibility of this approach followed by the specification and design of a number of the key components required for its implementation. Specifically, the following research objectives were considered: 87 7.1 Conclusions 88 1. To evaluate the feasibility of the approach by assessing the human ability to perform accurate tasks on moving targets, while the hands are being moved in synchrony with the targets. 2. To establish the general configuration of the moving support system, as well as to specify the general requirements of its main components. 3. To evaluate possible sensors that can be used to accurately measure the heart motion in real-time. 4. To generate a control strategy that will allow the moving hand support to track the heart motion satisfactorily. Each of these objectives was addressed in order to prove the feasibility of the proposed approach. The following section explains how these objectives were met and outlines the contributions of this thesis. 7.1 Conclusions A method based on a moving hand and/or tool support that tracks the motion of the heart creates a new alternative for performing coronary artery bypass grafting surgery while the heart itself is circulating and filtrating the blood. This reduces the overall invasiveness of the surgery, the recovery time and the secondary effects associated with traditional surgical techniques. A feasibility study performed using an experimental moving hand support that simulates perfect tracking performance, showed that it is indeed possible to perform accurate tasks on moving targets while the hands are being moved in synchrony with them. By comparing the results obtained when the hands were moving with the targets to those obtained when there was no moving support provided, it was shown that the accuracy of the marks was improved by at least 40%, while the average task completion time was reduced by 60%. Although task completion times were further reduced by providing a stationary image, no improvement in the accuracy was realized. It is believed that this is due to the lack of a high resolution stereo vision system. A series of steps must be undertaken in order to design and build a moving support system that tracks the motion of the surgical area. The main components of this system that were developed are outlined below: 7.1 Conclusions 89 • A 3-DOF mechanism with prismatic joints actuates the supporting platform upon which the hands of the surgeon are rested. A camera can be mounted on this support to provide a stable view of the surgical site. • In order to measure the motion of the surgical site, a 6-DOF mechanical sensor was designed and built. The end-effector of this sensor consists of a suction ring that attaches to the surgical area to ensure that the motion of a fixed point on the heart surface is being measured. The joint angles of the 3-DOF sensor arm are measured in order to calculate the 3D position of the center of the end-effector ring. An additional 3-DOF wrist allows the end-effector to follow the six degrees of freedom of the heart motion. Since the axes of the three wrist joints intersect at the center of the ring, the position of this point in not dependent on their angles. Therefore, it is not necessary to place position sensors at the wrist joints, which allows the sensor to be compact, minimizing interference with the surgical procedure. The results from the evaluation of the sensor show that the accuracy of the end-effector is not as high as is required for the purpose of tracking the heart motion. Various sources of error were responsible for the low accuracy of the measurements, the most significant being encoder resolution, misalignment of the wrist joint axes, play at the joints and calibration errors. If the measurement error is reduced, the mechanical sensor would provide a feasible solution to the measurement of the motion of the surgical site. The geometry and size of the arm are believed to be suitable for performing this measurement without interfering significantly with the surgical procedure. • A control system based on PID control and feedforward computed torque compensation was simulated using SIMULINK® and implemented on a single-axis experimental setup. The results of both the simulation and the implementation are very consistent, showing that if a smooth position signal is available, tracking can be performed with a maximum error of approximately 0.15 mm, and actuator torques not exceeding 0.1 Nm. However, since the platform position setpoint signal is likely to be computed using encoder measurements, the input to the controller will include quantization noise that may reduce system performance. A modified compensation scheme was applied, which consists of using 7.2 Recommendations for Future Work 90 the computed torque signal from the previous cycle as the feedforward signal, in order to eliminate phase delay caused by filtering. The results from the simulation of this controller show that the tracking error is approximately 0.15 mm, while the maximum torque required is 0.2 Nm. 7.2 Recommendations for Future Work Recommendations for additional work that must be performed to facilitate the use of the heart-tracking moving hand support in practice, are outlined below: • An ergonomic support that guides and supports the hand comfortably must be designed. It must also be determined whether attaching the tools to the support would be beneficial and, if so, how this might be done without affecting the dexterity of the surgeon's motions. • It is necessary to determine the best method for adjusting the position of the platform relative to the surgical area. Some alternatives include voice control, head control or buttons that allow manual or foot control. • The accuracy of the mechanical sensor must be improved by more accurately machining all of the parts and developing a calibration procedure that accounts for manufacturing errors. The use of higher resolution joint position sensors would significantly reduce the measurement error. • Studies must be performed to assess the feasibility of using a vision-based motion tracking approach for measuring the heart motion. Several issues must be addressed including the placement of markers close to the surgical site, the handling of interference and occlusion caused by the surgeon's motion, and the development of an algorithm that allows accurate, real-time 3D motion tracking. • The control system must be implemented and evaluated on the 3-DOF mechanism. An additional area of research is the applicability of such a system for use in endoscopic surgery, since it would reduce further the invasiveness of CABG surgery. A very simple mechanism (or at 7.2 Recommendations for Future Work 91 least a very compact mechanism) would be required for this purpose, since several separate supports are necessary: one for each tool plus one for the camera. In addition, the motion of the platform must account for the motion reversal of the tools. An interesting approach to minimally invasive surgery would consist of determining ways of integrating this approach with robotic systems that are currently being used for endoscopic surgery. In a setting of this sort the robotic arms would track the motion of the surgical site, while the surgeon's hands are stable; however, the drawbacks of having an expensive system that removes the surgeon from direct contact with the patient would still be present. References American Heart Association, "1999 heart and stroke statistical update: Medical procedures, facilities and costs," 1999. http://www.amhrt.org/statistics/09medicl.html. Health Canada, "Heart disease and stoke in Canada," June, 1997. Utilization of Health Services. http://www.hc-sc.gc.ca/hpb/lcdc/bcrdd/hdsc97. B. J. Harlan, A. Starr, and F. M. Harwin, Manual of Cardiac Surgery. Berlin: Springer-Verlag, 1980. J. W. Kirklin and B. G. Barratt Boyes, Cardiac Surgery: Morphology Diagnostic Criteria, Natural History, Techniques, Results and Indications. New York, USA: Churchill-Livingstone Press, 1993. R. W. Emery, ed., Techniques for Minimally Invasive Direct Coronary Artery Bypass (MID-CAB) Surgery. Philadelphia, PA: Hanley and Belfus, Inc., 1997. Center for Cardiovascular Education, Inc., "New bypass surgical techniques compared to con ventional bypass," 1996. http://www.heartinfo.org/nwbypsl2396.htm. P. W. Boonstra, "Local immobilization of the left anterior descending artery for minimally invasive coronary bypass grafting," Annals of Thoracic Surgery, vol. 63, pp. S76-8, 1997. Kapp Surgical Instruments Inc., "Ancillary universal stabilizer," 1999. http://www. kappsur-gical.com/anc_prod.htm. C. Borst, "Coronary artery bypass grafting without cardiopulmonary bypass and without inter ruption of native coronary flow using a novel anastomosis site restraining device ("octopus")," Journal of American College of Cardiology, vol. 27, no. 6, pp. 1356-64, May, 1996. T. Gilhuly, "Optical and physical heart stabilization for cardiac surgery," April, 1998. Master's Thesis, Department of Electrical Engineering, University of British Columbia. D. C. Youmans. Ethicon Endosurgery. Personal Communication. Computer Motion, "Robotic surgical system enabling minimally invasive microsurgery," 1998. http://www.computermotion.com/old/zeus.htm. [13] T. Skari, "The cutting edge: Heart surgery enters the age of robotics," Life, vol. Special Issue, pp. 14-23, Fall, 1998. 92 REFERENCES 93 University of Pennsylvania Health System, "Cardiopulmonary bypass without a sterno tomy," Penn Today, vol. 8, no. 2, Spring, 1997. http://www.med.upenn.edu/health/ pf_files/penntoday-remote/v8n2/cc_l.html. P. W. Mayer, "Relative motion canceling platform for surgery," Feb. 15, 1999. U.S. Patent No. 5871017. S. Sivasubramanian, "Heart disease/cardiology," 1997. http://heartdisease.miningco.com/ msubcabg.htm. Mayo Foundation for Medical Education and Research, "Atherosclerosis: More ways to clear "clogged" arteries," 1999. http://www.mayohealth.org/mayo/9505/htm/atherscl.htm. PLC Medical Systems, Inc., "Transmyocardial revascularization using the heart laser system," 1997. http://www.plcmed.com/home.cfm. Cardiovascular Consultants Medical Group, "Coronary artery bypass surgery," March, 1999. http://www.healthyhearts.com/bypass.htm. J. L. Ochsner and N. L. Mills, Coronary Artery Surgery. London: Henry Kimpton Publishers, 1978. R. S. Hartz, "Minimally invasive heart surgery," Circulation, vol. 94, pp. 2669-2670, 1996. http: / / www.amhrt.org/scientific/statements/1996/1115.html. J. H. Stevens, T. A. Burdon, W. S. Peters, L. C. Siegel, M. Pompili, M. A. Vierra, F. G. St. Goar, G. H. Ribakove, R. S. Mitchell, and B. A. Reitz, "Port-access coronary artery bypass grafting: a proposed surgical method," The Journal of Cardiovascular Surgery, vol. Ill, no. 3, pp. 567-573, March, 1996. Winthrop University Hospital, "Thoracic and cariovascular surgery," 1999. http:// www.tcvsurg.org/whatsnew.cfm#article4. N. Ingles, G. Daughters, and E. Stinson, "Three dimensional left ventricular midwall dynamics in the transplanted human heart," Circulation, vol. 81, pp. 1837-1848, 1990. M. Potel, J. Rubin, S. MacKay, A. Aisen, J. Al-Sadir, and R. Sayre, "Methods for evaluating cardiac wall motion in three dimensions using bifurcation points of the coronary artery tree," Investigative Radiology, vol. 18, pp. 47-57, 1983. J. Park, D. Metaxas, A. Young, and L. Axel, "Deformable models with parameter functions for cardiac motion analysis from tagged mri data," IEEE Transactions on Medical Imaging, vol. 15, no. 3, pp. 278-289, June, 1996. K. L. Yun, M. A. Niczyporuk, G. T. Daughters, N. B. Ingels, E. B. Stinson, E. L. Alderman, D. E. Hansen, and D. C. Miller, "Alterations in left ventricular diastolic twist mechanics during acute human cardiac allograft rejection," Circulation, vol. 83, no. 3, pp. 962-973, 1991. K. J. Astrom and B. Wittenmark, eds., Computer Controlled Systems. Englewood Cliffs, NJ: Prentice Hall, 1990. REFERENCES 94 M. W. Spong and M. Vidyasagar, Robot Dynamics and Control. New York: John Wiley & Sons, 1989. S. Hara, T. Omata, and M. Nakano, "Synthesis of repetitive control systems and its applica tion," Proceedings of the 24th Conference on Decision and Control, pp. 1387-1392, 1985. D. De Roover and O. H. Bosgra, "An internal-model-based framework for the analysis and design of repetitive and learning controllers," Proceedings of the 36th Conference on Decision and Control, pp. 3365-3770, December, 1997. B. A. Francis and W. M. Wonham, "The internal model principle for multivariable regulators," Applied Math and Optimization, vol. 2, pp. 170-194, 1975. C. C. H. Ma, "Rapid tracking of short complex trajectories by a dc motor," Proceedings of the 1994 IEEE International Conference on Robotics and Automation, pp. 1484-1489, 1994. A. Langari and B. A. Francis, "Sampled-data repetitive control systems," Proceedings of the American Control Conference, pp. 3234-3235, June, 1994. J. Ghosh and B. Paden, "Application of repetitive controllers to nonlinear plants," Proceedings of the American Control Conference, pp. 2692-2697, 1998. P. A. Finlay and M. H. Ornstein, "Controlling the movement of a surgical laparoscope," IEEE Transactions in Medicine and Biology, pp. 289-291, May/June, 1995. Computer Motion, "Automated endoscopic system for optimal positioning," 1998. http:// www.computermotion.com/old/aesop.htm. NEAT, "Engineering requirements: Torque and force requirements," 1999. http://www. neat.com/neat Jnside.cfm?main=L4_Eng_Considerations& imgnum=4. L. F. Marcus, M. Corti, A. Loy, G. J. Naylor, and D. E. Slice, Advances in Morphometries. NATO ASI Series A: Life Sciences, New York: Plenum Press, 1996. J. G. Richards, "The measurement of human motion: Comparison of commercially available systems," in Proceedings of the Fifth International Symposium on the 3-D Analysis of Human Movement, pp. 1-9, 1998. G. E. Green, R. N. Singh, and J. Sosa, eds., Surgical Revascularization of the heart: The internal Thoracic Arteries. New York, NY: Igaku-Shoin Medical Publishers, Inc., 1991. C. W. de Silva, Control Sensors and Actuators. Englewood Cliffs, NJ: Prentice Hall, 1989. H. W. Coleman and W. G. Steele Jr., Experimentation and Uncertainty Analysis for Engineers. New York: John Wiley k Sons, 1999. A. J. Wheeler and A. R. Ganji, Introduction to Engineering Experimentation. Englewood Cliffs, NJ: Prentice Hall, 1996. ANSI/ASME, Measurement Uncertainty, Part I, PTC 19.1 ed., 1985. L. Sciavicco and B. Siciliano, Modeling and Control of Robot Manipulators. New York: Mc Graw-Hill, 1996. REFERENCES 95 [47] S. Ploen, J. Bobrow, and F. Park, "Geometric algorithms for operational space dynamics and control," Proceedings of the 1997 IEEE International Conference on Robotics and Automation, pp. 1606-1616, 1997. [48] J. Denavit and R. Hartenberg, "A kinematic notation for lower-pair mechanisms based on matrices," ASME J. Applied Mechanics, pp. 215-221, 1955. [49] M. Braae, Control Theory for Electrical Engineers. Cape Town, South Africa: UCT Press (Pty) Ltd, 1994. [50] S. Tafazoli Bilandi, "Identification of frictional effects and structural dynamics for improved control of hydraulic manipulators," January, 1997. Ph.D. Thesis, Department of Electrical Engineering, University of British Columbia. [51] A. A. Young, C. M. Kramer, V. A. Ferrari, L. Axel, and N. Reichek, "Three-dimensional left ventricular deformation in hypertrophic cardiomyopathy," Circulation, vol. 90, no. 2, pp. 854-867, 1994. [52] J. E. Shigley and C. R. Mischke, Mechanical Engineering Design. New York: McGraw-Hill, 1989. [53] E. Croft, "Jacobian derivative," 1998. Lecture Notes. Glossary of Medical Terms Aggregation Anastomosis Anemia Arteriotomy Bypass graft Cardiopulmonary Bypass Emboli Hemolysis Heart-Lung Machine Massing of materials together as in clumping, e.g., red blood cell aggregation. Surgical joining of blood vessels. The anastomotic site refers to the area on the heart surface where the anastomosis is performed. A deficiency of red blood cells resulting in insufficient oxygen to tissues and organs. The opening of an artery. An alternative blood vessel that is created by a surgeon to reroute blood flow. Refers to the placement of the patient onto the heart-lung machine. This allows the surgeon adequate time to perform primary heart surgery on a temporarily nonfunctioning heart. Material that travels through the circulation, eventually obstructing blood flow through a smaller vessel. It consists most frequently of a clot of fibrin, a detached shred of a morbid growth, a globule of fat or a microscopic organism. Dissolution or destruction of red blood cells. A combination blood pump and blood oxygenator used for tempo rary periods of time in cardiopulmonary bypass for cardiac surgery. 96 GLOSSARY 97 Ischemia A low oxygen state usually due to the obstruction of the arterial blood supply or inadequate blood flow leading to the reduction of oxygen supply to the tissue. Sternotomy Opening of the chest wall in order to access the thoracic cavity. Suture Usually a synthetic based line that does not react with biological tissue. It is used in closing a surgical or traumatic wound. Appendix A Heart Motion This chapter explains how the heart motion trajectories and accelerations were obtained. In ad dition, in order to simulate a heart motion trajectory sensed by common encoders, the noise from these encoders was measured while sensing a motion similar in amplitude and frequency to that of the heart. The information shown in this chapter is required for the design of the moving support, the mechanical sensor and the control system as explained in Chapters 4-6. A.1 Heart Motion Trajectory The three dimensional trajectory of a point on the heart surface was obtained from [24]. This motion was measured by implanting markers on a transplanted human heart and then using cineradiography to follow the trajectories of these points. The measurements were performed at a speed of 50 fps. Other researchers have modeled three dimensional heart motion, however, they focus their work on the motion of the heart as a whole and not only on the surface trajectories [26,51]. Figure A.1 shows a typical trajectory of a point on the heart surface. The point whose motion is represented in the figure, is located on the mid-lateral wall, where the motion amplitude is normally the highest. A.2 Calculation of the Maximum Acceleration In order to design the mechanism and the control system it was necessary to determine the maximum acceleration that would be required to track the heart motion. This was determined by calculating 98 A.2 Calculation of the Maximum Acceleration 99 -0.05 y (cm) x (cm) Figure A.l: Three dimensional heart motion trajectory. the maximum acceleration of a point on the heart surface. Figure A.2 shows a graph of the speed of a point on the heart surface as a function of time [25]. The acceleration was determined by measuring the maximum slope from this graph, which was determined to be between points A and B. The slope was determined as shown in the following equation: Figure A.2: Heart surface speeds. A.3 Simulation of the Desired Position Signal 100 & = iLfoT^ = m = 190 cm-s- = 1.9 m • s"2 In most calculations where the maximum acceleration was required, this value was rounded up to 2 m • s-2. A.3 Simulation of the Desired Position Signal Figure A.3 shows a typical one dimensional trajectory of a point on the heart surface. In this case, the point is located on the mid-lateral wall, and the motion corresponds to an axis directed toward the right side of the heart. 0.3 0.4 Time (s) Figure A.3: One dimensional heart motion trajectory. In order to use this trajectory for simulation purposes, it was necessary to eliminate the noise by eliminating the high frequency components of the signal. The motion trajectory was filtered using MATLAB, following the procedure outlined below: 1. The mean of the trajectory samples was subtracted from the wave to obtain a zero mean waveform. 2. The Fourier transform of this wave was computed by means of the f f t function. The absolute value of the resulting frequency spectrum is shown in Figure A.4, from which it was observed that the system's dominant frequency is the inverse of its period. A.3 Simulation of the Desired Position Signal 101 120 100 E 80 Q. W >. 60 40 20 "0 2 4 6 8 10 12 14 Frequency (Hz) Figure A.4: Fourier transform of motion waveform. 3. It was also observed that the energy contribution of frequencies higher than 5 Hz was small. Therefore, the signal was low-pass filtered by setting to zero the Fourier coefficients at all frequencies above 5 Hz. 4. The inverse of the Fourier transform was obtained by means of the if ft function. 0.02 0.018 0.016 0.014 f-0.012 c 0) i 0.01 o 8-0.008 b 0.002 0 0.1 i \ s S /... /. \ / / / /: \\ \\ If" \\ If \\ \\ / / \\ if j \ if i I { \ \\ i / / / /y Yv\ \ \ 0.2 0.3 0.4 Time (s) 0.5 0.6 0.7 Figure A.5: Filtered motion waveform. A.4 Calculation of the Encoder Noise 102 5. The resulting waveform was shifted back to its original mean position and is shown in Figure A.5. The signal was then resampled to match the sampling period of the controller. In Section A.2 the typical acceleration of a point on the heart surface was shown to be less than 2 m-s-2. Before the position signal was filtered, the maximum acceleration obtained from its second derivative was close to 20 m-s-2 and was reduced to almost 2 m-s-2 after the filtering, thus verifying the procedure described above. Although the motion of the heart surface can be represented by the filtered wave calculated above, the actual motion that can be measured by motion sensors, will be a quantized waveform with added noise. The following section describes how this encoder noise can be simulated. A.4 Calculation of the Encoder Noise The noise signal was approximated by measuring the noise of a signal obtained from actual encoders. A motion similar in frequency and amplitude to that of the heart beat was measured, filtered and subtracted from the initial measurement. The resulting noise signal, shown in Figure A.6, is a rough approximation of the actual encoder noise, since it includes noise from other sources that might not be present in the actual system. Figure A.6: Magnitude of the encoder noise. A.4 Calculation of the Encoder Noise 103 The heart motion trajectories have been explained in this chapter, as well as a calculation of the maximum acceleration of a point on the heart surface. It was also shown how this trajectory was filtered and quantized in order to simulate the motion waveform as would be obtained from actual motion sensors. Appendix B Additional Calculations for the Design of the Moving Platform B.l Introduction Chapter 3 explained the study performed in order to determine the feasibility of performing accurate tasks on a moving platform. This chapter shows some additional calculations that were required in order to design such platform. The moving platform is mounted on an oscillating shaft in order to simulate the motion of the beating heart. The oscillation of the shaft is produced by a DC motor, which is controlled by an analog PID control loop. The total forces and torques acting on the shaft were used to determine its diameter as well as the size of the motor, as will be described in the following section. B.2 Calculation of Forces and Torques The total force acting on the shaft was calculated as the sum of the weight of the different com ponents. This force was determined to be 60 N, as shown in Table B.l. In order to determine the weight of the hands, five subjects were asked to place both their hands on a balance. The highest weight was chosen and augmented by a safety factor of 2.5 in order to account for other forces generated by the weight of the arm. The torque required to move the platform was calculated from the following equations: 104 B.2 Calculation of Forces and Torques 105 Component # Weight- (N) Cameras Ml 6.92 Camera support M2 5.93 Platform M3 3.30 Small Platform M4 1.59 Platform support M5 3.14 Hands M6 39.12 Total 60 Table B.l: Force calculations. Tf — Tgtat -j- Tdyn Tstat = EFxd Tdyn = I -a Where Tt is the total torque, Tstat and Tdyn are the static and dynamic torques respectively, F is the weight of each of the components, d is the maximum distance from their center of mass to the center of rotation of the system , I is the moment of inertia of the whole system and a is its maximum angular acceleration. The maximum distance d refers to the horizontal distance at the maximum rotation of the shaft. The moment of inertia of the system was approximated by assuming that the mass of each of the components was concentrated on its centroid. The calculations were performed as shown in Table B.2 and Figure B.l. Based on these values the static torque was determined as shown on Table B.3. The dynamic torque is a function of the angular acceleration. The angular acceleration can be obtained assuming that the motion trajectory is a periodic waveform with amplitude equal to the maximum angular displacement. The maximum angular acceleration and consequently the dynamic torque can then be calculated as follows: a = 9 • (2 • ?r)2 = 16.8 rad/s2 Tdyn = I-a = 0.150 • 16.8 = 2.51Nm where a is the maximum angular acceleration and 9 is the maximum angular displacement. The B.2 Calculation of Forces and Torques 106 1.813" —1 — 4.938" Figure B.l: Centers of mass. # Radius (m) Mass (kg) Moment of Inertia {Nm2) Ml 0.263 0.705 0.049 M2 0.200 0.604 0.024 M3 0.054 0.336 0.001 M4 0.047 0.162 0.000 M5 0.031 0.320 0.000 M6 0.137 3.988 0.075 Total 0.150 Table B.2: Calculation of the moment of inertia. B.3 Selection of the Shaft 107 # Weight (N) Horizontal dist at max angle (m) Torque (Nm) Ml 6.92 0.137 0.945 M2 5.93 0.034 0.199 M3 3.30 0.032 0.105 M4 1.59 0.029 0.046 M5 3.14 0.013 0.040 M6 39.12 0.137 5.366 Total 6.702 Table B.3: Static torque calculations. total torque was determined to be 9.214 Nm. Since the motor available had a stall torque of 1.1 Nm, a planetary gearhead with a 10:1 ratio was added. B.3 Selection of the Shaft The material of the shaft was chosen to be stainless steel mainly due to its characteristic of high stiffness. The calculated torques and forces together with a calculated bending moment of 0.31 Nm, were used to determine the diameter of the shaft, as follows [52]: d = [f^-(M2 + r2)1/2]1/3 d = idMo* • ((0-31)2 + (Q^U)2)1/2]1^ = 9.2mm Where n is the factor of safety chosen to be 2, and Sy is the yield strength factor equal to 241 • 106 Pa for stainless steel. The diameter of the shaft was chosen to be 9.52 mm (3/8"). Appendix C Additional Calculations for the Design of the Mechanical Sensor C.l Introduction This chapter provides further information on calculations performed for the design of the mechanical sensor, as explained in Chapter 5. The required encoder resolution and the necessary end-effector attachment force were determined by means of writing and evaluating several programs using MAT-LAB. The programs are explained below together with some of the results obtained. C.2 Encoder Resolution The program armc calculates the required encoder resolution as a function of the allowed error at the end-effector and the length of the links. The program performs the following procedure: • After defining the required constants and the size of the workspace, a series of trajectories are defined throughout the workspace where the error will be evaluated. • The inverse kinematics for all the end-effector positions are calculated in order to determine the joint angles that correspond to those positions in the workspace. • For each set of joint angles, the Jacobian is determined and used to calculate the joint error by means of Equation 5.1. 108 C.2 Encoder Resolution 109 • In order to obtain the required encoder resolution, the minimum allowed joint error is deter mined and converted from radians to counts per revolution. The code of the program is as follows: '/, armc. m '/, function resolution = armc(acc,11,12,13) '/, where 11, 12 and 13 are the lengths of the three links of an anthropomorphic '/, arm and acc is the desired end-effector accuracy. '/, The result is the encoder resolution needed at the joints. function resolution = armc(acc,11,12,13); '/, Define constants err=acc/sqrt(3); dx=err; dy=dx; dz=dx; '/, Define workspace xmax = 110; xmin = 90; ymax = 0; ymin = 0; zmax = 140-11; zmin = 60-11; */,'/, Define first trajectory '/, Inverse Kinematics for maximum position px=xmax; py=ymax; pz=zmax; qql=atan2(py,px); c3=(px~2+py"2+pz~2-12"2-13~2)/(2*12*13); s3=-sqrt(l-c3"2); C.2 Encoder Resolution 110 qq3=atan2(s3,c3); s2=((12+13*c3)*pz-13*s3*sqrt(px~2+py~2))/(px~2+py~2+pz~2); c2=((12+13*c3)*sqrt(px~2+py~2)+13*s3*pz)/(px~2+py~2+pz~2); qq2=atan2(s2,c2); q = [qql qq2 qq3]; qlmax = qql; q2max = qq2; q3max = qq3; */, Inverse Kinematics for minimum position px=xmin; py=ymin; pz=zmin; qql=atan2(py,px); c3=(px"2+py~2+pz~2-12~2-13~2)/(2*12*13); s3=-sqrt(l-c3~2); qq3=atan2(s3,c3); s2=((12+13*c3)*pz-13*s3*sqrt(px~2+py~2))/(px~2+py~2+pz~2); c2=((12+13*c3)*sqrt(px~2+py~2)+13*s3*pz)/(px~2+py~2+pz~2); qq2=atan2(s2,c2); Q = [qql qq2 qq3]; qlmin = qql; q2min = qq2; q3min = qq3; '/.Calculate first trajectory QO = [qlmax q2max q3max]; Qi = [qlmin q2min q3min]; Qtrajl = jtraj( QO, Ql, 200); p = length(Qtraj 1); '/,'/, Define second trajectory '/, Inverse Kinematics for maximum position C.2 Encoder Resolution 111 px=xmin; py=ymin; pz=zmax; qql=atan2(py,px); c3=(px~2+py~2+pz~2-12~2-13~2)/(2*12*13) ; s3=-sqrt(l-c3~2); qq3=atan2(s3,c3); s2=((12+13*c3)*pz-13*s3*sqrt(px~2+py~2))/(px~2+py~2+pz~2); c2=((12+13*c3)*sqrt(px~2+py~2)+13*s3*pz)/(px~2+py~2+pz~2); qq2=atan2(s2,c2); Q = [qql qq2 qq3]; qlmax = qql; q2max = qq2; q3max = qq3; '/, Inverse Kinematics for minimum position px=xmax; py=ymax; pz=zmin; qql=atan2(py,px); c3=(px-2+py-2+pz"2-12"2-13-2)/(2*12*13); s3=-sqrt(l-c3"2); qq3=atan2(s3,c3); s2=((12+13*c3)*pz-13*s3*sqrt(px~2+py~2))/(px~2+py~2+pz~2); c2=((12+13*c3)*sqrt(px~2+py~2)+13*s3*pz)/(px~2+py"2+pz~2); qq2=atan2(s2,c2); Q = [qql qq2 qq3]; qlmin = qql; q2min = qq2; q3min = qq3; '/, Calculate second trajectory QO = [qlmax q2max q3max]; Ql = [qlmin q2min q3min]; C.2 Encoder Resolution 112 Qtraj2 = jtraj( QO, Ql, 200); r = length(qtraj2); 7,7, Initialize matrices DQ=zeros(3,p+r); n=l; Qtraj = zeros(p+r,3); 7,7. Start loop for i=l:p, ql = Qtrajl(i,l); q2 = Qtrajl(i,2); q3 = Qtrajl(i,3); Qtraj(n,:) = [ql q2 q3] ; J = [-sin(ql)*(12*cos(q2)+13*cos(q2+q3)), -cos(ql)*(12*sin(q2)+13*sin(q2+q3)), -13*cos(ql)*sin(q2+q3); cos(ql)*(12*cos(q2)+13*cos(q2+q3)), -sin(ql)*(12*sin(q2)+13*sin(q2+q3)), -13*sin(ql)*sin(q2+q3); 0, 12*cos(q2)+13* cos(q2+q3), 13*cos(q2+q3)]; Ji = inv(J); A = Ji * [dx; dy; dz]; DQ(:,n)= A; n=n+l; end; for i=l:r, ql = Qtraj2(i,l); q2 = Qtraj2(i,2); q3 = Qtraj2(i,3); Qtraj(n,:)=[ql q2 q3]; J= E-sin(ql)*(12*cos(q2)+13*cos(q2+q3)), -cos(ql)*(12*sin(q2)+13*sin(q2+q3)), -13*cos(ql)*sin(q2+q3); cos(ql)*(12*cos(q2)+13*cos(q2+q3)), -sin(ql)*(12*sin(q2)+13*sin(q2+q3)), -13*sin(ql)*sin(q2+q3); 0, 12*cos(q2)+13*cos(q2+q3), 13*cos(q2+q3) ]; Ji = inv(J); A = Ji * [dx; dy; dz]; DQ(:,n)= A; C.2 Encoder Resolution 113 n=n+l; end; '/, Calculate the minimum value of all the possible allowed errors. [a,k] = min(abs(DQ(l,:))); [b,l] = min(abs(DQ(2,:))); [c,m] = min(abs(DQ(3,:))); [h,j] = min(abs([a.b.c])); '/, Convert radians to Counts per Revolution (cpr) resolution = 2*pi/h; Other smaller programs were written that use the function armc to calculate the encoder res olution required for a series of link length values or end-effector error values. The plots obtained from these programs are presented in Figures C.l - C.4. These programs and figures show the final result of the analysis performed to determine the optimal length of the links. As can be seen from Figure C.l the required encoder resolution increases for length values higher than 45 mm for the first link, regardless of the values chosen for the other link lengths within certain limits. The final value of 40 mm was not only based on this result, but also on the dimensions of the thoracic cavity and the position of the moving support with respect to the surgical site. In addition, if the length was too short, it would have been more difficult to design the attachment for the second link. The second link presented similar results, as shown in Figure C.2. It can be seen that the encoder resolution increases for length values higher than 60 mm. The final length of 60 mm was based on this result, the dimensions of the thoracic cavity and the need to avoid interference with the surgical site. The length of the final link was chosen based on Figure C.3. As the link length increases the encoder resolution decreases considerably up to the 110 mm mark. Although there continues to be a decrease in the required encoder resolution after that point, it is not considered to be significant enough to justify the need for a longer link. Based on these results the final link lengths were chosen to be as follows: C.3 Attachment Forces 114 Length of link 1 (mm) Figure Cl: Required encoder resolution as a function of the length of link 1. 11 = 40 mm 12 = 60mm 13 = 110 mm Figure C.4 shows the relationship between the encoder resolution and the end-effector accuracy for the designed arm. An encoder resolution of 4096 cpr, which corresponds to the encoder chosen in Chapter 5, will generate an end-effector error of approximately 0.3 mm. C.3 Attachment Forces The suction force required at the end-effector ring is equal to the force required to keep it in contact with the heart. This force was calculated based on the relationship between the velocity and the force at the end-effector, as expressed by Equation following equations: / = \Vt + v + g (Cl) where Vt is the vector of end-effector velocities in end-effector coordinates, A is the inertia matrix of the arm, v is the vector of Coriolis and centrifugal forces and g is the gravity vector, all in cartesian C.3 Attachment Forces 115 051 1 1 1 1 40 50 60 70 80 90 Length of link 2 (mm) Figure C.2: Required encoder resolution as a function of the length of link 2. space. These values can be calculated as follows: A = {jD-ljTyl v = K(JD~lC - Jq) (C.2) g = KJD~lG where D is the inertia matrix, C is the vector of Coriolis and centrifugal forces and G is the gravity vector, all in joint space. J is the manipulator Jacobian relating joint rates to end-effector generalized velocities in end-effector coordinates. These values were calculated using the MATLAB Robotics toolbox. The values for A, D, J, C, and G were determined directly using the functions cinertia, inertia, jacobO, coriolis and gravload respectively. The derivative of the jacobian matrix was determined using the function jacobdrv [53]. The program performs the following procedure: • Constants and other required variables are defined based on the design of the arm and other C.3 Attachment Forces 116 9000 80001 1 ' 1 1 1 1 1 1 90 95 100 105 110 115 120 125 130 Length of link 3 (mm) Figure C.3: Required encoder resolution as a function of the length of link 3. estimated values. • The inertia matrix, the jacobian and the gravitational component are calculated for the par ticular position. • Once the vector of joint velocities is defined, the derivative of the jacobian and the coriolis term are calculated. • These values are used to determine the required end-effector force. The code of the program is as follows: '/, forces.m '/, function f = forces(ql,q2,q3) '/, Calculates the forces necessary at the end-effector based on the values for '/, maximum speed, as a function of the joint angles ql, q2 and q3. function f = forces(ql,q2,q3); '/, Length of the links (m) C.3 Attachment Forces 117 i i i i i i i i i i 1.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 End-effector accuracy (mm) Figure C.4: Required encoder resolution as a function of end-effector error. 11=0.040; 12=0.060; 13=0.110; '/, DH parameters dhpar = [pi/2 0 ql 0 0; 0 12 q2 0 0; 0 13 q3 0 0]; */, Mass of the links in kg ml= 0.160; m2= 0.140; m3= 0.225; '/, Position of the center of gravity with respect to the link coordinate frame. rl= [0,0,-0.02]; r2= [0.03,0,0]; r3= [0.055,0,0]; '/, Moments of inertia in kg*m"2 II = [ 0.0002336, 0.0002336, 0.0001168, 0, 0, 0]; C.3 Attachment Forces 118 12 = [ 0.00003626, 0.0002223, 0.0002405, 0, 0, 0]; 13 = [ 0.000004621,0.0001995, 0.0001995, 0, 0, 0]; Rest = [0, 1, 0, 0, 0]; '/, Dynamic Matrix Dyn = zeros(3,20); Dyn(:,1:5)=dhpar; Dyn(l,6)=ml; Dyn(2,6)=m2; Dyn(3,6)=m3; Dyn(l,7:9)=rl; Dyn(2,7:9)=r2; Dyn(3,7:9)=r3; Dyn(l,10:15)=Il; Dyn(2,10:15)=I2; Dyn(3,10:15)=I3; Dyn(l,16:20)=Rest; Dyn(2,16:20)=Rest; Dyn(3,16:20)=Rest; '/, Calculation of the Inertia matrix Q = [ql,q2,q3]; lambda = cinertia(Dyn.Q); D = inertia(Dyn.Q) ; '/.Joint space inertia matrix '/, Jacobian J = C-sin(ql)*(12*cos(q2)+13*cos(q2+q3)), -cos(ql)*(12*sin(q2)+13*sin(q2+q3)), -13*cos(ql)*sin(q2+q3); cos(ql)*(12*cos(q2)+13*cos(q2+q3)), -sin(ql)*(12*sin(q2)+13*sin(q2+q3)), -13*sin(ql)*sin(q2+q3); 0, 12*cos(q2)+13*cos(q2+q3), 13*cos(q2+q3) ]; '/, Definition of the vector of joint velocities pdot = [13 13 13]'*10~(-2); QD = inv(J)*pdot; Jtotal = jacob0(dhpar,Q); Jdot = jacobdrv(Jtotal,QD); C.3 Attachment Forces 119 fs fv fz ft 0.5667 0.3998 3.7333 3.7972 Table C.l: Attachment forces. */, Calculation of the coriolis term C = coriolis(Dyn,Q,QD'); C = C ; nu = lambda*(J*inv(D)*C-Jdot(l:3)*QD); '/, Calculation of the gravitational component G = gravload(Dyn.Q); g = lambda*J*inv(D)*G'; '/, Calculation of the necessary force at the end-effector f = lambda*pdot+nu+g; Other programs were written with the goal of using the function forces to calculate the max imum end-effector attachment force. This was performed by determining the required force for different positions in the workspace in order to find the maximum value. The results obtained are shown in Table C.l where fx, fy and fz are the forces in the x, y and z axis respectively and f is the total force required in Newtons. The total attachement force is calculated to be 3.80 N. An additional safety factor of 2 produces a final attachment force of 7.60 N. Appendix D MATLAB® Functions for Control System Simulation This chapter explains the programs written using MATLAB® for the simulation of the control system shown in Chapter 6. The first function explained was used to estimate the friction as a function of the plant velocity. The second function was used in the simulation of delayed computed torque control to calculate the acceleration by differentiating and filtering the position signal twice. The following sections explain these functions in detail and the programming code is also shown. D.l Modeling of Friction The function Friction calculates the friction as a function of the velocity of the system. It was assumed that the maximum value for the friction torque is always acting in a direction opposite to the motion. Since the velocity signal changes sign when the motion changes direction, the velocity signal was used to determine the direction of the friction. The code of the program is as follows: '/, Friction.m '/, Calculates the value of friction as a function of the velocity for the '/, simulation of the control system. function F = Friction(vel); 120 D.2 Delayed Computed Torque Filter 121 Vsign = sign(vel); F = -Vsign*0.0035; D.2 Delayed Computed Torque Filter The calculation of the acceleration as the second derivative of a quantized position signal, requires filtering the signal twice during the procedure. In order to simulate this calculation, the function Filter stores part of the position signal, differentiates it and filters it twice before it is used to calculate the feedforward torque signal. The total delay of the acceleration waveform is equal to the period of the motion trajectory. The code of the program is as follows: '/, Filter.m '/, calculates the acceleration by differentiating and filtering the position '/, signal twice. The total delay of the output is one period of the input '/, waveform function y = Filter(u); '/, Define global variables global fi inputvect present future fold ddfmot dfold vel '/, Define constants T = 0.5511; '/.Period ts = 0.001; '/.Sampling time L = 552; '/.length of the vector qL = 138; '/.quarter of the vector length '/, store input and provide output D.2 Delayed Computed Torque Filter 122 fi = fi+1; inputvect(fi) = u; y = [ddfmot(fi) vel(fi)]; '/, Filter, derive and filter the wave once it is stored. if fi >= L/2 '/, Define values past = present; length(past); present = future; length(present); future = inputvect; size(future); complete = [past;present;future]; size(complete); '/.Filter once [B.A]=butter(2,0.03); fmot=filtfilt(B,A,complete); '/.filtered motion vector size(fmot); filteredmotion = fmot(qL+l:L+qL); size(filteredmotion); past = zeros(276,1); inputvect = zeros(276,1); '/, Derive filtered motion dfmot = zeros(length(filteredmotion),1); for j = l:length(filteredmotion) dfmot(j) = (filteredmotion(j)-fold)/ts; '/Velocity fold = filteredmotion(j); end; size(dfmot); vel = dfmot(qL+1:L-qL); D.2 Delayed Computed Torque Filter 123 '/Filter again [B,A]=butter(2,0.05); fvel=filtfilt(B,A,dfmot); size(fvel); filteredvelocity = fvel(qL+l:L-qL); size(filteredvelocity); '/, Derive filtered motion ddfmot = zeros(length(filteredvelocity),1); for j = 1:length(filteredvelocity) ddfmot(j) = (f ilteredvelocity (j )-df old)/ts; '/.Acceleration dfold = filteredvelocity(j); end; size(ddfmot); fi = 0; end; 

Cite

Citation Scheme:

    

Usage Statistics

Country Views Downloads
China 12 1
United States 9 9
Germany 9 1
Japan 5 0
Canada 3 0
Colombia 2 0
India 1 0
Thailand 1 0
Syria 1 0
City Views Downloads
Unknown 14 2
Beijing 5 0
Tokyo 5 0
Shenzhen 4 1
Ashburn 4 0
London 3 0
Magdeburg 2 0
Medellín 2 0
Hangzhou 1 0
Nanjing 1 0
Chicago 1 0
New York 1 0

{[{ mDataHeader[type] }]} {[{ month[type] }]} {[{ tData[type] }]}
Download Stats

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0080903/manifest

Comment

Related Items