Industrial robot manipulators are general-purpose machines used for industrial ...
ical models and control methods in order to fulfil conflicting requirements, such.
Linköping studies in science and technology. Dissertations. No. 1349
Modeling and Control of Flexible Manipulators
Stig Moberg
Department of Electrical Engineering Linköping University, SE–581 83 Linköping, Sweden Linköping 2010
Cover illustration: A well-known path used by robot customers and robot manufacturers for evaluating the path accuracy of industrial robots (front). One element of the multivariable frequency response function magnitude for a modern industrial robot (back).
Linköping studies in science and technology. Dissertations. No. 1349 Modeling and Control of Flexible Manipulators
Stig Moberg
[email protected] www.control.isy.liu.se Division of Automatic Control Department of Electrical Engineering Linköping University SE–581 83 Linköping Sweden
ISBN 978-91-7393-289-9
ISSN 0345-7524
Copyright © 2010 Stig Moberg Printed by LiU-Tryck, Linköping, Sweden 2010
To Karin and John
Abstract Industrial robot manipulators are general-purpose machines used for industrial automation in order to increase productivity, flexibility, and product quality. Other reasons for using industrial robots are cost saving, and elimination of hazardous and unpleasant work. Robot motion control is a key competence for robot manufacturers, and the current development is focused on increasing the robot performance, reducing the robot cost, improving safety, and introducing new functionalities. Therefore, there is a need to continuously improve the mathematical models and control methods in order to fulfil conflicting requirements, such as increased performance of a weight-reduced robot, with lower mechanical stiffness and more complicated vibration modes. One reason for this development of the robot mechanical structure is of course cost-reduction, but other benefits are also obtained, such as lower environmental impact, lower power consumption, improved dexterity, and higher safety. This thesis deals with different aspects of modeling and control of flexible, i.e., elastic, manipulators. For an accurate description of a modern industrial manipulator, this thesis shows that the traditional flexible joint model, described in literature, is not sufficient. An improved model where the elasticity is described by a number of localized multidimensional spring-damper pairs is therefore proposed. This model is called the extended flexible joint model. The main contributions of this work are the design and analysis of identification methods, and of inverse dynamics control methods, for the extended flexible joint model. The proposed identification method is a frequency-domain non-linear gray-box method, which is evaluated by the identification of a modern six-axes robot manipulator. The identified model gives a good description of the global behavior of this robot. The inverse dynamics problem is discussed, and a solution methodology is proposed. This methodology is based on the solution of a differential algebraic equation (DAE). The inverse dynamics solution is then used for feedforward control of both a simulated manipulator and of a real robot manipulator. The last part of this work concerns feedback control. First, a model-based nonlinear feedback control (feedback linearization) is evaluated and compared to a model-based feedforward control algorithm. Finally, two benchmark problems for robust feedback control of a flexible manipulator are presented and some proposed solutions are analyzed.
v
Populärvetenskaplig sammanfattning Industrirobotar används inom många industrigrenar där bilindustrin är den största robotkunden. Andra industrier som har stora behov av robotar är halvledaroch elektronikindustrin, flygindustrin och livsmedelsindustrin. Exempel på nya tillämpningar för robotar är hantering av skärmar till platt-TV, tillverkning av solceller och solpaneler, samt sortering och paketering av läkemedel. Några typiska arbetsuppgifter för robotar i traditionell tillverkningsindustri är svetsning, målning, montering, laserskärning och materialbearbetning. Industrirobotar förekommer även inom nöjesindustrin, där de bland annat använts vid filminspelningar (Terminator Salvation), vid rock-konserter (Bon Jovi) och som avancerade nöjesfältsattraktioner (RoboCoaster). Det finns även exempel på att industrirobotar används inom sjukvården, t.ex. för rehabilitering av strokepatienter. Industrirobotar är med andra ord universalmaskiner och bara användarens fantasi begränsar möjligheterna! Totalt har mer än 2 miljoner industrirobotar levererats sedan introduktionen i slutet av 1960-talet och idag är mer än 1 miljon robotar i drift. Användning av robotar kan förstås minska antalet anställda inom industrin, men kan också skapa nya arbeten med ett bättre arbetsinnehåll och ta bort farliga, tunga och tråkiga arbetsuppgifter. Andra motiv för att använda robotar är ökad och jämn produktkvalitet och en effektivare produktion till en lägre kostnad. Eftersom robotar är omprogrameringsbara får man också, i jämförelse med fast automation, flexibilitet och möjligheter att ändra produktionen. Robotens hjärna är styrsystemet, vars datorer står för robotens intelligens och bland annat styr robotens rörelser. Den del av robotstyrsystemet som styr robotens rörelser brukar kallas rörelsestyrning, och dess huvuduppgift är att styra vridmomenten i robotens elektriska motorer så att de rörelser som robotanvändaren programmerat utförs med största möjliga snabbhet och precision. Vridmomenten styrs i sin tur genom reglering av strömmarna till de motorer som är driver robotarmarna via växellådor. För att kunna beräkna det vridmoment som behövs för att röra t.ex. en svetspistol på önskat sätt används matematiska modeller. Denna styrprincip kallas modellbaserad framkopplingsreglering. Eftersom modeller aldrig kan vara helt perfekta, och eftersom vissa saker inte kan modelleras, t.ex. att någonting stöter till roboten, krävs det också kunskap om robotens verkliga rörelse. En vanligt sätt att få denna kunskap är att mäta motorvinklarna. Denna mätning används av styrsystemet för att korrigera de vridmoment som modellerna räknat fram. Denna styrprincip kallas återkopplingsreglering. Även återkopplingsregleringen kan använda sig av styrsystemets modeller. Rörelsestyrningen för en robot kan liknas vid den mänskliga hjärnans styrning av grovoch finmotoriken med hjälp av erfarenhet och instinkt (framkoppling) och sinnesintryck (återkoppling). En trend inom industriell robotutveckling är att robotarna görs vigare och att dess vikt minskar relativt den last som roboten ska hantera. Detta ökar robotens användbarhet och minskar kostnader och energiförbrukning, men det gör också rörelsestyrningen betydligt svårare eftersom roboten totalt sett blir vekare. De vii
viii
Populärvetenskaplig sammanfattning
dominerande vekheterna (elasticiteterna) i en modern industrirobot finns hos växellådor, lager och robotarmar, men även underlaget som roboten är monterad på kan vara vekt. Problemet att styra en vek robot kan liknas vid att snabbt svinga ett metspö och att få toppen av metspöt att följa en viss bana och slutligen stanna på önskat ställe utan att svänga. En ökad intelligens i robotens rörelsestyrning är för dessa veka robotar helt avgörande för att kunna styra rörelserna med snabbhet och precision. Detta innebär att rörelsestyrningens intelligens också är avgörande för att kunna minska robotens tillverkningskostnad. Denna avhandling handlar om modellering och reglering av moderna industrirobotar. Det som behandlas är hur man med hög noggrannhet matematiskt skall beskriva veka robotar, hur man skall utföra mätningar på en robot för att anpassa de matematiska modellerna till verkligheten och hur man använder modellerna för att med framkoppling och återkoppling kunna styra en robot. Den första delen av avhandlingen presenterar en matematisk modell som kan beskriva elasticiteten i en modern industrirobot, samt beskriver metoder för att ta fram modellparametrar. Att ta fram värden på okända modellparametrar kallas ofta identifiering. Metoden bygger på att man styr robotens rörelser så att de vridmoment och rörelser som registreras kan användas för att räkna ut de okända modellparametrarna. Enkelt uttryckt så skakar man på roboten så att den avslöjar värdena på modellens fjädrar och dämpare. De modeller och identifieringsmetoder som redovisas i avhandlingen beskriver robotens vekhet på ett unikt bra sätt. Den andra delen av avhandlingen beskriver hur modellen kan användas i en modellbaserad framkopplingsreglering. Beräkningen av vridmoment, givet önskad robotrörelse, innebär lösandet av en differential-algebraisk ekvation (DAE). Denna ekvation är i detta fall mycket svår att lösa, och ett antal metoder för att lösa denna DAE föreslås och analyseras. De framtagna metoderna är alltför komplexa givet dagens datorkraft, men visar att problemet är lösbart. Metoderna kan också vara en utgångspunkt för att utveckla förenklade metoder som styrsystemets datorer har kapacitet att beräkna. Avhandlingen avslutas med en beskrivning av två specialanpassade matematiska robotmodeller och tillhörande krav på styrsystemet. En viktig egenskap för dessa modeller är att endast motorernas vinklar mäts, vilket är det normala fallet för moderna industrirobotar. Dessa s.k. benchmark-problem är tänkta att användas för utvärdering och utveckling av alternativa metoder för återkopplingsreglering, och att ge forskare inom området realistiska modeller med tillhörande industriella krav. Det första benchmark-problemet presenterades 2004 under namnet Svenska Mästerskapet i Robotreglering och attraherade deltagare från tre världsdelar. Slutsatsen av denna utvärdering är att återkopplingsregleringen måste få tillgång till mer information för att väsentligen kunna höja prestanda över dagens nivå. Denna information kan erhållas genom mätningar av t.ex. robotarmarnas eller verktygets positioner och accelerationer. Hur flera mätningar kan användas för reglering är ett viktigt område för de kommande årens robotforskning.
Acknowledgments First of all I would like to thank my supervisor Professor Svante Gunnarsson for helping me in my research, and for always finding time for a meeting in his busy schedule. This work has been carried out in the Automatic Control Group at Linköping University and I am very thankful to Professor Lennart Ljung for letting me join the group. I thank everyone in the group for the inspiring and friendly atmosphere they are creating. I especially thank Professor Torkel Glad for sharing his extensive knowledge and for his excellent graduate courses, Ulla Salaneck and Åsa Karmelind for their help with many practical issues, and Dr. Johan Sjöberg for interesting and helpful discussions. I am also thankful to all the people in the the Automatic Control Robotics Group, for their support, and also for their first class research cooperation with ABB Robotics. This work was supported by ABB Robotics, the Swedish Research Council (VR), and Vinnova, all gratefully acknowledged. At ABB Robotics, I would first of all like to thank the former head of controller development, Jesper Bergsjö, for supporting my research. The support from Niclas Sjöstrand, Henrik Jerregård, Wilhelm Jacobsson, and Staffan Elfving is also thankfully acknowledged. I am also greatly indepted to Dr. Torgny Brogård at ABB Robotics for the support and guidance he is giving me. Furthermore, I would like to thank all my other friends and colleagues at ABB Robotics for creating an atmosphere filled with great knowledge, but also with fun, two factors that provide a constant inspiration to my work. Among present and former colleagues, I would especially like to mention, in order of appearance, Ingvar Jonsson, Mats Myhr, Henrik Knobel, Lars Andersson, Sören Quick, Dr. Steve Murphy, Professor Mikael Norrlöf, Mats Isaksson, Professor Geir Hovland, Sven Hanssen, and Hans Andersson. I would also like to thank all master-thesis students whom I have had the privilege to supervise and learn from. My co-authors are also greatly acknowledged, Sven Hanssen for his complete devotion to mechatronics and, as an expert in modeling, being absolutely invaluable for my work, Professor Svante Gunnarsson and Dr. Torgny Brogård for guiding me in my work and keeping me on the right track, Dr. Jonas Öhr who inspired me to take up my graduate studies, and for inspiring discussions about automatic control, and finally Dr. Erik Wernholt for equally inspiring discussions about identification. I am also thankful to Professor Per-Olof Gutman at Israel Institute of Technology, for teaching me QFT in an excellent graduate course, as well as being inspirational in many ways. I am also very grateful to Dr. Torgny Brogårdh, Professor Svante Gunnarsson, Dr. Erik Wernholt, Professor Mikael Norrlöf, Dr. Jonas Öhr, Mats Isaksson, Sven Hanssen, Johanna Wallén, Dr. Tomas Olsson, Patrik Axelsson, André Carvalho Bittencourt, and Karin Moberg for reading different versions of this thesis, or parts thereof, and giving me valuable comments and suggestions. ix
x
Acknowledgments
Finally, I would like to thank my son John for programming of identification software, and for helping me with the cover design, and my wife Karin for, among many things, helping me with the English language, teaching me how to pronounce manipulator, trajectory, and accuracy, and for helping me structuring and shortening (?) my presentations. And to the both of you, as well as the rest of my immediate family, thanks for the love, patience, and support you are constantly giving me. Stig Moberg Linköping, December 2010
Contents
Notation
xvii
1 Introduction 1.1 Motivation and Problem Statement 1.2 Outline . . . . . . . . . . . . . . . . 1.2.1 Outline of Part I . . . . . . . 1.2.2 Outline of Part II . . . . . . 1.3 Contributions . . . . . . . . . . . .
. . . . .
1 1 4 4 4 9
2 Robotics 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Kinematic Models . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Motion Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 A General Motion Control System . . . . . . . . . . . . . . 2.3.2 A Model-Based Motion Control System for Position Control
13 13 15 15 15 16 16 19
3 Modeling of Robot Manipulators 3.1 Kinematic Models . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Position Kinematics and Frame Transformations 3.1.2 Forward Kinematics . . . . . . . . . . . . . . . . 3.1.3 Inverse Kinematics . . . . . . . . . . . . . . . . . 3.1.4 Velocity Kinematics . . . . . . . . . . . . . . . . . 3.2 Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 The Rigid Dynamic Model . . . . . . . . . . . . . 3.2.2 The Flexible Joint Dynamic Model . . . . . . . . 3.2.3 Nonlinear Gear Transmissions . . . . . . . . . . . 3.2.4 The Extended Flexible Joint Dynamic Model . . 3.2.5 Flexible Link Models . . . . . . . . . . . . . . . .
23 23 23 26 26 27 28 29 31 32 35 36
I
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
Overview
xi
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
xii
CONTENTS
3.3 The Kinematics and Dynamics of a Two-Link Elbow Manipulator .
38
4 Identification of Robot Manipulators 4.1 System Identification . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Nonparametric Models . . . . . . . . . . . . . . . . . . . . . 4.1.3 A Robot Example . . . . . . . . . . . . . . . . . . . . . . . . 4.1.4 Parametric Models . . . . . . . . . . . . . . . . . . . . . . . 4.1.5 Identification of Parametric Models . . . . . . . . . . . . . . 4.2 Identification of Robot Manipulators . . . . . . . . . . . . . . . . . 4.2.1 Identification of Kinematic Models and Rigid Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Identification of Elastic Dynamic Models . . . . . . . . . . 4.2.3 Identification of the Extended Flexible Joint Dynamic Model 4.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
55 56 58 58
5 Control of Robot Manipulators 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Control of Rigid Manipulators . . . . . . . . . . . . . . . 5.2.1 Feedback Linearization and Feedforward Control 5.2.2 Other Control Methods for Rigid Manipulators . 5.3 Control of Flexible Joint Manipulators . . . . . . . . . . 5.3.1 Feedback Linearization and Feedforward Control 5.3.2 Simplified Flexible Joint Model . . . . . . . . . . 5.3.3 Complete Flexible Joint Model . . . . . . . . . . 5.3.4 State Estimation . . . . . . . . . . . . . . . . . . . 5.3.5 Feedback Control . . . . . . . . . . . . . . . . . . 5.3.6 Minimum-Time Control . . . . . . . . . . . . . . 5.3.7 Experimental Evaluations . . . . . . . . . . . . . 5.4 Control of Flexible Link Manipulators . . . . . . . . . . 5.5 Industrial Robot Control . . . . . . . . . . . . . . . . . . 5.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
61 61 63 64 67 67 67 68 69 70 71 74 79 80 82 83
6 Conclusion 6.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
85 85 90
Bibliography
91
II
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
43 43 43 44 47 52 53 55
Publications
A Modeling and Parameter Estimation of Robot Manipulators using Extended Flexible Joint Models 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Robot Manipulator Model . . . . . . . . . . . . . . . . . . . . . . . 3 Parameter Estimation . . . . . . . . . . . . . . . . . . . . . . . . . .
105 107 109 112
xiii
CONTENTS
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Model Parameters and Model Structure Selection . . . . . . 3.3 Identification of unknown parameters . . . . . . . . . . . . 3.4 Handling of Nonlinearities and Unmodeled Dynamics . . . 4 A Simulation Study of the Attainable Parameter Estimation Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Experimental Model Structure Selection and Validation . . . . . . 6 Identification Using Added Robot Arm Sensors . . . . . . . . . . . 7 Time-Domain Validation . . . . . . . . . . . . . . . . . . . . . . . . 8 Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119 121 127 130 132 134
B Nonlinear Gray-Box Identification Using Local Models Applied to Industrial Robots 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Gray-Box Identification Using Local Models . . . . . . . . . . . . . 2.1 Linearized Gray-Box Model . . . . . . . . . . . . . . . . . . 2.2 Intermediate Local Models . . . . . . . . . . . . . . . . . . . 2.3 Proposed Identification Procedure . . . . . . . . . . . . . . 2.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 FRF Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Properties of Nonparametric FRF Estimates . . . . . . . . . 3.2 Excitation Signals . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Optimal Operating Points . . . . . . . . . . . . . . . . . . . 4 Parameter Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Weighted Nonlinear Least Squares . . . . . . . . . . . . . . 4.2 Weighted Logarithmic Least Squares . . . . . . . . . . . . . 4.3 Selection of Weights . . . . . . . . . . . . . . . . . . . . . . 4.4 Solving the Optimization Problem . . . . . . . . . . . . . . 4.5 Final Identification Procedure . . . . . . . . . . . . . . . . . 5 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Modeling of Robot Manipulators . . . . . . . . . . . . . . . 5.2 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 5.3 Identification of Simulated Robot . . . . . . . . . . . . . . . 5.4 Identification of Real Robot . . . . . . . . . . . . . . . . . . 6 A Small Comparison with Time Domain Identification . . . . . . . 7 Conclusions and Future Work . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
139 141 143 144 145 147 147 148 149 150 151 151 151 153 153 154 154 155 155 157 158 160 163 165 166
C Inverse Dynamics of Flexible Manipulators 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 2 The Extended Flexible Joint Model . . . . . . . . . . . . . 3 Inverse Dynamics for The Simplified Flexible Joint Model 4 Inverse Dynamics for The Extended Flexible Joint Model . 5 DAE Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 6 A Manipulator Model with 5 DOF . . . . . . . . . . . . . .
169 172 173 174 175 176 179
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
112 114 114 117
xiv
CONTENTS
7
Analysis of The Inverse Dynamics DAE . . . . . . . . . . . . . . . . 7.1 Analysis using The Kunkel and Mehrmann Hypothesis . . 7.2 Analysis by Differentiation . . . . . . . . . . . . . . . . . . . 7.3 Analysis by Differentiation and Introduction of Independent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Methods for Numerical Solution of DAEs . . . . . . . . . . . . . . . 8.1 Solving The Original High-Index DAE . . . . . . . . . . . . 8.2 Index Reduction and Dummy Derivatives . . . . . . . . . . 8.3 Numerical Solution Based on Kunkel and Mehrmann’s Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Numerical Solution of The Inverse Dynamics . . . . . . . . . . . . 9.1 Initial conditions and trajectory generation . . . . . . . . . 9.2 Numerical Solution of The Inverse Dynamics for The 5 DOF Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Inverse Dynamics for Non-Minimum Phase Systems . . . . . . . . 10.1 A Discretized DAE Optimization Solver . . . . . . . . . . . 10.2 Simulation with 5 DOF Model using The Discretized DAE Optimization Solver . . . . . . . . . . . . . . . . . . . . . . 10.3 A Continuous DAE Optimization Solver . . . . . . . . . . . 10.4 Simulation using The Continuous DAE Optimization Solver 11 Conclusion, Discussion, and Future Work . . . . . . . . . . . . . . 12 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
181 181 181
189 190 192 193 194 195
D Inverse Dynamics of Robot Manipulators Using Extended Flexible Joint Models 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 The Extended Flexible Joint Model . . . . . . . . . . . . . . . . . . 2.1 General Description . . . . . . . . . . . . . . . . . . . . . . . 2.2 A Manipulator Model with 5 DOF . . . . . . . . . . . . . . 3 Inverse Dynamics For The Extended Flexible Joint Model . . . . . 4 Numerical Solution of the Inverse Dynamics . . . . . . . . . . . . . 4.1 Minimum Phase Dynamics . . . . . . . . . . . . . . . . . . . 4.2 Non-Minimum Phase Dynamics . . . . . . . . . . . . . . . . 5 Simulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Initial Conditions and Trajectory Generation . . . . . . . . 5.2 Simulation of Minimum Phase System . . . . . . . . . . . . 5.3 Simulation of Non-Minimum Phase System . . . . . . . . . 6 Controllability and Solvability . . . . . . . . . . . . . . . . . . . . . 7 Experimental Evaluation . . . . . . . . . . . . . . . . . . . . . . . . 8 Conclusion, Discussion, and Future Work . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
199 202 203 203 206 208 211 211 212 214 214 214 217 220 222 225 227
182 182 183 183 184 184 184 185 188 188
E On Feedback Linearization for Robust Tracking Control of Flexible Joint Robots 231 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
CONTENTS
2 3
xv
Flexible Joint Robot Model . . . . . . . . . . . . . . . . . . . . . . . Feedback Linearization and Feedforward Control of a Flexible Joint Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Simulation Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Nominal Performance . . . . . . . . . . . . . . . . . . . . . 4.2 Robust Performance . . . . . . . . . . . . . . . . . . . . . . 4.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
235 236 238 240 242 242 245 247
F A Benchmark Problem for Robust Feedback Control of a Flexible Manipulator 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Original Control Problem . . . . . . . . . . . . . . . . . . . . . . . 3 The Benchmark Control Problem . . . . . . . . . . . . . . . . . . . 4 Model Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Frequency Response Estimation And Parameter Tuning . . 4.2 Disturbance Tests . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Stability Tests . . . . . . . . . . . . . . . . . . . . . . . . . . 5 The Control Design Task . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Load And Measurement Disturbances . . . . . . . . . . . . 5.2 Parameter Variations And Model Sets . . . . . . . . . . . . . 5.3 The Design Task . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Performance Measures . . . . . . . . . . . . . . . . . . . . . 5.5 Implementation and Specifications . . . . . . . . . . . . . . 6 Suggested Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
249 251 252 252 255 256 257 257 258 258 259 262 263 264 265 269 269 270
G A Benchmark Problem for Robust Control of a Multivariable Nonlinear Flexible Manipulator 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The Manipulator Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 The Benchmark System . . . . . . . . . . . . . . . . . . . . . . . . . 5 Model Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The Design Task: Performance Specification and Cost Function . . 7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
271 273 274 275 279 280 283 288 288 289
Notation
The same symbol can sometimes be used for different purposes. The main uses of a symbol are listed here, any deviations are explained in the text. Vectors are in general column vectors.
Symbols and Operators Notation Z N R C t s z q q−1 q qm qa qg qe τ τm τa τg τe p˙ p[n] X Z
Meaning The set of integers The set of natural numbers The set of real numbers The set of complex numbers Time variable Laplace transform variable z-transform variable Shift operator, qu(t) = u(t + Ts ) Backwards shift operator, q−1 u(t) = u(t − Ts ) Vector of motor and joint angular positions Vector of motor angular positions Vector of joint angular positions Vector of actuated joint angular positions Vector of non-actuated joint angular positions Torque vector Motor torque vector Joint torque vector Gearbox torque vector (actuated joints) Constraint torque vector (non-actuated joints) Time derivative of a variable p dnp The nth time derivative of a variable p, dt n Cartesian position and orientation of robot tool (TCP) Cartesian position and orientation of robot tool (TCP) xvii
xviii
Notation
Symbols and Operators (contd.) Notation u(t) y(t) z(t) x(t) pd Γ (q) J(q) M(q) Mm (q) Ma (q) ˙ c(q, q) g(q) m ξ J K D k d f (q) η Υa Υ na Ts θ θˆ ˆ y(t|t − Ts ; θ) ε(t, θ) arg minx f (x) Q N M P Nf Np nu ny σ
Meaning Vector of input signals at time t Vector of (measured) output signals at time t Vector of (controlled) output signals at time t State vector at time t Reference (desired) value for a variable p Forward kinematics ∂Γ (q) Velocity Jacobian ∂q Inertia matrix Inertia matrix of motors Inertia matrix of links (joints) Vector of Coriolis and centripetal torques Vector of gravity torques Mass of a rigid body Center of gravity (mass) of a rigid body Inertia tensor of a rigid body Stiffness matrix Damping matrix Spring constant, i.e., one element of K Damping constant, i.e., one element of D Friction torque Gear ratio matrix Number of actuated joints Number of non-actuated joints Sample time Vector of model parameters Estimated vector of model parameters A model’s prediction of y(t) given θ and data up to time t − Ts ˆ Prediction error y(t) − y(t|t − Ts ; θ) The value of x that minimizes f (x) Number of operating points Number of samples Number of experiments (or blocks of experiments for MIMO systems) Number of periods Number of excited frequencies Number of samples in one period Number of inputs Number of outputs Standard deviation
xix
Notation
Symbols and Operators (contd.) Notation U (ωk ) Y (ωk ) b(i) G k
(i)
Gk,θ (i)
Wk vec(B) VN (θ) θˆ N θ ν diag(a) ∈ |z| arg(z) ∂G(x) ∂x
det A Tr A AT A−1 AH
Meaning DFT of u(t) DFT of y(t) Non-parametric (estimated) FRF in operating point i at frequency k Parametric (model) FRF in operating point i at frequency k using model parameters θ Weighting matrix in operating point i at frequency k Stacks the columns bi of a matrix B into a column vector = [b1T b2T . . . bnT ]T Cost function or prediction error criterion Parameter estimator Position of robot tool in inverse dynamics papers Differential index of DAE A diagonal matrix with vector a on the diagonal Belongs to Absolute value of complex variable z Argument or phase of complex variable z Partial derivative of G with respect to x. Also denoted Gx . Determinant of matrix A Trace of matrix A Transpose of matrix A Inverse of matrix A Complex conjugate transpose of matrix A
Abbreviations Abbreviation e.g. i.e. BDF CAD DAE DFT DOF EE
Meaning for example in other words Backwards Differentiation Formula Computer Aided Design Differential Algebraic Equation Discrete Fourier Transform Degrees Of Freedom Elastic Element
xx
Notation
Abbreviations (contd.) Abbreviation ETFE FDB FEM FF FFT FFW FL FRF IRB ILC LLS LQ MIMO MP NLP NLS NMP ODE PDE PEM PD PI PID QFT RB SISO TCP
Meaning Empirical Transfer Function Estimate FeeDBack Finite Element Model FeedForward Fast Fourier Transform FeedForWard Feedback Linearization Frequency Response Function Industrial RoBot, used in names for ABB robots Iterative Learning Control Logarithmic Least Squares Linear Quadratic Multiple Input Multiple Output Minimum Phase NonLinear Program Nonlinear Least Squares Non-Minimum Phase Ordinary Differential Equation Partial Differential Equation Prediction Error Method Proportional and Derivative Proportional and Integral Proportional, Integral, and Derivative Quantitative Feedback Theory Rigid Body Single Input Single Output Tool Center Point
1
Introduction
Models of robot manipulators are important components of a robot motion control system. The control algorithms and the trajectory generation algorithms are two equally important components. This thesis deals with some aspects of modeling and control of flexible manipulators. Here, flexible should be interpreted as elastic, and a manipulator should be interpreted as an industrial robot although the results to some extent can be applied to other types of manipulators and mechanical systems.
1.1
Motivation and Problem Statement
Robot motion control is a key competence for robot manufacturers, and current development is focused on increasing the robot performance, reducing the robot cost, improving safety, and introducing new functionalities as described in Brogårdh (2007, 2009). There is a need to continuously improve the models and control methods in order to fulfil all conflicting requirements, for example, increased performance for a robot with lower weight, and thus lower mechanical stiffness and more complicated vibration modes. One reason for this development of the robot mechanical structure is of course cost reduction, but other benefits are lower power consumption, as well as improved dexterity, safety issues, and lower environmental impact. The need of cost reduction can result in the use of optimized robot components, which usually have larger individual variation, e.g., variation of gearbox stiffness or in the parameters describing the mechanical arm. Cost reduction sometimes also results in a higher level of disturbances and nonlinearities in some of the components, e.g., in the actuators or in the sensors. The development of industrials robots is illustrated in Figure 1.1 which shows that the robot weight to payload ratio has been reduced 3 times since the 1980’s. 1
2
1
Introduction
Figure 1.1: The development of large ABB robots. 1984: IRB90 1450 kg and payload 90 kg (16:1), 1991: IRB6000 1750 kg and payload 120 kg (15:1), 1997: IRB6400R 2100 kg and payload 200 kg (10.5:1), 2007: IRB6640 1300 kg and payload 235 kg (5.5:1)
An industrial robot is a general purpose machine for industrial automation, and even though the requirements of a certain application can be precisely formulated, there are no limits in what the robot users want with respect to the desirable performance and functionality of the motion control of a robot. The required motion control performance depends on the application. The better performance, the more applications can be subject to automation by a specific robot model. Some requirement examples are: • High path accuracy in continuous applications (e.g., laser welding, laser cutting, dispensing, or water-jet cutting). • High speed accuracy in continuous applications (e.g., painting or dispensing). • Low cycle time (high speed and acceleration) in discrete applications (e.g., material handling). • Small overshoots and a short settling time in discrete process applications (e.g., spot welding). • High control stiffness in contact applications (e.g., machining). For weight- and cost optimized industrial manipulators, the requirements above can only be handled by increased computational intelligence, i.e., improved motion control. Motion control of industrial robot manipulators is a challenging task, which has been studied by academic and industrial researchers for more than three decades. Some results from the academic research have been successfully implemented in real industrial applications, while other results are far away from being relevant to the industrial reality. To some extent, the development of motion control algorithms has followed two separate routes, one by academic
1.1
Motivation and Problem Statement
3
researchers and one by robot manufacturers, unfortunately with only minor interaction. The situation can partly be explained by the fact that the motion control algorithms used in the industry sometimes are regarded as trade secrets. Due to the tough competitive situation among robot manufacturers, the algorithms are seldom published. Another explanation is that the academic robot control researchers often apply advanced mathematics on a few selected aspects of relatively small systems, whereas the industrial robot researchers and developers must deal with all significant aspects of a complex system where the proposed advanced mathematics often cannot be applied. Furthermore, the problems that the robot industry sometimes present might include too much engineering aspects to be attractive for the academic community. Industrial robot research and development must balance short term against long term activities. Typical time constants from start of research to the final product, in the area of the motion control technology discussed in this work, can be between 5 and 10 years, and sometimes even longer. Thus, long-term research collaborations between industry and academia should be possible, given that the intellectual property aspects can be handled. The problems of how to get industrial-relevant academic research results, and of how to obtain a close collaboration between universities and industry, are not unique for robotics motion control. The existence of a gap between the academic research and industrial practise in the area of automatic control is often discussed. One balanced description on the subject can be found in Bernstein (1999), where it is pointed out that the control practitioners must articulate their needs to the research community, and that motivating the researchers with problems from real applications "can have a significant impact on increasing the relevance of academic research to engineering practise". Another quote from Bernstein (1999) is "I personally believe that the gap on the whole is large and warrants serious introspection by the research community". The problem is somewhat provocatively described in Ridgely and McFarland (1999) as, freely quoted, "what the industry in most cases do not want is stability proofs, guarantees of convergence and other purely analytical developments based on idealized and unrealistic assumptions". Another view on the subject is that "the much debated theory-applications gap is a misleading term that overlooks the complex interplay between physics, invention and implementation, on the one side, and theoretical abstractions, models, and analytical designs, on the other side" (Kokotovic and Arcak, 2001). The need for a balance between theory and practise is expressed in Åström (1994), and finally a quote from Brogårdh (2007): "industrial robot development has for sure not reached its limits, and there is still a lot of work to be done to bridge the gap between the academic research and industrial development". It is certainly true that, as in the science of physics, research on both "theoretical control" and "experimental control" is needed. The question is whether the proportions need adjustment. This subject is certainly an important one, as automatic control can have considerable impact on many industrial processes as well
4
1
Introduction
as on other areas, affecting both environmental and economical aspects. It is my hope that this work can help bridging the gap, as well as moving the frontiers somewhat in the area of robotics motion control. This thesis concerns modeling and control of flexible manipulators. Most publications concerning flexible (elastic) robot manipulators only consider elasticity in the rotational direction. If the gear elasticity is considered we get the flexible joint model, and if link deformation restricted to a plane perpendicular to the preceding joint is included in the model we get the flexible link model. These restricted models simplify the control design but limit the attainable performance. Motivated by the trend of developing light-weight robots, a new model, here called the extended flexible joint model, is proposed for use in motion control systems as well as in robot design and performance simulation. The use of this extended model is the main theme of this thesis, and the following aspects are treated: • Identification of the unknown elastic model parameters, applied to a real six-axes industrial robot. • Inverse dynamics to enable high-accuracy path tracking by the use of feedforward control. The remainder of this work deals with feedback control. For flexible joint models, feedback control for path tracking is investigated by comparing nonlinear feedback control to nonlinear feedforward control. Finally, two benchmark problems on robust feedback control are presented together with some suggested solutions.
1.2
Outline
Part I contains an overview of robotics, modeling, identification, and control. Part II consists of a collection of edited papers.
1.2.1
Outline of Part I
Chapter 2 gives an introduction to robotics in general, and the motion control problem in particular. Modeling of robot manipulators is described in Chapter 3, and some system identification methods that are relevant for this thesis are described in Chapter 4. A survey on control methods used in robotics can be found in Chapter 5. Finally, Chapter 6 provides a summary and some ideas for future research.
1.2.2
Outline of Part II
This part consists of a collection of edited papers, introduced below. Summary and background of each paper are given, together with the contribution of the author of this thesis.
1.2
Outline
5
Paper A: Modeling and Parameter Estimation of Robot Manipulators using Extended Flexible Joint Models
S. Moberg, E. Wernholt, S. Hanssen, and T. Brogårdh. Modeling and parameter estimation of robot manipulators using extended flexible joint models. 2010. Submitted to Journal of Dynamic Systems Measurement and Control, Transactions of the ASME. Summary: This paper considers the problem of dynamic modeling and identification of robot manipulators with respect to their elasticities. The so-called flexible joint model, modeling only the torsional gearbox elasticity, is shown to be insufficient for modeling a modern industrial manipulator accurately. The extended flexible joint model, where non-actuated joints are added to model the elasticity of the links and bearings, is used to improve the model accuracy. The unknown elasticity parameters are estimated using a frequency domain gray-box identification method. A detailed description of this method is provided in Paper B. Similar elasticity model parameters are obtained when using two different output variables for the identification, the motor position and the tool acceleration respectively. A brief time-domain model validation is also presented. Background and contribution: The basic idea of extending the flexible joint model for a better description of modern light-weight manipulators is mainly due to the author and Sven Hanssen. These two also performed the first promising attempt to identify the model by use of frequency-domain methods. The research was continued by the authors of Öhr et al. (2006) where the use of the nonparametric frequency response function (FRF) for the estimation of the parametric robot model was first described. Erik Wernholt has continued to improve and analyze various aspects of the identification procedure as described in Wernholt (2007). The improvements of the identification procedure presented in this paper is due to the author and Erik Wernholt, the model equations are derived by Sven Hanssen, and the simulated and experimental evaluation were performed by the author. Torgny Brogårdh has throughout this whole work served as a most valuable discussion partner. Paper B: Nonlinear Gray-Box Identification Using Local Models Applied to Industrial Robots
E. Wernholt and S. Moberg. Nonlinear gray-box identification using local models applied to industrial robots. Automatica, 2010. Accepted for publication. Summary: This paper studies the problem of estimating unknown parameters in nonlinear gray-box models that may be multivariable, nonlinear, unstable, and resonant at the same time. A straightforward use of time-domain predicationerror methods for this type of problem easily ends up in a large and numerically stiff optimization problem. An identification procedure, that uses intermediate local models that allow for data compression and a less complex optimization problem, is therefore proposed. The procedure is illustrated by estimating elastic-
6
1
Introduction
ity parameters in a six-axes industrial robot. Different parameter estimators are compared and experimental results show the usefulness of the proposed identification procedure. A brief example of time-domain identification is also presented and compared to the suggested frequency-domain method. Background and contribution: The basic idea of using the nonparametric FRF for the estimation of the parametric robot model is due to the author and Sven Hanssen as previously described. The research was continued by the authors of Öhr et al. (2006). Erik Wernholt has continued to improve and analyze various aspects of the identification procedure as described in Wernholt (2007) where the author has served as a discussion partner. The first theoretical part of this paper is mainly due to Erik Wernholt, whereas the second part with simulation and experimental results is mainly due to the author. The time-domain example is also performed by the author. Paper C: Inverse Dynamics of Flexible Manipulators
S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009. Summary: This paper investigates different methods for the inverse dynamics of the extended flexible joint model. The inverse dynamics solution is needed for feedforward control, which is often used for high-precision robot manipulator control. The inverse dynamics of the extended flexible joint model can be computed as the solution of a high-index differential algebraic equation (DAE) and different solvers are suggested and evaluated. The inverse dynamics can be solved as an initial-value problem if the zero dynamics of the system is stable, i.e., minimum phase. For unstable zero dynamics, an optimization approach based on the discretized DAE is suggested. An collocation method, using a continuous DAE formulation, is also suggested and evaluated. The solvers are illustrated by simulation, using a manipulator with two actuators and five degrees-of-freedom. Background and contribution: The DAE formulation of the inverse dynamics problem was the result of a discussion between the author and Sven Hanssen. Sven Hanssen derived the simulation model, and the author has made the control research and implemented the DAE solvers that are used. Sven Hanssen has been a discussion partner for this part of the work and also derived and analyzed alternative solvers together with the author. Paper D: Inverse Dynamics of Robot Manipulators Using Extended Flexible Joint Models
S. Moberg and S. Hanssen. Inverse dynamics of robot manipulators using extended flexible joint models. 2010. Submitted to IEEE Transactions on Robotics (under revision). Summary: This article is based on Paper C. The suggested concept for inverse dynamics is experimentally evaluated using an industrial robot manipulator. In
1.2
Outline
7
this experimental evaluation, an identified model is used in the inverse dynamics computation. Simulations using the same identified model are in good agreement with the experimental results. The conclusion is that the extended flexible joint inverse dynamics method can improve the accuracy for manipulators with significant elasticities, that cannot be described by the flexible joint model. Background and contribution: The background and contribution concerning the problem formulation and the suggested solvers are as described previously for Paper C. The experimental evaluation was performed by the author and Sven Hanssen. Paper E: On Feedback Linearization for Robust Tracking Control of Flexible Joint Robots
S. Moberg and S. Hanssen. On feedback linearization for robust tracking control of flexible joint robots. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. Summary: Feedback linearization is one of the major academic approaches for controlling flexible joint robots. This contribution investigates the discrete-time implementation of the feedback linearization approach on a realistic three-axis robot model. A simulation study of high speed tracking with model uncertainty is performed. The feedback linearization approach is compared to a feedforward approach. Background and contribution: The feedback linearization for flexible joint robots was first presented in Spong (1987). After attending a workshop on nonlinear control of flexible joint robots, the author and Sven Hanssen discussed the lack of (published) evaluations of this control concept. This paper uses a realistic manipulator model and realistic requirements to evaluate the proposed concept in a simulation study. The author was responsible for the implementation of the control schemes, control analysis and performance evaluation. Sven Hanssen derived the simulation model and the model derivatives, needed for the implementation of the control algorithms. Paper F: A Benchmark Problem for Robust Feedback Control of a Flexible Manipulator
S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. IEEE Transactions on Control Systems Technology, 17(6):1398–1405, November 2009. Summary: This paper describes a benchmark problem for robust feedback control of a flexible manipulator together with some proposed and tested solutions. The system to be controlled is a four-mass system subject to input saturation, nonlinear gear elasticity, model uncertainties, and load disturbances affecting both the motor and the arm. The system should be controlled by a discrete-time controller that optimizes the performance for given robustness requirements.
8
1
Introduction
Background and contribution: The benchmark problem was first presented as Swedish Open Championships in Robot Control (Moberg and Öhr, 2004, 2005) where the author formulated the problem together with Jonas Öhr. The analysis of the solutions, as well as the experimental validation of the benchmark model, were performed mainly by the author. The final paper as presented in this thesis also includes Svante Gunnarsson as a valuable discussion partner and co-author. Paper G: A Benchmark Problem for Robust Control of a Multivariable Nonlinear Flexible Manipulator
S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. Summary: This paper describes a benchmark problem for robust feedback control of a two link manipulator with elastic gear transmissions. The gear transmission is described by nonlinear friction and elasticity. The system is uncertain according to a parametric uncertainty description and due to uncertain disturbances affecting both the motors and the tool. The system should be controlled by a discrete-time controller that optimizes performance for given robustness requirements. The proposed model is validated by experiments on a real industrial manipulator. Background and contribution: This benchmark problem is a continuation of the problem presented in Paper F, using a more complex and realistic model, and with a more challenging design task. The author contributed to the majority of this work with Jonas Öhr and Svante Gunnarsson as valuable discussion partners. Related Publications
Publications of related interest not included in this thesis, where the author of this thesis has contributed: T. Brogårdh, S. Moberg, S. Elfving, I. Jonsson, and F. Skantze. Method for supervision of the movement control of a manipulator. US Patent 6218801, April 2001. URL http://www.patentstorm.us/patents/ 6218801. T. Brogårdh and S. Moberg. Method for determining load parameters for a manipulator. US Patent 6343243, Januari 2002. URL http: //www.patentstorm.us/patents/6343243.html. G.E. Hovland, S. Hanssen, E. Gallestey, S. Moberg, T. Brogårdh, S. Gunnarsson, and M. Isaksson. Nonlinear identification of backlash in robot transmissions. In Proc. 33rd ISR (International Symposium on Robotics), Stockholm, Sweden, October 2002. S. Moberg and J. Öhr. Robust control of a flexible manipulator arm: A benchmark problem. Prague, Czech Republic, 2005. 16th IFAC World Congress.
1.3
Contributions
9
S. Gunnarsson, M. Norlöf, G. Hovland, U. Carlsson, T. Brogårdh, T. Svensson, and S. Moberg. Pathcorrection for an industrial robot. US Patent 7130718, October 2006. URL http://www.patentstorm.us/patents/ 7130718.html. J. Öhr, S. Moberg, E. Wernholt, S. Hanssen, J. Pettersson, S. Persson, and S. Sander-Tavallaey. Identification of flexibility parameters of 6axis industrial manipulator models. In Proc. ISMA2006 International Conference on Noise and Vibration Engineering, pages 3305–3314, Leuven, Belgium, September 2006. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372– 15380, Seoul, Korea, July 2008a. E. Wernholt and S. Moberg. Experimental comparison of methods for multivariable frequency response function estimation. In 17th IFAC World Congress, pages 15359–15366, Seoul, Korea, July 2008b. M. Björkman, T. Brogårdh, S. Hanssen, S.-E. Lindström, S. Moberg, and M. Norrlöf. A new concept for motion control of industrial robots. In Proceedings of 17th IFAC World Congress, 2008, Seoul, Korea, July 2008. R. Henriksson, M. Norrlöf, S. Moberg, E. Wernholt, and T. Schön. Experimental comparison of observers for tool position estimation of industrial robots. In Proceedings of 48th IEEE Conference on Decision and Control, pages 8065–8070, Shanghai, China, December 2009.
1.3
Contributions
The main contributions of the thesis are: • The extended flexible joint model presented in Öhr et al. (2006) and Moberg and Hanssen (2007) and validated in Paper A. • The identification procedure introduced in Öhr et al. (2006) and further described in Papers A and B. The procedure has been successfully applied to experimental data from a six-axes industrial robot. • The DAE formulation of the inverse dynamics problem for the extended flexible joint model as described in Paper C and D. • The solution method for the inverse dynamics problem of the extended flexible joint model, and its application on a small but realistic robot model.
10
1
Introduction
This is also described in Papers C and D. • The experimental evaluation of the inverse dynamics method as described in Paper D. • The evaluation of feedback linearization as described in Paper E. • The formulation and evaluation of a relevant industrial benchmark problem as described in Paper F. • The formulation of a second relevant industrial benchmark problem as described in Paper G. Solutions to the problem are planned to be published in the future. The model is available for download at Moberg (2007), and has also been used by other researchers for various purposes.
Part I
Overview
2
Robotics
Robotics involves many technical and scientific disciplines, for example, sensorand vision technologies, computer architecture, drive systems and motor technologies, real time systems, automatic control, modeling, mechanical design, applied mathematics, man-machine interaction, system communication, and computer languages. This chapter gives a short introduction describing the parts that are relevant for this work, i.e., modeling and motion control.
2.1
Introduction
Throughout this work, the term robot is used to denote an industrial robot, i.e., a manipulator arm, mainly used for manufacturing in industry. Some examples of such robots are shown in Figure 2.1. The first industrial robots were installed in the 1960s and the number of operational industrial robots at the end of 2009 was in the range of 1, 021, 000 to 1, 300, 000 units (IFR, 2010). Robots are used for a variety of tasks, for example, welding, painting, cutting, dispensing, material handling, machine tending, machining, and assembly. There are many types of mechanical robot structures such as the parallel arm robot and the articulated robot, which can be of elbow or parallel linkage type. Examples of these three robot structures are shown in Figure 2.2. Further examples of mechanical robot structures (also called kinematic structures) can, e.g., be found in Spong et al. (2006). In the following, the presentation will be restricted to the, at present, most common type of industrial robot which is the six-axes articulated robot of elbow type. This robot, or manipulator arm, consists of seven serially mounted bodies connected by six revolute joints. The bodies are numbered from 0 to 6, and body 1 to 6 are also called links. The links and the joints are numbered from 1 to 6. The links are actuated by electrical motors via gear transmissions (gearboxes), 13
14
2
Robotics
Figure 2.1: ABB robot family and the IRC5 controller.
Figure 2.2: Three examples of robot structures from ABB. The parallel arm robot IRB340 (left), the parallel linkage robot IRB4400 (middle), and the elbow robot IRB4600 (right).
2.2
15
Models
also named speed reducers. The motor positions are measured by sensors. The first body is connected to the base, and the last body (link) is connected to an end effector, i.e., a tool. With six actuated links, both the position and the orientation of the end effector can be controlled. The first three joints and links are often denoted main axes, and the last three are denoted wrist axes.
2.2
Models
A description of the most important models used in robotics can be found in, e.g., Craig (1989), Spong et al. (2006), Siciliano and Khatib (2008), and Siciliano et al. (2010). Here follows a short overview.
2.2.1
Kinematic Models
The kinematic models describe the robot motions without regard to the forces that cause the motions, i.e, all time-based and geometrical properties of the motion. The kinematics relate the joint angular position vector q to the position p and orientation φ of the tool frame attached to the tool and positioned in the tool center point (TCP). One example of a kinematic relation is the forward kinematics where the tool frame position and orientation are described as a function of the joint angular position vector as X = Γ (q),
(2.1)
where X is the tool frame position and orientation, also named pose, defined as " # p X= , (2.2) φ and Γ ( · ) is a nonlinear function. The tool frame is described in a reference frame, i.e., a coordinate system, attached to the base of the robot, called base frame. Describing the manipulator pose by the joint angles is often denoted a joint space representation of the robot state while describing it by the tool position and orientation is denoted a task space representation which is usually implemented in Cartesian coordinates. The described frames and the joint positions are illustrated in Figure 2.3.
2.2.2
Dynamic Models
Dynamic robot models describe the relations between the motions of the robot and the forces that cause the motions. The models are most often formulated in joint space. One example of a dynamic model is the model of a rigid manipulator which can be expressed as ˙ + g(q) + f (q), ˙ τ = M(q)q¨ + c(q, q)
(2.3)
˙ is a vector where τ is the actuator torque vector, M(q) is the inertia matrix, c(q, q) ˙ is of Coriolis and centripetal torques, g(q) is the gravity torque vector, and f (q) the vector of, possibly nonlinear, joint friction torques. The rigid body inertial
16
2
Robotics
Figure 2.3: Base frame, tool frame, and joint positions illustrated on a robot equipped with a spotwelding gun.
parameters for each link are the mass, the center of mass, and the inertia. The actuator inertia and mass are added to the corresponding link parameters. The inverse dynamics problem is useful for control, and consists of computing the required actuator torques as a function of the joint position vector q and its ¨ For the rigid model (2.3), this involves algebraic computime derivatives, q˙ and q. tations only. For simulation of the manipulator movement, the direct dynamics problem must be solved. The differential equation (2.3) is then solved with the actuator torques as input.
2.3
Motion Control
The motion control of a modern industrial manipulator is a complex task. A description of the current status of industrial robot motion control can be found in Brogårdh (2007, 2009), and references therein.
2.3.1
A General Motion Control System
A general robot motion control system, capable of synchronously controlling n robot manipulators, is illustrated in Figure 2.4. The system consists of the following components: Robot 1, Robot 2, ..., Robot n The robot manipulators with actuators and sensors included. The manipulators can be in contact with the environment,
2.3
Motion Control
17
Figure 2.4: A general robotics motion control system. e.g., in assembly tasks, or operate in free space without contact with the environment, e.g., in laser cutting. The sensors can be of different types. A first type of sensors generates sensor readings ya which are used by the feedback controller. Examples of such sensors are encoders or resolvers measuring actuator positions, accelerometers measuring link and tool acceleration, force sensors1 measuring the contact forces acting on the end effector, torque sensors measuring the joint torques on the link side of the gearbox, and joint encoders measuring the joint positions. The second type of sensor information, yb , can be exemplified by conveyor positions measured by encoders, or the position of an arc-welding gun relative to the desired welding path as measured by a tracking sensor. The second type of sensors are used by the trajectory interpolator and the controller to adapt the robot motion to the measured path. A third type of sensors are primarily used by the trajectory planner, e.g., in the case of a vision system specifying the position of an object to be gripped by the robot. Some of the robots in Figure 2.4 could also be replaced by multi- or single-axis positioners used for, e.g., rotating the object in an arc-welding application. Controller 1, Controller 2, ..., Controller n Generate control signals u(t) for the actuators with the references Xd (t) and the sensor readings ya (t) as inputs. The controller can operate in position control mode for point-to-point motion in, e.g., a spot-welding application, or continuous path tracking in, e.g., a dispensing application. When the robot is in contact with the environment, the controller can still be in position control mode, e.g., in premachining applications. Some contact applications require a compliant behavior of the robot due to uncertain geometry or process requirements. This 1 The sensor is called force sensor for simplicity, even though both forces and torques are normally measured.
18
2
Robotics
requires a controller in compliance control mode for some directions, and position control mode for other directions in task space. Examples of these applications, using compliance control, are assembly, machine tending, and product testing. In other applications as friction stir welding, grinding, and polishing, the contact force must be controlled in a specific direction while position or speed control is performed in the other directions. Compliance and force control can be accomplished with or without the use of force sensors, depending on the performance requirements. Trajectory Interpolator The task of the trajectory interpolator is to compute controller references Xd (t) that follow the programmed trajectory and which simultaneously are adapted to the dynamic performance of the robot. The input from the trajectory planner is the motion specification, e.g., motion commands specifying a series of end effector positions xi along with desired end effector speeds vi . Sensor readings yb (t) and yc (t) can also be used by the trajectory interpolator. The trajectory Xd (t) contains positional information for all n robots, and can be expressed in Cartesian or joint space. Trajectory Planner Specifies the desired motion of the robot end effector. This can be done manually by a robot programmer who specifies the motion in a robot programming language with a series of motion commands. The program can be taught by moving the robot to the desired positions and command the robot to read the actual positions. The motion commands can also be generated by an off-line programming system. The desired motion can also be expressed on a higher level by task programming as, e.g., by an instruction as picking all objects on a moving conveyor, and placing the objects in desired locations. The positions for picking the objects is then specified by a vision system. Besides the basic motion control functionality as described in Figure 2.4, the robot motion control also includes, for example, the following functionality: Absolute Accuracy Identification of the link parameters for an extended kinematic model in order to obtain high volumetric accuracy. This is useful for off-line programming and for fast robot replacement (Brogårdh, 2007). ILC Iterative learning control for improved path accuracy, used, e.g., for high precision laser cutting (Norrlöf, 2000; Gunnarsson et al., 2006). Load Identification Identification of user tool and load to improve the dynamic model accuracy for high control performance, and to avoid overload of the robot mechanics (Brogårdh and Moberg, 2002). Collision Detection Model based collision detection to save equipment at accidental robot movements, for example during programming (Brogårdh et al., 2001). Diagnosis Diagnosis of the status and behavior of, e.g., gearboxes and mechanical brakes.
2.3
Motion Control
19
Figure 2.5: A simplified robotics motion control system. Special Control Modes One example is emergency stop control modes where the mechanical brakes and the motors are used simultaneously to stop the robot. Another example from ABB is WristMove, where the robot accuracy in cutting applications is increased by moving the wrist axes only (Jerregård and Pihl, 2007). Supervision Supervision of, e.g., position and speed for safety reasons, and for saving equipment on and close to the robot. Calibration Calibration methods for, e.g., tool frame or actuators. Autotune Methods Methods for adapting model parameters or controller tuning to a specific robot individual or installation.
2.3.2
A Model-Based Motion Control System for Position Control
A simplified outline of a motion control system is shown in Figure 2.5. The system controls one robot manipulator in position control mode. The trajectory interpolator and the controller make an extensive use of models, hence this type of control is denoted model-based control. The system has the following components: Robot Manipulator The physical robot arm with actuators receiving the control signal u(t) from the controller. The control signal can be, e.g., a torque reference to a torque controller, a velocity reference to a velocity controlled actuator or a three-phase current to an electrical motor. Throughout this work, the torque control is assumed to be ideal and a part of the actuator, which has been proven by experiments to be a reasonable assumption for most of the ABB robots. Hence, the control signal u(t) will be a motor torque reference. The sensor readings y(t) are normally the actuator positions only, but more sensors can be added as described in the previous section. Models The models used by the motion control system, e.g., the kinematic and dynamic models described previously. The models and how to obtain the model parameters will be further described in Chapters 3 – 4. Controller Generates control signals u(t) for the actuators with the references
20
2
Robotics
Xd (t) and the sensor readings y(t) as input. The controller can be split into a feedback controller and a feedforward controller, and will be further described in Chapter 5. Trajectory Interpolator Creates a reference Xd (t) for the controller with the user program as input. The first step of the trajectory interpolation could be to compute the continuous geometric path Xd (γ) where γ is a scalar path parameter, e.g., the distance along the path. The second step of the interpolation is to associate a timing law to γ and obtain γ(t). In this way, the path Xd (γ) is transformed to a time determined trajectory Xd (γ(t)) = Xd (t). Note that the speed and acceleration as well as higher order derivatives of the path, are completely determined once the trajectory is computed. The trajectory interpolator is responsible for limiting the speed and acceleration of the trajectory, to make it possible for the robot to dynamically follow the reference without actuator saturations. The requirement of path smoothness depends on the controller used and on the requested motion accuracy. One example of smoothness requirement is that the acceleration derivative, also called jerk, is limited. User Program The desired motion of the robot end effector is specified by a series of motion commands in the user program. In the example program, the command MoveL x2,v2 specifies a linear movement of the end effector to the Cartesian position x2 with velocity v2. The movement starts in the end position of the previous instruction, i.e. x1. Generally, the movement can be specified in joint space or in Cartesian space. In joint space the positions are described by the joint angular positions, and in Cartesian space by the Cartesian position and orientation of the end effector. The movement in Cartesian space can typically be specified as linear or circular. In reality, more arguments must be attached to the motion command to specify, e.g., behavior when the position is reached (stop or make a smooth direction change to the next specified position), acceleration (do not exceed 5 m/s2 ), and events (set digital output 100 ms before the endpoint is reached). The ultimate requirements on the described motion control system can be summarized as follows: Optimal Time Requirement The user-specified speed must only be reduced if the robot movements are limited mechanically or electrically by the constraints from the robot components. Some examples of component constraints are maximum motor and gearbox torques, maximum motor speed, and maximum allowed forces and torques acting on the manipulator links. Note that the acceleration is always limited due to actuator constraints and that the user can add more constraints, for example, maximum allowed acceleration along the path. Optimal Path Requirement The user-specified path must be followed with specified precision, also under the influence of different uncertainties. These uncertainties are disturbances acting on the robot and on the measurements,
2.3
Motion Control
21
as well as uncertainties in the models used by the motion control system. If these two requirements are fulfilled, the cycle-time performance of the robot depends entirely on the electromechanic components such as gearboxes, mechanical links, actuators, and power electronics. Generally, a given performance requirement can be fulfilled either by improving the electromechanics or by improving the computational intelligence of the software, i.e., improving the models, the control algorithms, and the trajectory optimization algorithms. The possibilities to use electromechanic or software solutions to fulfil performance requirements can be illustrated by two simple examples: • Requirement: Path accuracy of 0.5 mm. – Electromechanic solution: Design the robot with a stiffer mechanical arm including bearings and gearboxes. – Software solution: Improve the models and control algorithms, i.e., a higher degree of fulfillment of the optimal path requirement. • Requirement: The robot task must be accomplished in 10 s. – Electromechanic solution: Increase the power and torque of the drivetrain, i.e., the motors, gearboxes, and power electronics. – Software solution: Improve the trajectory optimization algorithms and the models used, i.e., a higher degree of fulfillment of the optimal time requirement. A higher degree of fulfilment of the two requirements using software solutions means more complexity in the software and algorithms and, of course, more computational power. This means a more expensive computer in the controller, and initially, a longer development time. However, the trend of moving functionality from electromechanics to software will certainly continue due to the continuing development of low-cost computer hardware and efficient methods for developing more and more complex real-time software systems. However, in every product development project, there is an trade-off between electromechanics cost, i.e., the cost of gearboxes, mechanical arm, actuators, and power electronics, and the software cost2 , i.e., the cost of computers, memory, sensors, and motion control development. To make cost optimization of robot systems, including robot electromechanics and controller software, for a spectrum of different applications, is a very difficult task. How this task is solved varies a lot from one robot manufacturer to another. However, moving as much as possible of the performance enhancement to the controller software must be regarded as the ultimate goal for any robot motion control system. Besides cost there is of course also a matter of usability which 2 Software is not used in the normal sense here and the software cost could also be denoted the motion control cost. Cost of brain could also be used, and in that case, the electromechanics cost could be denoted the cost of muscles.
22
2
Robotics
increases with the level of computational intelligence, e.g., easy programming and facilitation of advanced applications. The optimal time requirement is mainly a requirement on the trajectory interpolator and the optimal path requirement is mainly a requirement on the controller. Accurate models are necessary for the fulfilment of both requirements. One small example of minimum-time trajectory generation can be found in Section 5.3.6. The fulfilment of the second requirement, i.e., the optimal path requirement, is the subject of this work, and the next two chapters will treat the modeling aspects of robotics.
3
Modeling of Robot Manipulators
This chapter describes the models that are relevant for this work, namely the kinematic and dynamic models of a serial link robot of elbow type.
3.1
Kinematic Models
The kinematic models describe the motion without regard to the forces that cause it, i.e, all time-based and geometrical properties of the motion. The position, velocity, acceleration, and higher order derivatives are all described by the kinematics. A thorough description of kinematic models can be found in Craig (1989), Spong et al. (2006), Siciliano and Khatib (2008), and Siciliano et al. (2010).
3.1.1
Position Kinematics and Frame Transformations
The serial N-link robot has N + 1 serially mounted rigid bodies connected by N revolute joints. The rigid bodies are numbered from 0 to N , rigid body 0 is connected to the base, and rigid body N is connected to an end effector, i.e., a tool. Rigid body 1 to N are also called links and are actuated by electrical motors via gear transmissions. The joints are numbered from 1 to N and joint i connects link i − 1 to link i. The motor positions are measured by sensors1 . With N ≥ 6 actuated links, both the position and the orientation of the end effector can be fully controlled. The joint angular position vector, or joint angles, q ∈ RN , describe the configuration or position of the manipulator. The position of the tool is described by attaching a coordinate system, or frame, fixed to the tool. The tool 1 The motor position sensor is usually an encoder or a resolver.
23
24
3
Modeling of Robot Manipulators
Figure 3.1: A robot in a work-cell with the standard frames, as defined by ABB, used in cell modeling illustrated. pose is then described by the position p ∈ R3 and orientation2 φ ∈ R3 of this tool frame. The origin of the tool frame is known as the tool center point (TCP). The tool frame position is described relative to the base frame, attached to the base of the robot. Describing the manipulator position by the joint angles q is often denoted a joint space description, while describing it by the tool position p and orientation φ is denoted a task space description3 . The position kinematics relates the joint space to the task space. For a manipulator with gearboxes, the actuator space can also be defined. The actuator position q˜ is related to the joint position q by q˜ = ηq,
(3.1)
where η is a (possibly non-diagonal) matrix of gear ratios. A robot with the described frames and the joint positions is illustrated in Figure 3.1. The other frames in the figure are typical frames used for work-cell modeling, to simplify the robot programming task4 : 2 There are several possible representations of orientation. Here, a minimal representation of orientation is assumed. One minimal representation is the use of three Euler angles (e.g., roll-pitch-yaw) although it suffers from mathematical singularities. These singularities can be avoided with a four component unit quaternion representation. The orientation can also be represented by a rotational matrix R ∈ SO(3). Different representations of orientation is described in Siciliano and Khatib (2008). 3 Task space is sometimes called operational space or Cartesian space. Joint space is also called configuration space. 4 Different robot manufacturers have slightly different concepts and naming conventions for the frames used in cell modeling. In this text, the ABB frame concept and names are used.
3.1
25
Kinematic Models
Figure 3.2: Standard frames. • World frame is the common reference frame in a work cell, used by all robots, positioners, conveyors, and other equipment. • Base frame describes the position and orientation of the base of a robot. • Wrist frame is attached to the mounting flange of the robot. • Tool frame describes the tool position and orientation. • User frame describes a task relevant location. • Object frame describes an object relative to the task-relevant location. • Work object frame is the object frame as seen from the world frame, i.e., defined by user frame and object frame. • Displacement frame describes locations inside an object. • Target frame (or programmed position) is where the tool frame eventually should be positioned. The position and orientation of frame B can be described relative to frame A by a homogenous transformation A B T describing the translation and rotation required to move from A to B. Homogenous transformations are described in the general references given, e.g., Siciliano and Khatib (2008). Figure 3.2 shows the standard frames and the chains of transformations describing the frame positions. Note that, e.g., the user frame can be defined on a positioner, on another robot, or on a conveyor. This means that the transformation from world frame to user frame can be time-varying, defined by, e.g., the kinematics of the external positioner. The base frame can also be time-varying if, e.g., the robot base is moved by a track motion as illustrated in Figure 3.3. The desired position of the tool frame is described in the robot programs as a target frame. The target frame, which should be equal to the tool frame when the position is reached, can then be described
26
3
Modeling of Robot Manipulators
Figure 3.3: A robot moved by a track motion. in the base frame using the chain of transformations. For some applications, a room-fixed TCP is convenient. Here, the tool is fixed and the work object frame is moved by the robot.
3.1.2
Forward Kinematics
The forward kinematics problem is, given the joint angles, to compute the position and orientation of the tool frame relative to the base frame, or X = Γ (q, θkin ), where X is the tool frame position and orientation defined as " # p , X= φ
(3.2)
(3.3)
and Γ ( · ) is a nonlinear function. θkin is a vector of fixed kinematic link parameters which, together with the joint positions, describe the relation between the base frame, frames attached to each link, and the tool frame. θkin consists of parameters5 representing arm lengths and angles describing the rotation of each joint axis relative to the previous joint axis.
3.1.3
Inverse Kinematics
The inverse kinematics problem is, given the position and orientation of the tool frame, to compute the corresponding joint angles. The inverse kinematics problem is considerably harder than the forward kinematics problem6 , where a unique closed form solution always exists. Some features of the inverse kinematics problem are: • A solution may not exist. The existence of a solution defines the workspace 5 A well known parametrization of θ kin are the so called Denavit-Hartenberg parameters. 6 This is true for the serial link manipulator considered here. For a parallel arm robot, the situation
is the opposite.
3.1
27
Kinematic Models
of a manipulator. The workspace is the volume which the end effector of the manipulator can reach7 . • If a solution exists, it may not be unique. One example of multiple solutions is the elbow-up and elbow-down solutions for the elbow manipulator. There can even exist an infinite number of solutions, e.g., in the case of a kinematically redundant manipulator. In this case the number of link degrees-of-freedom (DOF)8 is greater than the number of tool DOF, e.g., N > 6 for a tool which can be oriented and positioned arbitrarily. An example of a redundant system is the robot moved by a track motion in Figure 3.3, having totally 7 degrees-of-freedom. Methods for selecting one of many possible solutions are often needed, and each solution is then usually said to represent a particular robot configuration. • The solution can be hard to obtain, even though it exists. Closed-form solutions are preferred, but for certain manipulator structures, only numerical iterative solutions are possible. The inverse kinematics can be expressed as q = Γ −1 (X, C, θkin ),
(3.4)
where C is some information used to select a feasible solution. One alternative is to let C be parameters describing the desired configuration. Another alternative is to let C be the previous solution, and to select the new solution as the, in some sense, closest solution.
3.1.4
Velocity Kinematics
The relation between the joint velocity q˙ and the Cartesian velocity X˙ is determined by the velocity Jacobian J of the forward kinematics relation ∂Γ (q) ˙ X˙ = q˙ = J(q)q. ∂q
(3.5)
The relation between higher derivatives can be found by differentiation of the ex˙ q. ˙ The velocity Jacobian, from now on called pression above, e.g., X¨ = J(q)q¨ + J(q) the Jacobian, is useful in many aspects of robotics. One example is the transformation of forces and torques, acting on the end effector, to the corresponding joint torques. This relation can be derived using the principle of virtual work, and is τ = J T (q)F, R6
where F ∈ is the vector of end effector forces and torques, and τ ∈ vector of joint torques.
(3.6) RN
is a
7 The volume which can be reached with arbitrary orientation is called dextrous workspace, and the volume that can be reached with at least one orientation is called reachable workspace. 8 The number of independent coordinates necessary to specify the configuration of a certain system.
28
3
Modeling of Robot Manipulators
The Jacobian is also useful for studying singularities. A singularity is a configuration where the Jacobian looses rank. Some facts about singularities: • A Cartesian movement close to a singularity results in high joint velocities. ˙ This can be seen from the relation q˙ = J −1 (q)X. • Most singularities occur on the workspace boundary but can also occur inside the workspace, e.g., when two or more joint axes are lined up. • Close to a singularity there may be infinitely many solutions, or no solutions, to the inverse kinematics problem. • The ability to move in a certain direction is reduced close to a singularity.
3.2
Dynamic Models
Dynamic models of the robot manipulator describe the relation between the motion of the robot, and the forces that cause the motion9 . A dynamic model is useful for, e.g., simulation, control analysis, mechanical design, and real-time control. Some control algorithms require that the inverse dynamics problem is solved. This means that the required actuator torque is computed from the desired movement, including time derivatives. For simulation of the manipulator movement, the direct dynamic problem must be solved. This means that the dynamic model differential equations are solved with the actuator torques as input. Depending on the intended use of the dynamic model, the manipulator can be modeled as rigid or elastic. A real flexible manipulator is a continuous nonlinear system, described by partial differential equations, PDEs, with infinite number of degrees-of-freedom. An infinite dimensional model is not realistic to use in real applications. Instead, finite dimensional models with the minimum number of parameters for the required accuracy level is preferred. The following three levels of elastic modeling are described in, e.g., Bascetta and Rocco (2002): Finite Element Models These models are the most accurate models but normally not used for simulation and control due to their complexity. FEM models are widely used in the mechanical design of robot manipulators. Assumed Modes Models These models are derived from the PDE formulation by modal truncation. Assumed modes models used for simulation and control design are frequently described in the literature. Lumped Parameter Models The elasticity is modeled by discrete, localized springs. With this approach, a link can be divided into a number of rigid bodies connected by non-actuated joints. The gearbox elasticity can also be modeled with this approach. 9 A somewhat different definition of dynamics is usually adopted in general multibody dynamics (Shabana, 1998), where kinetics deals with motion and the forces that produce it, and kinematics deals with the geometric aspects of motion regardless of the forces that cause it. Dynamics then includes both kinematics and kinetics.
3.2
29
Dynamic Models
In the following, both rigid and elastic dynamic models for robot manipulators will be described.
3.2.1
The Rigid Dynamic Model
There are several methods for obtaining a rigid dynamic model. The two most common approaches are the Lagrange formulation (Spong et al., 2006) and the Newton-Euler formulation (Craig, 1989). A third method is Kane’s method (Kane and Levinson, 1983, 1985; Lesser, 2000). All methods are based on classical mechanics (Goldstein, 1980) and produce the same result even though the equations may differ in computational efficiency and structure. A detailed comparison of these methods is outside the scope of this work. In the following, only the Lagrange formulation will be described in some detail. The Lagrangian method is based on describing scalar energy functions of the ˙ and the potential energy V (q). These energy system, the kinetic energy K(q, q) functions are expressed as functions of some suitable generalized coordinates, q, defined by h iT q = q1 q2 . . . q N . (3.7) For the manipulator considered here, the generalized coordinates can be chosen as the joint angles. It can be shown that the kinetic energy can be expressed as 1 T ˙ q˙ M(q)q, (3.8) 2 where M( · ) is the inertia matrix. The inertia matrix is positive definite and symmetric. More properties of Lagrangian dynamics are described in, e.g., Sciavicco and Siciliano (2000). ˙ = K(q, q)
The next step is to compute the Lagrangian L as L = K − V . By applying the Lagrange equation d ∂L ∂L − = τj , dt ∂q˙ j ∂qj
(3.9)
the equations of motion, i.e., the dynamic model, can be derived. In the equation above, τj is called a generalized force, in our case the actuator torque. In a rigid dynamic model, the links and gearboxes are assumed to be rigid. The mass and inertia of the actuators and gearboxes are added to the corresponding link parameters. The model consists of a serial kinematic chain of N links modeled as rigid bodies as illustrated in Figure 3.4. One rigid body rb i is illustrated in Figure 3.5, and is described by its mass mi , center of mass ξ i , and inertia tensor with respect to center of mass J i . Due to the symmetrical inertia tensor, only six components of J i need to be defined. For simplicity, it is assumed that the structure of the serial manipulator, i.e., the orientations of the rotational joint axes, is given. The kinematics is then described by the length l i . All parameters
30
3
Modeling of Robot Manipulators
Figure 3.4: A rigid dynamic model with 3 DOF.
Figure 3.5: A rigid body and its attributes.
are described in a coordinate system ai , fixed in rb i , and are defined as follows i i i Jxz Jxx Jxy h i h i i i i Jyy Jyz ξ i = ξxi ξyi ξzi , J i = Jxy , l i = lxi lyi lzi . i i i Jxz Jyz Jzz The model can be derived by using, e.g., the Lagrange formulation which yields a system of second order ordinary differential equations or ODEs ˙ θrb , θkin ) + g(q, θrb , θkin ) = τ, M(q, θrb , θkin )q¨ + c(q, q,
(3.10)
where x˙ denotes dx/dt and the time dependence is omitted in the expressions. M( · ) ∈ RN ×N is the inertia matrix computed as M( · ) = Ma ( · )+ Mm , where Ma ( · ) is the configuration dependent inertia matrix of the robot arm and, Mm is the inertia matrix of the rotating actuators expressed on the link side of the gearbox. The Coriolis, centrifugal, and gravity torques are described by c( · ) ∈ RN and g( · ) ∈ RN , respectively. The vector of joint angles is denoted q ∈ RN , and the actuator torque vector is denoted τ ∈ RN . Note that the equations are described a = η T τ m and M = M a = η T M m η where η is the on the link side, i.e., τ = τm m m m m
3.2
31
Dynamic Models
a should be interpreted10 quantity X for the gear ratio matrix. The notation Xm motor expressed on the link side of the gearbox. The rigid body and kinematic parameters described previously are gathered in θrb and θkin respectively, i.e., for each link i h i i i i i i i i Jyy Jzz Jxy Jxz Jyz θrb = mi ξxi ξyi ξzi Jxx , (3.11a) h i i θkin = lxi lyi lzi . (3.11b)
For this model to be complete, the friction torque and the torque from gravitycompensating springs, if present, must be added to (3.10).
3.2.2
The Flexible Joint Dynamic Model
This model is an elastic, lumped parameter model. Consider the robot described in Section 3.2.1 with elastic gearboxes, i.e., elastic joints. This robot can be modeled by the so called flexible joint model which is illustrated in Figure 3.6. The rigid bodies are connected by torsional spring-damper pairs. If the inertial couplings between the motors and the rigid links are neglected we get the simplified flexible joint model11 . If the gear ratio is high, this is a reasonable approximation as described in, e.g., Spong (1987). The motor mass and inertia are added to the corresponding rigid body. The total system has 2N DOF. The model equations of the simplified flexible joint model are Ma (qa )q¨a + c(qa , q˙ a ) + g(qa ) = τa , τa = K(qm − qa ) + D(q˙ m − q˙ a ), τm − τa = Mm q¨m + f (q˙ m ),
(3.12a) (3.12b) (3.12c)
where joint and motor angular positions are denoted qa ∈ RN and qm ∈ RN , respectively. τm is the motor torque and τa is the gearbox output torque. K ∈ RN ×N is a stiffness matrix and D ∈ RN ×N is the matrix of dampers. The dynamic and kinematic parameters are still described by θrb and θkin but are for simplicity omitted in the equations. A vector of friction torques is introduced for this model, and described by f (q˙ m ) ∈ RN . The friction torque is here approximated as acting on the motor side only. The convention of describing the equations on the link a = η −1 q m and f ( · ) = f a ( · ) = η T f m ( · ) side is used, i.e., qm = qm m m m If the couplings between the links and the motors are included we get the complete flexible joint model (Tomei, 1991) τa = Ma (qa )q¨a + S(qa )q¨m + c1 (qa , q˙ a , q˙ m ) + g(qa ), T
τm − τa = Mm q¨m + S (qa )q¨a + c2 (qa , q˙ a ) + f (q˙ m ), τa = K(qm − qa ) + D(q˙ m − q˙ a ),
(3.13a) (3.13b) (3.13c)
where S ∈ RN ×N is a strictly upper triangular matrix of coupled inertia between links and motors. The structure of S depends on how the motors are positioned 10 The a is explained by the fact that the link side can also be denoted the arm side and sometimes also the low-speed side. The motor side can also be denoted the high-speed side. 11 Sometimes, the viscous damping is also neglected in the simplified model.
32
3
Modeling of Robot Manipulators
Figure 3.6: A flexible joint dynamic model with 6 DOF.
and oriented relative to the joint axis directions. The flexible joint models can formally be derived in the same way as the rigid model, e.g., by the Lagrange equation. The potential energy of the springs must then be added to the potential energy expressions as 1 (q − qm )T K(qa − qm ), 2 a and the kinetic energy of the rotating actuators must be added as well. Vs (qa , qm ) =
3.2.3
(3.14)
Nonlinear Gear Transmissions
The nonlinear characteristics of the gear transmission can have a large impact on the behavior of a robot manipulator, for example at low speed when the friction parameters with nonlinear speed dependency are dominant. A classical friction model12 includes the viscous and Coulomb friction, fv and fc respectively, and is given by f (v) = fv v + fc sign(v),
(3.15)
where v = q˙ m . More advanced friction models are described in Armstrong-Hélouvry (1991). One model taking many phenomenon into account is the so called LuGre Model, described in Canudas de Wit et al. (1995) and Olsson (1996). This model is a nonlinear differential equation modeling both static and dynamic behavior 12 All friction models described here are scalar models that can be used for each gear transmission.
3.2
33
Dynamic Models
5 4
Friction Torque [Nm]
3 2 1 0 −1 −2 −3 −4 −5 −100
−50
0 Speed [rad/s]
50
100
Figure 3.7: Typical friction characteristics of a compact gearbox as described by (3.17). and is described by dz |v| =v− z, dt g(v)
(3.16a) 2
σ0 g(v) = fc + (fs − fc )e−(v/vs ) , σ1 (v) = σ1 e
(3.16b)
−(v/vd )2
, (3.16c) dz f (v) = σ0 z + σ1 + fv v, (3.16d) dt which in its simplified form has σ1 (v) = σ1 . The Stribeck friction is modeled by fs . Another dynamic friction model is the Generalized Maxwell-Slip Model, described in Al-Bender et al. (2005). A smooth static friction law is suggested in Feeny and Moon (1994). This model avoids discontinuities to simplify numerical integration and is given by f (v) = fv v + fc (µk + (1 − µk ) cosh−1 (βv)) tanh(αv),
(3.17)
and is illustrated in Figure 3.7. Figure 3.8 shows the friction measured on one axis of an industrial robot under steady-state conditions, i.e., constant speed, in one configuration. In the same figure, the steady-state LuGre model and the FeenyMoon model, fitted to the experimental data, are shown. Both models describe the static behavior in a good way. However, the friction of a real robot shows large variations for different configurations in the workspace, for different tool loads, and for different temperatures (Carvalho Bittencourt et al., 2010). This means that some kind of off-line or on-line adaption of the model is necessary. An open question is whether the existing friction models can capture the dynamic effects of the compact gear boxes, together with motor bearings, typically used in industrial robots of today. Another important nonlinear gearbox characteristic is the nonlinear stiffness. The nonlinear stiffness can also be included in the flexible joint model by replacing
34
3
Modeling of Robot Manipulators
1 Measured Friction LuGre Model Feeny−Moon Model
Normalized Friction Torque
0.9 0.8 0.7 0.6 0.5 0.4
0
0.2
0.4 0.6 Normalized Speed
0.8
1
Figure 3.8: One example of the friction characteristics for one axis of an industrial robot. 3000 Stiffening spring Linear spring
2000
Linear spring with backlash
Torque [Nm]
1000
0
−1000
−2000
−3000 −3
−2
−1 0 1 Delta Position [arcmin]
2
3
Figure 3.9: Three typical gearbox stiffness characteristics.
K(qm − qa ) in (3.12) by τs = τs (qm − qa ),
(3.18)
where τs ( · ) is a nonlinear function describing a nonlinear spring. Three typical spring characteristics are shown in Figure 3.9. The first has a smooth nonlinear characteristics, often called a stiffening spring. This is typical for the compact gearboxes used by modern industrial robots. The second is an ideal linear spring and the third has a backlash behavior. Industrial gearboxes are designed for low backlash, i.e., a backlash that can be accepted with respect to the accuracy required. The backlash is, of course, not zero. More nonlinearities could be added to the model of the gear transmission. Modeling of hysteresis, backlash, and nonlinear stiffness/damping is, for example, described in Tuttle and Seering (1996), Dhaouadi et al. (2003), and Ruderman et al. (2009). A smooth nonlinear stiffness is used in the benchmark problems, described in Papers F and G.
3.2
Dynamic Models
35
Figure 3.10: An extended flexible joint dynamic model with 8 degrees-offreedom.
3.2.4
The Extended Flexible Joint Dynamic Model
Most publications concerning flexible robot manipulators only consider elastic deformation in the rotational direction. If only the gear elasticity is considered we get the flexible joint model, and if link deformation restricted to a plane perpendicular to the preceding joint is included in the model we get the flexible link model. One example of a flexible link model is described in De Luca (2000). In Paper A it is shown that the flexible joint model must be extended in order to describe a modern industrial robot in a realistic way. The added elasticity is the elasticity of bearings, foundation, tool, and load as well as bending and torsion of the links. The extension of the flexible joint model is straightforward. First, replace the onedimensional spring-damper pairs in the actuated joints with multidimensional spring-damper pairs. Second, if necessary, divide each link into two or more rigid bodies at proper locations, and connect the rigid bodies with multi-dimensional spring-damper pairs. In this way, non-actuated joints or pseudo-joints are added to the model. The principle is illustrated in Figure 3.10 where one extra torsional spring is added in the actuated third joint to model torsion of link three. Link three is then divided in two rigid bodies, and one more torsional spring is added to allow bending out of the plane of rotation. In this way two non-actuated joints are created. The model thus has 8 DOF, i.e., three motor DOF qm1 –qm3 , three actuated joint DOF qa1 –qa3 , and two non-actuated joint DOF qa4 –qa5 . The number of non-actuated joints and their locations are, of course, not obvious. This model structure selection is therefore a crucial part of the modeling and identification procedure.
36
3
Modeling of Robot Manipulators
Generally, if the number of added non-actuated joints is Υ na and the number of actuated joints is Υ a , the system has 2Υ a + Υ na degrees-of-freedom. The model equations can then be described as Ma (qa )q¨a + c(qa , q˙ a ) + g(qa ) = τa , " # τ τa = g , τe " # q qa = g , qe τg = Kg (qm − qg ) + Dg (q˙ m − q˙ g ), τe = −Ke qe − De q˙ e , τm − τg = Mm q¨m + f (q˙ m ),
(3.19a) (3.19b) (3.19c) (3.19d) (3.19e) (3.19f)
where qg ∈ RΥ a is the actuated joint angular position, qe ∈ RΥ na is the nonactuated joint angular position, and qm ∈ RΥ a is the motor angular position. Mm ∈ RΥ a ×Υ a is the inertia matrix of the motors and Ma (qa ) ∈ R(Υ a +Υ na )×(Υ a +Υ na ) is the inertia matrix for the joints. The Coriolis and centrifugal torques are described by c(qa , q˙ a ) ∈ RΥ a +Υ na , and g(qa ) ∈ RΥ a +Υ na is the gravity torque. τm ∈ RΥ a is the actuator torque, τg ∈ RΥ a is the actuated joint torque, and τe ∈ RΥ na is the non-actuated joint torque, i.e., the constraint torque. Kg , Ke , Dg , and De are the stiffness- and damping matrices for the actuated and non-actuated directions, with obvious dimensions. This model is from now on called the extended flexible joint model. The nonlinearities of the gear transmission described previously can also be added to this model. The non-actuated joint stiffness can also be modeled as nonlinear if required. For a complete model including the position and orientation of the tool, X, the forward kinematic model of the robot must be added. The kinematic model is a mapping of qa ∈ RΥ a +Υ na to X ∈ RΥ a . The complete model of the robot is then described by (3.19) and X = Γ (qa ).
(3.20)
Note that no inverse kinematics exists. This is a fact that makes the control problem considerably harder. The identification of the extended flexible joint model is the subject of Paper A and B, and the inverse dynamics problem when using this model is treated in Paper C and D.
3.2.5
Flexible Link Models
If the elasticity of the links cannot be neglected nor described by the joint elasticity approaches described in Sections 3.2.2 and 3.2.4, a distributed elasticity model can be used to increase the accuracy of the model. These models are described by partial differential equations with infinite dimension. One way to reduce the model to a finite-dimensional model is to use the assumed modes method. The link deflections are then described as an infinite series of separable
3.2
37
Dynamic Models
Figure 3.11: The flexible link model.
modes that is truncated to a finite number of modes. A model of this type is described in De Luca et al. (1998) and illustrated in Figure 3.11. The model consists of a kinematic chain of N flexible links directly actuated by N motors. It is assumed that the link deformations are small and that each link only can bend in one direction, i.e., in a plane perpendicular to the previous joint axis. The link deflection wi (xi , t) at a point xi along link i of length li is described by wi (xi , t) =
Nei X
φij (xi )δij (t),
i = 1 . . . N,
(3.21)
j=1
where link i has Nei assumed modes φij (xi ), and δij (t) are the generalized coordinates. By use of Lagrange equations the dynamic model for the system can be expressed as " #" # " # " # " # ˙ δ) ˙ Bθθ (θ) Bθδ (θ) θ¨ 0 cθ (θ, θ, τ + + = , (3.22) ˙ 0 D δ˙ + K δ BTθδ (θ) Bδδ cδ (θ, θ) δ¨ where θ ∈PRN is a vector of joint angles, δ ∈ RNe is a vector of link deformations, and Ne = N i=1 Nei . B is a partitioned inertia matrix, c a vector of Coriolis and centripetal forces, and K and D are stiffness and damping matrices, respectively, all with obvious dimensions. The actuator torque is denoted τ. The reference frame where the deflection is described is clamped to the base of each link. The end effector position can be approximated by the angles yi as illustrated in Figure 3.11 and described by yi = θi + Φ ei δi ,
(3.23)
h i Φ ei = φi,1 (li )/li , . . . , φi,Nei (li )/li ,
(3.24)
where
38
3
Modeling of Robot Manipulators
and δi =
δi,1 .. . δi,Nei
.
(3.25)
Note that y can be regarded as output variable of this system, and that the same direct and inverse kinematic models as for the rigid or flexible joint can be used. This fact simplifies the inverse dynamics control problem. A fact that makes the inverse dynamics problem hard, however, is that the system from the actuator torque τ to the controlled variable y can have unstable zero dynamics13 , i.e., the system has non-minimum phase behavior (Isidori, 1995; Slotine and Li, 1991) which means that trajectory tracking is considerably harder to achieve. The structure of the equations of motion and the assumed modes depend on the boundary conditions used, which is a critical choice for these models. Assumed mode models are further described in, e.g., Hastings and Book (1987), De Luca and Siciliano (1991), Book (1993), Book and Obergfell (2000), and Bascetta and Rocco (2002).
3.3
The Kinematics and Dynamics of a Two-Link Elbow Manipulator
In this section, the kinematic and dynamic models of a rigid two link elbow manipulator will be derived as a small but illustrative example of how the models can be derived. The manipulator is planar and constrained to movements in the x-y plane. By inspection of Figure 3.12, the forward kinematics is # " # " p l sin(q1 ) + l2 sin( π2 + q1 + q2 ) X = Γ (q) = x = 1 py l1 cos(q1 ) + l2 cos( π2 + q1 + q2 ) " # l1 sin(q1 ) + l2 cos(q1 + q2 ) = . (3.26) l1 cos(q1 ) − l2 sin(q1 + q2 ) The inverse kinematics can here be derived in closed form by either algebraic or geometric methods. Using the geometric approach and the law of cosine cos(γ) =
l12 + l22 − px2 − py2 2l1 l2
= sin(q2 ) , s2 ,
and finally obtain the expression for q2 by use of the atan2 function q q2 = atan2(s2 , ± 1 − s22 ),
13 For uniform mass distributions, the system is always minimum-phase.
(3.27)
(3.28)
3.3
The Kinematics and Dynamics of a Two-Link Elbow Manipulator
39
Figure 3.12: Two link elbow manipulator kinematics.
where the function atan2 is preferred for numerical reasons. Continuing with the solution for q1 , in the same way l12 + px2 + py2 − l22 = cβ , q 2l1 px2 + py2 q β = atan2(± 1 − cβ2 , cβ ),
cos(β) =
(3.29a)
(3.29b)
α = atan2(py , px ), (3.29c) π (3.29d) q1 = − α − β. 2 The inverse kinematics is given by (3.29d) and (3.28). The alternative signs in (3.28) and (3.29b) should be chosen as both plus or both minus corresponding to the two solutions, elbow-up and elbow-down. The Jacobian of the velocity kinematics is obtained by differentiation of the forward kinematics (3.26), i.e., " # ∂Γ (q) l c −l s −l2 s12 = 1 1 2 12 J(q) = , (3.30) −l1 s1 − l2 c12 −l2 c12 ∂q where the notations sin(q1 ) , s1 , cos(q1 ) , c1 , and cos(q1 + q2 ) , c12 etc. are used. The dynamics is computed based on the simplified model in Figure 3.13. The dynamic and kinematic parameters are defined according to Section 3.2.1. The actuator inertial parameters are here included in the link parameters. The first step is to derive the kinematics for each link center of mass, i.e., " # " # x1 ξ1 s1 X1 = Γ1 (q) = = , (3.31a) y1 ξ1 c1 " # " # x l s + ξ2 c12 X2 = Γ2 (q) = 2 = 1 1 , (3.31b) y2 l1 c1 − ξ2 s12
40
3
Modeling of Robot Manipulators
Figure 3.13: Simplified two link elbow manipulator dynamic model.
and the corresponding Jacobians # " ξ1 c 1 0 , J1 (q) = −ξ1 s1 0 " l c − ξ2 s12 J2 (q) = 1 1 −l1 s1 − ξ2 c12
(3.32a) # −ξ2 s12 . −ξ2 c12
(3.32b)
The rotational kinetic energy in this simple case is 1 2 1 j q˙ + j (q˙ + q˙ 2 )2 , 2 1 1 2 2 1 and the translational kinetic energy is generally Krot =
(3.33)
N
Ktrans =
1X (mi X˙ iT X˙ i ) 2 i=1
=
N N X 1 1X ˙ T Ji (q)q) ˙ = q˙ T ( ˙ (3.34) mi JiT (q)Ji (q))q. (mi (Ji (q)q) 2 2 i=1
i=1
Thus, the total kinetic energy is then K = Ktrans + Krot .
(3.35)
The potential energy is given from the y-coordinate of each mass as V =
N X (mi gyi ),
(3.36)
i=1
where g is the gravitational constant. The Lagrange function is then L = K − V.
(3.37)
3.3
The Kinematics and Dynamics of a Two-Link Elbow Manipulator
41
Applying the Lagrange equation (3.9) and using some symbolic mathematical software, e.g., Matlab Symbolic Toolbox, gives the equations of motion as ˙ + G(q), τ = M(q)q¨ + C(q, q)
(3.38)
where " M(q) =
J11 (q) J21 (q)
# J12 (q) , J22 (q)
(3.39a)
J11 (q) = j1 + m1 ξ12 + j2 + m2 (l12 + ξ22 − 2l1 ξ2 s2 ), J12 (q) = J21 (q) = j2 +
m2 (ξ22
− l1 ξ2 s2 ),
J22 (q) = j2 + m2 ξ22 , " # −m2 l1 ξ2 c2 (2q˙ 1 q˙ 2 + q˙ 22 ) ˙ = C(q, q) , m2 l1 ξ2 c2 q˙ 12 # " −g(m1 ξ1 s1 + m2 (l1 s1 + ξ2 c12 )) . G(q) = −m2 ξ2 gc12
(3.39b) (3.39c) (3.39d) (3.39e) (3.39f)
Note that the kinetic energy has the form 1 T ˙ q˙ M(q)q, (3.40) 2 as described in Section 3.2.1. If the rotational kinetic energy is included in (3.34), the inertia matrix of the system, M(q), can be derived without applying the Lagrange equation. Deriving dynamic models is clearly a matter of formulating the kinematics, and then use a powerful tool for symbolic mathematics. Of course, the models can be much more complex than shown in this small example. Describing the problems and solutions for those cases is outside the scope of this work. K=
4
Identification of Robot Manipulators
This chapter gives a short introduction to system identification in general, and to the identification of robot manipulators in particular.
4.1
System Identification
System identification is the art of estimating a model of a dynamic system from measured data. For a thorough treatment of system identification, the reader is referred to Ljung (1999), Söderström and Stoica (1989), or Johansson (1993). An in-depth treatment of frequency-domain identification can be found in Pintelon and Schoukens (2001). In the area of automatic control, the estimated models are often used for controller design, on-line control, simulation, and prediction.
4.1.1
Introduction
The identification experiment can be performed in open loop or closed loop. Identification of a system not subject to feedback control, i.e, an open-loop system, is illustrated in Figure 4.1. This system has input u, output y, and is affected by a disturbance v. The disturbance can include measurement noise as well as external system inputs, not included in u. An identification experiment on a system subject to feedback control, i.e., a closed-loop system, is shown in Figure 4.2 where r is the reference signal for the system. A reason for performing a closedloop experiment could be that the system is unstable, and must be controlled in order to remain stable. This is typically the case for a robot manipulator. Other reasons could be that safety or production restrictions do not allow open loop experiments. If we take a typical industrial robot manipulator as an example system, u is the motor torque, y is the motor position, and r is the position refer43
44
4
Identification of Robot Manipulators
Figure 4.1: An open-loop system.
Figure 4.2: A closed-loop system.
ence. The disturbance v includes both measurement noise and internally generated disturbances, e.g., torque ripple generated by the motor1 . Models can be divided into nonlinear- and linear models. A real world system is in general nonlinear. However, linear time-invariant approximations are often used for modeling the nonlinear reality. Moreover, models can be described as continuous-time models or discrete-time models although the measurements, u(t) and y(t), are normally represented as sampled, discrete-time, data. It is assumed that the reader has a basic knowledge of linear system theory for continuous-time and discrete-time systems. Some books treating this subject in-depth are Kailath (1980) and Rugh (1996). Other recommended sources are Åström and Wittenmark (1996) and Ljung and Glad (2001). The different types of models can be further divided into nonparametric models and parametric models. A nonparametric model is a vector of numbers or a graphical curve describing the model in the time-domain or frequency-domain. A parametric model is a model where the information obtained by the measurements has been condensed to a small number of parameters. The model can be described as a differential or difference equation or, in the case of a linear model, as a transfer function. In the next sections, these two model types are described. 1 The torque ripple is not entering the system at the output which means that it must be filtered by some appropriate system dynamics before added to v.
4.1
45
System Identification
2.5 y u
K= 2 2
1.5
0.63 K
1
T = 0.5 0.5
0 0
L= 1
1
2
3
4
5
Time[s]
Figure 4.3: Step response of a first order process with delay.
4.1.2
Nonparametric Models
Examples of nonparametric models in the time-domain are impulse responses or step responses. Such models consist of vectors of system outputs and the corresponding time stamps. An example of a step response of a first-order system with a time-delay is shown in Figure 4.3. The measured output is affected by measurement noise. The nonparametric step response model can in this case be described by a parametric transfer function model G(s) =
K e−Ls . sT + 1
(4.1)
This three-parameter model2 is often used to describe systems in the process industry. The parametric model (4.1) can be identified by inspection of the stepresponse according to Figure 4.3. This model can then be used for tuning of a PI- or a PID controller using, e.g., lambda tuning. Identification and control of industrial processes are treated in Åström and Hägglund (2006). The described methodology of obtaining a parametric model from a nonparametric model is important, and the method considered in Papers A and B includes such a methodology, although based on a nonparametric frequency-domain model instead of a nonparametric time-domain model. Methods for obtaining nonparametric frequency-domain models are, e.g., Fourier analysis, and spectral analysis. The obtained model is a frequency response function (FRF) consisting of a vector of complex numbers and the corresponding frequency vector. The complex numbers represent the transfer function from input to output at different frequencies. The FRF can be illustrated in a Bode diagram, 2 Sometimes called the KLT model.
46
4
Identification of Robot Manipulators
a Nichols diagram, or a Nyquist diagram, and can be used directly for controller design with frequency domain methods, such as loop-shaping using lead-lag compensation or QFT-design (Horowitz, 1991). The FRF can also be used for obtaining a parametric model as described in Papers A and B. The method used in Papers A and B, for obtaining the FRF, is based on Fourier analysis and the discrete-time Fourier Transform. This transform, if the timedomain signal is x(t), is defined by X(e jωk Ts ) =
∞ X
x(nTs )e−jωk nTs ,
(4.2)
n=−∞
where Ts is the sample time and ωk the frequency considered. As an approximation of this transform, when the measurement is a finite sequence of discrete-time data, sampled for t = nTs , n = 1, . . . , N , the discrete Fourier transform (DFT) is usually adopted. The DFT3 is usually defined as N 1 X XN (e jωk Ts ) = √ x(nTs )e−jωk nTs , N n=1
(4.3)
where 2πk , k = 1, . . . , N . (4.4) N Ts For a thorough treatment of the discrete Fourier transforms, see Oppenheim and Schafer (1975). ωk =
The DFT may contain errors, known as leakage errors, due to the fact that it is computed for a data sequence with finite duration. This error can be reduced by applying windowing functions before computing the DFT. The leakage error can be eliminated if the signals are of finite duration, and if the signals are sampled until the system is at rest. This type of excitation is called burst excitation. Another way of eliminating the leakage error is to use a periodic excitation, and to sample the signals for an integer number of periods, when a steady state is reached. For further discussions on these issues see Pintelon and Schoukens (2001). The FRF4 for a SISO system with the transfer function G, at frequency ωk , can be estimated as Y (ω ) Gˆ N (ωk ) = N k , (4.5) UN (ωk ) where YN ( · ) and UN ( · ) are the DFTs of y( · ) and u( · ), respectively. In the following, we assume that no leakage errors are present because burst or periodic excitation has been used in the experiments. We further assume that a proper anti-alias5 filtering is performed so that no alias errors are present. For nota3 The fast Fourier transform (FFT) is an efficient way of computing the DFT. 4 This estimated FRF is sometimes called the empirical transfer function estimate (ETFE). 5 Alias or frequency folding occurs when sampling a continuous-time signal with a frequency con-
4.1
47
System Identification
Figure 4.4: A linear two-mass flexible joint model. tional simplicity, the arguments of Gˆ N ( · ), YN ( · ) and UN ( · ) are written as ωk , although e jωk Ts would be more correct. For a multiple-input multiple-output (MIMO) system described by the n×n transfer function matrix G with inputs u and outputs y, the following relation between the FRF of G, and the Fourier transforms of the input and output, U and Y , for frequency ωk , holds Y (ωk ) = G(ωk )U (ωk ).
(4.6)
If n independent experiments of length N are performed, the multivariable FRF can be estimated as Gˆ N (ωk ) = Y¯N (ωk )U¯ −1 (ωk ), (4.7) N
where U¯ N (ωk ) and Y¯N (ωk ) have n columns from the n experiments. If more than n experiments are performed, other FRF estimators can be applied, see, e.g., Pintelon and Schoukens (2001) or Wernholt and Moberg (2008b).
4.1.3
A Robot Example
A linear one-axis flexible joint model (see Section 3.2.2) will now be used as an example of how to obtain an FRF by closed-loop identification. The model, illustrated in Figure 4.4, can be described by the differential equations 0 = Ja q¨a + k(qa − qm ) + d(q˙ a − q˙ m ), τ = Jm q¨m − k(qa − qm ) − d(q˙ a − q˙ m ),
(4.8a) (4.8b)
or by the transfer function G(s) =
s2 /ωz2 + 2ζz s/ωz + 1 , s2 (Ja + Jm )(s2 /ωp2 + 2ζp s/ωp + 1)
(4.9)
where r ωz =
k , ωp = Ja
r
k(Ja + Jm ) d , ζz = Ja Jm 2
r
1 d , ζ = kJa p 2
r
Ja + Jm . kJa Jm
(4.10)
The input u is the motor torque τ and the output y is the motor position qm . Ja and Jm are the inertias of the arm and motor respectively, k is the joint stiffness, tent above half the sample frequency. The alias effect is further described in Åström and Wittenmark (1996).
48
4
Identification of Robot Manipulators
d is the joint viscous damping, and finally, qa is the arm position. The measurement y is affected by measurement noise. The system is controlled by a speed controller of P-type with sample time Ts = 1 ms. The motor speed is obtained by differentiation of the measured position, and the excitation is the the motor speed reference r. Two different excitations are evaluated. The first is a burst excitation in the form of a swept sinusoid (chirp) π(f2 − f1 ) r(t) = A sin 2πf1 (t − t1 ) + (4.11) (t − t1 )2 , t2 − t1 with amplitude A, starting at t1 = 0.5 s with frequency f1 = 50 Hz, and ending at t2 = 20 s with frequency f2 = 0.5 Hz. The second excitation is a periodic multisine signal, i.e., a sum of sinusoids, computed as r(t) =
Nf X
A˜ cos(2πfk t + φk ),
(4.12)
k=1
where Nf is the number of sinusoids, with frequencies fk and random phases φk uniformly distributed between 0 and 2π. The frequency fk is chosen from the grid {fk = k/(Ts Np ) k = 1, . . . , Np /2}, where Np is the number of samples in one period and Ts is the sampling time. The amplitude A˜ is computed, after the randomization of the phases, to fulfil input amplitude constraints. For optimizing the input power, given an amplitude constraint, the phases can be randomized repeatedly (or optimized). This means that the crest factor of the input is minimized (Ljung, 1999). The period time of the multisine is chosen to 20 s. The motor speed and motor torque are measured from t = 0 s to t = 25 s. For the chirp excitation, the whole sequence is used when computing the FRF, in order to reduce the leakage errors (allowing all transients to decay during the last 5 s). For the multisine excitation, leakage is avoided by using only the last 20 s (allowing the initial transients to decay during the first 5 s). The motor torque, motor speed, and the excitation signals are shown in Figures 4.5–4.6. Clearly, the noise level is very high compared to the excitation. Figures 4.7–4.8 show the magnitude of the true system FRF and the estimated FRFs (for chirp and multisine excitation), obtained by applying (4.5). The FRF is computed from the torque input to the differentiated output (motor speed). The errors in the estimated FRF, when using burst excitation, are quite high for frequencies above 20 Hz. These errors can be reduced by averaging over neighboring frequencies using a suitable window (smoothing). The errors in the FRF, when using periodic excitation, are much smaller. The reason is that the periodic excitation can be concentrated at a few selected frequencies, and thereby decreases the bias and the variance of the estimated FRF. This is further discussed in Paper B. Figure 4.9 illustrates one potential problem due to closed loop identification. Here, the amplitude of the excitation signals is reduced by a factor of 100, and thus decreasing the signal-to-noise ratio. The errors in the estimated FRFs increase, and the estimated FRFs approach a constant gain, 0 dB. This is the inverse controller gain (K = 1) as expected (see Söderström and Stoica, 1989). Note that
49
System Identification
Motor Torque [Nm]
Motor Speed [rad/s]
4.1
40 20 0 −20 −40 0
5
10
5
10
15
20
25
15
20
25
40 20 0 −20 −40 0
Time [s]
Figure 4.5: Motor speed and torque during the identification experiment (chirp input).
Speed Ref [rad/s]
5
0
−5 0
5
10
5
10
15
20
25
15
20
25
Speed Ref [rad/s]
5
0
−5 0
Time [s]
Figure 4.6: Chirp excitation (upper) and multisine excitation (lower).
50
4
Identification of Robot Manipulators
Magnitude [dB]
20 10 0 −10 −20 −30 0
10
1
10 Frequency [Hz]
Figure 4.7: Magnitude of true FRF (solid) and estimated FRF (dashed) using chirp excitation.
Magnitude [dB]
20 10 0 −10 −20 −30 0
10
1
10 Frequency [Hz]
Figure 4.8: Magnitude of true FRF (solid) and estimated FRF (circles) using multisine excitation.
4.1
51
System Identification
30
30 Magnitude [dB]
Magnitude [dB]
20
20 10 0 −10
10 0 −10 −20
−20
−30
−30 0
10
1
0
10 Frequency [Hz]
10
1
10 Frequency [Hz]
Figure 4.9: Low excitation amplitude: Magnitude of true FRF (solid), estimated FRF with chirp excitation (dashed, left), and estimated FRF with multisine excitation (circles, right). 30
Magnitude [dB]
20 10 0 −10 −20 −30 0
10
1
10 Frequency [Hz]
Figure 4.10: Magnitude of true FRF (solid), estimated FRF with large leakage errors (dashed).
multisine excitation improves the estimate somewhat. The effect of frequency leakage is illustrated in Figure 4.10. Here, the measurement is stopped at t = 20 s, before the system has come to rest. Chirp excitation is used in this case, but leakage can also occur if multisine excitation is used, e.g., if data from the first transient period is used, or if the data is not exactly an integer number of multisine periods. Finally, in Figure 4.11, a comparison is made between the model FRF of the continuous-time model, and of the discrete-time, zero-order hold sampled model. The FRFs are shown up to the Nyquist frequency 500 Hz. The FRFs are almost identical for lower frequencies. Some conclusions can be drawn from this example: • FRFs can be estimated even if the system runs in closed loop. To reduce bias and variance errors, the excitation level must be reasonably high compared to the level of disturbances. • A burst chirp excitation works if the system is at rest when measurements start and end. However, it might be necessary to smooth the estimated FRF if the disturbance level is high. • A periodic multisine excitation improves the estimated FRF.
52
Magnitude [dB]
4
20 0 −20 0
10
Phase [deg]
Identification of Robot Manipulators
1
10
2
10
50 0 −50 −100 −150 0
10
1
10 Frequency [Hz]
2
10
Figure 4.11: FRF of the continuous (solid line) and discrete (dashed line) two-mass model.
• If the sample frequency is well above the frequencies of the interesting process dynamics, continuous-time model FRFs can be directly compared to discrete-time estimated FRFs, e.g., if a parametric model is to be estimated from the nonparametric (estimated) FRF. If this is not the case, the discretetime FRF of the model must be computed. For further discussions on closed-loop versus open-loop identification, see, e.g, Ljung (1999). Periodic excitation is often recommended as an alternative way of obtaining a leakage-free FRF, see, e.g., Pintelon and Schoukens (2001). This is the adopted solution described in Paper B, where a multisine excitation is used. The multisine excitation has, among many things, the advantage that the excitation energy is concentrated at selected frequencies, thus improving the signal-to-noise ratio at the frequencies where the DFT is evaluated.
4.1.4
Parametric Models
A parametric model is a model described as, e.g., differential or difference equations. System identification is one route for obtaining a parametric model of a system. Another route is physical modeling, i.e., deriving a mathematical model from the basic laws of physics. If the parameters of a physical model are known with sufficient accuracy, we get a white-box model, where both the model structure and the model parameters are known. An example of such a model is a rigid-body model, as described in Section 3.2.1, where the kinematic and inertial parameters are known from the CAD models. A gray-box model is a physical model where the model structure is known but the physical parameters are unknown or only partly known. Identification of parameters in this case is called gray-box identification. A nonlinear gray-box
4.1
53
System Identification
model can be formulated in continuous state-space form, i.e., ˙ = f (x(t), u(t), θ), x(t)
(4.13a)
y(t) = h(x(t), u(t), θ),
(4.13b)
with states x, control input u, and measurements y. The unknown parameters are contained in θ. One example of a gray-box model is a simplified flexible joint model (3.12) where the rigid-body parameters are known, and the elastic parameters, consisting of springs and dampers, are unknown. The simplified flexible joint model with measurement of motor positions can be expressed as x3 x4 , x˙ = −1 Ma (x1 )[−c(x1 , x3 ) − g(x1 ) + diag(θk )(x2 − x1 ) + diag(θd )(x4 − x3 )] −1 [−f (x ) + diag(θ )(x − x ) + diag(θ )(x − x ) + u] Mm 4 1 2 3 4 k d
(4.14a)
y = x2 ,
(4.14b)
with states h x = x1T
x2T
x3T
x4T
iT
h = qaT
T qm
q˙ aT
T q˙ m
iT
,
(4.15)
motor torque u, and the unknown elasticity parameters h θ = θk
i h θ d = k1
...
kN
d1
...
i dN .
(4.16)
If (4.13) is discretized, we obtain the discrete-time gray-box model x(t + Ts ) = fd (x(t), u(t), w(t), θ),
(4.17a)
y(t) = hd (x(t), u(t), v(t), θ),
(4.17b)
with sample time Ts . Here, the process- and measurement disturbances w and v, assumed to be zero-mean white noise processes, are also included. The discretization of the continuous-time system can, for example, be carried out using the Euler forward formula. A third type of parametric model is the so-called black-box model. In this case, the model structure is not known, and therefore, a model structure without any direct physical interpretation is used for the identification. The black-box model parameters can, e.g., be the coefficients of a linear difference equation. A general linear discrete-time black-box model can be expressed as y(t) = G(q−1 , θ)u(t) + H(q−1 , θ)e(t),
(4.18)
where y(t) ∈ Rny is the output, u(t) ∈ Rnu is the input, and e(t) ∈ Rny is a sequence of independent zero-mean random vectors with covariance matrix Λ. G( · ) and H( · ) are filters of obvious dimensions, rational functions of the backward shift operator q−1 , and of finite order. There are a number of standard black-box model structures, used for discrete-time identification. Examples of such standard structures are the output error structure and the ARX structure
54
4
Identification of Robot Manipulators
(Ljung, 1999). The ARX structure for a single-input single-output system is A(q−1 )y(t) = B(q−1 )q−nk u(t) + e(t),
(4.19a)
A(q−1 ) = 1 + a1 q−1 + · · · + ana q−na , −1
B(q ) = b0 + b1 q
−1
+ · · · + bnb q
−nb
(4.19b) ,
(4.19c)
i nk .
(4.20)
with model parameters h θ = a1
4.1.5
...
ana
b0
...
bnb
Identification of Parametric Models
The gray-box and black-box models can be identified directly in the time domain. One way of estimating the parameters is by the use of a so-called prediction error method (Ljung, 1999). For linear systems described by (4.18), the optimal onestep-ahead predictor is ˆ y(t|t − Ts ; θ) = H −1 (q−1 , θ)G(q−1 , θ)u(t) + [I − H −1 (q−1 , θ)]y(t),
(4.21)
ˆ where the predictor y(t|t − Ts , θ) depends on previous inputs and outputs. The prediction error is then ˆ ε(t, θ) = y(t) − y(t|t − Ts ; θ) = e(t) = H −1 (q−1 , θ)[y(t) − G(q−1 , θ)u(t)].
(4.22)
When using a prediction-error method, the error between the predicted model output and the measured output, i.e., ε(t, θ), is minimized according to some distance measure (norm). A common choice of norm is a quadratic criterion, and the estimator is then θˆ N = arg min VN (θ), VN (θ) =
1 N
θ N X
ε2 (kTs , θ),
(4.23a) (4.23b)
k=1
assuming N samples of data have been collected. For some model structures the parameters θˆ N can be estimated using linear regression, but for most structures a numerical search procedure is necessary. For linear discrete-time state-space models, the Kalman filter is the optimal onestep-ahead predictor, and prediction-error methods can be used for identification. State-space models can also be expressed on the general form (4.18). Besides prediction-error methods, subspace methods are often used for identification of linear discrete-time state-space models (Ljung, 1999). The gray-box model structure can also be identified in the time-domain. To design an optimal predictor for the nonlinear state-space model (4.17) is, in general, not possible. Approximate predictors, e.g, the extended Kalman filter (Anderson and Moore, 1979) can then be used. A simple predictor is the noise-free simu-
4.2
Identification of Robot Manipulators
55
lated system output of (4.17) x(t + Ts ) = fd (x(t), u(t), 0, θ), ˆ + Ts |t) = hd (x(t + Ts ), u(t + Ts ), 0, θ). y(t
(4.24a) (4.24b)
However, this only works for stable systems, since a stable predictor is always required. For closed loop identification, prediction-error methods that describe the true noise properties can be used for accurate estimates (small bias). However, some methods may fail, e.g., output error methods. For a thorough description of timedomain methods, see Ljung (1999) or Söderström and Stoica (1989). The gray-box and black-box models can also be identified in the frequency domain. One way of doing this is to minimize the least squares error between the estimated nonparametric FRF and the parametric model FRF. The frequencydomain methods are described in, e.g., Pintelon and Schoukens (2001). In Paper B, it is shown that a time-domain prediction-error method for a nonlinear system can be approximated by a frequency-domain gray-box identification method. Finally, an illustrative example of frequency-domain gray-box identification. The physical parameters of the the single-axis flexible joint model in Section 4.1.3 can be approximated by inspecting the estimated FRF from torque to acceleration, according to Figure 4.12, and using (4.9)–(4.10). The inertias can be estimated from the low- and high frequency gains, and the elasticity parameters can be estimated, e.g., from the frequency and gain of the anti-resonance. Note that the accuracy can be increased by fitting a parametric FRF over the whole frequency true = range. The resulting parameters are Ja = 0.052 (Jatrue = 0.050), Jm = 0.009 (Jm true true 0.010), k = 26 (k = 25), and d = 0.032 (d = 0.025).
4.2
Identification of Robot Manipulators
This section briefly describes the identification of some models needed for the control and simulation of robot manipulators. The most important models for this work are the • Kinematic model • Rigid dynamic model • Elastic dynamic model Other important models subject to identification but not further described are, e.g., friction models, backlash and hysteresis models, thermal models, fatigue models, actuator models, and sensor models. For a more thorough survey of identification methods for robot manipulators, see, e.g., Kozlowski (1998) and Wernholt (2007).
56
4
Identification of Robot Manipulators
60 Magnitude [dB]
50
24.3 dB => J + J = 0.061 a
m
40 41.3 dB => Jm = 0.009
30 20 10
−31.2 dB => d = 0.032 3.6 Hz => k = 26
0 0
10
1
10 Frequency [Hz]
Figure 4.12: Approximate parameter estimation by inspecting the estimated FRF from motor torque to motor acceleration.
4.2.1
Identification of Kinematic Models and Rigid Dynamic Models
The described models depend on a number of parameters. The kinematic link parameters consist of lengths and angles. The dynamic model depends on the kinematic link parameters as well as the inertial link parameters. The accuracy of these models depends on the accuracy of these parameters. The parameter values could in some cases be obtained from the CAD models of the robot manipulator, and in other cases from measurements of the individual parts of the robot. If these methods are not accurate enough or simply not possible to perform, then identification of the unknown parameters can be used to obtain the unknown parameter values. This type of identification is usually denoted gray-box identification as described in Section 4.1.4. The nominal kinematic model of a large industrial robot typically gives a volumetric accuracy of 2–15 mm due to the tolerances of components and variations in the assembly procedure. This does not fulfill the accuracy requirement for off-line programming of, e.g., a spot-welding application. By identification of the kinematic parameters of the individual manipulator, as well as the elastostatic model, used for compensating the deflection due to gravity, a volumetric accuracy of ±0.5 mm can be obtained. It is also interesting to be able to identify the rigid dynamic model (2.3). This can be performed as a verification of the CAD model parameters when a new robot is developed or for direct use in the controller. The rigid dynamic model can be
4.2
57
Identification of Robot Manipulators
expressed as (Sciavicco and Siciliano, 2000) ˙ q)π, ¨ τ = H(q, q,
(4.25)
where π is a vector of the unknown dynamic parameters. The model thus has the property of linearity in the parameters. The parameters, called base parameters, are not the same as the original link inertial parameters which, in general, cannot all be identified. The parameters in π are a set of uniquely identifiable parameters, and consist of different combinations of the physical parameters described in Section 3.2.1, e.g., Jyy + m(ξx2 + ξz2 ). If measurements of torques and positions are performed along an exciting trajectory, the identification problem can be formulated as a linear regression τ(t1 ) H(t1 ) . . τ = .. = .. π = H π, (4.26) τ(tN ) H(tN ) and the solution is obtained as the least-squares solution T
T
π = (H H)−1 H τ.
(4.27)
Note that the speed and acceleration, if not measured, must be estimated from the measured positions. For the identification to be possible, the movements of the manipulator during the identification experiment must reveal information of all unknown parameters, i.e., the excitation must be rich enough. Furthermore, the movements should not excite the mechanical resonances of the manipulator. Identification of dynamic parameters is further described in, e.g., Swevers et al. (2007).
4.2.2
Identification of Elastic Dynamic Models
This section gives some examples of proposed identification methods for flexible robot manipulators. Most articles on flexible manipulator identification consider local models, i.e., models valid in one configuration, of black-box or gray-box type. Moreover, the standard assumption is that all parameters are unknown, and most suggested identification methods therefore estimate all parameters in one step. In Pham et al. (2001), all physical parameters of a single-input singleoutput (SISO) model are identified by linear regression, using a linear-in-parameter model structure. This is exemplified with measurements on both motor and joint side, but some parameters (stiffness and mass) can be identified with motor measurements only. In Pham et al. (2002), this method is extended with acceleration measurements on the joint side. A multiple-input multiple-output (MIMO) black-box model of two robot axes is identified from motor side measurements in Johansson et al. (2000) by use of a subspace method in combination with a friction estimation. A gray-box prediction error method is used in Östring et al. (2003) to identify all physical parameters of a SISO model, using motor measurements only. Inverse eigenvalue theory is used to identify a mass-spring model of any order in Berglund and Hovland (2000), also using motor measurements only. This method is extended to MIMO models in Hovland et al. (2001). Ex-
58
4
Identification of Robot Manipulators
perimental modal analysis is used in Behi and Tesar (1991) to identify the local masses, springs, and dampers of an industrial manipulator. The system is then excited by an impact hammer and the response measured by accelerometers. An introduction to modal analysis can be found in Avitabile (2001). Identification methods for global flexible joint models have also been suggested. Prior knowledge of the rigid body parameters is assumed in Hovland et al. (1999), where the stiffness and damping parameters are identified by using a frequency domain method where the frequency domain model is linear in the unknown parameters. This method works for MIMO flexible joint models with motor measurements only, and is exemplified on two axes of an industrial manipulator. A three-step identification method is suggested in Wernholt and Gunnarsson (2006). The first step identifies nonlinear friction and rigid body parameters using a separable least-squares approach, the second step is based on Berglund and Hovland (2000) and identifies approximate elasticity parameters and refines some rigid body parameters, and the last step further refines some parameters by time-domain nonlinear gray-box identification. The method is applied to one axis of an industrial manipulator using a three-mass model and a nonlinear transmission stiffness (stiffening spring). In Albu-Schäffer and Hirzinger (2001) the rigid body parameters are assumed to be known from CAD models, while the friction and elasticity parameters are identified in separate identification experiments. The elasticities of the transmissions are identified from impulse response experiments for each individual joint before the assembly of the robot, using joint torque sensors. In Hardeman (2008), an identification method for an extended flexible joint model with transmission and bearing elasticity, is suggested. The method is based on the assumption that all DOFs (motor position, transmission and bearing deflection) are measurable. The unknown elasticity parameters are solved by linear regression. However, the measurement system used was not accurate enough for measuring the elastic deflections. An alternative method which further develops the ideas in Hovland et al. (2001) is then used for estimating the transmission stiffness. However, the bearing stiffness cannot be identified using this method, and the uncertainty of the estimated transmission stiffness is rather large, e.g., standard deviations larger than 30 %.
4.2.3
Identification of the Extended Flexible Joint Dynamic Model
In Papers A and B, and in Wernholt (2007), an identification procedure for the unknown elastic parameters of the extended flexible joint model (3.19), described in Section 3.2.4, is proposed. The model is global and nonlinear. The identification procedure is a frequency-domain gray-box method and can be summarized as: 1. Local nonparametric models are estimated in a number of configurations. The models are frequency response functions, FRFs.
4.3
Summary
59
2. The nonlinear parametric robot model is linearized in each of these configurations. 3. The parametric FRFs of these linearized models are obtained for a value of the unknown parameter vector. 4. The model FRFs and the estimated nonparametric FRFs are compared and an error computed. The parameter vector is adjusted to minimize the error. 5. Repeat from 3 until some criteria is fulfilled. Paper B provides a detailed description of this method, and shows that it is an approximation of a time-domain prediction-error method. The method is exemplified, by estimating the elasticity parameters of a six-axes industrial robot. Some problems with applying a time-domain identification method to this problem is also discussed. Paper A show that the flexible joint model cannot describe a modern industrial robot accurately, and that the extended model increases the accuracy.
4.3
Summary
In system identification there are alternative choices concerning the experimental setup, excitation signals, model types, and identification methods. The following aspects have been discussed: • Experimental setup – Open loop – Closed loop • Excitation signal – Periodic (e.g., multisine) – Non-periodic (e.g., chirp or step) • Model type – Nonparametric (e.g., step response or frequency response function) – Parametric (e.g., discrete-time linear black-box or continuous-time nonlinear gray-box) • Identification method – Time-domain methods (e.g., prediction-error methods) – Frequency-domain methods However, there are many aspects of system identification not mentioned in this brief description, e.g., validation, experimental design, noise models, and model quality measures like bias and variance. The interested reader is referred to the literature cited in this chapter.
60
4
Identification of Robot Manipulators
Identification is often used for parameter estimation of robot manipulator models. The following cases have been discussed: • Identification of kinematic parameters • Identification of rigid dynamic models by linear regression • Identification of local and global elastic dynamic models Although, methods for identification of global elastic models have been suggested, the amount of published research in this area is surprisingly small compared to the amount of research that has been published on sophisticated control concepts for these assumed global models. To the authors knowledge, no global validation of the flexible joint model has been published for a multi-axes industriallike robot manipulator. Moreover, no global validation or identification of a lumped parameter model (e.g., an extended flexible joint model) for a multiaxes industrial-like robot manipulator has been published. Paper A validates the global extended flexible joint model and Paper B (and its predecessors described in Section 1.2) describes such an identification procedure.
5
Control of Robot Manipulators
5.1
Introduction
Advanced motion control of robot manipulators has been studied by academic and industrial researchers since the beginning of the 1970’s. A historical summary with many early references is given in Craig (1988). This chapter is a survey of position control methods for articulated robot manipulators1 , suggested in the literature. Control during contact with the environment, as for example in the case of force control, will not be treated. The actuator is assumed to be an electrical motor, and the motor torque control will not be treated. It is assumed that the motor torque control is ideal, and that the torque reference generated by the position controller is equal to the real motor torque2 . Furthermore, even though friction is the dominating source of error in some cases, e.g., at low speed, control methods specially designed for dealing with friction will not be covered. The emphasis will be on control methods for handling the elasticity of the manipulator, without influence of tool contact dynamics. This is the far most usual case for industrial robot applications today. The focus will be on methods applicable to a typical industrial robot, i.e., an elastic manipulator with gear transmissions, where the only measured variables are the motor angular positions. Some of the described methods assume that more variables are measured but can in many cases be modified such that actuator position only is sufficient, e.g., by using state estimation, which is briefly 1 Results for manipulators of parallel linkage type are also applicable to a large extent for serial link manipulators and vice versa. 2 Experiments have shown that this is a reasonable approximation when the current- and torquecontrol servo has an appropriate tuning and uses feedforward.
61
62
5
Control of Robot Manipulators
described. The main approach for controlling an elastic manipulator is considered to be linear feedback in combination with nonlinear feedforward- or feedback linearization control. Therefore, these methods will be described in some detail. This is also motivated by the fact that Papers C–G treat these control methods. Some examples of methods not treated here, or only briefly mentioned, are iterative learning control, adaptive control, backstepping, sliding mode control, neural networks, singular perturbations, composite control, input shaping, passivity-based control, and robustification by Lyapunov’s second method. Two survey articles with many references are Sage et al. (1999) and Benosman and Le Vey (2004). The manipulator to be controlled is an elastic multibody system. The system is multivariable and strongly coupled, and its highly nonlinear dynamics changes rapidly as the manipulator moves within its working range. Moreover, for a robot with gear transmissions, the gears have nonlinearities such as hysteresis, backlash, friction, and nonlinear elasticity. The actuators have non-ideal characteristics with internally generated disturbances, e.g., torque ripple disturbances. For a typical industrial robot, the controlled variable (tool position and orientation), is not measured, and the only measured variable is the actuator position (motor angular position). This position measurement can be impaired with a high level of measurement noise as well as deterministic disturbances. For industrial manipulators, the dynamic position accuracy requirements for low speed applications (e.g., laser cutting), can be 0.1 mm at 20 mm/s. For high-speed applications, such as dispensing, the maximum allowed error can be 0.5 mm at 500 mm/s, without visible vibrations. Another requirement could be short cycle time, which means high acceleration. Thus, the control problem can, in general, not be solved by applying smooth trajectories to avoid exciting the mechanical resonances. The conclusion is that the flexible manipulator control problem is a challenging task. The control of robot manipulators can be described and classified in many ways, according to, e.g., • type of drive system (direct drive or gear transmission). • type of model used for the (model-based) control (rigid models, flexible joint models, or flexible link models). • controlled variable (position, speed, compliance, or force). • motion type considered (high-speed continuous path tracking, low-speed continuous path tracking, point-to-point movement, tracking in contact with the environment, or regulation control). • type of control law (linear/nonlinear, feedback/feedforward, static/dynamic, robust/adaptive). • type of measurements (actuator position, actuator speed, link position, link speed, link acceleration, link torque, tool position, tool speed, tool acceleration, tool force, or tool torque).
5.2
Control of Rigid Manipulators
63
Figure 5.1: General robot controller structure. Observer reconstruction is enabled by the dashed line, feedback linearization by the dotted line. A general controller structure is illustrated in Figure 5.1. The desired tool trajectory zd is described in Cartesian coordinates, and z is the actual trajectory3 , also described in Cartesian coordinates. The reference- and feedforward generation block (FFW) computes the feedforward torque uffw and the state references x¯d used by the feedback controller (FDB), with a correction torque, ufdb , as output. The manipulator has uncertain parameters, illustrated as a feedback with unknown parameters ∆, and is exposed to disturbances d and measurement noise e. The measured signals are denoted ym . Note that the dimension of x¯d and ym may differ if some states are reconstructed by FDB. The purpose of the FFW is to generate model-based references for perfect tracking (if possible). The purpose of the FDB is, under the influence of measurement noise, to stabilize the system, reject disturbances, and to compensate for errors in the FFW.
5.2
Control of Rigid Manipulators
Although this work is primarily focused on flexible manipulators, the control of rigid manipulators is a good starting point for this survey. A rigid manipulator can here, from a control point of view, be interpreted as a manipulator with the lowest mechanical resonances well above the bandwidth of the control. A directdrive manipulator with stiff links is an example of a manipulator with resonances at high frequencies. In direct-drive manipulators, the motor axes are directly coupled to the links, and the negative effects of gear transmissions are eliminated, i.e., friction, backlash, and elasticity. The N-link rigid manipulator has N degreesof-freedom, and the joint angle q, can be regarded as output variable since it can be computed from the Cartesian tool position and vice versa (by using the inverse and forward kinematics). Hence, the reference to the controller can be chosen as 3 z is used instead of x to denote the Cartesian position and orientation to avoid confusion with the states of the system.
64
5
Control of Robot Manipulators
Figure 5.2: Diagonal PD control (independent joint PD control).
Figure 5.3: Feedforward control combined with diagonal PD control.
the desired joint angle qd (t).
5.2.1
Feedback Linearization and Feedforward Control
A summary of control methods and experimental results for rigid direct-drive robots can be found in An et al. (1988). In the model-based approaches, the rigid dynamic model (3.10) is used. The first method described is called independent joint PD control, and is illustrated in Figure 5.2. The controller for the direct drive manipulator is given by ˙ u = Kp (qd − q) + Kv (q˙ d − q),
(5.1)
˙ and the desired position and where the measured position and speed are q and q, speed are qd and q˙ d . The control signal is the reference torque u. Finally, Kv and Kp are diagonal gain matrices with obvious dimensions. In this method, the multivariable couplings between the axes are regarded as unmodeled disturbances. The second method shown in Figure 5.3 is called feedforward control, and is an
5.2
Control of Rigid Manipulators
65
Figure 5.4: Feedback linearization (computed torque control) combined with outer-loop diagonal PD control.
extension of the PD controller with a feedforward torque uffw according to ˙ u = uffw + Kp (qd − q) + Kv (q˙ d − q), ˆ d )q¨d + c(q ˆ d , q˙ d ) + g(q ˆ d ). uffw = M(q
(5.2a) (5.2b)
Note that the reference qd must be at least twice differentiable. The ˆ signs indicates that a model, that always differs from the true system, is used by the controller. The third method described is called computed torque control, and is illustrated in Figure 5.4. In this approach the system is first partly linearized by canceling the nonlinear dynamics c(qd , q˙ d ) + g(qd ) with a feedback term. The system is then linearized and decoupled by multiplying the controller output with the inverse system, i.e., the mass matrix. Ideally, the resulting system is a system of decou¨ The natural choice of controller, with output pled double integrators, i.e., v = q. v, is again a PD controller. The first approaches of linearizing a nonlinear system by nonlinear feedback can be found in the robotics literature from the 1970’s. The computed torque controller is ˆ ˆ q) ˙ + g(q), ˆ u = M(q)v + c(q, ˙ v = q¨d + Kp (qd − q) + Kv (q˙ d − q).
(5.3a) (5.3b)
The terminology in this field is somewhat confusing. Computed torque can sometimes denote the feedforward control law, and sometimes the linearizing and decoupling control law. With standard control terminology, the control methods can also be described as diagonal PD control, feedforward control, and feedback linearization control. These terms will be used from now on. In both of these model-based methods it is necessary to solve the inverse dynamics problem, i.e., compute the torque from the desired trajectory. Also note that one part of the feedback linearization controller output in Figure 5.4 is computed from the feedforward acceleration q¨d .
66
5
Control of Robot Manipulators
The bullets below summarize results concerning tracking errors according to An et al. (1988), for the diagonal PD, feedforward, and feedback linearization control methods, when applied to the main axes of a direct-drive manipulator (the MIT serial-link direct-drive arm). A smooth fifth order polynomial trajectory with high speed and acceleration (360 deg/s and 850 deg/s2 ) was used in the experiments. • For two axes, the model-based controllers reduced the tracking error to 2 deg compared to 4 deg with PD control. No significant difference between feedforward and feedback linearization was noticed. • The third axis had the same tracking error, 4 deg, for all three methods. This was explained by unmodeled motor dynamics and bearing friction in combination with low inertia. • The sampling time was critical for the model-based methods. It affected the discretization error but also the possible level of feedback gain. • The feedforward control method was believed to be the best choice for free space movements. For cases with large disturbances, the feedback linearization controller was believed to yield better results. One reflection concerning these results is that the PD controller performance was surprisingly good. It should also be noted that a feedforward controller has the advantage that it, in principle, can even be computed off-line in order to save online computer load. Even if the feedforward is computed on-line, the sample rate of the feedforward computations does not affect the stability of the system. Thus, it might be possible to save computer load by using a lower sample rate since it will not reduce the stability. On the other hand, the feedback linearization controller is a part of the feedback loop, and could cause instability if the model errors are large. A more recent publication on the same topic is Santibanez and Kelly (2001). The conclusion in this and a number of other articles is the same as in An et al. (1988). Feedforward control gives the same tracking performance as feedback linearization and is the preferred choice. Feedback linearization control and diagonal PD control is also evaluated with respect to tracking performance of a direct-drive manipulator in Khosla and Kanade (1989). The conclusion is that feedback linearization control gives better performance than diagonal PD control, and that it is important to include the centripetal and Coriolis terms in the linearization. A final reflection on this topic is that the test cases studied in the referred articles are typically a few test trajectories in each article, and only with the best possible model. Feedback linearization and feedforward based on high-accuracy models should give the same tracking performance if the sample rate is chosen such that the discretization effects are negligible. It would be very interesting to see a comparative study concerning robustness to model errors and disturbance rejection, for the different published methods.
5.3
Control of Flexible Joint Manipulators
5.2.2
67
Other Control Methods for Rigid Manipulators
In this section, some examples of other control methods that have been considered for the control of rigid manipulators, are given. Adaptive Control Adaptive control of direct-drive manipulators is studied in, e.g., Craig (1988). The model parameters of the feedback linearization controller described in the previous section are adapted on-line. An experimental study on two direct-drive axes of the Adept One robot is also included. It is shown that the constant gain default controller yields a better result than the adaptive controller. However, it is believed that more fine tuning and a new implementation of the adaptive controller concept could improve the result. Nonlinear Robust Control A nonlinear outer-loop controller, replacing the PD controller, can be used to robustify the feedback linearization controller. One example of such a controller, based on Lyapunov’s Second Method, is described in Spong et al. (2006), and shown to reduce the tracking errors when model errors are present. Another proposed controller is the Sliding Mode Controller. One example of this controller type used for robustification of a feedback linearization controller is described in Bellini et al. (1989), where the sliding mode controller was shown to decrease control errors caused by an approximative model. Both the Lyapunov- and the sliding mode controllers result in a discontinuous control signal (chattering) that can increase motor losses and excite unmodeled dynamics. Methods for decreasing the chattering exist for both of these controller types. A summary of control methods for rigid manipulators is given in Spong (1996).
5.3
Control of Flexible Joint Manipulators
The flexible joint model, as described in Section 3.2.2, is a more realistic description of an industrial robot with gear transmissions. This model has elastic gear transmissions and rigid links. The N-link manipulator model has 2N degrees-offreedom and, as in the case of the rigid manipulator, the Cartesian position z, or the joint angles q, can be regarded as the output variable since the links are rigid. Hence, the reference to the controller is assumed to be the vector of desired joint angles qd .
5.3.1
Feedback Linearization and Feedforward Control
Feedback linearization and feedforward control can be regarded as the main approaches for the control of flexible joint manipulators, and will therefore be treated in some detail.
68
5.3.2
5
Control of Robot Manipulators
Simplified Flexible Joint Model
The model is here given by Ma (qa )q¨a + c(qa , q˙ a ) + g(qa ) + K(qa − qm ) = 0, Mm q¨m + K(qm − qa ) = u,
(5.4a) (5.4b)
where the same notations as in Section 3.2.2 are used, except that the control signal, the motor torque, is denoted u. In Spong (1987) and Spong et al. (2006), control methods for the simplified flexible joint model are discussed. In the simplified model, the inertial couplings between the links and the motors are neglected. Furthermore, the viscous damping is also neglected in order to simplify the controller design. In Spong (1987) it is shown that a manipulator described by this model can be linearized and decoupled by static feedback linearization. As for the rigid model described in the previous section, the flexible joint model can be used for feedforward control or feedback linearization. The feedforward approach is described in, e.g, De Luca (2000). The flexible joint manipulator is an example of a differentially flat system (Rouchon et al., 1993). Such a system can be defined as a system where all state variables and control inputs can be expressed as an algebraic function of the desired trajectory for a flat output, and its derivatives, up to a certain order. The flat output is the selected output variable of the system. Feedback linearization by static or dynamic state feedback is equivalent to differential flatness (Nieuwstadt and Murray, 1998). Solving (5.4a) for qm , and differentiating twice, we get an expression for q¨m , adding (5.4a) to (5.4b), and inserting the expression for q¨m yields ¨ a (qa , q˙ a , q¨a )q¨a + u = (Ma (qa ) + Mm )q¨a + c(qa , q˙ a ) + g(qa ) + Mm Kg−1 [M [3]
[4]
[3]
˙ a (qa , q˙ a )qa + Ma (qa )qa + c(q ¨ a , q˙ a , q¨a , qa ) + g(q ˙ a , q˙ a , q¨a )], 2M
(5.5)
where x[i] denotes d i x/dt i . This expression shows that the system is differentially flat with the flat output qa and that the control signal can be expressed as [3]
[4]
u = τm (qa , q˙ a , q¨a , qa , qa ).
(5.6)
Using the states h x = qaT
q˙ aT
q¨aT
i [3]T T
qa
,
(5.7)
the feedback linearization control law can be expressed as u = τm (x1m , x2m , x3m , x4m , v),
(5.8)
where xjm are the measured states, and v is a new control signal for the linearized [4]
and decoupled system qa = v consisting of N independent chains of four integrators. For tracking control, v can be chosen as [4]
v = qad + L1 (xd − xm ),
(5.9)
where L1 ∈ RN ×4N is a linear feedback gain matrix and xd , xm are the reference
5.3
69
Control of Flexible Joint Manipulators
states and the measured states respectively. The fourth derivative of the reference [4] trajectory is denoted qad . The derived control law is a combination of feedback and feedforward where the feedback part is dominating. The feedback gain matrix can be computed, e.g., by using LQ optimal control (Anderson and Moore, 1990). It is also possible to find a feedforward-dominant control law according to [4]
u = τm (x1d , x2d , x3d , x4d , qad ) + L2 (xd − xm ),
(5.10)
where, ideally in the case of a perfect model, all torques needed for the desired trajectory are computed by feedforward calculations, i.e., based on the reference states xd . Note that the desired trajectory qd must be at least four times differentiable for both the feedback linearization and the feedforward control laws. The feedback linearization control law (5.8) gives constant bandwidth of the feedback controller for all robot configurations. For constant bandwidth there would be no need for gain scheduling. Due to the varying manipulator dynamics, gain scheduling, or some other model-based feedback gain computation, is probably needed in the feedforward control law (5.10). A simulation study comparing these two control algorithms is presented in Paper E. Furthermore, feedforward control for an extended flexible joint model is investigated in Paper C and D.
5.3.3
Complete Flexible Joint Model
The complete flexible joint model (3.13) cannot be linearized by static state feedback. However, if the viscous damping is excluded, any flexible joint model can be linearized and decoupled by dynamic state feedback as shown in De Luca (1988) and De Luca and Lanari (1995). The static feedback controller described in the previous section has the form u = α(x) + β(x)v,
(5.11)
where x are the states, v are the new control signals for the linearized system, and α( · ), β( · ) are nonlinear functions of appropriate dimensions. The dynamic feedback controller has the form (De Luca and Lanari, 1995) ξ˙ = α(x, ξ) + β(x, ξ)v,
(5.12a)
u = γ(x, ξ) + δ(x, ξ)v,
(5.12b)
where ξ are the internal states of the controller (α( · ), β( · ), γ( · ), and δ( · ) are nonlinear functions of appropriate dimensions). The proof that the complete model is feedback linearizable is based on the fact that the system is invertible with no zero dynamics. Given a desired trajectory and its derivatives up to a certain order, the motor states and the required torques can be computed recursively. The solution is based on the fact that S in (3.13) is upper triangular. This result can also be used for feedforward control based on the complete model (De Luca, 2000). Static or dynamic feedback linearization can also be performed when the damping term is included but in this case only inputoutput linearization is possible (De Luca et al., 2005). Input-output linearization can be used since the zero dynamics is stable.
70
5
Control of Robot Manipulators
The complete model increases the complexity of the linearization procedure considerably. The requirement on the smoothness of qd is high using these control laws. If the manipulator has N links, qd must be 2(N + 1) times differentiable compared to four times for the simplified flexible joint model as described in Section 5.3.2.
5.3.4
State Estimation
All states must be available for feedback in order to use the control laws (5.8) and (5.10). However, the feedforward control law (5.10) can be combined with, e.g., a PD controller for the actuator position, which only requires the motor states to be available (De Luca, 2000). The motor position is available for all industrial manipulators considered, and the motor speed can be estimated by, e.g., differentiation of the motor position. This means that a simplified version of the feedforward control law is possible to evaluate on a standard industrial robot, if the required computational capacity is available. The feedback linearization control law (5.8) requires the link position, speed, acceleration, and jerk for each link to be measured. This means that some of the states, e.g., the acceleration and jerk, must be estimated from the available measurements. If differentiation is used for estimating the higher order derivatives, the measurement noise is likely to reduce the performance. If link position, link speed, motor position, and motor speed are measured, the link acceleration and jerk can be computed by using the model (Siciliano and Khatib, 2008, Chapter 13). However, it is likely that the robustness and performance will be impaired, compared to full-state measurements, since the controller will depend on (uncertain) model parameters to a higher degree. Estimation of states can be performed by observers. One well-known type of observer for linear systems is the Kalman filter (Anderson and Moore, 1979) where the observer gain is computed based on a stochastic description of the measurement- and system disturbances. For nonlinear systems, the extended Kalman filter, can be used. The gain of an observer with the same structure as the Kalman filter can also be determined by pole placement of the observer error dynamics. Another type of observer is the reduced observer, sometimes called Luenberger observer. Nonlinear observers are treated in, e.g., Isidori (1995) and Robertsson (1999). A state observer for the linear system x˙ = Ax + Bu, y = Cx can be expressed as ˆ xˆ˙ = Axˆ + Bu + K(y − C x), where xˆ is the estimated state vector and K is the observer gain. A nonlinear observer for the motor position, motor speed, link position, and link speed is suggested in De Luca et al. (2007). The observer works for both the simplified and the complete flexible joint model, and requires measurements of
5.3
Control of Flexible Joint Manipulators
71
motor position and link acceleration. The observer does not depend on the inertial link parameters but on the motor inertias, the joint spring-damper pairs, and the kinematic link parameters describing the accelerometer locations. For an N -link manipulator, M accelerometers are needed, with M ≥ N . The observer is characterized by a linear and decoupled error dynamics. The observer is evaluated on the three main axes of an industrial robot, as well as in closed loop with the feedforward control law decribed in Section 5.3.2. The result is a significant improvement, with respect to damping and overshoot, compared to a control law using motor states only. An experimental evaluation of observers for tool position estimation is described in Henriksson et al. (2009). Both the observer from De Luca et al. (2007) and the extended Kalman filter are evaluated with an emphasis on tuning and robustness. The Kalman filter showed better robustness, although a simple nonlinear deterministic observer is preferred for on-line control, due to the less expensive computations. More references on nonlinear observers for flexible joint robots can be found in De Luca et al. (2007).
5.3.5
Feedback Control
A feedback controller is needed to stabilize the system, reject disturbances, and to compensate for errors in the feedforward (if used). This section is a brief overview of feedback control for flexible joint robots. A general multivariable linear state feedback controller with integral action is Z i u = L(xd − xm ) + Li (xdi − xm ), (5.13) L ∈ RN ×4N is a linear feedback gain matrix, xd ∈ R4N are the reference states, and xm ∈ R4N are the measured or estimated states. Li ∈ RN ×N is a diagonal matrix of integral gains, and x i are the states used by the integral term. Several state representations are possible, but here, it is assumed that the states are h iT T T x = qm (5.14) qaT q˙ m q˙ aT . For full-state multivariable control, the feedback gains L and Li of (5.13) can be computed by LQ design (Anderson and Moore, 1990). If not all states are measured, a Kalman filter (Anderson and Moore, 1979) can be used for state estimation and combined with LQ design. The resulting controller is then called an LQG controller. LQ and LQG control are natural ways of approaching the flexible joint control problem as the design weights for the controlled variable (qa ) can be explicitly tuned. However, for uncertain and disturbed systems, the tuning of the state weights might not be intuitive, and the tuning of the Kalman filter covariances is even harder. The LQG approach for flexible joint robots is described in, e.g., Ferretti et al. (1998), Östring and Gunnarsson (1999) and Elmaraghy et al. (2002). The combination of LQG and disturbance observers is described in Ji et al. (2008). An alternative design method for state feedback and state estimation is pole placement (Kailath, 1980; Rugh, 1996; Kautsky et al., 1985). A similar
72
5
Control of Robot Manipulators
multivariable controller can also be designed using H∞ methods (Skogestad and Postlethwaite, 1996). For a single axis flexible joint system, a general state feedback controller is d d − q˙ m )+ − qm ) + Kpa (αpa qad − qa ) + Kvm (αvm q˙ m u = Kpm (αpm qm Z Z d + Kva (αva q˙ ad − q˙ a ) + Kim (qm − qm ) + Kia (qad − qa ),
(5.15)
where one of the integral gains must be zero to avoid saturation or oscillations due to the double integral parts. The gains α can be used for setpoint weighting (Åström and Hägglund, 2006). Note that, e.g., a PID controller for the motor variables often is implemented as a cascade controller, with an inner PI controller for speed control and an outer P controller for position control. If not all states are measured, the controller uses only partial state feedback. For the case of only motor side measurements, a PD controller for the motor position is suggested in Tomei (1991), i.e., all gains in (5.15) are zero except Kpm , αpm and Kvm . In, Tomei (1991), it is also proved that the suggested controller globally stabilizes the manipulator around a reference position if gravity compensation is used. A practical controller for industrial systems also need an integral part on the motor side, i.e., Kim , 0. Another controller, suitable for relatively stiff systems, has all gains zero except Kpa , αpa , Kvm , αvm , and Kia . Here, αvm can also be zero if no speed reference is used. This controller combines high accuracy on the arm side with good damping. Using only the arm side measurements results in a low performance controller and the best control is of course obtained by using all states (if available) and with integral part on the arm side. More discussion on these issues can be found in Spong et al. (2006) and Siciliano and Khatib (2008, Chapter 13). To illustrate the effects of different feedback configurations, a singlelink flexible joint robot (Figure 5.5) is used in the following configurations: 1. PD control with motor feedback, no speed reference (Kpm , αpm , and Kvm used). 2. PD control with arm position- and motor speed feedback, no speed reference (Kpa , αpa , and Kvm used). 3. PD control with arm feedback and lead filter on PD output, no speed reference (Kpa , αpa , and Kva used). 4. Full state feedback, no speed references (Kpa , αpa , Kva , Kpm , αpm , Kvm used). 5. PD control with arm feedback, no speed reference (Kpa , αpa , and Kva used). The test consists of a filtered position reference step, followed by a pulse disturbance torque on the arm, and finally a pulse disturbance torque on the motor. The result is shown in Figures 5.6–5.8. PD control when measuring arm variables only, clearly results in a slow controller which is very sensitive to disturbances. However, with a more complex controller design, the performance can be improved. The use of a lead filter, that improves the phase by adding phase lead,
5.3
73
Control of Flexible Joint Manipulators
1
1
0.5
0.5 qa [rad]
qa [rad]
Figure 5.5: Linear model of a SISO flexible joint robot.
0
−0.5
0
0
−0.5
0.5
1 Time [s]
1.5
0
0.5
1
1.5
Time [s]
Figure 5.6: Arm position (solid) and position reference (dashed) for case 1 and 2. 1: Motor feedback (left). 2: Arm/Motor feedback (right). Arm disturbance at 0.5 s, motor disturbance at 1.0 s.
is just an example to show this. Full state feedback gives the best result as expected. Note that the tunings are just examples (with an effort to be fair) for the different controller configurations. Effects of measurement noise and controller robustness have not been studied. However, from the tuning of the different controller configurations, it is clear that the configurations using arm feedback only (case 3 and 5), are not very robust. This can be explained by the concept of collocation. A collocated system measures the response at the same location as the actuator input is applied, i.e., measuring the motor in our case, whereas a non-collocated system measures the response at another location, i.e., after the flexibility in our case. This can be illustrated by the benchmark model of Paper F (Figure 5.9). Figure 5.10 shows the frequency response from the control signal (motor torque) to the positions of the different masses. Clearly, the more flexibility between the torque input and the sensor, the more phase lag in the feedback loop. Important aspects, often neglected in the robotics literature, are disturbance rejection and consequences of discrete-time implementation. This is the motivation for the two benchmark problems described in Papers F and G. The controllers presented up to now, must in practice most certainly be extended to deal with disturbances and stability issues. Loop shaping techniques, e.g., QFT (Horowitz, 1991), can be used for this part of the controller design.
5
1
1
0.8
0.8
0.6
0.6
qa [rad]
qa [rad]
74
0.4
0.4 0.2
0.2 0 0
Control of Robot Manipulators
0.5
1
1.5
0 0
0.5
1
Time [s]
1.5
Time [s]
Figure 5.7: Arm position (solid) and position reference (dashed) for case 3 and 4. 3: Arm feedback + lead filter (left). 4: Full state feedback (right). Arm disturbance at 0.5 s, motor disturbance at 1.0 s.
0
a
q [rad]
−2 −4 −6 −8 −10 −12 0
5
10
15
Time [s]
Figure 5.8: Arm position (solid) and position reference (dashed) for case 5. Arm feedback. Arm disturbance at 5 s, motor disturbance at 10 s. Note the scaling of the axes!
Figure 5.9: The SISO benchmark model.
5.3
75
Control of Flexible Joint Manipulators
Mag [dB]
−500 0
1
2
0
10 10 Magnitude Mass 2
−20 −40 −60 −80 −100 0
10
1
10 Phase Mass 2
2
−500 0
10
1
10 Frequency [Hz]
2
10
1
10 Phase Mass 1
2
10
0 −500 0
10
10
0
0 −20 −40 −60 −80 10
Mag [dB]
Mag [dB]
2
10
0
10
Phase [deg]
1
10 Phase Motor
Phase [deg]
0 −20 −40 −60 −80 0 10
Magnitude Mass 1
Phase [deg]
Phase [deg]
Mag [dB]
Magnitude Motor
0 −50 −100 −150 0 10
1
2
10 10 Magnitude Mass 3
1
10 Phase Mass 3
2
10
0 −500 0
10
1
10 Frequency [Hz]
Figure 5.10: Frequency response of the SISO benchmark model.
2
10
76
5.3.6
5
Control of Robot Manipulators
Minimum-Time Control
Minimum-time control can also be used for generating the feedforward torque uffw and the references states x¯d from Figure 5.1. The trajectory- and feedforward generation are here combined, as the trajectory reference zd is also generated. In this section, minimum-time control is exemplified for a single-axis flexible joint manipulator. Minimum-time control of robot manipulators can be divided into the minimumtime path-following problem and the minimum-time point-to-point problem. For the path-following problem, there are path constraints along the path and the robot is not allowed to deviate from the desired path. For the point-to-point problem, only the start and end positions are specified. There are two main approaches for solving minimum-time problems. Direct methods transcribe the problem to a nonlinear program (NLP) (Betts, 2001) and indirect methods solve the problem by solving the equations resulting from optimality conditions, e.g., the Pontryagin maximum principle (Bryson and Ho, 1975). The time-optimal control of rigid robot manipulators with path constraints is approached with direct methods in, e.g., Verscheure et al. (2009), and an indirect approach to the same problem is considered in, e.g, Shiller (1994). An article concerning the general problem of path-constrained trajectory optimization is Betts and Huffmann (1993). Dahl (1992) approaches the problem with direct and indirect methods and also shows some results for the flexible joint manipulator. A linear model of a single-axis flexible joint robot arm (Figure 5.5) can be described by Jm q¨m = k(qa − qm ) + d(q˙ a − q˙ m ) + u, Ja q¨a = −k(qa − qm ) − d(q˙ a − q˙ m ).
(5.16a) (5.16b)
The motor and arm inertia are described by Jm and Ja , respectively, the gear-box stiffness and damping are k and d, and the applied motor torque is u. The motor angular position is qm and the arm angular position is qa . The minimum-time problem for a point-to-point movement (constraint on control variable u only) can be solved using direct transcription. If the problem is discretized using M iT h time-steps, sample-time h, states x = qm qa q˙ m q˙ a , movement distance ∆q, and maximum allowed motor torque umax , we get the following nonlinear program (NLP): min
u(k),x(k),h
s.t.
M X
h = Mh,
k=1
x(k + 1) = f (x(k), u(k), h), h iT x(1) = 0 0 0 0 , h iT x(M) = ∆q ∆q 0 0 , |u(k)| ≤ umax ,
5.3
77
Control of Flexible Joint Manipulators
Position [rad]
0.06 0.04 0.02 0 0
Link Position Motor Position 0.05
0.1
0.15
0.2
Torque [Nm]
2000
0.25
0.3
Motor Torque Link Torque
1000 0 −1000 −2000 0
0.05
0.1
0.15 Time [s]
0.2
0.25
0.3
Figure 5.11: Minimum-time control of single-link flexible joint manipulator with eigenfrequency 5 Hz and motor torque constraint |u(k)| ≤ 2000 Nm. Movement time is 0.21 s.
i.e., the problem is to minimize the sample time, which is a free parameter. The h iT optimization parameters are u(1), . . . , u(M), x(1), . . . , x(M), h . Figure 5.11–5.12 show the result for two different manipulator elasticities. The test case is a short movement of 0.05 rad which is discretized with M = 60 steps. The near minimum-time solution approaches bang-bang control with three switches. The manipulator eigenfrequency in the two cases are 5 Hz and 1 Hz, which result in movement times of 0.21 s and 0.45 s, respectively. The minimum time for the rigid system is 0.2 s. Clearly, the elasticity and the eigenfrequency should be taken into account for time-optimal trajectory generation as well as for robot design.
If a constraint on the link torque (i.e., gearbox torque τgear = k(qa − qm ) + d(q˙ a − q˙ m )) is added to the optimization problem, the solution approaches seven switches according to Figure 5.13. An approximative solution to the problem is to compute the minimum-time trajectory for the rigid system, i.e. bang-bang control with one switch (Bryson and Ho, 1975), and then use flexible joint feedforward control (5.10) with the rigid trajectory reference as input. However, this is not feasible since the feedforward torque depends on the second acceleration derivative, [4] qad . One alternative is shown in Figure 5.14 where a rigid trajectory reference [4]
with a limited qad is constructed, and combined with flexible joint feedforward control (Lambrechts et al., 2004). The movement time is somewhat larger for this approximative solution and the constraints cannot in general be guaranteed.
78
Position [rad]
5
Control of Robot Manipulators
0.06 0.04 0.02 Link Position Motor Position
0 0
0.1
0.2
0.3
0.4
Torque [Nm]
2000
0.5
Motor Torque Link Torque
1000 0 −1000 −2000 0
0.1
0.2
0.3 Time [s]
0.4
0.5
Figure 5.12: Minimum-time control of single-link flexible joint manipulator with eigenfrequency 1 Hz and motor torque constraint |u(k)| ≤ 2000. Movement time is 0.45 s.
Position [rad]
0.06 0.04 0.02 0 0
Link Position Motor Position 0.05
0.1
0.15
0.2
0.25
Torque [Nm]
2000
0.3
Motor Torque Link Torque
1000 0 −1000 −2000 0
0.05
0.1
0.15 0.2 Time [s]
0.25
0.3
Figure 5.13: Minimum-time control of single-link flexible joint manipulator with eigenfrequency 5 Hz, motor torque constraint |u(k)| ≤ 2000, and gearbox torque constraint |τgear (k)| ≤ 1000. Movement time is 0.25 s.
5.3
79
Control of Flexible Joint Manipulators
Position [rad]
0.06 0.04 0.02 0 0
Link Position Motor Position 0.05
0.1
0.15
0.2
Torque [Nm]
2000
0.25
0.3
Motor Torque Link Torque
1000 0 −1000 −2000 0
0.05
0.1
0.15 Time [s]
0.2
0.25
0.3
Figure 5.14: Approximate minimum-time control of single-link flexible joint manipulator with eigenfrequency 5 Hz, motor torque constraint |u(k)| ≤ 2000, and gearbox torque constraint |τgear (k)| ≤ 1000. Movement time is [4]
0.27 s. The trajectory reference has a limited value of qad and flexible joint feedforward is used.
5.3.7
Experimental Evaluations
This section presents some reported experimental evaluations of control methods for flexible joint manipulators. In Swevers et al. (1991), an industrial robot from KUKA is used for evaluation of an improved trajectory generation, and a model-based control concept. The robot was equipped with three extra encoders in order to measure the link positions of the main axes. The motor positions were measured by the standard controller. A state feedback controller combined with feedforward control based on a flexible joint model was evaluated and compared with the standard controller for this robot. The trajectory generation was also modified to yield a trajectory based on a 9th order polynomial. The performance of the standard- and model-based controllers were evaluated using some test cases4 defined in the industrial robot test standard ISO 9283 (ISO, 1998). The tests showed significant improvements compared to the standard KUKA industrial controller implementation. The conclusion was that the smooth trajectory from the new trajectory generation contributed most, but also that the new flexible controller improved the performance at very high velocities and accelerations. Jankowski and Van Brussel (1992b) mention some problems with feedback linearization, such as the complexity of the control laws, the need for measurement or estimation of link acceleration and jerk, and the need for high sampling fre4 Settling time, overshoot, and path-following error according to the ISO standard were evaluated.
80
5
Control of Robot Manipulators
quencies. The suggested solution is a discrete-time formulation of the inverse dynamics which requires the solution of an index-3 differential algebraic equation. Some experimental results are presented in Jankowski and Van Brussel (1992a). In Caccavale and Chiacchio (1994), an experimental evaluation on an industrial robot with gear transmission is reported. The robot is the SMART-3 6.12R robot from COMAU. A feedforward torque was added to the conventional PID controller output. Sample times were 1 ms and 10 ms for the PID controller and the feedforward computation, respectively. The feedforward torque calculations were based on a rigid dynamic model in identifiable form, as described in Section 4.2.1. The path error was decreased from 3.4 mm to 1.1 mm at a speed of 2 rad/s and an acceleration of 6 rad/s2 . It was concluded that the diagonal inertia terms are the most important terms for use in feedforward. In Grotjahn and Heimann (2002), model-based control of a KUKA KR15 manipulator is described. It is concluded that the nonlinear multibody dynamics and the nonlinear friction are the dominating reasons for path deviation, and that the elasticity does not need to be considered. No torque interface to the controller was available. Instead a path correction interface is used together with a feedforward control method called nonlinear precorrection based on an identified rigid body model including friction. Improvement by learning control and training of the feedforward controller is discussed and evaluated. Learning control can compensate for all deviations whereas the feedforward training only compensates for the modeled effects. Thus, learning gives better performance but is very sensitive to path changes after the learning where the feedforward training is more roboust. The different algorithms improve the path-following in a path defined by the ISO 9283 standard. A full-state feedback controller is presented in Albu-Schäffer and Hirzinger (2000). The motor position qm and the joint output torque τ are measured for each h iT T T joint. By numerical differentiation, the state vector x = qm q˙ m τ T τ˙ T is obtained. The state feedback controller is diagonal, i.e., based on an independent joint approach that neglects the disturbance due to the strong coupling. Gravity and friction compensation is added to the controller, and gain scheduling based on the diagonal inertial terms is also suggested. A Lyapunov-based proof of global stability is given. The experimental evaluation is performed on a DLR light-weight robot and shows that the bandwidth of the proposed controller is twice the bandwidth of a motor PD controller, given the same damping requirement. This type of controller is further developed and analyzed in Le Tien et al. (2007) and Albu-Schäffer et al. (2007). In Zhu (2007), a seven-axes robot with harmonic drives gearboxes is controlled by an adaptive joint-torque controller, where the friction parameters and the gearbox stiffness are continuously adapted. The outer position control loop is based on virtual decomposition control. Here, qa , q˙ a , q¨a , qm , q˙ m , τ, and τ˙ are used by the controller. Only the positions and torques are measured, and the derivatives are estimated by numerical differentiation. The result was particulary good at ultra-
5.4
Control of Flexible Link Manipulators
81
low speeds, due to the adaptive friction compensation. Virtual decomposition control is further described in Zhu (2010).
5.4
Control of Flexible Link Manipulators
This section describes some proposed control methods for the flexible link model described in Section 3.2.5. The choice of coordinates and reference frames is not unique and there is more than one possible approximate description of the same system (Book, 1993). If the actuator torque is applied at one point of the distributed structure, and the response is measured at another point, the system is non-collocated, and if the finite dimensional approximation of a beam-like system has a sufficiently large number of assumed modes, the system description will be non-minimum phase. This means that if the Cartesian end effector position is to be controlled, the system can be non-minimum phase, and the inverse dynamics is then hard to obtain. The control methods described in this section are in general feedforward control methods combined with a feedback controller of, e.g., PD-type. If the desired Cartesian trajectory zd is known for t ∈ [0, T ], the desired beam tip angles yd , in Figure 3.11, can be computed by the inverse kinematics. In De Luca et al. (1998) it is shown that the state trajectories and the control torque can be obtained by solving an ordinary differential equation (ODE). The problem is to find a bounded solution to this ODE as the system is normally non-minimum phase, i.e., no bounded causal5 solutions to the inverse dynamics exist. Three different methods for solving the problem are suggested, and one is experimentally evaluated. This method finds a non-causal solution by applying iterative learning control (ILC) for time t ∈ [−∆, T + ∆]. A different approach for the problem of point-to-point motion is described for a one-link manipulator in De Luca and Di Giovanni (2001a). Here, an auxiliary output is designed and used as output variable of the system. In this case the angle yd points to a location where the system is minimum phase, but close to non-minimum phase. In De Luca and Di Giovanni (2001b) the same problem is solved for a two-link manipulator of which one link is flexible. A method based on dividing the inverse system in a causal and an anti-causal part is presented in Kwon and Book (1990). The method is limited to linear systems, i.e., one-link manipulators. In De Luca and Siciliano (1993) it is shown that a PD controller with gravity feedforward is globally asymptotically stable for the flexible link manipulator. The robust control problem of a four-link flexible manipulator is treated in Wang et al. (2002). An H∞ controller for regional pole-placement is designed for the uncertain linearized system. The controller is evaluated by simulation, and tests 5 The output of a causal system depends only on past inputs, whereas the output of a non-causal system also depends on future inputs. Hence, a non-causal solution to the inverse dynamics, outputs a torque before the start of a movement.
82
5
Control of Robot Manipulators
on an experimental manipulator show that the proposed controller has better performance than an LQ controller. To summarize, the control of the flexible link manipulator is complicated by the fact that the system can be non-minimum phase. There are several alternatives for solving the problem, e.g., • Find a stable non-causal solution of the inverse dynamics as described in the references of this section. • Choose a new output so that the system becomes minimum phase, e.g., the joint angle for a flexible link robot. The new output should be a reasonable approximation of the original output. • For a linear discrete-time system, the zero phase tracking controller (Torfs et al., 1991; Tung and Tomizuka, 1993) can be used. • In Aguiar et al. (2005) a reformulation from tracking to path-following6 is suggested. By parameterizing the geometrical path X by a path variable θ, and then selecting a timing law for θ, the inverse dynamics for the nonminimum phase system can be stabilized.
5.5
Industrial Robot Control
As described in Section 1.1, the control algorithms used by robot manufacturers are seldom published. This section gives a few examples of known facts about the control of commercial robots7 , taken from public information sources. In Grotjahn and Heimann (2002) it is claimed that the feedback controller of a KUKA robot is a cascaded controller with an inner speed controller of PI type with sample time 0.5 ms. The outer loop is a position controller with 2 ms sample time. Only the position is measured, and the speed is estimated by differentiation and low-pass filtering. The controller can thus be described as a diagonal PID controller. A sliding mode controller based on an elastic model of two-mass type is suggested in Nihei and Kato (1993) by Fanuc. The motivation is the reduction of vibrations in short point-to-point movements in, e.g., spotwelding applications. A patent by Fanuc (Nihei et al., 2007) describes a method for reduction of vibrations in robot manipulators. The method is based on observer estimation of the link position. The estimated variable is then used in a controller of internal model control (IMC) type. The controller is based on a linear elastic SISO model of two-mass type. On their web-site (Fanuc, 2007), the new Fanuc controller R-J3iC offers enhanced vibration control as a feature. Fanuc has recently applied for a patent 6 The path-following error is in fact a more relevant performance measure for industrial applications as reflected by the ISO 9283 standard. 7 The examples are restricted to the four major robot manufacturers, i.e., Fanuc, Motoman, ABB, and KUKA.
5.6
Conclusion
83
on arm position feedback, called secondary position feedback control (Tsai et al., 2010). The motion control of ABB robots is described as model-based control, and the accuracy in continuous path tracking is claimed to be very high (Madesäter, 1995). The model-based controller is implemented in a controller functionality denoted TrueMove, and the time-optimal path generation is denoted QuickMove. An improved version of this functionality is called The Second Generation of TrueMove and QuickMove (ABB, 2007) and further described in Björkman et al. (2008). Finally, Motoman has a control concept called Advanced Robot Motion (ARM) control for high-performance path accuracy and vibration control (Motoman, 2007). Clearly, high performance motion control is important for the industrial robot manufacturers. The actual algorithms used are hard to reveal, and an article or a patent does not mean for sure that the described technology is actually used in the product. It is also clear that the performance of industrial robots can be very high. This indicates that advanced concepts for motion control are used. Some examples of obtained performance for the "best in class" commercial robots during optimaltime movements: • Path-following error of large robots with considerable link- and joint flexibilities and a payload of more than 200 kg can be in the order of 2 mm at 1.5 m/s according to the ISO 9283 standard, i.e., when the maximum path-following error is considered. The mean error is considerably smaller, about 0.5 mm. • The corresponding errors for a medium-sized robot with a payload of 20 kg could be maximum 0.5 mm and mean 0.1 mm. • A positioning time of 0.25 s is obtained for a 50 mm point-to-point movements for the large 200 kg payload robot described above. Time is measured from start of movement until the tool is inside an error band of 0.3 mm. This means that there are almost no vibrations or overshoots when reaching the final position. • Dynamic position accuracy better than 0.15 mm considering maximum error, and with a mean value of 0.05 mm at 50 mm/s in laser-cutting applications when using iterative learning control (ILC).
5.6
Conclusion
Control of flexible joint and flexible link manipulators is a large research area with numerous publications, and almost every possible control method ever invented has been suggested for dealing with these systems. This survey has described only the main approaches.
84
5
Control of Robot Manipulators
It is clear that the theoretical foundation of the control methods, and the ability to prove stability, is in focus for many academic robot control researchers. Evaluation of nominal and robust performance of the proposed methods, is often neglected. From the reported simulation studies and experimental evaluations, it is in fact quite hard to judge what the attainable performance is for the different methods. It is true that it can be hard to use commercial robots for control evaluations, and that some methods require a larger computational capacity than currently available in present robot controllers. However, simulation studies are always possible to perform. One further comment is that an integral term is most certainly needed in order to handle model errors and disturbances in a real application. The reason for avoiding the integral term in many publications is probably motivated mainly by the need to prove stability. The following facts regarding the tracking and point-to-point performance are at least indicated in the experimental results presented in this survey: 1. Model-based control improves the performance of an industrial-type robot. 2. A rigid model can improve the performance although the robot has elastic gear transmissions. 3. A flexible joint model improves the performance even more. It is not clear whether the nonlinear model should be used in the feedback loop, i.e., feedback linearization, or in the feedforward part of the controller. 4. More measurements improve the result, e.g., measurement of link position or acceleration.
6
Conclusion
This first part of the thesis has served as an introduction to modeling and control of robot manipulators. The aim has been to show how the included papers in Part II relate to the existing methods, and to motivate the need for the research presented. In Section 6.1 a summary of the results is given. Suggestions for future research in this area are discussed in Section 6.2.
6.1
Summary
This thesis has investigated aspects on modeling and control of elastic manipulators. The work is motivated by the industrial trend to develop weight- and costminimized robot manipulators. A large amount of applied research is needed in order to maintain and improve the motion performance of new generations of robot manipulators. The approach adopted in this thesis is to improve the model-based control by developing and validating more accurate elastic models. A model, called the extended flexible joint model, is suggested for use in motion control systems, as well as for robot design and performance simulation. Different aspects of this model, illustrated in Figure 6.1, are treated in this thesis. 85
86
6
Conclusion
Figure 6.1: A 9 DOF extended flexible joint model with 2 links, 2 motors (M), 3 elastic elements (EE) and 3 rigid bodies (RB).
Magnitude (dB)
60 40 20 0 60 40 20 0 60 40 20 0 60 40 20 0 60 40 20 0 60 40 20 0 −20 2
10 50
10 50
10 50 10 50 Frequency (Hz)
10 50
10 50
Figure 6.2: The magnitude of a 6 × 6 frequency response function (FRF), describing the dynamics between applied motor torques and motor accelerations. Nonparametric FRF obtained from measurements (dashed) and parametric model FRF (solid).
A procedure for multivariable identification of the unknown elastic parameters
6.1
87
Summary
of the extended model is proposed and described in Papers A and B. The procedure is applied for identifying these parameters of a real six-axes industrial robot. Paper B gives a detailed description of the proposed frequency-domain gray-box method, and shows that the proposed method is an approximation of a timedomain prediction-error method. Paper A shows that the flexible joint model is insufficient for modeling a modern industrial manipulator accurately, and that the extended model significantly improves the model accuracy. An example of measured- and modeled frequency response functions is shown in Figure 6.2.
Reference Path
1
Z [m]
0.5
0
−0.5 0
0.5
1 X [m]
1.5
2
Figure 6.3: Snapshots from an animation of a movement resulting from control using the inverse extended flexible joint model. The manipulator is described by a 5 DOF extended flexible joint model with 2 actuated joints and 1 non-actuated joint (the outer joint). The reference path is shown as a dotted line with the direction indicated by the solid arrow. The motor angular positions (transformed to the arm side) are indicated by the dashed lines, and the joint angular positions are indicated by the solid lines.
In Papers C and D, the inverse dynamics of the extended model is derived and studied. The inverse dynamics solution can be used for feedforward control. It is shown that the inverse dynamics can be computed as the solution of a highindex differential algebraic equation (DAE). Different DAE solvers are suggested and evaluated, both for minimum phase and non-minimum phase systems. A simulation study is presented in Paper C, and in Paper D, the suggested concept for inverse dynamics is experimentally evaluated using an industrial robot manipulator. Figure 6.3 illustrates the inverse dynamics solution. The conclusion
88
6
Conclusion
is that the extended flexible joint inverse dynamics method can improve the accuracy for manipulators with significant elasticities, that cannot be described by the flexible joint model. Paper E investigates the discrete-time implementation of the feedback linearization approach for a realistic three-axes flexible joint robot model and compares the result with a feedforward approach. An example trajectory from the evaluation is shown in Figure 6.4. The conclusion is that feedforward control gives better performance and reduces the requirements on the controller- and sensor hardware.
Figure 6.4: 20 Monte Carlo simulations, where the uncertain robot executes a circular trajectory, using a feedback linearization controller.
Figure 6.5: The SISO Benchmark Robot Model.
Robust feedback control of a one-axis four-mass model, illustrated in Figure 6.5,
6.1
89
Summary
is studied in Paper F. The proposed SISO benchmark problem concerns disturbance rejection for the uncertain robot manipulator using a discrete-time controller. The benchmark model is validated by experiments on a real industrial manipulator. Several proposed solutions are presented and analyzed. The conclusion is that, for the uncertain SISO system using motor measurements only, it is hard to improve the result of a PID-controller. One proposed solution not included in Paper F is Varso et al. (2005).
Figure 6.6: The MIMO Benchmark System.
Finally, Paper G presents a MIMO benchmark problem for a nonlinear two-link manipulator with elastic nonlinear gear transmissions, illustrated in Figure 6.6. This problem also concerns disturbance rejection for the uncertain robot manipulator using a discrete-time controller. The benchmark model is validated by experiments on a real industrial manipulator. Two solutions have been received for this benchmark problem: A Solution A (unpublished) has a controller that is based on a nominal model with robot configuration dependence. The (SISO) controllers uses polynomial pole placement with additional closed loop poles to increase the robustness. The states are estimated by a Kalman filter. The resulting performance, using the proposed controller, is worse than the performance of the default PID controller included in the benchmark problem. B Solution B is based on a robust frequency-domain method called QFD, which is an extension of quantitative feedback theory (QFT), see, Horowitz (1991). The solution is described in Yaniv and Pila (2009), and the resulting (SISO) controllers are filtered PD controllers in series with two complex lead filters. The controller has a slightly worse performance than the default PID controller. To summarize, no solutions with better performance than the default PID controller has yet been received. The conclusion is that, for the uncertain MIMO system using motor measurements only, it is hard to improve the result of a diagonal PID-controller. However, no multivariable controller has yet been proposed.
90
6
6.2
Conclusion
Future Research
Based on the experience obtained from the work described in this thesis, several research-related questions have come up. Thus, it would have been interesting to proceed working on the following topics: • Modeling and Identification – Identification methods with minimum energy, i.e., minimum experiment time and minimum amplitude. – Identification of transmission nonlinearities. – Automatic frequency-weight selection. – Automatic gray-box model structure selection. – Identification of elasticity models with more DOF than described in this thesis. – Identification based on both motor position and arm side measurements. Some possibilities are position, speed, or acceleration for the joints/links and/or the tool. This will include investigations of the optimal accelerometer/gyro placement, in combination with optimal configurations for identification. • Feedforward Control – Experimental evaluation of feedforward control based on the extended flexible joint model, using a more complicated and realistic robot, e.g., a six-axes industrial robot. – Extended theoretical analysis of the inverse dynamics problem (e.g., solvability, controllability and uniqueness). – Development of more efficient DAE solvers. – Development of alternative solvers for non-minimum phase dynamics. – Development of approximate control algorithms for on-line computation. • Feedback Control – Design of a MIMO controller for the MIMO benchmark problem, including experimental evaluation. – Further development of robust feedback control using additional arm sensors, e.g., arm side encoders, accelerometers, or gyros.
Bibliography
ABB. IRB 6640 - ABB announce a new stronger robot - the next generation. http://www.abb.com/cawp/seitp202/ ce7d8060f91e36e4c125736a0024afb5.aspx, 2007. 2007-12-03. A.P. Aguiar, J.P. Hespanha, and P.V. Kokotivic. Path-following for nonminimum phase systems removes performance limitations. IEEE Transactions on Automatic Control, 50(2):234–239, 2005. F. Al-Bender, V. Lampaert, , and J. Swevers. The generalized maxwell-slip model: A novel model for friction simulation and compensation. IEEE Transactions on Automatic Control, 50(11):1883–1887, 2005. A. Albu-Schäffer and G. Hirzinger. Parameter identification and passivity based joint control for a 7DOF torque controlled light weight robot. In Proc. 2001 IEEE International Conference on Robotics and Automation, pages 2852–2858, Seoul, Korea, May 2001. A. Albu-Schäffer and G. Hirzinger. State feedback controller for flexible joint robots: A globally stable approach implemented on DLR’s light-weight robots. In Proceedings of the 2000 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 1087–1093, Takamatsu, Japan, October 2000. A. Albu-Schäffer, C. Ott, and G. Hirzinger. A unified passivity-based control framework for position, torque and impedence control of flexible joint robots. The International Journal of Robotics Research, 26(1):23–39, 2007. C.H. An, C.G Atkeson, and J.M. Hollerbach. Model-Based Control of a Robot Manipulator. The MIT press, Cambridge, Massachusetts, 1988. B. Anderson and J.B. Moore. Optimal Filtering. Dover Publications, Inc, Mineola, New York, 1979. B. Anderson and J.B. Moore. Optimal Control: Linear Quadratic Methods. Prentice-Hall, Englewood Cliffs, NJ, USA, 1990. B. Armstrong-Hélouvry. Control of Machines with Friction. Kluwer Academic Publishers, Norwell, Massachusetts, USA, 1991. 91
92
Bibliography
K.J. Åström. The future of control. Modeling, Identification and Control, 15(3): 127–134, 1994. K.J. Åström and T. Hägglund. Advanced PID Control. ISA - The Instrumentation, Systems and Automation Society, Research Triangle Park, NC, USA, 2006. ISBN 1-55617-942-1. K.J. Åström and B. Wittenmark. Computer-Controlled Systems: Theory and Design. Prentice Hall, Englewood Cliffs, New Jersey, USA, 1996. P. Avitabile. Experimental modal analysis - a simple non-mathematical presentation. Sound and vibration, 35(1):20–31, January 2001. L. Bascetta and P. Rocco. Modelling flexible manipulators with motors at the joints. Mathematical and Computer Modelling of Dynamical Systems, 8(2): 157–183, 2002. F. Behi and D. Tesar. Parametric identification for industrial manipulators using experimental modal analysis. IEEE Transactions on Robotics and Automation, 7(5):642–52, 1991. A. Bellini, G. Figalli, and G. Ulivi. Sliding mode control of a direct drive robot. In Conference Record of the IEEE Industry Application Society Annual Meeting, vol.2, pages 1685–1692, San Diego, CA, USA, 1989. M. Benosman and G. Le Vey. Control of flexible manipulators: A survey. Robotica, 22:533–545, 2004. E. Berglund and G. E. Hovland. Automatic elasticity tuning of industrial robot manipulators. In 39th IEEE Conference on Decision and Control, pages 5091– 5096, Sydney, Australia, December 2000. D.S. Bernstein. On bridging the theory/practise gap. IEEE Control Systems Magazine, 19(6):64–70, 1999. J. T. Betts. Practical Methods for Optimal Control Using Nonlinear Programming. Society for Industrial and Applied Mathematics, Philadelphia, 2001. J. T. Betts and W. P. Huffmann. Path-constrained trajectory optimization using sparse sequential quadratic programming. Journal of Guidance, Control, and Dynamics, 16(1):59–68, 1993. M. Björkman, T. Brogårdh, S. Hanssen, S.-E. Lindström, S. Moberg, and M. Norrlöf. A new concept for motion control of industrial robots. In Proceedings of 17th IFAC World Congress, 2008, Seoul, Korea, July 2008. W. Book and K. Obergfell. Practical models for practical flexible arms. In Proc. 2000 IEEE International Conference on Robotics and Automation, pages 835– 842, San Fransisco, CA, 2000. W.J. Book. Controlled motion in an elastic world. Journal of Dynamic Systems Measurement and Control, Transactions of the ASME, 115:252–261, 1993.
Bibliography
93
T. Brogårdh. Present and future robot control development—an industrial perspective. Annual Reviews in Control, 31(1):69–79, 2007. T. Brogårdh. Robot control overview: An industrial perspective. Modeling, Identification and Control MIC, 30(3):167–180, 2009. T. Brogårdh and S. Moberg. Method for determining load parameters for a manipulator. US Patent 6343243, Januari 2002. URL http://www.patentstorm. us/patents/6343243.html. T. Brogårdh, S. Moberg, S. Elfving, I. Jonsson, and F. Skantze. Method for supervision of the movement control of a manipulator. US Patent 6218801, April 2001. URL http://www.patentstorm.us/patents/6218801. A. E. Bryson and Y.-C. Ho. Applied Optimal Control: Optimization, Estimation, and Control. Taylor and Francis, 1975. F. Caccavale and P. Chiacchio. Identification of dynamic parameters and feedforward control for a conventional industrial manipulator. Control Eng. Practice, 2(6):1039–1050, 1994. C. Canudas de Wit, H. Olsson, K.J. Åström, and P. Lischinsky. A new model for control of systems with friction. IEEE Transactions on Automatic Control, 40 (3):419–425, 1995. A. Carvalho Bittencourt, E. Wernholt, S. Sander-Tavallaey, and T. Brogårdh. An extended friction model to capture load and temperature effects in robot joints. In Proceedings of the 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems, Taipei, Taiwan, October 2010. J.J. Craig. Adaptive Control of Mechanical Manipulators. Addison-Wesley Publishing Company, Menlo Park, California, USA, 1988. J.J. Craig. Introduction to Robotics Mechanics and Control. Addison Wesley, Menlo Park, California, USA, 1989. O. Dahl. Path Constrained Robot Control. PhD thesis, Lund Institue of Technology, SE-221 00 Lund, Sweden, 1992. A. De Luca. Feedforward/feedback laws for the control of flexible robots. In Proceedings of the 2000 IEEE International Conference on Robotics and Automation, pages 233–240, San Francisco, CA, April 2000. A. De Luca. Dynamic control of robots with joint elasticity. In Proceedings of the 1988 IEEE International Conference on Robotics and Automation, pages 152–158, Philadelphia, PA, 1988. A. De Luca and G. Di Giovanni. Rest-to-rest motion of a one-link flexible arm. In 2001 IEEE/ASME International Conference on Advanced Intelligent Mechatronics Proceedings, pages 923–928, Como, Italy, 2001a. A. De Luca and G. Di Giovanni. Rest-to-rest motion of a two-link robot with a
94
Bibliography
flexible forearm. In 2001 IEEE/ASME International Conference on Advanced Intelligent Mechatronics Proceedings, pages 929–935, Como, Italy, 2001b. A. De Luca and L. Lanari. Robots with elastic joints are linearizable via dynamic feedback. In 34th IEEE Conference on Decision and Control, pages 3895–3897, New Orleans, LA, 1995. A. De Luca and B. Siciliano. Closed-form dynamic model of planar multilink lightweight robots. IEEE Transactions on Systems, Man, and Cybernetics, 21 (4):826–839, 1991. A. De Luca and B. Siciliano. Regulation of flexible arms under gravity. IEEE Transactions on Robotics and Automation, 9(4):463–467, 1993. A. De Luca, S. Panzieri, and G. Ulivi. Stable inversion control for flexible link manipulators. In Proc. 1998 IEEE International Conference on Robotics and Automation, pages 799–804, Leuven, Belgium, May 1998. A. De Luca, R. Farina, and P. Lucibello. On the control of robots with viscoelastic joints. In Proc. 2005 IEEE International Conference on Robotics and Automation, pages 4297–4302, Barcelona, Spain, 2005. A. De Luca, D. Schröder, and M. Thummel. An acceleration-based state observer for robot manipulators with elastic joints. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3817–3823, Roma, Italy, April 2007. R. Dhaouadi, F. H. Ghorbel, and P. S. Gandhi. A new dynamic model of hysteresis in harmonic drives. IEEE Transactions on Industrial Electronics, 50(6):1165– 1171, 2003. H.A. Elmaraghy, T. Lahdhiri, and F. Ciuca. Robust linear control of flexible joint robot systems. Journal of Intelligent and Robotic Systems: Theory and Applications, 34(4):335–356, 2002. Fanuc. R-30iA - Product detail. http://www.fanucrobotics.cz/ products/robots/controller.asp?idp=317&id=13, 2007. 2007-1203. B. Feeny and F.C. Moon. Chaos in a forced dry-friction oscillator: Experiments and numerical modelling. Journal of Sound and Vibration, 170(3):303–323, 1994. G. Ferretti, G. Magnani, and P. Rocco. LQG control of elastic servomechanisms based on motor position measurements. In AMC’98 - Coimbra. 1998 5th International Workshop on Advanced Motion Control. Proceedings, pages 617–622, Coimbra, Portugal, 1998. H. Goldstein. Classical Mechanics. Addison-Wesley Publishing Company, Reading, Massachusetts, USA, 1980.
Bibliography
95
M. Grotjahn and B. Heimann. Model-based feedforward control in industrial robots. The International Journal of Robotics Research, 21(1):45–60, 2002. S. Gunnarsson, M. Norlöf, G. Hovland, U. Carlsson, T. Brogårdh, T. Svensson, and S. Moberg. Pathcorrection for an industrial robot. US Patent 7130718, October 2006. URL http://www.patentstorm.us/patents/7130718.html. T. Hardeman. Modelling and Identification of Industrial Robots including Drive and Joint Flexibilities. Phd thesis, University of Twente, The Netherlands, February 2008. G.G. Hastings and W.J. Book. A linear dynamic model for flexible robotic manipulators. IEEE Control Systems Magazine, 7(1):61–64, 1987. R. Henriksson, M. Norrlöf, S. Moberg, E. Wernholt, and T. Schön. Experimental comparison of observers for tool position estimation of industrial robots. In Proceedings of 48th IEEE Conference on Decision and Control, pages 8065– 8070, Shanghai, China, December 2009. I. Horowitz. Survey of quantitative feedback theory (QFT). International Journal of Control, 53(2):255–291, 1991. G. E. Hovland, E. Berglund, and S. Hanssen. Identification of coupled elastic dynamics using inverse eigenvalue theory. In 32nd International Symposium on Robotics (ISR), pages 1392–1397, Seoul, Korea, April 2001. G.E. Hovland, E. Berglund, and O.J. Sørdalen. Identification of joint elasticity of industrial robots. In Proceedings of the 6th International Symposium on Experimental Robotics, pages 455–464, Sydney, Australia, March 1999. G.E. Hovland, S. Hanssen, E. Gallestey, S. Moberg, T. Brogårdh, S. Gunnarsson, and M. Isaksson. Nonlinear identification of backlash in robot transmissions. In Proc. 33rd ISR (International Symposium on Robotics), Stockholm, Sweden, October 2002. IFR. International federation of robotics - statistics 2010. http://www.ifr. org/uploads/media/2010_Executive_Summary_rev.pdf, 2010. A. Isidori. Nonlinear Control Systems. Springer-Verlag, London, Great Britain, 1995. ISO. ISO 9283:1998, manipulating industrial robots - performance criteria and related test methods. http://www.iso.org, 1998. K.P. Jankowski and H. Van Brussel. An approach to discrete inverse dynamics control of flexible-joint robots. IEEE Transactions on Robotics and Automation, 8(5):651–658, October 1992a. K.P. Jankowski and H. Van Brussel. An approach to discrete inverse dynamics control of flexible-joint robots. Journal of Dynamic Systems, Measurement, and Control, 114:229–233, June 1992b.
96
Bibliography
H. Jerregård and N. Pihl. Method for controlling a robot. US Patent 7209802, April 2007. URL http://www.patentstorm.us/patents/7209802. html. C.-Y. Ji, T.-C. Chen, and Y.-L. Lee. Joint control for flexible-joint robot with input-estimation approach and LQG method. Optimal Control Applications and Methods, (29):101–125, 2008. R. Johansson. System Modeling and Identification. Prentice Hall, 1993. R. Johansson, A. Robertsson, K. Nilsson, and M. Verhaegen. State-space system identification of robot manipulator dynamics. Mechatronics, 10(3):403–418, 2000. T. Kailath. Linear Systems. Prentice Hall, Englewood Cliffs, New Jersey, USA, 1980. T. R. Kane and D. A. Levinson. The use of Kane’s dynamical equations in robotics. International Journal of Robotics Research, 2(3), 1983. T. R. Kane and D. A. Levinson. Dynamics: Theory and Applications. McGrawHill Publishing Company, 1985. J. Kautsky, N.K. Nichols, and P. Van Dooren. Robust pole assignment in linear state feedback. International Journal of Control, 41(5):1129–1155, 1985. P.K. Khosla and T. Kanade. Real-time implementation and evaluation of computed-torque scheme. IEEE Transactions on Robotics and Automation, 5 (2):245–253, 1989. P. Kokotovic and M. Arcak. Constructive nonlinear control: a historical perspective. Automatica, 37:637–662, 2001. K. Kozlowski. Modelling and identification in robotics. Advances in Industrial Control. Springer, London, 1998. D.-S. Kwon and W.J. Book. An inverse dynamic method yielding flexible manipulator state trajectories. In Proceedings of the 1990 American Control Conference, vol 1, pages 186–193, San Diego, CA, USA, 1990. P. Lambrechts, M. Boerlage, and M. Steinbuch. Trajectory planning and feedforward design for high performance motion systems. In Proceedings of the 2004 American Control Conference, Boston, Massachusetts, 2004. L. Le Tien, A. Albu-Schäffer, and G. Hirzinger. Mimo state feedback controller for a flexible joint robot with strong joint coupling. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3824–3830, Roma, Italy, April 2007. M. Lesser. The Analysis of Complex Nonlinear Mechanical Systems: A Computer Algebra assisted approach. World Scientific Publishing Co Pte Ltd, Singapore, 2000.
Bibliography
97
L. Ljung. System Identification: Theory for the User. Prentice Hall, Upper Saddle River, New Jersey, USA, 2nd edition, 1999. L. Ljung and T. Glad. Control Theory. CRC Press, 2001. ISBN 0748408789. Å. Madesäter. Faster and more accurate industrial robots. Industrial Robot, 22 (2):14–15, 1995. S. Moberg. Robust control of a multivariable nonlinear flexible manipulator - a benchmark problem. www.robustcontrol.org, 2007. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. S. Moberg and S. Hanssen. On feedback linearization for robust tracking control of flexible joint robots. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009. S. Moberg and S. Hanssen. Inverse dynamics of robot manipulators using extended flexible joint models. 2010. Submitted to IEEE Transactions on Robotics (under revision). S. Moberg and J. Öhr. Svenskt mästerskap i robotreglering. In Swedish Control Meeting 2004, Göteborg, Sweden, May 26-27 2004. S. Moberg and J. Öhr. Robust control of a flexible manipulator arm: A benchmark problem. Prague, Czech Republic, 2005. 16th IFAC World Congress. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. IEEE Transactions on Control Systems Technology, 17(6):1398–1405, November 2009. S. Moberg, E. Wernholt, S. Hanssen, and T. Brogårdh. Modeling and parameter estimation of robot manipulators using extended flexible joint models. 2010. Submitted to Journal of Dynamic Systems Measurement and Control, Transactions of the ASME. Motoman. Introducing NX100 - the Next Generation of Robot Controller. http: //www.motoman.co.uk/NX100.htm, 2007. 2007-12-03. M.J. Van Nieuwstadt and R.M. Murray. Real-time trajectory generation for differentially flat systems. International Journal of Robust and Nonlinear Control, 8 (11):995–1020, 1998.
98
Bibliography
R. Nihei and T. Kato. Servo control for robot. In 24th International Symposium on Industrial Robots (ISIR), Tokyo, Tokyo, Japan, 1993. R. Nihei, T. Kato, and S Arita. Vibration control device. US Patent 7181294, February 2007. URL http://www.patentstorm.us/patents/7181294. html. M. Norrlöf. Iterative Learning Control: Analysis, Design, and Experiments. PhD thesis, Linköping University, SE-581 83 Linköping, Sweden, 2000. J. Öhr, S. Moberg, E. Wernholt, S. Hanssen, J. Pettersson, S. Persson, and S. SanderTavallaey. Identification of flexibility parameters of 6-axis industrial manipulator models. In Proc. ISMA2006 International Conference on Noise and Vibration Engineering, pages 3305–3314, Leuven, Belgium, September 2006. H. Olsson. Control Systems with Friction. PhD thesis, Lund Institue of Technology, SE-221 00 Lund, Sweden, 1996. A.V. Oppenheim and R.W. Schafer. Digital Signal Processing. Prentice Hall, Englewood Cliffs, New Jersey, USA, 1975. M. Östring and S. Gunnarsson. LQG control of a flexible servo. In Second conference on Computer Science and Systems Engineering in Linköping, CCSSE99, pages 125–132, October 1999. M. Östring, S. Gunnarsson, and M. Norrlöf. Closed-loop identification of an industrial robot containing flexibilities. Control Engineering Practice, 11:291– 300, March 2003. M. T. Pham, M. Gautier, and Ph. Poignet. Identification of joint stiffness with bandpass filtering. In 2001 IEEE International Conference on Robotics and Automation, pages 2867–72, Seoul, Korea, May 2001. M. T. Pham, M. Gautier, and Ph. Poignet. Accelerometer based identification of mechanical systems. In 2002 IEEE International Conference on Robotics and Automation, pages 4293–4298, Washington, DC, May 2002. R. Pintelon and J. Schoukens. System identification: a frequency domain approach. IEEE Press, New York, 2001. D.B. Ridgely and M.B. McFarland. Tailoring theory to practise in tactical missile control. IEEE Control Systems Magazine, 19(6):49–55, 1999. A. Robertsson. On Observer-Based Control of Nonlinear Systems. PhD thesis, Dept. of Automatic Control, Lund Institue of Technology, SE-221 00 Lund, Sweden, 1999. P. Rouchon, M. Fliess, J. Lévine, and P. Martin. Flatness, motion planning and trailer systems. In Proceedings of the 32nd Conference on Decision and Control, pages 2700–2705, San Antonio, Texas, December 1993.
Bibliography
99
M. Ruderman, F. Hoffmann, and T. Bertram. Modeling and identification of elastic robot joints with hysteresis and backlash. IEEE Transactions on Industrial Electronics, 56(10):3840–3847, 2009. W.J. Rugh. Linear System Theory. Prentice Hall, Upper Saddle River, New Jersey, USA, 1996. H.G. Sage, M.F. De Mathelin, and E. Ostertag. Robust control of robot manipulators: A survey. International Journal of Control, 72(16):1498–1522, 1999. V. Santibanez and R. Kelly. PD control with feedforward compensation for robot manipulators: analysis and experimentation. Robotica, 19:11–19, 2001. L. Sciavicco and B. Siciliano. Modeling and Control of Robotic Manipulators. Springer, London, Great Britain, 2000. A.A. Shabana. Dynamics of Multibody Systems. Cambridge University Press, Cambridge, United Kingdom, 1998. Z. Shiller. Time-energy optimal control of articulated systems with geometric path constraints. In Proc. 1994 IEEE International Conference on Robotics and Automation, pages 2680–2685, San Diego, CA, 1994. B. Siciliano and O. Khatib, editors. Springer Handbook of Robotics. SpringerVerlag, Berlin Heidelberg, 2008. B. Siciliano, L. Sciavicco, L. Villani, and G. Oriolo. Robotics - Modelling, Planning and Control. Springer, London, Great Britain, 2010. S. Skogestad and I. Postlethwaite. Multivariable Feedback Control. Wiley, New York, 1996. J.-J. Slotine and W. Li. Applied Nonlinear Control. Prentice Hall, Englewood Cliffs, New Jersey, USA, 1991. T. Söderström and P. Stoica. System Identification. Prentice-Hall Int., London, Great Britain, 1989. M. W. Spong. Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109:310–319, December 1987. M. W. Spong, S. Hutchinson, and M. Vidyasagar. Robot Modeling and Control. Wiley, 2006. M.W. Spong. Handbook of Control. CRC Press, 1996. Chapter, Motion Control of Robot Manipulators, page 1339–1350. J. Swevers, D. Torfs, M. Adams, J. De Schutter, and H. Van Brussel. Comparison of control algorithms for flexible joint robots implemented on a KUKA ir 161/60 industrial robot. In 91 ICAR. Fifth Conference on Advanced Robotics. Robots in Unstructured Environments., Pisa, Italy, 1991. J. Swevers, W. Verdonck, and J. De Schutter. Dynamic model identification for industrial robots. IEEE Control Systems Magazine, pages 58–71, October 2007.
100
Bibliography
P. Tomei. A simple PD controller for robots with elastic joints. IEEE Transactions on Automatic Control, 36(10):1208–1213, 1991. D. Torfs, J. Swevers, and J. De Schutter. Quasi-perfect tracking control of nonminimal phase systems. In 46th IEEE Conference on Decision and Control, pages 241–244, Brighton, England, 1991. J. Tsai, E. Wong, J. Tao, H. D. McGee, and H. Akeel. Secondary position feedback control of a robot. US Patent Application US2010191374, July 2010. URL http://v3.espacenet.com/. E.D. Tung and M. Tomizuka. Feedforward tracking controller design based on the identification of low frequency dynamics. Journal of Dynamic Systems Measurement and Control, Transactions of the ASME, 115:348–356, 1993. T.D. Tuttle and W.P. Seering. A nonlinear model of a harmonic drive gear transmission. IEEE Transactions on Robotics and Automation, 12(3):368–374, 1996. J. Varso, K. Zenger, V. Hölttä, and H. Koivo. Advanced solution for a benchmark robot control problem. In Proc. IEEE International Symposium on Computational Intelligence in Robotics and Automation, pages 373–378, Helsinki, Finland, 2005. D. Verscheure, B. Demeulenaere, J. Swevers, J. De Schutter, and M. Diehl. IEEE transactions on automatic control. Time-Optimal Path Tracking for Robots: A Convex Optimization Approach, 54(10):2318–2327, 2009. Z. Wang, H. Zeng, D.W.C. Ho, and H. Unbehauen. Multiobjective control of a fourlink flexible manipulator: A robust H-infinity approach. IEEE Transactions on Control Systems Technology, 10(6):866–875, 2002. E. Wernholt. Multivariable Frequency-Domain Identification of Industrial Robots. PhD thesis, Linköping University, SE-581 83 Linköping, Sweden, 2007. E. Wernholt and S. Gunnarsson. Nonlinear identification of a physically parameterized robot model. In Proc. 14th IFAC Symposium on System Identification, pages 143–148, Newcastle, Australia, March 2006. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372–15380, Seoul, Korea, July 2008a. E. Wernholt and S. Moberg. Experimental comparison of methods for multivariable frequency response function estimation. In 17th IFAC World Congress, pages 15359–15366, Seoul, Korea, July 2008b. E. Wernholt and S. Moberg. Nonlinear gray-box identification using local models applied to industrial robots. Automatica, 2010. Accepted for publication. O. Yaniv and A. Pila. QFD of a multivariable nonlinear flexible manipulator: Benchmark problem. In Proc. of the 6th IFAC Symposium on Robust Control Design, Haifa, Israel, 2009.
Bibliography
101
W.-H. Zhu. Precision control of robots with harmonis drives. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3831–3836, Roma, Italy, April 2007. W.-H. Zhu. Virtual Decomposition Control: Toward Hyper Degrees of Freedom Robots. Springer-Verlag, Berlin Heidelberg, 2010.
Part II
Publications
Paper A Modeling and Parameter Estimation of Robot Manipulators using Extended Flexible Joint Models
Authors:
Stig Moberg , Erik Wernholt, Sven Hanssen, and Torgny Brogårdh
Edited version of the paper: S. Moberg, E. Wernholt, S. Hanssen, and T. Brogårdh. Modeling and parameter estimation of robot manipulators using extended flexible joint models. 2010. Submitted to Journal of Dynamic Systems Measurement and Control, Transactions of the ASME.
Modeling and Parameter Estimation of Robot Manipulators using Extended Flexible Joint Models Stig Moberg∗ ,† , Erik Wernholt∗ , Sven Hanssen,∗∗ ,† and Torgny Brogårdh† ∗∗ Department
∗ Dept.
of Solid Mechanics, Royal Institute of Technology, SE-100 44 Stockholm, Sweden
[email protected]
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden {stig,erikw}@isy.liu.se † ABB
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected] [email protected] [email protected]
Abstract This paper considers the problem of dynamic modeling and identification of robot manipulators with respect to their elasticities. The socalled flexible joint model, modeling only the torsional gearbox elasticity, is shown to be insufficient for modeling a modern industrial manipulator accurately. The extended flexible joint model, where non-actuated joints are added to model the elasticity of the links and bearings, is used to improve the model accuracy. The unknown elasticity parameters are estimated using a frequency domain gray-box identification method. The conclusion is that the obtained model describes the movements of the motors and the tool mounted on the robot with significantly higher accuracy. Similar elasticity model parameters are obtained when using two different output variables for the identification, the motor position and the tool acceleration.
1
Introduction
Modeling of elastic robot manipulators has been studied by the industrial and academic community since the 1970’s. There are two main approaches for modeling elastic robot manipulators. The first approach is the flexible joint model, which is a lumped parameter model based on the assumption that the main elasticity is concentrated in the drive train, i.e., in the gearboxes. An analysis of a 107
108
Paper A
Modeling of Robot Manipulators using EFJ Models
representative industrial robot was presented in Sweet and Good (1985) where it was concluded that the drive train elasticities of the three main axes are critical for robot motion control design. These elasticities, modeled as one springdamper pair for each main axis, were found necessary to include in the model to get a good accuracy in the frequency region 0 to 50 Hz. It was also found that the elasticities of the gearboxes are nonlinear and that a stiffening spring can be used to model this nonlinearity. The presence of structural elasticity (bending and torsion of the links) was also noted, but this could be neglected in comparison to the dominating drive train elasticity. Another issue related to the design of a flexible joint model is whether the inertial couplings between the motors and the rigid links should be included. In Spong (1987), a multivariable flexible joint model was presented, where this inertial coupling was neglected because of high gear ratio, and this model has since then been the main approach for modeling and control design of elastic industrial-like robot manipulators. The complete flexible joint model, taking all couplings into account, is described in, e.g., Tomei (1991) and De Luca (2000). The second approach is the flexible link model, described in, e.g., De Luca and Siciliano (1991) and Book and Obergfell (2000). In this approach, the manipulator arms are modeled as beams with a distributed elasticity. The infinite-dimensional model is truncated to get a finite model, hence this model is also called the assumed modes model. This model is often applied to single link manipulators, directly actuated by electric or hydraulic actuators with no transmission. Sometimes multi-link manipulators are also considered. Normally, only the elasticity in the rotational direction is considered, i.e., the link deformation is restricted to a plane perpendicular to the preceding joint. Two examples of 3-D flexible link modeling are Yoshikawa et al. (1990) and Ueno et al. (1991). The flexible link approach has mostly been applied on very elastic and light-weight research manipulators. In, e.g., De Luca (2000) and Siciliano and Khatib (2008), both the flexible link and the flexible joint approaches are described, and in Subudhi and Morris (2002), a model that combines the flexible joint and flexible link approaches is used. The development of industrial robots has to a large extent been focused on increasing the robot performance while reducing the robot cost, as described in Brogårdh (2007, 2009). This leads to the use of weight- and cost optimized robot components with increased elasticity. For large robots with a payload of 100– 200 kg, the robot weight to payload ratio has decreased from 15 to 5 during the last 20 years. For smaller robots, the ratio is generally somewhat higher, but the reduction is about the same. This development leads to more complicated vibration modes inside the control bandwidth and enhances the need for accurate models and identification methods. An example of a modern industrial robot manipulator is shown in Figure 1. In Öhr et al. (2006) and Moberg and Hanssen (2007), it was claimed that the flexible joint model cannot accurately describe a modern industrial robot and a model called the extended flexible joint model was introduced. However, no
2
Robot Manipulator Model
109
Figure 1: The IRB4600 robot from ABB. global validation of the proposed model has yet been published, i.e., a validation of the model for the complete workspace of the robot. Moreover, according to the authors’ knowledge, no global validation of the flexible joint approach for an industrial robot has ever been published. The main purpose of this paper is to validate the extended flexible joint model on a modern industrial manipulator, with the flexible joint model as a reference. The paper also contains a description of the parameter estimation (identification) method used. Moreover, some unpublished improvements of the identification method are presented. The paper is organized as follows: The extended flexible joint model is described in Section 2 and the parameter estimation procedure is described in Section 3. In Section 4, the identifiability and parameter accuracy are investigated in a simulation study, and in Section 5, the (extended) flexible joint model is identified and validated for different model structures, using a real industrial manipulator with motor angular position measurements only. Section 6 further validates the model by the use of tool acceleration measurements, and Section 7 validates the model in the time-domain. Finally, Section 8 concludes the paper.
2
Robot Manipulator Model
The extended flexible joint model is a lumped parameter model, which consists of a serial1 kinematic chain of rigid bodies. The rigid bodies are connected by elastic elements, representing torsional, and if needed also translational, deflection. The elastic elements consist of one or more elastic joints, i.e., discretely localized spring-damper pairs. Two examples of elastic elements are shown in Figure 2. An actuated joint consists of a motor and a gearbox, and the corresponding spring-damper pair models the torsional deflection of the gearbox. A non-actuated joint models elasticities in, e.g., bearings, foundations, tools, loads, and links (bending and torsion). Each rigid body is described by its mass mi ∈ R, center of gravity ξi ∈ R3 , inertia tensor w.r.t. center of mass2 Ji ∈ R6 , and joint 1 The same modeling principle can of course be applied to parallel kinematic structures and serial structures with parallelogram linkages. 2 Due to the symmetrical inertia tensor, only six components of J need to be defined. i
110
Paper A
Modeling of Robot Manipulators using EFJ Models
Figure 2: Examples of elastic elements modeling torsional deflection in three directions: Three non-actuated elastic joints (left), two non-actuated elastic joints together with one elastic joint actuated by a motor (right). Dampers are not shown.
Figure 3: Three rigid bodies with fixed coordinate systems A, B, and C (solid). The joint vectors li defines the dashed coordinate systems, starting in N . The transformation (rotation) from the one dashed to the next solid coordinate system is given by the motor and joint angular positions. vector li ∈ R3 , describing the location of the next rigid body. A model consisting of three rigid bodies is illustrated in Figure 3. All rigid body parameters are described in coordinate systems fixed to the rigid bodies. If the number of added non-actuated joints is Υ na and the number of actuated joints is Υ a , the system has 2Υ a + Υ na degrees-of-freedom (DOF). The model equations are " # " # fg (q˙ g ) τ M(qa )q¨a + c(qa , q˙ a ) + g(qa ) + = g , (1a) 0 τe Kg (η −1 qm − qg ) + Dg (η −1 q˙ m − q˙ g ) = τg ,
(1b)
−Ke qe − De q˙ e = τe , Mm q¨m + fm (q˙ m ) = τm − η h
where qa = qgT
qeT
iT
(1c) −T
τg ,
(1d)
, qg ∈ RΥ a is the actuated joint angular position, qe ∈ RΥ na
is the non-actuated joint angular position, and qm ∈ RΥ a is the motor angular position. The actuator torque3 is τm ∈ RΥ a , τg ∈ RΥ a is the actuated joint torque, 3 The electrical drive system is not included in this model and is assumed to be ideal for the frequency range considered here. The drive system can be taken into account as described in Section 3.4.
2
Robot Manipulator Model
111
Figure 4: A 9 DOF extended flexible joint model with 2 links, 2 motors (M), 3 elastic elements (EE) and 3 rigid bodies (RB).
and τe ∈ RΥ na is the non-actuated joint torque, i.e., the constraint torque. The, possibly non-diagonal, gear ratio matrix is η ∈ RΥ a ×Υ a . With obvious dimensions, Mm and M(qa ) are the inertia matrices for the motors and the joints, respectively. Furthermore, Kg , Ke , Dg , and De are the stiffness- and damping matrices in the actuated and non-actuated directions. The Coriolis- and centripetal torques are described by c(qa , q˙ a ), g(qa ) is the gravity torque, and the nonlinear friction4 in motor bearings and gearboxes are fm (q˙ m ) and fg (q˙ g ). Note that the spring-damper torque also can be defined as nonlinear, e.g., a stiffening spring, see, e.g., Sweet and Good (1985), Tuttle and Seering (1996), and Figure 8. The inertial couplings between the motors and the rigid bodies are neglected under the assumption of high gear ratio, see, e.g., Spong (1987). Note that (1) is an extension of the flexible joint model, which can be derived as a special case if all non-actuated joints are removed, i.e., Υ na = 0. The equations of motion (1) can be derived by computing the linear and angular momentum, and by using Kane’s method (Kane and Levinson, 1985) the projected equations of motion can be derived to yield a system of ordinary differential equations (ODE) with minimum number of DOF. One alternative way of deriving the equations of motion is to compute the potential and kinetic energy and use Lagranges equation (Shabana, 1998). Figure 4 illustrates a two-link manipulator model, consisting of two motors, three rigid bodies, and three elastic elements with in total seven elastic joints. Thus, the model has two actuated joints, five non-actuated joints, and in total nine DOF5 . 4 The friction of the gearbox is actually split into two components and distributed between f and m
fg .
5 In this paper, the number of DOF refers to the number of independent coordinates necessary to specify the (internal) configuration of a system.
112
Paper A
Modeling of Robot Manipulators using EFJ Models
The goal when adopting the extended flexible joint model is to describe the real manipulator with desired accuracy in the frequency region of interest for all configurations and all payloads, i.e., to obtain a global model. Note that elasticity in all directions can be modeled, unlike the flexible joint and most flexible link models. The need for modeling bearing elasticity is also reported in Hardeman (2008), where it is concluded that the transmission and bearing elasticities of a Stäubli robot are of the same order of magnitude. Modeling bearing elasticity using non-actuated joints6 is therefore suggested and evaluated in Hardeman (2008). The approximation of the distributed link elasticity with a lumped parameter model may not be suitable for a very slender robot design, but identification experiments presented in this paper show that the approximation is well suited for robots used in industry today. The lumped approximation of a flexible link is also investigated and justified in Huang and Lee (1987) and Yoshikawa et al. (2001), where the non-actuated joints are called pseudo joints or virtual joints.
3 3.1
Parameter Estimation Introduction
Most articles on flexible manipulator identification consider local models, i.e., models valid in one configuration, of black-box or gray-box type. Moreover, the standard assumption is that all parameters are unknown, and most suggested identification methods therefore estimate all parameters in one step. In Pham et al. (2001), all physical parameters of a single-input single-output (SISO) model are identified by linear regression, using a linear-in-parameter model structure. This is exemplified with measurements on both motor and joint side, but some parameters (stiffness and mass) can be identified with motor measurements only. In Pham et al. (2002), this method is extended with acceleration measurements on the joint side. A multiple-input multiple-output (MIMO) black-box model of two robot axes is identified from motor side measurements in Johansson et al. (2000) by use of a subspace method in combination with a friction estimation. A graybox prediction error method is used in Östring et al. (2003) to identify all physical parameters of a SISO model, using motor measurements only. Inverse eigenvalue theory is used to identify a mass-spring model of any order in Berglund and Hovland (2000), also using motor measurements only. This method is extended to MIMO models in Hovland et al. (2001). Experimental modal analysis is used in Behi and Tesar (1991) to identify the local masses, springs, and dampers of an industrial manipulator. The system is then excited by an impact hammer and the response measured by accelerometers. Identification methods for global flexible joint models have also been suggested. Prior knowledge of the rigid body parameters is assumed in Hovland et al. (1999), where the stiffness and damping parameters are identified by using a frequency domain method where the frequency domain model is linear in the unknown 6 Bearing elasticity is called joint flexibility in Hardeman (2008), while the transmission elasticity is called drive flexibility.
3
Parameter Estimation
113
parameters. This method works for MIMO flexible joint models with motor measurements only, and is exemplified on two axes of an industrial manipulator. A three-step identification method is suggested in Wernholt and Gunnarsson (2006). The first step identifies nonlinear friction and rigid body parameters using a separable least-squares approach, the second step is based on Berglund and Hovland (2000) and identifies approximate elasticity parameters and refines some rigid body parameters, and the last step further refines some parameters by time-domain nonlinear gray-box identification. The method is applied to one axis of an industrial manipulator using a three-mass model and a nonlinear transmission stiffness (stiffening spring). In Albu-Schäffer and Hirzinger (2001) the rigid body parameters are assumed to be known from CAD models, while the friction and elasticity parameters are identified in separate identification experiments. The elasticities of the transmissions are identified from impulse response experiments for each individual joint before the assembly of the robot, using joint torque sensors. In Hardeman (2008), an identification method for an extended flexible joint model with transmission and bearing elasticity, is suggested. The method is based on the assumption that all DOFs (motor position, transmission, and bearing deflection) are measurable. The unknown elasticity parameters are solved by linear regression. However, the measurement system used was not accurate enough for measuring the elastic deflections. An alternative method which develops the ideas in Hovland et al. (2001) further is then used for estimating the transmission stiffness. However, the bearing stiffness cannot be identified using this method, and the uncertainty of the estimated transmission stiffness is rather large, e.g., standard deviations larger than 30 %. To summarize, identification methods for local models exist, and there are also some suggested methods for global flexible joint models. However, to the authors knowledge, no global validation of the flexible joint model or any extended models has been published for a multi-axes industrial-like robot manipulator. Moreover, to the authors knowledge, no identification of all elasticities of an extended flexible joint model (lumped parameter model) for a multi-axes industriallike robot manipulator has been published. The remainder of this section describes an identification method for the global extended flexible joint model. This frequency-domain gray-box identification method uses nonlinear optimization to compute the elasticity parameters. In articles on robot identification, nonlinear optimization is often avoided due to the problem with local minima. However, this problem can be handled and it is common practise to use nonlinear optimization in system identification, see, e.g., Ljung (1999).
3.2
Model Parameters and Model Structure Selection
The model parameters can be divided into rigid body parameters, elasticity parameters (stiffness and damping), and friction parameters. To determine the number of non-actuated joints, their direction and location, is generally a complex task. A top-down approach would be to start with an accurate FEM model of the robot and then reduce it to a lumped parameter model of desired accu-
114
Paper A
Modeling of Robot Manipulators using EFJ Models
racy. The structure of the reduced model will then define the rigid body parts of the extended flexible joint model, and the resulting springs and dampers of the reduced model can be used as initial values for the parameter estimation. To extract accurate elastic parameters of a complex manipulator from FEM data is considered very hard, see, e.g., Book and Obergfell (2000), and identification using a real manipulator must usually be performed. A bottom-up approach is to start with the flexible joint model and add non-actuated joints, until the desired experimental accuracy in the frequency region of interest is obtained. This is the approach described in this paper. When the rigid body structure is determined, the springs and dampers can be chosen as linear or nonlinear, e.g., a stiffening spring. The friction can be modeled in a number of ways. A classical static friction model includes the viscous and Coulomb friction, fv and fc respectively, and is given by fm (q˙ m ) = fv q˙ m + fc sign(q˙ m ).
(2)
More advanced dynamic friction models are described in, e.g., Canudas de Wit et al. (1995) and Al-Bender et al. (2005).
3.3
Identification of unknown parameters
In this section, the proposed identification procedure is briefly described. A more detailed description can be found in Wernholt and Moberg (2008a) and Wernholt and Moberg (2010). The rigid body parameters for the links and the motors are assumed to be known and properly verified on a real manipulator. If any rigid body parameters are uncertain, rigid body identification can be used to identify the base parameters of the links (Kozlowski, 1998; Swevers et al., 2007). However, all physical rigid body parameters cannot be identified. The number of non-actuated joints and rigid bodies is assumed to be determined by a bottomup approach. By using the available information (CAD models and component data for bearings and transmissions) about the manipulator elasticities, a number of model structure candidates can be determined. The identification problem is then to estimate the unknown parameters of the manipulator model, i.e., the elasticity and the friction parameters. A static friction model can easily be determined by, e.g., linear regression, if the motor torque and speed are measured for a number of different velocities. In this work, the estimation of the unknown elasticity parameters is the main concern. The friction model is only used for improving the accuracy of the elasticity parameters. Generally, the problem is to estimate the unknown parameters in the nonlinear gray-box model (1) from measured input-output data. In Wernholt and Moberg (2010) it is shown that a time-domain prediction error method can be approximated by a frequency-domain procedure. The procedure is based on intermediate local models, where the multivariable (nu inputs and ny outputs) frequency response function (FRF) is measured in a number of operating points, i.e., manipulator configurations. The nonlinear gray-box model (1) is then linearized in the same operating points and the optimal parameters are obtained by minimizing the (weighted) discrepancy between the measured FRFs and the model FRFs (the
3
115
Parameter Estimation
FRFs of the linearized gray-box model): θˆ Nf = arg min VNf (θ),
(3a)
θ∈Θ
VNf (θ) =
Nf Q X X (i) (i) (i) [Ek,θ ]H [Wk ]−1 Ek,θ ,
(3b)
i=1 k=1 (i) b(i) ) − log vec(G(i) ). Ek,θ = log vec(G k k,θ
(3c)
Here Nf is the number of excited frequencies, Q is the number of operating points, b(i) is the measured FRF, G(i) is the model FRF, and W (i) is a weighting matrix, G k
k,θ
k
all dependent on operating point i and frequency line k. The operator vec(B) = [b1T b2T . . . bnT ]T stacks the columns bi of a matrix B into a column vector. The complex logarithm, log G = log |G| + j arg G, gives improved numerical stability and makes the estimator robust to outliers in the measurements, according to Pintelon and Schoukens (2001). This is also evident in the study in Wernholt (i) and Moberg (2010). Usually the weighting matrix Wk is selected as diagonal, assuming the correlation between the different FRF elements to be negligible. This means that (3b) is simplified to a weighted sum of all the elements in the FRFs: Nf ny · nu Q X X X (i) (i) (4) VNf (θ) = |[Ek,θ ]l |2 /[Wk ]ll . i=1 k=1 l=1
One problem, investigated in Wernholt and Moberg (2010), is the existence of local minima in the optimization cost function VNf (θ). However, with randomized initial values in suitable intervals, this problem is properly handled. Other important user choices are the selection of frequency interval, number of frequencies, weights in the criterion, total measurement time, operating points, etc. Most of these aspects are covered in Wernholt and Moberg (2010), but we will elaborate on some of them here as well. The selection of operating points is important for accuracy and identifiability as described in Wernholt and Löfberg (2007). To be able to accurately measure the FRF, the experiments must be carefully designed. In the literature (see, e.g., Guillaume (1998), Pintelon and Schoukens (2001), or Wernholt and Moberg (2008b)) various procedures exist that differ in requirements on the measurement setup and signal-to-noise ratio, as well as in bias and variance properties. The basic idea, however, is to perform nu experiments in each operating point, i = 1, . . . , Q, calculate the discrete Fourier transform (DFT) of the input and output vectors at the excited frequency lines, (i,l) (i,l) k = 1, . . . , Nf , and then collect these nu DFT vectors, Uk , Yk , l = 1, . . . , nu , into matrices (i)
(i,1)
(i)
(i,1)
Uk = [Uk Yk = [Yk (i)
(i,2)
Uk
(i,2)
Yk
(i,nu )
. . . Uk
(i,nu )
. . . Yk
],
].
If the input DFT matrix Uk is invertable, the nonparametric FRF estimate, de-
116
Paper A
Modeling of Robot Manipulators using EFJ Models v
r +
Σ
Controller
u
Plant
y Σ
−
Figure 5: Closed-loop measurement setup. noted measured FRF in this paper, can be calculated as b(i) = Y(i) [U(i) ]−1 . G k k k
(5)
The quality of this estimate depends on the particular excitation in each of the nu experiments. For multivariable systems, the orthogonal random phase multisine signal has been proposed by Dobrowiecki and Schoukens (2007) to minimize the FRF uncertainty in open loop, given certain input amplitude constraints. This is a periodic signal and we assume that P periods of the steady-state response are collected in each experiment, with NP samples in each period. Since the robot manipulator is unstable, it is necessary to collect data in closed loop. Consider therefore the setup in Figure 5, where the controller takes as input the difference between the reference signal r and the measured and sampled output y, and u is the input. For simplicity, we also assume ny = nu = n. The additive noise v contains various sources of noise and disturbances. The measured FRF then usually gets biased, due to the correlation between u and v. This bias is approximately inversely proportional to the signal-to-noise ratio (|Vk |2 /|Rk |2 if n = 1). Fortunately, the signal-to-noise ratio can be made arbitrarily large at the excited frequencies by using a periodic excitation. The measured FRF will then be asymptotically unbiased (as the number of periods goes to infinity) at the excited frequencies also in closed loop. For details, see Wernholt and Gunnarsson (2007). The orthogonal multisine signal will therefore be used in closed loop, which corresponds to an optimal experiment design with output amplitude constraints. (i) (i) The excitation signal in operating point i is then given by Rk = Rd,k T, where T 2πj
is an orthogonal matrix n × n, Til = e n (i−1)(l−1) , with TTH = nI. Rd,k is a diagonal matrix where each diagonal element is the DFT of a random phase multisine signal, which in the time domain can be written as r(t) =
Nf X
Ak cos(ωk t + φk ),
k=1
with amplitudes Ak , frequencies ωk chosen from the grid {ωk =
2πk Np Ts ,
k = 1, . . . ,
Np 2
− 1}, and random phases φk uniformly distributed on the interval [0, 2π). Nf is the number of excited frequencies, which is limited by Nf ≤ Np /2 − 1 (assuming Np even). (i)
The selection of weights Wk
in (3) should reflect both the uncertainty in the
3
117
Parameter Estimation
measured FRF, as well as which FRF elements and frequency ranges the user considers most important to describe with the model. Which of these aspects that is most important partly depends on the model complexity. If the model can describe every tiny detail in the measured FRF, the focus is to minimize the parameter uncertainty and the weights should then be selected according to Result 2 in Wernholt and Moberg (2010). In other cases, it is more important to distribute the model bias to areas of less importance and the weights then reflect some user choices.
3.4
Handling of Nonlinearities and Unmodeled Dynamics
The method described in Section 3.3 can be used for identifying the unknown parameters of (1). As the identification method is based on linearizing the system locally around an operating point, additional nonlinearities can only be identified if the linearized model contains enough information about the nonlinearity. In the robot application, we have the following major nonlinearities: 1. The nonlinearities associated with the rigid body dynamics. 2. The drive train torque ripple (Gutt et al., 1996) and the sensor position ripple (Hanselman, 1990)7 . 3. The nonlinear friction of motor bearings and transmission. 4. The nonlinear transmission elasticity. Nonlinearity 1 is hard to compensate for within a linear framework and it is therefore important to stay close to the operating point during identification, performed as described in Section 3.3. Nonlinearities 2 and 3 can be approximated as acting on the input and output of the system. One way of dealing with these would be to model and identify these in a separate procedure. The models of the input-output nonlinearities can then be used for partially linearizing the system during the gray-box identification experiments, as depicted in Figure 6. This on-line method would require the possibility to modify the controller of the system. An alternative for handling nonlinearities 2 and 3 is to design the experiments so that the effect of these nonlinearities is minimized, see, e.g., Wernholt and Moberg (2010). Yet another method would be to compensate for the nonlinearities off-line. One example ˜ x) system is illustrated in Figure 7. The input nonlinearity is defined by u˜ = fi (u, ˜ The system also includes the sensor and the output nonlinearity by y˜ = fo (y). dynamics S (including time delays) and actuator dynamics A (including torque control and zero-order hold), which are assumed to be unmodeled by the graybox model. Assuming we know fi ( · ), fo ( · ), A, and S, we can retrieve the input u˜ and output y˜ of the system which is to be identified (gray-box model) according to ˆ y˜ = fo−1 (S(z)−1 y), u˜ = fi (A(z)u, x), 7 These nonlinearities can also be regarded as deterministic disturbances.
(6)
118
Paper A
Modeling of Robot Manipulators using EFJ Models
Figure 6: Partly linearized system.
Figure 7: System description including nonlinearities and unmodeled dynamics.
where xˆ is some estimation of the states used in fi ( · ), e.g., the motor speed esti˜ It is assumed that S and A are discrete-time linear models. The mated from y. b e is then estimated from u˜ and y, ˜ and used for measured (nonparametric) FRF G gray-box identification as described in Section 3.3.
Torque
Nonlinearity 4 can be parameterized and its parameters added to the vector of unknown parameters, θ. For large signal input, the operating point of a nonlinearity such as a stiffening spring, changes rapidly and linearizing around an operating point does not work. A statistical linearization, which takes the variation around the operating point into account, can the be used for performing the linearization, see, e.g., Crandall (2004). A nonlinear elasticity is illustrated in Figure 8.
Deflection
Figure 8: Stiffening spring characteristics.
A Simulation Study of the Attainable Parameter Estimation Accuracy
119
Friction Torque
4
Motor Speed
Figure 9: Nonlinear friction characteristics. A final comment on the identification method described: Every subsystem that affects the accuracy of the elasticity parameter identification, and is known or could be identified separately, can be used for retrieving the FRF of the gray-box system to be identified. The advantage of this is that the number of optimization parameters is reduced and that nonlinearities can be compensated for. In this paper, we assume that the unknown parameter vector θ contains the elasticity parameters. In practise, if some elasticity parameters are known with sufficient accuracy, they should be removed from θ. In the same way, if, e.g., some rigid body parameters are uncertain, they can be added to θ.
4
A Simulation Study of the Attainable Parameter Estimation Accuracy
To investigate the main causes of errors in the estimated parameters, an identification of a simulated manipulator was performed. By means of this investigation, it was also possible to verify the implementation of the identification method described in Section 3. The nonlinear simulation model is the the gray-box model (1) with a nonlinear friction model, approximated as acting on the motor only, described by f (q˙ m ) = fv q˙ m + fc (µ + (1 − µ)sech(β q˙ m )) tanh(α q˙ m ),
(7)
and illustrated in Figure 9. This smooth friction law (similar to the static version of the LuGre model (Canudas de Wit et al., 1995)) is suggested in Feeny and Moon (1994) and avoids discontinuities to simplify numerical integration. The following disturbances are used in the simulation model: • Deterministic torque ripple disturbances (Gutt et al., 1996) are added to the torque input in order to obtain realistic ripple disturbances from the motors, drive electronics, and gearboxes. • Deterministic and stochastic disturbances are in the same way added to the measured motor position to simulate the real position sensor of the robot (Hanselman, 1990). The 18 DOF model has 6 actuated joints, 6 non-actuated joints, and linear springdampers. The vector of unknown parameters, θ, consists of 12 springs and 12
120
Paper A
Modeling of Robot Manipulators using EFJ Models
Table 1: Simulated robot: Max and mean errors of the 12 springs (K) and the 12 dampers (D). Case No Max Err K Mean Err K Max Err D Mean Err D 1 0.0 % 0.0 % 0.1 % 0.0 % 2 2.5 % 0.7 % 19 % 5% 3 3.4 % 0.7 % 13 % 5% 4 46.7 % 13.2 % 1856 % 597 % 5 5.3 % 1.2 % 355 % 125 % 6 3.8 % 1.1 % 57 % 15 % 7 2.6 % 1.1 % 79 % 33 % 8 6.1 % 1.7 % 82 % 42 % 9 5.5 % 1.8 % 105 % 30 % dampers. All parameters and disturbances have realistic values to simulate a real industrial manipulator. The identification is based on the motor torque reference τm as input and the measured motor position qm as output. Multisine excitation is used, and the system is operated in closed loop as described in Section 3.3. The simulations and identifications were performed for the following cases: 1. Linearized rigid body dynamics in simulation model, no disturbances, no friction. Identification is based on 10 configurations and 6 experiments for each configuration. 2. Same as 1, but stochastic and deterministic disturbances are added to the simulation model, and 6 × 4 experiments are performed for each configuration. According to Section 3.3, only nu = 6 experiments are needed for each configuration. However, by increasing the number of measurements, the effect of disturbances can be reduced and the FRF accuracy increased. 3. Same as 2, but nonlinear rigid body dynamics in simulation model. 4. Same as 3, but also nonlinear friction in the simulation model. 5. Same as 4, but low frequency sinusoids are added to the excitation in order to reduce the damping introduced by the nonlinear friction. 6. Same as 5, but viscous friction is added to the gray-box model as well as to the parameter vector θ. 7. Same as 5, but nonlinear compensation of identified Coulomb friction, fc sign(q˙ m ), is performed (described in Section 3.4, Figure 7). 8. Same as 7, but identification based on 5 configurations. 9. Same as 7, but identification based on 6 × 2 experiments. The result is shown in Table 1, where the parameter error is computed as ˆ 100(10| log10 (θ/θ0 )| −1). The motivation for this is that a stiffness parameter of 2×θ0 is about as bad as 1/2 × θ0 . Clearly, the dampers are harder to estimate than the
Experimental Model Structure Selection and Validation
Normalized Stiffness
5
121
1.2 1.1 1 0.9 0.8 k1
k2
k3
k4
k5
k6
k7
k8
k9 k10 k11 k12
Figure 10: Normalized stiffness for all 12 springs in case 7. True parameter values are 1. The uncertainty is indicated by two standard deviations.
springs. This is natural since an error in a damper effects the cost function much less than an error in a spring (in a smaller frequency interval). The springs are the most important parameters for simulation or control design. In fact, most articles on flexible joint control assumes the damping to be zero. The nonlinear rigid body dynamics and the disturbances cause small errors. Clearly, the nonlinear friction is the main problem. The added low frequency sinusoids have a large impact on the accuracy when friction is present, and some further improvement can be obtained by the introduction of viscous friction in the gray-box model. Nonlinear compensation gives about the same result. One advantage with nonlinear compensation is that it does not introduce any additional optimization variables. Reducing the measurement time by decreasing the number of configurations, or the number of experiments in each configuration, increases the errors to some extent. Figure 10 shows the estimated uncertainty as two standard deviations for the identified springs of case 7. The estimated standard deviation is based on the computed FRF uncertainty and the corresponding parameter sensitivity, see Wernholt and Moberg (2010). The standard deviation gives a good indication of the identifiability of specific parameters. Clearly, this system is identifiable. Figure 11 shows one FRF element with the uncertainty indicated.
5
Experimental Model Structure Selection and Validation
The robot used in these experiments is a modern six-axes medium-sized ABB robot equipped with an experimental feedback controller to allow for offline generated excitation signals. The excitation signal is the position reference, and its derivative is the sum of an orthogonal random phase multisine (6–100 Hz) with constant amplitude spectrum and a low-frequency sine wave. For the identification, only the standard robot sensors are used, i.e., the output y is the motor angular position qm and the input u is the controller torque reference. The identification is based on the FRF estimates in 14 different robot configurations (identification FRF set), using maximum payload. To validate the model, the FRFs were also estimated in 14 completely different robot configurations, using maximum
122
Paper A
Modeling of Robot Manipulators using EFJ Models
70
Magnitude (dB)
60 50 40 30 Measured FRF Uncertainty (1 std) Measured FRF 18 DOF Global Model
20 10 5
10
30
50
Frequency (Hz)
Figure 11: One diagonal FRF element in configuration 1 of the simulation study. The magnitude of FRF from motor torque to motor acceleration is shown. payload (validation FRF set 1). The FRF was also estimated in the same 14 validation configurations with no payload (validation FRF set 2). The configurations were chosen ad-hoc in the complete working area of the robot. The configurations are numbered 1–14 for each of the 3 sets, and these numbers will in some cases be used when the results are presented. However, no figures showing all the configurations are included in this paper. For more information about robot configurations and how these can be optimized, see Wernholt and Löfberg (2007). The gray-box model structure candidates were determined by a bottom-up approach as described in Section 3. The rigid model was known, and 6 locations for non-actuated joints were proposed by mechanical experts. In total, 7 different model structure candidates were finally evaluated: 1. 6 spring-damper pairs, i.e., the flexible joint model with 12 DOF. 2. 7 spring-damper pairs, i.e., 13 DOF. 3. 8 spring-damper pairs, i.e., 14 DOF. 4. 9 spring-damper pairs, i.e., 15 DOF. 5. 10 spring-damper pairs, i.e., 16 DOF. 6. 11 spring-damper pairs, i.e., 17 DOF. 7. 12 spring-damper pairs, i.e., 18 DOF. The model structures with 13 to 17 DOF were chosen based on a greedy algorithm, i.e., the non-actuated joint giving the lowest cost was chosen for the 13 DOF model, and then kept while the remaining non-actuate joints were evaluated to determine the 14 DOF model etc. The accuracies of the models were evaluated by comparing the model cost, i.e., the model fit in the frequency domain. Figure 12 shows the cost for all models and for the FRF sets with maximum
5
123
Experimental Model Structure Selection and Validation
1 Identification FRF Set Validation FRF Set 1
Cost
0.8 0.6 0.4 0.2 12DOF
13DOF
14DOF
15DOF
16DOF
17DOF
18DOF
Figure 12: Cost of all models evaluated for the identification FRF set and in the first validation FRF set, both with maximum payload. Same cost function as used in the identification. 1 Identification FRF Set Validation FRF Set 1 Validation FRF Set 2
Cost
0.8 0.6 0.4 0.2 0 12DOF
13DOF
14DOF
15DOF
16DOF
17DOF
18DOF
Figure 13: Cost of all models evaluated for the identification FRF set and in the first validation FRF set, both with maximum payload, and for the second validation FRF set with no payload. Same cost function as used in the identification, but with all elements including motor 5 and 6 removed (unexcited when no payload).
payload. The cost functions are monotonically decreasing with increased model order, which shows that no over-modeling occurs. Figure 13 shows the cost for all models and FRF sets, where all FRF elements including motors 5 and 6 are discarded from the cost computation (these elements are not excited properly with no payload). Figure 14 shows the multivariable FRF in one configuration. All FRFs are shown as the magnitude of the FRF from motor torque u to motor angular acceleration q¨m . Clearly, the correspondence between the measured FRF and the 18 DOF model FRF is quite good. Figure 15 shows one FRF element at three different model complexities. The 12 DOF model cannot describe the manipulator and the model accuracy increases with increasing model order. If the 12 DOF model is optimized only for this configuration and for low frequencies, the resonance properties are still completely wrong, although the lowest anti-resonance frequency is correct. If this locally optimized model is evaluated in another configuration, as shown in Figure 16, no resonances are properly modeled, although the globally optimized 12 DOF model is quite good in this particular configuration, for this particular element. Figure 17 shows the result for one of the non-diagonal FRF-elements. The uncertainty of the estimated spring parameters
124
Modeling of Robot Manipulators using EFJ Models
Magnitude (dB)
Paper A
10
30
10
30 10 30 10 Frequency (Hz)
30
10
30
10
30
Figure 14: All FRF elements in configuration 14 of identification set, showing the measured FRF (thick) and the 18 DOF model FRF (thin). The shaded area indicates the measured FRF uncertainty (1 std). The magnitude of the 6 × 6 FRF is shown, with input motor torque and output motor acceleration.
5
125
Experimental Model Structure Selection and Validation
Magnitude (dB)
60
Measured FRF Uncertainty (1 std) Measured FRF 12 DOF Global Model 12 DOF Local Model Configuration 6 15 DOF Global Model 18 DOF Global Model
55 50 45 40 35 10
20 Frequency (Hz)
30
40
Figure 15: One diagonal FRF element in configuration 6 of identification set.
70
Magnitude (dB)
60
50
40 Measured FRF Uncertainty (1 std) Measured FRF 12 DOF Global Model 12 DOF Local Model Configuration 6 18 DOF Global Model
30
20 6
10
20 Frequency (Hz)
30
40
50
Figure 16: The same FRF element as in Figure 15 but in configuration 9 of validation set 1.
is shown in Figure 18, indicated by two standard deviations. A typical standard deviation is 3 %, although some parameters are more uncertain. An 18 DOF model with the transmission elasticities modeled as stiffening springs was identified as described in Section 3.4. The cost was found to be slightly reduced compared to the cost of the 18 DOF model with linear transmission. However, the errors in some FRF elements are clearly reduced as illustrated in Figure 19. The effect of the nonlinear springs can also be seen as a reduction of some resonance frequencies if the excitation amplitude is decreased, although not to the same extent as in Sweet and Good (1985). The conclusion is that a modern robot manipulator cannot be properly modeled by the 12 DOF flexible joint model. The mean frequency error in the dominating pole-zero pair decreases from more than 25 % to less than 5 % when going from a 12 to a 18 DOF model. The most complex model evaluated in this study still has significant errors in some elements, although these are small compared to the
126
Paper A
Modeling of Robot Manipulators using EFJ Models
60
Magnitude (dB)
40
20
Measured FRF Uncertainty (1 std) Measured FRF 12 DOF Global Model 15 DOF Global Model 18 DOF Global Model
0
−20 10
50
100
Frequency (Hz)
Normalized Stiffness
Figure 17: One non-diagonal FRF element in configuration 3 of identification set.
1.2 1.1 1 0.9 0.8 k1
k2
k3
k4
k5
k6
k7
k8
k9 k10 k11 k12
Figure 18: Normalized stiffness for all 12 springs in the 18 DOF model. The uncertainty is indicated by two standard deviations.
80
Magnitude (dB)
70 60 50 40 30 20 10 10
Measured FRF Uncertainty (1 std) Measured FRF 12 DOF Global Model 18 DOF Global Model 18 DOF Global Model NLS 20 Frequency (Hz)
40
Figure 19: One diagonal FRF element in configuration 12 of validation set 2. The model with stiffening transmission springs is denoted NLS.
6
Identification Using Added Robot Arm Sensors
127
errors of the 12 DOF flexible joint model, where the frequency of the dominating pole-zero pair can have an error larger than 100 %, i.e., the model pole/zero frequency is overestimated by more than a factor of two. Furthermore, the flexible joint model does not model some significant resonances at all, in the frequency region studied here (6 - 100 Hz). The 18 DOF model is further improved if the transmission elasticities are modeled as nonlinear stiffening springs. The need for stiffening springs depends on the gear technology used. The required model complexity (DOFs) depends of course on the particular robot design, but the need for an extended model is believed to be quite general for modern industrial robots. There are probably several sources of the remaining errors, e.g, choice of nonactuated joints, errors in the rigid body model, and of course, insufficient number of DOF. The choice of model complexity depends on the intended use of the model, e.g., accuracy requirements in simulation or control design.
6
Identification Using Added Robot Arm Sensors
In the identification studies and experiments described in previous sections, only the motor angular positions and the controller torque references have been used. In this section, the acceleration of the tool (payload) is also measured using a three-axes accelerometer. The motivation for this is as follows: • The described identification method, using motor position only, has been validated by comparing the estimated FRF with the model FRF, using the motor position as output variable. By using the tool acceleration as output variable, it can be verified that the obtained model also gives a good description of the tool movement. After all, the tool is the controlled variable of the robot manipulator and a model should also be able to describe its movements. • To perform identification, using the tool acceleration as output variable. Then it can be verified whether the identified parameters are similar as when using the motor position, and if the tool acceleration can improve the parameter estimation. The experiment was carried out on a manipulator from ABB. This manipulator is larger than the one used in the experiments described in Section 5. Both motor position and tool acceleration were measured in all experiments. Measurements were performed in 7 different robot configurations. Identification was performed for 7 model structure candidates, based on both the FRF estimate from motor torque to motor position, and on the FRF estimate from motor torque to tool acceleration. The tool acceleration in sensor frame, ρ¨s , is transformed to the fixed world frame of the robot by ρ¨w = Rw s (qˆ a )ρ¨s ,
(8)
where Rw s is the transformation matrix between the frames. The joint angles qˆ a were estimated from the measured motor positions. During the parameter optimization, the model FRF is computed by linearizing the system from motor
128
Paper A
Modeling of Robot Manipulators using EFJ Models
Motor Pos Cost
1.4 Motor Pos Id Tool Acc Id
1.2 1 0.8 0.6 0.4 12 DOF
13 DOF
14 DOF
15 DOF
16 DOF
17 DOF
18 DOF
Tool Acc Cost
1.6 Motor Pos Id Tool Acc Id
1.4 1.2 1 0.8 12 DOF
13 DOF
14 DOF
15 DOF
16 DOF
17 DOF
18 DOF
Figure 20: The cost for models obtained by using tool acceleration or motor position as output variables. Cost for both output variables are shown. torque to tool acceleration in the fixed world frame. The model cost is shown in Figure 20. Clearly, identification for one output variable gives a reasonable model also for the alternative output variable although the cost for one particular output variable is smaller if the identification is performed using the same output variable. This can possibly be explained by the quality of the acceleration signal (approximately transformed to world frame) or by the general model approximations (location and number of non-actuated joints and of course small errors in the rigid body parameters). An example of the identified stiffness parameters for the 15 DOF model structure are shown in Figure 21. The parameters obtained, using the two alternative output variables are quite similar, although there are some differences for k4–k6. The uncertainty, indicated by two standard deviations, is generally smaller compared to Figure 18. One possible explanation is that the resonance frequencies of this larger manipulator are lower, and thus more contained within the excited frequency interval (5–100 Hz). The relative level of the disturbances could also be an explanation. Two examples of FRF elements are shown in Figures 22–23. The obtained models are quite similar. If the total measurement time (number of configurations) is reduced, some experiments also show that identifiability of specific parameters can be recovered if tool acceleration is used instead of motor position, i.e., the uncertainty of specific parameters can be reduced from a very large to a low level.
129
Identification Using Added Robot Arm Sensors
Normalized Stiffness
1.2 1.1 1 0.9 0.8 k1
k2
k3
k4
k5
k6
k7
k8
k9
Figure 21: Stiffness parameters for 15 DOF model. The parameters obtained by using motor position are normalized to one and indicated by a circle. The parameters obtained by tool acceleration are indicated by a square. Two standard deviations are indicated.
70
Magnitude (dB)
60 50 40 30 20 10 5
Measured FRF Uncertainty (1 std) Measured FRF 18 DOF Model Motor Pos Id 18 DOF Model Tool Acc Id 10 Frequency (Hz)
30
Figure 22: One FRF element (motor torque to motor acceleration).
10
0 Magnitude (dB)
6
−10
−20
−30
−40 5
Measured FRF Uncertainty (1 std) Measured FRF 18 DOF Model Motor Pos Id 18 DOF Model Tool Acc Id 10 Frequency (Hz)
30
Figure 23: One FRF element (motor torque to tool acceleration).
130
Speed Z [mm/s] Speed Y [mm/s] Speed X [mm/s]
Paper A
Modeling of Robot Manipulators using EFJ Models
TCP Speed 500 0 −500 0 1000
0.5
1
1.5
2
2.5
3
3.5
4
0.5
1
1.5
2
2.5
3
3.5
4
0.5
1
1.5
2 2.5 Time [s]
3
3.5
4
500 0 −500 0 100 0 −100 0
Figure 24: Real (solid) and simulated (dotted) tool speed in all directions. Extended flexible joint model used in simulation.
7
Time-Domain Validation
A time-domain validation was also performed using the robot and identified models as described in Section 5. In a first validation experiment, the 18 DOF model with nonlinear transmission was validated. The validation is performed in closed loop (the system is unstable) and a PID controller is used for controlling the real robot. The output of a simulation model, using the identified model and the same PID controller (including position references) as the real robot, is then compared with the real robot output. Figures 24–25 show the tool speed and the motor torque for a complex8 robot path in the x-y plane. The tool position of the real robot was measured using a Leica laser measurement system LTD600 from Leica Geosystems, and the tool speed was computed by differentiation. Note that the control is quite bad, using this simple controller, and that the movement in the zdirection is not negligible. However, the model errors are in general quite small. In a second validation experiment, the programmed path was a 50 × 100 mm rectangle in the x-y plane. Figure 26 shows the path for the extended flexible joint model (18 DOF and nonlinear transmission), and for the flexible joint model (12 DOF). Figure 27 shows the errors of the simulation models, when compared to the measured robot path. It is clear that a higher-order model performs better. The remaining errors of the 18 DOF model are probably mostly due to the sim8 The path contains straight lines, circular segments, corner zones, and has a geometry that is expected to excite the manipulator over a wide frequency range.
131
Time-Domain Validation
τm1 [Nm]
10 0
τm2 [Nm]
−10 0 15
0.5
1
1.5
2
2.5
3
3.5
4
0.5
1
1.5
2
2.5
3
3.5
4
0.5
1
1.5
2 2.5 Time [s]
3
3.5
4
10 5 0
4 2
τ
m3
[Nm]
0
0 0
Figure 25: Real (solid) and simulated (dotted) motor torque for axis 1, 2, and 3. Extended flexible joint model used in simulation.
1460 1450 1440 x [mm]
7
1430 1420 1410 1400 1390 50
100 y [mm]
150
Figure 26: Real (solid) and simulated path. Extended flexible joint model (dotted) and flexible joint model (dashed) used in simulation.
132
Paper A
Modeling of Robot Manipulators using EFJ Models
Model Path Error [mm]
2.5 2 1.5 1 0.5 0 0.2
0.4
0.6
0.8 Time [s]
1
1.2
1.4
Figure 27: Error of simulated model when compared to the real robot path. Extended flexible joint model (thick solid) and flexible joint model (thin solid). ple friction model (7), and to the simple transmission model (a stiffening spring) used. A rigorous time domain validation would require a more accurate friction model and an improved transmission model, which was not included in this work.
8
Conclusion and Future Work
The problem of modeling an elastic robot manipulator has been studied. It has been shown that the so-called flexible joint model, modeling only the torsional gearbox elasticity, cannot describe a modern industrial manipulator accurately. The extended flexible joint model, where non-actuated joints are added to model the elasticity of the links and bearings, has been shown to improve the model accuracy significantly. The unknown model parameters have been estimated using a frequency domain gray-box identification method. A method for improving the parameter estimate by compensating for input and output dynamics and nonlinearities has also been suggested and evaluated. The conclusion is that the obtained model describes the motor and the tool movements with good accuracy. Similar model parameters have been obtained using two different output variables, the motor position and the tool acceleration. For, e.g., simulation and control design, this extended flexible joint model should be useful. However, the extended flexible joint control problem, compared to flexible joint control, is substantially harder (Moberg and Hanssen, 2007, 2009). The models have mainly been validated in the frequency domain, since modeling of the resonances is the main purpose of the elastic model. A small example of time-domain validation has also been presented. However, besides the timedomain result presented in this work, more comparisons of time-domain behavior and static deflection have been performed, and the results from identified model and from real manipulator experiments were in agreement (Moberg et al., 2008, 2009).
8
Conclusion and Future Work
133
A future work will be to investigate identification based on both motor position and arm side acceleration. This will include investigations of the optimal accelerometer placement on the robot arms, in combination with optimal robot configurations for identification. Such measurements on the robot arms will probably improve the identifiability of higher order models. Another future work is to improve the identification of nonlinearities and to reduce the identification inaccuracies caused by these. Time-domain identification is the natural approach for doing this, although not straight-forward as shown in Wernholt and Moberg (2010). To further improve the modeling of elasticities, a 3-D flexible link model (i.e., with deformation in all directions) can be combined with the extended flexible joint model. Identification methods for such a model would be an interesting research area. A second alternative for improvement is to increase the order of the extended flexible joint model (lumped parameter model), to find suitable locations of the non-actuated joints by model reduction of a FEM model, and to apply the identification method described in this paper (possibly with more sensors as previously discussed). A third option is to identify a higher order lumped parameter model with unknown spring/damper locations, unknown mass distribution, and unknown elasticity parameters. Such an approach is described in Yoshikawa et al. (2001).
134
Paper A
Modeling of Robot Manipulators using EFJ Models
Bibliography F. Al-Bender, V. Lampaert, , and J. Swevers. The generalized maxwell-slip model: A novel model for friction simulation and compensation. IEEE Transactions on Automatic Control, 50(11):1883–1887, 2005. A. Albu-Schäffer and G. Hirzinger. Parameter identification and passivity based joint control for a 7DOF torque controlled light weight robot. In Proc. 2001 IEEE International Conference on Robotics and Automation, pages 2852–2858, Seoul, Korea, May 2001. F. Behi and D. Tesar. Parametric identification for industrial manipulators using experimental modal analysis. IEEE Transactions on Robotics and Automation, 7(5):642–52, 1991. E. Berglund and G. E. Hovland. Automatic elasticity tuning of industrial robot manipulators. In 39th IEEE Conference on Decision and Control, pages 5091– 5096, Sydney, Australia, December 2000. W. Book and K. Obergfell. Practical models for practical flexible arms. In Proc. 2000 IEEE International Conference on Robotics and Automation, pages 835– 842, San Fransisco, CA, 2000. T. Brogårdh. Present and future robot control development—an industrial perspective. Annual Reviews in Control, 31(1):69–79, 2007. T. Brogårdh. Robot control overview: An industrial perspective. Modeling, Identification and Control MIC, 30(3):167–180, 2009. C. Canudas de Wit, H. Olsson, K.J. Åström, and P. Lischinsky. A new model for control of systems with friction. IEEE Transactions on Automatic Control, 40 (3):419–425, 1995. S.H. Crandall. On using non-gaussian distributions to perform statistical linearization. International Journal of Non-Linear Mechanics, 39(9):1395–1406, 2004. A. De Luca. Feedforward/feedback laws for the control of flexible robots. In Proceedings of the 2000 IEEE International Conference on Robotics and Automation, pages 233–240, San Francisco, CA, April 2000. A. De Luca and B. Siciliano. Closed-form dynamic model of planar multilink lightweight robots. IEEE Transactions on Systems, Man, and Cybernetics, 21 (4):826–839, 1991. T. Dobrowiecki and J. Schoukens. Measuring a linear approximation to weakly nonlinear MIMO systems. Automatica, 43(10):1737–1751, October 2007. B. Feeny and F.C. Moon. Chaos in a forced dry-friction oscillator: experiments and numerical modelling. Journal of Sound and Vibration, 170(3):303–323, February 1994.
Bibliography
135
P. Guillaume. Frequency response measurements of multivariable systems using nonlinear averaging techniques. IEEE Transactions on Instrumentation and Measurement, 47(3):796–800, June 1998. H.-J. Gutt, F. D. Scholl, and J. Blattner. High precision servo drives with DSPbased torque ripple reduction. In IEEE AFRICON, 1996, volume 2, pages 632– 637, September 1996. D. Hanselman. Resolver signal requirements for high accuracy resolver-to-digital conversion. IEEE Transactions on Industrial Electronics, 37(6):556–561, December 1990. T. Hardeman. Modelling and Identification of Industrial Robots including Drive and Joint Flexibilities. Phd thesis, University of Twente, The Netherlands, February 2008. G. E. Hovland, E. Berglund, and S. Hanssen. Identification of coupled elastic dynamics using inverse eigenvalue theory. In 32nd International Symposium on Robotics (ISR), pages 1392–1397, Seoul, Korea, April 2001. G.E. Hovland, E. Berglund, and O.J. Sørdalen. Identification of joint elasticity of industrial robots. In Proceedings of the 6th International Symposium on Experimental Robotics, pages 455–464, Sydney, Australia, March 1999. Y. Huang and C. S. G. Lee. Generalization of newton-euler formulation of dynamic equations to nonrigid manipulators. In Proceedings of the 1987 American Control Conference, pages 72–77, Minneapolis, MN, jun 1987. R. Johansson, A. Robertsson, K. Nilsson, and M. Verhaegen. State-space system identification of robot manipulator dynamics. Mechatronics, 10(3):403–418, 2000. T. R. Kane and D. A. Levinson. Dynamics: Theory and Applications. McGrawHill Publishing Company, 1985. K. Kozlowski. Modelling and identification in robotics. Advances in Industrial Control. Springer, London, 1998. L. Ljung. System Identification: Theory for the User. Prentice Hall, Upper Saddle River, New Jersey, USA, 2nd edition, 1999. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008.
136
Paper A
Modeling of Robot Manipulators using EFJ Models
S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. IEEE Transactions on Control Systems Technology, 17(6):1398–1405, November 2009. S. Moberg, E. Wernholt, S. Hanssen, and T. Brogårdh. Modeling and parameter estimation of robot manipulators using extended flexible joint models. 2010. Submitted to Journal of Dynamic Systems Measurement and Control, Transactions of the ASME. J. Öhr, S. Moberg, E. Wernholt, S. Hanssen, J. Pettersson, S. Persson, and S. SanderTavallaey. Identification of flexibility parameters of 6-axis industrial manipulator models. In Proc. ISMA2006 International Conference on Noise and Vibration Engineering, pages 3305–3314, Leuven, Belgium, September 2006. M. Östring, S. Gunnarsson, and M. Norrlöf. Closed-loop identification of an industrial robot containing flexibilities. Control Engineering Practice, 11:291– 300, March 2003. M. T. Pham, M. Gautier, and Ph. Poignet. Identification of joint stiffness with bandpass filtering. In 2001 IEEE International Conference on Robotics and Automation, pages 2867–72, Seoul, Korea, May 2001. M. T. Pham, M. Gautier, and Ph. Poignet. Accelerometer based identification of mechanical systems. In 2002 IEEE International Conference on Robotics and Automation, pages 4293–4298, Washington, DC, May 2002. R. Pintelon and J. Schoukens. System identification: a frequency domain approach. IEEE Press, New York, 2001. A.A. Shabana. Dynamics of Multibody Systems. Cambridge University Press, Cambridge, United Kingdom, 1998. B. Siciliano and O. Khatib, editors. Springer Handbook of Robotics. SpringerVerlag, Berlin Heidelberg, 2008. M. W. Spong. Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109:310–319, December 1987. B. Subudhi and A. S. Morris. Dynamic modelling, simulation and control of a manipulator with flexible links and joints. Robotics and Autonomous Systems, 41(4):257–270, 2002. L. M. Sweet and M. C. Good. Redefinition of the robot motion-control problem. IEEE Control Systems Magazine, 5(3):18–25, 1985. J. Swevers, W. Verdonck, and J. De Schutter. Dynamic model identification for industrial robots. IEEE Control Systems Magazine, pages 58–71, October 2007. P. Tomei. A simple PD controller for robots with elastic joints. IEEE Transactions on Automatic Control, 36(10):1208–1213, 1991. T.D. Tuttle and W.P. Seering. A nonlinear model of a harmonic drive gear transmission. IEEE Transactions on Robotics and Automation, 12(3):368–374, 1996.
Bibliography
137
H. Ueno, Y. Xu, and T. Yoshida. Modeling and control strategy of a 3-D flexible space robot. In Proceedings of the 1991 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 978–983, Osaka, Japan, November 1991. E. Wernholt and S. Gunnarsson. Nonlinear identification of a physically parameterized robot model. In Proc. 14th IFAC Symposium on System Identification, pages 143–148, Newcastle, Australia, March 2006. E. Wernholt and S. Gunnarsson. Analysis of methods for multivariable frequency response function estimation in closed loop. In 46th IEEE Conference on Decision and Control, New Orleans, Louisiana, December 2007. Accepted for publication. E. Wernholt and J. Löfberg. Experiment design for identification of nonlinear gray-box models with application to industrial robots. In 46th IEEE Conference on Decision and Control, New Orleans, Louisiana, December 2007. Accepted for publication. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372–15380, Seoul, Korea, July 2008a. E. Wernholt and S. Moberg. Experimental comparison of methods for multivariable frequency response function estimation. In 17th IFAC World Congress, pages 15359–15366, Seoul, Korea, July 2008b. E. Wernholt and S. Moberg. Nonlinear gray-box identification using local models applied to industrial robots. Automatica, 2010. Accepted for publication. T. Yoshikawa, H. Murakami, and K. Hosoda. Modeling and control of a three degree of freedom manipulator with two flexible links. In Proceedings of the 29nd Conference on Decision and Control, pages 2532–2537, Honolulu, Hawaii, December 1990. T. Yoshikawa, A. Ohta, and K. Kanaoka. State estimation and parameter identification of flexible manipulators based on virtual sensor and virtual joint model. In 2001 IEEE International Conference on Robotics and Automation, pages 2840–2845, Seoul, Korea, May 2001.
Paper B Nonlinear Gray-Box Identification Using Local Models Applied to Industrial Robots
Authors:
Erik Wernholt and Stig Moberg
Edited version of the paper: E. Wernholt and S. Moberg. Nonlinear gray-box identification using local models applied to industrial robots. Automatica, 2010. Accepted for publication.
Nonlinear Gray-Box Identification Using Local Models Applied to Industrial Robots Erik Wernholt∗ and Stig Moberg∗∗ ,∗ ∗ Dept.
∗∗ ABB
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden {stig,erikw}@isy.liu.se
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected]
Abstract In this paper, we study the problem of estimating unknown parameters in nonlinear gray-box models that may be multivariable, nonlinear, unstable, and resonant at the same time. A straightforward use of time-domain predication-error methods for this type of problem easily ends up in a large and numerically stiff optimization problem. We therefore propose an identification procedure that uses intermediate local models that allow for data compression and a less complex optimization problem. The procedure is based on the estimation of the nonparametric frequency response function (FRF) in a number of operating points. The nonlinear gray-box model is linearized in the same operating points, resulting in parametric FRFs. The optimal parameters are finally obtained by minimizing the discrepancy between the nonparametric and parametric FRFs. The procedure is illustrated by estimating elasticity parameters in a six-axes industrial robot. Different parameter estimators are compared and experimental results show the usefulness of the proposed identification procedure. The weighted logarithmic least squares estimator achieves the best result and the identified model gives a good global description of the dynamics in the frequency range of interest for robot control.
1
Introduction
When building a mathematical model of a physical object, the user generally has two sources of information; prior knowledge and experimental data. This gives the two modeling extremes, white-box models that are the result of extensive physical modeling from first principles, and black-box models, where the model is just a vehicle to describe the experimental data without any physical interpretations of its parameters. In between comes gray-box models that are parameterizations based on various degrees of physical insights. Compared with identification methods using black-box models, gray-box models have some particular 141
142
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
benefits. By including prior information, the model set (number of parameters) can be reduced while still providing a good approximation of the true system. This gives a reduced mean-square error (bias and variance) (Ljung, 2008). Since the gray-box model in contrast to the black-box model has a physical interpretation, the model is also useful in many ways, such as design optimization and virtual prototyping, which are important areas in industry. Some standard references for identification of gray-box models are Ljung (1999), Bohlin (2006), and Schittkowski (2002). There are also software packages available for identifying such models, e.g., Ljung (2007), Kristensen et al. (2004), Bohlin (2006), and Schittkowski (2002).
In this paper, we will mainly consider identification of nonlinear gray-box models with the lightest shade of gray, where a white-box model contains some unknown or uncertain parameters that need to be estimated from data. To be even more specific, we will allow our systems to be multivariable, nonlinear, unstable, and resonant at the same time. Usually, in the literature, at least one of the first three properties is left out to reduce the problem complexity. Identification of such complex systems is therefore challenging, both in finding suitable model structures and efficient identification methods. A straightforward use of time-domain predication-error methods (Ljung, 1999) for this type of system easily ends up in a large optimization problem, where each iteration in the optimization routine involves a number of simulations of a large and numerically stiff ODE for many samples. We therefore propose an identification procedure that uses intermediate local models that allow for data compression and a less complex optimization problem. The procedure is based on the estimation of the nonparametric frequency response function (FRF) in a number of operating points. The nonlinear gray-box model is linearized in the same operating points, resulting in parametric FRFs. The optimal parameters are finally obtained by minimizing a parametric criterion, measuring the discrepancy between the nonparametric and parametric FRFs.
The main motivation for our study is identification of accurate dynamic models for industrial robots, which incorporate all the four mentioned properties. We will come back to this application in Sections 5 and 6 when identification of elasticity parameters (spring-damper pairs) is used as an example of the proposed identification procedure.
Various aspects of the identification procedure will now be explained in the coming sections, starting with a more detailed outline of the procedure in Section 2. The nonparametric FRF estimation is described in Section 3, and some variants of the parametric criterion are presented in Section 4. This is followed by an experimental evaluation in Section 5 and a small comparison with time domain identification in Section 6. Finally, Section 7 concludes the paper.
2
143
Gray-Box Identification Using Local Models
Ntot,1,0
Ni,0
(1)
(1)
Ntot,1 , ut , yt
Ntot,i,0
(i,1)
Ni,0
Ni , ut
(i,1)
, yt
(i)
(i)
Ntot,i , ut , yt
Ntot,Q,0
(i,l)
Ni,0
Ni , ut
(i,l)
, yt
(Q)
Ntot,Q , ut
(i,nu )
Ni , ut
(Q)
, yt
(i,nu )
, yt
Figure 1: Illustration how the Ntot samples are distributed into Q operating points, where Ntot,i,0 samples are “wasted” to get to operating point i where the Ntot,i samples are further distributed into nu parts to estimate a (i,1)
nonparametric FRF by using the nu steady-state responses, ut (i,n ) ut u ,
2
(i,n ) yt u ,
(i,1)
, yt
, ...,
each of length Ni .
Gray-Box Identification Using Local Models
In this paper we consider the problem of identifying parameters θ in the following nonlinear gray-box model xt+1 = f (xt , ut , θ) + g(xt , ut , θ)wt , yt = h(xt , ut , θ) + et ,
(1a) (1b)
with state vector xt ∈ Rnx , input vector ut ∈ Rnu , output vector yt ∈ Rny , and θ ∈ Θ ⊂ Rnθ a vector of unknown parameters that specifies the mappings f ( · ), g( · ), h( · ) that may all be nonlinear. Furthermore, wt and et are process- and measurement noise vectors, that are assumed to be mutually independent zeromean white processes with covariance matrices E(wt wtT ) = Qw and E(et etT ) = Qe . One solution to the problem of identifying θ in (1) is to apply a nonlinear prediction error method (Ljung, 1999, pp. 146–147). The idea then is to find the parameters that will minimize the prediction errors εt,θ = yt − yˆt,θ ,
t = 1, 2, . . . , Ntot ,
where yˆt,θ is the model’s prediction of yt given previous measurements {u1 , y1 , . . . , ut−1 , yt−1 , ut }. For the minimization, one can choose different norms, but a common choice is a quadratic criterion V (θ) =
Ntot X
T εt,θ Λ−1 t εt,θ ,
(2)
t=1
with weighting matrix Λt and Ntot equal to the total number of measurement samples. For a general nonlinear system as in (1), it is often very hard to determine a predictor on formal probabilistic grounds. In most cases there is no explicit form available for the optimal solution. This implies that a predictor must be constructed either by ad hoc approaches, or by some approximation of the optimal solution, e.g., by using sequential Monte Carlo techniques (Doucet et al., 2001) or the Extended Kalman Filter (Anderson and Moore, 1979). We will further discuss such solutions in Section 2.4. In this paper, we propose another solution to handle the nonlinearities in the
144
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
system, where θ is identified by using intermediate local models. By performing experiments that sequentially excite the local system behavior in a number of (i) (i) operating points (u0 , y0 ), i = 1, . . . , Q, the criterion (2) can be approximated by V (θ) =
Q N tot,i X X
(i)
(i)
(i)
[εt,θ ]T [Λt ]−1 εt,θ ,
(3)
i=1 t=1 (i)
(i)
(i)
(i)
(i)
using the notation εt,θ = yt − yˆt,θ where yt = yt+ti − y0 denotes the measured (i)
output around operating point i with output vector y0 . The Ntot samples in (2) are therefore distributed according to Figure 1 (top part), where Ntot,i,0 samples are needed to move the system to operating point i, in which Ntot,i samples are P PQ collected, such that ti = Ntot,i,0 + i−1 r=1 (Ntot,r + Ntot,r,0 ) and Ntot = i=1 (Ntot,i + Ntot,i,0 ).
2.1
Linearized Gray-Box Model (i)
The predictor yˆt,θ for the local model can be simplified compared to yˆt,θ since only the local (linear) behavior needs to be captured. Assume now that the behav(i) (i) ior of (1) around an operating point (u0 , y0 ) can be described by the linearized model (i)
(i) (i)
(i) (i)
(i)
(i) (i) Cθ xt
(i) (i) Dθ ut
(i) et ,
(i)
(4a)
xt+1 = Aθ xt + Bθ ut + Bw,θ wt , (i) yt (i)
(i)
(i)
where xt = xt+ti − x0 , ut
(i)
=
+
(i)
(i)
= ut+ti − u0 , yt (i)
(i)
+
(4b) (i)
(i)
= yt+ti − y0 , and x0 is obtained
(i)
(i)
(i)
(i)
as, e.g., the solution to x0 = f (x0 , u0 , θ), y0 = h(x0 , u0 , θ). Note that x0 (i)
(i)
(i)
(i)
therefore, in general, will be θ-dependent. The matrices Aθ , Bθ , Cθ , Dθ are (i)
(i)
the partial derivatives of f ( · ) and h( · ) w.r.t. xt and ut and evaluated in (x0 , u0 ), (i)
(i)
(i)
and Bw,θ = g(x0 , u0 , θ). By assuming wt and et to be Gaussian and neglecting transients, the optimal one(i) step ahead predictor yˆt,θ for (4) is given by the steady-state Kalman filter (i) (i)
(i)
(i)
(i) (i)
(i) (i)
(i)
(i)
(i)
xˆt+1 = Aθ xˆt + Bθ ut + Kθ (yt − yˆt,θ ),
(5a)
(i) yˆt,θ
(5b)
=
(i) (i) Cθ xˆt
+
(i) (i) Dθ ut .
(i) (i)
(i)
(i)
(i)
Here, Kθ = Aθ Pθ [Cθ ]T [Cθ Pθ [Cθ ]T + Qe ]−1 where Pθ is the positive semidefinite solution of the stationary Riccati equation (omitting indices) T P = AP AT − AP C T (CP C T + Qe )−1 CP AT + Bw Qw Bw . (i)
By using (5), the prediction error εt,θ can be written as (i)
(i)
(i)
(i)
(i)
εt,θ = [Hθ (q)]−1 [yt − Gθ (q)ut ],
(6)
2
145
Gray-Box Identification Using Local Models
where q is the difference operator, ut+1 = qut , and (i)
(i)
(i)
(i)
(i)
Gθ (q) = Cθ [qI − Aθ ]−1 Bθ + Dθ ,
(7a)
(i) Hθ (q)
(7b)
=
(i) Cθ [qI
−
(i) (i) Aθ ]−1 Kθ
+ I.
In case the measurement data around operating point i can be described by (4) (i) with θ = θ0 , the prediction error εt,θ0 is the innovation with covariance matrix (i)
(i) (i)
(i)
(i)
Λ0 = Cθ0 Pθ0 [Cθ0 ]T + Qe . The weights Λt in (3) should therefore be close to (i)
Λ0 .
2.2
Intermediate Local Models
In this paper, we will not use (3) and (6) directly for the parameter estimation, but instead capture and compress the local behavior by an intermediate estimation of the nonparametric (FRF) in each operating point. There are several reasons for this, which will be outlined in Section 2.4. The criterion (3) will now be approximated and rewritten to show how the nonparametric FRF can be estimated and used for the parameter estimation (c.f. (11) and (12)). For simplicity, we will assume steady-state response data to avoid transients and initial conditions. To handle multivariable systems, the Ntot,i samples in operating point i are further split into nu parts in a similar way as in Ljung (2003). Each part contains Ni,0 transient samples followed by Ni samples of the steady-state response (assuming a periodic excitation), such that Ntot,i = nu (Ni + Ni,0 ). For details, see Figure 1. (i)
By neglecting the transient samples and using constant weights Λt = Λ(i) , (3) is approximated by V (θ) =
nu X Ni Q X X
(i,l)
(i,l)
[εt,θ ]T [Λ(i) ]−1 εt,θ ,
(8)
i=1 l=1 t=1 (i,l) εt,θ
(i) (i,l) [Hθ (q)]−1 [yt
(i)
(i,l)
where = − Gθ (q)ut ] is the prediction error in operating point i for data part l using the model (6). By using Parseval’s relationship and assuming periodic data, (8) can be rewritten as V (θ) =
nu X Ni Q X X
(i,l)
(i)
(i,l)
[Xk,θ ]H [Φ k,θ ]−1 Xk,θ ,
(9)
i=1 l=1 k=1
with ( · )H denoting complex conjugate transpose, (i,l)
(i,l)
Xk,θ = Yk
(i)
(i,l)
− Gk,θ Uk
,
(i)
(i)
(i)
Φ k,θ = Hk,θ Λ(i) [Hk,θ ]H ,
and using the short notation (i)
(i)
Gk,θ = Gθ (e jωk ), (i,l)
Yk
(i,l)
and Uk
(i)
(i)
Hk,θ = Hθ (e jωk ).
are the discrete Fourier transform (DFT) of the output and input
146
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
signals, (i,l)
Yk
= Ni−1/2
Ni X
(i,l) jωk t
yt
e
ωk =
,
t=1 (i,l) Uk .
and similarly for the matrix trace as
2πk , Ni
The criterion (9) can be more compactly written by using
V (θ) =
Ni Q X X
(i)
(i)
(i)
tr([Xk,θ ]H [Φ k,θ ]−1 Xk,θ )
(10)
i=1 k=1 (i)
(i)
(i)
(i)
where Xk,θ = Yk − Gk,θ Uk and the nu DFT vectors are collected into matrices Uk = [Uk
(i)
(i,1)
Uk
(i) Yk
(i,1) [Yk
(i,2) Yk
=
(i,2)
(i,nu )
. . . Uk ...
],
(i,n ) Yk u ].
(i)
If the input DFT matrix Uk has full rank, the nonparametric FRF estimate can be calculated as b(i) = Y(i) [U(i) ]−1 . G (11) k k k The criterion (10) can now finally be rewritten once more to show how (11) can be used for identification: V (θ) =
=
Ni Q X X i=1 k=1 Ni Q X X
(i)
(i)
(i)
(i)
(i)
e U ]H [Φ ]−1 G e U ) tr([G k,θ k k,θ k,θ k (i)
(i)
(i)
e )H [W ]−1 vec(G e ), vec(G k,θ k,θ k,θ
(12)
i=1 k=1
with e(i) = G b(i) − G(i) , G k,θ k,θ k
(13)
and (i)
(i)
(i)
(i)
Wk,θ = [Uk [Uk ]H ]−T ⊗ Φ k,θ .
(14)
Here, ⊗ is the Kronecker product and (12) is obtained by using (A ⊗ B)−1 = A−1 ⊗ B−1 , tr(AB) = tr(BA), and tr(ABCD) = vec(D T )T (C T ⊗ A) vec(B). The operator vec(B) = [b1T b2T . . . bnT ]T stacks the columns bi of a matrix B into a long column vector. The new criterion (12) now measures the (weighted) discrepancy (13) between b(i) and the parametric FRF G(i) , obtained by the nonparametric FRF estimate G k k,θ linearizing (1), for all the Q different operating points. To be noted is that the weighting matrix (14) can be seen as the covariance expression for the nonparametric FRF estimate (11), under certain assumptions on the measurements. See Section 3 for more details.
2
147
Gray-Box Identification Using Local Models
2.3
Proposed Identification Procedure
To summarize, the proposed identification procedure is given by the following three steps: 1. Collect experimental data from Q operating points. 2. Estimate intermediate local models for each operating point, in this paper b(i) , i = 1, . . . , Q. nonparametric FRFs G k e(i) = 3. Obtain the optimal parameter vector θˆ by minimizing the discrepancy G k,θ b(i) − G(i) between G b(i) and the parametric FRF, G(i) , for all excited frequenG k k,θ k k,θ cies and operating points. This identification procedure was first suggested in Öhr et al. (2006) and various aspects of the procedure are further analyzed in Wernholt (2007) and in the cited references by Wernholt and co-authors in this paper. (i)
Remark 1 Note that the parametric FRF, Gk,θ , is a function of the nonlinear gray-box model (1) such that for each parameter vector θ during the minimization, (1) is linearized according to Section 2.1 before calculating the FRF (i) (i) (i) Gk,θ = Gθ (e jωk ) with Gθ (q) from (7a).
2.4
Discussion
As was previously mentioned, it is common to use prediction-error methods for system identification. One simple (and often used) way of deriving an ad hoc predictor for a nonlinear system is to disregard the process noise wt in (1). The predictor is then actually a simulation of the noise-free model. However, this only works if the model is stable, since a stable predictor always is required. Another option is to apply the ideas in Forssell and Ljung (2000), where the predictor is modified such that an output error model can be used also for unstable systems. This is appealing since the user often is mainly interested in modeling the dynamics of the plant, the noise properties are less interesting. These ideas are also exploited in Larsson et al. (2009), where the nonlinear dynamics of an unstable fighter aircraft is identified, using the Extended Kalman Filter (Anderson and Moore, 1979). See also the work done on stochastic gray-box identification by, e.g., Bohlin (2006) and Kristensen et al. (2004). However, a drawback with all these time-domain solutions is that they are numerically intensive and sensitive for our setup due to a resonant, numerically stiff and large multivariable system (many states and parameters). In each iteration of the optimization routine, a large number of simulations of this stiff system must be carried out to obtain the gradient, and many samples are needed in order to capture the resonant behavior. One important feature of using intermediate models therefore is that they enable data compression, which is also emphasized in, e.g., Gawthrop and Wang (2005). Thousands of data points can be compressed into an FRF with a few excited frequencies, which reduces computations in the nonlinear gray-box identification
148
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
substantially (see Section 6 for an example). It is important to acknowledge that the idea of estimating intermediate models is not new and is commonly used in, e.g., modal analysis where usually a linear parametric model is fitted to an estimated FRF (Behi and Tesar, 1991; Verboven et al., 2005). Another related result is presented in Johansen and Foss (1995), where local black-box models are combined into a global model through interpolation. However, such a model will have very limited extrapolation features since it is mainly a way of obtaining an accurate nonlinear black-box model in the manifold spanned by the local models. The difference in our setup is that the prior information incorporated into the nonlinear gray-box model (1) makes it probable that, once the parameters have been properly estimated, the model will give an accurate description of the behavior in a fairly large range of the state space. The parameters of this global model are however estimated by only using a few intermediate local models. Other features of the proposed identification procedure, besides data compression, is that unstable output-error models works fine in the frequency domain as long as the input and output signals are bounded (which is handled by closedloop experiments). In the time domain, this is much more involved (Forssell and Ljung, 2000). In the frequency domain, it is also easy to validate the model such that all important resonances are captured, and model requirements in the frequency domain are easily handled. The proposed procedure also has some possible problems. Local minima in the optimization give problems here as well as for prediction error methods. In addition comes some difficulties with biased nonparametric FRF estimates due to closed-loop data and nonlinearities. The bias due to closed-loop data is sometimes negligible and can also be reduced by proper experiment design to increase the signal-to-noise ratio, such as periodic excitation (see Section 3). Another possible problem is if a linear model is unable to describe the dynamics in an operating point even for small perturbations due to the nonlinearities. This can be the case for certain nonlinearities such as friction or backlash, but the problem can often be reduced by the choice of excitation (e.g., avoid zero velocity to reduce the effects due to Coulomb friction). Identifiability can also be lost due to the linearization.
3
FRF Estimation
As an intermediate step toward the parameter identification, estimates of the nonparametric FRF (11) in a number of operating points are needed. In the literature (see, e.g., Guillaume, 1998; Pintelon and Schoukens, 2001; Wernholt and Moberg, 2008b) various estimation methods exist that differ in requirements on the measurement setup and signal-to-noise ratio, as well as in bias and variance properties. Here we will mainly consider the simplest version (11) due to its connection to the prediction error criterion.
3
149
FRF Estimation v r +
Σ
Controller
u
Plant
y Σ
−
Figure 2: Closed-loop measurement setup.
3.1
Properties of Nonparametric FRF Estimates
Assume now that N samples of data are generated from a noise-corrupted linear system G(q) in open loop yt = G(q)ut + vt . bk = Yk /Uk (also called For a scalar input ut , the nonparametric FRF estimate G Empirical Transfer Function Estimate, ETFE), with Uk and Yk the DFTs of the input and output signals, has the following statistical properties (see Lemma 6.1 in Ljung, 1999): bk ) = Gk + √ E(G
ρ1 N Uk
,
bk ) = Cov(G
ρ2 Φk + . 2 |Uk | N |Uk |2
Here, Gk = G(e jωk ), Φ k is the spectrum of the additive noise vt , and ρi are constant bounds that depend on the system impulse response, maximum input amplitude, and the covariance function of the noise. Moreover, it can be shown that the FRF estimates at different frequencies are asymptotically (N → ∞) uncorrelated. In general, the FRF estimate will therefore be asymptotically unbiased with a variance equal to a noise-to-signal ratio Φ k /|Uk |2 , usually resulting in a very crude estimate that must be smoothed over neighboring frequencies to reduce the random fluctuations. However, these properties are drastically different if the data is periodic, for example N = Np P with P an integer number of periods and Np samples in each period, such that ut = ut+Np . In that case, ρ1 = 0 and |Uk |2 increases linearly with P for the excited frequencies ωk = 2πk/Np . This gives an unbiased estimate and the variance decays like 1/P (assuming that vt contains no pure sinusoids at the excited frequencies such that Φ k is approximately constant when P is increased). bk = Yk U−1 Similar results can be obtained for the multi-input case, stating that G k is unbiased for periodic data and with a covariance matrix given by (cf. (14)) bk ) = E(vec(G bk − Gk )[vec(G bk − Gk )]H ) Cov(G −T = [Uk UH ⊗ Φk , k ]
where we have neglected a term similar to ρ2 /(N |Uk |2 ) above. For details, see for example Theorem 8.2.5 in Brillinger (1981) or Wernholt and Gunnarsson (2007). If the open-loop system to be identified is unstable, it is necessary to collect data in closed loop. Consider therefore the setup in Figure 2, where the controller takes as input the difference between the reference signal r and the measured
150
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
and sampled output y, and u is the input. The additive noise v contains various sources of noise and disturbances. The nonparametric FRF estimate then usually gets biased due to the correlation between u and v. Assuming a linear plant and controller, yt = G(q)ut + vt ,
ut = F(q)(rt − yt ),
and the same number of inputs and outputs ny = nu = n, the estimate is given by bk = Yk U−1 = Gk + Vk U−1 G k k = Gk + Vk (Rk − Vk )−1 (Gk + Fk−1 ), where Rk and Vk are the DFT matrices of the reference and measurement noise signals, similarly as for Yk and Uk . It is then hard to calculate the bias due to the matrix inverse, but it is approximately proportional to the noise-to-signal ratio (Φ k /|Rk |2 for n = 1). Fortunately, the signal-to-noise ratio can be made arbitrarily large at the excited frequencies by using a periodic excitation. The FRF estimate will therefore be asymptotically unbiased (as the number of periods, P → ∞) at the excited frequencies also in closed loop. For details, see Wernholt and Gunnarsson (2007).
3.2
Excitation Signals
As has already been stressed, the quality of the nonparametric FRF estimate is highly dependent on the excitation where Uk must be invertible and periodic data is desirable. We will therefore assume periodic data with Ni = Np P , where P is an integer number of periods (important to avoid leakage effects in the DFTs) and Np is the number of samples in each period. For multivariable systems, the orthogonal random phase multisine signal has been proposed by Dobrowiecki and Schoukens (2007) to minimize the FRF uncertainty in open loop, given certain input amplitude constraints. Here, this signal will be used in closed loop, which corresponds to an optimal experiment design with output amplitude constraints. The excitation signal in operating point i is (i)
2πj
(i)
then given by Rk = Rd,k T, where T is an orthogonal matrix, Til = e n (i−1)(l−1) , with TTH = nI. Rd,k is a diagonal matrix where each diagonal element is the DFT of a random phase multisine signal, which in the time domain can be written as rt =
Nf X
Ak cos(ωk t + φk ),
k=1
with Nf the number of excited frequencies (limited by Nf ≤ Np /2 assuming periodic excitation and Np even), amplitudes Ak , frequencies ωk chosen from the grid {ωk = 2πk/Np , k = 1, . . . , Np /2}, and random phases φk uniformly distributed between 0 and 2π. The selection of frequencies as well as the amplitude spectrum will affect the parameter estimation in the next step. Using too many frequencies for a given total excitation power will give a low signal-to-noise ratio, which increases both the bias and the variance in the nonparametric FRF estimate. The
4
151
Parameter Estimation (i)
amplitude spectrum should also reflect the parameter sensitivity (cf. Ψ 0,k in (16)), (i)
such that θ influence Gk,θ for the selected frequencies. The nonparametric FRF estimate can be improved by collecting more experimental data and average over multiple blocks (by performing nu M experiments in each operating point, with M an integer number of blocks) and/or periods. The covariance matrix can then also be estimated. For a linear system, averaging over different periods is sufficient, whereas for a nonlinear system it can be essential (i) to average over blocks where Rk in each block have different realizations of the random phases. The reason is that nonlinearities otherwise might distort the estimate and give a too low uncertainty estimate. See Schoukens et al. (2005) for details and Wernholt and Gunnarsson (2008) for experimental results.
3.3
Optimal Operating Points
Given a nonlinear gray-box model (1), the information about the unknown parameters will vary depending on the operating point. Therefore, given a limited total measurement time, one should perform experiments around the operating point(s) that contribute the most to the information about the unknown parameters. In Wernholt and Löfberg (2007), this problem is formulated as a convex optimization problem by using a set of candidate operating points, obtained by griding the workspace. It is also shown that the experiment design is efficiently solved by considering the dual problem. Given thousands of candidates, only a few operating points are selected in the optimum. See Wernholt and Löfberg (2007) for details and examples.
4
Parameter Estimation
When the nonparametric FRFs have been estimated from data, the last step is (i) to linearize (1) in the same operating points, calculate the parametric FRFs, Gk,θ , i = 1, . . . , Q, and estimate the unknown parameters by minimizing a cost function V (θ), for example (12). First, two different parameter estimators will be analyzed and compared. Next, the selection of weights and the solution of the optimization problem are discussed.
4.1
Weighted Nonlinear Least Squares
Minimizing (12) for the Nf excited frequencies gives the weighted nonlinear least squares (NLS) estimator: NLS θˆ N = arg min VNNLS (θ), f f
(15a)
θ∈Θ
VNNLS (θ) = f
Nf Q X X (i) (i) (i) [Ek,θ ]H [Wk ]−1 Ek,θ ,
(15b)
i=1 k=1 (i)
(i)
(i)
b ) − vec(G ), Ek,θ = vec(G k k,θ
(15c)
152
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
(i)
where Wk is assumed to be a Hermitian (W = W H ) weighting matrix. The asymptotic properties (Nf → ∞) of this estimator are given in the following result under certain assumptions: b(i) = G(i) + η (i) with 1. The nonparametric FRF is unbiased and given by G k 0,k k (i)
vec(ηk ) a zero mean circular complex random vector, independent over i (i)
and k, with finite covariance matrix W0,k . (i)
(i)
2. The true system is in the model class: G0,k = Gk,θ . 0
3.
Θ is a compact set where VNNLS (θ) and its first- and second-order derivatives f are continuous for any value of Nf .
4. For Nf large enough, the expected value of VNNLS (θ) has a unique global f minimum θ0 in Θ. p NLS NLS Result 1 The NLS estimator (15) is consistent (limNf →∞ θˆ N = θ0 ), and Nf (θˆ N − f f θ0 ) is asymptotically Normal distributed with covariance matrix Pθ , ( )−1 Q Nf 1 1 X X (i) (i) (i) T Pθ = < Ψ 0,k Ξk [Ψ 0,k ] 2 Nf i=1 k=1 Nf ( ) Q X 1 X (i) (i) (i) T < Ψ 0,k Σk [Ψ 0,k ] × Nf i=1 k=1
Nf ( )−1 Q X 1 X (i) (i) (i) T < Ψ 0,k Ξk [Ψ 0,k ] , × Nf
(16)
i=1 k=1
with the Jacobian matrix
(i) [Ψ 0,k ]T
(i)
=
∂ vec(Gk,θ ) ∂θ
, θ=θ0
( · ) denoting complex conjugate, and (i)
(i)
(i)
(i)
(i)
(i)
Σk = [Wk ]−1 W0,k [Wk ]−1 .
Ξk = [Wk ]−1 ,
The covariance is minimized by using the weights (i)
(i)
Wk = W0,k ,
(17)
which also simplifies (16) to ( )−1 Q Nf 1 1 X X (i) (i) −1 (i) T Pθ = < Ψ 0,k [W0,k ] [Ψ 0,k ] . 2 Nf i=1 k=1
This result is a variant of classical results on static nonlinear regression, such as Jennrich (1969). See also (Pintelon and Schoukens, 2001, Thm. 7.21) and (Ljung,
4
153
Parameter Estimation
1999, Thm. 9.1) for similar ideas. Under the given assumptions, the NLS estimator therefore results in unbiased NLS parameters and Cov(θˆ N ) ∼ N1 Pθ , with Pθ from (16). The first assumption is true f f asymptotically, also in a closed-loop setup, given that we use a periodic excitation signal with infinitely many periods. The second assumption, that the true system is in the model class, is necessary when talking about consistency, but is in reality of course violated. Therefore, we will also have a bias term that depends on the chosen weights, see Section 4.3 for additional comments.
4.2
Weighted Logarithmic Least Squares
For systems with a large dynamic range, the NLS estimator may become ill-conditioned. Therefore, the weighted logarithmic least squares (LLS) estimator has been suggested (Pintelon and Schoukens, 2001, pp. 206–207) LLS θˆ N = arg min VNLLS (θ), f f
(18a)
θ∈Θ
LLS
VNf
Nf Q X X (i) (i) (i) (θ) = [Ek,θ ]H [Wk ]−1 Ek,θ ,
(18b)
i=1 k=1 (i) b(i) ) − log vec(G(i) ), Ek,θ = log vec(G k,θ k
(18c)
where log G = log |G| + j arg G. According to Pintelon and Schoukens (2001), this estimator has improved numerical stability and is particularly robust to outliers in the measurements. However, from a theoretical point of view, the estimator is slightly biased. The bias can be neglected if the FRF uncertainty is fairly small, see Pintelon and Schoukens (2001) for details. By neglecting the bias, and using ∂ ∂ bk − log Gk,θ ≈ ηk /Gk,θ , one can show log Gk,θ = G1 ∂θ Gk,θ and Ek,θ0 = log G 0 0 ∂θ k,θ a similar result as Result 1 for the LLS estimator. Result 2 The asymptotic covariance matrix for the LLS estimator (18) is approximately given by (16) with −1 (i) (i) (i) (i) (i) (i) (i) (i) , Σk = Ξk W0,k Ξk , Ξk = Gd,k,θ Wk [Gd,k,θ ]H 0
(i)
0
(i)
and Gd,k,θ = diag(vec(Gk,θ )). Using the weights 0 0 −H −1 (i) (i) (i) (i) , Wk = Gd,k,θ W0,k Gd,k,θ 0
0
(19)
gives approximately the same covariance as for the NLS estimator (when using (17)).
4.3
Selection of Weights
Even if the covariance is minimized by using the weights (17) and (19), respectively, the chosen weights will in general be different for a number of reasons. (i) First, the true covariance matrix W0,k is usually not known so the user must in-
154
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots (i)
b . Second, the weights stead be content with an estimated covariance matrix W 0,k also reflect where the user requires the best model fit. This is important in case the model is unable to describe every detail in the measurements. The weights should then primarily be selected to distribute the bias, not to get minimum variance. For a resonant system, it is often easier to use the LLS estimator in the way that even constant weights will make sure that both resonances and anti-resonances are matched by the model. This is due to the fact that the logarithm in the LLS estimator inherently gives the relative error, compared to the absolute error when using the NLS estimator. With the NLS estimator, the anti-resonances are easily (i) missed if not choosing [Wk ]−1 large at those frequencies.
4.4
Solving the Optimization Problem
The minimization problem to be solved, (15) or (18), is unfortunately non-convex. In the example in Section 5, the problem is solved using fminunc in Matlab, which is a gradient-based method which only returns a local optimum. Due to the existence of local minima, a good initial parameter vector, θinit , is important. The problem can be partly solved by random perturbations of the initial parameters in order to reduce the risk falling into local minima. Or, alternatively stated, to obtain a local minimum which is good enough for the purpose of the model. The quality of the resulting model, as well as problems with local minima and identifiability properties, depend on the choices of estimator, weights, and operating points for the experiments. This will be illustrated in Sections 5 and 6.
4.5
Final Identification Procedure
The identification procedure outlined in the previous sections is now summarized: 1. Select a number of operating points, e.g., by solving an optimal experiment design problem according to Wernholt and Löfberg (2007). 2. Design the excitation signal and collect experimental data from each operating point. Preferably by using an orthogonal random phase multisine signal with multiple periods and/or realizations, see Section 3.2. 3. Estimate the nonparametric FRF (11) in each operating point, including uncertainty estimates by using multiple periods and/or realizations. 4. Select a parameter estimator, e.g., NLS (15) or LLS (18) (preferred for resonant systems) with suitable weights according to Section 4.3. 5. Solve the corresponding minimization problem, (15) or (18), by using optimization software.
5
Application Example
155
Figure 3: The IRB6640 robot from ABB.
Figure 4: An extended flexible joint dynamic model with three rigid bodies (RB), three joints, two motors, and thus five degrees-of-freedom.
5
Application Example
In this section, the described identification procedure, see Section 4.5, is applied to an industrial robot from the ABB IRB6600 series, see Figure 3. Similar results can be found in Wernholt and Moberg (2008a) and some early results in Öhr et al. (2006).
5.1
Modeling of Robot Manipulators
Most publications concerning robot manipulators only consider elasticity in the rotational actuated joint direction. If gear elasticity is considered we then get the flexible joint model, and if link deformation restricted to a plane perpendicular to the preceding joint is included we get the flexible link model. These models are described in, e.g., De Luca (2000). However, these models cannot accurately describe a modern industrial robot with weight- and cost optimized components, and thus more elasticity, which results in more complicated vibration modes inside the controller bandwidth. A more general model, called the extended flexible joint model, was suggested in Moberg and Hanssen (2007). The model is a lumped parameter model, which consists of a serial kinematic chain of rigid bodies. The rigid bodies are connected by elastic elements, representing torsional deflection. The elastic elements consist of one or more elastic joints. An actuated
156
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
joint consists of a motor and a gearbox, and the corresponding spring-damper pair models the torsional deflection of the gearbox. A non-actuated joint models elasticities in, e.g., bearings and links. One example of this model is illustrated in Figure 4, consisting of two motors, three rigid bodies, and three rotational spring-damper pairs. Thus, the model has two actuated joints, one non-actuated joint, and five degrees-of-freedom (DOF). Generally, if the number of actuated and non-actuated joints are Υ a and Υ na , respectively, the system has 2Υ a + Υ na DOF. The model equations can then be described as " # " # τ q¨g M(qg , qe ) + c(qg , qe , q˙ g , q˙ e ) + g(qg , qe ) = g , ¨ τe qe Kg (η −1 qm − qg ) + Dg (η −1 q˙ m − q˙ g ) = τg , −Ke qe − De q˙ e = τe , Mm q¨m + fm (q˙ m ) + η −T τg = τm , where the angular positions are described by qg ∈ RΥ a (actuated joints), qe ∈ RΥ na (non-actuated joints), and qm ∈ RΥ a (motor). The torques are τg ∈ RΥ a (actuated joints), τe ∈ RΥ na (non-actuated joints), and τm ∈ RΥ a (motors). The inertia matrices for the motors and joints are Mm and M( · ), respectively. The Coriolis and centrifugal torques are described by c( · ), and g( · ) is the gravity torque. The nonlinear friction in motor bearings and gearboxes is fm ( · ) and η is the gear ratio matrix. Finally, Kg , Ke , Dg , and De are the diagonal stiffness and damping matrices for the actuated and non-actuated directions. As an example, the complete equations for the model in Figure 4 are given in Moberg and Hanssen (2009). Since the inertia matrices are invertible (Spong et al., 2006), the system can be formulated in state-space form ˙ = fc (x(t), u(t), θ), x(t)
(21a)
y(t) = h(x(t), u(t), θ),
(21b)
where the states, x, can be chosen as the angular position and speed of the motors and joints, the input, u, is the actuator torque τm , and the measured variable is the motor angular position, i.e., y = qm . The rigid body parameters of the model (mass, length, inertia, and center of mass) are assumed to be known from a CAD model or a rigid body identification, see, e.g., Kozlowski (1998). Here, the main objective is identification of elasticity parameters (spring-damper pairs), which are denoted θ. In the identification procedure described in the previous sections, the paramet(i) ric FRF Gk,θ is obtained by linearizing the discrete-time model (1) according to Section 2.1. A problem now is that the dynamics in our gray-box model (21) is expressed in continuous time. Of course it is possible to discretize (21a), with assumptions on the inter-sample behavior of u, to obtain f (xt , ut , θ). However, since this must be carried out for each new θ-value during the optimization (see Remark 1), this will be very time consuming. For simplicity, we will instead first linearize (21) and then discretize the linearized model by using zero-order hold
5
157
Application Example (i)
to obtain Gk,θ . This gives a negligible error (since the considered frequency range is much smaller than the Nyquist frequency) but simplifies the identification procedure substantially. For more details about the linearization and discretization, see, e.g., Wernholt (2007).
5.2
Experimental Setup
The robot used in the experiments is equipped with an experimental feedback controller to allow for offline generated excitation signals. The excitation signal is the angular position reference, and its derivative is the sum of a low-frequency square wave and an orthogonal random phase multisine signal with constant amplitude spectrum for 100 log-spaced frequencies between 2–60 Hz. The square wave is used to reduce the number of zero velocity crossings, and thus reduce the influence of Coulomb friction. For the identification, only the standard sensors installed in the robot are used, i.e., the output y is the motor angular position qm . The input u is the torque reference signal from the controller. However, in the figures, the angular acceleration q¨m is considered as output to avoid the effects of double integrators. The identification is carried out both on a simulated robot, where the true value θ0 is known, and on the real robot. Simulations and robot experiments were performed in 15 optimal operating points (see Wernholt and Löfberg, 2007), with 24 sub-experiments in each operating point to get M = 4 blocks with nu = 6 parts (the robot has 6 axes). The sampling period is Ts = 0.5 ms and every subexperiment has Ni = Np = 2 · 104 samples (i.e., P = 1). Each block has a different realization of the multisine signal in order to reduce the influence of both deterministic and stochastic disturbances, and also to enable the computation of the FRF uncertainty. Based on these measurements, the parameters are then estimated using the following estimators: LLSUW: LLS with user-defined weights. LLSCW: LLS with minimal-covariance weights (19). NLSUW: NLS with user-defined weights. NLSCW: NLS with minimal-covariance weights (17). (i)
For simplicity, only diagonal weights Wk are considered (i.e., covariance between different elements in the FRF is neglected). The user-defined weights have only a few levels and are chosen to, roughly, consider the FRF uncertainty. The minimal-covariance weights, (17) and (19), are computed using the estimated cob(i) . To assess the sensitivity to the initial b (i) and G(i) ≈ G variance matrix1 W 0,k k,θ0 k parameter vector, θinit , 100 optimizations are performed for each of the four es[l] timators, using randomly perturbed initial parameters, θinit , l = 1, . . . , 100 (the 1 Actually only the diagonal, since more blocks of data are needed in order to estimate all elements
b (i) . in W 0,k
158
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots [l]
same for all estimators). Each element in θinit is obtained by multiplying the corresponding element in θ0 by 10ϕ , where ϕ is a random number from a uniform distribution on the interval [−1, 1]. For the simulated robot, θ0 is known, but for the real robot, a reasonable guess of θ0 is used. The nonlinear gray-box model for the identification is an extended flexible joint model with Υ a = 6, Υ na = 6, and thus 18 DOF or 36 states. A linear friction model is used and the parameter vector θ consists of 12 spring constants, 12 dampers, and 6 viscous friction parameters. The linear friction model improves the estimate of the unknown springs and dampers, but the identified friction is not physically correct. For an accurate friction identification, the friction model needs to be nonlinear and other excitation signals must be used for dedicated friction estimation. Note also that it is important to design the experiments (e.g., avoid zero velocity) in such a way that unmodelled properties (e.g., Coulomb friction) does not disturb the identification of the gray-box model.
5.3
Identification of Simulated Robot
The simulation model is based on the gray-box model with some modifications in order to act as a substitute to the real robot. These modifications are: • Deterministic torque ripple disturbances (Gutt et al., 1996) are added to the torque input in order to simulate ripple disturbances in the motors, drive electronics, and gearboxes. • Deterministic and stochastic disturbances are added to the measured motor angular position to simulate the real position sensor of the robot (Hanselman, 1990). • A nonlinear friction model, as described in Moberg et al. (2008), is used. The same controller and excitation signals were used as for the real robot. The model cost for all 400 identified models (4 estimators × 100 different initial parameter vectors) is shown in Figure 5. To get comparable numbers, all costs are computed using the LLSUW cost function (18). Clearly, the NLS criteria is very sensitive with respect to initial parameter values, and the minimal-covariance weight is more sensitive than the user-defined weight. Table 1 shows the errors in estimated springs and dampers for the best model, i.e., the model with minimum cost function. Both NLSUW and LLSUW give quite accurate values for the spring constants but the estimated dampers are not that accurate. The NLSCW estimator fails completely. To be noted is that despite the good result for the best NLSUW model in Table 1, approximately only 5 out of 100 optimizations for NLSUW give a reasonable model, compared to approximately 60 for LLSUW. This is evident in Figure 5, as well as in Figure 6 where the spring constant accuracy for the 60 best models is shown. Figure 6 also shows that the LLSUW estimator works really well from a stiffness identification point of view. The parametric FRF for the best LLSUW model is compared to the nonparametric FRF in Figure 7 (only element [1, 1] in operating point 8). The parametric FRF (8) of the true linearized model (TLM), Gk,θ , is also shown as a comparison. This 0
159
Application Example
Normalized Cost
6
LLSUW LLSCW NLSUW NLSCW
5 4 3 2 1
10
20
30
40 50 60 70 Sorted Optimization
80
90
100
Figure 5: Simulated robot: The normalized cost (computed using the LLSUW cost function) for all identified models. Each optimization is carried out using different initial parameter values.
Table 1: Simulated robot: Max and mean (arithmetic) errors of the 12 springs (K) and the 12 dampers (D) for the best model. The error is computed as ˆ 100(10| log10 (Θ/Θ0 )| − 1). The motivation for this is that a stiffness parameter of 2 Θ0 is about as bad as 1/2 Θ0 . NLSCW NLSUW LLSCW LLSUW Max Err K 1745 % 3.1 % 11 % 3.1 % Mean Err K 224 % 1.5 % 2.8 % 1.5 % Max Err D 1293 % 135 % 412 % 125 % Mean Err D 436 % 55 % 115 % 41 %
Max Error [%]
50 LLSUW LLSCW NLSUW
40 30 20 10 0
10
20
30
40
50
60
20 Mean Error [%]
5
LLSUW LLSCW NLSUW
15 10 5 0
10
20 30 40 Sorted Optimization
50
60
Figure 6: Simulated robot: Error in estimated stiffness for the 60 best models.
160
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
Magnitude (dB)
50 40 30
FRF Unc. (1 std) Nonpar. FRF Par. FRF IDM Par. FRF TLM
20 2
5
10 20 Frequency (Hz)
50
Figure 7: Simulated robot: The magnitude (from motor torque to motor acb(8) , the identified celeration) of element [1, 1] for the nonparametric FRF, G (8)
k
(8)
parametric FRF G ˆ (IDM), and the true linearized parametric FRF Gk,θ k,θ 0 (TLM).
model has a low value of the viscous friction, and the nonlinear friction terms (e.g., Coulomb friction) are omitted during the linearization. Note that the identified gray-box model (IDM) obtains a higher value of the viscous friction to better describe the damping caused by the nonlinear friction, which is clearly visible in the nonparametric FRF. Some standard deviations for the estimated springs and dampers are listed in Table 2 where the theoretical standard deviation of the best LLSUW model according to (16) is compared to the empirical standard deviation for the parameters in the 28 best LLSUW models. Note that the empirical variation of parameter values is due to the model parameter sensitivity of the cost function in relation to the stop criteria of the optimization, and to the existence of local minima in the cost function. The 28 models used are the models with cost functions within 5 % from the best model. The best estimator with respect to accuracy and sensitivity to initial values is clearly the LLSUW estimator. The LLS estimator is, as previously explained, known to be a good choice for resonant systems. The failure of the minimal-covariance weight can be explained by the high uncertainty around the resonance and antiresonance frequencies, and the fact that most information about stiffness and damping can be found at those frequencies. The stiffness parameters are accurately estimated for the simulated robot (max error of 3%, see Table 1). The stiffness parameter uncertainty estimate based on the result for different initial parameter values is in agreement with the theoretical uncertainty based on the FRF uncertainty (see Table 2). The dampers are harder to estimate and this can partly be explained by the FRF uncertainty around the resonance frequencies. The nonlinear friction also increases the FRF damping in a way that cannot be fully modeled by a linear viscous friction.
5
161
Application Example
Table 2: Simulated robot: max, min, and (geometric) mean standard deviation for 12 springs (K) and 12 dampers (D) estimated with the LLSUW estimator. Theoretical standard deviation according to (16), σth , and based on the 28 best models, σ28 . min min max max mean mean σ28 σth σ28 σth σ28 σth K 0.4 % 0.4 % 4.9 % 7.5 % 1.3 % 1.7 % D 11 % 8.4 % 32 % 108 % 27 % 32 %
Table 3: Real robot: max, min, and (geometric) mean standard deviation for 12 springs (K) and 12 dampers (D) estimated with the LLSUW estimator. Theoretical standard deviation according to (16), σth , and based on the 54 best models, σ54 . mean mean max max min min σ54 σth σ54 σth σ54 σth K 1.3 % 0.3 % 41.5 % 2.7 % 3.7 % 0.9 % D 30 % 4.1 % 54 % 47 % 47 % 10 %
5.4
Identification of Real Robot
The same procedure as in Section 5.3 is now applied to the real robot. The model cost for all identified models is shown in Figure 8, and Table 3 shows the standard deviations for the LLSUW estimator. The parametric FRF for the best LLSUW model in one operating point is compared to the nonparametric FRF in Figure 9, and element [1, 1] is shown in Figure 10. The result is the same as for the simulated robot, i.e., the best estimator with respect to accuracy and sensitivity to initial values is the LLSUW estimator. See also Figure 11 where the max and mean error of the estimated stiffness parameters are shown for the LLSUW estimator (the other estimators give worse results and are not displayed). The estimated stiffness for the real robot has a larger uncertainty and the model error, i.e., the cost function, is larger for the real robot if compared
Normalized Cost
6 5 4
LLSUW LLSCW NLSUW NLSCW
3 2 1
10
20
30
40 50 60 70 Sorted Optimization
80
90
100
Figure 8: Real robot: The normalized cost (computed using the LLSUW cost function) for all identified models.
162
Paper B
Magnitude (dB)
60 40 20 0 60 40 20 0 60 40 20 0 60 40 20 0 60 40 20 0 60 40 20 0 −20 2
Nonlinear Gray-Box Identification Applied to Industrial Robots
10 50
10 50
10 50 10 50 Frequency (Hz)
10 50
10 50
Figure 9: Real robot: All 36 elements of nonparametric (dashed) and parametric (solid) FRF in operating point 8.
Magnitude (dB)
50
FRF Unc. (1 std) Nonpar. FRF Par. FRF
40 30 20 2
5
10 20 Frequency (Hz)
50
Figure 10: Real robot: Element [1, 1] for nonparametric and parametric FRF in operating point 8.
Stiffness Error [%]
50 Max Error Mean Error
40 30 20 10 0
10
20 30 40 Sorted Optimization
50
60
Figure 11: Real robot: Error in estimated stiffness for the 60 best LLSUW models, compared to the best LLSUW model.
6
A Small Comparison with Time Domain Identification
163
Figure 12: The benchmark system. to the simulated robot. This is no surprise since the 18 DOF model is a low-order approximation of the real robot. Moreover, the placement of the spring-damper pairs in the 18 DOF model is probably not optimal and linear spring-dampers are assumed. Despite of this, if the resulting parametric FRFs are inspected (see e.g., Figure 9), the model requirements in the frequency domain are satisfied. More specifically, the lower resonance frequencies are estimated with an error within 0.1–1 Hz. The obtained model should therefore be useful for many purposes.
6
A Small Comparison with Time Domain Identification
This section further motivates the use of frequency domain identification for resonant systems. In a small simulation study, time domain identification is compared to frequency domain identification. The simulated system is a model of an elastic robot arm, as described in Moberg et al. (2009), and is illustrated in Figure 12. Compared to Section 5 this is a simplified scalar system (ny = nu = 1) with stable dynamics (except integrators). The same torque ripple and measurement disturbances as described in Section 5.3 are used. The friction, springs, and dampers are linear. The identification task is to identify the three unknown spring-damper pairs, all other parameters are assumed to be known. The identification is performed in closed-loop with motor torque τm as input and motor position qm as output. The evaluation is performed in the same way as described in Section 5.2, identification is performed for 100 sets of initial parameters in the range 0.1θ0 to 10θ0 . The reference speed is a 10 s swept sinusoid (chirp) with an added low frequency sinusoid. The signals are measured for 11 s to ensure that the system is at rest when the measurement ends (to avoid frequency leakage for the non-periodic input). The reason for using chirp is that multisine excitation is tailored for frequency domain identification and yields a worse result than chirp when used for time-domain identification. Periodic multisine is used in two cases as a comparison. For the time domain identification, the System Identification Toolbox (Ljung, 2007) is used. The following cases are evaluated: FD NLS: Frequency domain, NLS estimator. FD LLS 1: Frequency domain, LLS estimator. FD LLS 2: Frequency domain, LLS estimator, multisine reference.
164
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
Table 4: Result for 100 identifications (optimizations) with random initial parameters. AM is the number of acceptable models. Max errors of springs (K) and dampers (D) are given for the best obtained model. Time is the normalized execution (optimization) time for the identification method. Note that the experiment time is the same for all cases (11 s) except for FD LLS 3 (44 s). Method AM Err K Err D Time FD NLS 0% 1.1 % 3.9 % 3.3 FD LLS 1 85 % 0.3 % 7.1 % 2.6 FD LLS 2 70 % 0.3 % 1.3 % 1.0 FD LLS 3 66 % 0.1 % 0.2 % 1.0 TD PEM 1 46 % 0.7 % 2.1 % 5.7 TD PEM 2 19 % 0.1 % 0.9 % 5.9
FD LLS 3: Frequency domain, LLS estimator, multisine reference, average FRF from 4 different experiments using different realizations. TD PEM 1: Time domain, prediction error method, no disturbance model, motor speed is used as output. TD PEM 2: Time domain, prediction error method, disturbance model used. Note that a disturbance model is required to get a stable predictor if motor position is used as output since we have a pure integrator in the system. When motor speed is used, no disturbance model is required. The results for the different cases are shown in Table 4. An acceptable model is defined as a model with a stiffness error within ±1 % and a damping error within ±10 %. The conclusion is once again that for frequency domain identification, the LLS estimator is superior to the NLS estimator which is extremely sensitive to initial parameter values. Time domain identification is also quite sensitive to initial parameter values. For the time domain methods, the number of acceptable models can be slightly increased by decreasing the tolerance parameter of the optimizer, however the penalty in increased execution time is large. Numerical problems were indicated for the time domain methods, especially when disturbance models were used. However, the result also shows a potential to increase the accuracy by use of disturbance models. However, the best results are obtained for the frequency domain method, when multiple experiments are performed and periodic multisine excitation is used. In this small linear example, the difference in execution time between computing the frequency domain cost and simulating the system is quite small. However, for the 18 DOF nonlinear model used in Section 5, the difference is extremely large. If the execution times for time domain simulation and frequency domain cost are compared, the conclusion is that time domain identification will require between 5000 and 100000 longer optimization time. The data compression obtained by the use of the frequency domain method, is in the range 100 to 2000. The low esti-
7
Conclusions and Future Work
165
mates assume that the nu experiments required for computing the multivariable FRF can be replaced by 1 experiment and that multiple experiments are not required for increasing the accuracy (disturbance model used). The high estimates assumes that the experiment times are the same for the frequency and time domain methods. If the increased sensitivity for initial parameter values cannot be handled by, e.g., pre-filtering, the difference in optimization time will further increase. It is likely that time domain identification can reduce the required experiment time but it will certainly increase the optimization time. However, in order to apply a time domain method, the problem of finding a stable predictor for the nonlinear unstable system must be solved and numerical problems are also to be expected.
7
Conclusions and Future Work
The problem of estimating unknown parameters in a nonlinear gray-box model has been studied. It has been shown in Section 2.2 that a time-domain prediction error method can be approximated by a frequency-domain procedure that uses intermediate local models. This allows for data compression and a simplified optimization problem. The procedure is based on the estimation of the nonparametric FRF in a number of operating points. The nonlinear gray-box model is linearized in the same operating points and the optimal parameters are obtained by minimizing the discrepancy between the nonparametric FRFs and the parametric FRFs (the FRFs of the linearized gray-box model). Two different standard parameter estimators (NLS and LLS), as well as the selection of weights in the estimators, have been studied. The proposed procedure has been successfully applied to the problem of identifying elasticity parameters (spring-damper pairs) in a six-axes industrial robot. The performance and sensitivity to varying initial parameters varies greatly between different estimators and selected weights. It was shown that the LLS estimator is superior for this type of system due to its robustness to the initial estimate. The stiffness parameters were accurately estimated, but the estimation of damping was quite hard. The minimal-covariance weights turned out to give poor results, compared to approximately constant user-defined weights. The main reason was the large FRF uncertainty around the resonances, and the fact that most information about the parameters can be found at those frequencies. The identification result of the real robot is satisfactory, the identified model gives a good global description in the frequency range of interest and the obtained model should be useful for many future purposes. For the future, improved model accuracy, reduction of measurement time and excitation energy, and ease-of-use are desired. Nonlinear time-domain identification, gray-box model structure selection, and automatic weight selection are therefore important areas for future research. The use of additional sensors, e.g., accelerometers are also an interesting area.
166
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
Bibliography B.D.O. Anderson and J.B. Moore. Optimal Filtering. Prentice-Hall, Upper Saddle River, N.J., 1979. F. Behi and D. Tesar. Parametric identification for industrial manipulators using experimental modal analysis. IEEE Transactions on Robotics and Automation, 7(5):642–652, October 1991. T. Bohlin. Practical Grey-box Process Identification: Theory and Applications. Springer, July 2006. D. R. Brillinger. Time Series: Data Analysis and Theory. McGraw-Hill, New York, expanded edition, 1981. A. De Luca. Feedforward/feedback laws for the control of flexible robots. In Proceedings of the 2000 IEEE International Conference on Robotics and Automation, pages 233–240, San Francisco, CA, April 2000. T. Dobrowiecki and J. Schoukens. Measuring a linear approximation to weakly nonlinear MIMO systems. Automatica, 43(10):1737–1751, October 2007. A. Doucet, N. de Freitas, and N. Gordon, editors. Sequential Monto Carlo Methods in Practice. Springer Verlag, 2001. U. Forssell and L. Ljung. Identification of unstable systems using output error and box-jenkins model structures. IEEE Transactions on Automatic Control, 45(1):137–141, January 2000. P. J. Gawthrop and L. Wang. Data compression for estimation of the physical parameters of stable and unstable linear systems. Automatica, 41(8):1313–1321, August 2005. P. Guillaume. Frequency response measurements of multivariable systems using nonlinear averaging techniques. IEEE Transactions on Instrumentation and Measurement, 47(3):796–800, June 1998. H.-J. Gutt, F. D. Scholl, and J. Blattner. High precision servo drives with DSPbased torque ripple reduction. In IEEE AFRICON, 1996, volume 2, pages 632– 637, September 1996. D. Hanselman. Resolver signal requirements for high accuracy resolver-to-digital conversion. IEEE Transactions on Industrial Electronics, 37(6):556–561, December 1990. R. I. Jennrich. Asymptotic properties of non-linear least squares estimators. The Annuals of Mathematical Statistics, 40(2):633–643, 1969. T. A. Johansen and B. A. Foss. Identification of non-linear system structure and parameters using regime decomposition. Automatica, 31(2):321–326, February 1995.
Bibliography
167
K. Kozlowski. Modelling and identification in robotics. Advances in Industrial Control. Springer, London, 1998. N. R. Kristensen, H. Madsen, and S. B. Jørgensen. Parameter estimation in stochastic grey-box models. Automatica, 40(2):225–237, February 2004. R. Larsson, Z. Sjanic, M. Enqvist, and L. Ljung. Direct prediction-error identification of unstable nonlinear systems applied to flight test data. In 15th IFAC Symposium on System Identification, pages 144–149, Saint-Malo, France, July 2009. L. Ljung. Linear system identification as curve fitting. In Anders Rantzer and Christopher I. Byrnes, editors, Directions in Mathematical Systems Theory and Optimization (Lecture Notes in Control and Information Sciences), volume 286, pages 203–215. Springer Verlag, 2003. L. Ljung. System Identification: Theory for the User. Prentice Hall, Upper Saddle River, New Jersey, USA, 2nd edition, 1999. L. Ljung. System Identification Toolbox for use with Matlab. Version 7. The MathWorks, Inc., Natick, MA, 7 edition, 2007. L. Ljung. Perspectives on system identification. In 17th IFAC World Congress, pages 7172–7184, Seoul, Korea, July 2008. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. IEEE Transactions on Control Systems Technology, 17(6):1398–1405, November 2009. J. Öhr, S. Moberg, E. Wernholt, S. Hanssen, J. Pettersson, S. Persson, and S. SanderTavallaey. Identification of flexibility parameters of 6-axis industrial manipulator models. In Proc. ISMA2006 International Conference on Noise and Vibration Engineering, pages 3305–3314, Leuven, Belgium, September 2006. R. Pintelon and J. Schoukens. System identification: a frequency domain approach. IEEE Press, New York, 2001. K. Schittkowski. Numerical data fitting in dynamical systems. Kluwer Academic Publishers, Dordrecht, 2002. J. Schoukens, R. Pintelon, T. Dobrowiecki, and Y. Rolain. Identification of linear systems with nonlinear distortions. Automatica, 41(3):491–504, March 2005.
168
Paper B
Nonlinear Gray-Box Identification Applied to Industrial Robots
M. W. Spong, S. Hutchinson, and M. Vidyasagar. Robot Modeling and Control. Wiley, 2006. P. Verboven, P. Guillaume, and B. Cauberghe. Multivariable frequency-response curve fitting with application to modal parameter estimation. Automatica, 41 (10):1773–1782, October 2005. E. Wernholt. Multivariable Frequency-Domain Identification of Industrial Robots. PhD thesis, Linköping University, SE-581 83 Linköping, Sweden, 2007. E. Wernholt and S. Gunnarsson. Analysis of methods for multivariable frequency response function estimation in closed loop. In 46th IEEE Conference on Decision and Control, New Orleans, Louisiana, December 2007. Accepted for publication. E. Wernholt and S. Gunnarsson. Estimation of nonlinear effects in frequencydomain identification of industrial robots. IEEE Transactions on Instrumentation and Measurement, 57(4):856–863, April 2008. E. Wernholt and J. Löfberg. Experiment design for identification of nonlinear gray-box models with application to industrial robots. In 46th IEEE Conference on Decision and Control, New Orleans, Louisiana, December 2007. Accepted for publication. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372–15380, Seoul, Korea, July 2008a. E. Wernholt and S. Moberg. Experimental comparison of methods for multivariable frequency response function estimation. In 17th IFAC World Congress, pages 15359–15366, Seoul, Korea, July 2008b. E. Wernholt and S. Moberg. Nonlinear gray-box identification using local models applied to industrial robots. Automatica, 2010. Accepted for publication.
Paper C Inverse Dynamics of Flexible Manipulators
Authors:
Stig Moberg and Sven Hanssen
Edited version of the paper: S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009.
Inverse Dynamics of Flexible Manipulators Stig Moberg∗ ,† and Sven Hanssen∗∗ ,† ∗ Dept.
∗∗ Department
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden
[email protected]
of Solid Mechanics, Royal Institute of Technology, SE-100 44 Stockholm, Sweden
[email protected]
† ABB
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected]
Abstract High performance robot manipulators, in terms of cycle time and accuracy, require well designed control methods, based on accurate dynamic models. Robot manipulators are traditionally described by the flexible joint model or the flexible link model. These models only consider elasticity in the rotational direction. When these models are used for control or simulation, the accuracy can be limited due to the model simplifications, since a real manipulator has a distributed flexibility in all directions. This work investigates different methods for the inverse dynamics of a more general manipulator model, called the extended flexible joint model. The inverse dynamics solution is needed for feedforward control, which is often used for highprecision robot manipulator control. The inverse dynamics of the extended flexible joint model can be computed as the solution of a high-index differential algebraic equation (DAE). One method is to solve the discretized DAE using a constantstepsize constant-order backwards differentiation formula (BDF). This work shows that there is only a small difference between solving the original high-index DAE and the index-reduced DAE. It is also concluded that scaling of the algebraic equations and their derivatives is important. The inverse dynamics can be solved as an initial-value problem if the zero dynamics of the system is stable, i.e., minimum phase. For unstable zero dynamics, an optimization approach based on the discretized DAE is suggested. An optimization method, using a continuous DAE formulation, is also suggested and evaluated. The solvers are illustrated by simulation, using a manipulator with two actuators and five 171
172
Paper C
Inverse Dynamics of Flexible Manipulators
Figure 1: The IRB4600 robot from ABB. degrees-of-freedom.
1
Introduction
Current industrial robot development is focused on increasing the robot performance, reducing the robot cost, improving safety, and introducing new functionalities as described in Brogårdh (2007). The need for cost reduction results in the use of weight- and cost optimized robot components with increased elasticity. This results in more complicated vibration modes inside the control bandwidth. To maintain or improve the robot performance, the motion control must be improved for this new generation of robots. This can, e.g., be obtained by improving the model-based control as described in Björkman et al. (2008). An example of a modern industrial robot manipulator is shown in Figure 1. Most publications concerning robot manipulators only consider elasticity in the rotational direction. If gear elasticity is considered we get the flexible joint model, and if link deformation restricted to a plane perpendicular to the preceding joint is included we get the flexible link model. These models are described in, e.g., De Luca (2000) and are useful for many purposes and simplify the control design. However, these models cannot accurately describe a modern industrial robot. An extended model is needed to increase the accuracy in, e.g., simulation and control. The inverse dynamics problem for a number of mechanical systems can be formulated and solved as a DAE, see, e.g., Blajer (1997) or Blajer and Kolodziejczyk (2004). For many systems, the problem can be reformulated as the solution of algebraic equations or ordinary differential equations. One example of such a system is the flexible joint model. In Moberg and Hanssen (2007), a general seriallink elastic manipulator model called the extended flexible joint model was presented, and the inverse dynamics of this model was formulated and solved as a differential-algebraic equation (DAE). A comparison of feedforward control based on the flexible joint model and the extended flexible joint model was also performed in Moberg and Hanssen (2007), and it was shown that the extended
2
173
The Extended Flexible Joint Model
model yields a dramatic improvement.
2
The Extended Flexible Joint Model
The model consists of a serial kinematic chain of rigid bodies. The rigid bodies are connected by multidimensional spring-damper pairs, representing the rotational, and possibly also the translational, deflection. If two rigid bodies are joined by a motor and a gearbox, we get an actuated joint represented by one spring-damper pair, modeling the rotational deflection of the gearbox. The other spring-damper pairs represent non-actuated joints, modeling, e.g., elasticity of bearings, foundation, tool, and load as well as bending and torsion of the links. One example of this model is illustrated in Figure 2. This model consists of three motors, three links, four rigid bodies, and five spring-damper pairs. Thus, the model has three actuated joints, two non-actuated joints, and eight1 degrees-offreedom (DOF). Generally, if the number of added non-actuated joints is Υ na and the number of actuated joints is Υ a , the system has 2Υ a + Υ na degrees-of-freedom. The model equations are2 " # τ (1a) M(qa )q¨a + c(qa , q˙ a ) + g(qa ) = g , τe τg = Kg (qm − qg ) + Dg (q˙ m − q˙ g ), τe = −Ke qe − De q˙ e , τm − τg = Mm q¨m + f (q˙ m ), h
where qa = qgT
qeT
iT
(1b) (1c) (1d)
, qg ∈ RΥ a is the actuated joint angular position, qe ∈ RΥ na
is the non-actuated joint angular position, and qm ∈ RΥ a is the motor angular position. Mm ∈ RΥ a ×Υ a is the inertia matrix of the motors and M(qa ) ∈ R(Υ a +Υ na )×(Υ a +Υ na ) is the inertia matrix for the joints. The Coriolis and centrifugal torques are described by c(qa , q˙ a ) ∈ RΥ a +Υ na , g(qa ) ∈ RΥ a +Υ na is the gravity torque, and the nonlinear friction in motor bearings and gearboxes is f (q˙ m ) ∈ RΥ a . The actuator torque is τm ∈ RΥ a , τg ∈ RΥ a is the actuated joint torque, and τe ∈ RΥ na is the non-actuated joint torque, i.e., the constraint torque. Kg , Ke , Dg , and De are the stiffness- and damping matrices for the actuated and non-actuated directions, with obvious dimensions. Note that the spring-damper torque also can be defined as nonlinear, see, e.g., Moberg et al. (2008). Also note that the inertial couplings between the motors and the rigid bodies are neglected under the assumption of high gear ratio, see, e.g., Spong (1987). For a complete model in1 The number of DOF is the number of independent coordinates necessary to specify the (internal) configuration of a system. This manipulator is specified by 3 motor angular positions, 3 actuated joint angular positions, 2 non-actuated joint angular positions, and has thus 8 DOF. The manipulator tool is specified by 6 coordinates (position and orientation) but only 3 coordinates can be controlled using this manipulator, e.g., the position. In this paper, the number of DOF refers to the manipulator system, and not to the tool. 2 All positions, inertias, and torques are expressed on the joint side of the gearbox, hence, the gear ratio does not appear in the equations.
174
Paper C
Inverse Dynamics of Flexible Manipulators
Figure 2: An extended flexible joint dynamic model with 8 degrees-offreedom.
cluding the position and orientation of the tool, θ, the forward kinematic model of the robot must be added. The kinematic model is a mapping of qa ∈ RΥ a +Υ na to θ ∈ RΥ a . The complete model of the robot is then described by (1) and θ = Γ (qa ).
(2)
Note that no unique inverse kinematics exists. This is a fact that makes the inverse dynamics problem difficult to solve. The equations of motion (1) can be derived by computing the linear and angular momentum. By using Kane’s method (Kane and Levinson, 1985) the projected equations of motion can be derived to yield a system of ordinary differential equations (ODE) with minimum number of DOF. One alternative way of deriving the equations of motion is to compute the potential and kinetic energy and to use Lagranges equation, see, e.g., Shabana (1998). If some parameters of the extended flexible joint model are unknown, these parameters can be obtained by identification, see, e.g., Wernholt and Moberg (2008). From Wernholt and Moberg (2008), it is also clear that the extended flexible joint model is needed to accurately describe a modern industrial robot.
3
Inverse Dynamics for The Simplified Flexible Joint Model
The flexible joint model can be derived as a special case of the extended flexible joint model if all non-actuated joints are removed, i.e., Υ na = 0. If friction and damping are neglected we get the simplified flexible joint model. The equations
4
175
Inverse Dynamics for The Extended Flexible Joint Model
describing this model are M(qa )q¨a + c(qa , q˙ a ) + g(qa ) − Kg (qm − qa ) = 0,
(3a)
Mm q¨m + Kg (qm − qa ) = τm .
(3b)
The inverse dynamics of this model is described, e.g., in Jankowski and Van Brussel (1992). By solving (3a) for qm and differentiating twice, with respect to time, we get3 qm = qa + Kg−1 (M(qa )q¨a + c(qa , q˙ a ) + g(qa )),
(4a) [3]
[4]
¨ a , q˙ a , q¨a )q¨a + 2M(q ˙ a , q˙ a )qa + M(qa )qa + q¨m = q¨a + Kg−1 (M(q [3]
¨ a , q˙ a , q¨a , qa ) + g(q ¨ a , q˙ a , q¨a )), c(q
(4b)
and by solving (3a) for the spring torque Kg (qm − qa ) and inserting this expression together with (4b) in (3b) we get an expression for the control signal, i.e., the motor torque, as ¨ a , q˙ a , q¨a )q¨a + 2M(q ˙ a , q˙ a )qa[3] + τm = (M(qa ) + Mm )q¨a + c(qa , q˙ a ) + g(qa ) + Mm Kg−1 [M(q [4]
[3]
¨ a , q˙ a , q¨a , qa ) + g(q ˙ a , q˙ a , q¨a )]. M(qa )qa + c(q
(5)
The simplified flexible joint model is an example of a so-called flat system (see, e.g., Rouchon et al. (1993)) which can be defined as a system where all state variables and control inputs can be expressed as an algebraic function of the desired trajectory and its derivatives up to a certain order. The desired joint trajectory qa (t) can be computed from the desired Cartesian trajectory θ(t), including derivatives, by use of the inverse kinematics. The inverse dynamics can be used for feedforward control or feedback linearization as described in, e.g., Moberg and Hanssen (2008a). The simplified flexible joint model has no zero dynamics, see, e.g., De Luca (2000). This means that it is always possible to find a bounded causal inverse dynamics solution. The inverse dynamics is more complicated if the model is extended with damping, friction, nonlinear spring torque, or inertial coupling between motors and rigid bodies. Approaches for handling these cases are, e.g., described in De Luca (2000) and Thümmel et al. (2001).
4
Inverse Dynamics for The Extended Flexible Joint Model
With the following states h T q˙ gT X = qgT qeT qm
q˙ eT
T q˙ m
iT
h = X1T
3 The nth time derivative of a variable x is denoted x[n] .
X2T
X3T
X4T
X5T
X6T
iT
,
176
Paper C
Inverse Dynamics of Flexible Manipulators
(1) and (2) can be written as M11 (X1 , X2 )X˙ 4 + M12 (X1 , X2 )X˙ 5 + γ1 (X1 , X2 , X3 , X4 , X5 , X6 ) = 0, M21 (X1 , X2 )X˙ 4 + M22 (X1 , X2 )X˙ 5 + γ2 (X1 , X2 , X4 , X5 ) = 0, Mm X˙ 6 + γ3 (X1 , X3 , X4 , X6 ) − u = 0, ˙ ˙ X1 − X4 = 0, X2 − X5 = 0, X˙ 3 − X6 = 0, Γ (X1 , X2 ) − θ(t) = 0,
or
˙ u) = F(t, X1 , X2 , X3 , X4 , X5 , X6 , X˙ 1 , X˙ 2 , X˙ 3 , X˙ 4 , X˙ 5 , X˙ 6 , u) = 0. F(t, X, X,
(7)
input variables4
The system has Υ a u, i.e., the motor torque τm , and Υ a controlled output variables with a desired reference θ(t), i.e., the position and orientation of the tool5 . The gravity torque, speed dependent inertia torque, and the torque from the spring-damper pairs are contained in γi . The inverse dynamics solution for the model is obtained if θ(t) is regarded as the input signal and u and X are solved for. This means that the DAE (7) must be solved, and in Moberg and Hanssen (2007) this is performed using a constant stepsize 1-step backward differentiation formula (BDF). It was observed that a short stepsize was required to obtain an accurate solution, but that numerical solvability was lost if the stepsize was too small. Some commercially available software packages, e.g., Dymola, were also tried on the same systems, but none was able to solve these equations if the number of DOF exceeded 5. Numerical problems could also be seen in cases where a solution was found. The 1-step BDF solver could solve systems with up to 12 DOF, although with some problems. Clearly, the DAE (7) must be further analyzed in order to improve the solver, which is one of the objectives of this work. In this work, the inverse dynamics solution is intended to be used primarily for feedforward control, and the desired trajectory θ(t) must be followed perfectly in the case of no model errors. If the system has a stable zero dynamics (minimum phase), see, e.g., Isidori (1995), it is possible to obtain a bounded causal solution. However, if the system has an unstable zero dynamics, perfect control requires a non-causal solution, i.e., the torque must be applied before the start of the trajectory execution. Solvers for both cases will be suggested and discussed in the following sections.
5
DAE Theory
As the name implies, a DAE consists of differential and algebraic equations. A DAE can generally be expressed by ˙ = 0, F(t, x, x) Rn
R2n+1
(8) Rm .
where x ∈ is the state vector and F : → If Fx˙ = ∂F/∂x˙ is nonsin˙ by the implicit function theorem, gular, (8) represents an implicit ODE since x, 4 The motor torque control is assumed to be perfect. 5 For a kinematically redundant manipulator, e.g., a 7-axis manipulator, θ must be extended to specify the trajectory.
5
177
DAE Theory
can be solved from x and t. Otherwise it represents a DAE, which in general is considerably harder to solve than an ODE. The differential index, ν, of a DAE provides a measure of the singularity of the DAE. Generally, the higher the index, the harder the DAE is to solve. An ODE has ν = 0, and a DAE with ν > 1 is denoted a high-index DAE. The differential index can somewhat simplified be defined according to Brenan et al. (1996): Definition 1 The (differential) index of the DAE (8) is the minimum number of times that all or part of (8) must be differentiated with respect to t in order to determine x˙ as a continuous function of t and x. A semi-explicit DAE is a special case of (8) described as x˙ = F(x, y),
(9a)
0 = G(x, y),
(9b)
where the non-differentiated variables are denoted y. Differentiation of (9b) w.r.t. time yields ˙ 0 = Gy (x, y)y˙ + Gx (x, y)x,
(10)
and if Gy is nonsingular it is possible to solve for y˙ and ν = 1. Furthermore, by the implicit function theorem, it is also possible (at least numerically) to solve for y = φ(x). A straightforward method for solving this DAE is, e.g., Forward Euler according to 1. Compute xt+1 = xt + hF(xt , yt ) 2. Solve yt+1 from G(xt+1 , yt+1 ) = 0 where h is the stepsize. For the implicit DAE ˙ y) = 0, F(t, x, x, h
(11)
iT
we can solve for z = x˙ y if Fz is non-singular. In this case, ν = 1, and the DAE can be solved with implicit methods. For the analysis of a nonlinear DAE (8), the derivative array plays a central part. The derivative array Fl is defined according to (Brenan et al., 1996; Kunkel and Mehrmann, 2006) ˙ F(t, x, x) d ˙ dt F(t, x, x) . ˙ . . . , x[l+1] ) = Fl (t, x, x, (12) .. . d l ˙ ( dt ) F(t, x, x) Using the derivative array the differential index can be defined according to (Brenan et al., 1996): Definition 2 The (differential) index of (8) is the smallest ν such that Fν uniquely determines the variable x˙ as a continuous function of t and x.
178
Paper C
Inverse Dynamics of Flexible Manipulators
The differential index is a measure of the distance from the DAE to an ordinary differential equation (ODE). In Kunkel and Mehrmann (2006), it is argued that a better measure would be the distance to a decoupled system of ODEs and purely algebraic equations. This measure is the strangeness index µ. The strangeness index µ is defined by the following hypothesis6 as described in Kunkel and Mehrmann (2006). Kunkel and Mehrmann Hypothesis the set
There exist integers µ, a, and d such that
˙ . . . , x[µ+1] ) ∈ R(µ+2)n+1 |Fµ (t, x, x, ˙ . . . , x[µ+1] ) = 0} Lµ = {(t, x, x,
(13)
[µ+1]
associated with F is nonempty and such that for every (t, x0 , x˙ 0 , . . . , x0 ) ∈ Lµ , there exists a (sufficiently small) neighborhood in which the following properties hold: ˙ . . . , x[µ+1] ) = (µ + 1)n − a on Lµ such that there exists 1. We have rank Mµ (t, x, x, a smooth matrix function Z2 of size (µ+1)n×a and pointwise maximal rank, satisfying Z2T Mµ = 0 on Lµ . ˙ . . . , x[µ+1] ) = a, where Aˆ 2 = Z2T Fµ;x such that there 2. We have rank Aˆ 2 (t, x, x, exists a smooth matrix function T2 of size n × d, d = n − a, and pointwise maximal rank, satisfying Aˆ 2 T2 = 0. ˙ 2 (t, x, x, ˙ . . . , x[µ+1] ) = d such that there exists a 3. We have rank Fx˙ (t, x, x)T smooth matrix function Z1 of size n × d and pointwise maximal rank, satisfying rank Z1T Fx˙ T2 = d. The Jacobian Mµ is defined according to7 ˙ . . . , x[µ+1] ) = Fµ;˙x,...,x[µ+1] (t, x, x, ˙ . . . , x[µ+1] ). Mµ (t, x, x,
(14)
The strangeness index can then be defined according to Definition 3 Given a differential-algebraic equation as in (8), the smallest value of µ such that F satisfies the hypothesis is called the strangeness index of (8). If µ = 0, then the differential-algebraic equation is called strangeness-free. An algebraic equation and an ODE have both µ = 0. Moreover, (8) can be expressed as the reduced DAE # " T # " Z F ˙ Fˆ (t, x, x) ˆ x, x) ˙ = T1 = 1ˆ . (15) F(t, Z2 Fµ F2 (t, x) If x ∈ Rn is divided into the differential variables x1 ∈ Rd and the algebraic variables x2 ∈ Ra , the reduced DAE can (in principle) be expressed as the decoupled 6 The case where the number of equations equals the numbers of unknowns, i.e., m = n, is considered here. 7Q T y1 ,...,yn denotes the partial derivative ∂Q/∂y, where y = [y1 , . . . , yn ] .
6
179
A Manipulator Model with 5 DOF
system x˙ 1 = Gˆ 1 (t, x1 ),
6
x2 = Gˆ 2 (t, x1 ).
(16)
A Manipulator Model with 5 DOF
Figure 3: An extended flexible joint dynamic model with 5 DOF.
Figure 4: An extended flexible joint dynamic model with 5 DOF. This manipulator model will be used as an example when analyzing and solving the inverse dynamics DAE (7). The model is illustrated in Figures 3–4 and is a planar model with linear elasticity in the rotational direction only, and does not demonstrate the all-direction elasticity of the general model. However, it is an
180
Paper C
Inverse Dynamics of Flexible Manipulators
appropriate simple example with the desired mathematical structure. The model has two links, three rigid bodies, two actuated joints and one non-actuated joint, i.e., Υ a = 2 and Υ na = 1. The attributes of each joint are length l, inertia j, mass m, mass center ξ, stiffness k, damping d, and motor inertia Jm (actuated joints only). The model has 5 DOF and is described by (7) with states h X = X1T h = [qg1 h = q1 h = x1
X2T
X3T
qg2 ]T
X4T [qe1 ]
X5T [qm1
X6T
iT
qm2 ]T
[q˙ g1
q2
q3
q4
q5
q˙ 1
q˙ 2
q˙ 3
q˙ 4
x2
x3
x4
x5
x6
x7
x8
x9
q˙ g2 ]T iT q˙ 5 iT x10 .
[q˙ e1 ]
[q˙ m1
q˙ m2 ]T
iT
The inertia matrices M and Mm are defined and computed as8 " Mm =
Jm1 0
" J , M11 = 11 Jm2 J12 0
#
# " # h J12 J , M12 = 13 , M21 = J13 J22 J23
i h i J23 , M22 = J33 ,
J11 = j1 + j2 + j3 + m1 ξ12 + m2 l12 s22 + m2 (c2 l1 + ξ2 )2 + m3 (s3 c2 l1 + s3 l2 + c3 s2 l1 )2 + m3 (c3 c2 l1 + c3 l2 − s3 s2 l1 + ξ3 )2 , J12 = j2 + j3 + m2 ξ2 (c2 l1 + ξ2 ) + m3 l2 s3 (s3 c2 l1 + s3 l2 + c3 s2 l1 )+ m3 (c3 l2 + ξ3 )(ξ3 − s3 s2 l1 + c3 c2 l1 + c3 l2 ), J13 = j3 + m3 ξ3 (ξ3 − s3 s2 l1 + c3 c2 l1 + c3 l2 ), J23 = j3 + m3 ξ3 (c3 l2 + ξ3 ), J22 = j2 + j3 + m2 ξ22 + m3 l22 s32 + m3 (ξ3 + c3 l2 )(c3 l2 + ξ3 ), J33 = j3 + m3 ξ32 .
The kinematics is computed as: Γ =
" # " # x l c +l c +l c = 1 1 2 12 3 123 . z −l1 s1 − l2 s12 − l3 s123
Finally, the position and speed dependent terms are computed as: γ11 = −s2 l1 m2 (q˙ 22 ξ2 + c2 q˙ 12 l1 + 2q˙ 1 q˙ 2 ξ2 + q˙ 12 ξ2 ) + m2 s2 q˙ 12 l1 (c2 l1 + ξ2 ) − m3 (s3 c2 l1 + s3 l2 + c3 s2 l1 )(2q˙ 1 q˙ 2 ξ3 + 2q˙ 3 q˙ 1 ξ3 + q˙ 12 ξ3 + q˙ 32 ξ3 + 2q˙ 3 q˙ 2 ξ3 − s3 s2 q˙ 12 l1 + 2c3 q˙ 1 q˙ 2 l2 + c3 q˙ 22 l2 + c3 q˙ 12 l2 + c3 c2 q˙ 12 l1 ) + m3 (ξ3 − s3 s2 l1 + c3 c2 l1 + c3 l2 )(c3 s2 q˙ 12 l1 + s3 c2 q˙ 12 l1 + 2s3 q˙ 1 q˙ 2 l2 + s3 q˙ 22 l2 + s3 q˙ 12 l2 ) − m1 gξ1 c1 − m2 g(l1 c1 + ξ2 c12 ) − m3 g(l1 c1 + l2 c12 + ξ3 c123 ) + q˙ 22 ξ3 + k1 (q1 − q4 ) + d1 (q˙ 1 − q˙ 4 ), γ12 = ξ2 m2 s2 q˙ 12 l1 − s3 l2 m3 (2q˙ 1 q˙ 2 ξ3 + 2q˙ 3 q˙ 1 ξ3 + q˙ 12 ξ3 + q˙ 32 ξ3 + 2q˙ 3 q˙ 2 ξ3 − s3 s2 q˙ 12 l1 + c3 q˙ 22 l2 + q˙ 22 ξ3 + c3 q˙ 12 l2 + c3 c2 q˙ 12 l1 ) + m3 (ξ3 + c3 l2 )(c3 s2 q˙ 12 l1 + s3 c2 q˙ 12 l1 + 2s3 q˙ 1 q˙ 2 l2 + s3 q˙ 22 l2 + s3 q˙ 12 l2 ) − m2 gξ2 c12 − m3 g(l2 c12 + ξ3 c123 ) + 2c3 q˙ 1 q˙ 2 l2 + k2 (q2 − q5 ) + d2 (q˙ 2 − q˙ 5 ), γ21 = ξ3 m3 (s23 q˙ 12 l1 + 2s3 q˙ 1 q˙ 2 l2 + s3 q˙ 22 l2 + s3 q˙ 12 l2 ) − m3 gξ3 c123 + k3 q3 + d3 q˙ 3 , γ31 = k1 (q4 − q1 ) + d1 (q˙ 4 − q˙ 1 ), γ32 = k2 (q5 − q2 ) + d2 (q˙ 5 − q˙ 2 ). 8 The following shorthand notation is used: s = sin(q ), c = cos(q ), s 1 1 1 1 12 = sin(q1 + q2 ), c123 = cos(q1 + q2 + q3 ) etc.
7
181
Analysis of The Inverse Dynamics DAE
7
Analysis of The Inverse Dynamics DAE
The inverse dynamics problem described in Section 4 will now be analyzed using the theory from Section 5 for the model described in Section 6. Note that the problem (7) can be expressed in the implicit DAE form (8) if u is added to the state vector X and θ(t) is included in F( · ). Clearly, for (7), the differential index ν ≥ 1 since u˙ is missing in the equation. In Moberg and Hanssen (2007) it is shown that the differential index is at least 4 and that it can be reduced one step by removing the equation for the motor torque balance. The control signal u can then be computed from the solution X of the reduced DAE. The reduced DAE is generally expressed as M11 (X1 , X2 )X˙ 4 + M12 (X1 , X2 )X˙ 5 + γ1 (X1 , X2 , X3 , X4 , X5 , X6 ) = 0, M21 (X1 , X2 )X˙ 4 + M22 (X1 , X2 )X˙ 5 + γ2 (X1 , X2 , X4 , X5 ) = 0,
(17a) (17b)
X˙ 1 − X4 = 0, X˙ 2 − X5 = 0, X˙ 3 − X6 = 0,
(17d)
Γ (X1 , X2 ) − θ(t) = 0.
(17f)
(17c) (17e)
The analysis is performed for the 5 DOF model described in Section 6, using three different methods. All symbolical computations are performed using Maple and all rank computations are structural, i.e., cannot be guaranteed for all numerical values of states and state derivatives. If this analysis would be a part of a numerical solver, numerical values would have to be used.
7.1
Analysis using The Kunkel and Mehrmann Hypothesis
The analysis was carried out by applying the hypothesis in Section 5, starting with µ = 0, and constructing the matrix functions Z2 , T2 (by computing nullspaces), and Z1 (by selecting matrix rows). If the hypothesis is not satisfied, µ is increased until the hypothesis is fulfilled. The analysis showed that there are 6 algebraic variables, 4 differential variables, and that the strangeness index µ = 2. In Moberg and Hanssen (2008b), the hypothesis is applied to an analysis of a 2 DOF manipulator. In that example, due to less complex equations, it was also possible to determine the differential and algebraic variables, and to solve for the decoupled system (16). The existence of a decoupled system is guaranteed by the implicit function theorem, but an analytic decoupling cannot be performed for a general nonlinear system.
7.2
Analysis by Differentiation
The algebraic constraint was differentiated and the higher order derivatives solved for and substituted. After three differentiations, the Jacobian Fx˙ has (structurally) full rank. The differential index, ν, is 3 as expected. In general, the strangeness index, µ = max(ν − 1, 0).
182
7.3
Paper C
Inverse Dynamics of Flexible Manipulators
Analysis by Differentiation and Introduction of Independent Variables
This analysis, by introducing independent variables, is based on two methods for index reduction called Minimal Extension and Dummy Derivatives which are further described and referenced in Section 8.2. If the algebraic constraint (17f) is differentiated and added to the system we can add independent variables, e.g., Xˆ 1 = X˙ 1 to get a determined system. By inspecting the system, we can see that the equations involving Xˆ 1 can be removed. The resulting system is M11 (X1 , X2 )X˙ 4 + M12 (X1 , X2 )X˙ 5 + γ1 (X1 , X2 , X3 , X4 , X5 , X6 ) = 0, M21 (X1 , X2 )X˙ 4 + M22 (X1 , X2 )X˙ 5 + γ2 (X1 , X2 , X4 , X5 ) = 0,
(18b)
X˙ 2 − X5 = 0, X˙ 3 − X6 = 0,
(18d)
Γ (X1 , X2 ) − θ(t) = 0, ˙ = 0. Γ˙ (X1 , X2 , X4 , X5 ) − θ(t)
(18a) (18c) (18e) (18f)
By differentiating once more and adding independent variables Xˆ 4 = X˙ 4 we get the determined system M11 (X1 , X2 )Xˆ 4 + M12 (X1 , X2 )X˙ 5 + γ1 (X1 , X2 , X3 , X4 , X5 , X6 ) = 0, M21 (X1 , X2 )Xˆ 4 + M22 (X1 , X2 )X˙ 5 + γ2 (X1 , X2 , X4 , X5 ) = 0, X˙ 2 − X5 = 0, X˙ 3 − X6 = 0, Γ (X1 , X2 ) − θ(t) = 0, ˙ = 0, Γ˙ (X1 , X2 , X4 , X5 ) − θ(t) ¨ = 0. Γ¨ (X1 , X2 , X4 , X5 , Xˆ 4 , X˙ 5 ) − θ(t)
(19a) (19b) (19c) (19d) (19e) (19f) (19g)
By computing the Jacobian w.r.t. the highest order derivatives9 for (19), we see that the original system (17) and the one time differentiated system (18) have singular Jacobians, and that the two times differentiated system (19) has (structurally) full rank. This analysis also shows that the (structural) differential index ν, is 3, since we reach an index-1 DAE after two differentiations. We also se that x1 , x2 , x6 , x7 , x9 , x10 (X1 , X4 , X6 ) can be chosen as algebraic variables and that x3 , x4 , x5 , x8 (X2 , X3 , X5 ) can be chosen as differential variables. Thus, there are 6 algebraic variables and 4 differential variables, the same result as in the Kunkel and Mehrmann analysis, but in this way, we can also easily determine which variables are algebraic.
8
Methods for Numerical Solution of DAEs
Common numerical method for solving DAEs are Runge-Kutta methods and BDF methods (backwards differentiation formulas). In this section we will concentrate 9 e.g., [X
˙
˙
˙
ˆ
1 , X2 , X3 , X4 , X5 , X6 , X4 ]
8
183
Methods for Numerical Solution of DAEs
on the k-step BDF methods, where the derivative is approximated according to k
˙ i ) ≈ Dh xi = x(t
1X αl xi−l , h
(20)
l=0
and h = ti − ti−1 is the stepsize. BDF are stable for 1 ≤ k ≤ 6 and have coefficients according to, e.g., Kunkel and Mehrmann (2006). One widely used solver for DAEs is called DASSL, which is a variable-order variable-stepsize method (Brenan et al., 1996). In this section some common approaches for solving the equations by k-step BDF will be briefly described. In Section 9, these methods will be evaluated on the extended flexible joint inverse dynamics problem.
8.1
Solving The Original High-Index DAE
If the BDF approximation is inserted in the original DAE (8) we get F(ti , xi , Dh xi ) = 0,
(21)
which is a system of nonlinear equations that must be solved w.r.t. xi , for each time step, forward in time (initial value problem). The solvability of this system can be analyzed by computing the Jacobian α (22) Fxi = 0 Fx˙ + Fx h which is ill-conditioned for small stepsizes since Fx˙ is singular. This means that the solution may be erroneous or that we might not get any solution at all. However, the k-step BDF method converges for some classes of high-index DAEs, and the equations can be scaled to improve the conditioning of the problem, see Lötstedt and Petzold (1986) and Petzold and Lötstedt (1986).
8.2
Index Reduction and Dummy Derivatives
This method is based on index reduction by differentiation. Pantelides’s algorithm (Pantelides, 1988) is often used to determine which equations to differentiate, and a Block Lower Triangular (BLT) form (Duff et al., 1986) of the differentiated problem can be used to check that the system is non-singular w.r.t. the highest order derivatives. Some problems occur when solving the differentiated problem. If all equations are kept, the resulting system is overdetermined and might be complicated to solve, see, e.g., Kunkel and Mehrmann (2006). If only the differentiated equations are kept, the resulting system with differential index ν = 1 or ν = 0 is determined, but when the system is discretized and solved, a problem denoted as drift off often occurs due to discretization and roundoff errors. This means that the solution drifts off from the solution manifold since the original algebraic constraints have been removed and replaced by differentiated constraints. Techniques for dealing with this are called constraint-stabilization techniques and are described in, e.g., Brenan et al. (1996). In Mattson and Söderlind (1993) a new method for dealing with these problems is suggested. For each differentiated equation, one differentiated variable is selected as a new independent variable, a so-called dummy derivative. In this way,
184
Paper C
Inverse Dynamics of Flexible Manipulators
the original constraints are kept, and a determined system is guaranteed. This method can be applied to large systems and is generally used in the numerical solvers of object-oriented simulation languages like Modelica (Fritzon, 2004). In Kunkel and Mehrmann (2004) a method called minimal extension is suggested. Minimal extension utilizes the structure of the problem to obtain a minimal system where a new independent variable have been introduced for each differentiated equation, i.e., the method is very similar to the dummy derivative method. The motivation is that the original dummy derivative method cannot handle all problems and that it generally results in an unnecessarily large system. The final numerical solution of the index-reduced system is normally solved with a k-step BDF method as described above.
8.3
Numerical Solution Based on Kunkel and Mehrmann’s Hypothesis
In Kunkel and Mehrmann (1998) a method for numerical solution based on the hypothesis in Section 5 is suggested. The system to solve is Fµ (ti , xi , yi ) = 0, Z˜ 1T F(ti , xi , Dh xi ) = 0,
(23)
˙ . . . , x[µ+1] ] are regarded as independent algebraic variables. This where yi = [x, underdetermined system has the same solution as the original high-index DAE. Due to the hypothesis, the dependence of yi can be neglected such that (23) only depends on xi . Z˜ 1 is an approximation to Z1 at the desired solution.
9 9.1
Numerical Solution of The Inverse Dynamics Initial conditions and trajectory generation
An ODE solution is well-defined for any initial conditions. The solution to a DAE is restricted to a space with dimension less than n by the algebraic constraint, and its derivatives up to order ν − 1, i.e., the implicit constraints. Consistent initial conditions w.r.t. all explicit and implicit constraints must be given to avoid initial transients. For the inverse dynamics problem (7), the initial position for all DOF (X10 , X20 , X30 ) and the initial control signal (u0 ) must be chosen such that we get a steady-state solution with initial speed and all state derivatives equal to zero, i.e., we must solve F(0, X10 , X20 , X30 , 0, . . . , 0, u0 ) = 0. If no gravity is present, u0 = 0, X10 = X30 , and X20 = 0. Note that the trajectory reference θ(t) is implicitly included in F and that the first ν derivatives of the algebraic constraint must be zero for t = 0. Moreover, θ(t) must be sufficiently smooth to obtain a continuous control signal u(t) as it is (implicitly) differentiated when the DAE is solved. The smoothness requirement is that θ(t) is at least ν0 times differentiable, where ν0 is the differential index of the original (unreduced) inverse dynamics problem (7). This can be accomplished, e.g., by using the trajectory polynomial p(t) = a6 t 6 + a7 t 7 + a8 t 8 + a9 t 9 + a10 t 10 + a11 t 11 ,
(24)
9
185
Numerical Solution of The Inverse Dynamics
[1]
θ
0.5
0 0
[2]
θ
1
0.5
1
θ
3
20
2
10
1
0
0
−10
−1 0
[3]
0.5
1
−20 0
[4]
θ
θ
1000
20
500
0
1
[5]
θ
100
0.5
10
0 −100
0
−500
−200 0
0.5
1
−1000 0
0.5
1
−10 0
0.5
1
Figure 5: Trajectory polynomial p(t) including first five derivatives.
Joint 1 and 2 Joint 3
m 100 200
ξ 0.5 0.1
l 1 0.2
j 5 50
k 105 105
d 250 250
Jm 100 -
Table 1: Parameters of the 5 DOF model (minimum phase dynamics). which has p[i] (0) = 0, i = 0, . . . , 5. The coefficients are computed by solving p(tend ) = 1, p[i] (tend ) = 0, i = 1, . . . , 5. A straight line trajectory in the x–z plane can for example be computed as " end # " start # " # " start # θ θ θx (t) θx = start + p(t)[ xend − xstart ]. θz θz θz (t) θz
(25)
(26)
One example of the trajectory polynomial and its first five derivatives is shown in Figure 5.
9.2
Numerical Solution of The Inverse Dynamics for The 5 DOF Model
The values of the physical parameters10 are shown in Table 1. For simplicity, the gravity was set to zero, i.e., the manipulator is working in the horizontal plane. The numerical solver is based on a k-step BDF with constant stepsize. The Jacobian Fxi is ill-conditioned for small values of h. This can be improved, e.g., by scaling the algebraic and differentiated algebraic equation with (1/h)3−l , where l is the number of differentiations. The following systems were solved: Eq. (17) with index 3, Eq. (18) with index 2, and Eq. (19) with index 1. The 10 The motor inertia J is expressed on the joint side, i.e., multiplied by the square of the gear ratio. m
186
Paper C
Method Index 3 Index 2 Index 1
L33S 16 s 15 s 20 s
L33 97 s 16 s 24 s
Inverse Dynamics of Flexible Manipulators
NL33S 18 s 17 s 22 s
NL33 29 s 18 s 34 s
NL61S 73 s 75 s 69 s
Table 2: Execution time: linear dynamics (L), nonlinear dynamics (NL), 3step BDF and h = 3 ms (33), 6-step BDF and h = 1 ms (61), scaled algebraic equations (S)
Jacobians Fxi were all full-rank, which shows that the discretized system can be solvable, although the continuous system is not. A solver based on the Kunkel and Mehrmann Hypothesis, where the underdetermined system (23) is solved, was also implemented. However, this solver did not give an accurate solution in this implementation. An attempt to solve the index 1 system with the Matlab solver ode15i also failed due to numerical problems. However, both these solvers were successfully applied to a 2 DOF manipulator as shown in Moberg and Hanssen (2008b). The reference trajectory is a 2.2 m straight line, performed in 0.3 s, an extremely challenging trajectory for this elastic manipulator with eigenfrequencies down to 2 Hz. The solvers were implemented in Matlab, using fsolve to solve the system of non-linear equations. No effort to make the solvers computationally efficient was made, but they were still adequate for a comparison of the behavior of the algorithms. The execution times are shown in Table 2. The time for solving the nonlinear dynamics does not increase proportional to the number of operations in the DAE. This indicates that the nonlinear terms in some way improve the solvability of the system. For a given BDF order and stepsize, the solutions for the different systems were almost identical. The solutions for the states and control signals are shown in Figures 6–7. The computed control signal was fed into a simulation model for verification of the inverse dynamics solution. In Figure 8 the result is shown and it is concluded the errors in the simulated robot tool position are small (less than 0.05 mm) and that there is a small drift due to the lack of a stabilizing feedback controller. For accurate solutions, the stepsize has to be small and an increase of the stepsize will increase the tool vibrations. A 3-step BDF and 3 ms stepsize is adequate in this case. Some snapshots from a simulation are shown in Figure 9. The continuous system was linearized and analyzed along the solution trajectory. As expected, the system was minimum phase at all points. If the model parameters are changed so that the linearized system is nonminimum phase, the inverse dynamics solution is unbounded as expected. In general, a stable zero dynamics (minimum phase) of the linearized system gives a stable zero dynamics for the nonlinear system, see, e.g., Isidori (1995). Note that the discretized system can be non-minimum phase, even though the continuous system is minimum phase, due to zeros introduced by the discretization. Simulations also show that increased damping improves the solvability. This can be understood since the index increases one step if the damping is zero.
187
0.2 0.4 0.6 0.8
0.5 0 0.2 0 −0.2
x10 = q˙m2 x9 = q˙m1 x8 = q˙a3
0.2 0.4 0.6 0.8
0 0 −0.5 −1 −1.5 0 1.5 1 0.5 0
0 −5 −10 0 10 5 0 −5 0 10 0 −10 0 20 0 −20 0 20
x7 = q˙a2
0 1
0.2 0.4 0.6 0.8
0.2 0.4 0.6 0.8
x5 = qm2
x4 = qm1 x3 = qa3
x6 = q˙a1
0 −0.5 −1
x2 = qa2
x1 = qa1
Numerical Solution of The Inverse Dynamics
0.2 0.4 0.6 0.8
0.2 0.4 0.6 0.8
0.2 0.4 0.6 0.8
0.2 0.4 0.6 0.8
0.2 0.4 0.6 0.8
0 −20 0
0.2 0.4 0.6 0.8
Figure 6: The state solution for 3-step BDF and 3 ms stepsize. 4
u1 [Nm]
x 10 5 0 −5 −10 0
0.2
0.4
0.2
0.4
0.6
0.8
0.6
0.8
4
u2 [Nm]
x 10 4 2 0 −2 0
Time [s]
Figure 7: The control signal. 3-step BDF and 3 ms stepsize.
X [mm]
2000 Reference Simulated
1800 1600 1400 1200 0
0.2
0.4
0.6
1500 Z [mm]
9
0.8
Reference Simulated
1000 500 0 0
0.2
0.4
0.6
0.8
Time [s]
Figure 8: The tool position. 3-step BDF and 3 ms stepsize.
188
Paper C
Inverse Dynamics of Flexible Manipulators
1.6
Reference Path
1.4 1.2
Z [m]
1 0.8 0.6 0.4 0.2 0 −0.2 −0.4
0
0.5
1
1.5
2
X [m]
Figure 9: Snapshots from an animation of the movement. The reference path is shown as a dotted line. The direction is indicated by an arrow. Note the deflection of the, outer, non-actuated joint.
10
Inverse Dynamics for Non-Minimum Phase Systems
If the system, from input torque to tool position, is non-minimum phase (NMP), the initial-value solvers presented in the previous sections will give an unbounded solution. Several approaches for handling the inverse dynamics of NMP systems have been suggested. For linear systems, a non-causal solution can be obtained if the MP and the NMP dynamics are separated, solved separately (forward and backwards in time, respectively), and then superimposed, see, e.g., Kwon and Book (1990). A method for non-causal inverse of nonlinear systems is described in Devasia et al. (1996), and in De Luca et al. (1998), a non-causal solution is found for a flexible-link manipulator by applying iterative learning control. Another method is to define an alternative output which gives a stable or nonexisting zero dynamics. This approach is used in, e.g., De Luca and Di Giovanni (2001). In Aguiar et al. (2005), the problem is reformulated from tracking to pathfollowing, i.e., the time evolution of the trajectory polynomial p(t) is allowed to be changed. Another method would be to reduce the model to get a minimum phase system. These methods have been exemplified on, in general, small systems. To be able to solve the problem for a complex multi-axis manipulator, we propose the use of numerical optimization.
10.1
A Discretized DAE Optimization Solver
In this approach, the inverse dynamics problem is solved for the complete trajectory in one step. The discretized DAE (k-step BDF) to solve for time step i is F(ti , xi , xi−1 , . . . , xi−k ) = 0. Note that F( · ) can be the original high-index or the index-reduced DAE. The DAE to solve for the complete trajectory, i = 1, . . . , N ,
10
189
Inverse Dynamics for Non-Minimum Phase Systems
Joint 1 and 2 Joint 3
m 100 200
ξ 0.5 0.7
l 1 1.4
j 5 50
k 5 · 105 5 · 105
d 500 500
Jm 100 -
Table 3: Parameters of the 5 DOF model (non-minimum phase dynamics). is11 F(t1 , x1 , x1−1 , . . . , x1−k ) F(t , x , x , . . . , x ) 2 2 2−1 2−k = G(y) = 0, ... F(tN , xN , xN −1 , . . . , xN −k )
(27)
where h y = x1T
x2T
...
T xN
iT
.
(28)
One alternative is to solve the nonlinear least-squares (NLS) problem min kG(y)k22 , y
and another approach is to solve the nonlinear constrained optimization12 problem min kyk22 , subject to y
G(y) = 0.
The trajectory should start at t = ∆t to allow a non-causal solution. The minimization requirement of the states y is used to get a bounded solution. Other choices, e.g., torque or power are possible. However, in the simulation runs, the obtained solutions were always bounded, even if this requirement was removed. This needs to be further investigated. If needed to obtain a bounded solution, the function G(y) used in the NLS approach can be extended with, e.g., y.
10.2
Simulation with 5 DOF Model using The Discretized DAE Optimization Solver
The previously described 5 DOF model from Section 6, with parameters as shown in Table 3, was used in the simulation, using the described discretized DAE optimization solver. The model parameters yield a NMP system for the configurations used. To avoid drift in the solution, the system was stabilized with a PID controller according to Figure 10. The initial values for all time steps in y are set to the initial values at t = 0. The example movement is a straight line, 25 mm in both directions (x and z). The result is shown in Figures 11–12. Note that the torque is applied before the trajectory start (at t = 0.1 s), in order to create the necessary initial deflection. Also note the control action after the trajectory end (at t = 0.2 s) in order to release the deflection. A suitable ∆t to allow a non-causal solution, seems to be 2–3 times the time constants of the slowest NMP zero. The 11 Initial values [x
1−1 , . . . , x1−k ] are computed as described in Section 9.1 12 Also called a nonlinear program (NLP).
190
Paper C
Inverse Dynamics of Flexible Manipulators
ref
Figure 10: The inverse dynamics computes the desired motor position qm and the torque feedforward uf f w from the desired trajectory θ ref . The PID controller computes a torque adjustment from the measured motor position qm and the desired motor position. Speed
Acceleration Acceleration [m/s2]
Speed [m/s]
0 −0.2 −0.4 −0.6 0
x z 0.1
0.2
0.3
20 0 x z
−20 0
0.1
0.2
0.3
Max error 0.05 mm, rms error 0.01 mm −935 Z [mm]
−940 −945
Reference Simulated Robot
−950 −955 −960 3185
3190
3195 3200 X [mm]
3205
3210
Figure 11: Cartesian speed, acceleration, and the simulated path. Maximum path error is 0.05 mm.
linearized system has a NMP zero around 27 Hz and the lowest eigenfrequency around 5 Hz. The stepsize is 2 ms which gives 151 time steps in this simulation, and a 6-step BDF is used. If the index-1 system (19) is used, the NLP solver with 1812 variables and 1812 nonlinear equality constraints takes 880 s to solve. The NLS solver takes 630 s and the execution time could be reduced further if the index-2 or index-3 systems were used. The solvers are Matlab implementations (using lsqnonlin and fmincon), numerical gradients and Hessians are used, and additional computational optimization of the algorithms would yield a significant reduction of the computational time, but this has not been the main focus for the present study.
10.3
A Continuous DAE Optimization Solver
The algorithms in Section 10.1 are straight forward to apply but result in very large optimization problems. One way of reducing the problem size is to describe
191
Inverse Dynamics for Non-Minimum Phase Systems
Torque [Nm]
10
u1 u2
5000 0 −5000
Z pos [mm] X pos [mm]
0
0.05
0.1
0.15
0.2
0.25
0.3
0.05
0.1
0.15
0.2
0.25
0.3
0.05
0.1
0.15 Time [s]
0.2
0.25
0.3
3210 3200 3190 0 −940 −950 −960 0
Figure 12: The control signals (motor torques) and the tool x- and z-position.
h i T (t) T , using a basis functhe motor and joint angular positions, q(t) = qaT (t) qm tion expansion. In this work, the solution for the complete trajectory is described with one basis function expansion. Depending on the trajectory complexity, it could be advantageous to split the trajectory in several parts and use one expansion for each part. One possible expansion is a combination of a polynomial and a Fourier series, i.e., q(t) =
M X m=0
m
am t +
R h X
2π 2π br sin(r N h t) + cr cos(r N h t)
i
(29a)
r=1
= q(t, a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ).
(29b)
The derivatives q˙ and q¨ can be computed analytically and the DAE to solve for time step i is then Φ(ti , qi , q˙ i , q¨i ) = Φ(ti , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) = 0,
(30)
where Φ is the original extended flexible joint model described in (1) and (2), omitting the motor torque balance equation. The DAE to solve for the complete trajectory is then Φ(t1 , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) Φ(t2 , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) = Ψ (µ) = 0, (31) ... Φ(tN , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) h iT where µ = a1T . . . aTM b1T . . . bRT c1T . . . cRT , and each element, e.g., a1 , is a vector with the same dimension as q. The solution can now be obtained by solving the NLS problem min kΨ (µ)k22 . µ
192
Paper C
Inverse Dynamics of Flexible Manipulators
Max error 0.30 mm, rms error 0.09 mm 1250
Z [mm]
1200
1150
1100
Reference Simulated Robot
1050
1000
2320
2340
2360
2380 2400 X [mm]
2420
2440
2460
Figure 13: A complex path.
10.4
Simulation using The Continuous DAE Optimization Solver
The continuous DAE optimization solver was used on the same 5 DOF model and the same trajectory as used in Section 10.2. The series expansion used had M = 1, R = 20, and stepsize h = 5 ms. This resulted in a NLS problem with 210 variables and 305 nonlinear equations which was solved in 22 s. The maximum path error was the same as previously (0.05 mm), although small oscillations could be seen in the motor torque. To reduce these, the value of R can be increased (number of terms in the Fourier series). The execution time could be reduced further by computing an approximate solution and use as the initial value of µ. This could, e.g., be done by computing the series expansion for the rigid solution, i.e., motor and actuated joint angular positions are equal and non-actuated joint positions are zero. Another alternative would be to compute the algebraic (flat) inverse dynamic solution for the flexible joint approximation, omitting the non-actuated joint. The number of necessary terms in the Fourier series can be approximated by Fourier analysis of an approximate solution. To show that this approach can be used for more complex trajectories, a complex trajectory containing straight lines, circular segments and corner zones was used. This trajectory is used by robot manufacturers and customers for performance evaluation. The trajectory acceleration was 50 m/s2 , giving a speed of up to 1.5 m/s. The resulting position and torque are shown in Figures 13–14. The parameters were chosen as M = 1, R = 84, and h = 10 ms. The execution time was 1100 s and the maximum path error 0.3 mm. To solve the inverse dynamics using the continuous DAE optimization method reduces the optimization problem and seems very promising. As a final remark it could be added that trajectories for a manipulator model with 12 DOF have been tested, using the same method. Accurate solutions were found, although the execution time was quite long.
11
193
Conclusion, Discussion, and Future Work
4
x 10
u1 [Nm]
1 0.5 0 −0.5 −1 0
0.2
0.4
0.6
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0.8 1 Time [s]
1.2
1.4
1.6
u2 [Nm]
5000 0 −5000 0
Figure 14: Control signal for the complex path.
11
Conclusion, Discussion, and Future Work
The inverse dynamics of the extended flexible joint model can be solved with a constant-stepsize constant-order BDF. The difference between solving the original high-index DAE and the index-reduced DAE is small with respect to solvability and execution time. Solution of the original high-index system is attractive since differentiations of the constraint equations are avoided. Scaling of the algebraic equations and their derivatives is important and this should be further investigated, including scaling of variables. The use of more efficient equation solvers and optimizers, utilizing analytic gradients and Hessians, is another area for future research. Evaluation of the algorithms, using a more complex manipulator model, e.g., a six-axes model with transmission nonlinearities, is another important future work. Another logical step is to evaluate the algorithms on a real robot manipulator. Generally, a practical manipulator controller must be computed on-line as the future trajectory can be, at least partly, unknown, e.g., if sensor input affects the trajectory. This makes the optimization approach unfeasible and will set hard real-time requirements on the initial-value solver. However, for some applications, an off-line feedforward computation could be acceptable. Of course, there are a number of problems to be solved in order to make this approach feasible, e.g., smooth trajectory generation with constrained control signals and handling of manipulator singularities and alternative configurations. The main motivation for this work is, however, that a method for perfect feedforward control is valuable for evaluating the limit of control performance, and for developing approximate control algorithms for on-line computation.
194
12
Paper C
Inverse Dynamics of Flexible Manipulators
Acknowledgements
This work was supported by ABB AB-Robotics, Vinnova’s Industry Excellence Center LINK-SIC at Linköping University, and the Swedish Research Council (VR), which is gratefully acknowledged.
Bibliography
195
Bibliography A.P. Aguiar, J.P. Hespanha, and P.V. Kokotivic. Path-following for nonminimum phase systems removes performance limitations. IEEE Transactions on Automatic Control, 50(2):234–239, 2005. M. Björkman, T. Brogårdh, S. Hanssen, S.-E. Lindström, S. Moberg, and M. Norrlöf. A new concept for motion control of industrial robots. In Proceedings of 17th IFAC World Congress, 2008, Seoul, Korea, July 2008. W. Blajer. Dynamics and control of mechanical systems in partly specified motion. Journal of the Franklin Institute, 334B(3):407–426, May 1997. W. Blajer and K. Kolodziejczyk. A geometric approach to solving problems of control constraints: Theory and a dae framework. Multibody System Dynamics, 11(4):341–350, May 2004. K. E. Brenan, S. L. Campbell, and L.R. Petzold. Numerical Solution of InitialValue Problems in Differential-Algebraic Equations. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 1996. ISBN 0-89871-353-6. T. Brogårdh. Present and future robot control development—an industrial perspective. Annual Reviews in Control, 31(1):69–79, 2007. A. De Luca. Feedforward/feedback laws for the control of flexible robots. In Proceedings of the 2000 IEEE International Conference on Robotics and Automation, pages 233–240, San Francisco, CA, April 2000. A. De Luca and G. Di Giovanni. Rest-to-rest motion of a one-link flexible arm. In 2001 IEEE/ASME International Conference on Advanced Intelligent Mechatronics Proceedings, pages 923–928, Como, Italy, 2001. A. De Luca, S. Panzieri, and G. Ulivi. Stable inversion control for flexible link manipulators. In Proc. 1998 IEEE International Conference on Robotics and Automation, pages 799–804, Leuven, Belgium, May 1998. A. Devasia, D. Chen, and B. Paden. Nonlinear inversion-based output tracking. IEEE Transactions on Automatic Control, 41(7):930–942, 1996. I. S. Duff, A. M. Erisman, and J. K. Reid. Direct Methods for Sparse Matrices. Clarendon Press, Oxford, 1986. P. Fritzon. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. John Wiley & Sons, New York, 2004. A. Isidori. Nonlinear Control Systems. Springer-Verlag, London, Great Britain, 1995. K.P. Jankowski and H. Van Brussel. An approach to discrete inverse dynamics control of flexible-joint robots. IEEE Transactions on Robotics and Automation, 8(5):651–658, October 1992.
196
Paper C
Inverse Dynamics of Flexible Manipulators
T. R. Kane and D. A. Levinson. Dynamics: Theory and Applications. McGrawHill Publishing Company, 1985. P. Kunkel and V. Mehrmann. Index reduction for differential-algebraic equations by minimal extension. Z. Angew. Math. Mech., 84:579–597, 2004. P. Kunkel and V. Mehrmann. Differential-Algebraic Equations: Analysis and Numerical Solution. European Mathematical Society, 2006. P. Kunkel and V. Mehrmann. Regular solutions of nonlinear differental-algebraic equations and their numerical determination. Numerische Mathematik, 79: 581–600, 1998. D.-S. Kwon and W.J. Book. An inverse dynamic method yielding flexible manipulator state trajectories. In Proceedings of the 1990 American Control Conference, vol 1, pages 186–193, San Diego, CA, USA, 1990. P. Lötstedt and L. R. Petzold. Numerical solution of nonlinear differential equations with algebraic constraints. i: Convergence results for backwards differentiation formulas. Mathematics of Computation, 46(174):491–516, April 1986. S.-E. Mattson and G. Söderlind. Index reduction in differential-algebraic equations using dummy derivatives. SIAM Journal of Scientific Computing, 14: 677–692, 1993. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. S. Moberg and S. Hanssen. On feedback linearization for robust tracking control of flexible joint robots. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008a. S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators - a DAE approach. Technical Report LiTH-ISY-R-2866, Department of Electrical Engineering, Linköping University, SE-581 83 Linköping, Sweden, October 2008b. S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. C. C. Pantelides. The consistent initialization of differential-algebraic systems. SIAM Journal of Scientific and Statistical Computing, 9(2):213–231, 1988. L. R. Petzold and P. Lötstedt. Numerical solution of nonlinear differential equations with algebraic constraints ii: Practical implications. SIAM Journal of Scientific and Statistical Computing, 7(3):720–733, July 1986. P. Rouchon, M. Fliess, J. Lévine, and P. Martin. Flatness, motion planning and
Bibliography
197
trailer systems. In Proceedings of the 32nd Conference on Decision and Control, pages 2700–2705, San Antonio, Texas, December 1993. A.A. Shabana. Dynamics of Multibody Systems. Cambridge University Press, Cambridge, United Kingdom, 1998. M. W. Spong. Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109:310–319, December 1987. M. Thümmel, M. Otter, and J. Bals. Control of robots with elastic joints based on automatic generation of inverse dynamic models. In Proceedings of the 2001 IEEE/RSJ International Conference in Intelligent Robots and Systems, pages 925–930, Maui, Hawaii, USA, October 2001. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372–15380, Seoul, Korea, July 2008.
Paper D Inverse Dynamics of Robot Manipulators Using Extended Flexible Joint Models
Authors:
Stig Moberg and Sven Hanssen
Edited version of the paper: S. Moberg and S. Hanssen. Inverse dynamics of robot manipulators using extended flexible joint models. 2010. Submitted to IEEE Transactions on Robotics (under revision).
Inverse Dynamics of Robot Manipulators Using Extended Flexible Joint Models
Stig Moberg∗ ,† and Sven Hanssen∗∗ ,†
∗∗ Department
∗ Dept.
of Solid Mechanics, Royal Institute of Technology, SE-100 44 Stockholm, Sweden
[email protected]
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden
[email protected] † ABB
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected]
Abstract High performance robot manipulators, in terms of cycle time and accuracy, require well designed control methods, based on accurate dynamic models. This work investigates different methods for the inverse dynamics of a general manipulator model, called the extended flexible joint model. This model can describe elasticity in all directions, unlike the traditionally used robot models. The inverse dynamics solution is needed for feedforward control, which is often used for high-precision robot manipulator control. The inverse dynamics of the extended flexible joint model can be computed as the solution of a high-index differential algebraic equation (DAE). The obtained DAE is analyzed, and solvers for both minimum phase and non-minimum phase systems are suggested. The solvers are evaluated by simulation, using a manipulator with two actuators and five degrees-of-freedom. Finally, the suggested concept for inverse dynamics is experimentally evaluated using an industrial robot manipulator. In this experimental evaluation, an identified model is used in the inverse dynamics computation. Simulations using the same identified model are in good agreement with the experimental results. The conclusion is that the extended flexible joint inverse dynamics method can improve the accuracy for manipulators with significant elasticities, that cannot be described by the flexible joint model. 201
202
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
Figure 1: The IRB4600 robot from ABB.
1
Introduction
The development of industrial robots has to a large extent been focused on increasing the robot performance while reducing the robot cost, as described in Brogårdh (2007). This leads to the use of weight- and cost optimized robot components with increased elasticity. For large robots with a payload of 100–200 kg, the robot weight to payload ratio has decreased from 15 to 5 during the last 20 years. For smaller robots, the ratio is generally somewhat higher, but the reduction is about the same. This development leads to more complicated vibration modes inside the control bandwidth and enhances the need for accurate models, identification methods, and more advanced control algorithms. An example of a modern industrial robot manipulator is shown in Figure 1. Some examples of industrial research, addressing this problem by improving the model-based control, is described in Björkman et al. (2008) and Brogårdh (2009). Most publications concerning robot manipulators only consider elasticity in the rotational direction. The flexible joint model (Spong, 1987; De Luca, 2000), includes gear elasticity, and the flexible link model (De Luca and Siciliano, 1991; Book and Obergfell, 2000), includes link deformation restricted to a plane perpendicular to the preceding joint. When these models are used for control or simulation, the accuracy can be limited due to the model simplifications, since a real manipulator has a distributed flexibility in all directions. In Moberg et al. (2010) it is shown that the flexible joint model cannot accurately describe a modern industrial robot, and that a general serial-link elastic manipulator model, called the extended flexible joint model, improves the model accuracy. This work investigates different methods for inverse dynamics computation of the extended flexible joint model. The inverse dynamics solution is needed for feedforward control, which is often used for high-precision robot manipulator control. In Öhr et al. (2006) and Moberg and Hanssen (2007), the extended flexible joint model was presented, and in Moberg and Hanssen (2007), the inverse dynamics of this model was formulated and solved as a differential-algebraic equation (DAE). The inverse dynamics DAE was solved using a constant stepsize 1-step
2
The Extended Flexible Joint Model
203
Figure 2: Examples of elastic elements modeling torsional deflection in three directions: Three non-actuated elastic joints (left), two non-actuated elastic joints together with one elastic joint actuated by a motor (right). Dampers are not shown. backward differentiation formula (BDF). It was observed that a short stepsize was required to obtain an accurate solution, but that numerical solvability was lost if the stepsize was too small. Some commercially available software packages were also tried on the same systems, but none was able to solve these equations if the number of degrees-of-freedom (DOF) exceeded 5. The work presented in this paper has two main objectives. The first objective is to analyze the inverse dynamics DAE and to improve the numerical DAE solver. The material presented on this matter is primarily based on Moberg and Hanssen (2009). The other objective is to experimentally evaluate feedforward control, using the extended flexible joint model, on a real industrial manipulator. The paper is organized as follows: The extended flexible joint model is described in Section 2 and the inverse dynamics problem is analyzed in Section 3. In Section 4, some improved solvers are presented, and in Section 5, these solvers are evaluated in a simulation study. Section 7 evaluates feedforward control, using the suggested inverse dynamics, on a real industrial manipulator, and Section 8 concludes the paper.
2 2.1
The Extended Flexible Joint Model General Description
The extended flexible joint model is a lumped parameter model, which consists of a serial1 kinematic chain of rigid bodies. The rigid bodies are connected by elastic elements, representing torsional, and if needed also translational, deflection. The deflections caused by elasticity can be modeled as large rotations or approximated as small rotations, to reduce the model complexity. In this work, large rotations are used in order to handle large deflections with high accuracy. The elastic elements consist of one or more elastic joints, i.e., discretely localized spring-damper pairs. Two examples of elastic elements are shown in Figure 2. An actuated joint consists of a motor and a gearbox, and the corresponding springdamper pair models the torsional deflection of the gearbox. A non-actuated joint 1 The same modeling principle can of course be applied to parallel kinematic structures and serial structures with parallelogram linkages.
204
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
Figure 3: Three rigid bodies with fixed coordinate systems A, B, and C (solid). The joint vectors li connect the dashed coordinate systems, starting in N . The transformation (rotation) from the one dashed to the next solid coordinate system is given by the kinematic joint angles.
models elasticities in, e.g., bearings, foundations, tools, loads, and links (bending and torsion). Each rigid body is described by its mass mi ∈ R, center of gravity ξi ∈ R3 , inertia tensor w.r.t. center of mass2 Ji ∈ R6 , and joint vector li ∈ R3 , describing the location of the next rigid body. A model consisting of three rigid bodies is illustrated in Figure 3. All rigid body parameters are described in coordinate systems fixed to the rigid bodies. If the number of added non-actuated joints is Υ na and the number of actuated joints is Υ a , the system has 2Υ a + Υ na degrees-of-freedom (DOF). The model equations are " # " # f (q˙ ) τ (1a) M(qa )q¨a + c(qa , q˙ a ) + g(qa ) + g g = g , 0 τe Kg (η −1 qm − qg ) + Dg (η −1 q˙ m − q˙ g ) = τg ,
(1b)
−Ke qe − De q˙ e = τe , Mm q¨m + fm (q˙ m ) = τm − η h where qa = qgT
qeT
iT
(1c) −T
τg ,
(1d)
, qg ∈ RΥ a is the actuated joint angular position, qe ∈ RΥ na
is the non-actuated joint angular position, and qm ∈ RΥ a is the motor angular position. The actuator torque3 is τm ∈ RΥ a , τg ∈ RΥ a is the actuated joint torque, and τe ∈ RΥ na is the non-actuated joint torque, i.e., the constraint torque. The, possibly non-diagonal, gear ratio matrix is η ∈ RΥ a ×Υ a . With obvious dimensions, Mm and M(qa ) are the inertia matrices for the motors and the joints, respectively. Furthermore, Kg , Ke , Dg , and De are the stiffness- and damping matrices in the actuated and non-actuated directions. The Coriolis- and centripetal torques are 2 Due to the symmetrical inertia tensor, only six components of J need to be defined. i 3 The electrical drive system is not included in this model and is assumed to be ideal for the fre-
quency range considered here.
2
The Extended Flexible Joint Model
205
Figure 4: A 9 DOF extended flexible joint model with 2 links, 2 motors (M), 3 elastic elements (EE) and 3 rigid bodies (RB). described by c(qa , q˙ a ), g(qa ) is the gravity torque, and the nonlinear friction4 in motor bearings and gearboxes are fm (q˙ m ) and fg (q˙ g ). Note that the spring-damper torque also can be defined as nonlinear, e.g., a stiffening spring (Sweet and Good, 1985; Tuttle and Seering, 1996). The inertial couplings between the motors and the rigid bodies are neglected under the assumption of high gear ratio (Spong, 1987). Note that (1) is an extension of the flexible joint model, which can be derived as a special case if all non-actuated joints are removed, i.e., Υ na = 0. The equations of motion (1) can be derived by computing the linear and angular momentum, and by using Kane’s method (Kane and Levinson, 1985) the projected equations of motion can be derived to yield a system of ordinary differential equations (ODE) with minimum number of DOF. One alternative way of deriving the equations of motion is to compute the potential and kinetic energy and use Lagranges equation (Shabana, 1998). Figure 4 illustrates a two-link manipulator model, consisting of two motors, three rigid bodies, and three elastic elements with in total seven elastic joints. Thus, the model has two actuated joints, five non-actuated joints, and in total nine DOF5 . The goal when adopting the extended flexible joint model is to describe the real manipulator with desired accuracy in the frequency region of interest for all configurations and all payloads, i.e., to obtain a global model. Note that elasticity in all directions can be modeled, unlike the flexible joint and most flexible link models. The unknown model parameters, e.g., springs and dampers, can be obtained by identification (Wernholt and Moberg, 2008, 2010). From Moberg et al. (2010), it is also clear that the extended flexible joint model is needed to accu4 The friction of the gearbox is actually split into two components and distributed between f and m
fg .
5 In this paper, the number of DOF refers to the number of independent coordinates necessary to specify the (internal) configuration of a system.
206
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
Figure 5: A 5 DOF extended flexible joint model with 2 links, 2 motors (M), 3 elastic elements (EE) and 3 rigid bodies (RB).
rately describe a modern industrial robot.
For a complete model including the position and orientation of the tool, θ, the forward kinematic model of the robot must be added. The kinematic model is a mapping of qa ∈ RΥ a +Υ na to θ ∈ RΥ a . The complete model of the robot is then described by (1) and θ = Γ (qa ).
(2)
Note that no unique inverse kinematics exists. This is a fact that makes the inverse dynamics problem difficult to solve.
2.2
A Manipulator Model with 5 DOF
A 5 DOF manipulator model will be used as an example when analyzing and solving the inverse dynamics. The model is illustrated in Figure 5 and is a planar model with linear elasticity in the rotational direction only, and does not demonstrate the all-direction elasticity of the general model. However, it is an appropriate simple example with the desired mathematical structure. The model has two links, three rigid bodies, two actuated joints and one non-actuated joint, i.e., Υ a = 2 and Υ na = 1. This 5 DOF model requires around 500 operations to compute. As a comparison, a reasonable model for a six-axes manipulator, e.g., 18 DOF, requires around 25000 operations when symbolically optimized. Each rigid body is described by length li , mass mi , center of mass ξi , and inertia ji . Each joint is described by stiffness ki and damping di . An actuated joint is also described by motor inertia Jmi and the gear ratio ηi . The motor angular position is qmi , the joint angular position is qai , and the motor torque is ui . The manipulator
2
The Extended Flexible Joint Model
207
dynamics is then described by6 M11 M12 M13
M12 M22 M23 "
Jm1 0
M13 q¨a1 C1 G1 τg1 M23 q¨a2 + C2 + G2 = τg2 , G3 C3 M33 q¨a3 τe # " −1 # " # #" η τ u q¨m1 0 + 1−1 g1 = 1 , u2 Jm2 q¨m2 η2 τg2
where τgi = ki (ηi−1 qmi − qai ) + di (ηi−1 q˙ mi − q˙ ai ), τe = −k3 qa3 − d3 q˙ a3 , M11 = j1 + j2 + j3 + m1 ξ12 + m2 l12 s22 + m2 (c2 l1 + ξ2 )2 + m3 (s3 c2 l1 + s3 l2 + c3 s2 l1 )2 + m3 (c3 c2 l1 + c3 l2 − s3 s2 l1 + ξ3 )2 , M12 = j2 + j3 + m2 ξ2 (c2 l1 + ξ2 ) + m3 l2 s3 (s3 c2 l1 + s3 l2 + c3 s2 l1 ) + m3 (c3 l2 + ξ3 )(ξ3 − s3 s2 l1 + c3 c2 l1 + c3 l2 ), M13 = j3 + m3 ξ3 (ξ3 − s3 s2 l1 + c3 c2 l1 + c3 l2 ), M22 = j2 + j3 + m2 ξ22 + m3 l22 s32 + m3 (ξ3 + c3 l2 )(c3 l2 + ξ3 ), M23 = j3 + m3 ξ3 (c3 l2 + ξ3 ), M33 = j3 + m3 ξ32 , G1 = −m1 gξ1 c1 − m2 g(l1 c1 + ξ2 c12 ) − m3 g(l1 c1 + l2 c12 + ξ3 c123 ), G2 = −m2 gξ2 c12 − m3 g(l2 c12 + ξ3 c123 ), G3 = −m3 gξ3 c123 , 2 ξ + c q˙ 2 l + 2q˙ q˙ ξ + q˙ 2 ξ ) C1 = −s2 l1 m2 (q˙ a2 2 2 a1 1 a1 a2 2 a1 2 2 l (c l + ξ ) − m (s c l + s l + m2 s2 q˙ a1 1 2 1 2 3 3 2 1 3 2 2 ξ + q˙ 2 ξ + c3 s2 l1 )(2q˙ a1 q˙ a2 ξ3 + 2q˙ a3 q˙ a1 ξ3 + q˙ a1 3 a3 3 2 l + 2c q˙ q˙ l + c q˙ 2 l + 2q˙ a3 q˙ a2 ξ3 − s3 s2 q˙ a1 1 3 a1 a2 2 3 a2 2 2 ξ + c q˙ 2 l + c c q˙ 2 l ) + q˙ a2 3 3 a1 2 3 2 a1 1 2 l + m3 (ξ3 − s3 s2 l1 + c3 c2 l1 + c3 l2 )(c3 s2 q˙ a1 1 2 l + 2s q˙ q˙ l + s q˙ 2 l + s q˙ 2 l ), + s3 c2 q˙ a1 3 a1 2 3 a2 2 1 3 a1 a2 2 2 l − s l m (2q˙ q˙ ξ + 2q˙ q˙ ξ + q˙ 2 ξ C2 = ξ2 m2 s2 q˙ a1 1 3 2 3 a1 a2 3 a3 a1 3 a1 3 2 ξ + 2q˙ q˙ ξ − s s q˙ 2 l + 2c q˙ q˙ l + c q˙ 2 l + q˙ a3 3 a3 a2 3 3 2 a1 1 3 a1 a2 2 3 a2 2 2 ξ + c q˙ 2 l + c c q˙ 2 l ) + m (ξ + c l )(c s q˙ 2 l + q˙ a2 3 3 a1 2 3 2 a1 1 3 3 3 2 3 2 a1 1 2 l + 2s q˙ q˙ l + s q˙ 2 l + s q˙ 2 l ), + s3 c2 q˙ a1 1 3 a1 a2 2 3 a2 2 3 a1 2 2 l + 2s q˙ q˙ l + s q˙ 2 l + s q˙ 2 l ). C3 = ξ3 m3 (s23 q˙ a1 1 3 a1 a2 2 3 a2 2 3 a1 2 6 The following shorthand notation is used: s = sin(q ), c = cos(q ), s 1 a1 1 a1 12 = sin(qa1 + qa2 ), c123 = cos(qa1 + qa2 + qa3 ) etc.
208
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
The kinematics is computed as: # " # " X l1 c1 + l2 c12 + l3 c123 . Γ = = Z −l1 s1 − l2 s12 − l3 s123
3
Inverse Dynamics For The Extended Flexible Joint Model
The flexible joint model can be derived as a special case of the extended flexible joint model if all non-actuated joints are removed, i.e., Υ na = 0. If friction and damping are neglected we get the simplified flexible joint model. The simplified flexible joint model is an example of a so-called flat system (see, e.g., Rouchon et al. (1993)) which can be defined as a system where all state variables and control inputs can be expressed as an algebraic function of the desired trajectory and its derivatives up to a certain order. The desired joint trajectory qa (t) can be computed from the desired Cartesian trajectory θ(t), including derivatives, by use of the inverse kinematics. The simplified flexible joint model has no zero dynamics (De Luca, 2000). This means that it is always possible to find a bounded causal inverse dynamics solution. The inverse dynamics solution for the flexible joint model is derived in Jankowski and Van Brussel (1992) and De Luca (2000). The inverse dynamics is more complicated if the model is extended with damping, friction, nonlinear spring torque, or inertial coupling between motors and rigid bodies. Approaches for handling these cases are described in De Luca (2000) and Thümmel et al. (2001). With the following states qg x1 q x e 2 q x x = m = 3 , q˙ g x4 q˙ e x5 x6 q˙ m (1) and (2) can be written as M11 (x1 , x2 )x˙ 4 + M12 (x1 , x2 )x˙ 5 + γ1 (x1 , x2 , . . . , x6 ) = 0,
(3a)
M21 (x1 , x2 )x˙ 4 + M22 (x1 , x2 )x˙ 5 + γ2 (x1 , x2 , x4 , x5 ) = 0,
(3b)
Mm x˙ 6 + γ3 (x1 , x3 , x4 , x6 ) − u = 0,
(3c)
x˙ 1 − x4 = 0,
(3d)
x˙ 2 − x5 = 0,
(3e)
x˙ 3 − x6 = 0,
(3f)
Γ (x1 , x2 ) − θ(t) = 0,
(3g)
or ˙ u) = 0. F(t, x, x,
(4)
3
Inverse Dynamics For The Extended Flexible Joint Model
209
The system has Υ a input variables u, i.e., the motor torque τm , and Υ a controlled output variables with a desired reference θ(t), i.e., the position and orientation of the tool7 . The gravity torque, speed dependent inertia torque, friction, and the torque from the spring-damper pairs are contained in γi . The inverse dynamics solution for the model is obtained if θ(t) is regarded as the input signal and u and x are solved for. Generally, the inverse dynamics problem is the inverse problem for the system x˙ d (t) = f (xd (t), ud (t)),
(5)
yd (t) = h(xd (t)),
(6)
where the task is to find the states xd (t) and the control input ud (t) from the desired output yd (t). Note that (3) can be written in this form since the inertia matrices are invertible, see, e.g., Spong et al. (2006). Various approaches for solving this inverse problem have been suggested, e.g., nonlinear inverse (Devasia et al., 1996), flatness (Rouchon et al., 1993), and DAE solution (Brenan et al., 1996; Blajer and Kolodziejczyk, 2004). In Moberg and Hanssen (2007) the inverse dynamics for the extended flexible joint model was obtained by solving the DAE (3). The solver used was a constant stepsize 1-step backward differentiation formula (BDF). It was observed that a short stepsize was required to obtain an accurate solution, but that numerical solvability was lost if the stepsize was too small. As the name implies, a DAE consists of differential and algebraic equations. A DAE can generally be expressed by ˙ = 0, F(t, x, x) R2n+1
Rn
(7) Rm .
where x ∈ is the state vector and F : → If Fx˙ = ∂F/∂x˙ is nonsin˙ by the implicit function theorem, gular, (7) represents an implicit ODE since x, can be solved from x and t. Otherwise it represents a DAE, which in general is considerably harder to solve than an ODE. The differential index, ν, of a DAE provides a measure of the singularity of the DAE. Generally, the higher the index, the harder the DAE is to solve. An ODE has ν = 0, and a DAE with ν > 1 is denoted a high-index DAE. The differential index can somewhat simplified be defined according to Brenan et al. (1996): The (differential) index of the DAE (7) is the minimum number of times that all or part of (7) must be differentiated with respect to t in order to determine x˙ as a continuous function of t and x. If the DAE contains non-differentiated variables y, i.e., ˙ y) = 0, F(t, x, x, h
(8)
iT
it can be solved for z = x˙ y if Fz is non-singular, and then has ν = 1. For a thorough treatment of DAE theory and numerical methods, see, e.g., Brenan et al. (1996) and Kunkel and Mehrmann (2006). The inverse dynamics DAE (4) can be expressed in the DAE form (7) if u is added 7 For a kinematically redundant manipulator, e.g., a 7-axis manipulator, θ must be extended to specify the trajectory.
210
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
to the state vector x. Clearly, for (4), the differential index ν ≥ 1 since u˙ is missing in the equation. In Moberg and Hanssen (2007), it is shown that the differential index, ν is at least 4, and that ν can be reduced one step by removing the torque balance equation for the motor (3c). The control signal u can then be computed from the solution x of the reduced DAE. The reduced DAE is M11 (x1 , x2 )x˙ 4 + M12 (x1 , x2 )x˙ 5 + γ1 (x1 , x2 , . . . , x6 ) = 0,
(9a)
M21 (x1 , x2 )x˙ 4 + M22 (x1 , x2 )x˙ 5 + γ2 (x1 , x2 , x4 , x5 ) = 0,
(9b)
x˙ 1 − x4 = 0,
(9c)
x˙ 2 − x5 = 0,
(9d)
x˙ 3 − x6 = 0,
(9e)
Γ (x1 , x2 ) − θ(t) = 0,
(9f)
and has ν ≥ 3. Further analysis of (9) will be performed by differentiation and introduction of independent variables, which is based on two methods for index reduction called dummy derivatives (Mattson and Söderlind, 1993) and minimal extension (Kunkel and Mehrmann, 2006). If the algebraic constraint (9f) is differentiated and added to the system, and all state derivatives substituted, an independent variable, e.g., xˆ1 = x˙ 1 , can be introduced to get a determined system. By inspecting the system, we can see that the equations involving xˆ1 can be removed. The resulting system is M11 (x1 , x2 )x˙ 4 + M12 (x1 , x2 )x˙ 5 + γ1 (x1 , x2 , . . . , x6 ) = 0,
(10a)
M21 (x1 , x2 )x˙ 4 + M22 (x1 , x2 )x˙ 5 + γ2 (x1 , x2 , x4 , x5 ) = 0,
(10b)
x˙ 2 − x5 = 0,
(10c)
x˙ 3 − x6 = 0,
(10d)
Γ (x1 , x2 ) − θ(t) = 0, ˙ = 0. Γ˙ (x1 , x2 , x4 , x5 ) − θ(t)
(10e) (10f)
By differentiating once more and adding independent variables xˆ4 = x˙ 4 we get the determined system M11 (x1 , x2 )xˆ4 + M12 (x1 , x2 )x˙ 5 + γ1 (x1 , . . . , x6 ) = 0,
(11a)
M21 (x1 , x2 )xˆ4 + M22 (x1 , x2 )x˙ 5 + γ2 (x1 , x2 , x4 , x5 ) = 0,
(11b)
x˙ 2 − x5 = 0,
(11c)
x˙ 3 − x6 = 0,
(11d)
Γ (x1 , x2 ) − θ(t) = 0, ˙ = 0, ˙Γ (x1 , x2 , x4 , x5 ) − θ(t)
(11e)
¨ = 0. Γ¨ (x1 , x2 , x4 , x5 , xˆ4 , x˙ 5 ) − θ(t)
(11g)
(11f)
To do a structural analysis of an extended flexible joint model, a specific model structure must be used. An analysis is performed for the 5 DOF model structure described in Section 2.2. All symbolical computations are performed using Maple and all rank computations are structural, i.e., cannot be guaranteed for all numerical values of parameters, states and state derivatives. By computing the Jacobian w.r.t. the highest order derivatives, Fz , where z = [x1 , x˙ 2 , x˙ 3 , x4 , x˙ 5 , x6 , xˆ4 ] for (11), we see that system (9) and the one time differentiated system (10) have
4
211
Numerical Solution of the Inverse Dynamics
singular Jacobians, and that the two times differentiated system (11) has (structurally) full rank. This analysis also shows that the (structural) differential index ν, is 3, since we reach an index-1 DAE after two differentiations. A similar analysis of the original DAE (3) shows that it has ν = 4. We also see that x1 , x4 , x6 can be chosen as algebraic variables and that x2 , x3 , x5 can be chosen as differential variables. Thus, if the Jacobian Fz of (11) is non-singular, the extended flexible joint model can be reduced to an index-1 DAE with 3Υ a algebraic variables and Υ a + 2Υ na differential variables. However, the index depends of the structure of the model and if, e.g., the damping is set to zero, the index is generally increased one step. Alternative methods for analyzing the index of the inverse dynamics DAE are described in Moberg and Hanssen (2009).
4
Numerical Solution of the Inverse Dynamics
In this work, the inverse dynamics solution is intended to be used primarily for feedforward control, and the desired trajectory θ(t) must be followed perfectly in the case of no model errors. If the system, from input torque to tool position, is minimum phase (MP), i.e., has a stable zero dynamics, see, e.g., Isidori (1995), it is possible to obtain a bounded causal solution and solve the inverse dynamics DAE as an initial value problem. However, if the system is non-minimum phase (NMP), i.e., has an unstable zero dynamics, the initial-value solvers will give an unbounded solution. In this case, perfect control requires a non-causal solution, i.e., the torque must be applied before the start of the trajectory execution. Solvers for both cases will be suggested and discussed in the following sections.
4.1
Minimum Phase Dynamics
Common numerical method for solving DAEs are Runge-Kutta methods and BDF methods (backwards differentiation formulas). One widely used solver for DAEs is called DASSL, which is a variable-order variable-stepsize method (Brenan et al., 1996). Some commercially available software packages, e.g., Dymola (see Dymola (2010)), were also tried on the inverse dynamics DAE, but none was able to solve these equations if the number of DOF exceeded 5. Numerical problems could also be seen in cases where a solution was found. In this section we will concentrate on constant-stepsize constant-order k-step BDF methods, where the derivative is approximated according to k
˙ i ) ≈ Dh xi = x(t
1X αl xi−l , h
(12)
l=0
and h = ti − ti−1 is the stepsize. BDF are stable for 1 ≤ k ≤ 6 and have coefficients according to, e.g., Kunkel and Mehrmann (2006). This approximation can be inserted in any version of the inverse dynamics DAE, (3), (9), (10), or (11), with differential index 4, 3, 2, or 1, respectively. Then we get the discretized DAE F(ti , xi , Dh xi ) = 0,
(13)
212
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
which is a system of nonlinear equations that must be solved w.r.t. xi , for each time step, forward in time (initial value problem). The solvability of this system can be analyzed by computing the Jacobian α Fxi = 0 Fx˙ + Fx (14) h which is ill-conditioned for small stepsizes since Fx˙ is singular. This means that the solution may be erroneous or that we might not get any solution at all. This explains the problems with small stepsize described in Moberg and Hanssen (2007). The k-step BDF method converges for some classes of high-index DAEs, and the equations can be scaled to improve the conditioning of the problem, see Lötstedt and Petzold (1986) and Petzold and Lötstedt (1986). However, index reduction is normally used when solving DAEs, e.g., in the numerical solvers of objectoriented simulation languages like Modelica (Fritzon, 2004). The index reduction presented in Section 3 is based on the dummy derivative method (Mattson and Söderlind, 1993) where one differentiated variable is selected as a new independent variable (a dummy derivative) for each new equation created by differentiation. In this way, the original constraints are kept (drift off from the solution manifold is avoided) and a determined system is guaranteed. To further reduce the size of the system, the structure of the problem has been utilized according to Kunkel and Mehrmann (2004) (minimal extension).
4.2
Non-Minimum Phase Dynamics
Several approaches for handling the inverse dynamics of NMP systems have been suggested. For linear systems, a non-causal solution can be obtained if the MP and the NMP dynamics are separated, solved separately (forward and backwards in time, respectively), and then superimposed, see, e.g., Kwon and Book (1990). A method for non-causal inverse of nonlinear systems is described in Devasia et al. (1996), and in De Luca et al. (1998), a non-causal solution is found for a flexiblelink manipulator by applying iterative learning control. Another method is to define an alternative output which gives a stable or non-existing zero dynamics. This approach is used in, e.g., De Luca and Di Giovanni (2001). In Aguiar et al. (2005), the problem is reformulated from tracking to path-following, i.e., the time evolution of the trajectory is allowed to be changed. Another method would be to reduce the model to get a minimum phase system. These methods have been exemplified on, in general, small systems. To be able to solve the problem for a complex multi-axis manipulator, we propose the use of numerical optimization. NMP Solver I
In this approach, the inverse dynamics problem is solved for the complete trajectory in one step. The discretized DAE (k-step BDF) to solve for time step i is F(ti , xi , xi−1 , . . . , xi−k ) = 0. Note that F( · ) can be the original high-index DAE or one of the the index-reduced DAEs. The DAE to solve for the complete trajectory,
4
213
Numerical Solution of the Inverse Dynamics
i = 1, . . . , N , is8 F(t1 , x1 , x1−1 , . . . , x1−k ) F(t , x , x , . . . , x ) 2 2 2−1 2−k = G(y) = 0, ... F(tN , xN , xN −1 , . . . , xN −k )
(15)
where h y = x1T
x2T
...
T xN
iT
(16)
.
One numerically efficient alternative is to solve the nonlinear least-squares (NLS) problem min kG(y)k22 . y
The trajectory should start at t = ∆t to allow a non-causal solution. NMP Solver II
The algorithm in Section 4.2 is straightforward to apply but results in very large optimization problems, e.g., for long trajectories and complex models with many DOFs. The problem size can be reduced by describing the motor and joint anguh i T (t) T , using a basis function expansion. This type lar positions, q(t) = qaT (t) qm of algorithms are often called collocation methods. In this work, the solution for the complete trajectory is described with one basis function expansion. Depending on the trajectory complexity, it could be advantageous to split the trajectory in several parts and use one expansion for each part. One possible expansion is a combination of a polynomial and a Fourier series, i.e., q(t) =
M X m=0
am t m +
R h X
2π 2π br sin(r N h t) + cr cos(r N h t)
i
r=1
= q(t, a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ). The derivatives q˙ and q¨ can be computed analytically and the DAE to solve for collocation points ti is then Φ(ti , qi , q˙ i , q¨i ) = Φ(ti , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) = 0, where Φ is the original extended flexible joint model described in (1) and (2), omitting the motor torque balance equation. The DAE to solve for the complete trajectory is then Φ(t1 , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) Φ(t2 , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) = Ψ (µ) = 0, (17) ... Φ(tN , a1 , . . . , aM , b1 , . . . , bR , c1 , . . . , cR ) 8 Initial values [x
1−1 , . . . , x1−k ] are computed as described in Section 5.1
214
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
iT h where µ = a1T . . . aTM b1T . . . bRT c1T . . . cRT , and each element, e.g., a1 , is a vector with the same dimension as q. The solution can now be obtained by solving the NLS problem min kΨ (µ)k22 . µ
5
Simulation Study
5.1
Initial Conditions and Trajectory Generation
An ODE solution is well-defined for any initial conditions. The solution to a DAE is restricted to a space with dimension less than n by the algebraic constraint, and its derivatives up to order ν − 1, i.e., the implicit constraints. Consistent initial conditions w.r.t. all explicit and implicit constraints must be given to avoid initial transients. For the inverse dynamics problem (3), the initial position for all DOF and the initial control signal must be chosen such that we get a steady-state solution with initial speed and all state derivatives equal to zero, i.e., we must solve (3) for x10 , x20 , x20 , and u0 . Note that the trajectory reference θ(t) is implicitly included in (3) and that the first ν derivatives of the algebraic constraint must be zero for t = 0. Moreover, θ(t) must be sufficiently smooth to obtain a continuous control signal as θ(t) it is (implicitly) differentiated when the DAE is solved. The smoothness requirement is that θ(t) is at least ν0 times differentiable, where ν0 is the differential index of the original (unreduced) inverse dynamics problem (3). This can be accomplished, e.g., by using the trajectory polynomial p(t) = a6 t 6 + a7 t 7 + a8 t 8 + a9 t 9 + a10 t 10 + a11 t 11 , which
has9
p[i] (0)
= 0, i = 0, . . . , 5. The coefficients are computed by solving p(tend ) = 1, p[i] (tend ) = 0, i = 1, . . . , 5.
A straight line trajectory in the x–z plane can for example be computed as " end # " start # " # " start # θ θ θx (t) θx = start + p(t)[ xend − xstart ]. θz θz θz (t) θz
5.2
(18)
(19)
(20)
Simulation of Minimum Phase System
Here, the 5-DOF model from Section 2.2 is used with physical parameters values10 according to Table 1. The control objective is to control the x and z coordinates of the tool. For simplicity, the gravity was set to zero, i.e., the manipulator is working in the horizontal plane. The reference trajectory is a 1.7 m straight line, performed in 0.2 s, an extremely challenging trajectory for this elastic manipulator with eigenfrequencies down to 2 Hz. The solvers were implemented in Matlab, using fsolve to solve the system of non-linear equations. No effort to make the solvers computationally efficient was made, but they were still adequate 9 The i th time derivative of a variable p is denoted p[i] . 10 The motor inertia J is expressed on the joint side, i.e., multiplied by the square of the gear ratio. m
5
215
Simulation Study
Joint 1 and 2 Joint 3
m 100 200
ξ 0.5 0.1
l 1 0.2
j 5 50
k 105 105
d 500 500
Jm 100 -
Table 1: Parameters of the 5 DOF model (minimum phase dynamics). X
X [mm]
2000
1600 1400 0
Z [mm]
Reference Simulated
1800
0.1
0.2
0.3 Z
0.4
0.5
0.6
Reference Simulated
500 0 −500 0
0.1
0.2
0.3 Time [s]
0.4
0.5
0.6
Figure 6: Tool position for minimum phase system.
for a comparison of the behavior of the algorithms. The numerical solver is based on a k-step BDF with constant stepsize. System (9), (10), and (11) were solved11 , and the control signal u were computed from the state solution, using (3c). The Jacobians Fxi were all full-rank, which shows that the discretized system can be solvable, although the continuous system is not. The computed control signal was fed into a simulation model for verification of the inverse dynamics solution. In Figures 6–7 the result is shown and it is concluded the errors in the simulated robot tool position are small (less than 0.1 mm) and that there is a small drift due to the lack of a stabilizing feedback controller. To avoid drift in the solution, the system was stabilized with a PID controller according to Figure 8. For accurate solutions, the stepsize has to be small and an increase of the stepsize will increase the tool vibrations. A 3-step BDF and 3 ms stepsize is adequate in this case. Similar results, both in terms of accuracy and computational time, were obtained for all systems (index 1, 2, and 3, respectively), provided that scaling of the algebraic equation and its derivatives ∗ were performed. The scaling is extremely important and was chosen to (1/h)ν −l , where l is the number of differentiations for the specific equation, h is the stepsize, and ν ∗ is the differential index of the non-differentiated DAE, i.e., ν ∗ = 3. Index reduction sometimes decreases the computational time but the best choice seems to depend on the model and trajectory used. More details about this evaluation can be found in Moberg and Hanssen (2009). 11 The original inverse dynamics DAE (3) were also tried but numerical problems were encountered.
216
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
5
x 10 u1 [Nm]
2 0 −2 0
0.1
0.2
0.3
0.4
0.5
0.6
0.1
0.2
0.3 Time [s]
0.4
0.5
0.6
4
x 10 u2 [Nm]
5 0 −5 −10 0
Figure 7: Control signal for minimum phase system.
ref
Figure 8: The inverse dynamics computes the desired motor position qm and the torque feedforward uf f w from the desired trajectory θ ref . The PID controller computes a torque adjustment from the measured motor position qm and the desired motor position.
5
217
Simulation Study
Reference Path
1
Z [m]
0.5
0
−0.5 0
0.5
1 X [m]
1.5
2
Figure 9: Snapshots from an animation of the movement. The reference path is shown as a dotted line with the direction is indicated by the solid arrow. The motor angular positions (transformed to the arm side) are indicated by dashed lines. Some snapshots from a simulation are shown in Figure 9. The elastic deflection is very large which can be explained by the fact that, although the model has realistic parameters, the acceleration is very high, 500 m/s2 . A more reasonable acceleration for an industrial manipulator of this size would be 10 m/s2 . The continuous system was linearized and analyzed along the solution trajectory. As expected, the system was minimum phase at all points. If the model parameters are changed so that the linearized system is non-minimum phase, the inverse dynamics solution is unbounded as expected. In general, a stable zero dynamics (minimum phase) of the linearized system gives (locally) a stable zero dynamics for the nonlinear system, see, e.g., Isidori (1995). Note that the discretized system can be non-minimum phase, even though the continuous system is minimum phase, due to zeros introduced by the discretization.
5.3
Simulation of Non-Minimum Phase System
The 5-DOF model from Section 2.2 is used with physical parameters values according to Table 2. The model parameters yield a NMP system for the configurations used. The example movement is a straight line, 25 mm in both directions (x and z), with an acceleration of 40 m/s2 , reaching a speed of 1 m/s. The result is shown in Figures 10–11. Note that the torque is applied before the trajectory start (at t = 0.1 s), in order to create the necessary initial deflection. A suitable ∆t to allow a non-causal solution, seems to be 2–3 times the time constants of the slowest NMP zero. The linearized system has a NMP zero around 27 Hz and the
218
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
m 100 200
Joint 1 and 2 Joint 3
ξ 0.5 0.7
l 1 1.4
j 5 50
k 5 · 105 5 · 105
d 500 500
Jm 100 -
Table 2: Parameters of the 5 DOF model (non-minimum phase dynamics).
X [mm]
3210 Reference Simulated
3200 3190 0
0.05
0.1
0.15
0.2
0.3
Reference Simulated
−940 Z [mm]
0.25
−950 −960 0
0.05
0.1
0.15 Time [s]
0.2
0.25
0.3
Figure 10: Tool position for non-minimum phase system.
u1 [Nm]
5000 0 −5000 0
0.05
0.1
0.15
0.2
0.25
0.3
0.05
0.1
0.15 Time [s]
0.2
0.25
0.3
u2 [Nm]
4000 2000 0 −2000 −4000 0
Figure 11: Control signal for non-minimum phase system.
219
Simulation Study
1250
1200
Z [mm]
1150
1100
1050
1000
2320
2340
2360
2380 2400 X [mm]
2420
2440
2460
Figure 12: The complex path used for evaluating the NMP-solver based on collocation.
4
x 10
u1 [Nm]
1 0.5 0 −0.5 −1 0
0.2
0.4
0.6
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0.8 1 Time [s]
1.2
1.4
1.6
5000 u2 [Nm]
5
0 −5000 0
Figure 13: The control signals for the complex path.
220
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
lowest eigenfrequency around 5 Hz. The stepsize is 2 ms which gives 151 time steps in this simulation, and a 6-step BDF is used. Using the solver described in Section 4.2 and the index-1 system (11), we get an optimization problem with 1812 variables and 1812 equations. The solver described in Section 4.2 was used on the same movement (using a series expansion with M = 1 and R = 20) and collocation points separated by 5 ms. This resulted in an optimization problem with 210 variables and 305 equations which was solved 30 times faster than using the alternative solver. The maximum path error was the same in both cases (0.05 mm), although small oscillations could be seen in the motor torque for the second solver. To reduce these, the value of R can be increased (number of terms in the Fourier series). The computational time could be reduced further by computing an approximate solution and use as the initial value of µ. This could, e.g., be done by computing the series expansion for the rigid solution, i.e., motor and actuated joint angular positions are equal and non-actuated joint positions are zero. Another alternative would be to compute the algebraic (flat) inverse dynamic solution for the flexible joint approximation, omitting the non-actuated joint. The number of necessary terms in the Fourier series can be approximated by Fourier analysis of an approximate solution. The solvers are implemented in Matlab (using lsqnonlin). To show that the collocation approach can be used for more complex trajectories, a trajectory containing straight lines, circular segments and corner zones was used. This trajectory is used by robot manufacturers and customers for performance evaluation. The trajectory acceleration was 50 m/s2 , giving a speed of up to 1.5 m/s. The resulting position and torque are shown in Figures 12–13. The parameters were chosen as M = 1, R = 84, and h = 10 ms, which yield a maximum path error of 0.3 mm. To solve the inverse dynamics for non-minimum phase systems, using the suggested collocation method, reduces the optimization problem and seems very promising. As a final remark it could be added that trajectories for a manipulator model with 12 DOF have been tested, using the same method. Accurate solutions were found, although the computational time was quite long.
6
Controllability and Solvability
Analysis of controllability and inverse dynamics solvability for the nonlinear system (3) is outside the scope of this work. This section briefly discusses these aspects and reports some results for the linearized system. Here, the definitions in Skogestad and Postlethwaite (1996) are used to distinguish three useful concepts of controllability for linear systems. Functional controllability requires that the system transfer function matrix has full row rank. For systems having at least the same number of control signals as controlled output variables, this means that the minimum singular value of the transfer function matrix must not be identically zero. If the minimum singular value is small in a frequency region where the reference has a significant energy, the inverse dynamics will result in large control signals that might not be available. This
6
221
Controllability and Solvability
is an example of a quantitative aspect of controllability, included in the concept of input-output controllability. The third controllability concept is state controllability 12 , normally denoted controllability (Kalman, 1960). A nonlinear system can be analyzed by evaluating the state controllability of the linearized system. For linearization around a stationary operating point, state controllability of the linearized system implies local state controllability of the nonlinear system (Nijmeijer and van der Schaft, 1990). Local state controllability around a reference trajectory can also be analyzed by linearizing the nonlinear system around the nominal trajectory (Hermes, 1974). The local state controllability condition around a stationary operating point (x0 , u0 ) for a nonlinear system with n states x˙ = f (x, u),
(21)
is that h rank B
AB
...
i An−1 B = n,
where ∂f (x, u) ∂f (x, u) (x0 , u0 ), B = (x0 , u0 ). ∂x ∂u The method above can be numerically sensitive. An alternative method is to compute the controllability staircase form (MathWorks, 2010). The local state controllability condition around a nominal trajectory (x0 (t), u0 (t)) for (21) at time t1 is that h i rank B(t1 ) (Γ B)(t1 ) . . . (Γ k B)(t1 ) = n, A=
for any positive integer k, where ∂f (x, u) ∂f (x, u) (x0 (t), u0 (t)), B(t) = (x0 (t), u0 (t)), Γ = d/dt − A(t). ∂x ∂u Hence, for the systems studied in this work, an analysis of the local state controllability around a nominal trajectory can be quite complex. A(t) =
The issues of existence and uniqueness of an inverse dynamics solution is outside the scope of this work. In general, the existence and uniqueness of a nonlinear DAE solution can be analyzed with the methods described in (Kunkel and Mehrmann, 2006, Theorem 4.13). For a linear analysis, if x˙ = Ax + Bu,
(22)
y = Cx,
(23)
is a linearization of (3), the inverse dynamics can be expressed as a linear DAE in x and u: ˜ E˜ x˜˙ = A˜ x˜ + y, (24)
12 A functionally controllable system might not be state controllable (e.g., if the uncontrollable states are stable and of no practical importance), and a state controllable system might not be inputoutput controllable, i.e., controllable in a practical sense (Skogestad and Postlethwaite, 1996).
222
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
−80
Gain [dB]
−90 −100 σmax
−110
σ
min
−120 −130 0 10
1
10 Frequency [Hz]
Figure 14: The minimum and maximum gain (singular values) of the linearized 5-DOF model in one particular configuration. Stiffness and damping somewhat adjusted compared to Section 5.2.
where " I ˜ E= 0
# 0 , 0
" A ˜ A= C
# B , 0
" # x , x˜ = u
# 0 . y˜ = −y "
If p(λ) = det(λE − A) is not identically zero, where λ is a complex variable, then (24) has a unique solution if the initial conditions are consistent (Brenan et al., 1996; Kunkel and Mehrmann, 2006). The 5-DOF extended flexible joint model described in Section 2.2 with parameter values from Sections 5.2–5.3 has functional- and state controllability, if linearized around a stationary operating point (checked with a reasonable configuration grid). Hence, the nonlinear system has local state controllability around these stationary operating points. A more complex (and realistic) 12 DOF extended flexible joint model also has the same properties when analyzed. The linearized inverse dynamics (24) for the same systems as above, has unique solutions, except when approaching the singularities. An input-output analysis of the 5-DOF extended flexible joint model for various parameter settings, showed that the system gain, described by the singular values, can be low in some directions and frequency regions. One example is when approaching a singularity and another example is when an anti-resonance is present in the transfer function (see Fig. 14). This type of analysis is important for robot design but also for trajectory generation.
7
Experimental Evaluation
The method presented in Section 3 and 4 was evaluated on an industrial robot from the ABB IRB6640 series where three axes were used for inverse dynamics (feedforward) control. Joint 2 and 3 were used as actuated joints and joint 5 was used as a non-actuated joint, see Figure 15. Joint 2, 3, and 5 were practically decoupled from the other joints by positioning these in zero position. The payload was 200 kg and an experimental controller was used to allow off-line generated
7
Experimental Evaluation
223
Figure 15: The IRB6640 from ABB. In the experimental evaluation, joint B (2) and C (3) are the actuated joints, and joint E (5) is the non-actuated joint.
reference- and feedforward signals. A simple PID-controller was used as feedback controller for all joints except joint 5 where a PD-controller was used. In this way, the elasticity (stiffness and damping) of the non-actuated joint could be controlled by software. The PD controller (with zero reference) will be in series with the gearbox elasticity of joint 5. By choosing a PD stiffness much smaller than the joint 5 gearbox stiffness, a planar 5 DOF model similar to the one presented in Section 2.2 can be used for the inverse dynamics, although the model had to be modified to a complete 2-D planar 5 DOF model in order to describe the dynamics and kinematics of the robot used in the experiment. The motor inertia of joint 5 also had to be included in the model. The rigid body parameters of the model were known from CAD-data, and the elasticity parameters were identified by using a gray-box frequency domain identification method, see, Wernholt and Moberg (2008) and Wernholt and Moberg (2010). Note that the 5 DOF model might not be sufficient for an accurate description of the manipulator, although only three joints are used in a decoupled position, see Moberg et al. (2010). This motivated setting the PD-controlled non-actuated elasticity to be very elastic, thus being the dominating elasticity of the system. The resonance frequency of the non-actuated joint was therefore chosen to be lower than 2 Hz. One complication with this setup is that there is a non-linear friction located after the non-actuated joint (in joint 5 gearbox). This was compensated by applying a 40 Hz dithering (Armstrong-Hélouvry, 1991) torque to the PD-controller torque of joint 5. In this way, a very elastic non-actuated joint could be simulated on a standard industrial robot manipulator. A system analysis showed that the system is minimum phase and the inverse dynamics method from Section 4.1 could be used. The tool position, at the far end of the payload, was measured using a Leica laser tracker (Leica, 2007). The result is shown in Figure 16. As a comparison, the result when applying the flexible joint inverse dynamics (and thus ignoring the non-actuated joint) is also shown. The path error is shown in Figure 17. Clearly, most of the path error caused by the non-actuated joint is handled by the algorithm. The maximum er-
224
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
250
200
Z [mm]
150
100
50
0 1580
1600
1620
1640
1660
1680 1700 X [mm]
1720
1740
1760
1780
Figure 16: Result of experimental evaluation. Path reference (solid thin), path when using extended flexible joint inverse dynamics (solid thick), and path when using flexible joint inverse dynamics (dashed).
30 Path Error [mm]
25
Extended Flexible Joint Inverse Dynamics Flexible Joint Inverse Dynamics
20 15 10 5 1
2
3 4 Time [s]
5
6
Figure 17: Path error in experimental evaluation.
8
225
Conclusion, Discussion, and Future Work
250
200
Z [mm]
150
100
50
0 1600
1650
1700 X [mm]
1750
Figure 18: Simulation of path. Reference (solid thin), extended flexible joint inverse dynamics (solid thin), i.e., almost identical to the reference, extended flexible joint inverse dynamics with 10% error in stiffness parameters (solid thick), and flexible joint inverse dynamics (dashed). ror for extended flexible joint feedforward is 4.7 mm compared to 30.5 mm for the flexible joint feedforward. The acceleration of the trajectory is 3 m/s2 and the speed is maximum 0.8 m/s. A standard industrial manipulator with high precision motion control would have a maximum error of about 1 mm on a similar path. The reason for the relatively large error in this experiment is likely caused by uncompensated friction, small errors in the stiffness parameters of the model, a simplified model structure, and of course the low-stiffness non-actuated joint. Note that no friction model has been used in any simulations or in the inverse dynamics of the experimental evaluation, as the purpose of this work is to study the effect and handling of elasticity in robot manipulators. Nevertheless, the experiment proves that the inverse dynamics algorithm works. Figure 18 shows the result of a simulation, using the same trajectory and the same identified model. For the extended flexible joint feedforward, a stiffness error of 10% was introduced in the inverse dynamics model. The result is in good agreement with the experimental result.
8
Conclusion, Discussion, and Future Work
The inverse dynamics of the extended flexible joint model can be computed as the solution to a DAE. For minimum phase systems, the DAE can be solved as an initial-value problem using a constant-stepsize constant-order BDF. Solution
226
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
of the non-differentiated high-index system is attractive since differentiations of the constraint equations are then avoided. In this case, scaling of the equations is necessary to improve the numerical conditioning. However, the system is numerically sensitive and index reduction can in some cases be used to improve the solvability. For non-minimum phase systems, a non-causal solution of the DAE can be obtained by optimization of the (BDF) discretized system over the complete trajectory or by a collocation method. The solvers have been evaluated by simulation, using a 5 DOF manipulator model. The suggested concept for inverse dynamics has been experimentally evaluated using an industrial robot manipulator. An identified model was used for the inverse dynamics. The result was that the suggested inverse dynamics method, using the extended flexible joint model, can improve the accuracy for manipulators with significant elasticities, that cannot be described by the flexible joint model. Simulations using the same identified model were in good agreement with the experimental results. Improvement of the scaling (equations and variables), and the use of more efficient equation solvers and optimizers, utilizing analytic gradients, are areas for future research. Evaluation of the algorithms, using a more complex manipulator model, e.g., a six-axes model with transmission nonlinearities, controlling the natural non-actuated joint (due to, e.g., bearing and link elasticity) is another important future work. Generally, a practical manipulator controller must be computed on-line as the future trajectory can be, at least partly, unknown, e.g., if sensor input affects the trajectory. This makes the optimization approach unfeasible and will set hard real-time requirements on the initial-value solver. However, for some applications, an off-line feedforward computation could be acceptable. Of course, there are a number of problems to be solved in order to make this approach feasible, e.g., smooth trajectory generation with constrained control signals and handling of manipulator singularities and alternative configurations. However, the main motivation for this work is that a method for perfect feedforward control is valuable for evaluating the limit of control performance, and for developing approximate control algorithms for on-line computation.
Bibliography
227
Bibliography A.P. Aguiar, J.P. Hespanha, and P.V. Kokotivic. Path-following for nonminimum phase systems removes performance limitations. IEEE Transactions on Automatic Control, 50(2):234–239, 2005. B. Armstrong-Hélouvry. Control of Machines with Friction. Kluwer Academic Publishers, Norwell, Massachusetts, USA, 1991. M. Björkman, T. Brogårdh, S. Hanssen, S.-E. Lindström, S. Moberg, and M. Norrlöf. A new concept for motion control of industrial robots. In Proceedings of 17th IFAC World Congress, 2008, Seoul, Korea, July 2008. W. Blajer and K. Kolodziejczyk. A geometric approach to solving problems of control constraints: Theory and a dae framework. Multibody System Dynamics, 11(4):341–350, May 2004. W. Book and K. Obergfell. Practical models for practical flexible arms. In Proc. 2000 IEEE International Conference on Robotics and Automation, pages 835– 842, San Fransisco, CA, 2000. K. E. Brenan, S. L. Campbell, and L.R. Petzold. Numerical Solution of InitialValue Problems in Differential-Algebraic Equations. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 1996. ISBN 0-89871-353-6. T. Brogårdh. Present and future robot control development—an industrial perspective. Annual Reviews in Control, 31(1):69–79, 2007. T. Brogårdh. Robot control overview: An industrial perspective. Modeling, Identification and Control MIC, 30(3):167–180, 2009. A. De Luca. Feedforward/feedback laws for the control of flexible robots. In Proceedings of the 2000 IEEE International Conference on Robotics and Automation, pages 233–240, San Francisco, CA, April 2000. A. De Luca and G. Di Giovanni. Rest-to-rest motion of a one-link flexible arm. In 2001 IEEE/ASME International Conference on Advanced Intelligent Mechatronics Proceedings, pages 923–928, Como, Italy, 2001. A. De Luca and B. Siciliano. Closed-form dynamic model of planar multilink lightweight robots. IEEE Transactions on Systems, Man, and Cybernetics, 21 (4):826–839, 1991. A. De Luca, S. Panzieri, and G. Ulivi. Stable inversion control for flexible link manipulators. In Proc. 1998 IEEE International Conference on Robotics and Automation, pages 799–804, Leuven, Belgium, May 1998. A. Devasia, D. Chen, and B. Paden. Nonlinear inversion-based output tracking. IEEE Transactions on Automatic Control, 41(7):930–942, 1996. Dymola. Multi-engineering modeling and simulation. www.dymola.com, 2010.
228
Paper D
Inverse Dynamics of Robot Manipulators Using EFJ Models
P. Fritzon. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. John Wiley & Sons, New York, 2004. H. Hermes. On local and global controllability. SIAM Journal of Control, 12(2): 252–261, May 1974. A. Isidori. Nonlinear Control Systems. Springer-Verlag, London, Great Britain, 1995. K.P. Jankowski and H. Van Brussel. An approach to discrete inverse dynamics control of flexible-joint robots. IEEE Transactions on Robotics and Automation, 8(5):651–658, October 1992. R.E. Kalman. Contributions to the theory of optimal control. Boletin de la Sociedad Matematica Mexicana, 5:102–119, 1960. T. R. Kane and D. A. Levinson. Dynamics: Theory and Applications. McGrawHill Publishing Company, 1985. P. Kunkel and V. Mehrmann. Index reduction for differential-algebraic equations by minimal extension. Z. Angew. Math. Mech., 84:579–597, 2004. P. Kunkel and V. Mehrmann. Differential-Algebraic Equations: Analysis and Numerical Solution. European Mathematical Society, 2006. D.-S. Kwon and W.J. Book. An inverse dynamic method yielding flexible manipulator state trajectories. In Proceedings of the 1990 American Control Conference, vol 1, pages 186–193, San Diego, CA, USA, 1990. Leica. Leica geosystems laser trackers. www.leica-geosystems.com, 2007. P. Lötstedt and L. R. Petzold. Numerical solution of nonlinear differential equations with algebraic constraints. i: Convergence results for backwards differentiation formulas. Mathematics of Computation, 46(174):491–516, April 1986. MathWorks. Control System Toolbox Users Guide. The MathWorks Inc., Natic, Ma., 2010. S.-E. Mattson and G. Söderlind. Index reduction in differential-algebraic equations using dummy derivatives. SIAM Journal of Scientific Computing, 14: 677–692, 1993. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. S. Moberg and S. Hanssen. Inverse dynamics of flexible manipulators. In Multibody Dynamics 2009, Warsaw, Poland, July 2009. S. Moberg and S. Hanssen. Inverse dynamics of robot manipulators using extended flexible joint models. 2010. Submitted to IEEE Transactions on Robotics (under revision).
Bibliography
229
S. Moberg, E. Wernholt, S. Hanssen, and T. Brogårdh. Modeling and parameter estimation of robot manipulators using extended flexible joint models. 2010. Submitted to Journal of Dynamic Systems Measurement and Control, Transactions of the ASME. H. Nijmeijer and A. van der Schaft. Springer-Verlag, New York, 1990.
Nonlinear Dynamical Control Systems.
J. Öhr, S. Moberg, E. Wernholt, S. Hanssen, J. Pettersson, S. Persson, and S. SanderTavallaey. Identification of flexibility parameters of 6-axis industrial manipulator models. In Proc. ISMA2006 International Conference on Noise and Vibration Engineering, pages 3305–3314, Leuven, Belgium, September 2006. L. R. Petzold and P. Lötstedt. Numerical solution of nonlinear differential equations with algebraic constraints ii: Practical implications. SIAM Journal of Scientific and Statistical Computing, 7(3):720–733, July 1986. P. Rouchon, M. Fliess, J. Lévine, and P. Martin. Flatness, motion planning and trailer systems. In Proceedings of the 32nd Conference on Decision and Control, pages 2700–2705, San Antonio, Texas, December 1993. A.A. Shabana. Dynamics of Multibody Systems. Cambridge University Press, Cambridge, United Kingdom, 1998. S. Skogestad and I. Postlethwaite. Multivariable Feedback Control. Wiley, New York, 1996. M. Spong, S. Hutchinson, and M. Vidyasagar. Robot Modeling and Control. Wiley, 2006. M. W. Spong. Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109:310–319, December 1987. L. M. Sweet and M. C. Good. Redefinition of the robot motion-control problem. IEEE Control Systems Magazine, 5(3):18–25, 1985. M. Thümmel, M. Otter, and J. Bals. Control of robots with elastic joints based on automatic generation of inverse dynamic models. In Proceedings of the 2001 IEEE/RSJ International Conference in Intelligent Robots and Systems, pages 925–930, Maui, Hawaii, USA, October 2001. T.D. Tuttle and W.P. Seering. A nonlinear model of a harmonic drive gear transmission. IEEE Transactions on Robotics and Automation, 12(3):368–374, 1996. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372–15380, Seoul, Korea, July 2008. E. Wernholt and S. Moberg. Nonlinear gray-box identification using local models applied to industrial robots. Automatica, 2010. Accepted for publication.
Paper E On Feedback Linearization for Robust Tracking Control of Flexible Joint Robots
Authors:
Stig Moberg and Sven Hanssen
Edited version of the paper: S. Moberg and S. Hanssen. On feedback linearization for robust tracking control of flexible joint robots. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008.
On Feedback Linearization for Robust Tracking Control of Flexible Joint Robots Stig Moberg∗ ,† and Sven Hanssen∗∗ ,† ∗∗ Department
∗ Dept.
of Solid Mechanics, Royal Institute of Technology, SE-100 44 Stockholm, Sweden
[email protected]
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden
[email protected] † ABB
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected]
Abstract Feedback linearization is one of the major academic approaches for controlling flexible joint robots. This contribution investigates the discrete-time implementation of the feedback linearization approach for a realistic three-axis robot model. A simulation study of high speed tracking with model uncertainty is performed. It is assumed that full state measurements of the linearizing states are available. The feedback linearization approach is compared to a feedforward approach.
1
Introduction
High accuracy control of industrial robot manipulators is a challenging task, which has been studied by academic and industrial researchers since the 1970’s. The first approaches of linearizing a nonlinear system by nonlinear feedback can be found in the robotics literature from that decade. Control methods for rigid direct drive robots are, e.g., described in An et al. (1988). The two main approaches are feedforward control and feedback linearization, and both are based on a rigid dynamic model, combined with a diagonal PD or PID controller. Experimental evaluations are described in, e.g., Santibanez and Kelly (2001) and An et al. (1988). The conclusion in these is that feedforward control gives the same tracking performance as feedback linearization and that feedforward control is the preferred choice. In Spong (1987) it is shown that flexible joint robots, i.e., elastic gear transmissions and rigid links, can be described by the so called simplified flexible joint 233
234
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
model where the inertial coupling between the links and the motors are neglected. This approximation is valid for a reasonable high gear ratio. Furthermore, the viscous damping is also neglected in the simplified model. In the same article it is shown that the simplified flexible joint model can be linearized and decoupled by static feedback linearization, see also Spong et al. (2006). In De Luca (1988) and De Luca and Lucibello (1998) it is shown that the complete flexible joint model can be linearized and decoupled by dynamic state feedback. A simulation study of feedback linearization using both the simplified and the complete flexible joint model is described in Nicosia and Tomei (1988), where it is claimed that the simplified model can cause large error in some operating conditions, although the gear ratio is high. The feedforward approach for flexible joint robots is described in, e.g., De Luca (2000). Experimental evaluations of control methods for flexible joint robots are described in, e.g., Caccavale and Chiacchio (1994) (feedforward based on a rigid model), Jankowski and Van Brussel (1992) (discusses problems with feedback linearization due to its complexity and sample time requirement, suggests a simplified discrete-time predictive DAE approach with partial state feedback, based on a flexible joint model), Albu-Schäffer and Hirzinger (2000) (full-state feedback with gravity compensation based on a flexible joint model, concludes that feedback linearization is not possible to implement in available systems due to its complexity but also due to the requirements on model accuracy) and Thümmel et al. (2001) (feedforward based on a flexible joint model). In conclusion, the complete flexible joint feedback linearization is not implemented in any of these evaluations. No rigorous comparative simulation or experimental study of tracking with strict industrial requirements, using discrete-time implementations of feedback linearization and feedforward control, for the flexible joint model, has been published to the authors’ knowledge. However, simulation studies with reasonable realistic models are possible to perform. This study is intended to help bridging the gap between theoretical nonlinear robot control and robot control practise. Many control methods suggested by researchers are seldom implemented in real systems and, on the other hand, many important control problems in the real world are not addressed in the academic research. The existence of such a gap in general control science is widely acknowledged and the need for a balance between theory and practise is expressed in, e.g., Åström (1994). From Bernstein (1999) we quote "I personally believe that the gap on the whole is large and warrants serious introspection by the research community". The same article also points out that the control practitioners must articulate their needs to the research community, and that motivating the researchers with problems from real applications "can have a significant impact on increasing the relevance of academic research to engineering practise". The problem is somewhat provocatively described in Ridgely and McFarland (1999) as, freely quoted, "what the industry in most cases do not want is stability proofs, guarantees of convergence and other purely analytical developments based on idealized and unrealistic assumptions". In our simulation study, the real world is substituted with a simplified model,
2
235
Flexible Joint Robot Model
i.e., the (simplified) flexible joint model. Moreover, perfect state measurements are assumed. In a real implementation, some of the states would probably be estimated by means of an observer or simply by differentiation and low-pass filtering, disturbances and joint nonlinearities would be significant, and the real world elasticity would be much more complex than in our model, see, e.g., Wernholt and Moberg (2008). What we do assume, however, are important details such as a discrete implementation, continuous anti-alias filters, a reasonable requirement specification, realistic model parameters and small model parameter errors in our otherwise ideal model structure. Our rationale for this approach is that, if the chosen/evaluated control method does not prove its worth under these ideal circumstances, then the chances are small that a real implementation would give a different result. On the other hand, if the results are promising, then the next step would be to to increase the realism in the robot and sensor model, or to perform an experimental investigation.
2
Flexible Joint Robot Model
In this section, a serial link flexible joint robot model is described. The model consists of a serial kinematic chain of N rigid bodies. Rigid body rb i is described by its length l i , mass mi , center of mass ξ i , and inertia tensor w.r.t. center of mass J i . The rigid body rb i is connected to rb i−1 by a torsional spring. The motors are placed on the preceding body and the inertial couplings between the motors and the rigid bodies are neglected under the assumption of high gear ratio, see, e.g., Spong (1987). The total system has 2N DOF (i.e., the number of independent coordinates necessary to specify its configuration). The torque control of the motors are assumed to be ideal, so the N input signals u of the system are the motor torques. The equations of motion are derived by computing the linear and angular momentum and their time derivatives. By using Kane’s method (Kane and Levinson, 1985; Lesser, 2000) the projected equations of motion are derived to yield a system of ordinary differential equations (ODE) with minimum number of DOF. The model equations can be described as a system of second order ODE’s Ma (qa )q¨a + n(qa , q˙ a ) + K(qa − qm ) = 0, Mm q¨m + K(qm − qa ) = u,
(1a) (1b)
RN ×N
where x˙ denotes dx/dt. Ma (qa ) ∈ is the inertia matrix for the links and n(qa , q˙ a ) = c(qa , q˙ a ) + g(qa ), where c(qa , q˙ a ) ∈ RN and g(qa ) ∈ RN describes the Coriolis, centrifugal and gravity torques. Mm ∈ RN ×N is the diagonal inertia matrix of the motors. The link and motor angular positions are denoted qa ∈ RN and qm ∈ RN respectively. Note that the gear ratio matrix, r, is not explicitly shown in the equations. All equations are expressed on the link side and Mm = m r, where M m is the motor inertia matrix on the motor side. r T Mm m For a complete model including the position and orientation of the tool, Z, the forward kinematic model of the robot is needed. The kinematic model is a map-
236
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
Figure 1: A three axis flexible joint model.
ping of qa ∈ RN to Z ∈ R6 . The complete model of the robot is then described by (1) and Z = Γ (qa ).
(2)
Z is the controlled output variable. The forward kinematics (2) is practically invertible, i.e., there are methods for handling singularities and multiple solutions (Sciavicco and Siciliano, 2000) to get the inverse kinematics qa = Γ −1 (Z, C),
(3)
where C is a set of configuration parameters or other type of information, used to select a feasible solution. The link angular positions qa can thus be regarded as alternative output variables. A robot with N = 3 is used in the simulation study to follow. This robot is illustrated in Figure 1.
3
Feedback Linearization and Feedforward Control of a Flexible Joint Robot
The flexible joint robot is an example of a differentially flat system (Rouchon et al., 1993) which can be defined as a system where all state variables and control inputs can be expressed as an algebraic function of the desired trajectory for a flat output, and its derivatives up to a certain order. Feedback linearization by static or dynamic state feedback is equivalent to differential flatness (Nieuwstadt and Murray, 1998). By solving (1a) for qm and differentiating twice we get the expression for q¨m as [4] ˙ a (qa , q˙ a )qa[3] + q¨m = q¨a + K −1 [Ma (qa )qa + 2M [3] ¨ a (qa , q˙ a , q¨a )q¨a + n(q ¨ a , q˙ a , q¨a , qa )], M
(4)
3
237
Feedback Linearization and Feedforward Control of a Flexible Joint Robot
where x[i] denotes d i x/dt i . Adding (1a) to (1b) yields u = Ma (qa )q¨a + n(qa , q˙ a ) + Mm q¨m .
(5)
Inserting (4) in (5) gives [3]
[4]
u = τ(qa , q˙ a , q¨a , qa , qa ),
(6)
which shows that the flexible joint model is a flat system with the flat output qa . By choosing the states qa x1 q˙ a x x = q¨ = 2 , (7) a x3 [3] x4 qa the system can be expressed in the following state-space form by the use of (4) (6) x˙ 1 = x2 , x˙ 2 = x3 , x˙ 3 = x4 ,
(8b)
x˙ 4 = f (x) + g(x)u,
(8d)
(8a) (8c)
y = x1 ,
(8e)
where −1 f (x) = −Ma−1 (x1 )K Mm (Ma (x1 )x3 + n(x1 , x2 ))− −1 ¨ a (x1 , x2 , x3 ))x3 − Ma (x1 )(K + M
˙ a (x1 , x2 )x4 − 2Ma−1 (x1 )M ¨ 1 , x2 , x3 , x4 ), Ma−1 (x1 )n(x
(9a)
−1 g(x) = Ma−1 (x1 )K Mm .
(9b)
It is clear that four differentiations of each component of the output y are needed [4] in order for yi to depend directly on u, i.e., the relative degree νi = 4. Now, Σνi = 4N so the system has full relative degree and no zero dynamics associated with output y (Isidori, 1995; Slotine and Li, 1991). Thus the system is fully linearizable by a static feedback control law that can be derived from the controller canonical form (8) as u = g −1 (xm )(v − f (xm )),
(10) [4] qa
where v is a new control signal for the linearized and decoupled system =v consisting of N independent chains of four integrators. For tracking control, v can be chosen as [4]
v = qa,r + L(xr − xm ), RN ×4N
(11)
where L ∈ is a linear feedback gain matrix, xr are the reference states, and xm are the measurements of the states x. The fourth derivative of the refer-
238
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots [4]
ence trajectory must be defined and is denoted qa,r . This control law can also be derived by inserting the measured states xm and v in (6) to yield [4]
u = τ(x1m , x2m , x3m , x4m , qa,r + L1 (xr − xm )).
(12)
The derived control law is a combination of feedback and feedforward where the feedback part is dominating and is from now on denoted FL. A feedforward dominant control law can be expressed as [4]
u = τ(x1r , x2r , x3r , x4r , qa,r ) + L2 (xr − xm ),
(13)
where, ideally in the case of a perfect model, all torque needed for the desired trajectory is computed by feedforward. This control law is denoted FF. Note that for both controllers, in a real implementation, an integral term would be needed to handle model errors and disturbances. For simplicity the integral term is omitted in this study. The control law (12) gives constant bandwidth of the linearized closed loop for all robot configurations. For constant bandwidth there would be no need for gain scheduling. Gain scheduling is on the other hand probably needed in (13). This can be accomplished by observing that the closed loop dynamics for (12) is given by (8) with x˙ 4 = −L1 x and that L2 is given by setting −L1 x = f (x) + g(x)[−L2 x]. If the system is linearized for zero gravity, zero speed we get the configuration dependant feedback gain h i L2 = Mm K −1 Ma (x1r )L1 − 0 0 Ma (x1r ) + Mm 0 . (14) In this way we get approximately the same linear feedback for both control laws which will facilitate the comparison. The two control laws are illustrated in Figures 2 - 3. The control signal u can be described as u = ud,nc + uffw + ufdb ,
(15)
where ud,nc is the torque for decoupling and nonlinear cancellation, uffw is the feedforward torque and ufdb is the torque from the linear feedback controller. For FF, ud,nc = 0.
4
Simulation Study
The robot model described in Section 2 is simulated with the controller structures from Section 3. The model parameters used are typical for the three first axes of a large industrial robot with a payload capacity of 150 kg. One example of such a robot is shown in Figure 4 and the frequency response function of the linearized model in one configuration is shown in Figure 5. For simplicity, the gravitational constant is set to zero. The requirement specification illustrates a typical requirement for a dispensing application, e.g., gluing inside a car body, and is stated as follows:
4
239
Simulation Study
Figure 2: Feedback Linearization Control Law (FL).
Figure 3: Feedforward Control Law (FF).
Figure 4: IRB6600 from ABB equipped with a spot welding gun.
240
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
0
−100
−100
−100
−200
−200
−200 0 10 −100
1
10
−300 −300 2 0 1 2 0 1 10 10 10 10 10 10 0 0
−200
−100
−300 0 10 −100
1
10
−200
−300 0 10
1
10
−200
−200 −400 2 0 1 2 0 1 10 10 10 10 10 10 0 0
−200 2
10
2
10
2
10
−100
−400 −200 0 1 2 0 1 10 10 10 10 10
2
10
Figure 5: The frequency response function from motor torque to motor speed. Magnitude in [dB] and frequency in [Hz]. • The programmed path should be followed by an accuracy of 1 mm (maximum deviation) at an acceleration of 8 m/s2 and a speed of 0.5 m/s. • The specification above must be fulfilled for model errors in the user load mass by ±20 % and errors in the gear-box stiffness of ±20 %. • The test path is a circular path with radius 25 mm. The smooth cartesian trajectory reference Zr (θ(t)) is compared to the obtained robot trajectory Z(η(t)), where θ and η are time dependant scalar path parameters. Instead of using the tracking error |Zr (t) − Z(t)|, the path accuracy is measured by the path-following error. The tracking error will indicate error for, e.g., a small time delay between Zr and Z. Therefore, the path-following error is preferred as an accuracy measure and is also used in ISO (1998). The maximum path-following error is here computed as e = max(min(|Zr (θ) − Z(η)|)). η∈Z θ∈Zr
(16)
The circle computed in polar coordinates, radius r, angle Q, by discrete integration of Q[5] (t) and thus the path is C 4 as shown in Figure 6. The link angle reference qr is then computed using inverse kinematics and the required derivatives are calculated without delay.
4.1
Nominal Performance
In this section, the performance of feedback linearization and feedforward control is evaluated for the nominal case, i.e., no model errors. The discrete implementation is straightforward as the control laws, including all model derivatives ˙ a, M ¨ a , and n), ¨ are expressed as algebraic equations. The robot model is sim(M ulated as a continuous system with a zero-order hold at the output. Figure 7 shows an example of a simulated path with a path error of 4 mm. Simulations were performed for the nominal system with different sample times and different bandwidths of the linearized closed loop. Two methods for computing the
241
Simulation Study
5 0 20 10 0
0
0.1
0.2
0.3
0.4
0.5
0.6
0
0.1
0.2
0.3
0.4
0.5
0.6
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.1 4 x 10
0.2
0.3
0.4
0.5
0.6
0
0.2
0.3
0.4
0.5
0.6
100 0 −100 1000 0 −1000
2 0 −2 0.1
Figure 6: The circular angle Q and its derivatives.
20 15 10 y [mm]
4
5 0 −5 −10 −15 −20 2750
2760
2770 2780 x [mm]
2790
2800
Figure 7: An example of the circular reference path (dashed) and robot path (solid).
242
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
Max Error [mm]
25 20 15 10
FF BW=1 FF BW=5 FL BW=1 FL BW=5
5 0 −1 10
0
10 Sample Time [ms]
Figure 8: Path error vs. sample time for feedback linearization (FL) and feedforward (FF) using an LQ linear controller. Bandwidth (BW) of the linearized closed loop is 1 Hz and 5 Hz.
feedback gain matrix L1 were used, LQ optimal control (Anderson and Moore, 1990) and pole placement. For feedforward control, L2 is then computed from L1 according to (14). The controller is implemented with a fixed sample rate. The measured variables were filtered with a second order continuous anti-alias filter of Butterworth type, with a bandwidth equal to the Nyquist frequency. The bandwidth of of the linearized closed loop is indicated by the absolute value of dominant closed loop poles. Figures 8 - 9 show the path errors at different sample times and at two different bandwidths. The linear LQ-controller clearly causes problems when feedback linearization is used. Hence, in the remaining simulations, pole placement is used for the linear controller design. The design of the linear controller has not been further analyzed since the objective of this work is to compare the nonlinear controller concepts. Figure 10 shows the path errors for feedback linearization when different nominal motor inertias are used. The nominal motor inertias in all other simulations are 200 kgm2 , expressed on the link side. The performance of feedback linearization clearly depends on the motor inertia. Other simulations also show that the path error increases for feedback linearization if the anti-alias filtering of the measured variables is increased, i.e., the bandwidth is decreased or the order of the filter is increased. Feedforward control does not show the same sensitivity in this respect.
4.2
Robust Performance
The uncertain system, according to the requirement specification, was then simulated with a set of 20 models. The models were a combination of extreme values for the uncertain parameters and some random systems inside the uncertainty description. The result for one simulation example is shown in Figure 11 and an example of the resulting path error is shown in Figure 12. All simulations are summarized Table 1.
4.3
Discussion
From the simulation results, the following conclusions are drawn:
243
Simulation Study
Max Error [mm]
1 FF BW=1 FF BW=5 FL BW=1 FL BW=5
0.5
0 −1 10
0
10 Sample Time [ms]
Figure 9: Path error vs. sample time for feedback linearization (FL) and feedforward (FF) using a pole placement linear controller. Bandwidth (BW) of the linearized closed loop is 1 Hz and 5 Hz. 6 Max Error [mm]
4
h = 1 ms h = 5 ms
4 2 0
500
1000
1500
2000
Motor Inertia [kg m2]
Figure 10: Path error vs. motor inertia for feedback linearization (FL) using a pole placement linear controller. Bandwidth of the linearized closed loop is 1 Hz. Two different sample times (h) are used. Feedforward control (not shown) yields an error less than 0.2 mm in all cases.
Figure 11: Simulation of uncertain systems for feedback linearization control. Sample time is 1 ms and linearized closed loop bandwidth is 1 Hz.
244
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
Figure 12: Path error of uncertain systems for feedback linearization control. Sample time is 1 ms and linearized closed loop bandwidth is 5 Hz.
Table 1: Summary of simulation results for circular path (radius 25 mm) and the uncertain system. Sample Time [ms] 1 1 1 1 5 5
Bandwidth [Hz] 1 1 5 5 5 5
Method FF FL FF FL FF FL
Error [mm] 0.56 0.70 0.14 0.17 0.24 1.10
• FL requires higher sample rate than FF. • Low sample rate can to some extent be compensated by high bandwidth of the linearized closed loop. • If these requirements are fulfilled, the nominal and robust performance of FL is similar to FF. However, in this simulation study, FF always yields a better result. • The value of the motor inertia is critical for FL. • Measurement filtering, and hence time delay, reduces the performance more for FL than for FF. • The design of the linear feedback controller is critical for good performance. FL is more sensitive in this respect. To understand these results, it is helpful to consider the different torque components in (15). The result can now be explained as follows, the nonlinear cancellation and decoupling performed by FL in an ideal continuous world does not work in the same way for discrete time. Thus, the inevitable delay of ud,nc , caused by the discrete implementation, causes path errors if the sample time is too high. Increasing the bandwidth of the linearized closed loop will compensate for the delay in ud,nc by a correcting torque in ufdb . For FF and small model errors, uffw is dominating and the errors are small even for a moderate sample rate and mea-
5
245
Summary
surement filtering. In FL, the amount of torque in ud,nc and uffw depends on the numerical values of the model parameters. This explains why an increase in motor inertia decreases the error. From Figure 2 it is seen that increased motor inertia increases uffw relative to ud,nc . In feedback linearization of a rigid manipulator, i.e., the classical computed torque algorithm, ud,nc consists of the slow varying gravity torque and the speed dependent torques. The fastest varying torque is the acceleration dependant torque which is included in uffw . In this case the problems described above should be considerably smaller than in the case of a flexible joint robot where ud,nc also depends on the fast varying acceleration and jerk. To understand the different behavior of feedback linearization for different systems, consider the algorithm applied to a rigid one-axis manipulator with no friction or gravity, i.e., a double integrator. If the model inertia is correct, all required torque will be included in uffw and ud,nc is zero. FL and FF is the same in this case. To summarize, time delays caused by discrete implementation and filtering causes the linearization and decoupling to be only partial. The incomplete decoupling can, e.g., be analyzed by linearizing the system around position qa0 , and applying the feedback linearization (including measurement filtering) to the linearized and discretized system. The system is then decoupled by using u = (Ma (qa0 ) + Mm )q¨a + Mm K −1 Ma (qa0 )v.
(17)
This deviation from the ideal decoupled system must be handled by the linear controller, which therefore is critical for the resulting performance. Of course there is a limit of the achievable feedback bandwidth. Unmodeled dynamics, model errors, measurement noise and the fact that perfect complete state measurements are unachievable also limit the bandwidth. State estimation, noise filtering, and computational delay also add to the total delay. The sample rate and time delays can theoretically be very small but in practise there are limitations. The requirement on computational power would be enormous for a six-axes manipulator. Computation of model derivatives by numerical differentiation would reduce the number of operations, but would on the other hand also increase the delay.
5
Summary
In this paper, the discrete implementation of feedback linearization for flexible joint robots has been investigated in a simulation study concerning high speed tracking. Feedback linearization has been compared with feedforward control. Perfect state measurements have been assumed. With this assumption, the result is that typical industrial robot requirements can be fulfilled with both concepts. Another result is that feedforward control gives better performance and puts less requirements on the controller and sensor hardware. The design of the linear controller is found to be critical for the resulting performance. The feedback controller is needed for robustness, stabilization and disturbance rejection. The
246
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
partial linearization and decoupling, caused by the discrete implementation, increases the requirements on the feedback controller. Of course, there are more ways to combine feedback and feedforward than the two concepts studied in this article. Given the flat expression of the control signal (6) there are many ways to insert the measured states, the references states and the amplified state errors into the equation. Thus, how the optimal feedforward/feedback controller for an elastic robot manipulator should be designed is still an open question.
Bibliography
247
Bibliography A. Albu-Schäffer and G. Hirzinger. State feedback controller for flexible joint robots: A globally stable approach implemented on DLR’s light-weight robots. In Proceedings of the 2000 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 1087–1093, Takamatsu, Japan, October 2000. C.H. An, C.G Atkeson, and J.M. Hollerbach. Model-Based Control of a Robot Manipulator. The MIT press, Cambridge, Massachusetts, 1988. B. Anderson and J.B. Moore. Optimal Control: Linear Quadratic Methods. Prentice-Hall, Englewood Cliffs, NJ, USA, 1990. K.J. Åström. The future of control. Modeling, Identification and Control, 15(3): 127–134, 1994. D.S. Bernstein. On bridging the theory/practise gap. IEEE Control Systems Magazine, 19(6):64–70, 1999. F. Caccavale and P. Chiacchio. Identification of dynamic parameters and feedforward control for a conventional industrial manipulator. Control Eng. Practice, 2(6):1039–1050, 1994. A. De Luca. Feedforward/feedback laws for the control of flexible robots. In Proceedings of the 2000 IEEE International Conference on Robotics and Automation, pages 233–240, San Francisco, CA, April 2000. A. De Luca. Dynamic control of robots with joint elasticity. In Proceedings of the 1988 IEEE International Conference on Robotics and Automation, pages 152–158, Philadelphia, PA, 1988. A. De Luca and P. Lucibello. A general algorithm for dynamic feedback linearization of robots with elastic joints. In Proceedings of the 1998 IEEE International Conference on Robotics and Automation, pages 504–510, Leuven, Belgium, May 1998. A. Isidori. Nonlinear Control Systems. Springer-Verlag, London, Great Britain, 1995. ISO. ISO 9283:1998, manipulating industrial robots - performance criteria and related test methods. http://www.iso.org, 1998. K.P. Jankowski and H. Van Brussel. An approach to discrete inverse dynamics control of flexible-joint robots. IEEE Transactions on Robotics and Automation, 8(5):651–658, October 1992. T. R. Kane and D. A. Levinson. Dynamics: Theory and Applications. McGrawHill Publishing Company, 1985. M. Lesser. The Analysis of Complex Nonlinear Mechanical Systems: A Computer Algebra assisted approach. World Scientific Publishing Co Pte Ltd, Singapore, 2000.
248
Paper E
On Feedback Linearization for Tracking Control of Flexible Joint Robots
S. Moberg and S. Hanssen. On feedback linearization for robust tracking control of flexible joint robots. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. S. Nicosia and P. Tomei. On the feedback linearization of robots with elastic joints. In Proceedings of the 27nd Conference on Decision and Control, pages 180–185, Austin, Texas, December 1988. M.J. Van Nieuwstadt and R.M. Murray. Real-time trajectory generation for differentially flat systems. International Journal of Robust and Nonlinear Control, 8 (11):995–1020, 1998. D.B. Ridgely and M.B. McFarland. Tailoring theory to practise in tactical missile control. IEEE Control Systems Magazine, 19(6):49–55, 1999. P. Rouchon, M. Fliess, J. Lévine, and P. Martin. Flatness, motion planning and trailer systems. In Proceedings of the 32nd Conference on Decision and Control, pages 2700–2705, San Antonio, Texas, December 1993. V. Santibanez and R. Kelly. PD control with feedforward compensation for robot manipulators: analysis and experimentation. Robotica, 19:11–19, 2001. L. Sciavicco and B. Siciliano. Modeling and Control of Robotic Manipulators. Springer, London, Great Britain, 2000. J.-J. Slotine and W. Li. Applied Nonlinear Control. Prentice Hall, Englewood Cliffs, New Jersey, USA, 1991. M. Spong, S. Hutchinson, and M. Vidyasagar. Robot Modeling and Control. Wiley, 2006. M. W. Spong. Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109:310–319, December 1987. M. Thümmel, M. Otter, and J. Bals. Control of robots with elastic joints based on automatic generation of inverse dynamic models. In Proceedings of the 2001 IEEE/RSJ International Conference in Intelligent Robots and Systems, pages 925–930, Maui, Hawaii, USA, October 2001. E. Wernholt and S. Moberg. Frequency-domain gray-box identification of industrial robots. In 17th IFAC World Congress, pages 15372–15380, Seoul, Korea, July 2008.
Paper F A Benchmark Problem for Robust Feedback Control of a Flexible Manipulator
Authors:
Stig Moberg , Jonas Öhr, and Svante Gunnarsson
Edited version of the paper: S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. IEEE Transactions on Control Systems Technology, 17(6):1398–1405, November 2009.
A Benchmark Problem for Robust Feedback Control of a Flexible Manipulator Stig Moberg∗ ,† , Jonas Öhr∗∗ , and Svante Gunnarsson∗ ∗∗ ABB
∗ Dept.
AB, Crane Systems, SE-721 59 Västerås, Sweden
[email protected]
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden {stig,svante}@isy.liu.se † ABB
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected]
Abstract A benchmark problem for robust feedback control of a flexible manipulator is presented. The system to be controlled is a four-mass system subject to input saturation, nonlinear gear elasticity, model uncertainties, and load disturbances affecting both the motor and the arm. The system should be controlled by a discrete-time controller that optimizes performance for given robustness requirements. Four suggested solutions are presented, and even though the solutions are based on different design methods, they give comparable results.
1
Introduction
Experiments are essential in control technology research. A method that has been developed by means of realistic experiments has a larger potential to work in reality compared to methods that have not. Benchmark problems, often given in the form of mathematical equations embodied as software simulators together with performance specifications, can serve as substitute for real control experiments. A benchmark problem should be sufficiently realistic and complete but also avoid unmotivated complexity. This paper presents an industrial benchmark problem with the intention to stimulate research in the area of robust control of flexible industrial manipulators (robots). Some proposed solutions to this benchmark problem will also be presented and discussed. The authors hope that the degree of authenticity is just right and that researchers will take on the problem and eventually propose solutions and methods. An example of a similar (at least in some parts) benchmark problem is the flexible transmission system presented 251
252
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
Figure 1: IRB6600ID from ABB equipped with a spot welding gun. by Landau et al. (1995). Another benchmark problem for controller design is Graebe (1994) where the true system was supplied in the form of scrambled simulation code. However, in the area of robot manipulator control, it is believed that a realistic and relevant industrial benchmark problem is needed for reasons stated earlier. This paper is organized as follows. Section 2 presents the original control problem, and in Section 3, the benchmark problem is presented. An experimental model validation is presented in Section 4. The control design task is described in Section 5, and some suggested solutions are presented in Section 6.
2
Original Control Problem
The most common type of industrial manipulator has six serially mounted links, all controlled by electrical motors via gears. An example of a serial industrial manipulator is shown in Figure 1. The dynamics of the manipulator change rapidly as the robot links move fast within its working range, and the dynamic couplings between the links are strong. Moreover, the structure is elastic, and the gears have nonlinearities such as nonlinear elasticity, friction, and backlash. From a control engineering perspective, a manipulator can be described as a nonlinear multivariable dynamical system having six motor currents as inputs and six measurable motor angles as outputs. The goal of motion control is to control the orientation and the position of the tool when moving the tool along a certain desired path.
3
The Benchmark Control Problem
The aim is to formulate a benchmark problem that is sufficiently realistic and complete but not too complex. In order to fulfill this aim, some assumptions have been made in the formulation of the problem. The most important assumptions are the following.
3
The Benchmark Control Problem
253
Figure 2: Schematic description of the benchmark model.
1. The benchmark problem concerns only the so-called regulator problem, where a feedback controller should be designed such that the actual tool position is close to the desired reference, in the presence of motor torque disturbances and disturbances acting on the tool. 2. Only the first axis of a horizontally mounted manipulator will be considered here. The remaining axes are positioned in a fixed configuration such that the influence of the nonlinear rigid body dynamics associated with the change of configuration (operating point), as well as gravity, centripetal, and Coriolis torques, can be neglected. Moreover, the remaining axes are positioned to minimize the couplings to the first axis. In this way, the control problem concerning the first axis can be approximated as a singleinput-single-output (SISO) control problem. A corresponding multivariable benchmark problem has been formulated and is presented in Moberg et al. (2008). 3. The dynamics of the first axis of the robot, including both the actuator and the arm structure, will be modeled as a four-mass model according to Figure 2, where the moment of inertia of the arm is split up into the three components Ja1 , Ja2 and Ja3 , and the moment of inertia of the motor is Jm . The assumption that a four-mass model is adequate will be justified in Section 4. The variables qa1 , qa2 , and qa3 are angles of the three masses, and together, they define the position of the tool. The angles in this model are, however, expressed on the high-speed side of the gear, so to get the real arm angles, one must divide the model angles by the gear ratio. The manipulator dynamics can hence be described by the set of equations Jm q¨m = um + w − fm q˙ m − τgear − d1 (q˙ m − q˙ a1 ),
(1)
Ja1 q¨a1 = −fa1 q˙ a1 + τgear + d1 (q˙ m − q˙ a1 ) − k2 (qa1 − qa2 ) − d2 (q˙ a1 − q˙ a2 ), Ja2 q¨a2 = −fa2 q˙ q2 + k2 (qa1 − qa2 ) + d2 (q˙ a1 − q˙ a2 )
(2)
− k3 (qa2 − qa3 ) − d3 (q˙ a2 − q˙ a3 ), Ja3 q¨a3 = v − fa3 q˙ a3
(3)
+ k3 (qa2 − qa3 ) + d3 (q˙ a2 − q˙ a3 ),
(4)
254
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
Torque [Nm]
5
0
−5 −0.08
−0.06
−0.04
−0.02
0
0.02
0.04
0.06
0.08
Delta Position [rad]
Figure 3: Description of the nonlinear elasticity of the first spring, i.e., between Jm and Ja1 . See Figure 2. The spring torque τgear is a nonlinear function of the deflection qm − qa1 . where the spring torque τgear is a nonlinear function of the deflection qm − qa1 . 4. The tool position z, which is the controlled variable, can, for small variations around a given working point, be calculated as (l1 qa1 + l2 qa2 + l3 qa3 ) (5) r where r is the gear-ratio and l1 , l2 , and l3 are distances between the (fictive) masses and the tool. z=
5. The motor current and torque control is assumed to be ideal so that the motor torque becomes the model input um . This assumption is known to be reasonable for a modern industrial robot controller. The motor torque is limited to ±20 Nm, and the torque is applied to the manipulator via a zero-order sample-and-hold circuit. 6. The rotating masses are connected via spring-damper pairs. The first springdamper pair, corresponding to the gear, has linear damping d1 but nonlinear elasticity represented by τgear . A typical relationship between deflection and torque is shown in Figure 3. In the simulation model, the nonlinear gear elasticity is approximated by a piecewise linear function having five segments. The second and third spring-damper pairs are both assumed to be linear and represented by d2 , k2 , d3 , and k3 . Note that these springdamper pairs represent the elasticities of the links and bearings and not of the actuated joint. 7. The parameters fm , fa1 , fa2 , and fa3 represent viscous frictions in the motor and the arm structure, respectively. The gearbox and motor friction effects are assumed here to be approximately linear. In reality, the friction normally exhibits nonlinear behavior, but, as illustrated in the model validation, the model gives a realistic description of the real system, even though the friction is assumed to be linear. In the multivariable benchmark prob-
4
255
Model Validation
Parameter Jm Ja2 k1,high k1,pos k3 d2 fm fa2 r l2 Td
Table 1: Nominal parameter values Value Unit Parameter Value 5 · 10−3 kg · m2 Ja1 2 · 10−3 2 0.02 kg · m Ja3 0.02 100 N m/rad k1,low 16.7 0.064 rad k2 110 80 N m/rad d1 0.08 0.06 N m · s/rad d3 0.08 6 · 10−3 N m · s/rad fa1 1 · 10−3 −3 1 · 10 N m · s/rad fa3 1 · 10−3 220 l1 20 600 mm l3 1530 0.5 · 10−3 s
Unit kg · m2 kg · m2 N m/rad N m/rad N m · s/rad N m · s/rad N m · s/rad N m · s/rad mm mm
lem presented in Moberg et al. (2008), a more complex nonlinear friction model is included. 8. The disturbance torques acting on the motor and tool are denoted by w and v, respectively. The properties of the disturbances will be further discussed in Section 5.1. 9. The measured variable y is the sampled motor angle qm , and this is the only signal available for the feedback controller (see also Figure 7). The measured variable is affected by measurement noise n and one sample time delay. The discrete-time measured signal is hence given by y(kT ) = qm (kT − T ) + n(kT ),
(6)
where T denotes the sampling interval. The properties of the measurement disturbance and the time delay are discussed in Sections 5.1 and 5.5, respectively. The benchmark problem in this paper does not include the discretization effects in the A/D and D/A conversions, but these effects are included in the MIMO benchmark problem presented in Moberg et al. (2008). The parameter values of the nominal model, which will be denoted by Mnom , are defined in Table 1. For the piecewise linear spring elasticity, only the first segment, k1,low , the last segment, k1,high , and the position difference where the last segment begins, k1,pos , are given.
4
Model Validation
The benchmark model described in Section 3 is based on some simplifying assumptions. In order to illustrate that it still is a realistic and relevant model for the purpose here, some validation experiments will be presented.
256
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
50
Magnitude [dB]
40
30
20
10
0 1
10
Frequency [Hz]
Figure 4: Frequency response function (FRF), from motor torque to motor acceleration, of the (solid) linear model and the (dashed) real robot.
4.1
Frequency Response Estimation And Parameter Tuning
The model has been validated using measurements from the first axis of a robot from the ABB IRB6600 series (see Figure 1) using an experimental controller. More details of the procedure are given in Öhr et al. (2006). The validation procedure consists of three main steps. In the first step, a suitable model structure is selected, and here, the model structure is of gray box type, where some of the parameters were known in advance, e.g., motor inertia, total axis inertia, and nonlinear gearbox elasticity. In the second step, the FRF of the real robot was estimated using experimental data. The frequency response estimate was obtained by applying a multisine reference to a speed controller of PI type for the first axis and measuring the motor position and motor torque. The excitation energy was distributed from 3 to 30 Hz. The FRF was then computed. See, for example, the computation of ETFE in Ljung (1999). In the third step, the remaining unknown parameters were identified by fitting the measured frequency response of the first robot axis to the frequency response of a linearized version of the model presented in Section 3 while adjusting the parameters. Examples of parameters identified in this step are the dampers, the remaining springs, and the distribution of link inertia. Finally, the distribution of the axis length parameters was adjusted to yield a similar time-domain response for the tool position when step disturbances were applied to the system during closed-loop control. The resulting parameters of the validation model are close to the parameters of the benchmark model in Table 1. The positions of the second and third robot links were chosen to place the tool in the middle of the working area, and the positions of the last three axes were chosen to minimize the coupling with the first axis. The FRFs of the real robot and the linear model are shown in Figure 4, and it can be seen that the agreement is good.
4
257
Model Validation
1.5
Y Position [mm]
1
0.5
0
−0.5
−1
−1.5 0.5
1
1.5
2
2.5
Time [s]
Figure 5: Tool position for a tool step disturbance. (Solid) Nonlinear benchmark model and (dashed) real robot.
4.2
Disturbance Tests
The benchmark model was also validated by comparing the outputs from the model with experimental data from the real robot in the presence of disturbances. In the experiments, the first axis of the robot was controlled by using a reasonably tuned PID controller of the same type as the default controller in this benchmark problem. All links were controlled with similar controllers. Torque disturbances were applied, and the tool position was measured using a Leica laser measurement system LTD600 from Leica Geosystems. In the simulation, the benchmark model was simulated in closed loop with the same controller and disturbance input as in the real robot system. Figure 5 shows the tool positions of the benchmark model and the real robot when a tool load is instantaneously released. The small difference between the two output signals is probably due to phenomena such as nonlinear damping and friction. The tool position response to a step in motor torque is shown in Figure 6. Note that some backlash is seen for the real robot.
4.3
Stability Tests
Finally, the gain margins of the feedback control systems were investigated for both the real control system and the simulated control system. The gain of the controller in the real control system was increased until the stability limit was reached and the amplitude margin could be determined. A similar experiment was carried out using the simulated control system, and the amplitude margin of the simulated system was in good correspondence with that of the real system. The conclusion of this, and the previous experiments, is that the suggested model structure is valid for its use in this benchmark problem.
258
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
2.5
Y Position [mm]
2
1.5
1
0.5
0 0.5
1
1.5
2
2.5
3
Time [s]
Figure 6: Tool position for a motor step disturbance. (Solid) Nonlinear benchmark model and (dashed) real robot. w,v,n u
z
Robot
y
Regulator
Figure 7: Control system.
5
The Control Design Task
The control problem can schematically be described as in Figure 7, and the task is to reject the influence of load disturbances as much as possible, and at the same time avoid too large input signal, and be able to handle variations in the system dynamics.
5.1
Load And Measurement Disturbances
In reality, an industrial robot is affected by various disturbances. One disturbance source is the electrical motor itself which generates torque ripple. In this paper, the ripple is modeled as a load disturbance w acting on the motor, which means the first mass in the model. Other disturbances that can be modeled as input disturbances on the motor are torque disturbances generated in the gear transmission and possibly also in the torque and current control of the system. Another disturbance source is the external forces that affect the tool during, for
5
259
The Control Design Task
Torque [Nm]
10 5 0 −5
0
5
10
15
20
25
30
35
40
45
50
Time [s]
Figure 8: Torque disturbances on (dashed) motor and (solid) tool. example, material processing, the release of a load, or forces due to impact in various types of spot welding. These types of disturbance are modeled as a load disturbance v affecting the last mass in the model. In order to capture the various types of disturbances, a specially designed sequence of disturbances will be used. It consists of torque disturbances acting on the motor and on the tool according to Figure 8, and it is a combination of steps, pulses, and sweeping sinusoids (chirps). These disturbances are meant to be generalizations of various real-application-dependent disturbances in order to achieve a general-purpose tuning. Finally, the measurement disturbance n is modeled as a band-limited random noise. Figure 9 shows the tool position when the disturbance sequence in Figure 8 acts on the nominal system and a PID-type controller is used. Figure 10 shows the input signal (motor torque) under the same conditions, and here, the influence of the measurement disturbance is also evident. The various notations in Figures 9 and 10 will be used in Section 5.4, where a performance measure is formulated.
5.2
Parameter Variations And Model Sets
The performance of the control systems will be evaluated for both the nominal model Mnom , presented in Section 3, and for two sets of models which will be denoted by M1 and M2 , respectively. Figure 11 shows the amplitude curve, from torque to angular acceleration, of the FRF of a linearization of the nominal model Mnom . The solid line and dashed lines correspond to the cases when the model is linearized in the stiffest and least stiff region of τgear , respectively. The sets M1 and M2 contain ten models each. The set M1 represents relatively small variations of the physical parameters, and the set M2 represents relatively large variations. Figures 12 and 13 show the absolute value of the FRFs of the models m ∈ M1 and m ∈ M2 , respectively, when they are linearized in the stiffest region of τgear . Note, however, that, in the simulation model, M1 and M2 also are subject to the nonlinear gear elasticity τgear . The uncertainty described by M1 can be motivated by at least five sources of uncertainty, as described in the following. 1. Model structure selection: The real robot is of infinite order, and the choice of model order always introduces errors. Nonmodeled or incompletely modeled nonlinearities such as friction and stiffness are other examples.
260
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
6
e1 4
Tool position [mm]
e2
e5
2
e3 e4
e6
0
e7 e8
−2
−4
T1s −6
0
T3s
T2s 5
10
15
20
25
30
T4s 35
40
45
50
Time [s]
Figure 9: Tool position when using PID-control. The parameters e1 , . . . , e8 denote the peak-to-peak errors, and Ts1 , . . . , TS4 denote the settling times used to form the performance measure in Section 5.4.
5
TNOISE
Torque [Nm]
0
−5
TMAX −10
0
10
20
30
40
50
Time [s]
Figure 10: Motor torque when using PID control.
261
The Control Design Task
Magnitude [dB]
80 60 40 20 0 −20 0 10
1
10
2
10
Frequency [Hz]
Figure 11: FRF of a linearization of Mnom . (Solid) Stiff region. (Dashed) Least stiff region.
Magnitude [dB]
80 60 40 20 0 −20 0 10
1
10
2
10
Frequency [Hz]
Figure 12: FRFs of linearization of the models in the set M1 .
80
Magnitude [dB]
5
60 40 20 0 −20 0 10
1
10
2
10
Frequency [Hz]
Figure 13: FRFs of linarizations of the models in the set M2 .
262
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
2. Accuracy of nominal model parameters: Model parameters can be obtained by identification or by other types of measurements, and their values always have limited accuracy. 3. Variation of model parameters for individual robots: Friction and stiffness are examples of parameters that can differ significantly from one robot individual to another. Parameters depending on temperature and aging also belong to this group. 4. Robot installation: The stiffness of the foundation where the robot is mounted and the user definition of tool and payload, for example, mass and center of mass, introduces uncertainty of this type. Elasticity in the tool or payload increases the uncertainty further. 5. Controller implementation In a real implementation, the controller would probably be time varying by, for example, gain scheduling. Errors due to gain scheduling of controllers for different operating points also add to the total uncertainty. The uncertainty described by M2 can be motivated by the fact that a real control system must be stable even for relatively large deviations between the model and the real manipulator dynamics. It is important to understand that the uncertainty is partly a design choice and depends of the actual implementation of the robot control system. One extreme is that the feedback controller has constant parameters for all configurations and all loads, and the other is that an extremely accurate model of the robot is implemented in the robot control system. This model can then be used for gain scheduling or directly used in the feedback controller. The first extreme would have a considerably larger model set M1 and the second extreme would have a smaller set.
5.3
The Design Task
The task of this benchmark problem is to minimize a performance measure by designing one or two discrete-time controllers for the systems described previously. The performance measure is described in Section 5.4, and the general requirements and some implementation constraints are described in Section 5.5. One of the controllers must be capable of controlling all the models m ∈ Mnom ∪ M1 ∪ M2 whereas the other controller should be able to control Mnom alone. The controllers can be linear or nonlinear. In order to investigate how well a controller can perform when really good models are available, it is recommended to design two different controllers, where one is optimized for the control of Mnom only. This controller will, in the sequel, be denoted by C1 , and the other will be denoted by C2 . Note that C1 and C2 can be identical, can have the same structure, and differ only by different tuning or can have completely different structure and tuning parameters. The control requirements put on the systems in M1 can be motivated by the fact that robust performance is required for this level of uncertainty. The use of the model set M2 is motivated by robust stability, as described above in the previous section.
5
263
The Control Design Task
5.4
Performance Measures
From an industrial viewpoint, time-domain performance measures are preferred when evaluating the control system. It is then a task for the control designer to translate these requirements to a form that suits the design method chosen, like, for example, frequency domain norms for H∞ design. Figures 9 and 10 show all the individual performance measures that will be weighted together into one cost function. The measures referring to the controlled output variable, i.e., tool position, are as follows: 1. peak-to-peak error (e1 , . . . , e8 ); 2. settling times (TS1 , . . . , TS4 ). Moreover, the measures related to the input signal, i.e., torque, are as follows: 1. maximum value TMAX ; 2. adjusted rms value TRMS ; 3. torque "noise" (peak-to-peak) TN OI SE . Note that TN OI SE , which can be caused by measurement noise and/or chattering caused by a discontinuous controller, is measured by the simulation routines when the system is at rest but that a good controller would keep the chattering/noise on a decent level also when it operates actively. For the nominal system Mnom , using controller C1 , a cost function Vnom is defined as Vnom =
15 X
αi ei .
(7)
i=1
Here, e1 , . . . , e8 are the position errors defined in Figure 9, e9 , . . . , e12 are the settling times TS1 , . . . , TS4 , e13 = TMAX , e14 = TRMS , and e15 = TN OI SE . See also Figure 10. The parameters αi are weights used to stress the relative importance of the different error components. The values of αi are determined based on industrial experience, and the numerical values used in the benchmark are given in Table 2. For the set M1 , using controller C2 , the maximum errors from the simulations are used, and the cost functions V1 is given by V1 =
15 X i=1
αi max (ei ). m∈M1
(8)
Finally, for the set M2 , using controller C2 , the maximum errors from the simulations are used, and the cost functions V2 is hence defined as V2 =
15 X i=1
αi max (ei ). m∈M2
(9)
264
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
Figure 14: The Simulink model. In order to include both the nominal performance and robustness, a total cost function V is defined as V = βnom Vnom + β1 V1 + β2 V2 ,
(10)
where the weight βnom and βi are chosen based on industrial experience in order to obtain a tradeoff between performance and robustness. The numerical values used are given in Table 3. It is unavoidable that this type of performance measures will be subjective, but they have been found to be relevant for a general purpose robot from an application viewpoint.
5.5
Implementation and Specifications
To evaluate a proposed control design, a set of files has been developed. A control system in the form of a Simulink model has been developed, and it is shown in Figure 14. In the implementation, the following conditions hold: 1. sampling time of 0.5 ms and time delay Td of 0.5 ms; 2. torque saturation limits of ±20 Nm (the saturation in the controller block should not be removed). The control task is formulated as minimizing the overall cost function V in (10) subject to the following conditions: 1. settling times for Mnom (C1 ) and M1 (C2 ): T s1,2,3,4 < 3 s and error band ±0.1 mm; 2. settling times for M2 (C2 ): T s1,2,3,4 < 4 s and error band ±0.3 mm 3. torque noise TN OI SE < 5 Nm for all systems; 4. stability1 for all systems; 1 The stability requirement also includes that limit cycles larger than 10 µm peak-to-peak are not allowed.
6
Suggested Solutions
265
5. stability for Mnom when increasing the loop gain by a factor 2.5 for C1 and C2 ; 6. stability for Mnom when increasing the delay Td from 0.5 ms to 2 ms for C1 and C2 . In addition, some conditions, as listed in the following, concerning the implementation have to be considered: 1. Only the controller blocks and the corresponding m-files are allowed to be changed. 2. No continuous-time blocks are allowed be added. 3. No knowledge of deterministic nature about the noise and disturbances is allowed to be used in the controller. 4. The controller C2 must have the same initial states and parameter values for all the simulations of m ∈ Mnom ∪ M1 ∪ M2 . The control system and the models are described in detail by the files available for download in Moberg (2004). The system comes with a simple PID controller. The Matlab products used are described in, e.g., MathWorks (2003).
6
Suggested Solutions
This benchmark problem was initially presented as the "Swedish Open Championship in Robot Control" and later published in Moberg and Öhr (2005). On request, the benchmark problem was spread outside Sweden. The four most interesting solutions were as follows: A) a QFT controller proposed by P.-O. Gutman, Technion–Israel Institute of Technology, Israel; B) a QFT controller of order 13 proposed by O. Roberto, Uppsala University, Uppsala, Sweden; C) a polynomial controller proposed by F. Sikström and A.-K. Christiansson, University West, Sweden; D) a so-called linear sliding mode controller proposed by W.-H. Zhu, Canadian Space Agency, Saint-Hubert, QC, Canada. The participants were only asked to deliver the controllers, and no documentation was required. The main point here is not the details of the particular design methods but the resulting performance and properties of the suggested solution. For solutions A), C), and D), the orders of the controllers are between 3 and 7. The QFT approach and the linear sliding-mode approach are generally described in Nordin and Gutman (1995) and Zhu et al. (1992), respectively. The polynomial controller is optimized for the given cost function, and the optimization procedures used are described in MathWorks (1999). The frequency responses
266
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
A B C D
Magnitude [dB]
70 60 50 40 30 −1
0
10
10
1
10
2
10
3
10
Frequency [Hz]
Figure 15: Absolute value of the frequency response of the controllers C2 . 150
Phase [deg]
100
A B
50
C D
0 −50 −100 −1 10
0
10
1
10
2
10
3
10
Frequency [Hz]
Figure 16: Argument of the frequency response of the controllers C2 . of the controllers are shown in Figures 15 and 16, and the cost function V1 and the generalized errors for model set M1 are shown in Table 2. Table 3 shows a summary of the results. The final performance measure, defined by (10), contains weights which allow some freedom in the interpretation of the results. The weights used for computing the performance measure in Table 3 were selected in order to reflect good performance with respect to the original industrial problem. The overall shape of the frequency functions of all solutions are similar with a clear lead-lag (PID) character. Solution A differs due to the peak in the magnitude curve around 10 Hz and the essentially higher high-frequency (above 100 Hz) gain. Tables 2 and 3 show that no solution is, in general, better than all other solutions. Some differences can be noted, and for example, solution A gives better performance measured via several of quantities e1 –e8 but higher values for the other measures. The high frequency gain of solution A is also reflected in the relatively high value of TN OI SE . The design is clearly a tradeoff between high loop gain to minimize the max error for disturbances on the measured object (the
6
Suggested Solutions
Solution e1 [mm] e2 [mm] e3 [mm] e4 [mm] e5 [mm] e6 [mm] e7 [mm] e8 [mm] T s1 [s] T s2 [s] T s3 [s] T s4 [s] TN OI SE [Nm] TMAX [Nm] TRMS [Nm] V1
Solution Vnom V1 V2 V
Table 2: Numerical result for model set M1 A B C D αi 8.22 8.57 9.75 9.11 0.7 2.56 2.43 3.41 3.22 1.4 5.39 5.56 5.34 5.28 1.4 1.58 1.74 2.12 1.77 2.8 7.78 8.22 9.37 8.64 0.7 2.82 2.82 4.02 3.68 1.4 4.88 5.13 4.20 4.59 1.4 1.40 1.56 1.90 1.57 2.8 2.04 2.13 1.79 1.68 2.8 1.25 1.47 1.52 1.05 2.8 1.04 0.77 0.71 0.77 2.8 0.95 0.55 0.69 0.71 2.8 2.67 1.05 1.85 1.66 1.4 12.1 12.0 11.0 11.3 1.4 1.53 1.52 1.43 1.46 3.5 82.5 80.8 84.8 80.5
A 64.6 82.5 82.6 146.0
Table 3: Summary of total result B C D β 58.8 64.8 62.0 0.6 80.8 84.8 80.5 1.0 84.2 84.1 81.6 0.3 141.4 148.9 142.2
267
268
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
Magnitude [dB]
60
50
40
PID Controller D
30 −1
10
0
10
1
10
2
10
3
10
Phase [deg]
Frequency [Hz] 50
0 PID Controller D
−50 −1
10
0
10
1
10
2
10
3
10
Frequency [Hz]
Figure 17: Frequency response of the original controller D and its PID realization.
motor) and a lower loop gain to increase the damping of the lowest mechanical resonance. Although a high loop gain can minimize the maximum error for a tool pulse disturbance, the settling times and the tool chirp disturbance errors are increased by a high-gain design. This can be seen if solutions A and B (which have the highest gains in the important frequency interval of 1–10 Hz) are compared to solutions C and D. The differences in integral gain (affects gain for frequencies lower than 1 Hz) are harder to interpret. One possible interpretation is that high integral gain does not improve the result significantly since the settling time is more dependent on the residual mechanical resonance vibrations. Solution B has the lowest noise sensitivity, as expected from the high frequency gain.
Inspection of the frequency response of controller D suggests a realization by a PID controller with derivative filter, which means the same structure as the default controller of the benchmark problem. In Figure 17, the frequency response of a manually tuned PID controller is compared with controller D. The performance of the PID controller is 143.4. One interesting observation is that this PID controller has complex zeros and must thus be realized as a parallel PID controller (noninteracting). See, for example, Åström and Hägglund (2006). It seems hard to improve the performance further and to reach a performance index below 140 by using motor position feedback only. One possibility is to use additional or improved sensors on the motor side, such as speed sensors or position sensors with decreased measurement noise. Another possibility is to use additional sensors on the arm side measuring acceleration or position sensors for the arm or the tool. In Nordström (2006), a performance index of 105 was reached by using tool acceleration feedback.
7
7
Conclusions
269
Conclusions
A benchmark problem for robust control has been presented with the purpose of formulating a problem that is industrially relevant in terms of both the system description and the performance requirements. The problem has been based on a model of a four-mass system subject to input saturation, nonlinear gear elasticity, model uncertainties, and load disturbances affecting both the motor and the arm. The experiments have shown that the model provides a realistic description of a real industrial manipulator. Four proposed solutions, using different design methods, have been presented. Although the solutions use different approaches, the resulting performance from all four solutions end up on approximately the same level. All solutions have a clear PID (lead-lag) character. It is also shown that a good value of the performance measure (comparable to the suggested solutions) can be achieved by a PID controller.
8
Acknowledgments
The authors would like to thank T. Brogårdh, S. Elfving, S. Hanssen, and A. Isaksson for the valuable support. The authors would also like to thank those who have contributed to the solutions of the benchmark problem. This work was supported by the Swedish Research Council (VR).
270
Paper F
A Benchmark Problem for Robust Control of a Flexible Manipulator
Bibliography K.J. Åström and T. Hägglund. Advanced PID Control. ISA - The Instrumentation, Systems and Automation Society, Research Triangle Park, NC, USA, 2006. ISBN 1-55617-942-1. S.F. Graebe. Robust and adaptive control of an unknown plant: A benchmark of new format. Automatica, 30(4):567–575, 1994. I.D. Landau, D. Ray, A. Karimi, A. Voda, and A. Franco. A flexible transmission system as a benchmark for robust digital control. European Journal of Control, 1(2):77–96, 1995. L. Ljung. System Identification: Theory for the User. Prentice Hall, Upper Saddle River, New Jersey, USA, 2nd edition, 1999. MathWorks. MATLAB and Simulink Users Guide. The MathWorks Inc., Natic, Massachusetts, USA, 2003. MathWorks. MATLAB Optimization Toolbox Users Guide. The MathWorks Inc., Natic, Mass., 1999. S. Moberg. Swedish open championships in robot control. robustcontrol.org, 2004.
www.
S. Moberg and J. Öhr. Robust control of a flexible manipulator arm: A benchmark problem. Prague, Czech Republic, 2005. 16th IFAC World Congress. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. IEEE Transactions on Control Systems Technology, 17(6):1398–1405, November 2009. M. Nordin and P.-O. Gutman. Digital QFT design for the benchmark problem. European Journal of Control, 1(2):97–103, 1995. A. Nordström. Identifiering och reglering av industrirobot med hjälp av accelerometer. Master thesis (in swedish), Linköping University, 2006. J. Öhr, S. Moberg, E. Wernholt, S. Hanssen, J. Pettersson, S. Persson, and S. SanderTavallaey. Identification of flexibility parameters of 6-axis industrial manipulator models. In Proc. ISMA2006 International Conference on Noise and Vibration Engineering, pages 3305–3314, Leuven, Belgium, September 2006. W.-H. Zhu, H.-T. Chen, and Z.-J. Zhang. A variable structure robot control algorithm with an observer. IEEE Transactions on Robotics and Automation, 8(4): 486–492, 1992.
Paper G A Benchmark Problem for Robust Control of a Multivariable Nonlinear Flexible Manipulator
Authors:
Stig Moberg , Jonas Öhr, and Svante Gunnarsson
Edited version of the paper: S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008.
A Benchmark Problem for Robust Control of a Multivariable Nonlinear Flexible Manipulator Stig Moberg∗ ,† , Jonas Öhr∗∗ , and Svante Gunnarsson∗ ∗∗ ABB
∗ Dept.
AB, Crane Systems, SE-721 59 Västerås, Sweden
[email protected]
of Electrical Engineering, Linköping University, SE–581 83 Linköping, Sweden {stig,svante}@isy.liu.se † ABB
AB, Robotics, SE-721 68 Västerås, Sweden
[email protected]
Abstract A benchmark problem for robust feedback control of a manipulator is presented. The system to be controlled is an uncertain nonlinear two link manipulator with elastic gear transmissions. The gear transmission is described by nonlinear friction and elasticity. The system is uncertain according to a parametric uncertainty description and due to uncertain disturbances affecting both the motors and the tool. The system should be controlled by a discrete-time controller that optimizes performance for given robustness requirements. The control problem concerns only disturbance rejection. The proposed model is validated by experiments on a real industrial manipulator.
1
Introduction
There exists a gap between control theory and control practise, i.e., many control methods suggested by researchers are seldom implemented in real systems and, on the other hand, many important industrial control problems are not studied in the academic research. This is recognized in, e.g., Åström (1994) where the need for a balance between theory and practise is expressed. From Bernstein (1999) we quote "I personally believe that the gap on the whole is large and warrants serious introspection by the research community". The same article also points out that the control practitioners must articulate their needs to the research community, and that motivating the researchers with problems from real applications "can 273
274 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator have a significant impact on increasing the relevance of academic research to engineering practise". This paper presents an industrial benchmark problem with the intention to stimulate research in the area of robust control of flexible industrial manipulators and thus bridging the gap between control theory and practice. The MIMO benchmark problem presented in this article is an extension of a similar SISO problem presented in Moberg and Öhr (2005). The SISO benchmark model is experimentally validated and further described together with an analysis of some suggested solutions in Moberg et al. (2007). In summary, the SISO problem can be solved with a PID controller and it is in fact hard to improve the performance further no matter which controller is used. This is quite a surprising result and now the investigation continues. The main difference of the new problem is that the realism is increased one step further, not only by making the problem multivariable, but also by adding some nonlinearities ignored in the previous benchmark. The paper is organized as follows. Section 2 presents the control problem, and Section 3 presents the nonlinear manipulator model. Section 4 describes the complete benchmark system, and the proposed model structure is validated by experiments on a real industrial manipulator in Section 5. Finally, the control design task is presented in Section 6.
2
Problem Description
The most common type of industrial manipulator has six serially mounted links, all controlled by electrical motors via gears. An example of a serial industrial manipulator is shown in Figure 1. The dynamics of the manipulator change rapidly when the robot links move fast within the manipulator workspace, and the dynamic couplings between the links are in general strong. Moreover, the structure is elastic and the gears have nonlinearities such as hysteresis, backlash, friction and nonlinear elasticity. From a control engineering perspective a manipulator can be described as a nonlinear multivariable dynamical system having the six motor currents as the inputs and the six motor angles as measurable outputs. The main objective of the motion control is, however, to control the orientation and the position of the tool when moving the tool along a certain desired path. The benchmark problem described in this paper concerns only the so-called regulator problem, where a feedback controller should be designed such that the tool position is close to the desired reference, in the presence of motor torque disturbances, e.g., motor torque ripple, and force disturbances acting on the tool, e.g., during material processing. Only the second and third links of the manipulator will be included in the benchmark model. These links are chosen in order to get a strong dynamic coupling. The model will include the nonlinear rigid body dynamics associated with the change of configuration (link positions) as well as gravity, centripetal and Coriolis torques. Moreover, the nonlinear elasticity and friction of the gear transmissions will be included in the model.
3
The Manipulator Model
275
Figure 1: IRB6600 from ABB equipped with a spot welding gun.
The rationale behind the different choices in the problem design is that a benchmark problem should be sufficiently realistic and complete to act as a substitute for real control experiments. However, the number of researchers who will have time and resources to take on the problem and propose solutions and methods, will certainly decrease with increased problem complexity. If reference tracking was included in the problem specification and/or if all links of an industrial manipulator were included in the model, both the realism and the complexity of the problem would increase. The suggested benchmark problem is hopefully a good trade-off.
3
The Manipulator Model
The two link manipulator is a model of link 2 and 3 for a typical large industrial robot, see Figure 1. The model is planar, i.e., all movements are constrained to the x,z plane. The model is illustrated in Figure 2. In the following, the links are denoted as link 1 and link 2. Each link has the following rigid body attributes: • mass m1 and m2 • link length l1 and l2 • center of mass ξ1 and ξ2 (distances from the centers of rotation) • inertia w.r.t. center of mass j1 and j2 The links are actuated by electrical motors, connected to the links via elastic joints. The joints (gear transmissions) are described by the nonlinear spring
276 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
Figure 2: A two link robot model.
˙ and the gear torque τs (q), the linear damping matrix D, the friction torque f (q), ratios (n1 and n2 ). The motors are described by their inertias jm1 and jm2 . There are two degrees of freedom (DOF) for each axis described by the motor angular positions qm1 , qm2 and link angular positions qa1 , qa2 . The control signals are the motor torques um1 and um2 , which are subject to saturation. The motor torque control is modeled as a gain uncertainty γ and a time delay Td1 . The only measured output signals are the motor angular positions, and these are subject to measurement noise and a time delay Td2 . This time delay is motivated by the computational and communication delay. Two sources of disturbance are acting on the system. A force F is applied at the tool center point (TCP) at angle φF and a motor torque disturbance is applied as input disturbance signals ud1 and ud2 . The angular positions and the model inputs are described by ua1 qa1 q ua2 a2 q = (1) , u = . qm1 /n1 (um1 + ud1 )n1 qm2 /n2 (um2 + ud2 )n2 The manipulator is described by its dynamics ˙ + G(q) + D q˙ + τs (q) + f (q). ˙ u = M(q)q¨ + C(q, q)
(2)
The inertial coupling between the motor and link rotation is neglected due to the high gear ratio, see, e.g., Spong (1987). The inertia matrix M, gravity vector G and vector of speed dependent torques (Coriolis and centripetal) C can then
3
277
The Manipulator Model
easily be derived as (see, e.g., Sciavicco and Siciliano (2000)) 0 0 J11 (q) J12 (q) J (q) J (q) 0 0 22 M(q) = 21 , 0 jm1 n21 0 0 0 0 0 jm2 n22 J11 (q) = j1 + m1 ξ12 + j2 + m2 (l12 + ξ22 − 2l1 ξ2 sin qa2 ), J12 (q) = J21 (q) = j2 + J22 (q) = j2 +
m2 (ξ22
− l1 ξ2 sin qa2 ),
m2 ξ22 ,
(3a)
(3b) (3c) (3d)
and h G(q) = g1 (q)
g2 (q)
0
iT 0 ,
(4a)
g1 (q) = −g(m1 ξ1 sin(qa1 )+ m2 (l1 sin(qa1 ) + ξ2 cos(qa1 + qa2 ))),
(4b)
g2 (q) = −m2 ξ2 g cos(qa1 + qa2 ), 2 −m2 l1 ξ2 cos(qa2 )(2q˙ a1 q˙ a2 + q˙ a2 ) 2 m2 l1 ξ2 cos(qa2 )q˙ a1 ˙ = C(q, q) , 0 0
(4c) (4d)
where g is the gravitational constant. The nonlinear spring torque is given by τs1 (∆q1 ) τ (∆ ) τs (q) = s2 q2 , (5a) τs1 (−∆q1 ) τs2 (−∆q2 ) ∆qi = qai − qmi /ni ,
i = 1 . . . 2.
(5b)
with τsi = ki1 ∆qi + ki3 ∆3qi , |∆qi | ≤ ψi ,
(6a)
τsi = sign(∆qi )(mi0 + mi1 (|∆qi | − ψi )), |∆qi | > ψi ,
(6b)
ki1 = kilow ,
(6c)
ki3 = mi0 = mi1 =
high (ki
− kilow )/(3ψi2 ), ki1 ψi + ki3 ψi3 , high ki .
(6d) (6e) (6f)
The nonlinear stiffness (elasticity) is then specified by the lowest stiffness kilow , high
the highest stiffness ki
, and the breakpoint deflection ψi , see Figure 3. The
278 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
Torque [Nm]
600 400
khigh
−ψ
i
200
i
0
klow i
−200
ψi
−400 −600 −2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Delta Position [arcmin]
Friction Torque [Nm]
Figure 3: Example of nonlinear stiffness (elasticity).
2
0
−2 −100
−50
0 50 Speed [rad/s]
100
˙ i ). Figure 4: Example of nonlinear friction torque (on motor side, i.e., fi (q)/n
linear damping matrix is d1 0 D = −d1 0
0 d2 0 −d2
−d1 0 d1 0
0 −d2 . 0 d2
(7)
The nonlinear friction torque, see Figure 4, is approximated as acting on the motor only and is given by the following equation h iT ˙ f2 (q) ˙ ˙ = 0 0 f1 (q) f (q) , (8) where ˙ = ni (fvi q˙ mi + fci (µki + (1 − µki ) · fi (q) cosh−1 (βi q˙ mi )) tanh(αi q˙ mi )),
i = 1 . . . 2. (9)
This smooth friction model is suggested in Feeny and Moon (1994) and avoids discontinuities to simplify numerical integration. The TCP position X is described
4
279
The Benchmark System
Figure 5: A block diagram of the benchmark system. by the kinematics # # " l1 sin(qa1 ) + l2 cos(qa1 + qa2 ) x(q) . = X = Γ (q) = l1 cos(qa1 ) − l2 sin(qa1 + qa2 ) z(q) "
(10)
The relation between the disturbance force F and joint torques ua is given by the velocity Jacobian J(qa ) as # " " # F cos(φF ) u , (11) ua = J T (qa )F, ua = a1 , F = F sin(φF ) ua2 J(qa ) =
4
h ∂Γ (q ) i a
∂qa
" =
l1 cos(qa1 ) − l2 sin(qa1 + qa2 ) −l1 sin(qa1 ) − l2 cos(qa1 + qa2 )
# −l2 sin(qa1 + qa2 ) . −l2 cos(qa1 + qa2 )
(12)
The Benchmark System
The benchmark system consists of the manipulator model P described in Section 3 and a feedback controller G as illustrated in Figure 5. The model uncertainty description is parametric and expressed as uncertainty in some of the physical parameters. The friction and stiffness uncertainties are motivated by modeling errors and differences between the gearbox individuals. The mass uncertainty is due to errors in the definition of the user loads attached to the manipulator and the gain error reflects to the accuracy of the torque control. The discrete-time controller G is implemented with sample time Ts , time delay max . The time delay includes both the delay Td and a control signal limitation um of the torque control and the computational and communication delay described in Section 3, i.e., Td = Td1 + Td2 . The DA and AD conversions are modeled by a 12 bit quantization of the output torque and a 16 bit quantization of the motor position. The system is influenced by the following uncertain disturbances: a measurement noise n with power Pn , a disturbance force F in direction φF applied at t1 and released at t2 and finally a motor torque disturbance ud applied from t3 to t4 . F can be applied in any direction and the torque disturbance ud is a chirp with ampli-
280 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator tude Ac , start frequency fcs and end frequency fce . The motor torque disturbance is motivated by internally generated ripple disturbances due to the design of the motors and the gear boxes. These disturbances have frequency components proportional to the motor speed and can cause significant position errors in some frequency regions. The force disturbance is motivated by various externally generated disturbances, e.g., the release of a load, forces due to material processing, or forces due to the impact at spot-welding. The force disturbance pulse serves as a generalization of all real application-specific disturbances. The manipulator model parameters are listed in Table 1, and the controller- and disturbance parameters, are listed in Table 2. The uncertainty descriptions are included in the Tables. The parameters with no axis index are the same for both axes although the uncertainty is independent for each parameter. The parameter values and the uncertainties are known (by experience) to be realistic, although the exact combination of parameters used do not correspond to a specific industrial robot. The benchmark system, available for download, has a discrete-time diagonal PID controller with derivative filter described by the transfer function # " g11 (z) 0 , (13) Gpid (z) = 0 g22 (z) where gii (z) = Kpi + Kdi
i z − 1 (1 − zp )z Kii Ts z . + Ts z z − zpi z−1
(14)
The PID controller should only be seen as an example of a controller yielding a stable system and does not represent an optimal design.
5
Model Validation
In this section the model proposed in Section 3 is validated by experiments made on the second and third links of an industrial robot from ABB, using an experimental controller. All model parameters, except the α parameters of the friction model (9) and the damping D in (7), were known with sufficient accuracy. The configuration of the wrist, i.e., axis 4 - 6, was chosen to minimize the coupling between the modeled links and the wrist. The robot links were controlled with a diagonal PID controller of the same type as the default controller of the benchmark system. In the first experiment a tool load was instantaneous released, i.e., a step disturbance force was applied. The tool response was measured using a laser measurement system LTD600 described in Leica (2007). The elasticity of the model was then tuned w.r.t. the transient response. The resulting elasticity was somewhat lower than the known elasticity of the gear boxes. This was expected since a modern industrial robot cannot be fully modeled by the so-called flexible joint approach, see, e.g., Moberg and Hanssen (2007). The damping was set to a reasonable value, in fact, the response of the controlled system is quite insensitive
5
281
Model Validation
Table 1: Manipulator Model Parameters. Parameter jm1 jm2 j1 j2 m1 m2 l1 l2 ξ1 ξ2 n k1low high k1 ψ1 k2low high k2 ψ2
d1 d2 fv1 fc1 fv2 fc2 µ β α g
Value 0.004 0.001 5 50 50 150 1.0 1.5 0.5 0.8 200 0.5 · 106
Unit kg · m2 kg · m2 kg · m2 kg · m2 kg kg m m m m
Uncertainty
N m/rad
±20 %
1.5 · 106
N m/rad arcmin N m/rad
±20 % ±20 % ±20 %
N m/rad arcmin N m · s/rad N m · s/rad N m · s/rad Nm N m · s/rad Nm
±20 % ±20 % ±20 % ±20 % ±80 % ±80 % ±80 % ±80 % ±50 % ±50 %
2 0.2 · 106 0.6 · 106 3 600 200 0.006 1.5 0.003 1.0 0.5 0.4 5 9.81
m/s2
±10 % ±10 %
282 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
Table 2: Controller- and Disturbance Parameters. Parameter γ Pn F φF t1 t2 Ac1 Ac2 t3 t4 fcs fce Ts Td max um1 max um2 Kp1 Ki1 Kd1 Kp2 Ki2 Kd2 zp
Value 1 3 · 10−12 500 π 10 10.5 1 −1 0.5 8 0 or 15 0 or 15 0.25 · 10−3 0.25 · 10−3 35 20 45 30 1.5 15 10 0.5 0.95
Unit
N rad s s Nm Nm s s Hz Hz s s Nm Nm
Uncertainty ±10 %
±π
±0.5 s random choice random choice
283
The Design Task: Performance Specification and Cost Function
Total Position Error [mm]
6
2 Simulation Model Real Robot
1.5 1 0.5 0
4
4.5
5 Time [s]
5.5
6
Figure 6: The tool position error for a tool step force disturbance.
to the damping. The remaining unknown model parameter, α, was tuned w.r.t. the measured response. Note that the factor tanh(α q˙ m ) in (9) approximates the discontinuous friction behavior at zero speed and cannot be directly measured. The result is shown in Figure 6. The experiment was repeated for a number of controller tunings with good correspondence between simulation model and real robot. In the second experiment, a chirp torque disturbance ud was added to the control signal while the manipulator was moving at a low speed. This is motivated by the fact that internally generated torque disturbances are present only when the robot is moving and that the nonlinear friction at zero speed otherwise would reduce the effect of the disturbance, e.g., no movement would be generated if the disturbance level was below the Coulomb friction level. Moving the manipulator at a low speed thus linearizes the system w.r.t. friction and the robot response can thus be compared with the model response when the nonlinear friction, fc , is set to zero. This comparison is shown in Figure 7 and the correspondence is good. In the benchmark problem, the chirp disturbance is applied at zero speed. This choice was made to avoid introduction of a reference signal and is justified by the fact that the relative disturbance rejection at zero speed also reflects the disturbance rejection when moving. The third validation experiment concerned the stability margin of the model. The loop gain of the robot system was increased for one channel at a time until the stability limit was reached. The experimentally determined amplitude margin was in good agreement with the one of the simulated system.
6
The Design Task: Performance Specification and Cost Function
Design a discrete-time controller to control the manipulator in the entire manipulator workspace defined by qa1 ∈ [−90◦ . . . 180◦ ] and qa2 ∈ [−180◦ . . . 80◦ ]. The
Total Position Error [mm]
284 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
0.6 0.4 0.2 0
5
6
7
8 9 Time [s]
10
11
12
Figure 7: The tool position error for a motor torque disturbance of chirp type. controller can be of any kind, e.g., linear or non-linear, diagonal or full-matrix, time-invariant or gain scheduled. The controller inputs are the measured motor positions and constant motor position references. The motor position references ref qm and the initial gravity torques may be used for initializing the controller. The motor position given as reference represents a steady-state solution at the desired link position, i.e., the differences between the motor and link initial state is equal to the gravity deflection. The designed controller should replace the default PID controller, but the system described in Section 4 must otherwise be unchanged. For all configurations inside the workspace, for all systems and disturbances in the uncertainty description, the following requirements concerning stability must be fulfilled: • A1 : The system must remain stable for a loop gain increase of a factor of 2.5 (one channel at a time). • A2 : The system must remain stable for a delay increase of 1.5 ms (one channel at a time). • A3 : Maximum limit cycle peak amplitude in TCP position must be lower than 10 µm for all test cases including the stability tests A1 and A2 . The following requirements are to be regarded as target values for the design: • B1 : Maximum motor torque due to measurement noise axis 1: 0.7 Nm • B2 : Maximum motor torque due to measurement noise axis 2: 0.4 Nm • B3 : Maximum motor torque axis 1: 35 Nm • B4 : Maximum motor torque axis 2: 20 Nm • B5 : Max TCP position error due to force disturbance: 7 mm • B6 : Max TCP settling time, i.e., error < 0.1 mm, after end of force disturbance pulse: 3 s
6
The Design Task: Performance Specification and Cost Function
285
• B7 : Max TCP position error due to motor torque disturbance: 0.5 mm Note that the dynamics of the manipulator varies with the tool position and also due to the uncertainty of the manipulator model. Furthermore, the disturbances are also uncertain, the force can have any direction and the motor torque ripple can also change direction. h iT At each configuration Qk = qa1 qa2 , the following cost function is defined Vk =
7 X i=1
wi max(bi ), P ,D
(15)
where P is a set containing all manipulator models obtained from the uncertainty description and D is the corresponding set for the disturbances. The relative fulfillment of specification h Bi is denoted bi , e.g., aisettling time of 2 s gives b6 = 2/3. The weights wi are 3 3 2 2 25 40 25 , i.e., a controller which fulfils all requirements exactly, has a cost function V = 100. The design should aim at minimizing the average cost function NQ 1 X V = Vk , NQ
(16)
k=1
where the performance is evaluated for a suitable grid of NQ configurations in the manipulator work space. The problem of computing the average (w.r.t. workspace) worst case (w.r.t. uncertainty) performance for a non-linear system might seem hard from a theoretical point of view. However, a wisely chosen grid of configurations and a set of assumed worst case uncertainties in combination with some random uncertainties yields a reasonable approximation of the average worst case performance. The simulation model including the default PID controller is available for download at Moberg (2007) where some additional information about this benchmark problem also can be found. The simulation model is implemented in MatlabTM and SimulinkTM . The approximate average worst case performance for the proposed controller is computed by the model. This computation is based on a predefined set of uncertainties and configurations. Solutions to the problem can be sent to one of the authors for further evaluation. Our plan is that the proposed solutions shall be presented and discussed at, e.g., an invited session at some appropriate future conference. The target requirements due to force disturbances are illustrated in Figure 8. In Figures 9 - 10, the TCP position errors are shown for the nominal manipulator model controlled by the default PID controller when one example disturbance is applied. The result for 20 uncertain systems, i.e., 20 sets of model and disturbance uncertainties, in one specific position, is shown in Figures 11 - 12. As an example of computation of the average worst case performance, the bench-
286 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
z [mm]
5 0 −5 −10
0 x [mm]
10
Figure 8: Target for disturbance rejection w.r.t. tool force disturbance. TCP shall always be inside the large circle, and be inside the small circle after target settling time. Note that the small circle in this figure is enlarged for illustration purposes. The actual radius is 0.1 mm.
Error [mm]
8 6 4 2 0 10
11
12 Time [s]
13
14
Figure 9: Example of TCP position error due to force disturbance.
Error [mm]
1
0.5
0
0
2
4 6 Time [s]
8
10
Figure 10: Example of TCP position error due to motor torque disturbance.
6
The Design Task: Performance Specification and Cost Function
287
Figure 11: Example of TCP position error for uncertain system due to force disturbance.
Figure 12: Example of TCP position error for uncertain system due to motor torque disturbance.
288 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
Table 3: Average worst case performance of default PID controller. Item B1 B2 B3 B4 B5 B6 B7 V
Result for PID 0.17 0.06 9.6 9.1 10.2 3.5 1.1 141
Desired Value 0.7 0.4 35 20 7 3 0.5 100
mark system, controlled by the default PID controller, was simulated over a grid of 18 configurations. At each configuration, 3 uncertain systems were evaluated. The target values concerning disturbance rejection, B5 - B7 , are in general not fulfilled. The performance is summarized in Table 3.
7
Summary
A benchmark problem treating disturbance rejection for a nonlinear flexible twolink manipulator has been presented. The system is uncertain due to a parametric uncertainty description and uncertain disturbances affecting both the motors and the tool. The proposed model was validated on a real industrial manipulator. The system should be controlled by a discrete-time controller that optimizes performance for given robustness requirements. Our ambition and hope is that some researchers will be stimulated to work with this benchmark problem using their favorite controller design method. The proposed solutions will be presented at some appropriate future event.
8
Acknowledgements
The authors would like to thank Sven Hanssen and Sören Quick at ABB Robotics for valuable help and support.
Bibliography
289
Bibliography K.J. Åström. The future of control. Modeling, Identification and Control, 15(3): 127–134, 1994. D.S. Bernstein. On bridging the theory/practise gap. IEEE Control Systems Magazine, 19(6):64–70, 1999. B. Feeny and F.C. Moon. Chaos in a forced dry-friction oscillator: Experiments and numerical modelling. Journal of Sound and Vibration, 170(3):303–323, 1994. Leica. Leica geosystems laser trackers. www.leica-geosystems.com, 2007. S. Moberg. Robust control of a multivariable nonlinear flexible manipulator - a benchmark problem. www.robustcontrol.org, 2007. S. Moberg and S. Hanssen. A DAE approach to feedforward control of flexible manipulators. In Proc. 2007 IEEE International Conference on Robotics and Automation, pages 3439–3444, Roma, Italy, April 2007. S. Moberg and J. Öhr. Robust control of a flexible manipulator arm: A benchmark problem. Prague, Czech Republic, 2005. 16th IFAC World Congress. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust feedback control of a flexible manipulator. Technical Report LiTH-ISY-R-2820, Department of Electrical Engineering, Linköping University, SE-581 83 Linköping, Sweden, 2007. Submitted to IEEE Transactions on Control Systems Technology. S. Moberg, J. Öhr, and S. Gunnarsson. A benchmark problem for robust control of a multivariable nonlinear flexible manipulator. In Proc. 17th IFAC World Congress, Seoul, Korea, July 2008. L. Sciavicco and B. Siciliano. Modeling and Control of Robotic Manipulators. Springer, London, Great Britain, 2000. M. W. Spong. Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109:310–319, December 1987.
290 Paper G A Benchmark Problem for Robust Control of a Multivariable Manipulator
PhD Dissertations Division of Automatic Control Linköping University
M. Millnert: Identification and control of systems subject to abrupt changes. Thesis No. 82, 1982. ISBN 91-7372-542-0. A. J. M. van Overbeek: On-line structure selection for the identification of multivariable systems. Thesis No. 86, 1982. ISBN 91-7372-586-2. B. Bengtsson: On some control problems for queues. Thesis No. 87, 1982. ISBN 91-7372593-5. S. Ljung: Fast algorithms for integral equations and least squares identification problems. Thesis No. 93, 1983. ISBN 91-7372-641-9. H. Jonson: A Newton method for solving non-linear optimal control problems with general constraints. Thesis No. 104, 1983. ISBN 91-7372-718-0. E. Trulsson: Adaptive control based on explicit criterion minimization. Thesis No. 106, 1983. ISBN 91-7372-728-8. K. Nordström: Uncertainty, robustness and sensitivity reduction in the design of single input control systems. Thesis No. 162, 1987. ISBN 91-7870-170-8. B. Wahlberg: On the identification and approximation of linear systems. Thesis No. 163, 1987. ISBN 91-7870-175-9. S. Gunnarsson: Frequency domain aspects of modeling and control in adaptive systems. Thesis No. 194, 1988. ISBN 91-7870-380-8. A. Isaksson: On system identification in one and two dimensions with signal processing applications. Thesis No. 196, 1988. ISBN 91-7870-383-2. M. Viberg: Subspace fitting concepts in sensor array processing. Thesis No. 217, 1989. ISBN 91-7870-529-0. K. Forsman: Constructive commutative algebra in nonlinear control theory. Thesis No. 261, 1991. ISBN 91-7870-827-3. F. Gustafsson: Estimation of discrete parameters in linear systems. Thesis No. 271, 1992. ISBN 91-7870-876-1. P. Nagy: Tools for knowledge-based signal processing with applications to system identification. Thesis No. 280, 1992. ISBN 91-7870-962-8. T. Svensson: Mathematical tools and software for analysis and design of nonlinear control systems. Thesis No. 285, 1992. ISBN 91-7870-989-X. S. Andersson: On dimension reduction in sensor array signal processing. Thesis No. 290, 1992. ISBN 91-7871-015-4. H. Hjalmarsson: Aspects on incomplete modeling in system identification. Thesis No. 298, 1993. ISBN 91-7871-070-7. I. Klein: Automatic synthesis of sequential control schemes. Thesis No. 305, 1993. ISBN 91-7871-090-1. J.-E. Strömberg: A mode switching modelling philosophy. Thesis No. 353, 1994. ISBN 917871-430-3. K. Wang Chen: Transformation and symbolic calculations in filtering and control. Thesis No. 361, 1994. ISBN 91-7871-467-2. T. McKelvey: Identification of state-space models from time and frequency data. Thesis No. 380, 1995. ISBN 91-7871-531-8. J. Sjöberg: Non-linear system identification with neural networks. Thesis No. 381, 1995. ISBN 91-7871-534-2. R. Germundsson: Symbolic systems – theory, computation and applications. Thesis No. 389, 1995. ISBN 91-7871-578-4.
P. Pucar: Modeling and segmentation using multiple models. Thesis No. 405, 1995. ISBN 91-7871-627-6. H. Fortell: Algebraic approaches to normal forms and zero dynamics. Thesis No. 407, 1995. ISBN 91-7871-629-2. A. Helmersson: Methods for robust gain scheduling. Thesis No. 406, 1995. ISBN 91-7871628-4. P. Lindskog: Methods, algorithms and tools for system identification based on prior knowledge. Thesis No. 436, 1996. ISBN 91-7871-424-8. J. Gunnarsson: Symbolic methods and tools for discrete event dynamic systems. Thesis No. 477, 1997. ISBN 91-7871-917-8. M. Jirstrand: Constructive methods for inequality constraints in control. Thesis No. 527, 1998. ISBN 91-7219-187-2. U. Forssell: Closed-loop identification: Methods, theory, and applications. Thesis No. 566, 1999. ISBN 91-7219-432-4. A. Stenman: Model on demand: Algorithms, analysis and applications. Thesis No. 571, 1999. ISBN 91-7219-450-2. N. Bergman: Recursive Bayesian estimation: Navigation and tracking applications. Thesis No. 579, 1999. ISBN 91-7219-473-1. K. Edström: Switched bond graphs: Simulation and analysis. Thesis No. 586, 1999. ISBN 91-7219-493-6. M. Larsson: Behavioral and structural model based approaches to discrete diagnosis. Thesis No. 608, 1999. ISBN 91-7219-615-5. F. Gunnarsson: Power control in cellular radio systems: Analysis, design and estimation. Thesis No. 623, 2000. ISBN 91-7219-689-0. V. Einarsson: Model checking methods for mode switching systems. Thesis No. 652, 2000. ISBN 91-7219-836-2. M. Norrlöf: Iterative learning control: Analysis, design, and experiments. Thesis No. 653, 2000. ISBN 91-7219-837-0. F. Tjärnström: Variance expressions and model reduction in system identification. Thesis No. 730, 2002. ISBN 91-7373-253-2. J. Löfberg: Minimax approaches to robust model predictive control. Thesis No. 812, 2003. ISBN 91-7373-622-8. J. Roll: Local and piecewise affine approaches to system identification. Thesis No. 802, 2003. ISBN 91-7373-608-2. J. Elbornsson: Analysis, estimation and compensation of mismatch effects in A/D converters. Thesis No. 811, 2003. ISBN 91-7373-621-X. O. Härkegård: Backstepping and control allocation with applications to flight control. Thesis No. 820, 2003. ISBN 91-7373-647-3. R. Wallin: Optimization algorithms for system analysis and identification. Thesis No. 919, 2004. ISBN 91-85297-19-4. D. Lindgren: Projection methods for classification and identification. Thesis No. 915, 2005. ISBN 91-85297-06-2. R. Karlsson: Particle Filtering for Positioning and Tracking Applications. Thesis No. 924, 2005. ISBN 91-85297-34-8. J. Jansson: Collision Avoidance Theory with Applications to Automotive Collision Mitigation. Thesis No. 950, 2005. ISBN 91-85299-45-6. E. Geijer Lundin: Uplink Load in CDMA Cellular Radio Systems. Thesis No. 977, 2005. ISBN 91-85457-49-3. M. Enqvist: Linear Models of Nonlinear Systems. Thesis No. 985, 2005. ISBN 91-8545764-7. T. B. Schön: Estimation of Nonlinear Dynamic Systems — Theory and Applications. Thesis No. 998, 2006. ISBN 91-85497-03-7.
I. Lind: Regressor and Structure Selection — Uses of ANOVA in System Identification. Thesis No. 1012, 2006. ISBN 91-85523-98-4. J. Gillberg: Frequency Domain Identification of Continuous-Time Systems Reconstruction and Robustness. Thesis No. 1031, 2006. ISBN 91-85523-34-8. M. Gerdin: Identification and Estimation for Models Described by Differential-Algebraic Equations. Thesis No. 1046, 2006. ISBN 91-85643-87-4. C. Grönwall: Ground Object Recognition using Laser Radar Data – Geometric Fitting, Performance Analysis, and Applications. Thesis No. 1055, 2006. ISBN 91-85643-53-X. A. Eidehall: Tracking and threat assessment for automotive collision avoidance. Thesis No. 1066, 2007. ISBN 91-85643-10-6. F. Eng: Non-Uniform Sampling in Statistical Signal Processing. Thesis No. 1082, 2007. ISBN 978-91-85715-49-7. E. Wernholt: Multivariable Frequency-Domain Identification of Industrial Robots. Thesis No. 1138, 2007. ISBN 978-91-85895-72-4. D. Axehill: Integer Quadratic Programming for Control and Communication. Thesis No. 1158, 2008. ISBN 978-91-85523-03-0. G. Hendeby: Performance and Implementation Aspects of Nonlinear Filtering. Thesis No. 1161, 2008. ISBN 978-91-7393-979-9. J. Sjöberg: Optimal Control and Model Reduction of Nonlinear DAE Models. Thesis No. 1166, 2008. ISBN 978-91-7393-964-5. D. Törnqvist: Estimation and Detection with Applications to Navigation. Thesis No. 1216, 2008. ISBN 978-91-7393-785-6. P-J. Nordlund: Efficient Estimation and Detection Methods for Airborne Applications. Thesis No. 1231, 2008. ISBN 978-91-7393-720-7. H. Tidefelt: Differential-algebraic equations and matrix-valued singular perturbation. Thesis No. 1292, 2009. ISBN 978-91-7393-479-4. H. Ohlsson: Regularization for Sparseness and Smoothness — Applications in System Identification and Signal Processing. Thesis No. 1351, 2010. ISBN 978-91-7393-287-5.